Description Usage Arguments Value Examples
Creates a bayesian model using rstan.
1 2 | bayesmodel(data, y, variables, observations = NULL, cores = 4,
chains = 4, adstock_range = c(0.1, 0.7), chainlength = 2000)
|
data |
A data frame containing a column of observations (labelled "date"), an optional column of pool names (labelled "poolname"), the dependent variable, and indepedendent variables. |
y |
A string identifying the dependent variable. |
variables |
a data frame (optionally created by the
|
observations |
an optional string vector of observation names, e.g. c("2014-01-01", "2014-01-08", ...). Default NULL |
cores |
The number of cores to be used for the markov chain estimation. Default 4. |
the Stan model
a data frame of untransformed MAP estimates
the generated Stan code
the scaling factors used for standardisation
the y vector
the x data frame
the priors (if any)
the observation names (if any)
1 | model <- bayesmodel(dep, indeps, priors, observations=obs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.