Description Usage Arguments Details Value Author(s) See Also
Conduct an analysis-of-deviance for the MSU pollinator analysis assuming a Poisson-distributed outcome and varying exposure.
1 |
df |
A |
year |
The numeric four-digit year. Used to handle slight differences in recorded data layout. |
offsetVar |
The variable to be utilized as an offset, submitted as a
character string. Typically |
CNMax |
The maximum condition number to serve as a cutoff, beyond which models are not considered. |
Function fitFT
serves as a preparation and wrapper function
for function fits
which conducts the statistical fitting via either
of glm
or MASS::glm.nb
.
Processing includes the creation of a binary explanatory variables for
consideration of different cutpoints. Cutpoints are binary, in that
cultivar records greater than or equal to a predefined number of
TotalPollinatorVisits
are grouped as 1
, while all others (so
those less than TotalPollinatorVisits
) are zero
. All
possible binary outcomes from 1
through 10
are considered.
Following the creation of appropriate data sets, R-type formula strings are
then created, possibly including Cultivar
as an additional
explanatory covariate via function modelStrings
. Up to 5
explanatory covariates are allowed, with possibly two interactions.
Next, given the model strings, design matrices are constructed so that condition numbers can be calculated for each. The condition number of the underlying variance-covariance matrix of the centered design matrix allows for interpretation of the multicollinearity of the variables whose columns form the original design matrix. Condition numbers are ratios of the largest eigenvalue to the smallest eigenvalue, which themselves are estimates of variance in rotated dimensions in which they matter the most. More practically, the presence of a large condition number implies a more ellipsoidal data cloud when compared to clouds tied to smaller condition numbers. The ellipsoidal nature of the cloud is very similar to ellipsoidal clouds observed in two-dimensional data plots used to assess two-dimensional correlation. The condition-number approach is the generalization of the typical approach used for two dimensions to assess correlation.
Those model strings with a sufficiently low condition number are then
passed to the fits
function, which then conducts the actual
fitting of count statistical models.
A list
containing results of the original fit, adjusted
Tukey-like pairwise multiple comparisons, and the analysis-of-deviance.
The four constituent objects are
Jason Mitchell, based on original work by Zoe Gustafson.
stats::glm
, stats::anova
, stats::confint
,
multcomp::glht
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.