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

If I'm using a CLASS statement within PROC SURVEYREG, is the default paramterization reference coding?  Is there any way to change this, as you can with PROC LOGISTIC?

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

As far as I can tell from the doc, proc surveyreg uses the same parameterization as proc glm. To view the model variables, you could use the model / e option of proc glm or (I guess) use proc glmmod.

SAS seems to suggest that you don't need to know the exact level ordering with their "non-positional" coefficients ordering, but it seems quite complicated:

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_introcom_a00...

PG

PG

View solution in original post

5 REPLIES 5
PGStats
Opal | Level 21

As far as I can tell from the doc, proc surveyreg uses the same parameterization as proc glm. To view the model variables, you could use the model / e option of proc glm or (I guess) use proc glmmod.

SAS seems to suggest that you don't need to know the exact level ordering with their "non-positional" coefficients ordering, but it seems quite complicated:

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_introcom_a00...

PG

PG
chuakp
Obsidian | Level 7

Thanks.  I actually found the non-positional syntax ordering infinitely more intuitive than the positional syntax, and I was able to set up an ESTIMATE statement using this syntax. 

chuakp
Obsidian | Level 7

The strangest thing in the world just happened...my ESTIMATE statement with SURVEYREG was working perfectly.  I closed SAS and came back, ran it again, and now the ESTIMATE statement is giving me 'non-estimable.'  I'm also now getting a NOTE in the log that says:

NOTE: The structure of the Estimates table has changed from an earlier release of SAS.

I'm running SAS 9.2.  It's really weird that SURVEYREG was able to run this and is now unable to!  My code hasn't changed.  Any ideas?

PGStats
Opal | Level 21

There as so many things that could have gone wrong... Check, if you can, that the observation count is the same as before. You can also use the /E option in the ESTIMATE statement to get the coefficients.

PG
chuakp
Obsidian | Level 7

Nope, that's the same.  It's the weirdest thing.  Anyways, perhaps I could ask how I might go about writing the ESTIMATE statement...I have a linear model with 10 beta's and I'm trying to do an ESTIMATE statement to test the hypothesis that beta7+beta8+beta9 = 0. 

HAVEUSCiy = intercept + B1*YEAR2y + B2*LOSSOFINSURANCEi + B3*DROPOUTOFSCHOOLi + B4*MOVEi + B5*DROPOUTOFSCHOOLI*MOVEi +
B6* LOSSOFINSURANCEi *YEAR2 + B7*DROPOUTOFSCHOOLi* YEAR2y + B8*MOVEi*YEAR2y + B9*DROPOUTOFSCHOOLi * MOVEi * YEAR2y  + Covariates

Without getting too much into the model details, the important things to know are that DROPOUTOFSCHOOL is continuous, YEAR2y is dichotomous (0/1), and MOVEi is dichotomous (0/1).  This was the code (using non-positional syntax) that was working, but now is not.  How would I go about writing this hypothesis statement in an ESTIMATE statement using positional syntax?

proc surveyreg data = datafile;

weight longwt;

strata varstr;

cluster varpsu;

class move year2 sex race regiony1 msay1 panel;

model haveusc = dropoutofschool lossofinsurance move year2 dropoutofschool * move

lossofinsurance * year2 dropoutofschool * year2 move * year2 dropoutofschool * move * year2

agebeginning_years sex race regiony1 msay1 panel /solution;

estimate 'Beta7+Beta8+Beta9' dropoutofschool*year2 [1, 1 1] move*year2 [1,1 1] dropoutofschool*move*year2 [1, 1 1 1 1] /e;

run;

Thanks.

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 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 896 views
  • 0 likes
  • 2 in conversation