Watts-College / cpp-523-fall-2021

https://watts-college.github.io/cpp-523-fall-2021/
1 stars 3 forks source link

Lab 6 #16

Open MegsBruce opened 2 years ago

MegsBruce commented 2 years ago

For question one, I'm putting in the chunk of code/trying to run the regression model but I keep getting this error message:

"Error in eval(predvars, data, env) : object 'y' not found"

Help?

Schlinkert commented 2 years ago

Try this:

# divide income by 10,000
happy <- dat$happiness
income <- dat$income / 10000  
income.sq <- income*income

m <- lm( happy ~ income + income.sq ) 

stargazer( m, type="html",
           omit.stat = c("rsq","f","ser"),
           notes.label = "Standard errors in parentheses" )
MegsBruce commented 2 years ago

Nope, still getting the same message