Desktop productivity for business analysts and programmers

Three Factor Experiment Program

Not applicable
Posts: 1

Three Factor Experiment Program

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




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?

Respected Advisor
Posts: 3,278

Re: Three Factor Experiment Program

Posted in reply to JohnLShannonhouse

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
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation