Question: How can I Use R code to solve this . The Mailing Experiment Tayko has supplied its customer list of 2 0 0 , 0
How can I Use R code to solve this
The Mailing Experiment
Taykohas supplied its customer list of names to the pool, which totals over million names, so it is now entitled to draw names for a mailing.Taykowould like to select the names that have the best chance of performing well, so it first conducts atest prior to withdrawing its full allotment of names itdraws names from the pool and does a test mailing of the new catalog.
This mailing yielded purchasers, a response rate of or To optimize the performance of the data mining techniques, it was decided to work with a stratified sample that contained equal numbers of purchasers andnonpurchasers For ease of presentation, the dataset for this case includes just purchasers and nonpurchasers an apparent response rate of or Therefore, after using the dataset to predict who will be a purchaser, we must adjust the purchase rate back down by multiplying each case's probability of purchase by or
Data
There are two response variables in this case.Purchase indicates whether or not a prospect responded to the test mailing and purchased something.Spendingindicates for those who made a purchase, how much they spent.
The overall procedure in this case will be to develop two models. The first model will be used to classify records as Purchase or No purchase. This model will be used to identify the most likely purchasers in the consortiums database. The second model will be used for those cases that are classified as having made a purchaseand will predict the amount purchasers spend. By identifying the most likely responders and the highest spenders Tayko hopes to identify names from the consortiums pool that will increase profit above a random draw of names.
Table in the textbook provides a description of the variables in the Tayko dataset.
A catalog costs $ to mail, has response rate of or and the average spend you can determine based on purchasers in a test database. How do I estimate the gross profit that a company could expect from the remaining names if selected them randomly from the pool, using R Studio?
Assignment Details
Each catalog costs $ to mail including printing, postage, and mailing costs
a Based on this cost, the response rate from the test, and the average spend you can determine based on the purchasers in the dataset, estimate the gross profit that the firm could expect from the remaining names if it selected them randomly from the pool.
The first model you will develop is a model for classifying a customer as a purchaser ornonpurchaser This will identify the most likely responders to a mailing.
a Partition the data randomly into a training set recordsvalidation set records andtest set records
bRun a logistic regression model on the training set using backward elimination to select the best subset of variables. Exclude Spending as it is a dependent variable.
c Assess your model results by using confusion matrices for the training and validation data, and the decile lift chart on the validation data. Do you feel this is an adequate model to move forward? Support your assessment with specific accuracy and lift information.
The second model you will develop is a model for predicting spending among the purchasers. This will identify the highest spenders.
a Create a vector of IDs for only the purchaser records Purchase
b Partition this dataset into the training and validations records. Use the same trainingvalidation labels from the earlier partitioning; one way is to use function intersect to find IDs of purchasers in the original partitions
cDevelop models for predicting spending, using:
iMultiple linear regression using backward selection
iiRegression trees with default parameters which will prune tree
d Choose one model on the basis of its performance on the validation data. What is
your rationale for choosing the model you chose?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
