If market opt-out is happening due to contacts through campaigns I am relatively new to statistical analysis. I have a scenario. There are various campaigns through which the customers are contacted. Only customers with their marketing preference as 'Yes' are being contacted for any offers through campaigns. There are some cases where a customer is opting out of marketing preference within 2-3 weeks after being contacted. I want to analyse if this is actually true or it is just by chance.
The dataset set has these columns and other customer attributes specific columns. There are around 150K rows-
id, marketing_preference, marketing_preference_updated_date, last_contacted_date_through_campaign
It would be great if anyone could give an approach to analyse this.
 A: The theory is that the contact is causing the customers to request not to be contacted.  In order to examine if customers are requesting not to be contacted by chance or because of the contact, you would need two cohorts: a set of customers which have you have contacted with the campaign, and a set of customers you have not contacted.
From the time the campaign is sent out, you would need to measure time to requesting not to be contacted.  Not all customers who are contacted will make the request, and not all those who would make the request will make it within your study period.  This means your data will be censored, making survival analysis an useful tool.
You should fit a cox proportional hazards model to your data, adjusting for if the customer was contacted or not along with any customer demographics (e.g. age, income, etc).  Because none of these demographic factors effect if the customer is contacted or not, you should be able to interpret the coefficient of your model as the causal effect of contact on requesting not to be contacted.
This would be best analyzed as an AB test with randomization to each arm (contacted/not contacted).  I'm not sure if your dataset is appropriate to analyze this question since I do not know how it was created, or if people were randomized to a contact/no contact arm.
