it is an econometrics assignment due  12 am tonight. The assigment should be done using the  R script. I will...

profilearmndr

it is an econometrics assignment due  12 am tonight. The assigment should be done using the  R script. I will provide the files needed for the assignment.

 

1. Download and work through the R script for Assignment3 Examples. Once this is done, do the following: Based on the template that I’ve provided, change the code to download the dataset crime1.dta. This dataset is introduced on page (83, 5th Edition; 72, 6th Edition) of the text in example 3.5. (a) Using R, estimate the first specification (without avgsen in example 3.5 and interpret your regression results. How does employment in 1986 affect arrests? Is it statistically significant at the 5% level on a two-sided test. lm.1 <- lm(narr86 ˜ pcnv + ptime86 + qemp86) (b) The data contains information on demographic characteristics. Add to the model the variables black, hispan, born60, which are dummy variables for Black and Hispanic ethnicity, and being born after 1960. Describe the results for each of these variables. Are they individually significant? (c) The R2 increases from the first to the second specification, which is not surprising. Does this indicate that the demographic variables are jointly statistically significant? Perform an F-test to investigate this. What is the restricted and unrestricted model in this case? (d) Add avgsen to each specification from (a) and (b) (ie., estimate two more regression models with this variable added). If longer sentences have a deterrent effect, what should the sign of the coefficient on avgsen be? How do you interpret this coefficient? Do you think that there is a deterrent effect? (e) Install the stargazer package by imputing the following code at the top of your script. install.packages(‘‘stargazer’’) require(‘‘stargazer’’) Output the results of your four specifications with the following code: stargazer(lm.1, lm.2, lm.3, lm.4, type=‘‘text’’) where lm.1 is the name of your first model, and so on. 1 2. Computer Exercise C9 on page (166, 5th Edition; 147, 6th Edition) from Wooldridge.

    • 10 years ago
    • 10
    Answer(0)
    Bids(0)