mid.breakdown {midr} | R Documentation |
Calculate MID Breakdown
Description
mid.breakdown()
calculates the MID breakdown of a prediction of the MID model.
Usage
mid.breakdown(
object,
data = NULL,
sort = TRUE,
digits = 6L,
format = c("%s", "%s, %s")
)
## S3 method for class 'mid.breakdown'
print(x, digits = max(3L, getOption("digits") - 2L), ...)
Arguments
object |
a "mid" object. |
data |
a data.frame containing a single observation to be used to calculate the MID breakdown. If |
sort |
logical. If |
digits |
an integer specifying the minimum number of significant digits. |
format |
a character vector of length two to be used as the formats of the |
x |
a "mid.importance" object to be printed. |
... |
additional parameters to be passed to |
Details
mid.breakdown()
returns an object of class "mid.breakdown".
Value
mid.breakdown()
returns an object of the class "mid.breakdown" containing the following components.
breakdown |
the data frame containing the breakdown of the prediction. |
data |
the data frame containing the values of predictor variables used for the prediction. |
intercept |
the intercept of the MID model. |
prediction |
the predicted value. |
Examples
data(airquality, package = "datasets")
mid <- interpret(Ozone ~ .^2, airquality, lambda = 1)
mbd <- mid.breakdown(mid, airquality[1L, ])
mbd