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