Title: | Regression Analysis of Proportional Data Using Simplex Distribution |
---|---|
Description: | Simplex density, distribution, quantile functions as well as random variable generation of the simplex distribution are given. Regression analysis of proportional data using various kinds of simplex models is available. In addition, GEE method can be applied to longitudinal data to model the correlation. Residual analysis is also involved. Some subroutines are written in C with GNU Scientific Library (GSL) so as to facilitate the computation. |
Authors: | Peng Zhang, Zhengguo Qiu and Chengchun Shi |
Maintainer: | Peng Zhang <[email protected]> |
License: | GPL-2 |
Version: | 1.3 |
Built: | 2024-11-20 03:34:02 UTC |
Source: | https://github.com/cran/simplexreg |
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.
## S3 method for class 'simplexreg' plot(x, type = c("residuals", "corr", "GOF"), res = "adjvar", lag = 1, ...)
## S3 method for class 'simplexreg' plot(x, type = c("residuals", "corr", "GOF"), res = "adjvar", lag = 1, ...)
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 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.
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
## 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 = "")
## 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 = "")
Predicted values based on simplex regression object
## S3 method for class 'simplexreg' predict(object, newdata = NULL, type = c("response", "dispersion"), na.action, ...)
## S3 method for class 'simplexreg' predict(object, newdata = NULL, type = c("response", "dispersion"), na.action, ...)
object |
fitted model object of class |
newdata |
an optional data frame in which to look for variables with which to predict. If omitted, original observations are used. |
type |
character indicating type of predictions:fitted mean of response ( |
na.action |
function determining what should be done with missing values in |
... |
currently not used |
Chengchun Shi
## 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) ## predict the mean predict(sim.glm2, type = "response") ## predict the dispersion predict(sim.gee2, type = "dispersion")
## 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) ## predict the mean predict(sim.glm2, type = "response") ## predict the dispersion predict(sim.gee2, type = "dispersion")
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.
## S3 method for class 'simplexreg' residuals(object, type = c("appstdPerr", "stdPerr", "stdscor", "adjvar"), ...)
## S3 method for class 'simplexreg' residuals(object, type = c("appstdPerr", "stdPerr", "stdscor", "adjvar"), ...)
object |
fitted model object of class "simplexreg" |
type |
character specifying types of residuals:approximate Pearson residual ( |
... |
currently not used |
The Pearson residual takes the form
where is the fitted mean parameter and details about calculation of
is given in Jorgensen (1997). When the dispersion parameter
(see
simplex
) is large the variance of response approaches to
and this leads to the approximate Pearson residual
Plot of the standardised score residuals,
where 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,
where and
are the score function and variance function.
Chengchun Shi
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
## 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")
## 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")
The study recorded the decay of intraocular gas in complex retinal surgeries
following initial injection in an ophthalmology study, reported in Meyers et al. (1992). The outcome
variable was the percent of gas left in the eye. The gas, with three different concentration levels, 15%,
20% and 25% was injected into the eye before surgery for 31 patients. They were then followed three to eight
(average of five) times over a three-month period, and the volume of gas in the eye at the follow-up times
were recorded as a percentage of the initial gas volume. The primary interest was to investigate whether
concentration levels of the gas injected in patients' eyes affect the decay rate of the gas.
data("retinal")
data("retinal")
A data frame with 181 observations on the following 6 variables.
Gas
Percentage of the initial gas volume left
Time
Time covariate of days after the gas injection
LogT
Logarithm of Time
LogT2
Square of LogT
Level
Concentration levels of the initial intraocular gas. For each patient,
Level = -1
if the gas concentration level is 15%, Level = 0
if 20%, or
1
if 25%.
ID
A factor indicating patients.
Meyers, S. M. and Ambler, J. S. and Tan, M. (1992) Variation of Perfluorpropane Disappearance after Vitrectomy. Retinal, 12: 359–363
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
Autologous peripheral blood stem cell (PBSC) transplants have been widely used for rapid hematologic recovery following myeloablative therapy for various malignant hematological disorders. A study enrolled 242 patients who consented to autologous PBSC transplant after myeloablative doses of chemotherapy between year 2003 and 2008 at the Edmonton Hematopoietic Stem Cell Lab in Cross Cancer Institute - Alberta Health Services. The Data is a data frame containing information about the patients' age, gender, as well as their clinical characteristics.
data("sdac")
data("sdac")
A data frame with 239 observations on the following 5 variables.
age
patients' ages
gender
patients' genders
rcd
recovery rates for viable CD34+ cells
chemo
dummy variable indicating if a patient receives a chemotherapy on a one-day protocol(0) or on a 3-day protocol(1)
ageadj
adjusted age variable. age
< 40 is set as the baseline age and other ages
are adjusted by subtracting by 40
Allan, D. and Keeney, M. and Howson-Jan, K. and Popma, J. and Weir, K. and Bhatia, M. and Sutherland, D. and Chin_yee, I. (2002) Number of Viable CD34+ Cells Reinfused Predicts Engraftment in Autologous Hematopoietic Stem Cell Transplantation. BONE MARROW TRANSPL, 20: 967-72
Yang, H. and Acker, J. and Cabuhat, M. and Letcher, B. and Larratt, L. and McGann, L. (2005) Association of Post_Thaw viable CD34+ Cells and CFU-GM with Time to Hematopoietic Engraftment. BONE MARROW TRANSPL, 35: 881-887
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
Density, cumulative distribution function, quantile function and random variable generation
for the simplex distribution with mean equal to mu
and dispersion equal to sig
dsimplex(x, mu, sig) psimplex(q, mu, sig) qsimplex(p, mu, sig) rsimplex(n, mu, sig) psimplex.norm(q, mu, sig) qsimplex.norm(p, mu, sig)
dsimplex(x, mu, sig) psimplex(q, mu, sig) qsimplex(p, mu, sig) rsimplex(n, mu, sig) psimplex.norm(q, mu, sig) qsimplex.norm(p, mu, sig)
x , q
|
vector of quantiles |
p |
vector of probabilities |
n |
number of observations |
mu |
vector of means |
sig |
vector of square root of dispersion parameter of simplex distribution |
The simplex distribution has density
where is a unit deviance function
is the mean of simplex distribution and
the dispersion parameter.
qnorm
provides results up to about 6 digits.
dsimplex
gives density function, psimplex
gives the distribution function, qsimplex
gives quantile function and
rsimplex
gives random number generated from the simplex distribution. psim.norm
and qsimplex.norm
gives the
renormalized distribution and quantile function.
Peng Zhang and Zhenguo Qiu
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
Song, P. and Qiu, Z. and Tan, M. (2004) Modelling Heterogeneous Dispersion in Marginal Models for Longitudinal Proportional Data. Biometrical Journal, 46: 540–553
# simplex distribution function dsimplex(seq(0.01,0.99,0.01), 0.5, 1) psimplex(seq(0.01,0.99,0.01), 0.5, 1) qsimplex(seq(0.01,0.99,0.01), 0.5, 1) # random variable generation n <- 200 ga0 <- 1.5 ga1 <- 0.5 ga2 <- -0.5 sigma <- 4 T <- c(rep(0, n/2), rep(1, n/2)) S <- runif(n, 0, 5) eta <- ga0 + ga1 * T + ga2 * S mu <- exp(eta)/(1+exp(eta)) Y <- rep(0, n) for (i in 1:n){ Y[i] <- rsimplex(1, mu[i], sigma) }
# simplex distribution function dsimplex(seq(0.01,0.99,0.01), 0.5, 1) psimplex(seq(0.01,0.99,0.01), 0.5, 1) qsimplex(seq(0.01,0.99,0.01), 0.5, 1) # random variable generation n <- 200 ga0 <- 1.5 ga1 <- 0.5 ga2 <- -0.5 sigma <- 4 T <- c(rep(0, n/2), rep(1, n/2)) S <- runif(n, 0, 5) eta <- ga0 + ga1 * T + ga2 * S mu <- exp(eta)/(1+exp(eta)) Y <- rep(0, n) for (i in 1:n){ Y[i] <- rsimplex(1, mu[i], sigma) }
Regression Analysis of Proportional Data Using Various Types of Simplex Models
simplexreg(formula, data, subset, na.action, link = c("logit", "probit", "cloglog", "neglog"), corr = "Ind", id = NULL, control = simplexreg.control(...), model = TRUE, y = TRUE, x = TRUE, ...) simplexreg.fit(y, x, z = NULL, t = NULL, link = "logit", corr = "Ind", id = NULL, control = simplexreg.control())
simplexreg(formula, data, subset, na.action, link = c("logit", "probit", "cloglog", "neglog"), corr = "Ind", id = NULL, control = simplexreg.control(...), model = TRUE, y = TRUE, x = TRUE, ...) simplexreg.fit(y, x, z = NULL, t = NULL, link = "logit", corr = "Ind", id = NULL, control = simplexreg.control())
formula |
a symbolic description of the model to be fitted(of type y ~ x or y ~ x | z | t. The Details are given under 'Details'). |
data |
an optional data frame, list or environment containing variables in |
subset , na.action
|
arguments controlling formula processing via |
link |
type of link function to the mean. Currently, |
corr |
the covariance structure, chosen from |
id |
a factor identifies the clusters when |
control |
a list of control argument via |
model |
a logical value indicating whether model frame should be included as a component of the return value |
y , x
|
For |
z |
regressor matrix modelling the dispersion parameter |
t |
time covariate in the correlation structure, see Details |
... |
argument passed to |
Outcomes of continuous proportions arise in many applied areas. Such data could
be properly modelled using simplex regression. See also simplex
. The mean and
dispersion parameters are linked to set of regressors. Regression analysis of the simplex model
is implemented in simplexreg
. If corr = "Ind"
, simplex generalized regression model
is employed. Estimations is performed by maximum likelihood via Fisher scoring technique.
Apart from including generalized simplex regression models, this function also provides users with generalized estimating equations (GEE) techniques to model longitudinal proportional response. Exchangeability and AR(1) structures are available. Parameter estimation and residual analysis are involved.
We employ the specification approach designed in the fitting model function betareg
of
beta regression in the package betareg. As for simplex regression models, assuming the dispersion
is homogeneous, the response is linked to a linear predictor described by y ~ x1 + x2
using a link
function. Four types of function are available linking the regressors to the mean. However, for dispersion,
the link
function is restricted to logarithm function. When modeling dispersion, the regressor
modelling the dispersion parameter should be specified in a formula form of type y ~ x1 + x2 | z1 + z2
where z1
and z2
are linked to the dispersion parameter .
Model specification is a bit complicated when it comes to modelling longitudinal proportional response.
Song et. al (2004) proposed a marginal simplex model consists of three components, the
population-average effects, the pattern of dispersion and the correlation structure. Let the percentage
responses for the th subject be
, observed at time
. If
corr = "AR1"
,
the working covariance matrix of ,
, is
where and
is the lag-1 autocorrelation. If
corr = "Exc"
, the covariance matrix will be
where I is the identity matrix while 1 the matrix with all elements being equal to one.
For homogeneous dispersion, the formula is supposed to be of the form y ~ x1 + x2 | 1 | t
where is the
time covariate. Otherwise, the formula will be of the form
y ~ x1 + x2 | z1 + z2 | t
.
fixef |
estimates of coefficients modelling the mean as well as the standard deviation |
dispar |
estimates of coefficients modelling dispersion as well as the standard deviation |
Dispersion |
estimate of the dispersion parameter |
appstdPerr |
approximated standard deviations of the regression coefficients |
stdPerr |
exact standard deviations of the regression coefficients |
meanmu |
estimate of mean parameter |
adjvar |
adjusted dependent variable |
stdscor |
standardised score residuals. Details can be found in Song et al. (2004) |
predict |
predicted values of |
loglike |
value of maximum log-likelihood function |
deviance |
value of deviance |
call |
the original function call |
formula |
the original formula |
terms |
a list with elements |
levels |
a list with elements |
link |
type of function linking to the mean |
type |
type = |
model |
the full model frame (if |
y |
response vector (if |
x |
a list with elements |
n |
number of proportional observations |
iter |
number of Fisher iterations |
... |
argument passed to |
Zhenguo Qiu, Peng Zhang and Chengchun Shi
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
# GLM models data("sdac", package = "simplexreg") sim.glm1 <- simplexreg(rcd~ageadj+chemo, link = "logit", data = sdac) sim.glm2 <- simplexreg(rcd~ageadj+chemo|age, link = "logit", data = sdac) # GEE models data("retinal", package = "simplexreg") sim.gee1 <- simplexreg(Gas~LogT+LogT2+Level|1|Time, link = "logit", corr = "Exc", id = ID, data = retinal) sim.gee2 <- simplexreg(Gas~LogT+LogT2+Level|LogT+Level|Time, link = "logit", corr = "AR1", id = ID, data = retinal)
# GLM models data("sdac", package = "simplexreg") sim.glm1 <- simplexreg(rcd~ageadj+chemo, link = "logit", data = sdac) sim.glm2 <- simplexreg(rcd~ageadj+chemo|age, link = "logit", data = sdac) # GEE models data("retinal", package = "simplexreg") sim.gee1 <- simplexreg(Gas~LogT+LogT2+Level|1|Time, link = "logit", corr = "Exc", id = ID, data = retinal) sim.gee2 <- simplexreg(Gas~LogT+LogT2+Level|LogT+Level|Time, link = "logit", corr = "AR1", id = ID, data = retinal)
Various parameters that control fitting of simplex regression models
using simplexreg
.
simplexreg.control(maxit = 200, beta = NULL, gamma = NULL, alpha = NULL, tol = 1e-6, ...)
simplexreg.control(maxit = 200, beta = NULL, gamma = NULL, alpha = NULL, tol = 1e-6, ...)
maxit |
maximum number of iterations |
beta |
start value for beta modelling the mean parameter |
gamma |
start value for gamma modelling the dispersion |
alpha |
start value for alpha modelling correlation structure using GEEs, see Song et.al (2004) |
tol |
numeric tolerance for convergence in Fisher scoring |
... |
currently not used |
A list with the arguments specified.
# GLM models data("sdac", package = "simplexreg") sim.glm1 <- simplexreg(rcd~ageadj+chemo, link = "logit", data = sdac, beta = c(1.115, 0.013, 0.252)) sim.glm2 <- simplexreg(rcd~ageadj+chemo|age, link = "logit", data = sdac, beta = c(1.115, 0.013, 0.252), gamma = c(2.61, -0.015)) # GEE models data("retinal", package = "simplexreg") sim.gee1 <- simplexreg(Gas~LogT+LogT2+Level|1|Time, link = "logit", corr = "Exc", id = ID, data = retinal, beta = c(2.72, 0.034, -0.329, 0.409), alpha = -0.3) sim.gee2 <- simplexreg(Gas~LogT+LogT2+Level|LogT+Level|Time, link = "logit", corr = "AR1", id = ID, data = retinal, alpha = -0.3, beta = c(2.72, 0.034, -0.329, 0.409))
# GLM models data("sdac", package = "simplexreg") sim.glm1 <- simplexreg(rcd~ageadj+chemo, link = "logit", data = sdac, beta = c(1.115, 0.013, 0.252)) sim.glm2 <- simplexreg(rcd~ageadj+chemo|age, link = "logit", data = sdac, beta = c(1.115, 0.013, 0.252), gamma = c(2.61, -0.015)) # GEE models data("retinal", package = "simplexreg") sim.gee1 <- simplexreg(Gas~LogT+LogT2+Level|1|Time, link = "logit", corr = "Exc", id = ID, data = retinal, beta = c(2.72, 0.034, -0.329, 0.409), alpha = -0.3) sim.gee2 <- simplexreg(Gas~LogT+LogT2+Level|LogT+Level|Time, link = "logit", corr = "AR1", id = ID, data = retinal, alpha = -0.3, beta = c(2.72, 0.034, -0.329, 0.409))
Methods for extracting information from fitted simplex regression model
objects of class "simplexreg"
## S3 method for class 'simplexreg' ## S3 method for class 'simplexreg' summary(object, type = "stdPerr", ...) ## S3 method for class 'simplexreg' ## S3 method for class 'simplexreg' coef(object, ...) ## S3 method for class 'simplexreg' ## S3 method for class 'simplexreg' vcov(object, ...)
## S3 method for class 'simplexreg' ## S3 method for class 'simplexreg' summary(object, type = "stdPerr", ...) ## S3 method for class 'simplexreg' ## S3 method for class 'simplexreg' coef(object, ...) ## S3 method for class 'simplexreg' ## S3 method for class 'simplexreg' vcov(object, ...)
object |
fitted model object of class "simplexreg" |
type |
character specifying type of residuals to be included, see
|
... |
currently not used |
These functions make it possible to extract information from objects of class
"simplexreg"
. Wald statistics as well as the p-values of regression coefficients
are given in the summary
output. If GEE = FALSE
, based on the fitted
coefficients, a test is performed and the p-value is reported in the output.
Otherwise, coefficients of the autocorrelation
,
, (see Song
et. al (2004)), are also involved.
Model coefficients and their covariance matrix could be extracted by the coef
,
and vcov
, respectively. For simplex GLM models (GEE = FALSE
), Akaike Information
Criterion and Bayesian Information Criterion could be calculated using generic functions AIC
and BIC
, respectively.
Chengchun Shi
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
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
simplexreg
, residuals.simplexreg
## 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 information summary(sim.glm2, type = "appstdPerr") coef(sim.glm2) vcov(sim.glm2) AIC(sim.glm2) BIC(sim.glm2) summary(sim.gee2, type = "stdscor") coef(sim.gee2) vcov(sim.glm2)
## 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 information summary(sim.glm2, type = "appstdPerr") coef(sim.glm2) vcov(sim.glm2) AIC(sim.glm2) BIC(sim.glm2) summary(sim.gee2, type = "stdscor") coef(sim.gee2) vcov(sim.glm2)