BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
somebody
Lapis Lazuli | Level 10

I am trying to compute White standard errors (SE) following this post http://pages.stern.nyu.edu/~adesouza/comp/sas.html

What I notice is that PROC SURVEYREG provide the same SE as the other options. So is it true that PROC SURVEYREG produces White SE as default? or am I missing anything here? I also test on other datasets and got the same results. Here are the sample dataset and code:

*Get the dataset;
	filename foo1 URL "http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/se/test_data.txt";
	data ds;
	  infile foo1;
	  input firmid year x y;
	run;
*Now run different methods;
	*Normal SE;
		proc reg data=ds;
		    model y = x;
			ods output ParameterEstimates=temp0 fitstatistics=fit0;
		run;
	*option1: Using PROC SURVEYREG with no special specs;
		proc surveyreg data=ds;
			model y = x / solution;
			ods output ParameterEstimates=temp1 fitstatistics=fit1;
		run;quit;

	*option2;
		proc reg data=ds ;
			model y = x / white;
			ods output ParameterEstimates=temp2 fitstatistics=fit2;
		run;quit;
	*option3;
		proc model data=ds;
		   instruments x ;
		   y=b0+b1*misp + b2*iv + b3*mom6;
			*y = b0 + b1* x;
		   fit y / gmm kernel=(bart,1,0);
		   ods output ParameterEstimates=temp3 fitstatistics=fit3;
		run;quit;
	*option4: same as option 1 but cluster each obs. Dont know why but the article suggests so;
		data ds;
		   set ds;
		   counter=_n_;
		run;
		proc surveyreg data=ds;
		   cluster counter;
		   model y=x;
		   ods output ParameterEstimates=temp4 fitstatistics=fit4;
		run;quit;
	*option5: note that the ods output statement does not work. check the output on Results Viewer;
		proc genmod data=ds;
		   class counter;
		   model y=x;
		   repeated subject=counter /type=ind;
			ods output ParameterEstimates=temp5 fitstatistics=fit5;
		run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Zard
SAS Employee

PROC SURVEYREG uses the Taylor series linearization method to compute the variance. This robust variance estimation method is also referred to as the Huber-White sandwich estimator, the design-based estimator and the Rogers estimator.

View solution in original post

1 REPLY 1
Zard
SAS Employee

PROC SURVEYREG uses the Taylor series linearization method to compute the variance. This robust variance estimation method is also referred to as the Huber-White sandwich estimator, the design-based estimator and the Rogers estimator.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1020 views
  • 2 likes
  • 2 in conversation