Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

drownings

Deaths by drowning in Finland in 1969-2014


Description

Dataset containing number of deaths by drowning in Finland in 1969-2014, yearly average summer temperatures (June to August) and corresponding population sizes (in hundreds of thousands).

Format

A time series object containing 46 observations.

Source

Examples

data("drownings")
model <- bsm_ng(drownings[, "deaths"], u = drownings[, "population"],
  xreg = drownings[, "summer_temp"], distribution = "poisson", 
  beta = normal(0, 0, 1),
  sd_level = gamma(0.1,2, 10), sd_slope = gamma(0, 2, 10))
  
fit <- run_mcmc(model, iter = 5000, 
  output_type = "summary", mcmc_type = "approx")
fit
ts.plot(model$y/model$u, exp(fit$alphahat[, 1]), col = 1:2)

bssm

Bayesian Inference of Non-Linear and Non-Gaussian State Space Models

v1.1.4
GPL (>= 2)
Authors
Jouni Helske [aut, cre] (<https://orcid.org/0000-0001-7130-793X>), Matti Vihola [aut] (<https://orcid.org/0000-0002-8041-7222>)
Initial release
2021-04-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.