Description Usage Arguments Value Further Details Examples
Generates the array necessary to estimate a repeat transactions model
1 | rtTimeMatrix(rt_df)
|
rt_df |
object of class 'rtdata': repeat transaction data.frame created by rtCreateTrans() |
matrix to be used on the right hand side of a repeat sales regression model
Time periods are calculated from the data provided.
1 2 3 4 5 6 7 8 9 10 11 12 | # Load data
data(ex_sales)
# With a raw transaction data.frame
rt_data <- rtCreateTrans(trans_df = ex_sales,
prop_id = 'pinx',
trans_id = 'sale_id',
price = 'sale_price',
periodicity = 'monthly',
date = 'sale_date')
# Create Matrix
rt_matrix <- rtTimeMatrix(rt_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.