bayesian_bass: Function to fit Bayesian Model

Description Usage Arguments Value Examples

View source: R/bayesian-bass-model.R

Description

Function to fit Bayesian Model

Usage

1
2
3
4
5
6
7
8
bayesian_bass(
  data,
  var,
  model,
  n_iter = 5000,
  n_thin = 50,
  plot_diagnostics = FALSE
)

Arguments

data

A data.frame with two columns, the first must be named jahr and contains time index, the second colum is named var and is a binary variable, representing

var

Column name of variable containing the dichotomous data of product adoption

model

Text string containing the Bayesian Model Specification

n_iter

Integer, number of iterations

plot_diagnostics

Wether to show diagnostic MCMC plots

introduction

Integer, if provided, the time column of data is rescaled to the date of market introduction

Value

An object of class bayesian_bass

Examples

1
2
3
data(adoption_data)
model <- bayesian_bass_model()
fit <- bayesian_bass(data = adoption_data, var = "adoption", model = model)

jnshsrs/bayesianbass documentation built on Jan. 11, 2021, 1:40 a.m.