Help using Base SAS procedures

Default parameterization in PROC SURVEYREG?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 82
Accepted Solution

Default parameterization in PROC SURVEYREG?

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?


Accepted Solutions
Solution
‎03-15-2012 01:22 PM
Respected Advisor
Posts: 4,920

Default parameterization in PROC SURVEYREG?

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


All Replies
Solution
‎03-15-2012 01:22 PM
Respected Advisor
Posts: 4,920

Default parameterization in PROC SURVEYREG?

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
Frequent Contributor
Posts: 82

Default parameterization in PROC SURVEYREG?

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. 

Frequent Contributor
Posts: 82

Default parameterization in PROC SURVEYREG?

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?

Respected Advisor
Posts: 4,920

Default parameterization in PROC SURVEYREG?

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
Frequent Contributor
Posts: 82

Default parameterization in PROC SURVEYREG?

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.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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