Hello Everyone,
I am working on the lab for this week and was getting errors with what I thought would be the correct variables for each of the functions.
Q2c:
S <-data$State
fixed_reg = lm ( y ~ x + as.factor(S), data = data)
stargazer( Pooled_OLS, fixed_reg,
type = "html",
dep.var.labels = c("Mortality Rates",
),
column.labels = c("Pooled OLS",
"Fixed effect"),
covariate.labels = c("Beer Taxes - Year 1",
"Beer Taxes",
"State B", "State C"),
omit.stat = "all",
digits = 2, intercept.bottom = FALSE )
Error in model.frame.default(formula = y ~ x + as.factor(S), data = data, : variable lengths differ (found for 'as.factor(S)')
My logic with this one is that I thought it would be the S or Y variable.
Hello Everyone, I am working on the lab for this week and was getting errors with what I thought would be the correct variables for each of the functions. Q2c:
Error in model.frame.default(formula = y ~ x + as.factor(S), data = data, : variable lengths differ (found for 'as.factor(S)') My logic with this one is that I thought it would be the S or Y variable.