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