Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- ANOVA for skewed data with complex survey design? (SURVEYREG? PROC GLM...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-16-2019 12:32 PM
(1336 views)

Hi SAS friends! Hoping for some advice (and new ideas) here...

I am trying to use ANOVA to evaluate the relationship between an independent categorical variable with multiple levels and a dependent continuous variable.

I used PROC GLM to conduct my test and also requested some nonparametric test options and tests for unequal variance (Levene's, Welch's ANOVA). The distribution of my dependent variable is heavily skewed.

Here's my original code:

```
ods graphics on;
proc glm data = mydata plots(maxpoints=none)=diagnostics;
class independent;
model dependent = independent;
means independent/hovtest welch;
run;
ods graphics off;
```

Then, I realized that since the survey design includes weighting and stratification variables that I needed to take those into account. PROC GLM allowed me to add the weighting variable but doesn't appear to have options for nonparametric tests. I switched to PROC SURVEYREG which allowed for the inclusion of both weighting and stratification variables but still no test options beyond the initial ANOVA.

Here's my amended code:

```
proc surveyreg data = mydata;
weight weightvar;
strata stratavar;
model dependent = independent / anova;
run;
```

Should I be using a different PROC? A totally different test? Is there an option that I'm missing in SURVEYREG? Help!

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

The data can be skewed, this isn't a problem for GLM or SURVEYREG. The actual condition required is that the residuals (the difference between predicted and actual values) are normally distributed. You can examine the residuals and see if they follow a normal distribution or not.

Assuming the residuals are normally distributed, I would think that SURVEYREG would handle the weighting properly.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks for the reply!! 🙂

I checked and unfortunately the residuals are also heavily skewed. I'm thinking that maybe I'm just not looking at this correctly and need to adjust which test I'm using/my research question?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Can you show us a screen capture of the residual plot?

If they are skewed, perhaps a transformation of the data would help (depending on the severity of the skewing) to achieve the normal distribution of the residuals.

--

Paige Miller

Paige Miller

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Obviously, the residuals are not normally distributed, and its not obvious to me that you can transform the data to make them normal. So, I would then consider non-parametric methods, although I'm not sure how the survey weights would apply.

--

Paige Miller

Paige Miller

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.