My data contains two binary predictors (encoded in R as factor
's) and a continous response. When I fit a simple linear model (no interactions) using lm
, the value of the intercept is smaller than the infimum of the set of values that the response takes in my dataset (which is equal to around 0.33 when the predictors are zero).
Call:
lm(formula = lm.a)
Coefficients:
(Intercept) df$x1 df$x2
0.1222 0.4276 0.7988
I am not sure how to interpret the coefficient for the intercept. I thought this was the predicted value when there x1 and x2 are set to zero.
EDIT: Thank you for your responses. After visualizing the data and fitted hyperplane from lm
(see image below) I found that the simple linear model without interactions is underfitting the dataset which is why the predictions are off. I found that adding an interaction term fits the points better but an interaction term doesn't make sense for my dataset. I'll have to think of a better model.
EDIT 2: After thinking about it a little, interactions make a lot of sense for my dataset. I'm just going to use something like y ~ x1 + x2 + x1*x2
.