Programming the statistical procedures from SAS

proc surveyreg - class statement

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

proc surveyreg - class statement

[ Edited ]

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? 


Accepted Solutions
Solution
‎07-12-2016 01:37 PM
Respected Advisor
Posts: 4,749

Re: proc surveyreg - class statement

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


All Replies
Solution
‎07-12-2016 01:37 PM
Respected Advisor
Posts: 4,749

Re: proc surveyreg - class statement

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
Occasional Contributor
Posts: 6

Re: proc surveyreg - class statement

I was hoping that there would be a more elegant solution. But thank you.
Respected Advisor
Posts: 2,655

Re: proc surveyreg - class statement

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

☑ This topic is solved.

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

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