Hello all,
I have been trying to recreate SAS output in Stata but keep getting discrepancies.
First, I tried to check skewness and kurtosis and there was quite a discrepancy but I soon learned that is because SAS and Stata use different formulas.
Now, I am trying to create GEE analyses but I am not getting the same results. SAS code below:
%macro linearm(y);
proc genmod data=a; class SBA Gcode (ref="Gentrifying") /param=ref;
model &y = tm tm5 tm10 tm19 Gcode|tm Gcode|tm5 Gcode|tm10 Gcode|tm19 /dist=normal link=identity type3;
repeated subject= SBA/type=AR ;
%mend;
%linearm(sallfd); %linearm(sallfd_d); run;
%linearm(lhealthy); %linearm(sHealthyD); run;
%linearm(lunhealthy); %linearm(sUnhealthyD); run;
I have tried the following in Stata 16:
xtset SBA year
xtgee sAllfd tm tm5 tm10 tm19 i.Gcode Gcode#c.tm Gcode#c.tm5 Gcode#c.tm10 Gcode#c.tm19, family(gaussian) link(identity) corr(ar1)
Would this be incorrect since xtgee provides fit population-averaged panel-data models by using GEE?
Any help is most welcomed.
I have been trying to recreate SAS output in Stata but keep getting discrepancies.
First, I tried to check skewness and kurtosis and there was quite a discrepancy but I soon learned that is because SAS and Stata use different formulas.
Now, I am trying to create GEE analyses but I am not getting the same results. SAS code below:
%macro linearm(y);
proc genmod data=a; class SBA Gcode (ref="Gentrifying") /param=ref;
model &y = tm tm5 tm10 tm19 Gcode|tm Gcode|tm5 Gcode|tm10 Gcode|tm19 /dist=normal link=identity type3;
repeated subject= SBA/type=AR ;
%mend;
%linearm(sallfd); %linearm(sallfd_d); run;
%linearm(lhealthy); %linearm(sHealthyD); run;
%linearm(lunhealthy); %linearm(sUnhealthyD); run;
I have tried the following in Stata 16:
xtset SBA year
xtgee sAllfd tm tm5 tm10 tm19 i.Gcode Gcode#c.tm Gcode#c.tm5 Gcode#c.tm10 Gcode#c.tm19, family(gaussian) link(identity) corr(ar1)
Would this be incorrect since xtgee provides fit population-averaged panel-data models by using GEE?
Any help is most welcomed.
Comment