factorfit_cyclomort {cyclomort}R Documentation

Factorial analysis of seasonal survival models

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

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

# 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)

[Package cyclomort version 1.0.2 Index]