0

I'm using the vglm function of the VGAM package.

m <- vglm(log(variable+1) ~ ., tobit(Lower=0), data = dat)

I was able to run the code above without any issues previously, but I'm getting this error message.

Error in environment(formula) : argument "formula" is missing, with no default

EDIT:

Also tried running this vglm(log(demand+1) ~ ., tobit(Lower=0), data = BOD)

but I'm also getting the same error message

  • 1
    have you tried explicitly passing the argument? `vglm(formula = log...` – Claudio Paladini May 03 '22 at 16:48
  • 1
    You will need to provide a reproducible example since when I try it with other data `vglm(log(demand+1) ~ ., tobit(Lower=0), data = BOD)` it does not produce any errors. I used VGAM 1.1.16. and "R version 4.1.3 Patched (2022-03-10 r81883)" on Windows. – G. Grothendieck May 03 '22 at 16:53
  • i tried passing the formula argument, i'm still getting the same error – confusedpanda May 03 '22 at 16:57
  • @G.Grothendieck i tried running the same code vglm(log(demand+1) ~ ., tobit(Lower=0), data = BOD) but I get the same error that the formula is missing. I'm trying to reinstall the vgam package – confusedpanda May 03 '22 at 17:01
  • @G.Grothendieck it unfortunately still doesn't work with the BOD data – confusedpanda May 03 '22 at 17:16
  • Paste this `library(VGAM); vglm(log(demand+1) ~ ., tobit(Lower=0), data = BOD)` into https://rdrr.io/snippets/ – G. Grothendieck May 03 '22 at 17:18
  • @G.Grothendieck yup it works, I think it may be my R environment, just not sure how to troubleshoot this – confusedpanda May 03 '22 at 17:29
  • 2
    Start a fresh session and try it without loading anything prior to that. Be sure that your .Rprofile file does not add anything. – G. Grothendieck May 03 '22 at 17:36

0 Answers0