Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Scoring system
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: Scoring system
Date
Mon, 23 Jul 2012 19:06:01 +0100
If you got missing values in the result, you have missing values in one or more of the variables used. There's no advice I can see except to investigate the structure of missing values and decide what your rules are given missing values.
Nick
[email protected]
[email protected]
I am hoping for some help creating the code for a scoring system:
I have several different variable. All my variables except for one are bina= ry (1/0) and the one is 2/1/0. They are coded as float variables.
For every ID I am trying to create a total score with the sum of the score = for variable1 + variable2 + variable3 + 8* variable4 + 4* variable5 + 2* va=
riable6 - 3*variable7. If variable1 is 1 then it adds to the score, if it 0= then it doesn't. If variable7 is yes then I want subtract 3 points.
I tried with
generate total_score=3D variable1 + variable2 + variable3 + 8* variable4 + =
4* variable5 + 2* variable6 - 3*variable7 but only got missing values.
What do I need to do? Thank you very much for you help!!
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/