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.

1 2 |

`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 |

This function provides graphical presentations for simplexreg objects. The plot of correlation aims
examine the correlation structure of the longitudinal data set. Let *r_{ij}* be the standardised
score residuals of the `i`

th observation at time *t_{ij}*, and `lag = k`

, then *r_{ij}*
are plotted against *r_{ik}* for all *i* and *j < k*, if *|t_{ij} - t_{ik}| = k*.

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

*
D_j^P=sum d(y_{ij}-mu_{ij}) / σ_{ij}^2, j in T*

where T denotes a collection of all distinct times on which observation are made. Cross-sectionally,
*y_{ij}*'s are independent and hence *D_j^P* follows approximately *χ^2*, with *m_j*
being the total number of *y_{ij}*'s observed cross-sectionally at time *t_j*. Both observed partial
deviance *D_j^P* statistics and the corresponding critical values are depicted and compared at each
time point.

Chengchun Shi

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

`summary.simplexreg`

, `residuals.simplexreg`

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
## 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 = "")
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.