1
$\begingroup$

First time poster and I apologize if the question seems basic but I have searched far and wide seeking the right answer but haven't come across it. Could even be a very basic yes/no. I am currently building a model for a project to predict churn in a f2p mobile game, meaning players can choose to spend money if they wish to advance quicker. My concern is I have a number of numeric variables that apply only to spending customers. For example "time until spend", "time since last spend", "standard deviation of purchases" and similar. Other spending variables such as "total spend", "average price" etc can be imputed as 0, but the former values cannot be.

The problem of course is that they aren't missing in the traditional way, rather they simply don't exist and are not possible for these customers. I do not wish to factor the variables as I believe they are more valuable in their numeric form. Is there a way to model this in R without having to build independent models for spenders and non spenders? I will most likely be using logistic regression and decision trees for my problem. Thanks for your help!

$\endgroup$

1 Answer 1

1
$\begingroup$

In regression, the standard way to handle this is to add a categorical predictor to the model that indicates, in your example, whether each customer chose to spend. That's nicely explained in at least two Cross Validated pages, here and here. For non-spenders in a regression analysis you can set the values of spending-related variables to 0 and get useful results, as the coefficients for spending-related variables will then only add to the model for customers who chose to spend.

I haven't thought through whether this approach will work for tree-based models. My first guess is that for trees you might need also to set up a separate set of categories to distinguish the non-spenders from the spenders who have a value of 0 for each spending-related predictor.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.