factorfit_cyclomort: Factorial analysis of seasonal survival models

Description Usage Arguments Value Examples

View source: R/factorfit_cyclomort.R

Description

This function takes a Y~X style formula to compare null models of pooled data against separately fitted models against a given factor. For now this works only for a single discrete factor.

Usage

1
factorfit_cyclomort(f, data = NULL, n.seasons = 2, ...)

Arguments

f

formula object used for identifying different classes

data

a data frame containing a cycloSurv object detailing mortalities for a set of observations and a factor identifying the value of a categorical variable for each observation

n.seasons

number of seasons to fit model to

...

additional arguments to fit_cyclomort call

Value

table comparing outputs from null (factor has no effect on mortality and they are all in the same group) model to multi-factor model using AIC, log-likelihood and likelihood ratio test

Examples

1
2
3
4
5
6
7
# fit factorial model
data(seasonalsex)
seasonalsex.factorfit <- factorfit_cyclomort(event ~ sex, data = seasonalsex, n.seasons = 1)

# summary
summary(seasonalsex.factorfit, coefs = TRUE)
plot(seasonalsex.factorfit)

cyclomort documentation built on Aug. 20, 2020, 5:06 p.m.