# bgnbd.PlotTransactionRateHeterogeneity: BG/NBD Plot Transaction Rate Heterogeneity In BTYD: Implementing BTYD Models with the Log Sum Exp Patch

## Description

Plots and returns the estimated gamma distribution of lambda (customers' propensities to purchase).

## Usage

 `1` ```bgnbd.PlotTransactionRateHeterogeneity(params, lim = NULL) ```

## Arguments

 `params` BG/NBD parameters - a vector with r, alpha, a, and b, in that order. r and alpha are unobserved parameters for the NBD transaction process. a and b are unobserved parameters for the Beta geometric dropout process. `lim` upper-bound of the x-axis. A number is chosen by the function if none is provided.

## Details

This returns the distribution of each customer's Poisson parameter, which determines the rate at which each customer buys.

## Value

Distribution of customers' propensities to purchase.

## Examples

 ```1 2 3 4``` ```params <- c(0.243, 4.414, 0.793, 2.426) bgnbd.PlotTransactionRateHeterogeneity(params) params <- c(0.53, 4.414, 0.793, 2.426) bgnbd.PlotTransactionRateHeterogeneity(params) ```

### Example output

```Loading required package: hypergeo
[,1]         [,2]        [,3]       [,4]       [,5]       [,6]
x.axis.ticks     0  0.005499636  0.01099927 0.01649891 0.02199854 0.02749818
heterogeneity  Inf 19.244194316 11.11417824 7.98056437 6.26487358 5.16426789
[,7]       [,8]       [,9]      [,10]      [,11]    [,12]
x.axis.ticks  0.03299782 0.03849745 0.04399709 0.04949672 0.05499636 0.060496
heterogeneity 4.39062039 3.81333097 3.36404602 3.00328674 2.70654785 2.457756
[,13]      [,14]     [,15]      [,16]      [,17]      [,18]
x.axis.ticks  0.06599563 0.07149527 0.0769949 0.08249454 0.08799418 0.09349381
heterogeneity 2.24589872 2.06315845 1.9038210 1.76360483 1.63923367 1.52815424
[,19]     [,20]     [,21]     [,22]    [,23]     [,24]
x.axis.ticks  0.09899345 0.1044931 0.1099927 0.1154924 0.120992 0.1264916
heterogeneity 1.42834483 1.3381821 1.2563461 1.1817520 1.113499 1.0508314
[,25]     [,26]     [,27]     [,28]     [,29]     [,30]
x.axis.ticks  0.1319913 0.1374909 0.1429905 0.1484902 0.1539898 0.1594894
heterogeneity 0.9931125 0.9397992 0.8904267 0.8445939 0.8019532 0.7622013
[,31]     [,32]     [,33]     [,34]     [,35]     [,36]
x.axis.ticks  0.1649891 0.1704887 0.1759884 0.1814880 0.1869876 0.1924873
heterogeneity 0.7250727 0.6903333 0.6577766 0.6272191 0.5984972 0.5714648
[,37]     [,38]     [,39]     [,40]     [,41]     [,42]
x.axis.ticks  0.1979869 0.2034865 0.2089862 0.2144858 0.2199854 0.2254851
heterogeneity 0.5459908 0.5219572 0.4992577 0.4777959 0.4574843 0.4382436
[,43]     [,44]     [,45]     [,46]     [,47]     [,48]
x.axis.ticks  0.2309847 0.2364843 0.2419840 0.2474836 0.2529833 0.2584829
heterogeneity 0.4200012 0.4026911 0.3862525 0.3706299 0.3557721 0.3416323
[,49]     [,50]     [,51]     [,52]     [,53]     [,54]
x.axis.ticks  0.2639825 0.2694822 0.2749818 0.2804814 0.2859811 0.2914807
heterogeneity 0.3281668 0.3153357 0.3031019 0.2914309 0.2802909 0.2696523
[,55]     [,56]     [,57]     [,58]     [,59]     [,60]
x.axis.ticks  0.2969803 0.3024800 0.3079796 0.3134793 0.3189789 0.3244785
heterogeneity 0.2594873 0.2497704 0.2404776 0.2315864 0.2230759 0.2149265
[,61]     [,62]     [,63]     [,64]     [,65]     [,66]
x.axis.ticks  0.3299782 0.3354778 0.3409774 0.3464771 0.3519767 0.3574763
heterogeneity 0.2071199 0.1996388 0.1924671 0.1855895 0.1789919 0.1726607
[,67]     [,68]     [,69]     [,70]     [,71]     [,72]
x.axis.ticks  0.3629760 0.3684756 0.3739752 0.3794749 0.3849745 0.3904742
heterogeneity 0.1665833 0.1607478 0.1551428 0.1497578 0.1445827 0.1396080
[,73]     [,74]     [,75]     [,76]     [,77]     [,78]
x.axis.ticks  0.3959738 0.4014734 0.4069731 0.4124727 0.4179723 0.4234720
heterogeneity 0.1348247 0.1302243 0.1257988 0.1215404 0.1174421 0.1134967
[,79]     [,80]     [,81]     [,82]      [,83]      [,84]
x.axis.ticks  0.4289716 0.4344712 0.4399709 0.4454705 0.45097015 0.45646979
heterogeneity 0.1096980 0.1060395 0.1025155 0.0991204 0.09584874 0.09269552
[,85]      [,86]      [,87]      [,88]     [,89]      [,90]
x.axis.ticks  0.46196942 0.46746906 0.47296870 0.47846833 0.4839680 0.48946760
heterogeneity 0.08965588 0.08672521 0.08389914 0.08117347 0.0785442 0.07600753
[,91]      [,92]      [,93]      [,94]      [,95]      [,96]
x.axis.ticks  0.49496724 0.50046688 0.50596651 0.51146615 0.51696578 0.52246542
heterogeneity 0.07355981 0.07119757 0.06891749 0.06671639 0.06459125 0.06253916
[,97]      [,98]      [,99]     [,100]
x.axis.ticks  0.52796506 0.53346469 0.53896433 0.54446396
heterogeneity 0.06055734 0.05864315 0.05679403 0.05500755
[,1]         [,2]       [,3]       [,4]       [,5]       [,6]
x.axis.ticks     0  0.007795883 0.01559177 0.02338765 0.03118353 0.03897941
heterogeneity  Inf 12.408358913 8.65537185 6.91159561 5.83327694 5.07481682
[,7]       [,8]       [,9]      [,10]      [,11]      [,12]
x.axis.ticks  0.0467753 0.05457118 0.06236706 0.07016294 0.07795883 0.08575471
heterogeneity 4.5004990 4.04437258 3.66986783 3.35478135 3.08470531 2.84980143
[,13]     [,14]     [,15]     [,16]     [,17]    [,18]
x.axis.ticks  0.09355059 0.1013465 0.1091424 0.1169382 0.1247341 0.132530
heterogeneity 2.64307482 2.4593863 2.2948560 2.1464867 2.0119175 1.889257
[,19]     [,20]     [,21]     [,22]     [,23]     [,24]
x.axis.ticks  0.1403259 0.1481218 0.1559177 0.1637135 0.1715094 0.1793053
heterogeneity 1.7769674 1.6737817 1.5786447 1.4906679 1.4090967 1.3332846
[,25]     [,26]     [,27]     [,28]     [,29]     [,30]
x.axis.ticks  0.1871012 0.1948971 0.2026929 0.2104888 0.2182847 0.2260806
heterogeneity 1.2626737 1.1967794 1.1351779 1.0774966 1.0234063 0.9726146
[,31]     [,32]     [,33]     [,34]    [,35]     [,36]
x.axis.ticks  0.2338765 0.2416724 0.2494682 0.2572641 0.265060 0.2728559
heterogeneity 0.9248607 0.8799111 0.8375559 0.7976056 0.759889 0.7242504
[,37]     [,38]     [,39]     [,40]     [,41]     [,42]
x.axis.ticks  0.2806518 0.2884477 0.2962435 0.3040394 0.3118353 0.3196312
heterogeneity 0.6905482 0.6586533 0.6284473 0.5998218 0.5726772 0.5469218
[,43]     [,44]     [,45]     [,46]     [,47]     [,48]
x.axis.ticks  0.3274271 0.3352229 0.3430188 0.3508147 0.3586106 0.3664065
heterogeneity 0.5224707 0.4992458 0.4771746 0.4561899 0.4362293 0.4172348
[,49]     [,50]     [,51]     [,52]     [,53]     [,54]
x.axis.ticks  0.3742024 0.3819982 0.3897941 0.3975900 0.4053859 0.4131818
heterogeneity 0.3991523 0.3819313 0.3655250 0.3498891 0.3349827 0.3207670
[,55]     [,56]     [,57]     [,58]     [,59]     [,60]
x.axis.ticks  0.4209777 0.4287735 0.4365694 0.4443653 0.4521612 0.4599571
heterogeneity 0.3072061 0.2942659 0.2819145 0.2701221 0.2588604 0.2481029
[,61]     [,62]     [,63]     [,64]     [,65]     [,66]
x.axis.ticks  0.4677530 0.4755488 0.4833447 0.4911406 0.4989365 0.5067324
heterogeneity 0.2378245 0.2280018 0.2186123 0.2096352 0.2010505 0.1928395
[,67]     [,68]     [,69]     [,70]     [,71]     [,72]
x.axis.ticks  0.5145282 0.5223241 0.5301200 0.5379159 0.5457118 0.5535077
heterogeneity 0.1849844 0.1774684 0.1702756 0.1633910 0.1568002 0.1504896
[,73]     [,74]     [,75]     [,76]     [,77]     [,78]
x.axis.ticks  0.5613035 0.5690994 0.5768953 0.5846912 0.5924871 0.6002830
heterogeneity 0.1444466 0.1386587 0.1331146 0.1278030 0.1227137 0.1178366
[,79]     [,80]     [,81]     [,82]      [,83]     [,84]
x.axis.ticks  0.6080788 0.6158747 0.6236706 0.6314665 0.63926237 0.6470582
heterogeneity 0.1131624 0.1086819 0.1043867 0.1002686 0.09631986 0.0925331
[,85]      [,86]      [,87]      [,88]      [,89]      [,90]
x.axis.ticks  0.65485413 0.66265001 0.67044590 0.67824178 0.68603766 0.69383354
heterogeneity 0.08890129 0.08541771 0.08207597 0.07886998 0.07579392 0.07284226
[,91]      [,92]      [,93]      [,94]      [,95]      [,96]
x.axis.ticks  0.7016294 0.70942531 0.71722119 0.72501707 0.73281296 0.74060884
heterogeneity 0.0700097 0.06729119 0.06468192 0.06217727 0.05977286 0.05746448
[,97]      [,98]      [,99]     [,100]
x.axis.ticks  0.74840472 0.75620061 0.76399649 0.77179237
heterogeneity 0.05524813 0.05311997 0.05107634 0.04911374
```

BTYD documentation built on Nov. 18, 2021, 1:10 a.m.