I am using a random forest regression to model a count of species from a number of different survey areas. Each survey area has a different size.
My question is how to model the response variable, to account for these scaling effects? Should I scale the Count prior to fitting the model?
Count <- Count / Survey_area_km2 model < fit(Count ~ pred1 + pred2 + ...)
And then when predicting over a set of survey areas, adjust the response variable prediction by the size of the survey areas I am trying to predict. This will give a count that is in proportion to each survey area?
Count_predictions <- predict(model, prediction_areas) Rescaled_Counts <- Count_predictions * prediction_areas
gbm.fitthat allows specification for an offset - it doesn't seem feasible if just using
gbm. So when I use this the model fit is calculated on the log link scale? Therefore I should define it as
model <- gbm.fit(x=predictors, y=response, offset=log(Area))? $\endgroup$