Skip to content
Prev 28181 / 29559 Next

Coding and addition of explanatory variables

Dear List,

Please I am doing a biomass analysis with a satellite image. The
explanatory variables include the satellite bands and vegetation indices. I
am using Random forest regression. I have added bands of the satellite
image to the model and it worked. However, when I tried to add the
vegetation indices (bands) I get error messages. I have put the codes I am
using below;

Model <- randomForest(class~ B1 + B2 + B3 + B4 + B5 + B6 + B7 + B8 + B9 +
B10 + B11 + B12 + DVI1, data = Trainingset, proximity=TRUE,
                            importance=TRUE).
The "DVI1" is the vegetation index variable band I tried to add to the
model.

Below is the error message I received.

"Error in eval(predvars, data, env) : object 'DVI1' not found"

   I will be glad if I could get some assistance on how to resolve it.

Best regards,

Enoch