fit: Fit sBG Model

Description Usage Arguments Value

View source: R/sBGmodel.R

Description

fit fits a sBG model for CLV. It estimates the parameter alpha, beta, cp_alpha and cp_beta The model is evaluated by calculating the median and mean of the root mean-square error between the predicted and actual retention rate per cohort.

Usage

1
fit(df_data, cp_period = 0)

Arguments

df_data

a data frame must contain the columns 'cohort', 'period' and 'survived_customers'.

cp_period

a number which denotes the period after which any change in the behaviour is happening. If it is equal to 0, no change is happening. Default is set as 0. Example: If period one shows a different behaviour as the other periods, cp_period is set as 1.

Value

list with the following components: 'params' a list with estimated parameter, 'df_data' the data frame used for fitting.


runtastic/sBGmodel documentation built on Nov. 5, 2019, 4:21 a.m.