survey data - and ANOVA

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

survey data - and ANOVA

Dear members,

 

I am working with survey data and I would like to analyze some of the data using ANOVA - proc glm.  Can anyone assist me with the programing for proc glm but with survey data?  I need to include a "strata" and "cluster" statement.

 

I tried "proc surveymeans data=testing1 t mean;" but ofcourse I am not getting the group comparisons, etc.

 

thank you kindly in advance for your assisantce. I am new to SAS but I would like to become proficient.

 

Best,
Elena


Accepted Solutions
Solution
‎08-12-2016 09:30 PM
Super User
Posts: 11,343

Re: survey data - and ANOVA

Try Proc SURVEYREG. Have ANOVA as an option on the MODEL statement.

You should specify the Strata and Cluster variables on those statements along with the weight variable.

You may need to specify Domain(s) of interest as well to get subpopulation results

View solution in original post


All Replies
Solution
‎08-12-2016 09:30 PM
Super User
Posts: 11,343

Re: survey data - and ANOVA

Try Proc SURVEYREG. Have ANOVA as an option on the MODEL statement.

You should specify the Strata and Cluster variables on those statements along with the weight variable.

You may need to specify Domain(s) of interest as well to get subpopulation results

New Contributor
Posts: 3

Re: survey data - and ANOVA

Dear Ballardw,

 

thank you for taking the time to assist me with this issue.  I am farily new to SAS and I was not confident that I had the set up correctly but the following seemed to work:

 

proc surveyreg data=testing1;
class CVDFITLV;
where normal=1;
strata sdmvstra;
cluster sdmvpsu;
model tot_dur_mv=CVDFITLV RIDAGEYR RIDRETH1 RIAGENDR/ solution;
contrast 'low vs high' CVDFITLV -1 0 1 /E;
contrast 'low vs med' CVDFITLV -1 1 0 /E;
contrast 'med vs high' CVDFITLV 0 -1 1 /E;
weight WTMEC2YR;
run; quit;

 

Thank you once again!

 

Best,
Elena

New Contributor
Posts: 3

Re: survey data - and ANOVA

Dear Ballardw,

 

thank you for taking the time to assist me with this issue.  I am farily new to SAS and I was not confident that I had the set up correctly but the following seemed to work:

 

proc surveyreg data=testing1;
class CA ;
where normal=1;
strata sdmvstra;
cluster sdmvpsu;
model tot_dur_mv=CTHA age et gen/ solution;
contrast 'low vs high' CA -1 0 1 /E;
contrast 'low vs med' CA -1 1 0 /E;
contrast 'med vs high' CA 0 -1 1 /E;
weight WTMEC2YR;
run; quit;

 

Thank you once again!

 

Best,
Elena

☑ This topic is solved.

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

Discussion stats
  • 3 replies
  • 433 views
  • 0 likes
  • 2 in conversation