-------------------------------------------------------------------------------
help for genscore                                          Jean-benoit Hardouin
-------------------------------------------------------------------------------

Module to generate a score

genscore varlist [if exp] [in range] [, score(newvarname) mean missing(string) replace]

Description

genscore allows creating a new variable containing the score computed as the sum (or the mean) of the responses to the variables defined in varlist. The new variable will contain a missing value for each individual with at least one missing values among the variables of varlist.

Options

score defines the name of the new variable (score by default).

mean allows obtaining a mean score (the sum of the responses is divided by the number of variables).

missing defines a specific modality of the variables which can be considered as a missing value.

replace allows replacing the variable defined in the score option if it already exists.

Examples

. genscore turn trunk mpg

. genscore item1-item20, score(totscore) mean missing(9)

. genscore var*, score(scorevar) replace

Author

Jean-Benoit Hardouin, Regional Health Observatory (ORS) - 1, rue Porte Madeleine - BP 2439 - 45032 Orleans Cedex 1 - France. You can contact the author at jean-benoit.hardouin@orscentre.org and visit the websites AnaQol and FreeIRT

Also see

Online: help for egen, generate and mvdecode