# Is there an ANOVA table generalization for two nested CART models?

The last line is an example of what I'm looking for:

data(airquality)
attach(airquality)

lm1 <- lm(Ozone ~ Solar.R+Wind)
lm2 <- lm(Ozone ~ Solar.R+Wind+Temp)
anova(lm1 , lm2)

require(rpart)
rp1 <- rpart(Ozone ~ Solar.R+Wind)
rp2 <- rpart(Ozone ~ Solar.R+Wind+Temp)
anova(rp1 , rp2) # this doesn't exist - is there something like it? some sort of anova.rpart function?


Thanks!

-
 What do you need the table for? Are your trying to compare the 2 models? Are you trying to combine the 2 models? – Zach May 25 '11 at 20:04 Hi Zach - In short - I would like to compare and get a P value – Tal Galili May 25 '11 at 20:24