I want to manually set a coefficient for a variable that is not input in my linear model so that I can perform a spatial prediction.
I'm going to try to expose my question in the most simple and clear way. What I have:
- a raster stack with 4 binary variables for soil cover:
agro
,open
,tran
andurb
- a linear model
lm(formula = no2 ~ open + tran + urb, data = df)
The reason why I only used 3 of the variables in my linear ways to prevent multicollinearity in the model, because they are proportions of land coverage that add up to 100%.
So, my goal is to add a coefficient to my model for the agro
variable, so that all of the 4 variables are used correctly in raster::predict()