mgee2k {mgee2} | R Documentation |
mgee2k
Description
Corrected GEE2 for ordinal data. This method yields unbiased estimators, but the misclassification parameters are required to known.
Usage
mgee2k(
formula,
id,
data,
corstr = "exchangeable",
misvariable,
gamMat,
varphiMat,
maxit = 50,
tol = 0.001
)
Arguments
formula |
a formula object which specifies the relationship between the response and covariates for the observed data. |
id |
a character object which records individual id in the data. |
data |
a dataframe or matrix object for the observed data set. |
corstr |
a character object. The default value is "exchangeable", corresponding to the structure where the association between two paired responses is considered to be a constant. The other option is "log-linear" which indicates the log-linear association between two paired responses. |
misvariable |
a character object which names the error-prone covariate W. |
gamMat |
a matrix object which records the misclassification parameter gamma for response Y. |
varphiMat |
a matrix object which records the misclassification parameter phi for covariate X. |
maxit |
an integer which specifies the maximum number of iterations. The default is 50. |
tol |
a numeric object which indicates the tolerance threshold. The default is 1e-3. |
Details
mgee2k implements the misclassification adjustment method outlined in Chen et al.(2014) where the misclassification parameters are known. In this case, validation data are not required, and only the observed data of the outcome and covariates are needed for the implementation.
Value
A list with component
beta |
the coefficients in the order as those specified in the formula for the response and covariates. |
alpha |
the oefficients for paired responses global odds ratios. The number of alpha coefficients corresponds to the paired responses odds ratio structure selected in corstr. When corstr="exchangeable", only one baseline alpha is fitted. When corstr="log-linear", baseline, first order, second order (interaction) terms are fitted. |
variance |
variance-covariance matrix of the estimator of all parameters. |
convergence |
a logical variable; TRUE if the model converges. |
iteration |
the number of iterations for the estimates of the model parameters to converge. |
differ |
a list of difference of estimation for convergence |
call |
Function called |
References
Z. Chen, G. Y. Yi, and C. Wu. Marginal analysis of longitudinal ordinal data with misclassification inboth response and covariates. Biometrical Journal, 56(1):69-85, Oct. 2014
Xu, Yuliang, Shuo Shuo Liu, and Y. Yi Grace. 2021. “mgee2: An R Package for Marginal Analysis of Longitudinal Ordinal Data with Misclassified Responses and Covariates.” The R Journal 13 (2): 419.
Examples
if(0){
data(obs1)
obs1$visit <- as.factor(obs1$visit)
obs1$treatment <- as.factor(obs1$treatment)
obs1$S <- as.factor(obs1$S)
obs1$W <- as.factor(obs1$W)
## set misclassification parameters to be known.
varphiMat <- gamMat <- log( cbind(0.04/0.95, 0.01/0.95,
0.95/0.03, 0.02/0.03,
0.04/0.01, 0.95/0.01) )
mgee2k.fit = mgee2k(formula = S~W+treatment+visit, id = "ID", data = obs1,
corstr = "exchangeable", misvariable = "W", gamMat = gamMat,
varphiMat = varphiMat)
}