Bayesian model for fitting a linear normal model to data.
b_linear( x, y, s, priors =NULL, warmup =1000, iter =2000, chains =4, seed =NULL, refresh =NULL, control =NULL, suppress_warnings =TRUE)
Arguments
x: a vector containing sequence indexes (time).
y: a vector containing responses of subjects.
s: a vector containing subject indexes. Starting index should be 1 and the largest subject index should equal the number of subjects.
priors: List of parameters and their priors - b_prior objects. You can put a prior on the mu_a (mean intercept), sigma_a (variance of mu_a), mu_b (mean slope), sigma_s (variance of mu_b), mu_s (variance) and sigma_s (variance of mu_s) parameters (default = NULL).
warmup: Integer specifying the number of warmup iterations per chain (default = 1000).
iter: Integer specifying the number of iterations (including warmup, default = 2000).
chains: Integer specifying the number of parallel chains (default = 4).
seed: Random number generator seed (default = NULL).
refresh: Frequency of output (default = NULL).
control: A named list of parameters to control the sampler's behavior (default = NULL).
suppress_warnings: Suppress warnings returned by Stan (default = TRUE).