I have a follow up question to Statistical analyses for survey against raster?
I have a very similar problem as the initial poster David. I am creating a multivariate model from raster data in order to predict a response variable. In my case I am using soil and climatic data to predict crop yields.
I independently came to a very similar conclusion as the answer posted by Aaron, to use zonal stats, export to R, and create a Random Forest model. However, I am now stuck because I want to create a raster in ArcGIS of my predicted yields based on the input rasters but I can't figure out how to translate the output from R to Arc.
In R I used this code:
library(randomForest) fit <- randomForest(Yield ~ ., data=data) print(fit) # view results importance(fit) # importance of each predictor plot(predict(fit))
The output a plot that reasonably predicts yield.
What I want to do is take the Random Forest model and use rasters of my predictor variables (e.g. slope) from a new location, and predict the yields for the new location. I understand how this works with simple linear regression but I can't wrap my head around how to do this with Random Forests. What equation does RF use to make the prediction plot? How can I get that equation and its coefficients from R to make a new map in Arc?