BookmarkSubscribeRSS Feed
San123
Calcite | Level 5

I am not sure what test to use to compare continuous variable which is not nominal. ttest doesnt work as it only works on nominal data. I know npar1way wilcoxon works , but how to incorporate

strata, cluster and weight of the data-sample? I am talking about complex data like NIS (national inpatient sample) or NHANES. I will really appreciate the help!

5 REPLIES 5
Ksharp
Super User

"but how to incorporate strata, cluster and weight of the data-sample?"

You are talking about ANOVA analysis ,  two levels for ttest or wilcoxon , multi-levels for ANOVA , otherwise you are going to make multi-compare error.

San123
Calcite | Level 5

HI Xia,

let me clearify further.

i am creating 2 samples. And I am trying to compare the difference in mean age between these 2

samples. i found out that distribution of age is not nominla( as per the histogram from UNIVARIATE).

So ttest doesnt work. I think Npar1way Wilcoxon will work. But I am not sure how to use it since the data is a complex survey data with strata, cluster and weights. So should we incorporate them as other commands like Surveyfreq, surveylogistic or surveyreg (but it npar1way doesnt allow that though) or just do ignoring the complxities of the data?

ballardw
Super User

Are interested in testing the hypothesis that the mean of your data is different from a reference value or are you worried about your distribution being different?

Any is your data a complex sample or just the NHANES or NIS?

SteveDenham
Jade | Level 19

To use a nonparametric approach to a well-behaved endpoint such as age is like trying to bicycle around the planet.  It can be done, but there are much better ways to travel.  I would urge you to look at SURVEYREG, if you wish to compare more than two groups, or SURVEYMEANS for two-group or complex sampling designs.

Steve Denham

San123
Calcite | Level 5

STeve: you are right. I did talk with my statistician in my institution.

She also suggested using Surveyreg.

Its very hard to use non-parametric tests in complex survey data.

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