| Title: | Quadratic Inference Function | 
| Version: | 1.5 | 
| Date: | 2019-7-2 | 
| Depends: | R (≥ 3.5.0) | 
| Description: | Developed to perform the estimation and inference for regression coefficient parameters in longitudinal marginal models using the method of quadratic inference functions. Like generalized estimating equations, this method is also a quasi-likelihood inference method. It has been showed that the method gives consistent estimators of the regression coefficients even if the correlation structure is misspecified, and it is more efficient than GEE when the correlation structure is misspecified. Based on Qu, A., Lindsay, B.G. and Li, B. (2000) <doi:10.1093/biomet/87.4.823>. | 
| Imports: | MASS | 
| License: | GPL-2 | 
| Packaged: | 2019-07-18 16:10:38 UTC; mkleinsa | 
| Encoding: | UTF-8 | 
| LazyData: | true | 
| BugReports: | https://github.com/umich-biostatistics/qif/issues | 
| RoxygenNote: | 6.1.1 | 
| NeedsCompilation: | yes | 
| Author: | Zhichang Jiang [aut], Peter Song [aut], Michael Kleinsasser [cre] | 
| Maintainer: | Michael Kleinsasser <mkleinsa@umich.edu> | 
| Repository: | CRAN | 
| Date/Publication: | 2019-07-20 11:30:02 UTC | 
Seizure Counts for Epileptics
Description
The data set consists of seizure counts for 59 individuals with epilepsy. Counts were recorded for four two-week periods (8 weeks total). Age is the only covariate.
Usage
epil
Format
A data.frame with 236 rows and 9 variables (columns):
- y
- the count for the 2-week period. 
- trt
- treatment, "placebo" or "progabide". 
- base
- the counts in the baseline 8-week period. 
- age
- subject's age, in years. 
- V4
- 0/1 indicator variable of period 4. 
- subject
- subject number, 1 to 59. 
- period
- period, 1 to 4. 
- lbase
- log-counts for the baseline period, centred to have zero mean. 
- lage
- log-ages, centred to have zero mean. 
Source
Thall, P. F. and Vail, S. C. (1990) Some covariance models for longitudinal count data with over-dispersion. Biometrics 46, 657–671.
References
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth Edition. Springer.
MS data
Description
MS data
Usage
exacerb
Format
An object of class data.frame with 765 rows and 14 columns.
Source
Thal
References
Venab
Print Function for qif Object
Description
Print a qif model object.
Usage
## S3 method for class 'qif'
print(x, digits = NULL, quote = FALSE, prefix = "",
  ...)
Arguments
| x | the  | 
| digits | number of digits to print. | 
| quote | logical, indicating whether or not strings should be printed with surrounding quotes. | 
| prefix | string, only  | 
| ... | further arguments passed to or from other methods. | 
Value
The invisible object from the arguments.
Author(s)
Zhichang Jiang, Alberta Health Services, and Peter X.K. Song, University of Michigan.
See Also
Print the Summary of qif Object
Description
Prints the summary of a qif object.
Usage
## S3 method for class 'summary.qif'
print(x, digits = NULL, quote = FALSE,
  prefix = "", ...)
Arguments
| x | the  | 
| digits | number of digits to print. | 
| quote | logical, indicating whether or not strings should be printed with surrounding quotes. | 
| prefix | string, only  | 
| ... | further arguments passed to or from other methods. | 
Value
The invisible object from the arguments.
The invisible object from the arguments.
Author(s)
Zhichang Jiang, Alberta Health Services, and Peter X.K. Song, University of Michigan.
See Also
Function to Solve a Quadratic Inference Function Model
Description
Produces an object of class "qif" which is a Quadratic Inference Function fit
of the balanced longitudinal data.
Usage
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
 | 
| id | a vector which identifies the clusters. The length of  | 
| data | an optional data frame in which to interpret the variables occurring
in the  | 
| b | an initial estimate for the parameters. | 
| tol | the tolerance used in the fitting algorithm. | 
| maxiter | the maximum number of iterations. | 
| family | a  | 
| corstr | a character string specifying the correlation structure. The
following are permitted:  | 
| invfun | a character string specifying the matrix inverse function. The
following are permitted:  | 
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:
- title: name of qif
- version: the current version of qif
- model: analysis model for link function, variance function and correlation struture
- terms: analysis model for link function, variance function and correlation struture
- iteration: the number of iterations
- coefficients: beta esitmates value
- linear.perdictors: linear predictor value
- fitted.value: fitted value of y
- x: the perdicted matrix
- y: the response
- residuals: y-mu
- pearson.resi: pearson residuals
- scale: the scale of fitted model
- family: the type of distribution
- id: model fitted value
- max.id: max number of each steps
- xnames: the values are X name of qif
- statistics: The qif statistics
- Xnames: the name X matrix in qif
- parameter: parameter estimates
- covariance: Covariance of coefficients
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
## 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
Summary of a qif Object
Description
Procuce a summary of a qif object.
Usage
## S3 method for class 'qif'
summary(object, correlation = TRUE, ...)
Arguments
| object | an object for which a summary is desired. | 
| correlation | binary, include correlation. | 
| ... | additional arguements to be passed to  | 
Value
The summary.qif object.
Author(s)
Zhichang Jiang, Alberta Health Services, and Peter X.K. Song, University of Michigan.