Programming the statistical procedures from SAS

Bootstrapping

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 11
Accepted Solution

Bootstrapping

Hello, 

 

I am trying to run the codes below, but it gives me a warning sign. It seems that when I pass the EM estimates of the covariance matrix to PROC REG, it doesn’t know how many observations it was based on. 

 

Here is the warning message:

WARNING: The data set WORK.NLSYEM2 does not indicate how many observations were used to compute the COV matrix. The number of observations has been set to 10000. Statistics that depend on the number of observations (such as p-values) are not interpretable.

 

Interestingly, the exact codes work in someone else's SAS. 

I would appreciate any help to fix this!

 

 

proc surveyselect data=miss.nlsymiss method=urs N=581 reps=1000 out=bootsamp;
run;
proc mi data=bootsamp nimpute=0 noprint;
	var anti self pov black hispanic divorce gender momwork;
	em outem=nlsyem2;
	by replicate;
run;
proc reg data=nlsyem2 outest=a noprint;
	model anti=self pov black hispanic divorce gender momwork;
	by replicate;
run;
proc means data=a std;
	var self pov black hispanic divorce gender momwork;
run;

Accepted Solutions
Solution
‎05-25-2018 01:05 PM
SAS Super FREQ
Posts: 4,245

Re: Bootstrapping

Posted in reply to brainupgraded

You should always specify where you got a program,

 

This code originally came from pp 14-16 of Paul Allison's SAS Global Forum 2012 paper, "Handling Missing Data by Maximum Likelihood." You should read the entire passage, but on p. 15 he prints the same WARNING that you posted and says that the MI process implies that you can't specify the number of observations to PROC REG, as you would usually do with a TYPE=EST data set. He then shows the code that you post as a way to estimate the p-values and standard errors for the MI process.

 

So the answers to your question are

1. This code "works" as intended. It provides estimates of p-values and standard errors for a missing value imputation.

2. It does not "work in someone else's SAS," assuming that you are implying that you are seeing a warning and that someone else is not.

3. There is no "fix." The warning is telling you an important fact about MI. The bootstrap provides estimates that cannot be estimated directly form the imputations.

 

 

View solution in original post


All Replies
Super User
Posts: 23,771

Re: Bootstrapping

Posted in reply to brainupgraded

Interestingly, the exact codes work in someone else's SAS. 

 

When that happens, I usually assume that there's a version mismatch. What is your version of SAS, including the STAT version and the "someone else's" version?

Occasional Contributor
Posts: 11

Re: Bootstrapping

I am using SAS 9.4 and  SAS/STAT 14.3. I don't know the other's SAS version. It is possible that he is using the older version of SAS. But still, in that case, I am not sure why the code works in the older version but not in a newer version?

 

Solution
‎05-25-2018 01:05 PM
SAS Super FREQ
Posts: 4,245

Re: Bootstrapping

Posted in reply to brainupgraded

You should always specify where you got a program,

 

This code originally came from pp 14-16 of Paul Allison's SAS Global Forum 2012 paper, "Handling Missing Data by Maximum Likelihood." You should read the entire passage, but on p. 15 he prints the same WARNING that you posted and says that the MI process implies that you can't specify the number of observations to PROC REG, as you would usually do with a TYPE=EST data set. He then shows the code that you post as a way to estimate the p-values and standard errors for the MI process.

 

So the answers to your question are

1. This code "works" as intended. It provides estimates of p-values and standard errors for a missing value imputation.

2. It does not "work in someone else's SAS," assuming that you are implying that you are seeing a warning and that someone else is not.

3. There is no "fix." The warning is telling you an important fact about MI. The bootstrap provides estimates that cannot be estimated directly form the imputations.

 

 

Occasional Contributor
Posts: 11

Re: Bootstrapping

I am actually taking Dr. Allison's online seminar on missing data offered by Statistical Horizons, and it's for one of the exercises this week. So I wrote the code, but it just happens to be the same with the code in the document you shared with me because it's from the same person using the same example Smiley Happy

 

So it seems like bootstrapping is one solution to the problem, and it is ok to get the warning message. 

I will talk with Dr. Allison directly. 

 

Thank you so much for your help!

 

 

SAS Super FREQ
Posts: 4,245

Re: Bootstrapping

Posted in reply to brainupgraded

From hearing Paul at SAS Global Forum and from reading his books and papers, I am confident that you will have an interesting and educational seminar. There are few experts on this forum who know about missing values and answer missing-value questions on this forum. But after you become an expert yourself, please come back and help answer other people's questions! (Of course, you are welcome to ASK other questions as well Smiley Wink )

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 250 views
  • 4 likes
  • 3 in conversation