RE: [R] rpart and TREE, can be the same?

From: <WWei_at_mdanderson.org>
Date: Tue 20 Jul 2004 - 00:30:28 EST


Hi, Andy,

Thank you again for your help. Tree( ) does have an option split='gini' in my version, which I recently downloaded from CRAN. The question is the tree.control only controls over mindev, no option for gini. Or maybe there is a way to specify a 'cp' like parameter when using gini index in tree( )?

Thanks,
Auston

"Liaw, Andy" <andy_liaw@merck.com>

07/16/2004 02:04 PM  

To:
"'WWei@mdanderson.org'" <WWei@mdanderson.org> cc:

Subject:
RE: [R] rpart and TREE, can be the same?

Auston,  

tree() does not use Gini as splitting criterion, AFAIK. It uses deviance.  You can try to see if the various splitting criteria available in rpart is described in Terry's tech report (available on the Mayo Clinic web site).  

Andy
-----Original Message-----
From: WWei@mdanderson.org [mailto:WWei@mdanderson.org] Sent: Friday, July 16, 2004 2:15 PM
To: Liaw, Andy
Subject: RE: [R] rpart and TREE, can be the same?

Thank you, Andy. Well, I tried 'gini' for both of them and my data has no NAs, but they still don't match. BTW, what is exactly the splitting criterion 'information' used in rpart? Thanks.

Auston

"Liaw, Andy" <andy_liaw@merck.com>
Sent by: r-help-bounces@stat.math.ethz.ch 07/16/2004 01:01 PM  

To:
"'WWei@mdanderson.org'" <WWei@mdanderson.org>, r-help@stat.math.ethz.ch cc:

Subject:
RE: [R] rpart and TREE, can be the same?

I guess if you define the splitting criterion in rpart so that it matches the one used in tree(), that's possible. However, I believe the two also differ in how they handle NAs.

Andy

> From: WWei@mdanderson.org
>
> Hi, all,
>
> I am wondering if it is possible to set parameters of 'rpart'
> and 'tree'
> such that they will produce the exact same tree? Thanks.
>
> Auston Wei
> Statistical Analyst
> Department of Biostatistics and Applied Mathematics
> The University of Texas MD Anderson Cancer Center
> Tel: 713-563-4281
> Email: wwei@mdanderson.org
> [[alternative HTML version deleted]]



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

Notice: This e-mail message, together with any attachments, ...{{dropped}}

R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jul 20 00:49:10 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:04 EST