# What model of multiple regression do I use to see if two independent variables affect a dependent variable, I also need to use two dummy variables?

I need to explore the determinants of wheat yield using multiple regression. There are 120 observations. Do I need to use ANOVA? I am using R studio. My results need to include a consideration of more than one functional form, one or more interaction terms for a select set of variables, and the use of dummy variables.

Variable Descriptions:

yld wheat yield in kg/ha
R Growing season rainfall (mm)
N nitrogen fertilization rate (kg/ha)
PrevCereal 1 if precious crop was a cereal, 0 otherwise
RegionCode Location code (0/1)

-
It's all just multiple regression, but some people might refer to this kind of thing as ANCOVA I guess. ... Is this homework? – Glen_b Oct 13 '12 at 7:12
Thanks for your reply. I thought I would need to use a two way ANOVA? It's an assignment for university. – Sarah Oct 13 '12 at 7:46
The use of dummy variables doesn't change the method of analysis, really. ANOVA and ANCOVA and multiple regression are all the same model; in matrix algebra form $Y = XB + e$ – Peter Flom Oct 13 '12 at 12:35
You should first read up on what ANOVA/ANCOVA really is before going further. There's a number of documents that wheel-train you through regression using R, this one being only one of them: cran.r-project.org/doc/contrib/Faraway-PRA.pdf – Roman Luštrik Oct 26 '12 at 7:58

1. Enter your model with splines for the continuous variables (use the rcs() spline as it works best with the rms package) and any possible interactions.
2. Check the general model assumptions - if you have issues try bootstrapping with the bootcov() function
3. Check overall ANOVA with the anova() function in the rms package, it has very nice built-in tests for non-linearity that are very useful.