Homework 4: Binary Dependent Variable
Data
The data set includes a binary variable on whether people smoke (), and the following possible explanatory variables:
cigpric
: Cigarette price (in cents/pack)income
: Annual income:educ
Educationage
: Age in yearsrestaurn
: Binary variable for whether the state has a restaurant smoking restrictionwhite
: Binary variable for race equal to 1 when a person is white
The dataset should be stored in your Rstudio.cloud project files. You can open the dataset with the following call:
Directions
Estimate a regression predicting the probability that a person smokes depending on the above explanatory variables. Use the natural log of income rather than income among your explanatory variables, and the natural log of cigarette price rather than the cigarette price.
Type up your answers and submit to the appropriate Canvas assignment folder. Include in your answers (1) the code you used, (2) the output from the code, and (3) your written description of the interpretation of the output as appropriate to answer the question.
Problems
- What impact does an increase in the cost of cigarettes by 1% have on the probability that someone smokes? Construct a 95% confidence interval.
- Does imposing a ban on smoking in restaurants cause smoking prevalence to decrease? Test the appropriate hypothesis and construct and interpret a 95% confidence interval for the impact the smoking ban has on smoking prevalence.
- Suppose someone has an income equal to $6,500, has 16 years of education, is 45 years old, is white, and does not have a smoking ban in his state.What does the regression predict is the probability that the person smokes?
- Accounting for the other variables in the model, does race affect whether or not a person smokes? Test the appropriate hypothesis and construct and interpret a 95% confidence interval for the impact the smoking ban has on smoking prevalence.
-
Re-estimate the regression model with the following interaction terms:
restaurn
by (log)income
, andrestaurn
byage
.- Does the restaurant ban have differential effects depending on people’s income? Test the appropriate hypothesis. If so, describe the relationship.
- Does the restaurant ban have differential effects depending on people’s age? Test the appropriate hypothesis. If so, describe the relationship.
- With this model that includes interaction effects, test the hypothesis that the smoking ban influences the probability that a person smokes.
Submission
Upload your submission to the Canvas assignment folder titled, “Homework 4 - Binary Dependent Variable,” by Monday, April 8, 5:30 PM.
Include in your upload both the .html document and the .Rmd document.