BookmarkSubscribeRSS Feed
JohnLShannonhouse
Calcite | Level 5

I am used to using fairly simple statistical software, and I know what I want, but SAS is not giving the output I want. I want to know what commands to use to perform the analysis I want.

The Experiment:

Animals were treated from week 0 to week 10 and weighed each week. The independent variables are animal (32 animals), sex (Male or Female, classification variable), housing conditions (Socially Housed or Socially Separated, classification variable) and time (0-10 weeks, quantitative variable). The dependent variable is body weight gain.

I want a repeated measures analysis to determine if sex, housing and time have an effect, if there is an interaction of sex*housing, sex*time, housing*time and sex*housing*time. If possible, I want the slope of weight change with respect to time for each sex, each housing condition and each sex*housing condition and if those slopes are different than one another. Alternatively, I would like to know at what time the different Sexes and Housing conditions showed a statistically detectable difference at alpha = 0.05

How would I program SAS Enterprise Guide to give me this kind of output?

I tried a mixed models ANOVA analysis under "Tasks."

Under "Data" I put Animal, Sex and Housing as classification variables, Time as a quantitative variable and weight gain as the dependent variable.

Under "Fixed Effects Model" I selected Main effects for Time, Sex and Housing and Cross effects for Sex*Housing, Sex*Time, Housing*Time and Sex*Housing*Time.

Under "Repeated Effects" I put Animal under "Model Subjects/Subject Identifier"

(Columns are Effect, DF, Den DF, F Value, Pr > F, total of 352 observations

      

      

Week1316144.35<.0001
Sex12813.840.0009
Treatment12876.78<.0001
Sex*Treatment12848.43<.0001
Week*Sex131611.870.0006
Week*Treatment131648.88<.0001
Week*Sex*Treatment13161.810.1793

This is not the kind of output I am used to reading. I normally get degrees of freedom, sum of squares, mean sum of squares, F and p with a total DF and Sum of Squares line at the bottom. I don't even know how to read this. There were 11 time points, so why does "Week" only have 1 degree of freedom? Why do the interactions with "Week" have only 1 degree of freedom?

1 REPLY 1
PaigeMiller
Diamond | Level 26

One problem you have is that Week is considered a continuous variable, and so it has 1 degree of freedom for the estimate of the linear effect of week.

Since that's not what you want, you will have to declare Week to be a CLASS variable. As I don't use Enterprise Guide, you'll have to figure out how to do that yourself.

If you want slopes, you have to specifically ask for slopes; again I'm not sure how to get that in Enterprise Guide, but in regular SAS it is the SOLUTION option.

--
Paige Miller

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 695 views
  • 3 likes
  • 2 in conversation