Hello, I need this homework on data assignment with R programming to be done by
Saturday, is it possible? and if so how much would it cost, my email
is
[email protected]Data exercise I Information: For this lab assignment, you should paste the relevant output in the file where you include your answers. Always also include your R-code so that we can check what you did (and possibly see what went wrong). Introduction: In 2004 the Brazilian government introduced a satellite-based system that can monitor forest cover, named DETER. The satellite system can identify deforestation hot spots and sends out alerts when areas are in need of immediate intervention. The national environmental police and law enforcement authority issues fines based on these alerts. The satellite system was considered a big improvement over the previous system, where fines were based on voluntary reports and rarely issued. However, even in the new system it is not clear whether the fines actually help to reduce deforestation. We will investigate the research question “Do fines reduce deforestation?” in this data assignment.1 The dataset that we will use is named DETER.csv and contains information on deforestation, fines and cloud coverage in 1042 municipalities located in the Brazilian Amazon in the year 2011. It contains the following variables: muni codeindicator for municipality muni areatotal municipal area (sq km) state codeindicator for state deforestincrease in area deforested in year2 fines lag1total fines in previous year cloud lag1fraction of time sky is fully covered by clouds in previous year weather raintotal rain (in mm) in previous year weather tempaverage temperature in previous year d priorityMunipriority municipality yes/no (priority municipalities have more focused monitoring and enforcement) 1The data in this data assignment comes from the paper” DETERring Deforestation in the Amazon: Environmental Monitoring and Law Enforcement” by Assuncao, Gandour and Rocha, forthcoming in the American Economic Journal: Applied Economics. 2Note that this measure does not incorporate previously deforested area that has been reforested - so it is not net deforestation. Because of this, the increments will always be zero or positive. The measure has been rescaled to account for both municipality size and the share of the municipality that is covered by forest (as otherwise deforestation would always be higher in large municipalities with a lot of forest). It should therefore be interpreted in relative terms (a large value means relatively high deforestation compared to other municipalities). To answer the research question on whether fines reduce deforestation, we want to estimate the following model: deforestation i = β0 + β1fines lag1i + ui(1) (Note that the variable fines is called fines lag1, meaning that we investigate the effect of a fine in the previous period on deforestation in the current period.) 1. Estimate equation 1. Explain what the coefficients mean in words. Normally, law enforcement teams target high-risk areas when giving their fines, so that the number of fines is correlated with other (un)observed area characteristics, making fines endogenous and the coefficient β1 biased. In order to overcome this endogeneity, researchers noted that satellites are only able to capture deforestation when there is no cloud coverage over the area. As the weather, specifically cloud coverage, can be considered to be random, we can use this as an exogenous instrument for fines. 2. In the text above it is explained that fines lag1 is potentially endogenous and therefore biased. Do you expect the bias to be positive or negative? Explain your answer. We will next use Instrumental Variables to estimate the effect of number of fines on the increments in deforestation. You can use cloud coverage as an instrument for total number of fines given. 3. State both the instrument exogeneity and instrument relevance assumptions, indicate whether you think they hold in this case. Explain your answer. 4. Run the first stage regression (without controls). Interpret the results. 5. Is there a problem of weak instruments? Explain your answer. 6. Use the predicted values from your first stage regressions to estimate the second stage regression. Next, estimate the instrumental variable model in one step, using the ivreg() function from the AER package. Compare the results of your second stage with your 2SLS estimates. What is the difference? 7. Based on the results from the Instrumental Variables regression from question 6, what do you conclude about the effects of fines on the deforestation rate? Compare this conclusion to your results from question 1. 8. Can you test whether fines lag1 is indeed an endogenous variable? If yes, explain this test (stating the null and alternative hypothesis explicitly) and perform this test. What do you conclude? 9. Some areas are appointed as a priority area by the Brazilian government, indicating that these areas are of high risk of deforestation and therefore deserve extra attention from law enforcement authorities. The effect of clouds on fines might only be random conditional on whether an area is a priority area or not. Explain how you can incorporate this in your instrumental variables regression and execute this regression. Explain your results. 10. Maybe it is not the number of fines that matter, but whether a municipality gets fines at all. Create a dummy that is equal to 1 if a municipality received at least, one fine in a given year and equal to 0 if the municipality did not receive a fine. How many municipalities did not receive a fine? 11. Also create a dummy if cloud coverage is above median cloud coverage in the sample. What is the median cloud coverage in the sample? 12. Create a table in which you compare municipalities that received at least one fine in a given year with municipalities that got no fine. Look at the variables muni area, weather rain, weather temp and d priorityMuni. What can you conclude from this table? 13. Using the two newly generated dummies, provide the four elements of the WALD estimator and calculate the Instrumental Variables estimator 14. Next run the instrumental variables regression using both the dummy instrument (for fines) and the dummy for cloud coverage, again using the AER package. Compare your results to the WALD estimator you calculated in the previous question. 15. For the binary example, explain the type of treatment effect that you estimated and for which group it holds. What is the share of always takers in the data? 16. Do you think rainfall would also be a good instrument? Explain using both the instrument relevance and the instrument exogeneity condition 17. Include your script as an appendix. Part II: One of the earliest applications of instrumental variables involved attempts to estimate demand and supply curves. Economists are often interested in estimating the price elasticity of demand and supply for products ranging from luxury products to food items. However, observed data on quantities and prices reflect equilibrium points, as prices are set by the intersection of demand and supply curves. To estimate the demand curve (and thus the price elasticity of demand), variation or shifts in the supply curve are needed. A solution would be to use an instrumental variable to instrument supply. Suppose you are interested in estimating the price elasticity of demand for coffee in the Netherlands. For each of the following potential instruments, briefly discuss whether you would use them by discussing both instrument relevance and the instrument exogeneity. 18. (a) A change in the VAT (Value-added tax, BTW in Dutch) on coffee in the Nether- lands. (b) Unexpected drought in coffee growing countries, leading to a strong reduction of the yearly coffee harvest. (c) An unexpected world-wide pandemic affecting the health of the workers at the coffee plantations. Also, all coffee bars in the Netherlands are closed down due to the pandemic. 1