辅导EC 421课程程序、 写作Econometrics程序

” 辅导EC 421课程程序、 写作Econometrics程序Problem Set 2Time Series (and a bit of Causality)EC 421: Introduction to EconometricsDue before noon (11:59am) on July 16th, 2020 (on canvas)DUE Upload your answer on Canvas before noon on July 16th, 2020.IMPORTANT You must submit two les:1. Your typed responses/answers to the question2. the R script you used to generate your answers. Each student must turn in their own answers.If you are using RMarkdown, you can turn in one le,but it must be an HTML or PDF that includes your responsesand R code.OBJECTIVE This problem set has three purposes: (1) reinforce the topics of time series and statistical inference;(2) build your R toolset; (3) start building your intuition about causality within econometrics/regression.INTEGRITY If you are suspected of cheating, then you will receive a zero. I may report you to the dean. Everythingyou turn in must be in your own words.2 / 9Conceptual Questions1. Remember that weve discussed three types of time-series models: (1) static models, (2) dynamic models withlagged explanatory variables, (3) dynamic models with lagged outcome variables.1a. If the disturbance is not autocorrelated, for which of the 3 types of models is OLS unbiased?If any of the models are biased, explain why.1b. If the disturbance is not autocorrelated, for which of the 3 types of models is OLS consistent?If any of the models are inconsistent, explain why.1c. If the disturbance is autocorrelated, for which of the 3 types of models is OLS unbiased?If any of the models are biased, explain why.1d. If the disturbance is autocorrelated, for which of the 3 types of models is OLS consistent?If any of the models are inconsistent, explain why.2. In our time-series lecture, we discussed how static time-series models are a pretty restrictive and simplisticway to model time-series data.2a. Explain why static time-series models are generally restrictive and simplistic.2b. Give an example of a reasonable static time-series model. By reasonable we mean that it would bereasonable to model the relationship as a static relationship. Explain why it is reasonable to model therelationship as static rather than dynamicand make sure you tell us what (t) would represent (e.g., days,months, years). 辅导EC 421课程作业、 写作Econometrics作业Note: The model should look something like:2c. Give an example of a reasonable dynamic time-series model. By reasonable we mean that it would bereasonable to model the relationship as a dynamic relationship. Explain why this relationship should bemodeled as a dynamic relationship. Make sure you tell us what (t) would represent (e.g., days, months, years).Note: The model should look something like3. Time-series models frequently include the lag of a variable, e.g., . Explain why we usually do not use lags incross-sectional models, e.g., .ututututBirthst = 0 + 1Incomet + utBirthst = 0 + 1Incomet + Incomet1 + utxt1xi13 / 9Some Real DataNow were going to work with some real data. The data come from the Environmental Protection Agency (EPA).Specically,the data describe electricity generation in the United States at a monthly levelthe amount ofelectricity generated, associated emissions, the number of retirements, etc.For more information on the dataset, see the table on the last page of this problem set.Why? Electricity generation is obviously important for day-to-day life: it runs our heating and air conditioning, itallows us To have computers/phones/internet/refrigerators/etc., and it supports many businesses and criticalparts of our health systems and economy.Emissions are important, because burning fossil fuels (e.g., coal and natural gas) produces toxic gases that arereleased above the plant. These gases (emissions) have been traced to a bunch of negative outcomesfor people,animals, plants, and the general environment (e.g., acid rain). Economics is about thinking on the margin: Where dothe marginal benetsfrom something equal the marginal costs? We know we need electricity, so we do not want tomake it too expensive for electricity generators to operate, but if we do not regulate electricity generation, then thepower plants may poison our air and water. Thus, one job of economists (specially environmental and energyeconomists) is guringout how regulations affect health, environment, and energy costs.4. Load packages and your dataset hw_2_data.csv .5. Which dates does the dataset cover (what are the start and end dates)? How many months?6. How many plants retired during this sample?7. Create (and include) three gures:(1) the time series of total monthly generation ( generation_gwh ), (2) thetime series of NOx(Nitrogen Oxide) Emissions ( emissions_nox ), and (3) the time series for the number ofelectricity generators who retired in the given month ( n_retirements ).Hint: A time-series graph has time on the axis and a variable on the axis. Your axis can have either time t(time relative to the beginning of the sample) or date ( month ).8. For each of the three time-series graphs in 7, explain whether the variable appears to be positivelyautocorrelated, negatively autocorrelated, or not autocorrelated. Make sure you explain your reasoning.9. Estimate a static time-series model where monthly NOx emissions ( emissions_nox ) are the outcome variableand our two explanatory variables are the number of retirements in the month ( n_retirements ) and the amountof electricity generation in the month ( generation_gwh ).Report your coefcientestimates and their statistical signicance.x y x4 / 910. Now estimate a dynamic model in which you include the rstlag for each of your explanatory variables(number of retirements and amount of electricity generation). Note: You still want the non-lagged version of thevariables tooi.e., include and . Interpret the coefcienton the lagged number of retirements.11. Why might it Aake sense to include lags of the variable number of retirements? In other words: Why might wewant a dynamic model with lagged explanatory variables in this setting?12. If the disturbance is autocorrelated, what problems does it cause for OLS regression estimates in 10?Answer: If 10 has an autocorrelated disturbance, then OLS is inefcientand has biased standard-error estimates.13. Use the residuals from the regression in 10 to test for rst-orderautocorrelation in your disturbance. Reportthe results from the hypothesis test.Hint: Dont forget about the missing values due to lags (see lecture notes).xt xt15 / 914. Now estimate a dynamic model (still with NOx emissions as the outcome variable) with 0, 1, 2, and 3 lags ofthe number of retirements and also the current months electricity generation (no lags). Interpret the coefcienton the third lag of the number of retirements.15. Based upon your estimates in 14, what is the total effect of a retirement on NOx emissions?Note: This estimate essentially assumes that the effect is gone after four months, which is not likely.16. Now estimate an ADL(1,1) model with NOx emissions as the outcome and with number of retirements andelectricity generation as the explanatory variables. Report/interpret the coefcienton the lag of NOx emissions.Hint: Your regression should have an intercept plus vemore terms.The coefcienton the lag of NOx emissions tells us that a one-ton increase in NOx emissions in the previousmonth is associated with a 0.925-ton increase in NOx emissions in the current month. This relationship is verystatistically signicant.The relationship says that our outcome is strongly correlated with itself in time.17. Does it make sense to regress current NOx emissions on the previous months emissions? Explain your answer.18. If the disturbance is autocorrelated, then OLS is not consistent for the coefcientsin 16. Explain how youcould test for an autocorrelated disturbance using the model from 16.Note: You do not actually need to run this test.6 / 9CausalityImagine that we are interested in analyzing a government program. We consider individuals as treated if theyparticipated in the program (and untreated if they did not). Following the notation of the Rubin causal model,imagine that we observe the following sample (which would be impossible observe in real life):Table: Imaginary dataseti Trt. y1 y01 0 17 82 0 7 53 0 10 44 1 5 15 1 0 06 1 1 419a. Calculate and report the treatment effect for each individual (i.e., ).19b. Is the treatment effect heterogeneous or homogeneous? Brieyexplain your answer.19c. Calculate and interpret the average treatment effect for the sample.19d. What does it mean if for one individual and for another individual?19e. Estimate the average treatment effect by comparing the mean of the treatment group to the mean ofthe control group. Report your estimate.19f. Should we expect our estimator in 19e to provide unbiased estimates? Explain.19g. Why would it be impossible to actually observe all of the data in the table (in real life)? Specically:Whichparts of the dataset would we not observe in real life? Think about the fundametal problem of causal inference.19h. Deneand explain selection bias.19i. Calculate (and report) the selection bias in this sample.ii 0 j 07 / 9Extra Credit: IVThe purpose of this question is to illustrate why you cannot estimate demand and supply equations with OLS.You may receive up to 4 extra credit homework points on this question.Suppose we we are interested in estimating demand elasticities. We think supply and demand relationships aregiven by:This next piece of information will be crucial for a later part of the problem so make note of it. You may assumeand . The rstassumption says the unconditional mean of the demand and supplyshocks are zero. The second assumption says that the demand and supply shocks are independent from oneanother (e.g their covariance is zero). You may assume that the variance of the shocks (disturbances) ishomoskedastic. Note that these assumptions, taken together, imply that and.Unfortunately, in our data we only observe equilibrium prices and quantities (that is: and ). This will lead toendogeneity of in both equations. To see this endogeneity, we can impose the equilibrium condition andsolve for :Clearly, and . This is where the endogeneity is coming from. Moreintuitively, the equilibrium price, (our data) is impacted by both demand and supply shocks — and .20a. Ignoring the endogeneity for a moment, why can we interpret and as elasticities?20b. Compute the equilibrium quantity . Hint: Just use the equilibrium price equation I gave you. There isonly one step here (plus maybe a few extra if you simplify the expression).20c. Calculate the covariance between and . Remember, the covariance of two random variables,and is given by:20d. Recall: . Use your answer to 20c. to compute this probability limit.20e. We will attempt To estimate with instrumental variables. As an example, suppose the demand and supplyequations we are estimating are for cigarettes. Our instrument is the general sales tax per pack in each state,. What are the two conditions for the instrument to be valid? If you can test either of them, write out how youwould (specicallygive a regression equation if it is possible).20f. Now I want you to argue for the and against the exogeneity condition. Specically,write out, at most, twosentences arguing why I should believe the instrument is exogenous, and two as to why I shouldnt believe it isexogenous. This is tough to get right — so spend a bit of time thinking about it.log(Qit) = d + 1log(Pit) + uit demandlog(Qit) = s + 2log(Pit) + it supplyVariable Descriptiont Time, Relative to the rstmonth of the sample (1, 2, …)month Month of the sample (e.g., 2015-12-01)generation_gwh Total monthly electricity generation (Gigawatt hours, GWh)emissions_so2 Total monthly emissions of SO2(in tons)emissions_nox Total monthly emissions of NOx(in tons)n_plants Number of unique electricity-generating units (EGUs) operating in the monthn_retirements Number of retired electricity generating units in the monthcumulative_retirements Cumulative number of retirements (through the given month)i_cair Binary indicator for months during the Clean Air Interstate Rule (CAIR)i_csapr Binary indicator for months during the Cross-State Air Pollution Rule (CSAPR)如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导