Skip to content
Prev 391173 / 398506 Next

dagitty library : NULL response

Hello,

You have spaces in the method = " holm " argument. Remove them and have 
the error function return the error to see the error.


tryCatch ({
   r <- localTests(g1, d)
   p.dagitty.param.correct <- min(p.adjust(r$p.value , method = " holm "))
}, error = function(e) {e})
#<simpleError in match.arg(method): 'arg' should be one of ?holm?, 
#?hochberg?, ?hommel?, ?bonferroni?, ?BH?, ?BY?, ?fdr?, ?none?>


tryCatch ({
   r <- localTests(g1, d)
   p.dagitty.param.correct <- min(p.adjust(r$p.value , method = "holm"))
}, error = function(e) {e})
#Warning message:
#In min(p.adjust(r$p.value, method = "holm")) :
#  no non-missing arguments to min; returning Inf

p.dagitty.param.correct
#[1] Inf


Hope this helps,

Rui Barradas

?s 10:58 de 31/03/2022, varin sacha via R-help escreveu: