anoDev: Conduct an analysis-of-deviance for the MSU pollinator...

Description Usage Arguments Details Value Author(s) See Also

View source: R/anoDev.R

Description

Conduct an analysis-of-deviance for the MSU pollinator analysis assuming a Poisson-distributed outcome and varying exposure.

Usage

1
anoDev(df, ft, annuals = TRUE, blocks = TRUE)

Arguments

df

A data.frame containing columns for PollinatorVisits, Cultivar, SamplingPeriods, and FlowerType. Typically, Cultivar is nested within FlowerType.

ft

A FlowerType within the Perrenial dataset.

annuals

A logical indicating if annuals or perennials are the analysis type of focus. Default is TRUE.

blocks

A logical indicating if a random block effect shoud be included. Requires the presence of a Block variable. Default is TRUE.

Details

Function stats::glm performs the analysis-of-deviance via use of the quasipoisson family, and thus log link. Following initial fit, a chi-squared test is used to test via deviance. This generalized-linear-model set-up corresponds to the typical partial F-test conducted via residual error in the general-linear-model normal-outcome case.

Note that the use of the quasipoisson family provides a conservative estimate of underlying test statistics. This is due to the quasipoisson correcting for observed overdispersion in poisson-model fits.

Value

A list containing results of the original fit, adjusted Tukey-like pairwise multiple comparisons, and the analysis-of-deviance. The four constituent objects are

  1. a The resulting data.frame housing the statistical results of the analysis of deviance. Recall that the degrees of freedom reports numbers one less than the distinct groups tested. The statistic entitled phi is the (Pearson's chi-squared) overdispersion. These statistics are corrected for quasilikelihoo.

  2. c The Tukey-lettering system identifying how individual levels compare. Utilized multcomp:cld.

  3. i The inverted confidence intervals on the original scales of the pairwise estimates.

  4. m The original glm fit, assuming a Poisson distrubtion and possible offset.

  5. t The original mutliple-comparison glht fit, assuming Tukey-like pairwise comparisons.

Author(s)

Jason Mitchell, based on original work by Zoe Gustafson.

See Also

stats::glm, stats::anova, stats::confint, multcomp::glht


studyvin/pollinatorAttractiveness documentation built on Dec. 23, 2021, 6:38 a.m.