[R] "Where" command in ctree (party)

jdanielnd jdanielnd at gmail.com
Mon Feb 7 15:12:38 CET 2011


Hello,

I need to classify (i.e., export a vector with terminal node id's) new cases
using a ctree (party package) model based on different cases (learning
sample).

I tried the where command with the following syntax:

> where(tree, newdata=data2)

expecting to get terminal nodes of data2 cases based on rules of tree model
(data1 as learning sample). However it returned the following error message:

Error in checkData(oldData, RET) : 
  Classes of new data do not match original data

Party documentation states that I can use this command both for learning
sample (newdata=NULL) or new observations.

What am I doing wrong?

Best wishes

Joao Daniel
-- 
View this message in context: http://r.789695.n4.nabble.com/Where-command-in-ctree-party-tp3264187p3264187.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list