I'm getting duplicate records in my output dataset when I use the predicted= and residual= keywords (in the output statement)? Anybody else encounter this? (just wondering if I'm missing anything)
proc surveyreg data=name NOMCAR;
model var = vars / VADJUST=NONE solution deff;
output out=name predicted=Predicted residual=Residual;
Unfortunately the SAS log does not include the number of obs read from the input file, which has 19,759 cases (exactly half of what is in the output file).
NOTE: Writing HTML Body file: sashtml.htm
NOTE: All observations were omitted due to missing values or non-positive weights in domain
NOTE: The data set MISSING.RESID2_1999_2002 has 39518 observations and 186 variables.
NOTE: PROCEDURE SURVEYREG used (Total process time):
real time 11.45 seconds
cpu time 1.93 seconds
Hi, I noticed the same issue, and I would love to know what's going on. When I use an out= statement with a domain statement in surveyreg, the output dataset has a full set of output rows for EACH level of the domain variable. So three levels of the domain statement will write out a dataset with three times the observations as the original dataset. The DOMAIN variable tells you what level each observation was generated for, but they don't seem to correspond to the original domain variable. In other words, no matter what the original observation's value of the domain variable, you'll still get three output records for that observation. Can anybody explain what SAS is doing?
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.