Calculates the probability of a customer being alive at the end of the calibration period, based on a customer's past transaction behavior and the BG/NBD model parameters.

`bgnbd_nocov_PAlive`

P(alive) for the BG/NBD model without covariates`bgnbd_staticcov_PAlive`

P(alive) for the BG/NBD model with static covariates

bgnbd_nocov_PAlive(r, alpha, a, b, vX, vT_x, vT_cal) bgnbd_staticcov_PAlive( r, alpha, a, b, vX, vT_x, vT_cal, vCovParams_trans, vCovParams_life, mCov_trans, mCov_life )

r | shape parameter of the Gamma distribution of the purchase process |
---|---|

alpha | scale parameter of the Gamma distribution of the purchase process |

a | shape parameter of the Beta distribution of the lifetime process |

b | shape parameter of the Beta distribution of the lifetime process |

vX | Frequency vector of length n counting the numbers of purchases. |

vT_x | Recency vector of length n. |

vT_cal | Vector of length n indicating the total number of periods of observation. |

vCovParams_trans | Vector of estimated parameters for the transaction covariates. |

vCovParams_life | Vector of estimated parameters for the lifetime covariates. |

mCov_trans | Matrix containing the covariates data affecting the transaction process. One column for each covariate. |

mCov_life | Matrix containing the covariates data affecting the lifetime process. One column for each covariate. |

Returns a vector with the PAlive for each customer.

`mCov_trans`

is a matrix containing the covariates data of
the time-invariant covariates that affect the transaction process.
Each column represents a different covariate. For every column a gamma parameter
needs to added to `vCovParams_trans`

at the respective position.

`mCov_life`

is a matrix containing the covariates data of
the time-invariant covariates that affect the lifetime process.
Each column represents a different covariate. For every column a gamma parameter
needs to added to `vCovParams_life`

at the respective position.

Fader PS, Hardie BGS, Lee, KL (2005). ““Counting Your Customers” the Easy Way: An Alternative to the Pareto/NBD Model” Marketing Science, 24(2), 275–284.

Fader PS, Hardie BGS (2013). “Overcoming the BG/NBD Model’s #NUM! Error Problem” URL http://brucehardie.com/notes/027/bgnbd_num_error.pdf.

Fader PS, Hardie BGS (2007). “Incorporating time-invariant covariates into the Pareto/NBD and BG/NBD models.” URL http://www.brucehardie.com/notes/019/time_invariant_covariates.pdf.