stan_p_spline: Bayesian p-spline model using stan

View source: R/stan_p_spline.R

stan_p_splineR Documentation

Bayesian p-spline model using stan

Description

Bayesian p-spline model using stan

Usage

stan_p_spline(
  X,
  Y,
  N,
  target_dist_between_knots = 5,
  spline_degree = 3,
  iter = 20000,
  warmup = 1000,
  cores = 1,
  chains = 4
)

Arguments

X

date vector.

Y

Numeric vector of number of positive samples

N

Numeric vector of total number of samples

spline_degree

sets the degree of the splines (default = 3)

target_distance_between_knots

sets the number of days between adjacent knots (default = 5)

...

Arguments passed to rstan::sampling (iter, warmup).

Value

An object of class stanfit returned by rstan::sampling

Convert date to numeric Load and run stan model


mrc-ide/reactidd documentation built on May 12, 2024, 11:47 a.m.