# Installation
install.packages("devtools")
library(devtools)
install_github("opardo/dlmRStan")
# Load package
library(dlmRStan)
# Load data (Market Research)
data("dlmRStan3")
dataset <- dlmRStan3
formula <- awareness ~ .
# Fit model
model <- dlmRStan(
formula = formula,
dataset = dataset,
betas_range = c(0, 0.07),
intercept_range = c(30,50),
chains = 4,
iter = 1000,
warmup = 500
)
# Fitting validation
model$validation
# Show insights
model$insights$plots
# Parameters' errors
model$fit$parameters$beta_sd
model$fit$parameters$contribution_sd
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.