Description Usage Arguments Details Value Author(s) References See Also Examples

Computes 95 percent confidence intervals on x-fold and z-SD benchmark doses by bootstrap.

1 2 3 4 5 6 7 8 9 10 11 | ```
bmdboot(r, items = r$res$id, niter = 1000,
conf.level = 0.95,
tol = 0.5, progressbar = TRUE,
parallel = c("no", "snow", "multicore"), ncpus)
## S3 method for class 'bmdboot'
print(x, ...)
## S3 method for class 'bmdboot'
plot(x, BMDtype = c("zSD", "xfold"), remove.infinite = TRUE,
by = c("none", "trend", "model", "typology"), CI.col = "blue", ...)
``` |

`r` |
An object of class |

`items` |
A character vector specifying the identifiers of the items for which you want the computation of confidence intervals. If omitted the computation is done for all the items. |

`niter` |
The number of samples drawn by bootstrap. |

`conf.level` |
Confidence level of the intervals. |

`tol` |
The tolerance in term of proportion of bootstrap samples on which the fit of the model is successful (if this proportion is below the tolerance, NA values are given for the limits of the confidence interval. |

`progressbar` |
If |

`parallel` |
The type of parallel operation to be used, |

`ncpus` |
Number of processes to be used in parallel operation : typically one would fix it to the number of available CPUs. |

`x` |
An object of class |

`BMDtype` |
The type of BMD to plot, |

`remove.infinite` |
If TRUE the confidence intervals with non finite upper bound are not plotted. |

`by` |
If not at |

`CI.col` |
The color to draw the confidence intervals. |

`...` |
Further arguments passed to graphical or print functions. |

Non-parametric bootstrapping is used, where mean centered residuals are bootstrapped.
For each item, bootstrapped parameter estimates are obtained by fitting the model on each of the resampled data sets. If the fitting procedure fails to converge in more than tol*100% of the cases, NA values are given for the confidence interval. Otherwise, bootstraped
BMD are computed from bootstrapped parameter estimates using the same method as
in `bmdcalc`

.
Confidence intervals on BMD are then
computed using percentiles of the bootstrapped BMDs.
For example 95 percent confidence intervals are
computed using 2.5 and 97.5 percentiles of the bootstrapped BMDs.
In cases where the bootstrapped BMD cannot be estimated as
not reached at the highest tested dose or not reachable due to model asymptotes,
it was given an infinite value `Inf`

, so as to enable the computation
of the lower limit of the BMD confidence interval if a sufficient number of bootstrapped BMD values were estimated
to finite values.

`bmdboot`

returns an object of class `"bmdboot"`

, a list with 3 components:

`res` |
a data frame reporting the results of the fit, BMD computation and bootstrap
on each specified item sorted in the ascending order of the adjusted p-values. The different columns correspond to
the identifier of each item ( |

`z` |
Value of z given in input to define the BMD-zSD. |

`x` |
Value of x given in input as a percentage to define the BMD-xfold. |

`tol` |
The tolerance given in input in term of tolerated proportion of failures of fit on bootstrapped samples. |

`niter` |
The number of samples drawn by bootstrap (given in input). |

Marie-Laure Delignette-Muller

Huet S, Bouvier A, Poursat M-A, Jolivet E (2003) Statistical tools for nonlinear regression: a practical guide with S-PLUS and R examples. Springer, Berlin, Heidelberg, New York.

See `bmdcalc`

for details about the computation of benchmark doses.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | ```
# (1) a toy example (a very small subsample of a microarray data set)
#
datafilename <- system.file("extdata", "transcripto_very_small_sample.txt",
package = "DRomics")
# to test the package on a small but not very small data set
# use the following commented line
# datafilename <- system.file("extdata", "transcripto_sample.txt", package = "DRomics")
o <- microarraydata(datafilename, check = TRUE, norm.method = "cyclicloess")
s_quad <- itemselect(o, select.method = "quadratic", FDR = 0.001)
f <- drcfit(s_quad, progressbar = TRUE)
r <- bmdcalc(f)
set.seed(1234) # to get reproducible results with a so small number of iterations
(b <- bmdboot(r, niter = 5)) # with a non reasonable value for niter
# !!!! TO GET CORRECT RESULTS
# !!!! niter SHOULD BE FIXED FAR LARGER , e.g. to 1000
# !!!! but the run will be longer
b$res
plot(b) # plot of BMD.zSD after removing of BMDs with infinite upper bounds
plot(b, remove.infinite = FALSE) # plot of BMD.zSD without removing of BMDs
# with infinite upper bounds
# bootstrap on only a subsample of items, here those best fitted by the linear model
# with a greater number of iterations
(b.lin.95 <- bmdboot(r, items = r$res$id[r$res$model == "Gauss-probit"],
niter = 1000, progressbar = TRUE))
b.lin.95$res
# same bootstrap but changing the default confidence level (0.95) to 0.90
(b.lin.90 <- bmdboot(r, items = r$res$id[r$res$model == "Gauss-probit"],
niter = 1000, conf.level = 0.9, progressbar = TRUE))
b.lin.90$res
# (2) an example on a microarray data set (a subsample of a greater data set)
#
datafilename <- system.file("extdata", "transcripto_sample.txt", package="DRomics")
(o <- microarraydata(datafilename, check = TRUE, norm.method = "cyclicloess"))
(s_quad <- itemselect(o, select.method = "quadratic", FDR = 0.001))
(f <- drcfit(s_quad, progressbar = TRUE))
(r <- bmdcalc(f))
(b <- bmdboot(r, niter = 100)) # niter to put at 1000 for a better precision
# different plots of BMD-zSD
plot(b)
if (require(ggplot2)) plot(b) + scale_x_log10() # in BMD log10 scale
plot(b, by = "trend")
plot(b, by = "model")
plot(b, by = "typology")
# a plot of BMD-xfold (by default BMD-zSD is plotted)
plot(b, BMDtype = "xfold")
# (3) Comparison of parallel and non parallel implementations
#
# to be tested with a greater number of iterations
system.time(b1 <- bmdboot(r, niter = 100, progressbar = TRUE))
system.time(b2 <- bmdboot(r, niter = 100, progressbar = FALSE, parallel = "snow", ncpus = 2))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.