Open kaseympotts opened 2 years ago
I'm in the same boat... the coding for this lab is pretty difficult
did you ever find the issue out? my code is not working either.
The lecture tells you to use the plm package. You can also do lm(y ~x -1). Including -1 in a linear model formula tells r to not report the intercept.
On Sat, Apr 9, 2022, 6:51 AM Jestrii Acosta @.***> wrote:
did you ever find the issue out? my code is not working either.
— Reply to this email directly, view it on GitHub https://github.com/Watts-College/cpp-525-spr-2022/issues/9#issuecomment-1094036113, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4EHB3O3LOQWNIBTAJG233VEGDOBANCNFSM5SNS55OA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I figured it out... it had to do with the variables i was using not being correct and forgetting to add the one. I guess my next question is what model am I missing in this question it says " for Q2c Now run two fixed-effect models, one including the intercept and one excluding the intercept (you can use the plm function for this latter). Present the results in a nice table.". Then the question " Q3c; What is the value of the coefficient of “State4” in the second model? What does it say about the number of car accidents in state 4?" I have the fixed regression and the plm, am I missing another regression?
The first model is the one with the I tercept the second model is the one without
On Sat, Apr 9, 2022, 7:37 AM Jestrii Acosta @.***> wrote:
I figured it out... it had to do with the variables i was using not being correct and forgetting to add the one. I guess my next question is what model am I missing in this question it says " for Q2c Now run two fixed-effect models, one including the intercept and one excluding the intercept (you can use the plm function for this latter). Present the results in a nice table.". Then the question " Q3c; What is the value of the coefficient of “State4” in the second model? What does it say about the number of car accidents in state 4?" I have the fixed regression and the plm, am I missing another regression?
— Reply to this email directly, view it on GitHub https://github.com/Watts-College/cpp-525-spr-2022/issues/9#issuecomment-1094048392, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4EHB3EQFTXI3YPFDMJF23VEGIY3ANCNFSM5SNS55OA . You are receiving this because you commented.Message ID: @.***>
Do I include the other variables on that model too then because I don’t see the other variables.
If you used the plm function then you can extract the variables using the coeffic() function. You pass your model to the function and it will give you the values of your fixed effects. You don't need it for the stargazer tablee but do need those values for later questions
On Sat, Apr 9, 2022, 10:13 AM Jestrii Acosta @.***> wrote:
Do I include the other variables on that model too then because I don’t see the other variables.
— Reply to this email directly, view it on GitHub https://github.com/Watts-College/cpp-525-spr-2022/issues/9#issuecomment-1094087818, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4EHBZCEP4I24RLD4BFOBLVEG3ERANCNFSM5SNS55OA . You are receiving this because you commented.Message ID: @.***>
When I run the table for Q2, I only get all the state values in the column for the model with an intercept.
Should they be in the other column, too? The later questions for Q3 make me question the initial output.