Hey guys,
So I am doing some multiple imputation. As some of you know, there are three steps to this. The second step requires use of PROC SURVERYLOGISTIC. I think it's main role is to save the parameter estimates for the final step. Is there an alternative to using it so i can accomplish all three steps?
I don't think that's the only thing that SURVEYLOGISTIC does, but I think it unlikely that some other combination of data step and PROCs will get the same results — unless you are willing to do a large amount of programming.
I did just the first step of the three step imputation process (which did fill in the values)..and did perfectly well when I fit the train data to the validation. (a bit over 80% accuracy)...so not sure..are the three steps always necessary?
Are talking about using Proc MI or some other process?
Yes, I used proc mi to impute based on all the guidelines. But then couldn't do the second step.
You have left out some important details.
But then couldn't do the second step.
Why not? What did you try to do? What stopped you? What happened?
And also: what exactly is the second step, anyway? Give us the details.
Hi Paige,
I am following the procedures in a book called 'Multiple Imputation of missing data using SAS'. The first requires use of proc mi (which I have access to). Here is an example:
proc mi nimpute=3 data=c7_ex1 seed=55 out=c7_ex1_imp;
class racecat gender edcat selfrhealth diabetes arthritis stratum_secu;
fcs plots=trace(mean(bodywgt)) nbiter=20 logistic (edcat diabetes arthritis)
discrim(racecat=gender edcat selfrhealth diabetes arthritis
/classeffect=include) regression (bodywgt);
var stratum_secu kwgtr kage gender racecat edcat diabetes arthritis bodywgt
selfrhealth;
run;
The second step however requires use of proc surveylogistic which I don't have access to. To do this aspect:
proc surveylogistic data=c7_ex1_imp;
weight kwgtr; strata stratum; cluster secu;
by _imputation_;
class racecat gender edcat selfrhealth / param=ref;
model diabetes (event='1')=gender racecat selfrhealth bodywgt;
ods output parameterestimates=c7_ex1_est;
run;
proc print data=c7_ex1_est;
run ;
The final step requires proc mianalyze which I have:
proc mianalyze parms(classvar=classval)=c7_ex1_est edf=56;
class racecat gender selfrhealth;
modeleffects intercept gender racecat selfrhealth bodywgt;
run;
This was not obvious when you originally stated your problem.
However, if you have PROC MI, you should have PROC SURVEYLOGISTIC, they are both part of SAS/STAT.
What happens when you try to use PROC SURVEYLOGISTIC?
Well, there really is no replacement for PROC SURVEYLOGISITIC, unless you want to do a large amount of programming.
Can't I just use this solution?
https://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html
I know that proc surveylogistic does many things but I think in my context, all I need really is to have some way to store the parameter estimates so that they can be read in the final step of multiple imputation (by proc mianalyze, which I have)
ODS OUTPUT can collect the results from PROC SURVEYLOGISTIC, which means you have to run PROC SURVEYLOGISTIC, but you have told me you can't.
Would you be able to tell me if it is totally unnecessary to use proc surveylogistic (for missing values) unless you are using survey data?
At this point, I would like you to describe the problem and the analysis in detail. I feel I have been guessing at a lot of things.
@edasdfasdfasdfa wrote:
Hi Paige,
I am following the procedures in a book called 'Multiple Imputation of missing data using SAS'. The first requires use of proc mi (which I have access to). Here is an example:
proc mi nimpute=3 data=c7_ex1 seed=55 out=c7_ex1_imp;
class racecat gender edcat selfrhealth diabetes arthritis stratum_secu;
fcs plots=trace(mean(bodywgt)) nbiter=20 logistic (edcat diabetes arthritis)
discrim(racecat=gender edcat selfrhealth diabetes arthritis
/classeffect=include) regression (bodywgt);
var stratum_secu kwgtr kage gender racecat edcat diabetes arthritis bodywgt
selfrhealth;
run;
The second step however requires use of proc surveylogistic which I don't have access to. To do this aspect:
Procs MI and Surveylogistic are both part of SAS/STAT. If one is installed the other should be as well. Why do you not have access to Surveylogistic?
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.