I tried using rpart, as below, and got this error message "rpart Error in 
yval[, 1] : incorrect number of dimensions".  Thinking it might somehow be 
related to the large number of missing values, I tried using complete data, but 
with the same result. Does anyone know what may be going on, and how to fix it? 
I have traced two similar error messages in the Archive, but following the 
threads did not make it clear how to fix the problem.  

> currwh.rpart<-rpart(formula = CURRWHEE~EA17_6_1 + EA17_9_1 + X087 + X148 + 
> X260 + MOTHERSA + GESTATIO,method="class")

> 

> currwh.rpart

n=6783 (2283 observations deleted due to missing)

node), split, n, loss, yval, (yprob)

* denotes terminal node

1) root 6783 720 3 (0.1060002949 0.8938522778 0.0001474274) *

> 

> summary(currwh.rpart)

Call:

rpart(formula = CURRWHEE ~ EA17_6_1 + EA17_9_1 + X087 + X148 + 

X260 + MOTHERSA + GESTATIO, method = "class")

n=6783 (2283 observations deleted due to missing)

CP nsplit rel error

1 0 0 1

Error in yval[, 1] : incorrect number of dimensions

>


        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to