Programming the statistical procedures from SAS

What test to use to compare non-parametric continuous variable in complex survey data with weights?

Reply
Occasional Contributor
Posts: 6

What test to use to compare non-parametric continuous variable in complex survey data with weights?

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!

Grand Advisor
Posts: 9,447

Re: What test to use to compare non-parametric continuous variable in complex survey data with weights?

"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.

Occasional Contributor
Posts: 6

Re: What test to use to compare non-parametric continuous variable in complex survey data with weights?

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?

Grand Advisor
Posts: 10,043

Re: What test to use to compare non-parametric continuous variable in complex survey data with weights?

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?

Respected Advisor
Posts: 2,655

Re: What test to use to compare non-parametric continuous variable in complex survey data with weights?

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

Occasional Contributor
Posts: 6

Re: What test to use to compare non-parametric continuous variable in complex survey data with weights?

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.

Ask a Question
Discussion stats
  • 5 replies
  • 455 views
  • 3 likes
  • 4 in conversation