0

I am trying to use qbcpeo to produce lower limit than normal for a gamless bcpe object, however, some of the sigma values (sigma link is log) yields negative value so when I attempt to use qbcpeo I get the error "sigma must be positive" how can I solve this?

I tried using absolute sigma values and exp(sigma) but nothing works

1 Answers1

0

qBCPEo(p,mu,sigma,nu,tau) gives the p quantile for BCPEo(mu, sigma, nu, tau).

The predictor for sigma can be negative, with sigma = exp(predictor). sigma itself cannot be negative.

If you still have problem, please give an example of the R commands you are using.

By default

predict( , what="sigma", )

gives the predictor of sigma, i.e. log(sigma).

It is easies to use

mm$LLNFEF2575<-qBCPEo(0.05, mu = mm.bcpefef2575$mu,

sigma = mm.bcpefef2575$sigma,

nu = mm.bcpefef2575$nu,

tau = mm.bcpefef2575$tau,

lower.tail = TRUE, log.p = FALSE)

Robert
  • 36
  • 2
  • Thank you for this, this is the gamlss obj sigma equation is: Sigma link function: log, Sigma Coefficients: (Intercept) -3.93778 pb(log(age)) 0.64825, this is the command I used: mm$Sfef2575 <- predict(mm.bcpefef2575, what="sigma", data=mm) and mm$LLNFEF2575<-qBCPEo(0.05, mu = mm$Mbcpe2575, sigma = mm$Sfef2575, nu = mm$Lbcpefef2575,tau = mm$Pfef2575, lower.tail = TRUE, log.p = FALSE) and the error I get is sigma must be positive – Walid Al Qerem Aug 23 '23 at 05:36
  • Thank you for this it is really helpful, however, now I am getting this mm$LLNFEF2575<-qBCPEo(0.05, mu = mm.bcpefef2575$mu, sigma = mm.bcpefef2575$sigma, nu = mm.bcpefef2575$nu,tau = mm.bcpefef2575$tau, lower.tail = TRUE, log.p = FALSE) Error in if (nu < 0) { : argument is of length zero – Walid Al Qerem Aug 30 '23 at 17:56