Book Image

Data Analysis with STATA

Book Image

Data Analysis with STATA

Overview of this book

Table of Contents (16 chapters)
Data Analysis with Stata
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The logistic regression concept


Let's discuss some random data of rainfall from 2000 to 2011. In 2010, there was rainfall, and we have to find out about the probability of rainfall in 2011. So, logistic regression will predict whether the rainfall will happen or not, and OLS will predict the amount of rainfall in that year.

The data we'll look at in this example will tell us more about the dissimilarity between OLS and logistic regression. We will take the rainfall data for 2011 in this case.

To understand the exact difference between linear and logistic regression, let's see what happens if the data that has a binary outcome variable (event will happen = 1 and event will not happen = 0) is analyzed by leveraging linear regression. Let's take the dataset where you need to predict whether the fridge model will be sold above the cutoff or not. In this case, the dependent variable is called fridge_sales. This variable is created from the fridge_actual_sales variable, which is a continuous variable...