ellisp / nz-election-forecast

Probabilitstic prediction model for the New Zealand general election
GNU General Public License v3.0
22 stars 13 forks source link

Error in eval(expr, envir, enclos) : object 'Maori' not found #3

Closed THE-R2 closed 7 years ago

THE-R2 commented 7 years ago

mod_all <- gam(list( ACT ~ s(MidDate, k = 3), Conservative ~ s(MidDate, k = 3), Green ~ s(MidDate), Labour ~ s(MidDate), Mana ~ s(MidDate, k = 3), Maori ~ s(MidDate, k = 3), National ~ s(MidDate), NZ.First ~ s(MidDate), United.Future ~ MidDate), data = PollsAll, family = mvn(d = 9))

When I run above code, I've got a error message as follows. "Error in eval(expr, envir, enclos) : object 'Maori' not found"

Could you please resolve this issue?

ellisp commented 7 years ago

what do you see when you do names(PollsAll)?

That particular script needs to be run after the creation of the house weights. The project is designed to be run from the integrate.R script, in sequence (I should adapt the readme to make this clearer).