Thanks (as always) to Kit Baum, the package scores has been updated on SSC with a new .ado-file (and correspondingly a new help file).
Using row functions of egen, scores calculates scores according to different functions (min, max, total, sd, mean, median, percentile) using sets of variables and assigns them to a new variable. If the number of valid values is less than a user specified number the resulting score will be set to missing. Mean scores can be transformed into z-scores, centered, divided by 2 standard deviations (Gelman 2008), transformed into the percentage of maximum possible scores (POMPs, Cohen et al. 1999), into the proportion of maximum possible scores, or into a shrunken proportion (Smithson & Verkuilen 2006) of maximum possible scores. by, aweights, fweights, and iweights are allowed.
This version includes the following changes/additions:
To install, you can use
To update an already existing version, you can use
References
Using row functions of egen, scores calculates scores according to different functions (min, max, total, sd, mean, median, percentile) using sets of variables and assigns them to a new variable. If the number of valid values is less than a user specified number the resulting score will be set to missing. Mean scores can be transformed into z-scores, centered, divided by 2 standard deviations (Gelman 2008), transformed into the percentage of maximum possible scores (POMPs, Cohen et al. 1999), into the proportion of maximum possible scores, or into a shrunken proportion (Smithson & Verkuilen 2006) of maximum possible scores. by, aweights, fweights, and iweights are allowed.
This version includes the following changes/additions:
- A new score() option z_2 allows to transform mean scores to z-scores divided by 2 (resulting mean = 0, sd = 0.5) (see Gelman, 2008).
- A new score() option sd2 will rescale mean scores by dividing by 2 standard deviations (resulting sd = 0.5) (see Gelman, 2008).
- If scores is used to simply transform an already existing variable, now you can specify the original variable both as newvar and in the function mean() if you are using the option replace to overwrite the original variable.
To install, you can use
Code:
ssc install scores
Code:
ssc install scores, replace
- Cohen, P., Cohen, J., Aiken, L.S., & West, S.G. (1999). The problem of units and the circumstance for POMP. Multivariate Behavioral Research, 34, 315-346.
- Gelman, A. (2008). Scaling regression inputs by dividing by two standard deviations. Statistics in Medicine, 27, 2865-2873.
- Smithson, M. & Verkuilen, J. (2006). A better lemon squeezer? Maximum-likelihood regression with beta-distributed dependent variables. Psychological Methods, 11, 54-71.
Comment