Comparative Analysis with GEEs

compar.gee performs the comparative analysis using generalized estimating equations as described by Paradis and Claude (2002).

drop1 tests single effects of a fitted model output from compar.gee.

compar.gee(formula, data = NULL, family = "gaussian", phy,
          scale.fix = FALSE, scale.value = 1)
## S3 method for class 'compar.gee':
drop1(object, scope, quiet = FALSE, ...)
a formula giving the model to be fitted.
the name of the data frame where the variables in formula are to be found; by default, the variables are looked for in the global environment.
a character string specifying the distribution assumed for the response; by default a Gaussian distribution (with link identity) is assumed (see ?family for details on specifying the distribution, and on changing the link function
an object of class "phylo".
logical, indicates whether the scale parameter should be fixed (TRUE) or estimated (FALSE, the default).
if scale.fix = TRUE, gives the value for the scale (default: scale.value = 1).
an object of class "compar.gee" resulting from fitting compar.gee.
a logical specifying whether to display a warning message about eventual ``marginality principle violation''.
further arguments to be passed to drop1.

If a data frame is specified for the argument data, then its rownames are matched to the tip labels of phy. The user must be careful here since the function requires that both series of names perfectly match, so this operation may fail if there is a typing or syntax error. If both series of names do not match, the values in the data frame are taken to be in the same order than the tip labels of phy, and a warning message is issued.

If data = NULL, then it is assumed that the variables are in the same order than the tip labels of phy.


  • compar.gee returns an object of class "compar.gee" with the following components:
  • callthe function call, including the formula.
  • effect.assign{a vector of integers assigning the coefficients to the effects (used by drop1).}
  • nobsthe number of observations.
  • coefficientsthe estimated coefficients (or regression parameters).
  • residualsthe regression residuals.
  • familya character string, the distribution assumed for the response.
  • linka character string, the link function used for the mean function.
  • scalethe scale (or dispersion parameter).
  • Wthe variance-covariance matrix of the estimated coefficients.
  • dfPthe phylogenetic degrees of freedom (see Paradis and Claude for details on this).
  • drop1 returns an object of class "anova".


Paradis, E. and Claude J. (2002) Analysis of comparative data using generalized estimating equations. Journal of theoretical Biology, 218, 175--185.

See Also

read.tree, pic, compar.lynch, drop1

  • compar.gee
  • print.compar.gee
  • drop1.compar.gee
### The example in Phylip 3.5c (originally from Lynch 1991)
### (the same analysis than in help(pic)...)
   file = "ex.tre", sep = "")
tree.primates <- read.tree("ex.tre")
X <- c(4.09434, 3.61092, 2.37024, 2.02815, -1.46968)
Y <- c(4.74493, 3.33220, 3.36730, 2.89037, 2.30259)
### Both regressions... the results are quite close to those obtained
### with pic().
compar.gee(X ~ Y, phy = tree.primates)
compar.gee(Y ~ X, phy = tree.primates)
### Now do the GEE regressions through the origin: the results are quite
### different!
compar.gee(X ~ Y - 1, phy = tree.primates)
compar.gee(Y ~ X - 1, phy = tree.primates)
unlink("ex.tre") # delete the file "ex.tre"
Documentation reproduced from package ape, version 2.1-1, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.