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: Scoring system
From
<[email protected]>
To
<[email protected]>
Subject
st: Scoring system
Date
Mon, 23 Jul 2012 13:50:57 -0400
Hello,
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!!
Claudia
*
* 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/