Skip to main content
added 1257 characters in body; edited tags; edited title
Source Link
Roland
  • 1.1k
  • 10
  • 19

Time series in cohorts Reusing predicted values as independent variables for new linear regression

Edit I've rephrased this question severely.

Suppose I have a fitness center, and instead of a monthly fee, the people are paying for courses they are taking. I've got the monthly total revenue of all participants who started in January, for seven months (up to July). I've also collected the monthly revenue generated by participants who started in februaryFebruary and from those who started in March, also up to July. These cohorts don't need to have the same size. The data looks like this:

        Jan     Feb     Mar     Apr     May     Jun     Jul 
Coh1    6970    9890    8610    7200    6270    4680    4860
Coh2    NA      5970    7850    6720    5720    5020    3680
Coh3    NA      NA      4350    5420    4570    4010    3460

Note that the data above is not tab-separated - the head and the NA have excessive tabs for a nicer display here.

I'd like to predict the revenue generated by the second cohort in August, and for the third cohort in August and September, assuming that their training habits over the time are the same as these of the first cohort.

What's a goodPlotting the first row ($x_{1, {\rm Jan}}, \dots, x_{1, {\rm Jun}}$) over the second (shifted by 1 to the left, $x_{2, {\rm Feb}}, \dots, x_{2, {\rm Jul}}$), and the third (shifted by 2 to the left) looks pretty linear, so linear regression seems to be suitable here.

Employing this shift, it seems reasonable to model $x_{2, {\rm Feb}}, \dots, x_{2, {\rm Jul}}$ as observations , and $x_{1, {\rm Jan}}, \dots, x_{1, {\rm Jun}}$ as independent variables to predict the augustAugust value offor Coh2? Since we have data on, $\hat x_{2, {\rm Aug}}= \beta_0 + \beta_1 x_{1, {\rm Jul}}$.

However, how does one proceed with the firstnext cohort? Intuitively, it seems like a simple time series doesn't seembetter idea to bepredict the right wayAugust values for Coh3 using the shifted values of Coh2 ($x_{2, {\rm Jan}}, \dots, x_{2, {\rm Jul}}$) than to look at this problemgo back to the less recent observations of Coh1 ($x_{1, {\rm Jan}}, \dots, x_{1, {\rm Jun}}$). AlsoWhile I am fine with estimating $\hat x_{3,{\rm Aug}}$ by plugging $x_{2, {\rm Jul}}$ into its corresponding equation, I am really reluctant to use $\hat x_{2,{\rm Aug}}$ to get $\hat x_{3,{\rm Sep}}$ - since I'd appreciate hints for better tagsuse a prediction (which has errors) to predict something else. Doesn't this create even more errors?

TL; DR: What happens when I use a prediction instead of an actually measured value to get a prediction?

Time series in cohorts

Suppose I have a fitness center, and instead of a monthly fee, the people are paying for courses they are taking. I've got the monthly total revenue of all participants who started in January, for seven months (up to July). I've also collected the monthly revenue generated by participants who started in february, also up to July. These cohorts don't need to have the same size. The data looks like this:

        Jan     Feb     Mar     Apr     May     Jun     Jul 
Coh1    6970    9890    8610    7200    6270    4680    4860
Coh2    NA      5970    7850    6720    5720    5020    3680

Note that the data above is not tab-separated - the head and the NA have excessive tabs for a nicer display here.

I'd like to predict the revenue generated by the second cohort in August, assuming that their training habits over the time are the same as these of the first cohort.

What's a good model to predict the august value of Coh2? Since we have data on the first cohort, a simple time series doesn't seem to be the right way to look at this problem. Also, I'd appreciate hints for better tags.

Reusing predicted values as independent variables for new linear regression

Edit I've rephrased this question severely.

Suppose I have a fitness center, and instead of a monthly fee, the people are paying for courses they are taking. I've got the monthly total revenue of all participants who started in January, for seven months (up to July). I've also collected the monthly revenue generated by participants who started in February and from those who started in March, also up to July. These cohorts don't need to have the same size. The data looks like this:

        Jan     Feb     Mar     Apr     May     Jun     Jul 
Coh1    6970    9890    8610    7200    6270    4680    4860
Coh2    NA      5970    7850    6720    5720    5020    3680
Coh3    NA      NA      4350    5420    4570    4010    3460

Note that the data above is not tab-separated - the head and the NA have excessive tabs for a nicer display here.

I'd like to predict the revenue generated by the second cohort in August, and for the third cohort in August and September, assuming that their training habits over the time are the same as these of the first cohort.

Plotting the first row ($x_{1, {\rm Jan}}, \dots, x_{1, {\rm Jun}}$) over the second (shifted by 1 to the left, $x_{2, {\rm Feb}}, \dots, x_{2, {\rm Jul}}$), and the third (shifted by 2 to the left) looks pretty linear, so linear regression seems to be suitable here.

Employing this shift, it seems reasonable to model $x_{2, {\rm Feb}}, \dots, x_{2, {\rm Jul}}$ as observations , and $x_{1, {\rm Jan}}, \dots, x_{1, {\rm Jun}}$ as independent variables to predict the August value for Coh2, $\hat x_{2, {\rm Aug}}= \beta_0 + \beta_1 x_{1, {\rm Jul}}$.

However, how does one proceed with the next cohort? Intuitively, it seems like a better idea to predict the August values for Coh3 using the shifted values of Coh2 ($x_{2, {\rm Jan}}, \dots, x_{2, {\rm Jul}}$) than to go back to the less recent observations of Coh1 ($x_{1, {\rm Jan}}, \dots, x_{1, {\rm Jun}}$). While I am fine with estimating $\hat x_{3,{\rm Aug}}$ by plugging $x_{2, {\rm Jul}}$ into its corresponding equation, I am really reluctant to use $\hat x_{2,{\rm Aug}}$ to get $\hat x_{3,{\rm Sep}}$ - since I'd use a prediction (which has errors) to predict something else. Doesn't this create even more errors?

TL; DR: What happens when I use a prediction instead of an actually measured value to get a prediction?

Source Link
Roland
  • 1.1k
  • 10
  • 19

Time series in cohorts

Suppose I have a fitness center, and instead of a monthly fee, the people are paying for courses they are taking. I've got the monthly total revenue of all participants who started in January, for seven months (up to July). I've also collected the monthly revenue generated by participants who started in february, also up to July. These cohorts don't need to have the same size. The data looks like this:

        Jan     Feb     Mar     Apr     May     Jun     Jul 
Coh1    6970    9890    8610    7200    6270    4680    4860
Coh2    NA      5970    7850    6720    5720    5020    3680

Note that the data above is not tab-separated - the head and the NA have excessive tabs for a nicer display here.

I'd like to predict the revenue generated by the second cohort in August, assuming that their training habits over the time are the same as these of the first cohort.

What's a good model to predict the august value of Coh2? Since we have data on the first cohort, a simple time series doesn't seem to be the right way to look at this problem. Also, I'd appreciate hints for better tags.