BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
brainupgraded
Obsidian | Level 7

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;
1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

5 REPLIES 5
Reeza
Super User

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?

brainupgraded
Obsidian | Level 7

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?

 

Rick_SAS
SAS Super FREQ

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.

 

 

brainupgraded
Obsidian | Level 7

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 🙂

 

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!

 

 

Rick_SAS
SAS Super FREQ

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 )

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 1780 views
  • 4 likes
  • 3 in conversation