plot-methods | R Documentation |
Six plots (selectable by which
) are currently available: a plot of residuals against fitted values (which
=1),
a plot of standardized residuals against time (which
=2), a plot of the autocorrelation function of the residuals (which
=3),
a plot of the partial autocorrelation function of the residuals (which
=4), a plot for the fitted model (which
=5)
and a plot for the individual mean profile (which
=6). By default, the first five are provided.
## S4 method for signature 'bild,missing'
plot(x,which=c(1:5),ylab=NULL,main=NULL,
ask=prod(par("mfcol"))<length(which)&&dev.interactive(),
subSET,add.unadjusted=FALSE,ident=FALSE,
caption=c("Residuals vs Fitted", "Residuals vs Time",
"ACF residuals", "PACF residuals",
"Individual mean profiles"), cex.caption=1)
x |
an object of class |
which |
if a subset of the plots is required, specify a subset of the numbers 1:6. |
ylab |
label to some plots ( |
main |
title to some plots in addition to the caption ( |
ask |
logical expression; if TRUE, the user is asked before each plot. |
subSET |
logical expression indicating elements to keep in individual mean profile plots: missing values are taken as FALSE.
The |
add.unadjusted |
logical expression indicating whether or not to add the unadjusted fit for plot in |
ident |
logical expression indicating whether or not to add the number of the subject to individual mean profile plots.
The |
caption |
captions to appear above the plots. |
cex.caption |
controls the size of caption. |
The option which
=5 provides the parametric fitted model if the dependence structure is
"ind" (independence), "MC1" (first order Markov Chain) or "MC2" (second order Markov Chain).
When the dependence structure is
"indR" (independence with random intercept) or
"MC1R" (first order Markov Chain with random intercept) or
"MC2R" (second order Markov Chain with random intercept) the parametric adjusted fit is provided and
the user can set add.unadjusted
=TRUE to provide the unadjusted fitted.
The option which
=6 is used only if the random intercept is present and provides individual mean profile.
signature(x="ANY", y="ANY")
:Generic function.
signature(x="bild", y="missing")
:Plot diagnostics for bild
object.
## It takes a very long time to run
str(locust)
#### dependence="MC2R"
Integ <- bildIntegrate(li=-2.5,ls=2.5, lig=-2.5, lsg=2.5)
locust2r_feed1 <- bild(move~(time+I(time^2))*sex, data=locust,
subSET=feed=="1", aggregate=sex, dependence="MC2R",
integrate=Integ)
summary(locust2r_feed1)
plot(locust2r_feed1, which=5, ylab="probability of locomoting",
add.unadjusted=TRUE)
plot(locust2r_feed1, which=6, subSET=sex=="1",
main="sex==1 & Feed=1", ident=TRUE)
locust2r <- bild(move~(time+I(time^2))*feed,data=locust,
trace=TRUE, aggregate=feed, dependence="MC2R",
integrate=Integ)
par(mfrow=c(2,2))
plot(locust2r, which=1)
plot(locust2r, which=2)
plot(locust2r, which=3)
plot(locust2r, which=4)
par(mfrow=c(1,1))
plot(locust2r, which=5, ylab="probability of locomoting",
main="Feed & Unfeed groups", add.unadjusted=TRUE)
plot(locust2r, which=6, ylab="probability of locomoting",
main="Fed & Unfed groups", ident=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.