plot.qrmix {qrmix} | R Documentation |
Plot Method for a qrmix Object
Description
Three types of plots (chosen with type
) are currently available: density of the response variable by cluster, plots of the response variable against each covariate included in the model (scatterplots with the k fitted lines for continues variables and boxplots by cluster for the categorical variables), and boxplots of the residuals by cluster.
Usage
## S3 method for class 'qrmix'
plot(x, data = NULL, type = c(1,2,3), lwd = 2, bw = "SJ", adjust = 2, ...)
Arguments
x |
a fitted object of class |
data |
the data used to fit the model |
type |
a numeric vector with values chosen from 1:3 to specify a subset of types of plots required. |
lwd |
the line width for the first type of plot (density plot), a positive number. If a negative number is given, |
bw |
the smoothing bandwidth to be used to obtain the density for the first type of plot. See |
adjust |
the bandwidth used is adjust*bw. See |
... |
other argumets passed to other methods. |
Examples
data(blood.pressure)
#qrmix model using default function values:
mod1 = qrmix(bmi ~ ., data = blood.pressure, k = 3)
plot(mod1)
plot(mod1, type = c(1,3), lwd = 1)