


Dear List,

 

I am requesting help for the
application of AsciiGridPredict() in the yaImpute package. I am trying to
spatially predict my Y variable using a randomForest Model. It seems to be a
straightforward function but I am getting error messages that I do not understand.

 

My Y variable is of type factor with
9 levels and my X variables are of type continous and class (numeric and factors).
My training dataset which I used to fit the model, has 145 observations and 16
x variables. The 16 ascii grids that I am using for predictions all have 1010
columns and 884 rows (and the same names as the x variables in the model). When
I call:

 

AsciiGridPredict(st.rf.fit, xlist,
ylist, xtypes=NULL, rows=NULL, myPredFunc=NULL)

 

I get the following error message:

 

Rows per dot:  8  Rows
to do: 884 

ToDo:
..............................................................................................................

Done: Error in
model.frame.default(Terms, newdata, na.action = na.omit) : 

 
variable lengths differ (found for 'elev')

In addition: Warning message:

'newdata' had 3 rows but variable(s)
found have 145 rows

 

Which variable lengths is the
message referring to? What is my newdata? Can someone please help me understand
what I am doing wrong?

 

Thank you very much in advance,

Frauke
_________________________________________________________________


	[[alternative HTML version deleted]]

