When using MLwiN, you can choose whether a continuous covariate is uncentred, centred at grand mean, centred around a value or by groups. How can you set this when using runmlwin in STATA especially when you want the covariate to be uncentred?
Thanks
Uncentred covariate
-
- Site Admin
- Posts: 432
- Joined: Fri Apr 01, 2011 2:14 pm
Re: Uncentred covariate
Dear coopsrct,
We have not implemented this functionality in the runmlwin command. We note that it is also not implemented in Stata's own commands. In Stata you have to manually centre your covariates (by generating new variables) prior to including them in a model.
Consider covariate x
We can centre x around a specific value 17 as follows
. generate xdev1 = x - 17
We can grand mean centre x as follows
. summarize x
. generate xmn2 = r(mean)
. generate xdev2 = x - xmn2
We can group mean centre x as follows
. bysort cluster: egen xmn3 = mean(x)
. generate xdev3 = x - xmn3
Best wishes
George
We have not implemented this functionality in the runmlwin command. We note that it is also not implemented in Stata's own commands. In Stata you have to manually centre your covariates (by generating new variables) prior to including them in a model.
Consider covariate x
We can centre x around a specific value 17 as follows
. generate xdev1 = x - 17
We can grand mean centre x as follows
. summarize x
. generate xmn2 = r(mean)
. generate xdev2 = x - xmn2
We can group mean centre x as follows
. bysort cluster: egen xmn3 = mean(x)
. generate xdev3 = x - xmn3
Best wishes
George