qls {qlspack}R Documentation

Fit Quasi Least Squares (QLS) Estimating Equations

Description

The qls function fits quasi least square estimating equations based on the geeglm function in the geepack and cor.estimate funcion in the qlspack. qls has a syntax similar to glm and returns an object similar to a glm object. An important feature of qls, is that an anova method exists for these models.

Usage

qls(formula, data, id, family = "gaussian",
time = "NA", correlation = "ar1", std.err = "san.se")

Arguments

formula The model to be fitted. The form is similar to the item documentated in geeglm. However, please note that you should list all the design variable name in the formula. Functions like as.factor might not work here.
data A data frame containing the variables in the model.
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. The 'id's for different clusters should be different, but need not to be consecutive.
family A character string describing the error distribution and link function to be used in the model. There are three options: "guassian", "binomial" and "poisson". The default option is "guassian".
time a vector which identifies the time in the clusters. The length of 'time' should be the same as the number of observations. This argument is used if and only if 'correlation == "markov"'.
correlation a character string specifying the correlation structure. The following are permitted: '"ar1"', '"exchangeable"', '"markov"', '"tridiagonal"' and '"ex.fam"'.
std.err See corresponding documentation to geeglm.

Value

An object of type 'qlsglm'.

Warning

qls has not been thoroughly tested. Please report bugs.

Note

qls only works for complete data. Thus if there are NA's in data you can specify data=na.omit(mydata).

Author(s)

Jichun Xie, jichun@mail.med.upenn.edu

References

Chaganty, N. R. 1997. An alternative approach to the analysis of longitudinal data via generalized estimating equations. Journal of Statistical Planning and Inference 63: 39–54.

Shults, J. 1996. The analysis of unbalanced and unequally spaced longitudinal data using quasi-least squares. Ph.D. Thesis, Department of Mathematics and Statistics, Old Dominion University: Norfolk, Virginia.

Shults, J. and Chaganty, N.R. 1998. Analysis of serially correlated data using quasi-least squares. Biometrics 54: 1622–1630.

Chaganty, N.R. and Shults, J. 1999. On eliminating the asymptotic bias in the quasi-least squares estimate of the correlation parameter. Journal of Statistical Planning and Inference 76: 127–144.

See Also

glm

Examples

data(rat)
qls.fit <- qls(bp ~ time + group2 + group3 + group4, data = rat, id = rat$id,
          time = rat$time, correlation = "markov")
summary(qls.fit)

[Package qlspack version 1.0-1 Index]