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

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?

1 ACCEPTED SOLUTION

Accepted Solutions
DanielQuay
Quartz | Level 8

Got it,

 

I had to add the SOLUTION option to the Model statement.

View solution in original post

7 REPLIES 7
Reeza
Super User

What does the log show? Please post the full log. 

DanielQuay
Quartz | Level 8

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

 

Reeza
Super User
Is the number of obs missing correct? And try restarting SAS, there's nothing wrong with your code, so its likely an issue with the output. Another option is to 'reset' the output.

ods listing close;
ods listing;


ods html close;
ods html;
DanielQuay
Quartz | Level 8

Well, good to know my code isn't wrong.

 

but for some reason it's still not working. 

Reeza
Super User
1. Run an example from the documentation. Does that work?

2. Remove options from MODEL statement, does that run?

3. Does any proc generate output? eg. proc means?
DanielQuay
Quartz | Level 8

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.

DanielQuay
Quartz | Level 8

Got it,

 

I had to add the SOLUTION option to the Model statement.

SAS Innovate 2025: Register Now

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!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2503 views
  • 4 likes
  • 2 in conversation