SAS Community,
I'm trying to run a proc glm to analysis a data set of the following (using SAS Studio 3.6):
Dependent variable: temperature (continuous variable)
Independent variables:
time (continuous variable)
treatment (categorical variable with 0-3)
length (continuous variable).
The following is the code I was using:
proc glm; class time treatment length;
model temperature= time length time*length treatment time*treatment length*treatment time*length*treatment;
means time length treatment/tukey;
run;
The results table for the glm does not display values for the treatment or any of the interaction variables:
--(I know that the final treatment in the interaction of time*treatment*length is spelled wrong, it's spelled correctly in the code. There are no other spelling issues in the coding)
One last issue:
I have some data points that don't have a length value but have all the other variables and I'm not sure how to leave that variable blank and still have SAS read the code correctly for the other data points.
Any help would be greatly appreciated,
Cheers.
How many observations do you have?
And can you include your log.
@finlsa01 wrote:
SAS Community,
I'm trying to run a proc glm to analysis a data set of the following (using SAS Studio 3.6):
Dependent variable: temperature (continuous variable)
Independent variables:
time (continuous variable)
treatment (categorical variable with 0-3)
length (continuous variable).
The following is the code I was using:
proc glm; class time treatment length;
model temperature= time length time*length treatment time*treatment length*treatment time*length*treatment;
means time length treatment/tukey;run;
The results table for the glm does not display values for the treatment or any of the interaction variables:
--(I know that the final treatment in the interaction of time*treatment*length is spelled wrong, it's spelled correctly in the code. There are no other spelling issues in the coding)
One last issue:
I have some data points that don't have a length value but have all the other variables and I'm not sure how to leave that variable blank and still have SAS read the code correctly for the other data points.
Any help would be greatly appreciated,
Cheers.
47 observations (11 of those are missing a value for the length variable like I mentioned)
this is the log:
Ok...please post it as text directly in the future. That's very, very hard to read.
I don't think you have enough data to run the model you want.
You need more observations. Treatment has 4 levels which is the equivalent of 3 variables and then you have 2 continuous variables before you even deal with the interactions. The general rule of thumb for regression is 25 obs per variable, I think this is based on the concept of the Central Limit Theorem where n=25 was considered enough to approximate normality. You have 36 observations, since SAS excludes the entire observations if any variable is missing.
@finlsa01 wrote:
47 observations (11 of those are missing a value for the length variable like I mentioned)
this is the log:
That makes sense. Do you know what test I should be looking to run instead?
In your original message you write that both TIME and LENGTH are continuous-scale variables. But by including TIME and LENGTH in the CLASS statement, you have told the MIXED procedure to incorporate these two variables as if they are categorical. Consequently, the model attempts to estimate 23 parameters for TIME and 21 parameters for LENGTH and then it quits because it's run out of degrees of freedom. As @Reeza notes, you have only 36 observations for analysis because those with missing LENGTH data will be deleted. I agree with her: you don't have nearly enough data for the model as you've specified it.
But you may not have correctly specified the model you intended to fit.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.