residuals.simplexreg {simplexreg} | R Documentation |
Extract residuals for simplexreg Objects
Description
Methods for extracting various types of residuals from simplex regression, from approximate Pearson residuals, standard Pearson residuals and standardise score residuals to adjusted dependent variable suggested by McCullagh and Nelder (1989). The first three can be used to examine mean-variance relation while the last aims to test the link function.
Usage
## S3 method for class 'simplexreg'
residuals(object, type = c("appstdPerr", "stdPerr", "stdscor", "adjvar"),
...)
Arguments
object |
fitted model object of class "simplexreg" |
type |
character specifying types of residuals:approximate Pearson residual ( |
... |
currently not used |
Details
The Pearson residual takes the form
r_i^P=\frac{y_i-\hat{\mu}_i}{\hat{\tau}_i}
where \hat{\mu}_i
is the fitted mean parameter and details about calculation of
\tau
is given in Jorgensen (1997). When the dispersion parameter \sigma^2
(see simplex
) is large the variance of response approaches to \mu(1-\mu)
and this leads to the approximate Pearson residual
r_i^a=\frac{y_i-\hat{\mu}_i}{\sqrt{\hat{\mu}_i(1-\hat{\mu}_i)}}
Plot of the standardised score residuals,
r_i^S=\frac{u_i}{\sqrt{var(u_i)}}
where u_i
is the score function, can also detect model assumption violation.
Details can be found in Song et al. (2004).
The adjusted dependent variable suggested by McCullagh and Nelder (1989) could be employed
as an informal check for the link function,
s_i = g(\mu_i) + (\frac{3\sigma^4}{\mu_i(1-\mu_i)}+\frac{\sigma^2}{V(\mu_i)})^{-1/2} u(y_i;\mu_i)
where u(y_i;\mu_i)
and V(\mu_i)
are the score function and variance function.
Author(s)
Chengchun Shi
References
Barndorff-Nielsen, O.E. and Jorgensen, B. (1991) Some parametric models on the simplex. Journal of Multivariate Analysis, 39: 106–116
Jorgensen, B. (1997) The Theory of Dispersion Models. London: Chapman and Hall
McCullagh, P and Nelder J. (1989) Generalized Linear Models. London: Chapman and Hall
Song, P. and Qiu, Z. and Tan, M. (2004) Modelling Heterogeneous Dispersion in Marginal Models for Longitudinal Proportional Data. Biometrical Journal, 46: 540–553
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
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)
## extract the residuals
res <- residuals(sim.glm2, type = "stdPerr")
res <- residuals(sim.gee2, type = "adjvar")