Lab 9 – Part 1 – Multivariate Regression Trees (MRT) Multivariate ...

3 downloads 24 Views 276KB Size Report
the one having the smallest cross-validated relative error. R indicates the preferred pruning size on the graph but you
Lab 9 – Part 1 – Multivariate Regression Trees (MRT)

Multivariate regression trees is an extension of CART. It works exactly the same way, except that you have multiple response variables instead of one. As in CART, the response variables can be numeric or class variables, and the same applies for the predictor variables. There is a good reference in the download zip file on the course website if you want to read up on the details. For this exercise, download the )

1



Have a look at the output. 1. Each split in the MV tree is indicated by the relevant independent variable and its value at the point of splitting e.g., MAT greater or less than 5°C. 2. Each leaf on the tree has a barplot associated with it. Because the ,pca=TRUE)



You can also create an interactive PCA plot. Note, this only seems to work if you actually do the PCA described above and click through to create the plot. rpart.pca(fit, interact=TRUE)



Finally, you can create a summary of the values associated with the tree and its branches using summary(fit)

To test the tree species ) fit=mvpart(,pca=TRUE)

2

9.2 MRT using spider )



Do PCA on environmental variables fit