BookmarkSubscribeRSS Feed
dode
Fluorite | Level 6

Hello everyone,

 

How I use t-test in complex survey deign, I read I can do that through surveymeans, but I still don't know how, please help me with the code

Thanks

5 REPLIES 5
ballardw
Super User

Add T to the proc surveymeans statement to request a t-test.

The Ratio statement would be used to indicate which variables to test.

Ratio x y / z t ; where x y z and t are variables will request tests for x with z, x with t, y with z and y with t.

If a variable appears on both sides to the / then the test of a variable with itself is ignored.

dode
Fluorite | Level 6

Hello  ,

Thank you so much for replay, I provided you the code below, I added T, please can you see if i did the code correctly.

 

proc surveymeans data=transform;
var cognitive_impairment /T;
domain education;
cluster raehsamp;
strata raestrat;
weight r7wtresp;
run;

dode
Fluorite | Level 6

proc surveymeans data=transform; T;
var cognitive_impairment ;
domain education;

ratio cognitive_impairment/education;
cluster raehsamp;
strata raestrat;
weight r7wtresp;
run;

 

can you please check if the code is correct

thanks

dode
Fluorite | Level 6

also how I di ANOVA in survey complex design ?

and Wilcoxon?

SAS_Rob
SAS Employee

You can use Proc SURVEYREG to fit an ANOVA to complex survey data.

 

There are no procedures to fit non-parametric models, although I suppose you could apply SURVEYREG to the ranks.  You would have to do a little research to see how this would be different from the SRS-world but it might be a possibility.  I believe this book even discusses it although I don't recall where exactly in the book it is.

 

 

 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 5 replies
  • 5456 views
  • 0 likes
  • 3 in conversation