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 "qrmix".

data

the data used to fit the model object. It is only necessary when the when the parameter xy was set to FALSE when fitting the qrmix 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, lwd = 1 will be used instead. See par.

bw

the smoothing bandwidth to be used to obtain the density for the first type of plot. See density for details.

adjust

the bandwidth used is adjust*bw. See density for details.

...

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)


[Package qrmix version 0.9.0 Index]