BookmarkSubscribeRSS Feed
finlsa01
Calcite | Level 5

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:

Screen Shot 2017-11-24 at 12.45.50 PM.png

--(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.

5 REPLIES 5
Reeza
Super User

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:

Screen Shot 2017-11-24 at 12.45.50 PM.png

--(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.


 

finlsa01
Calcite | Level 5

47 observations (11 of those are missing a value for the length variable like I mentioned)

 

this is the log:

 

Screen Shot 2017-11-24 at 1.09.44 PM.png

Reeza
Super User

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:

 

Screen Shot 2017-11-24 at 1.09.44 PM.png


 

finlsa01
Calcite | Level 5

That makes sense. Do you know what test I should be looking to run instead?

sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

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.

 

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!

What is ANOVA?

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.

Discussion stats
  • 5 replies
  • 1948 views
  • 3 likes
  • 3 in conversation