[prev in list] [next in list] [prev in thread] [next in thread]
List: r-sig-geo
Subject: [R-sig-Geo] AsciiGridPredict() returns error message
From: Frauke Barthold <fkbarthold46 () hotmail ! com>
Date: 2009-02-25 15:01:49
Message-ID: BLU126-W346733091908629756EBD3CAAC0 () phx ! gbl
[Download RAW message or body]
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]]
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic