Option #1: Predicting Behavior with Logistic Regression Customer churn occurs when customers stop doing business with a company. Retaining existing customers is less expensive than it is to acquire...

1 answer below »
Option #1:Predicting Behavior with Logistic Regression


Customer churn occurs when customers stop doing business with a company. Retaining existing customers is less expensive than it is to acquire new customers and hence, building a good predictive model for customer churn is of importance to many companies. Download thedatasetTelco.customer.csv.Through this dataset, we attempt to predict behavior to retain customers using logistic regression.


Follow the steps below and create a PowerPoint presentation.



  1. Using R, partition the dataset into training and testing sets by using the code:
    (YOURDATA is the name of your dataset in R.)

    intrain- createDataPartition(YOURDATA$Churn,p=0.7,list=FALSE)


    set.seed(2017)


    training- YOURDATA[intrain,]


    testing- YOURDATA[-intrain,]



  2. Fit a logistic regression model by using the code:

    glm(Churn ~ .,family=binomial(link="logit"),data=training)



  3. Examine the resulting fitted model. What are the significant factors that affect customer churn? Explain how and why they are significant.


  4. Now, let's examine how the model fits using the following code.



    testing$Churn - as.character(testing$Churn)


    testing$Churn[testing$Churn=="No"] - "0"


    testing$Churn[testing$Churn=="Yes"] - "1"


    fitted.results - predict(LogModel,newdata=testing,type='response')


    fitted.results - ifelse(fitted.results 0.5,1,0)


    misClasificError - mean(fitted.results != testing$Churn)


    print(paste('Logistic Regression Accuracy',1-misClasificError))

    This provides the accuracy of the model.




  1. How can you make a customer churn prediction from the model you fitted? Explain. Although it is not required, the actual calculation may help your understanding.


Provide the output from each set of code and your answer and/solution to the questions in an MS PowerPoint presentation. Your presentations should have 8-12 slides. Every slide must contain a "Notes Section" with full explanation of the slide's content.


Follow APA format, according toCSU Global Writing Center(Links to an external site.). Include a title slide and a slide citing references. These 2 slides are in addition to the 8 -12 used in the presentation. Cite at least one outside academic source other than the textbook, course materials, or other information provided as part of the course materials.


For help with constructing an effective presentation, see thevisual presentations page(Links to an external site.)in the CSU Global Writing Center. Submit either the PowerPoint file or a Word document containing the link to your online presentation.

Answered 1 days AfterApr 16, 2021

Answer To: Option #1: Predicting Behavior with Logistic Regression Customer churn occurs when customers stop...

Subhanbasha answered on Apr 18 2021
143 Votes
Churn AnalysiS
Churn AnalysiS
Here we are doing the Churn analysis by using the logistic regression
Reading data and s
plitting the data
Here we have the data in the excel and we used the read.csv() function in R to read the data into R.
And next will be the splitting the data into two parts that is train and test
The main objective of the splitting the data is to know the model performance .
Training and Testing set
We are used the function createDataPartition() to split the data into train and test.
Here we are taken the data as 70% for training set and remaining 30% for testing set.
We are going to build a model on training data set and predictions on testing data set.
The code of splitting data as follows
Splitting data and making the logistic model
Code for splitting data as follows
training <- data[intrain,]
testing <- data[-intrain,]
After splitting the data we have created a model for the given data using as binomial model
Output of the Model
Now we need to see the out put from the model that is summary of the Logistic regression
And also we will see the table of co efficient and the p value table of the each variable then only we can get to know the which variable is...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here