qrmix {qrmix} | R Documentation |
Quantile Regression Classification
Description
qrmix
estimates the components of a finite mixture model by using quantile regression to select a group of quantiles that satisfy an optimality criteria chosen by the user.
Usage
qrmix(formula, data, k, Ntau=50, alpha=0.03, lossFn="Squared", fitMethod="lm",
xy=TRUE, ...)
Arguments
formula |
an object of class |
data |
an optional data frame that contains the variables in |
k |
number of clusters. |
Ntau |
an optional value that indicates the number of quantiles that will be considered for quantile regression comparison. |
alpha |
an optional value that will determine the minimum separation between the k quantiles that represent each of the k clusters. |
lossFn |
the loss function to be used to select the best combination of k quantiles. The available functions are |
fitMethod |
the method to be used for the final fitting. Use |
xy |
logical. If |
... |
additional arguments to be passed to the function determined in |
Details
The optimality criteria is determined by the lossFn
parameter. If, for example, the default value is used (lossFn = "Squared"
), the k
quantiles selected will minimize the sum of squared residuals. Use "Bisquare"
or "Huber"
to make the method less sensitive to outliers.
Value
qrmix
returns an object of class "qrmix"
coefficients |
a matrix with k columns that represent the coefficients for each cluster. |
clusters |
cluster assignment for each observation. |
quantiles |
the set of k quantiles that minimize the mean loss. |
residuals |
the residuals, response minus fitted values. |
fitted.values |
the fitted values. |
call |
the matched call. |
xy |
the data used if xy is set to |
References
Emir, B., Willke, R. J., Yu, C. R., Zou, K. H., Resa, M. A., and Cabrera, J. (2017), "A Comparison and Integration of Quantile Regression and Finite Mixture Modeling" (submitted).
Examples
data(blood.pressure)
#qrmix model using default function values:
mod1 = qrmix(bmi ~ ., data = blood.pressure, k = 3)
summary(mod1)
#qrmix model using Bisquare loss function and refitted with robust regression:
mod2 = qrmix(bmi ~ age + systolic + diastolic + gender, data = blood.pressure, k = 3,
Ntau = 25, alpha = 0.1, lossFn = "Bisquare", fitMethod = "rlm")
summary(mod2)