How to choose the method argument in rpart

r
rpart

#1

I am currently studying about rpart in R and while studying I came across a argument name method which can take four values
"anova",
“poisson”,
“class”
"exp"
I want to know how to decided which method to use .


#2

It depends on what you want to achieve, but for comparing the means of 4 groups I would recommend ANOVA.

Not sure if get your point correctly.

DataScience+
datascienceplus.com


#3

@hinduja1234-
y is a survival object, then method = “exp” is used.
y has 2 columns then method = “poisson” is used.
y is a factor then method = “class” is used.
for the remaining case “anova” is used.

Hope this helps!
Regards,
harry