bgbb.EstimateParameters {BTYD} R Documentation

## BG/BB Parameter estimation

### Description

Estimates parameters for the BG/BB model.

### Usage

```bgbb.EstimateParameters(
rf.matrix,
par.start = c(1, 1, 1, 1),
max.param.value = 1000
)
```

### Arguments

 `rf.matrix` recency-frequency matrix. It must contain columns for frequency ("x"), recency ("t.x"), number of transaction opportunities in the calibration period ("n.cal"), and the number of customers with this combination of recency, frequency and transaction opportunities in the calibration period ("custs"). Note that recency must be the time between the start of the calibration period and the customer's last transaction, not the time between the customer's last transaction and the end of the calibration period. `par.start` initial BG/BB parameters - a vector with alpha, beta, gamma, and delta, in that order. Alpha and beta are unobserved parameters for the beta-Bernoulli transaction process. Gamma and delta are unobserved parameters for the beta-geometric dropout process. `max.param.value` the upper bound on parameters.

### Details

The best-fitting parameters are determined using the `bgbb.rf.matrix.LL` function. The sum of the log-likelihood for each customer (for a set of parameters) is maximized in order to estimate paramaters.

A set of starting parameters must be provided for this method. If no parameters are provided, (1,1,1,1) is used as a default. It may be useful to use starting values for parameters that represent your best guess of the heterogeneity in the transaction and dropout rates of customers. It may be necessary to run the estimation from multiple starting points to ensure that it converges. To compare the log-likelihoods of different parameters, use `bgbb.rf.matrix.LL`.

The lower bound on the parameters to be estimated is always zero, since BG/BB parameters cannot be negative. The upper bound can be set with the max.param.value parameter.

### Value

Vector of estimated paramaters.

`bgbb.rf.matrix.LL`

### Examples

```data(donationsSummary)

rf.matrix <- donationsSummary\$rf.matrix
# donationsSummary\$rf.matrix already has appropriate column names

# starting-point parameters
startingparams <- c(1, 1, 0.5, 3)
# estimated parameters
est.params <- bgbb.EstimateParameters(rf.matrix, startingparams)
# log-likelihood of estimated parameters
bgbb.rf.matrix.LL(est.params, rf.matrix)
```

[Package BTYD version 2.4.3 Index]