cran / bamlss

:exclamation: This is a read-only mirror of the CRAN R package repository. bamlss — Bayesian Additive Models for Location, Scale, and Shape (and Beyond). Homepage: http://www.bamlss.org/
1 stars 3 forks source link

Subscript out of bounds in bamlss function #1

Open derSchmetterling opened 1 year ago

derSchmetterling commented 1 year ago

I do understand that this might not be the appropriate place to ask, but I haven't found a better one and maybe someone can help I've been trying to fit the following model in bamlss:

f <- list(
  Resposta ~ Pmaquinabase + Prima + Pmaquina1,
  Resposta ~ Pmaquinabase + Prima + Pmaquina1
)

## Estimate.
b <- bamlss(f, family = "multinomial", data = train_data,reference = "1")

All my variables are double type and the object train_data is a list with 144 rows and 10 columns. I have three levels of my response variable (1,2 and 3), which are factors, so I set the reference as shown. Every time I try to run the model I receive: 'Error in .subset2(x, i, exact = exact) : subscript out of bounds'

Someone has a solution? I've tried to pass the data without any transformation on dplyr, since I saw something similar in gamlss (https://stats.stackexchange.com/questions/563752/error-in-post-hoc-analysis-on-gamlss-model-with-emmeans-error-in-vidx-idx-d), but it did not help. I've tried to pass only the columns I'm setting for the model, but again it did not solve.

gaborcsardi commented 1 year ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Look for Maintainer, BugReports and URL. Thanks!