Time-based variables
Up until now, we have treated all of our variables as static, that is, they maintained their original values measured from the beginning of the measurement period.
In reality, values such as age and marital status change over time, and these changes can be accounted for by the model. In the marketing context, surveys might be administered after the study has begun. Based upon changes in some of these variables, coupons and other incentives might be offered (interventions) with the purpose of changing customer behavior. In the model, these interventions can also be accounted for.
In our example, we will introduce a hypothetical second survey, which was introduced 6 months into the measurement period and measured the effect of treating some of the unsatisfied customers.
Changing the data to reflect the second survey
The following code uses the survSplit
function to create a new record a time period 6 that will reflect the response to a second hypothetical customer survey administered...