You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running through your code trying to understand how the graphs were made. I keep coming across the following problem,
When I run this code:
`library(mgcv)
form <- as.formula("dengue ~ s(templ3,k=4)+s(rainl2,k=4)+s(rainl3,k=4)+s(denguel2,k=4)+s(denguel24,k=4)")
mod.train <- gam(form, family=quasipoisson, na.action=na.exclude, data=training)
Error in smooth.construct.tp.smooth.spec(object, dk$data, dk$knots) :
NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning messages:
1: In mean.default(xx) : argument is not numeric or logical: returning NA
2: In Ops.factor(xx, shift[i]) : ‘-’ not meaningful for factors
detach(training)
How can I avoid this error? Did you manipulate the data you provided to omit NA's before running it?
The text was updated successfully, but these errors were encountered:
I am running through your code trying to understand how the graphs were made. I keep coming across the following problem,
When I run this code:
`library(mgcv)
attach(training)
form <- as.formula("dengue ~ s(templ3,k=4)+s(rainl2,k=4)+s(rainl3,k=4)+s(denguel2,k=4)+s(denguel24,k=4)")
mod.train <- gam(form, family=quasipoisson, na.action=na.exclude, data=training)
detach(training)`
I receive the following results:
The following objects are masked from training (pos = 3):
How can I avoid this error? Did you manipulate the data you provided to omit NA's before running it?
The text was updated successfully, but these errors were encountered: