STATA command help (change direction of continuous variable)

yedi

New Member
#1
I am running a logistic regression with STATA. One of my independent variables measure standard of living and it’s a continuous variable (range -2.8 to 1.3) and higher value indicate better standard of living. My study shows association between standard of living and mental illness and the odds ratio (less than 1) indicates people with higher standard of living are less likely to have metal illness. But my objective is to identify risk factors for mental illness, hence I want to inverse my independent variable to get an odds ration >1 in other words describe low standard of living associated with increased risk of mental illness. Is there a STATA command by which I can change the direction of my independent variable in my logistic regression….? Or any other ideas to achieve this

Many thanks
 

terzi

TS Contributor
#2
Have you tried multiplying the continuous variable by (-1)? That way, the higher value the worst standard of living. So, the coefficient should change its sign and the odds ratio should change.