ECON 322 W22 Assignment # 5
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Department of Economics
ECON 322 W22
Assignment # 5
Note: ifyou have difficulty with any code, type the help function. In Stata: help command_name (e.g. help tabstat), in R: help(command_name) (e.g. help(mean))
Tracking all your commands in a do file or R script, do the following:
*start a log file
*clear all data and code ( Stata: clear all, R: rm(list=ls()) ) that you may currently have running *go to Odesi and download the 2014 annual component CCHS (Canadian Community Health Survey) data. (You will only need a subset of2 variables: Total usual hours worked, current jobs & Daily consumption - total fruits and veg.. But there are a lot of interesting health and demographic variables in this data I encourage you to explore!)
*import your CCHS data into Stata or R format
Suppose that you read an article suggesting that when people overwork they don’t take good care of their health:
https://www.monster.com/career-advice/article/health-problems-from-working-too-hard
At the same time, you know that people who work more can earn more and can afford to purchase more health promoting goods. You want to investigate further so you explore the relationship between usual hours worked and consumption of fruit and vegetables in the CCHS.
1. Look at the CCHS variable documentation (for usual hours worked and daily consumption -total fruits and veg) on Odesi to determine what values are assigned for missing: refusal, don’t know, not stated or not applicable answers. Save a subsample that drops any observations with refusal, don’t know, not stated, or not applicable answers for these two variables, and also drop any zeros. What is your sample size?
2. Regress daily consumption – total fruits and veg. on total usual hours worked. Then report and interpret the coefficient estimate for usual hours worked.
3. Log your variable daily consumption-total fruits and veg and regress this logged variable on usual hours worked. Then report and interpret the coefficient estimate on usual hours worked.
4. Now log your usual hours worked variable and run a log-log regression (log consumption-total fruits and veg, on log usual hours worked), report and interpret the results.
5. Why might you expect the estimated coefficient to be different (smaller or larger) in the log-log specification relative to the level level specification?
2022-02-16