View source: R/residuals.rpart.R

residuals.rpart | R Documentation |

Method for `residuals`

for an `rpart`

object.

```
## S3 method for class 'rpart'
residuals(object, type = c("usual", "pearson", "deviance"), ...)
```

`object` |
fitted model object of class |

`type` |
Indicates the type of residual desired. For regression or For classification trees the For |

`...` |
further arguments passed to or from other methods. |

Vector of residuals of type `type`

from a fitted `rpart`

object.

McCullagh P. and Nelder, J. A. (1989)
*Generalized Linear Models*.
London: Chapman and Hall.

```
fit <- rpart(skips ~ Opening + Solder + Mask + PadType + Panel,
data = solder.balance, method = "anova")
summary(residuals(fit))
plot(predict(fit),residuals(fit))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.