3 \alias{print.compar.gee}
4 \alias{drop1.compar.gee}
5 \alias{predict.compar.gee}
6 \title{Comparative Analysis with GEEs}
8 \code{compar.gee} performs the comparative analysis using generalized
9 estimating equations as described by Paradis and Claude (2002).
11 \code{drop1} tests single effects of a fitted model output from
14 \code{predict} returns the predicted (fitted) values of the model.
17 compar.gee(formula, data = NULL, family = "gaussian", phy, corStruct,
18 scale.fix = FALSE, scale.value = 1)
19 \method{drop1}{compar.gee}(object, scope, quiet = FALSE, ...)
20 \method{predict}{compar.gee}(object, type = c("link", "response"), ...)
23 \item{formula}{a formula giving the model to be fitted.}
24 \item{data}{the name of the data frame where the variables in
25 \code{formula} are to be found; by default, the variables are looked
26 for in the global environment.}
27 \item{family}{a function specifying the distribution assumed for the
28 response; by default a Gaussian distribution (with link identity) is
29 assumed (see \code{?family} for details on specifying the
30 distribution, and on changing the link function).}
31 \item{phy}{an object of class \code{"phylo"} (ignored if
32 \code{corStruct} is used).}
33 \item{corStruct}{a (phylogenetic) correlation structure.}
34 \item{scale.fix}{logical, indicates whether the scale parameter should
35 be fixed (TRUE) or estimated (FALSE, the default).}
36 \item{scale.value}{if \code{scale.fix = TRUE}, gives the value for the
37 scale (default: \code{scale.value = 1}).}
38 \item{object}{an object of class \code{"compar.gee"} resulting from
39 fitting \code{compar.gee}.}
40 \item{scope}{<unused>.}
41 \item{quiet}{a logical specifying whether to display a warning message
42 about eventual ``marginality principle violation''.}
43 \item{type}{a character string specifying the type of predicted
44 values. By default, the linear (link) prediction is returned.}
45 \item{\dots}{further arguments to be passed to \code{drop1}.}
48 If a data frame is specified for the argument \code{data}, then its
49 rownames are matched to the tip labels of \code{phy}. The user must be
50 careful here since the function requires that both series of names
51 perfectly match, so this operation may fail if there is a typing or
52 syntax error. If both series of names do not match, the values in the
53 data frame are taken to be in the same order than the tip labels of
54 \code{phy}, and a warning message is issued.
56 If \code{data = NULL}, then it is assumed that the variables are in
57 the same order than the tip labels of \code{phy}.
60 The calculation of the phylogenetic degrees of freedom is likely to be
61 approximative for non-Brownian correlation structures (this will be
64 The calculation of the quasilikelihood information criterion (QIC)
68 \code{compar.gee} returns an object of class \code{"compar.gee"} with
69 the following components:
70 \item{call}{the function call, including the formula.}
71 \item{effect.assign}{a vector of integers assigning the coefficients
72 to the effects (used by \code{drop1}).}
73 \item{nobs}{the number of observations.}
74 \item{QIC}{the quasilikelihood information criterion as defined by Pan
76 \item{coefficients}{the estimated coefficients (or regression parameters).}
77 \item{residuals}{the regression residuals.}
78 \item{family}{a character string, the distribution assumed for the response.}
79 \item{link}{a character string, the link function used for the mean function.}
80 \item{scale}{the scale (or dispersion parameter).}
81 \item{W}{the variance-covariance matrix of the estimated coefficients.}
82 \item{dfP}{the phylogenetic degrees of freedom (see Paradis and Claude
83 for details on this).}
85 \code{drop1} returns an object of class \code{"\link[stats]{anova}"}.
88 Pan, W. (2001) Akaike's information criterion in generalized
89 estimating equations. \emph{Biometrics}, \bold{57}, 120--125.
91 Paradis, E. and Claude J. (2002) Analysis of comparative data using
92 generalized estimating equations. \emph{Journal of theoretical
93 Biology}, \bold{218}, 175--185.
96 \author{Emmanuel Paradis}
99 \code{\link{read.tree}}, \code{\link{pic}},
100 \code{\link{compar.lynch}}, \code{\link[stats]{drop1}}
103 ### The example in Phylip 3.5c (originally from Lynch 1991)
104 ### (the same analysis than in help(pic)...)
105 cat("((((Homo:0.21,Pongo:0.21):0.28,",
106 "Macaca:0.49):0.13,Ateles:0.62):0.38,Galago:1.00);",
107 file = "ex.tre", sep = "\n")
108 tree.primates <- read.tree("ex.tre")
109 X <- c(4.09434, 3.61092, 2.37024, 2.02815, -1.46968)
110 Y <- c(4.74493, 3.33220, 3.36730, 2.89037, 2.30259)
111 ### Both regressions... the results are quite close to those obtained
113 compar.gee(X ~ Y, phy = tree.primates)
114 compar.gee(Y ~ X, phy = tree.primates)
115 ### Now do the GEE regressions through the origin: the results are quite
117 compar.gee(X ~ Y - 1, phy = tree.primates)
118 compar.gee(Y ~ X - 1, phy = tree.primates)
119 unlink("ex.tre") # delete the file "ex.tre"