# Help with linear regression model?

#### jenniferrabbit

##### New Member
I need to construct a linear regression model for the following information but i'm not entirely sure how to do it!
S H L D Y
0 0 0 0 7.06
0 0 1 0 4.42
0 1 0 0 8.83
0 1 1 0 7.81
0 0 0 0 7.73
0 0 1 0 6.69
1 0 0 1 11.74
1 0 1 1 9.91
1 1 0 1 12.63
1 1 1 1 12.85
1 0 0 1 9.57
1 0 1 1 11.88

Sorry if it's hard to read! But basically, it's to do with the growth of tomatoes.
S mean south facing (all the plots are in a greenhouse and north/south facing changes the yield)
H means heat (type of heating, 0 = standard, 1 = supplementary)
L means light (type of lighting, 0 = standard, 1 = supplementary)
D means doger (different varieties - 'doger' is 1, and 'coward' is 0)
Y is yield, meaning the yield of the tomatoes, which is what we're really interested in! We want to find out the linear regression model relating to the yield of the tomatoes!

Just very confused as there are so many indicator variable! Sorry if i've not been very clear but would really appreciate the help! Thank you

Last edited:

#### ShmelkDog

##### New Member
S H L and D are your independent variables(which you have Dummy coded and looks fine) and Y is your dependent variable.
Have you tried running a regular least squared regression that way?

#### jenniferrabbit

##### New Member
S H L and D are your independent variables(which you have Dummy coded and looks fine) and Y is your dependent variable.
Have you tried running a regular least squared regression that way?
Just wondering what the equation would be! Would it be Y = Bo + B1x1 + B2x2 + B3x3 + B4x4 where Bo is the intercept, B1,B2,B3,B4 are the regression coefficients and x1= north/south, x2 = lighting, x3 = heating, x4 = doger/coward?