I want to compare two groups ((0.hsgrad+1.hsgrad) vs. 2.hsgrad) after mvreg.
The syntax for the not imputed dataset works fine.
If I want to replicate the same with an imputed dataset, the following error message is displayed:
. mi test (0.hsgrad+1.hsgrad)/2 = 2.hsgrad
=exp not allowed
r(101);
What is my fault?
Code:
use http://www.stata-press.com/data/r13/mheart1s20, clear preserve mi extract 5 replace hsgrad=2 if smokes==1 mvreg bmi = female##hsgrad margins , predict(equation(bmi)) dydx(hsgrad ) asbalanced post test (0.hsgrad+1.hsgrad)/2 = 2.hsgrad esizei `=r(df)' `=r(df_r)' `=r(F)' restore replace hsgrad=2 if smokes==1 mi estimate : mvreg bmi = female##hsgrad mimrgns , predict(equation(bmi)) dydx(hsgrad ) asbalanced post mi test (0.hsgrad+1.hsgrad)/2 = 2.hsgrad
0 Response to Syntaxproblem with mi test
Post a Comment