qif: Function to Solve a Quadratic Inference Function Model

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Produces an object of class "qif" which is a Quadratic Inference Function fit of the balanced longitudinal data.

Usage

1
2
3
qif(formula = formula(data), id = id, data = parent.frame(),
  b = NULL, tol = 1e-08, maxiter = 1000, family = gaussian,
  corstr = "independence", invfun = "finv")

Arguments

formula

a formula expression as for other regression models, of the form response ~ predictors. See the documentation of lm and formula for details.

id

a vector which identifies the clusters. The length of id should be the same as the number of observations. Data are assumed to be sorted so that observations on a cluster are contiguous rows for all entities in the formula.

data

an optional data frame in which to interpret the variables occurring in the formula, along with the id variables.

b

an initial estimate for the parameters.

tol

the tolerance used in the fitting algorithm.

maxiter

the maximum number of iterations.

family

a family object: a list of functions and expressions for defining canonical link and variance functions. Families supported in qif are gaussian, binomial, poisson, and gamma; see the glm and formula documentation. Some links are not currently available: probit link for binomial family and log link for gamma family.

corstr

a character string specifying the correlation structure. The following are permitted: "independence", "exchangeable", "AR-1" and "unstructured".

invfun

a character string specifying the matrix inverse function. The following are permitted: "finv" and "ginv".

Details

qif provides two options of computing matrix inverses. The default is from Fortran math library, and the other one is generalized inverse "ginv" given in R package MASS. You can call option "ginv" through argument "invfun" in "qif()".

Value

A list containing:

Note

This R package is created by transplanting a SAS macro QIF developed originally by Peter Song and Zhichang Jiang (2006). This is version 1.5 of this user documentation file, revised 2019-07-02.

Author(s)

Zhichang Jiang, Alberta Health Services, and Peter X.K. Song, University of Michigan.

References

Qu A, Lindsay BG, Li B. Improving generalized estimating equations using quadratic inference functions. Biometrika 2000, 87 823-836.

Qu A, Song P X-K. Assessing robustness of generalised estimating equations and quadratic inference functions. Biometrika 2004, 91 447-459.

Qu A, Lindsay BG. Building adaptive estimating equations when inverse of covariance estimation is difficult. J. Roy. Statist. Soc. B 2003, 65, 127-142.

See Also

glm, lm, formula.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Marginal log-linear model for the epileptic seizures count data
## (Diggle et al., 2002, Analysis of Longitudinal Data, 2nd Ed., Oxford Press).

# Read in the epilepsy data set:
data(epil)

# Fit the QIF model:
fit <- qif(y ~ base + trt + lage + V4, id=subject, data=epil,
                                       family=poisson, corstr="AR-1")

# Alternately, use ginv() from package MASS
fit <- qif(y ~ base + trt + lage + V4, id=subject, data=epil,
                      family=poisson, corstr="AR-1", invfun = "ginv")

# Print summary of QIF fit:
summary(fit)

## Second example: MS study
data(exacerb)

qif_BIN_IND<-qif(exacerbation ~ treatment + time + duration + time2, id=id,
                        data=exacerb, family=binomial, corstr="independence")
qif_BIN_AR1<-qif(exacerbation ~ treatment + time + duration + time2, id=id,
                        data=exacerb, family=binomial, corstr="AR-1")
qif_BIN_CS<-qif(exacerbation ~ treatment + time + duration + time2, id=id,
                        data=exacerb, family=binomial, corstr="exchangeable")
qif_BIN_UN<-qif(exacerbation ~ treatment + time + duration + time2, id=id,
                        data=exacerb, family=binomial, corstr="unstructured")

summary(qif_BIN_CS)

qif_BIN_CS$statistics

qif_BIN_CS$covariance

qif documentation built on July 20, 2019, 5:10 p.m.

Related to qif in qif...