I am having a problem, for some reason, I am no longer getting the estimated regression coefficients when I run the following code:
proc surveyreg data=RECODE6;
strata STRATUMCR4;
class anuinc urban MRAC MARRIED SEX EDUC2 Agec;
model Safety_Scale = anuinc urban MRAC MARRIED SEX EDUC2 Agec ACTIV DPRSN TV_HRS3/
anova adjrsq clparm deff inverse xpx;
weight WTANAL;
run;
I was able to run this and get the coefficients just fine, now for some reason I'm not.
It stops after reporting the Tests of Model Effects and the denominator degrees of freedom.
Help?
What does the log show? Please post the full log.
No problem, here's the log:
916 proc surveyreg data=RECODE6;
917 strata STRATUMCR4;
918 class anuinc urban MRAC MARRIED SEX EDUC2 Agec;
919 model Safety_Scale = anuinc urban MRAC MARRIED SEX EDUC2 Agec
919! ACTIV DPRSN TV_HRS3/
920 anova adjrsq clparm deff inverse xpx;
921 weight WTANAL;
922 *output out = library.test predicted = fitted residual=resids;
923 run;
NOTE: In data set RECODE6, total 2232 observations read, 782
observations with missing values or non-positive weights are
omitted.
NOTE: PROCEDURE SURVEYREG used (Total process time):
real time 0.13 seconds
cpu time 0.07 seconds
Well, good to know my code isn't wrong.
but for some reason it's still not working.
Running one of the demonstration works.
proc surveymeans works, as does proc surveyfreq
Trying proc surveyreg with a different response variable isn't yielding coefficients either.
Got it,
I had to add the SOLUTION option to the Model statement.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.