turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- Testing for Mean Differences in Seasons

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

11-21-2017 03:39 PM

I have some data that is organized into seasons. I would like to test for significant differences between the seasons (spring summer fall winter). I can generate the means fine:

```
ods graphics on;
proc sort data=tafsas.nav_data_all_ts;
by season_name;
proc means data=tafsas.nav_data_all_ts noprint;
var ovr_ecu;
by season_name;
where date>='01Jan2010'd;
output out=meanstest mean=;
run;
ods graphics off;
```

So I am not sure how to proceed from here. Any advice is appreciated.

Thx.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BCNAV

11-21-2017 05:07 PM

Mean what?

Mean precipitation by season? Mean number of births? Mean number of earthquakes?

Just a little bit more help on what data you might have, what they might represent, and what you might want to do would be helpful.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BCNAV

11-21-2017 05:57 PM

You decide on the statistical test first, you don't calculate summary statistics either, the PROCS will handle that.

Look at PROC ANOVA and GLM for starters.

But...this data is circular/seasonal so make sure to correct for that first, I've recently seen some interesting radar charts and the concept of standardizing with sin/cosine functions. Radar charts are great for visualizing the data because it accounts for the fact that Summer is between Spring and Fall, whereas that's harder to view in other graphic types.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BCNAV

11-21-2017 06:41 PM

You will most likely want to remove the year effect before looking at the season effect. Simple example where the year effect is considered random :

```
data test;
set sashelp.air;
season = qtr(date);
year = year(date);
run;
/* year as a random effect */
proc glimmix data=test plots=none;
class season year;
model air = season;
random year;
lsmeans season / pdiff;
run;
```

PG

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PGStats

11-21-2017 07:43 PM

Thank you for all repsonding. This is airline costing data used at an air navigation service provider. It is monthly based. The data is monthly in frequency and is able to be grouped into seasons (spring, summer, fall, winter) based on month. I'd just like to see in 5-10 year chuncks (the chuncking can be done later) if the means of each season are significantly different from one another.

It seems like the suggestion to use proc glimmix is a good one. I had simply broken up the sample into groups and used t-tests, but it does not seem as elegant as proc glimmix above. Is glimmix the preferred method for this inquiry?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to BCNAV

11-22-2017 12:10 AM

Check out the assumptions behind **mixed linear models** and decide if they are appropriate for your data.

Note, **proc glimmix** might a bit overkill here, you could just as well use **proc mixed** if all random effects can be assumed to be normally distributed.

PG