I am using the R package GAMLSS to fit a GAM to illustrate the seasonality (by month) and trend (week_t number in a year) in a time series data (mydat)
Here is the code I ran:
fit_lss <- gamlss(num_travelers ~ pb(month) + pb(week_t),
data = na.omit(mydat), family = "PO")
However, I got an error message:
Error in seq.default(xl - deg * dx, xr + deg * dx, by = dx) :
'from' must be a finite number
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
I am very much appreciated it if anyone helps me fix the error. Thank you.
I have no clue of how to solve it at the moment.