[R] ctree - party package multivariate response variables

Henric (Nilsson) Winell nilsson.henric at gmail.com
Wed Mar 10 02:40:54 CET 2010


On 2010-03-09 04:40, valeriano.parravicini at unige.it wrote:
> Hi,
> 
> I have a problem with ctree of party package.
> I have data on distribution of more than one species (about 50 species) and I
> would like identify the relation of this multivariate object (species
> distribution) with a number of explanatory variables.
> 
> rs is the name of my dataframe containing the species (columns from 2 to 51) and
> the explanatory variables (columns 52 and 53). Rows are my sampling sites.
> 
> I wrote:
> 
> species<-rs[,2:51]
> v1<-rs[,52]
> v2<-rs[53]
> tree<-ctree(species~v1+v2)
> 
> It does not work , but when I use the same formula for the univariate case (i.e.
> a single column - e.g. the total number of species in each samplig sites) it
> works. I know that ctree can handle multivariate response variables, but I
> cannot figure out how to do that.

The response variables needs to be explicitly specified, e.g. ctree(y1 + 
y2 ~ x1 + x2) gives you a bivariate response.


HTH,
Henric


> 
> Someone can help me?
> 
> Thank you
> 
> 
> 
> Valeriano
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list