Closed mariofiorini closed 5 months ago
Tthe solution (thanks Laurent) is to add ~
to define a formula for the offset.
I hope it can be useful to others:
gravity_pois_3 = fepois(Euros ~ 1 | Origin , trade[trade$Destination!='IT',], offset = ~log(dist_km))
predict(gravity_pois_3, newdata = trade, type = 'response' )
so ~log(dist_km)
works. I will close the issue.
Hi Mario: the second call is still a bug so I'm reopening the issue until I fix it. Thanks for reporting!
Maybe it was a version issue, the second call currently works. Thanks for reporting.
Hi Laurent, first of all many thanks for creating such a great package. I am using
fepois
with an offset variable, and then trying to do some out-of-sample prediction, but I always get some error message. Small example, where Ifepois
on a restricted sub-sample excluding Destination==ITThen I try to have offset in the main formula but I get a different error message when trying to predict
Let me know if I am missing something. Cheers, Mario