ECON 300: Econometrics Spring 2023
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
ECON 300: Econometrics
Spring 2023 - CRN 35162 - 3 credits
Extra Credit Assignment
Due on Mar 31st, 2023 by 11:59 PM
Instructions: This assignment is worth 50 points – points for individual questions are specified below. You can either write and scan your answers OR type your answers. Either way, make sure you upload a combined
PDF file on Blackboard by 11:59 PM on the due date, for your submission to be counted.
This assignment requires you to employ STATA in every question. Please make sure to attach screenshots clearly showing your commands and results OR a do file OR a log file, for your submission to be counted.
Let’s talk about Mental Health
Please download the associated dataset from Blackboard for this assignment – mental_health.dta
Suppose you want to determine the factors affecting Mental Health among college students. You create a survey with 15 questions and ask 30 UIC Undergrad students to complete it. You can find each question, its associated variable in the dataset, variable type, and values in the codebook below. Go through the codebook to understand the dataset and then answer the following questions.
Codebook
1 |
age |
continuous |
in years |
Please mention your age (in years). |
Which of the following gender orientations most accurately describes you? |
||||
3 |
international_student |
dummy |
1: international student 0: US native |
Are you an international student (that is, are you in the US on an F1 visa)? |
|
||||
5 |
work_hours |
categorical |
1: 0 hours (no work) 2: 1 to 10 hours 3: 10 to 20 hours 4: more than 20 hours |
How many hours do you work in a week, on an average? |
6 relationship_status dummy
1: in a relationship
0: single
What best describes your current relationship status?
8 mental_health_score continuous between 0 to 100
If you had to evaluate your current overall mental health on a scale of 1 to 100, what score would you give yourself? Remember this question is related to overall mental health, and not just school- specific triggers.
10 childhood_score
continuous between 0 to 10
How would you rate your childhood? Think emotional neglect, physical neglect, sexual abuse and/or dysfunctional familial ties.
12
gpa
categorical
1: below 2.0
2: between 2.0 & 3.0
3: above 3.0
What was your overall GPA last semester?
14 exercise_hours
categorical
1: less than 1 hour
2: Between 1 to 3
hours
3: Between 3 to 5
hours
4: more than 5 hours
How many hours do you work out in a week, on an average?
PART I: Descriptive Statistics
Commands to be used: use, browse, summarize, tabulate
This part will provide you with some preliminary understanding of the dataset by looking at a few descriptive statistics. Once you have downloaded the dataset from Blackboard, import it into STATA by employing the use command. Before we begin, type the command browseto look at the dataset in a table form if you like.
1. What are the average values for the following variables?
continuous variables
a. age
b. credits
c. mental_health_score
2. What percentage of our sample is?
dummy variables
a. female
b. international_student
c. liked_survey
3. Specify the percentage of observations in each category for the following variables.
categorical variables
a. distance
b. work_hours
c. exercise_hours
PART II: Plotting
Commands to be used : twoway (scatter y x) and (lfit y x)
This part will lend visual context to the dataset by plotting some preliminary relationships between mental health and other variables. Remember, our main dependent variable of interest is mental health score, and we are trying to find factors that affect this score.
4. How do credit hours affect mental health?
Continuous variable
a. Create a scatter plot showing the relationship between credits and mental_health_score. Keep credits on the x-axis and mental_health_score on the y-axis.
b. Now, add a best fit/ regression line to your plot. What can you say about the relationship?
5. How does being an international student affect mental health?
Dummy variable
a. Create a scatter plot showing the relationship between international_student and mental_health_score. Keep international_student on the x-axis and mental_health_score on the y-axis.
b. Now, add a best fit/ regression line to your plot. What can you say about the relationship?
6. How do work hours affect mental health?
Categorical variable
a. Create a scatter plot showing the relationship between work_hours and mental_health_score. Keep work_hours on the x-axis and mental_health_score on the y-axis.
b. Now, add a best fit/ regression line to your plot. What can you say about the relationship?
PART III: Regression
Commands to be used: regress and generate
This last part is concerned with estimating how different factors affect mental health score using OLS regressions. We will make use of both bivariate and multivariate OLS models, and further add dummy and categorical variables to the analysis.
7. Regress mental_health_score on credits and report your results.
bivariate OLS
a. Interpret the coefficient on credits in words.
b. Is the coefficient on credits statistically significant? Use the confidence interval approach or the p-value approach with significance level a = 0.05.
8. It is a pretty common practice to control for age and gender while running regression models. Hence, now regress mental_health_score on three independent variables – credits, age and female. Report your results.
OLS with a dummy variable
a. Is the coefficient on credits still statistically significant? Use the confidence interval approach or the p-value approach with significance level a = 0.05.
b. What about the coefficients on age and female? Use the confidence interval approach or the p-value approach with significance level a = 0.05.
9. Maybe the effect of credit hours on mental health score differs for those with a previous diagnosis versus those without a previous diagnosis.
To explore this relationship, run a new regression of mental_health_score on three variables – credits, previous_diagnosis and an interaction term between credit hours and previous diagnosis called prevdiag_inter_credits (generate this new variable by yourself). Report your results.
OLS with a dummy variable and interaction term
a. What is the effect of credit hours on mental health score for those without a previous diagnosis?
b. What is the effect of credit hours on mental health score for those with a previous diagnosis?
10. Finally, let us investigate how mental health score varies by GPA. Consult the Codebook to look at the three categories under gpa. Recall from class that a categorical variable cannot be added directly into the model – it needs to be converted into dummies and then added to the model.
First convert these categories into three separate dummy variables: low_gpa for gpa==1, med_gpa for gpa==2 and high_gpa for gpa==3 (generate these new variables by yourself).
Then run a final regression of mental_health_score on these GPA dummies (be mindful of the dummy variable trap). Report your results.
OLS with categorical variables
a. What is the average mental health score for low_gpa, med_gpa and high_gpa? Is the score increasing as GPA improves?
b. What can you say about the statistical significance of these estimated coefficients? Use the confidence interval approach or the p-value approach with significance level a = 0.05.
2023-03-17