We are fitting Generalized Additive Models for Location, Scale and Shape to access the effects of month (continuos) and year (categorical) on the response variable Y. To investigate the seasonal variability of Y across the years, interaction terms between year and month were included. The R code used is shown below:
M1<-gamlss(Y~cs(Month)+pvc(Month, by=Year_N),family=NBI, data = data)
The function pvc() is varying coefficients functions. This interaction takes the linear coefficient of the explanatory variable x is changing smoothly according to another explanatory variable r.
When I run this code the following error occured:"There were 50 or more warnings (use warnings() to see the first 50)".
This error also ocurred when the following dataset and code available on Package ‘gamlss’ (February 3, 2020) are used:
the rent data
first with a factor
data(rent)
now with the factor
r2 <- gamlss(R~pvc(Fl, by=B), data=rent)
Could someone explain what could be happening?
Jonatas Prado