Regression with text variables

H

Heath

Is it possible to use excel 2003 with the Data Analysis Tools to run a
regression when the independent variables consist of text? I tried to replace
the text with numbers 1, 2, 3, ... but I don't think the results make sense.
 
H

Heath

I'm using Excel 2003 with the Data Analysis pack, which allows one to run a
linear regression on data. I think this is the same as the LINEST function.
My y-value inputs are numeric but the x-value inputs are text...an
(unrealistic) example...effect of RED HAIR (independent variable) on HEIGHT
(dependent variable). So when I enter the data, from this example, height is
numeric but hair color is text.

How do run a regression on this kind of data?

Thanks!
 
D

Dave F

Can't you assign a numerical code to the hair color; i.e., red hair = 1, blue
hair = 2, etc?

Dave
 
J

Jerry W. Lewis

Such a numerical assignment is probably meaningless. He appears to want to
do a categorical ANOVA, where hair color would have c-1 degrees of freedom (c
is the number of colors) instead of 1 degree of freedom that would be given
by numerically coding a regression model.

If each factor (hair color, etc) has only 2 levels, assign the levels +/-1,
then you can use the ATP regression tool or LINEST to do the analysis. Each
t-test for a regression coefficient would correspond to to the usual ANOVA F
test.

If any factor has more than 2 levels, then the OP would need to construct
the appropriate X matrix, which would require more understanding than he
seems to have.

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top