Hi there
Many thanks for all your hard work with this package.
I think there is a potential bug with the stepGAICAll.A() function when it is used with 1-parameter distributions. In particular this is the only function from the stepGAIC family of functions that lacks a trace argument. But then in the function definition there are the following lines
if (npar == 1) {
if (trace) {
cat(
"---------------------------------------------------",
"\n"
)
}
... # more code follows here
}
Which of course then triggers an error when the distribution has 1 parameter Error in if (trace) { : argument is not interpretable as logical.
MRE
library(gamlss)
set.seed(42)
n <- 1e3
y <- rbinom(n, 1, 0.1)
a <- rnorm(n)
b <- rnorm(n)
mod_min <- gamlss(y ~ 1, family = BI())
stepGAICAll.A(mod_min, scope = list(lower = ~1, upper = ~ a + b))
# Error in if (trace) { : argument is not interpretable as logical
A potential fix would be to redefine the first codeblock like below (i.e. remove the if (trace) part)
if (npar == 1) {
cat(
"---------------------------------------------------",
"\n"
)
... # more code follows here
}
Or you could properly add a trace argument like with the other stepGAIC functions.
cheers
Chris
Hi there
Many thanks for all your hard work with this package.
I think there is a potential bug with the
stepGAICAll.A()function when it is used with 1-parameter distributions. In particular this is the only function from the stepGAIC family of functions that lacks atraceargument. But then in the function definition there are the following linesWhich of course then triggers an error when the distribution has 1 parameter
Error in if (trace) { : argument is not interpretable as logical.MRE
A potential fix would be to redefine the first codeblock like below (i.e. remove the
if (trace)part)Or you could properly add a
traceargument like with the otherstepGAICfunctions.cheers
Chris