BookmarkSubscribeRSS Feed
BCNAV
Quartz | Level 8

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.

5 REPLIES 5
HB
Barite | Level 11 HB
Barite | Level 11

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.

Reeza
Super User

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. 

PGStats
Opal | Level 21

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
BCNAV
Quartz | Level 8

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?

PGStats
Opal | Level 21

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

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 461 views
  • 1 like
  • 4 in conversation