DS4PS / cpp-525-fall-2020

http://ds4ps.org/cpp-525-fall-2020/
1 stars 0 forks source link

Lab 4 Q 6a #12

Closed TVK36692 closed 4 years ago

TVK36692 commented 4 years ago

I am wondering what I might be missing when I try to do the second part of the IV regression analysis.


x1_hat <- fitted( waiting.first.stage ) #Save predicted values for education

waiting.second.stage <- lm(HealthStatus ~
x1_hat +
WaitingTime +
Race +          
Education +          
MaritalStatus, data = card)

stargazer( first.stage, second.stage,
           column.labels = c("First Stage", "Second Stage"),
           type = "html",
           digits = 2 )

When I get to this step it does not recognize HealthStatus as an object anymore. Error in eval(predvars, data, env) : object 'HealthStatus' not found

I am not dropping it at any point prior.