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

1
2
## 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 (corr), residuals (residuals), partial deviances (GOF). See 'Details'

res

character specifying types of residuals:approximate Pearson residual (appstdPerr), standard Pearson residual (stdPerr), adjusted dependent variable s_i (adjvar). See residuals.simplexreg

lag

when type = corr, this function examine the autocorrelation at lag lag

...

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 r_{ij} be the standardised score residuals of the ith 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.

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

 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 = "")