dear,
i estimate the same model firstly by using proc surveyreg and secondly by using proc glimmix. i want robust standard errors (as i work with longitudinal data with repeated observations of individuals "mergeid" . i get the same estimates in surveyreg and in glimmix, but i get however different pvalues. how do you explain that?
this is the command in proc surveyreg:
proc surveyreg data=l (where=(gender=2));
model retired = age56 age57 age58 age59 age60 age61 age62 age63 age64 age65 eli1 eli2 eli3
age56*eli1 age57*eli1 age58*eli1 age59*eli1 age60*eli1 age61*eli1 age62*eli1 age62*eli1 age63*eli1
age64*eli1 age65*eli1 age56*eli2 age57*eli2 age58*eli2 age59*eli2 age60*eli2 age61*eli2 age62*eli2 age62*eli2 age63*eli2
age64*eli2 age65*eli2 age56*eli3 age57*eli3 age58*eli3 age59*eli3 age60*eli3 age61*eli3 age62*eli3 age62*eli3 age63*eli3
age64*eli3 age65*eli3 lang edu2 edu3 edu4 health1 health2 health4 health5 married divorce ch001_ maxassim u laggdprate gdprate;
cluster mergeid;
run;
this is the command in proc glimmix:
proc glimmix data=l(where=(gender=2 ));
class mergeid;
model retired = age56 age57 age58 age59 age60 age61 age62 age63 age64 age65 eli1 eli2 eli3
age56*eli1 age57*eli1 age58*eli1 age59*eli1 age60*eli1 age61*eli1 age62*eli1 age62*eli1 age63*eli1
age64*eli1 age65*eli1 age56*eli2 age57*eli2 age58*eli2 age59*eli2 age60*eli2 age61*eli2 age62*eli2 age62*eli2 age63*eli2
age64*eli2 age65*eli2 age56*eli3 age57*eli3 age58*eli3 age59*eli3 age60*eli3 age61*eli3 age62*eli3 age62*eli3 age63*eli3
age64*eli3 age65*eli3 lang edu2 edu3 edu4 health1 health2 health4 health5 married divorce ch001_ maxassim u laggdprate gdprate/solution;
random residual /subject=mergeid ;
run;
thanks for helping me!
Different procedure => different computation algorithms, different model assumptions, different treatment of weights.
Take your pick of any of those.
If all of those similarly named variables like Age56, Age57, Age58, etc are dummy variables then you may want to save yourself some coding and have a single CLASS variable for Age or Eli, health, edu ...
@marjanmaes6594 wrote:
dear,
i estimate the same model firstly by using proc surveyreg and secondly by using proc glimmix. i want robust standard errors (as i work with longitudinal data with repeated observations of individuals "mergeid" . i get the same estimates in surveyreg and in glimmix, but i get however different pvalues. how do you explain that?
this is the command in proc surveyreg:
proc surveyreg data=l (where=(gender=2));
model retired = age56 age57 age58 age59 age60 age61 age62 age63 age64 age65 eli1 eli2 eli3
age56*eli1 age57*eli1 age58*eli1 age59*eli1 age60*eli1 age61*eli1 age62*eli1 age62*eli1 age63*eli1
age64*eli1 age65*eli1 age56*eli2 age57*eli2 age58*eli2 age59*eli2 age60*eli2 age61*eli2 age62*eli2 age62*eli2 age63*eli2
age64*eli2 age65*eli2 age56*eli3 age57*eli3 age58*eli3 age59*eli3 age60*eli3 age61*eli3 age62*eli3 age62*eli3 age63*eli3
age64*eli3 age65*eli3 lang edu2 edu3 edu4 health1 health2 health4 health5 married divorce ch001_ maxassim u laggdprate gdprate;
cluster mergeid;
run;
this is the command in proc glimmix:
proc glimmix data=l(where=(gender=2 ));
class mergeid;
model retired = age56 age57 age58 age59 age60 age61 age62 age63 age64 age65 eli1 eli2 eli3
age56*eli1 age57*eli1 age58*eli1 age59*eli1 age60*eli1 age61*eli1 age62*eli1 age62*eli1 age63*eli1
age64*eli1 age65*eli1 age56*eli2 age57*eli2 age58*eli2 age59*eli2 age60*eli2 age61*eli2 age62*eli2 age62*eli2 age63*eli2
age64*eli2 age65*eli2 age56*eli3 age57*eli3 age58*eli3 age59*eli3 age60*eli3 age61*eli3 age62*eli3 age62*eli3 age63*eli3
age64*eli3 age65*eli3 lang edu2 edu3 edu4 health1 health2 health4 health5 married divorce ch001_ maxassim u laggdprate gdprate/solution;
random residual /subject=mergeid ;
run;
thanks for helping me!
You can find more that you likely want by reading all the DETAIL sections of the online help for each procedure.
Different procedure => different computation algorithms, different model assumptions, different treatment of weights.
Take your pick of any of those.
If all of those similarly named variables like Age56, Age57, Age58, etc are dummy variables then you may want to save yourself some coding and have a single CLASS variable for Age or Eli, health, edu ...
@marjanmaes6594 wrote:
dear,
i estimate the same model firstly by using proc surveyreg and secondly by using proc glimmix. i want robust standard errors (as i work with longitudinal data with repeated observations of individuals "mergeid" . i get the same estimates in surveyreg and in glimmix, but i get however different pvalues. how do you explain that?
this is the command in proc surveyreg:
proc surveyreg data=l (where=(gender=2));
model retired = age56 age57 age58 age59 age60 age61 age62 age63 age64 age65 eli1 eli2 eli3
age56*eli1 age57*eli1 age58*eli1 age59*eli1 age60*eli1 age61*eli1 age62*eli1 age62*eli1 age63*eli1
age64*eli1 age65*eli1 age56*eli2 age57*eli2 age58*eli2 age59*eli2 age60*eli2 age61*eli2 age62*eli2 age62*eli2 age63*eli2
age64*eli2 age65*eli2 age56*eli3 age57*eli3 age58*eli3 age59*eli3 age60*eli3 age61*eli3 age62*eli3 age62*eli3 age63*eli3
age64*eli3 age65*eli3 lang edu2 edu3 edu4 health1 health2 health4 health5 married divorce ch001_ maxassim u laggdprate gdprate;
cluster mergeid;
run;
this is the command in proc glimmix:
proc glimmix data=l(where=(gender=2 ));
class mergeid;
model retired = age56 age57 age58 age59 age60 age61 age62 age63 age64 age65 eli1 eli2 eli3
age56*eli1 age57*eli1 age58*eli1 age59*eli1 age60*eli1 age61*eli1 age62*eli1 age62*eli1 age63*eli1
age64*eli1 age65*eli1 age56*eli2 age57*eli2 age58*eli2 age59*eli2 age60*eli2 age61*eli2 age62*eli2 age62*eli2 age63*eli2
age64*eli2 age65*eli2 age56*eli3 age57*eli3 age58*eli3 age59*eli3 age60*eli3 age61*eli3 age62*eli3 age62*eli3 age63*eli3
age64*eli3 age65*eli3 lang edu2 edu3 edu4 health1 health2 health4 health5 married divorce ch001_ maxassim u laggdprate gdprate/solution;
random residual /subject=mergeid ;
run;
thanks for helping me!
You can find more that you likely want by reading all the DETAIL sections of the online help for each procedure.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.