Code Monkey home page Code Monkey logo

danielamattei / sasprobsup Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 54 KB

This code is an implementation of the A statistic, otherwise known as the probability of superiority, in SAS. The A statistic is a non-parametric form of the common language effect-size. Both it and its counterpart, RProbSup, are available at the website linked below.

Home Page: https://ruscio.pages.tcnj.edu/quantitative-methods-program-code/

License: MIT License

sas effect-size probability statistics

sasprobsup's Introduction

*         ***     *     ***   ****   ****    ***   ****    ***   *   *  ****   *
*        *   *   * *   *   *  *   *  *   *  *   *   *  *  *   *  *   *  *   *  *
*         *     *   *   *     *   *  *   *  *   *   *  *   *     *   *  *   *  *
*          *    *****    *    ****   ****   *   *   ***     *    *   *  ****   *
*           *   *   *     *   *      * *    *   *   *  *     *   *   *  *      *
*        *   *  *   *  *   *  *      *  *   *   *   *  *  *   *  *   *  *      *
*         ***   *   *   ***   *      *   *   ***   ****    ***    ***   *      *;
/*			   Generated with proc explode.                        */

/* Author: Daniel Mattei. https://www.linkedin.com/in/daniel-mattei-392929137/ */
/* Maintainer: Daniel Mattei <[email protected]>			               */
/* Version 1.0							               */

/* This program is an implementation of RProbSup's functionality in SAS.  	         */
/* It is designed for those interested in computing variants of the A statistic, a       */
/* non-parametric form of the common language (CL) effect-size statistic, as well as     */
/* bootstrapped confidence intervals of the estimate.                                    */
/* Although this program uses SAS/IML, it is designed for those most comfortable         */
/* With Base SAS - No interaction with SAS/IML is required, simply the macro program     */
/* provided and a few macro variables. However, the SAS/IML functions called by the      */
/* macro were also designed themselves to be called directly. 			         */
/* A dataset from the DATA step is the expected input for the dsn= parameter of the      */
/* macro program.            								 */
/* Results are exported as a .sas7bdat file with output displayed for immediate viewing. */
/* Required Licenses: SAS/STAT | SAS/IML                                                 */

/* Special thanks to Rick Wicklin for his wonderful blog entries on the SAS/IML language */
/* and all of its neat features. Check out his blog for IML tips:                        */
/* https://blogs.sas.com/content/iml/                                                    */
/* Enthusiastic thanks to Dr. John Ruscio and his original RProbSup package,             */
/* which this program implements for use in SAS.                                         */
/* This package as well as other programs are accessible at John's website below:        */
/* https://ruscio.pages.tcnj.edu/quantitative-methods-program-code/                      */
/* For a discussion of the A statistic and its variants, please refer to                 */
/* Ruscio & Gera (2013)	 						                 */


/* What follows is a specification of the values and formats the parameters of the macro */
/* program will accept. 							         */

/* Any membership variables (and any columns in general)  		      		 */
/* should consist of numeric type data. 		                                 */

/* %A Macro Arguments:	                                                               	 */

/* dsn: The Base SAS dataset to be analyzed.					         */
/* For a between-subjects design, data should be in narrow/long format with the          */
/* membership variable as the first column.		                   	 	 */
/* For a within-subjects design, data should be in wide format, with each observation    */
/* representing a person and each column representing a variable with their score.       */

/* design: Specification of the type of analysis designed.				 */
/* 1 = between-subjects analysis (DEFAULT). 		                        	 */
/* 2 = within-subjects analysis. 		                                     	 */

/* statistic: The version of the A statistic to be calculated.			      	 */
/* 1 = The A statistic for 2 groups (DEFAULT).	      		                         */
/* 2 = The A statistic for k groups through the average absolute deviation.	         */
/* 3 = The A statistic for k groups through the average absolute pairwise deviation.     */
/* 4 = The A statistic for k groups, comparing a reference group with the union of all 	 */
/*     other groups. 			                                   		 */
/* 5 = The A statistic for the ordinal comparison of k groups.	                   	 */

/* weights: The weights to be assigned to each group.			                 */
/* 0 = The data are unweighted (DEFAULT).	                                         */
/* 1 = The data are are weighted.                     					 */
/* NOTE: If 1 is entered, the weights should be in the final column.		         */

/* increase: Establishes whether scores are expected to correlate with the dummy coding  */
/*    	     of groups.				                      			 */
/* NOTE: This argument is only used if statistic = 5.		                       	 */
/* 0 = False (DEFAULT).                                                  		 */
/* 1 = True.									         */

/* ref: Designates the reference group of comparison.	                                 */
/* NOTE: This argument is only used if statistic = 4.		                         */
/* 1 = The first group is the reference group (DEFAULT).	                 	 */

/* r: A row vector of proportions that specifies the proportions of the sample base      */
/*    rates of each group. If specified, the order of the proportions should correspond  */
/*    to the order of the group codes if between-subjects, or variable columns if        */
/*    within-subjects. In the macro program, r is entered delimited by a single space.	 */
/* NOTE: This argument is only used if statistic = 2.				         */
/* 0 = Proportions are equal (DEFAULT).							 */

/* n_bootstrap: The number of samples generated to construct the bootstrapped sampling   */
/*		distribution.							         */
/* 1999 = 1,999 samples are used (DEFAULT).					         */

/* conf_level: The confidence level used to construct the bootstrapped confidence 	 */
/*	       interval.					                         */
/* .95 = Confidence level of 95% (DEFAULT).				                 */

/* ci_method: The method used to construct the bootstrapped confidence interval.	 */
/* 1 = Bias-corrected and Accelerated (BCa) bootstrap interval (DEFAULT).		 */
/* 2 = Percentile Interval bootstrap interval.					      	 */

/* seed: Input for pseudo-random number generation.		                         */
/* 1 = The seed input (DEFAULT).						         */

/* missing: Determines whether missing values are removed or replaced by a constant.	 */
/* 0 = Missing values are removed (DEFAULT).		                                 */
/* 1 = Missing values are replaced by the number specified in mconstant=.                */

/* mconstant: Determines the constant to replace missing values with.		         */
/* NOTE: This argument is only used if missing = 1.				         */
/* 0 = Missing values are replaced with 0 (DEFAULT).				         */

/* ID: Designates whether the first column includes an ID variable that should be 	 */
/*     disregarded. 								         */
/* 0 = The first column (ID variable) should be disregarded (DEFAULT).			 */
/* 1 = The first column does not include an ID variable that should be disregarded.      */
/* NOTE: If a between-subjects analysis is desired and ID = 0, the second column should  */
/*       contain the membership codes.						         */
/*       If the ID variable is the stratification variable for a between-subjects        */
/*       analysis, then argument should be set to 1. 				      	 */

/* LASTLY: Note that the SAS/IML functions called by the macro program are designed to   */
/* 	   be used independently if desired. The arguments detailed above differ only in */
/*         the following way for these functions: A1() | CalcA1() | A2() | CalcA2()      */
/*         The arguments for the input of data are split into y1 and y2. Each should be  */
/*         row vectors.									 */
/*         In addition, some functions will have parameters that specify default weight  */
/*	   values. These are meant to prevent errors in certain instances if weights = 1 */
/*         is mistakenly selected without a weight column in the input data and may be 	 */
/*         ignored.					      			         */

sasprobsup's People

Contributors

danielamattei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.