summary.cmfit: Provide a short summary of cmfit (parameter estimates for...

Description Usage Arguments Value Examples

View source: R/summary_cmfit.R

Description

Provide a short summary of cmfit (parameter estimates for periodic mortality curves) objects

Usage

1
2
## S3 method for class 'cmfit'
summary(object, date = FALSE, ...)

Arguments

object

a cmfit object

date

logical dictating whether peaks of high mortality are expressed as Dates

...

(not implemented)

Value

a list containing a short summary of the estimates for each parameter along with confidence intervals and AIC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Simulate data
T.morts1 <- simulate_cycloSurv(1000, period = 365, 
                             meanhazard = 0.3 / 365, 
                             peaks = c(0.25 * 365, 0.75 * 365), 
                             durations = c(0.3 * 365, 0.1 * 365), 
                             weights = c(0.7,0.3), 
                             plotme = FALSE)

# Estimate simulated data
fits <- fit_cyclomort(T.morts1, n.seasons = 2)
fits

# Plot results
plot(fits, nreps = 1000, monthlabs = TRUE)
# NB: `nreps` is for the bootstrap of the confidence interval 
# The default (5000) is slower but smoother

# Actual parameter values from simulated data
attributes(T.morts1)

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