Learn R Programming

skewlmm (version 1.1.3)

plot: Plot a smn.lmm or smsn.lmm object

Description

Fitted values versus residuals plot.

Usage

# S3 method for SMN
plot(x, type = "response", level = "conditional",
     useweight = TRUE, alpha = 0.3, ...)

# S3 method for SMSN plot(x, type = "response", level = "conditional", useweight = TRUE, alpha = 0.3, ...)

Value

A ggplot object.

Arguments

x

An object inheriting from class SMN or SMSN, representing a fitted scale mixture of (skew) normal linear mixed model.

type

Type of residual that should be used. For details see residuals.SMN. Default is "response", indicating raw residuals.

level

Level of residual that should be used. For details see residuals.SMN. Default is "conditional".

useweight

A logical value indicating if the estimated weights should be used as color in the plot.

alpha

Transparency parameter to be used (0<alpha<1). Meaningless if useweight = TRUE.

...

Additional arguments.

Author

Fernanda L. Schumacher, Larissa A. Matos and Victor H. Lachos

See Also

ggplot, smn.lmm, smsn.lmm, fitted.SMN, fitted.SMSN, residuals.SMN, residuals.SMSN

Examples

Run this code
fm1 = smn.lmm(distance ~ age+Sex, data=nlme::Orthodont,
              groupVar="Subject", distr="t")
plot(fm1)
plot(fm1, useweight=FALSE)

library(ggplot2)
plot(fm1) + ggtitle("t-LMM for orthodont data")

Run the code above in your browser using DataLab