Binary Dependent Variables

Description

Please read instructions in the word file, all work should be submitted on word file. please don’t use Chatgpt pr any AI language. if required, use STATA.

Don't use plagiarized sources. Get Your Custom Assignment on
Binary Dependent Variables
From as Little as $13/Page

Unformatted Attachment Preview

Special Notes Related to All Problem Sets:
A) Please type what you can.
B) All math problems do not have to be typed, but please write very clear and explain all
derivations.
Submission: A hard copy in class
Part I
1. Complete reading SW, Chapters 11-12.
Part II
1. Explain in your own words the meaning of internal and external validity. Be specific.
2. What are the main threats to internal validity? Explain in your own words. Describe the
conditions under which the estimator of  is biased. Explain and show your derivations.
2. Provide an example of a real-world problem where you need to use a binary dependent
variable model to solve it. Explain your example, why you chose it and the way you
would solve it.
3. Given the data below (consisting of 20 observations of the dependent variable Y and the
independent variable X),
(A) estimate a probit model and test the hypothesis that X is not influential in determining
the probability that y=1.
(B) Repeat the estimation with a Logit model.
(C) Compare (in a table) your results for these two estimators. (Recall: compare the
slopes, also called marginal effects, and not just the estimated coefficients; and remember
to have a constant term – intercept – in your models.) Discuss and Explain.
The Data:
y = {10100111010001001011}
x = {72531689131212323345}
Note: Remember to use an intercept.
Part III
Case Study: Smoking Ban in the Workplace
For quite a while, public concern about “second-hand” smoke has led to smoking bans in many
US workplaces. In some cases, smoking bans are determined by local ordinance that covers
indoor workplaces over a certain size, sometimes with exemptions such as for bars or restaurants.
In other cases, smoking bans are voluntarily adopted by individual businesses (these voluntary
bans were the main type of ban during the time period of the data for this problem set).
It has been hypothesized that workplace smoking bans induce smokers to quit by
reducing their opportunities to smoke. In this assignment you will estimate the effect of
workplace smoking bans on smoking. To do this you will use data on a sample of 10,000 US
indoor workers in 1991-1993. The data set contains information on whether individuals were, or
were not, subject to a workplace smoking ban, whether or not the individuals smoked, and other
individual characteristics. The data set (Econ_623_PS6_Fall_2023(Smoking).xlsx) is posted on
Canvas.
1. (a) Calculate the frequency of smoking for
(i)
all workers (the full sample)
(ii)
workers affected by workplace smoking bans
(iii) workers not affected by workplace smoking bans
Note: In above questions you just need to look at the sample’s “frequencies”.
b) What is the difference in the probability of smoking between workers affected by a
workplace smoking ban and workers not affected by a workplace smoking ban? Use a
logit model to determine whether this difference is statistically significant.
c) Estimate a logit model with smoker as the dependent variable and the following
regressors: smkban, female, age, age2, hsdrop, hsgrad, colsome, colgrad, black, and
hispanic. Compare the estimated effect of a smoking ban from this regression with your
answer to 1(b). Suggest a reason, based on the substance of this regression, explaining
the change in the estimated effect of a smoking ban between 1(b) and 1(c).
d) Test the hypothesis that the coefficient on smkban is zero in the population version of the
regression in 1(c), against the alternative that it is nonzero, at the 1% significance level.
e) Test the hypothesis that the probability of smoking does not depend on the level of
education in the regression in 1(c). Explain (and show the details).
f) In words, describe the estimated relationship between education and smoking (holding
the other regressors constant).
g) Can you improve on the model you used in (c) above? Explain and discuss.
2. Estimate a probit model using the same regressors as in 1(c).
3. Use the model of question (2) above to calculate the following scenarios:
(a) Consider a hypothetical individual, Ms. A, who is White, 30 years old, and a high
school dropout. Suppose Ms. A is subject to a workplace smoking ban. Calculate the
probability that Ms. A smokes. Do the calculation “by hand.” That is, calculate the
“z-value” of the probit model using the estimated coefficients, then look up the
probability in a standard normal table. Show your work.
(b) Repeat the calculation in 3(a) but have your software do the calculation for you.
(c) Test the hypothesis that the probability of smoking does not depend on race in this
probit model.
4. Read Table 1 below (and the notes to that Table). Then, fill in the missing entries.
(a) Compare the Marginal Effects of Smoke Ban (smkban) on the probability of smoking
for the two models used.
(b) Construct and show the prediction tables for the probit and logit models.
5. Would you use the linear probability model to do all of the above analyses? Explain.
Table 1: Estimated Effect on the Probability of Smoking of a Workplace Smoking
Ban on Two Hypothetical Workers
Mr. A: male, white, at least 30 years old, high school dropout
Ms. B: female, Black, at least 40 years old, college graduate
(1) Probit
(3) Logit
Model
Model
Estimated coefficient on smkban
(standard error in parentheses)
Predicted probabilities of smoking for Mr. A:
(i) with workplace ban
(ii) without workplace smoking ban
Difference, (i) – (ii)
Predicted probabilities of smoking for Ms. B:
(iii) with workplace ban
(iv) without workplace smoking ban
Difference, (iii) – (iv)
Notes: The entry in the first row is the estimated coefficient on smkban in the probit model
(column (1)) and the linear probability model (column (2)), with standard errors in parentheses;
both regressions include the following control variables: female, age, age2, hsdrop, hsgrad,
colsome, colgrad, black, and hispanic. The entries in the remaining rows are predicted
probabilities of smoking for the indicated hypothetical individuals, and differences in those
predicted probabilities.
DATA DESCRIPTION, FILE: Econ_623_PS6_Fall_2023(Smoking).xlsx
The data set is a cross-sectional data set with observations on 10,000 indoor workers, which is a
subset of a 18,090-observation data set collected as part of the National Health Interview Survey
in 1991 and then again (with different respondents) in 1993. The educational binary indicators
refer to the highest level attained and thus are mutually exclusive. Note: an individual with a
Master’s degree or higher has values of 0 for hsdrop, hsgrad, colsome, and colgrad.
smoker
smkban
age
hsdrop
hsgrad
colsome
colgrad
black
hispanic
female
=1 if current smoker, =0 otherwise
=1 if there is a work area smoking ban, =0 otherwise
age in years
=1 if high school dropout, =0 otherwise
=1 if high school graduate, =0 otherwise
=1 if some college, =0 otherwise
=1 if college graduate, =0 otherwise
=1 if black, =0 otherwise
=1 if Hispanic =0 otherwise
=1 if female, =0 otherwise
smoker smkban
1
1
1
1
0
0
1
0
0
1
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
1
0
1
0
1
0
0
0
1
0
1
1
1
1
1
1
1
0
0
1
0
0
1
1
1
1
0
0
0
0
1
1
0
0
0
0
1
0
1
0
0
1
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
1
0
1
1
0
1
1
0
1
1
1
1
0
1
0
1
1
1
0
1
age
41
44
19
29
28
40
47
36
49
44
33
49
28
32
29
47
36
48
28
24
39
32
60
37
31
33
49
28
24
27
31
41
36
48
50
45
23
29
51
32
57
27
30
39
18
58
48
30
37
41
46
hsdrop
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
hsgrad colsome colgrad
1
0
0
0
1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