Learn R Programming

qrmix (version 0.9.0)

summary.qrmix: Summarizing qrmix Fits

Description

summary method for class "qrmix"

Usage

# S3 method for qrmix
summary(object, fitMethod=NULL, data=NULL, ...)

Arguments

object
an object of class "qrmix".

fitMethod
an optional refitting method if the user wants a method different than the one used to obtain "object" Use "lm" for OLS, "rlm" for robust regression, and "rq" to use fit from quantile regression.

data
data used to fit object if it is not contained in object.

...
other argumets passed to other methods.

Value

residuals
the residuals, response minus fitted values.
clusters
cluster assignment for each observation.
call
the matched call.
fitMethod
the fitting method used to obtain residuals and clusters.
quantiles
the set of k quantiles that minimize the mean loss.
clusters#
generic summary from function fitMethod for data in cluster #.

Examples

Run this code

data(blood.pressure)

#qrmix model using default function values:
mod1 = qrmix(bmi ~ ., data = blood.pressure, k = 3)

#summary using fitMethod = "rlm" instead of the one used when fitting the model mod1
summary1 = summary(mod1, fitMethod = "rlm")

#Are the quantiles selected in this case the same as in the original model?
summary1$quantiles
mod1$quantiles



Run the code above in your browser using DataLab