plot.simplexreg {simplexreg} | R Documentation |
Plots for simplexreg Objects
Description
Various types of plots could be produced for simplexreg Objects, including plots of correlation structure, plots of different types of residuals and plots of partial deviance.
Usage
## S3 method for class 'simplexreg'
plot(x, type = c("residuals", "corr", "GOF"), res = "adjvar", lag = 1, ...)
Arguments
x |
fitted model object of class "simplexreg" |
type |
character specifying types of plots: the correlation ( |
res |
character specifying types of residuals:approximate Pearson residual ( |
lag |
when |
... |
other parameters to be passed through to the plot function |
Details
This function provides graphical presentations for simplexreg objects. The plot of correlation aims
examine the correlation structure of the longitudinal data set. Let be the standardised
score residuals of the
i
th observation at time , and
lag = k
, then
are plotted against
for all
and
, if
.
Residuals can be plotted when specifying type = "residuals"
, The upper and lower 95
(1.96) are also lined.
Plots of partial deviance are for the goodness-of-fit test in the presence of within-subject dependence for longitudinal data. The partial deviances are defined as
where T denotes a collection of all distinct times on which observation are made. Cross-sectionally,
's are independent and hence
follows approximately
, with
being the total number of
's observed cross-sectionally at time
. Both observed partial
deviance
statistics and the corresponding critical values are depicted and compared at each
time point.
Author(s)
Chengchun Shi
References
Song, P. and Qiu, Z. and Tan, M. (2004) Modelling Heterogeneous Dispersion in Marginal Models for Longitudinal Proportional Data. Biometrical Journal, 46: 540–553
Qiu Z. (2001) Simplex Mixed Models for Longitudinal Proportional Data. Ph.D. Dissertation, York University
Zhang, P. and Qiu, Z. and Shi, C. (2016) simplexreg: An R Package for Regression Analysis of Proportional Data Using the Simplex Distribution. Journal of Statistical Software, 71: 1–21
See Also
summary.simplexreg
, residuals.simplexreg
Examples
## fit the model
data("sdac", package="simplexreg")
sim.glm2 <- simplexreg(rcd~ageadj+chemo|age,
link = "logit", data = sdac)
data("retinal", package = "simplexreg")
sim.gee2 <- simplexreg(Gas~LogT+LogT2+Level|LogT+Level|Time,
link = "logit", corr = "AR1", id = ID, data = retinal)
## produce the plots
plot(sim.glm2, type = "residuals", res = "stdPerr", ylim = c(-3, 3))
plot(sim.gee2, type = "corr", xlab = "", ylab = "")
plot(sim.gee2, type = "GOF", xlab = "", ylab = "")