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

Hello,

 

I am using the class statement in proc surveyreg in order to construct industry dummy variables. However, sometimes some industries don't contain any observations or too few. Then I cannot use the lsmeans statement for instance. Is it possible to automatically exclude one group within the class statement when the group is empty? 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

You must exclude industries before running proc surveyreg. You can do that by 1) creating an intermediate dataset, 2) by creating an intermediate data view, or 3) by adding a WHERE clause, either as a dataset option or as a WHERE statement, when calling proc surveyreg.

PG

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

You must exclude industries before running proc surveyreg. You can do that by 1) creating an intermediate dataset, 2) by creating an intermediate data view, or 3) by adding a WHERE clause, either as a dataset option or as a WHERE statement, when calling proc surveyreg.

PG
nuitamment
Calcite | Level 5
I was hoping that there would be a more elegant solution. But thank you.
SteveDenham
Jade | Level 19

Because of the weighting, it becomes difficult to implement what Milliken and Johnson refer to as a "means model" in PROC SURVEYREG.  However, you could give it a try--fitting what is essentially a saturated one-way model--and then use LSMESTIMATE statements to construct tests and comparisons of interest.

 

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1546 views
  • 0 likes
  • 3 in conversation