1

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

4

1 回答 1

1

警告不是错误,因此模型很可能没有失败,但似然优化在达到收敛之前停止在最大迭代阈值处。增加迭代拟合的参数值可能有助于避免警告消息。例如“方法 = RS(100)”

于 2022-02-21T13:53:53.817 回答