select_seasons: Select the number of mortality seasons

Description Usage Arguments Value Examples

View source: R/select_seasons.R

Description

Compute a delta AIC table (and, optionally, likelihood ratio tests) for a sequence of models with a different number of seasons

Usage

1
select_seasons(x, max.season = 4, lrt = FALSE, print = TRUE)

Arguments

x

create_cycloSurv object

max.season

maximum number of seasons to fit

lrt

whether or not to perform and return the complete results of nested likelihood ratio tests

print

boolean parameter; if TRUE the function prints the table out as a side effect of creating the object

Value

a list containing (1) a list of all the fitted objects, and (2) an AIC (and, optionally, LRT) summary table. Also prints both tables by default.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
T.morts1 <- simulate_cycloSurv(1000, period = 1, 
                             meanhazard = 0.3, 
                             peaks = c(0.25, 0.75), 
                             durations = c(0.2, 0.1), 
                             weights = c(0.3, 0.7), 
                             plotme = FALSE)


model_selection = select_seasons(T.morts1, max.season = 4)
summary(model_selection$fits)

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