healy.plot | R Documentation |
It creates a Healy-type plot from a smn.lmm or smsn.lmm object, for goodness-of-fit assessment.
healy.plot(object, dataPlus = NULL, dotsize = 0.4, calcCI = FALSE,
levelCI, MCiter, seed, ...)
object |
An object inheriting from class |
dataPlus |
Optional. Expanded dataset that should be used instead the one used for fitting. This is necessary for unbalanced datasets, since Haley's plot requires all subject to have the same number of observations. |
dotsize |
Optional. Dotsize used in ggplot. |
calcCI |
|
levelCI |
An optional numeric value in |
MCiter |
An optional discrete value indicating the number of Monte Carlo samples that should be used to compute the confidence intervals. Default is |
seed |
An optional value used to specify seeds inside the function. Default is to use a random seed. |
... |
Additional arguments. |
It constructs a Healy-type plot (Healy, 1968) by plotting the nominal probability values 1/n,2/n,...,n/n
against the theoretical cumulative probabilities of the ordered observed Mahalanobis distances. If the fitted model is appropriate, the plot
should resemble a straight line through the origin with unit slope.
If calcCI=TRUE
, the plot presents two dashed blue lines containing approximated confidence intervals by considering that the fitted model is correct.
A ggplot object.
Fernanda L. Schumacher, Larissa A. Matos and Victor H. Lachos
Healy, M. J. R. (1968). Multivariate normal plotting. Journal of the Royal Statistical Society: Series C (Applied Statistics), 17(2), 157-161.
Schumacher, F. L., Lachos, V. H., and Matos, L. A. (2021). Scale mixture of skew-normal linear mixed models with within-subject serial dependence. Statistics in Medicine 40(7), 1790-1810.
ggplot
, smn.lmm
, smsn.lmm
,
mahalDist
, acfresid
fm1 = smn.lmm(distance ~ age+Sex, data=nlme::Orthodont, groupVar="Subject")
healy.plot(fm1)
## computing simulated bands
healy.plot(fm1, calcCI=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.