@@ -38,7 +38,7 @@ bmdBoot <- function(object, bmr, R=1000, bootType="nonparametric", bmdType = "or
3838
3939 respTrans <- match.arg(respTrans )
4040
41- if (class (object $ fct ) == " braincousens" & is.null(object $ fct $ fixed )){
41+ if (inherits (object $ fct , " braincousens" ) & is.null(object $ fct $ fixed )){
4242 if (object $ fct $ name == " BC.4" ){
4343 object $ fct $ fixed <- c(NA , 0 , NA , NA , NA )
4444 } else if (object $ fct $ name == " BC.5" ){
@@ -57,16 +57,17 @@ bmdBoot <- function(object, bmr, R=1000, bootType="nonparametric", bmdType = "or
5757 get.drm.list <- function (tmp.data ){
5858 if (ncol(object $ parmMat ) == 1 ){
5959 drm.list.tmp <- lapply(tmp.data , function (x ){
60- try(eval(substitute(drm(formula0 , data = x , type = object $ type , fct = object [[" fct" ]]),
60+ try(eval(substitute(drm(formula0 , data = x , type = object $ type , fct = object [[" fct" ]],
61+ control = drmc(noMessage = TRUE )),
6162 list (formula0 = object $ call $ formula )
6263 )), TRUE )
6364 }
6465 )
6566 } else if (is.null(object $ call $ pmodels )){
6667 drm.list.tmp <- lapply(tmp.data , function (x ){
67- if (object $ type != " binomial" ){
68- x [[as.character(object $ call $ curveid )]] <- x [[paste0(" orig." , as.character(object $ call $ curveid ))]]
69- }
68+ # if(object$type != "binomial"){
69+ # x[[as.character(object$call$curveid)]] <- x[[paste0("orig.", as.character(object$call$curveid))]]
70+ # }
7071 try(
7172 eval(substitute(drm(object $ call $ formula , weights = weights0 , curveid = curveid0 ,
7273 data = x , type = object $ type , fct = object $ fct , control = drmc(noMessage = TRUE )),
@@ -77,11 +78,11 @@ bmdBoot <- function(object, bmr, R=1000, bootType="nonparametric", bmdType = "or
7778 })
7879 } else {
7980 drm.list.tmp <- lapply(tmp.data , function (x ){
80- if (object $ type != " binomial" ){
81- x [[as.character(object $ call $ curveid )]] <- x [[paste0(" orig." , as.character(object $ call $ curveid ))]]
82- }
81+ # if(object$type != "binomial"){
82+ # x[[as.character(object$call$curveid)]] <- x[[paste0("orig.", as.character(object$call$curveid))]]
83+ # }
8384 try(
84- eval(substitute(drm(formula0 , weights = weights0 , curveid = curveid0 ,pmodels = pmodels0 ,
85+ eval(substitute(drm(formula0 , weights = weights0 , curveid = curveid0 , pmodels = pmodels0 ,
8586 data = x , type = object $ type , fct = object $ fct , control = drmc(noMessage = TRUE )),
8687 list (formula0 = object $ call $ formula ,
8788 weights0 = object $ call $ weights ,
@@ -138,7 +139,7 @@ bmdBoot <- function(object, bmr, R=1000, bootType="nonparametric", bmdType = "or
138139 if (identical(bootInterval ," BCa" )){
139140 jackData <- list ()
140141 for (i in 1 : (dim(object $ data )[1 ])){
141- jackData [[i ]] <- object $ data [- i ,]
142+ jackData [[i ]] <- object $ origData [- i ,]
142143 }
143144 # bootJack.drm.tmp <- lapply(jackData, function(x){
144145 # try(drm(object$call$formula, data = x, fct = object[["fct"]]),TRUE)
0 commit comments