So, what I was doing is, first, standardize the X variables, then, regress the Y on standardized Xs. But the standardized coefficients from my model are different from the "listcoef" results for the categorical variables. Standardize categorical variables will literally yield the same thing, so I kept using
Code:
i.foreign i.hdroom
Code:
sysuse auto,clear * drop missing data drop if rep78==. * recode headroom into three categories recode headroom (1.5 2 2.5 =1 "small") /// (3 3.5 =2 "medium") /// (4 4.5 5 =3 "large"), /// gen(hdroom) label(headroom) tab hdroom,mi * unstandardized coefficient ologit rep78 price i.foreign i.hdroom * get standardized coefficient using "listcoef" listcoef, std help * standardize X variables foreach v in price foreign hdroom { egen std`v' = std(`v') } * get x-standardized coefficient ologit rep78 stdprice i.foreign i.hdroom
Did I misunderstand x-standardized coefficient? How does "listcoef" work?
0 Response to how to get x-standardized coefficient in logistic regression, i.e., reproduce results from "listcoef" command
Post a Comment