amomoStan: A bayesian version of the A-MOMO algorithm

Description Usage Arguments Value

Description

Fits a Serfling -type model to a mortality time series by omiting summer and winter seasons from the estimation, and making predictions for the whole time span of the data. This version does not include delay adjustments

Usage

1
2
3
amomoStan(data, spring = 16:25, autumn = 31:47, datevar = "date",
  mortvar = "n", popvar = NA, byvar = NA, iter = 2000,
  penalties = NULL, data.only = FALSE)

Arguments

data

a data frame with all necessary variables

spring

numbers of the weeks defining Spring (use 1:53 to use all weeks)

autumn

numbers of the weeks defining Autumn (use 1:53 to use all weeks)

datevar

name of the variable containing the date of the observation (preferrably the date of the Monday)

mortvar

name of the variable containing the number of deaths

popvar

(optionally) the name of the variable containing the population denominator

byvar

(optionally) the name of the variable by which groups the analysis is done

iter

number of iterations

penalties

control the shrinkage between

data.only

if TRUE just collect all the data together and don't fit

Value

stan fit object


thl-mjv/momoStan documentation built on May 3, 2019, 2:57 p.m.