stan_reg: Time-series regression with stan

Description Usage Arguments Value

View source: R/stan-bsts.R

Description

Time-series regression with stan

Usage

1
2
3
4
stan_reg(forms, data, family = "normal", priors, inv_links = NULL,
  autocorr = no_autocorr, algorithm = "sampling",
  na.action = keanu::na.warn, ..., predvars = NULL, contrasts = NULL,
  xlev = NULL)

Arguments

forms

A list of formulas. The first should have both LHS and RHS, the rest just RHS. The list should be named, with each name being an argument to the stan function named by the family argument.

data

A data.frame

family

A character string name a stan family.

priors

A named list, with each name being an argument to the stan function named by the family argument, and with each element being a character string specifying a prior in stan (e.g., 'lognormal(0,1)')

inv_links

A named list, with each name being an argument to the stan function named by the family argument, and with each element being a character string specifying an inverse-link function.

autocorr

The autocorrelation to model. Currently must either be output of no_autocorr or kalman_filter.

algorithm

Method for inference. Defaults to 'sampling', which calls rstan::sampling. Can also be 'meanfield' and 'fullrank' for rstan::vb.

na.action

What should be done with NAs?

...

Further arguments to be passed to rstan::sampling or rstan::vb

predvars

For the update method, no need to specify manually.

contrasts

For the update method, no need to specify manually.

xlev

For the update method, no need to specify manually.

Value

An object of class stan_reg


strongio/stronger documentation built on Sept. 15, 2017, 3:54 p.m.