# Comparing means with a categorical dependent var & a continuous independent var

• Nov 28th 2012, 11:14 AM
lowhite
Comparing means with a categorical dependent var & a continuous independent var
Hi,

I want to compare the mean length of the growing season for populations that are increasing, decreasing and are stable. I simply want to determine whether the populations have the same mean length in growing season (1985-2006) or are they different. I know you would normally use ANOVA when you have a continuous dependent variable and a categorical variable.

Thanks!
• Nov 28th 2012, 02:32 PM
Scopur
Re: Comparing means with a categorical dependent var & a continuous independent var
Your hypothesis, $H_0: \mu_1 = \mu_2 =\mu_3$ can be tested with a simple ANOVA. Just check the F value.
• Nov 29th 2012, 04:18 AM
lowhite
Re: Comparing means with a categorical dependent var & a continuous independent var
But because my dependent variable (population status) is categorical, and my independent variable (length of growing season) is continuous I violate one of the assumptions of ANOVA (dependent = continuous & independent = categorical). How do I get around violating the assumption of ANOVA?
• Nov 29th 2012, 11:28 AM
Scopur
Re: Comparing means with a categorical dependent var & a continuous independent var
Three categorical variable possibilities: Increasing, decreasing, Stable. This is your dependent. Lets call it status.
Length of growing season: Some number of days im presuming in that year im presuming ? Season
On SAS
PROC GLM Data=??;
Class status;
Season=status;
run;
I think you are backwards or something that is not an assumption of ANOVA.
• Nov 29th 2012, 11:42 AM
lowhite
Re: Comparing means with a categorical dependent var & a continuous independent var
Yes, the three categorical possibilities: Increasing, Decreasing, Stable
Dependent variable: Length of Growing Season (one julian day value for each year from 1895-2006)
So there are 22 measures of the length of the growing season (one for each year) for each of the three categories increasing, decreasing and stable.
Question: Is the mean length of growing season the same for increasing, decreasing and stable populations?
• Nov 29th 2012, 11:47 AM
Scopur
Re: Comparing means with a categorical dependent var & a continuous independent var
OHHH im sorry i thought that each year was either classified as a year of increasing deacreasing or stable. Not that each year contained all three of the growing seasons. Let me think for a minute...

So i think you want to use a generalized linear model, probably a poisson with a log link function.
• Nov 29th 2012, 11:48 AM
lowhite
Re: Comparing means with a categorical dependent var & a continuous independent var
One of the assumptions of ANOVA is that your dependent variable is continuous and independent variable is categorical correct?
• Nov 29th 2012, 12:07 PM
Scopur
Re: Comparing means with a categorical dependent var & a continuous independent var
No No you are right. For some reason i was getting independent and dependent variable backwards in my head. Any ways i think you have to use a GLM, multinomial or poisson regression model.
• Nov 29th 2012, 12:11 PM
lowhite
Re: Comparing means with a categorical dependent var & a continuous independent var
Any suggestions would be greatly appreciated! Need to get this solved fast!!