diff --git a/.DS_Store b/.DS_Store index d90517d..2fbfc34 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.Rbuildignore b/.Rbuildignore index 9eeb564..693c8b0 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,4 +4,6 @@ cache/ README.Rmd README.md README_files/ -^\\.github$ \ No newline at end of file +^\.github$ +docs/ +example_extracts/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 61fb704..437421c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,8 @@ .Rhistory .RData .Ruserdata -cache/ \ No newline at end of file +cache/ +bmd.Rproj +inst/doc +inst/dev +example_extracts/ \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 504c091..8c49cea 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: bmd Type: Package Title: Benchmark dose estimation for dose-response data -Version: 2.7.3 +Version: 2.7.4 Date: 2025-03-24 Author: Signe M.Jensen, Christian Ritz and Jens Riis Baalkilde Maintainer: Signe M. Jensen @@ -25,7 +25,9 @@ Suggests: tidyr, numDeriv, drcData, - testthat (>= 3.0.0) + testthat (>= 3.0.0), + knitr, + rmarkdown Remotes: doseresponse/drc, doseresponse/drcData @@ -33,6 +35,8 @@ License: file LICENSE Encoding: UTF-8 LazyData: true Config/testthat/edition: 3 +Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.2 Depends: R (>= 3.5) +VignetteBuilder: knitr diff --git a/NAMESPACE b/NAMESPACE index 6ccfdc1..9f45c0a 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,29 +1,78 @@ -import(drc, ggplot2, dplyr) -importFrom("graphics", "lines") -importFrom("stats", "aggregate", "approx", "as.formula", "coef", - "complete.cases", "confint", "constrOptim", "df.residual", - "dnorm", "fitted", "lm", "model.frame", "model.matrix", - "optim", "pnorm", "predict", "qchisq", "qnorm", "qt", - "quantile", "rbinom", "resid", "residuals", "rnorm", "sd", - "uniroot", "update", "var", "vcov", "AIC", "BIC", "logLik") -importFrom("utils", "setTxtProgressBar", "txtProgressBar") -export(bmd, bmdBoot, bmdIso, bmdIsoBoot, PAV, bmdMA, bootDataGen, bmdMACurve, BCa, invBmd, expandBinomial, - getStackingWeights, drmOrdinal, bmdOrdinal, bmdOrdinalMA, - qplotDrc, qplotBmd, MACurve, monotonicityTest, trendTest, bmdHetVar, drmHetVar, drmMMRE, bmdHetVarMA) +# Generated by roxygen2: do not edit by hand -## S3 methods -S3method(logLik, drcOrdinal) -S3method(logLik, drcHetVar) -S3method(AIC, drcOrdinal) -S3method(AIC, drcHetVar) -S3method(BIC, drcOrdinal) -S3method(BIC, drcHetVar) -S3method(plot, drcOrdinal) -S3method(print, drcOrdinal) -S3method(print, bmdOrdinal) -S3method(print, drcHetVar) -S3method(plot, bmd) -S3method(plot, drcHetVar) -S3method(vcov, drcMMRE) -S3method(print, drcMMRE) -S3method(coef, drcHetVar) \ No newline at end of file +S3method(AIC,drcHetVar) +S3method(AIC,drcOrdinal) +S3method(BIC,drcHetVar) +S3method(BIC,drcOrdinal) +S3method(coef,drcHetVar) +S3method(logLik,drcHetVar) +S3method(logLik,drcOrdinal) +S3method(plot,bmd) +S3method(plot,drcHetVar) +S3method(plot,drcOrdinal) +S3method(print,bmd) +S3method(print,bmdHetVar) +S3method(print,bmdOrdinal) +S3method(print,drcHetVar) +S3method(print,drcMMRE) +S3method(print,drcOrdinal) +S3method(vcov,drcMMRE) +export(BCa) +export(MACurve) +export(PAV) +export(bmd) +export(bmdBoot) +export(bmdHetVar) +export(bmdHetVarMA) +export(bmdIso) +export(bmdIsoBoot) +export(bmdMA) +export(bmdMACurve) +export(bmdOrdinal) +export(bmdOrdinalMA) +export(drmHetVar) +export(drmMMRE) +export(drmOrdinal) +export(getStackingWeights) +export(monotonicityTest) +export(qplotBmd) +export(qplotDrc) +export(trendTest) +import(dplyr) +import(drc) +import(ggplot2) +importFrom(graphics,lines) +importFrom(stats,AIC) +importFrom(stats,BIC) +importFrom(stats,aggregate) +importFrom(stats,approx) +importFrom(stats,as.formula) +importFrom(stats,coef) +importFrom(stats,complete.cases) +importFrom(stats,confint) +importFrom(stats,constrOptim) +importFrom(stats,df.residual) +importFrom(stats,dnorm) +importFrom(stats,fitted) +importFrom(stats,lm) +importFrom(stats,logLik) +importFrom(stats,model.frame) +importFrom(stats,model.matrix) +importFrom(stats,optim) +importFrom(stats,pnorm) +importFrom(stats,predict) +importFrom(stats,qchisq) +importFrom(stats,qnorm) +importFrom(stats,qt) +importFrom(stats,quantile) +importFrom(stats,rbinom) +importFrom(stats,resid) +importFrom(stats,residuals) +importFrom(stats,rnorm) +importFrom(stats,sd) +importFrom(stats,uniroot) +importFrom(stats,update) +importFrom(stats,var) +importFrom(stats,vcov) +importFrom(utils,setTxtProgressBar) +importFrom(utils,txtProgressBar) diff --git a/R/AIC.drcOrdinal.R b/R/AIC.drcOrdinal.R index 987bab8..7cc332f 100644 --- a/R/AIC.drcOrdinal.R +++ b/R/AIC.drcOrdinal.R @@ -1,3 +1,14 @@ + +#' AIC Method for drcOrdinal Objects +#' +#' Calculates the Akaike Information Criterion for drcOrdinal model objects. +#' +#' @param object A drcOrdinal model object +#' @param ... Additional arguments (not used) +#' @param k The penalty per parameter to be used; default is 2 +#' +#' @return The AIC value +#' @export AIC.drcOrdinal <- function(object, ..., k = 2) { dots <- list(...) if (!is.null(dots$epsilon)){ @@ -8,4 +19,4 @@ AIC.drcOrdinal <- function(object, ..., k = 2) { n.parameters <- sum(sapply(object$drmList, function(mod) length(mod$coefficients))) -2 * logLik(object, epsilon = epsilon) + k * n.parameters -} \ No newline at end of file +} diff --git a/R/BCa.R b/R/BCa.R index 2947263..54b47a3 100644 --- a/R/BCa.R +++ b/R/BCa.R @@ -1,25 +1,82 @@ +#' Calculate BCa (Bias-Corrected and Accelerated) Bootstrap Confidence Interval +#' +#' @description +#' This function calculates the BCa confidence interval for a given statistic using bootstrap and jackknife estimates. +#' +#' @details +#' It computes the BCa confidence interval for a statistic using bootstrap and jackknife estimates. +#' The BCa method adjusts for both bias and skewness in the bootstrap distribution and generally +#' provides better coverage than standard bootstrap confidence intervals. +#' +#' @param obs numeric; The observed value of the statistic computed from the original sample +#' @param data data.frame or matrix; The original dataset from which bootstrap samples are drawn +#' @param bootSample numeric vector; Bootstrap replicates of the statistic. Must be of length R +#' where R is the number of bootstrap replicates +#' @param bootjack numeric vector; Jackknife replicates of the statistic. Must be of length n +#' where n is the number of observations in data +#' @param level numeric; Confidence level between 0 and 1 (e.g., 0.95 for 95% confidence interval) +#' +#' @return A numeric vector of length 2 containing: +#' \itemize{ +#' \item lower: The lower confidence limit +#' \item upper: The upper confidence limit +#' } +#' +#' +#' @examples \dontrun{ +#' # Example with mean as the statistic +#' data <- rnorm(100) +#' obs_mean <- mean(data) +#' +#' # Generate bootstrap samples +#' R <- 1000 +#' boot_means <- replicate(R, mean(sample(data, replace = TRUE))) +#' +#' # Generate jackknife samples +#' jack_means <- sapply(1:length(data), +#' function(i) mean(data[-i])) +#' +#' # Calculate 95% CI +#' BCa(obs_mean, data, boot_means, jack_means, 0.95) +#' } +#' +#' @references +#' Efron, B. (1987). Better Bootstrap Confidence Intervals. +#' _Journal of the American Statistical Association_, 82(397), 171-185. +#' +#' DiCiccio, T. J., & Efron, B. (1996). Bootstrap confidence intervals. +#' _Statistical Science_, 11(3), 189-212. +#' +#' @export BCa <- function(obs, data, bootSample, bootjack, level){ -R <- length(bootSample) -b <- qnorm((sum(bootSample > obs)+sum(bootSample==obs)/2)/R) + R <- length(bootSample) + b <- qnorm((sum(bootSample > obs)+sum(bootSample==obs)/2)/R) -n <- nrow(data) -n1 <- n-1 -obsn <- obs*n -pv <- i <- 0 -while(i < n){ - i = i+1 -pv[i] = obsn-n1*bootjack[i] + n <- nrow(data) + n1 <- n-1 + obsn <- obs*n + pv <- i <- 0 + while(i < n){ + i = i+1 + pv[i] = obsn-n1*bootjack[i] + } + pv<-pv[!is.na(pv)] + + je <- mean(pv)-pv + a <- sum(je^3)/(6*sum(je^2))^(3/2) + + alpha <- (1-level)*2 + z <- qnorm(c(alpha/2,1-alpha/2)) # Std. norm. limits + p <- pnorm((z-b)/(1-a*(z-b))-b) # correct & convert to proportions + + quantile(bootSample,p=p) # ABC percentile lims. } -pv<-pv[!is.na(pv)] -je <- mean(pv)-pv -a <- sum(je^3)/(6*sum(je^2))^(3/2) -alpha <- (1-level)*2 -z <- qnorm(c(alpha/2,1-alpha/2)) # Std. norm. limits -p <- pnorm((z-b)/(1-a*(z-b))-b) # correct & convert to proportions -quantile(bootSample,p=p) # ABC percentile lims. -} + + + + diff --git a/R/BIC.drcOrdinal.R b/R/BIC.drcOrdinal.R index 3457d0e..91a18fc 100644 --- a/R/BIC.drcOrdinal.R +++ b/R/BIC.drcOrdinal.R @@ -1,3 +1,88 @@ +#' BIC Method for drcOrdinal Objects +#' +#' @description +#' S3 method to calculate the Bayesian Information Criterion (BIC) for fitted +#' ordinal dose-response models. This method extends the generic `BIC()` function +#' to handle `drcOrdinal` objects which contain multiple fitted dose-response models +#' for different response categories. +#' +#' @param object An object of class "drcOrdinal" containing fitted ordinal +#' dose-response models +#' @param ... Additional arguments passed to the method. Currently supports: +#' \itemize{ +#' \item \code{epsilon}: Small positive value to avoid log(0) in likelihood +#' calculations (default: 1e-16) +#' } +#' +#' @details +#' The BIC is calculated using the standard formula: +#' \deqn{BIC = k \log(n) - 2 \log(L)}{BIC = k * log(n) - 2 * log(L)} +#' where: +#' \itemize{ +#' \item \eqn{k}{k} is the total number of parameters across all models in the ordinal fit +#' \item \eqn{n}{n} is the total number of observations (sum of weights) +#' \item \eqn{L}{L} is the likelihood of the fitted model +#' } +#' +#' For ordinal dose-response models, the total number of parameters is the sum +#' of parameters from all individual models in the `drmList` component, and the +#' sample size is calculated as the sum of weights in the data. +#' +#' The `epsilon` parameter is used in the `logLik()` calculation to prevent +#' numerical issues when probabilities approach zero. +#' +#' @return A numeric value representing the BIC of the fitted ordinal dose-response model. +#' Lower values indicate better model fit when comparing models. +#' +#' @section Model Comparison: +#' BIC penalizes model complexity more heavily than AIC, making it useful for: +#' \itemize{ +#' \item Comparing ordinal dose-response models with different numbers of parameters +#' \item Model selection in situations where simpler models are preferred +#' \item Avoiding overfitting in dose-response modeling +#' } +#' +#' @note +#' This method assumes that the `drcOrdinal` object contains: +#' \itemize{ +#' \item A `drmList` component with fitted dose-response models +#' \item A `data` component with the original data including weights +#' \item A `weights` component specifying the column name for observation weights +#' } +#' +#' @seealso +#' \code{\link{BIC}} for the generic BIC function, +#' \code{\link{AIC.drcOrdinal}} for the corresponding AIC method, +#' \code{\link{logLik.drcOrdinal}} for the log-likelihood method +#' +#' @examples +#' \dontrun{ +#' # Assuming you have a fitted drcOrdinal object +#' ordinal_model <- drm(response ~ dose, +#' weights = count, +#' data = ordinal_data, +#' fct = cumulative.logit()) +#' +#' # Calculate BIC +#' bic_value <- BIC(ordinal_model) +#' +#' # Compare models +#' model1_bic <- BIC(ordinal_model1) +#' model2_bic <- BIC(ordinal_model2) +#' +#' # Lower BIC indicates better model +#' if(model1_bic < model2_bic) { +#' cat("Model 1 is preferred\n") +#' } else { +#' cat("Model 2 is preferred\n") +#' } +#' +#' # Use custom epsilon for numerical stability +#' bic_custom <- BIC(ordinal_model, epsilon = 1e-12) +#' } +#' +#' @method BIC drcOrdinal +#' @export BIC.drcOrdinal <- function(object, ...){ dots <- list(...) if (!is.null(dots$epsilon)){ diff --git a/R/EDhelper.R b/R/EDhelper.R new file mode 100644 index 0000000..155fa20 --- /dev/null +++ b/R/EDhelper.R @@ -0,0 +1,46 @@ +# HELPER FUNCTION BORROWED FROM DRC PACKAGE + +"EDhelper" <- function(parmVec, respl, reference, typeCalc, cond = TRUE) +{ + ## Works for log-logistic type dose-response models + + ## Converting absolute to relative + if (typeCalc == "absolute") + { + p <- 100 * ((parmVec[3] - respl) / (parmVec[3] - parmVec[2])) +# typeCalc <- "relative" + } else { + p <- respl + } + ## Swapping p for an increasing curve + if (cond) + { + if ((typeCalc == "relative") && (parmVec[1] < 0) && (reference == "control")) + { + p <- 100 - p + } + } else { + if ((typeCalc == "relative") && (reference == "control")) + { + p <- 100 - p + } + } + p +} + +## Used for FP models +"EDhelper2" <- function(parmVec, respl, reference, typeCalc, increasing) +{ + ## Converting absolute to relative + if (typeCalc == "absolute") + { + p <- 100 * (1 - (parmVec[3] - respl) / (parmVec[3] - parmVec[2])) + + } else { + + if (increasing) {p <- respl} else {p <- 100 - respl} + } + + p +} + diff --git a/R/MACurve.R b/R/MACurve.R index 46d219d..f71b383 100644 --- a/R/MACurve.R +++ b/R/MACurve.R @@ -1,3 +1,63 @@ +#' Model-average dose-response curves +#' +#' Computing weighted average response estimates across multiple dose-response +#' curves. +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' Details on the implemented definitions and methods can be found in Crump +#' (2002) +#' +#' @param x a vector of dose values for which the weighted average of response +#' estimates are to be computed +#' @param modelList list of models of class \code{drc} +#' @param modelWeights character string specifying the type of weights used, +#' "AIC", "BIC" or "Stack", or a vector of the same length as the modelList +#' with user defined weights +#' @param stackingSeed integer or NULL: Random seed to use in the data split in +#' the estimation of the Stacking Weights, when \code{modelWeights = "Stack"}. +#' The global seed is reset to the initial value after estimation of the +#' weights, so this option does not interfere with a globally set seed. +#' @param stackingSplits integer or "LOO": When \code{modelWeights = "Stack"}, +#' the Stacking Weights are estimated, which are based on V-fold +#' cross-validation. The stackingSplits argument sets the number V of data +#' splits used in the cross validation. The "LOO" (Leave one out) is a shortcut +#' to setting V equal to the number of observations in the data set. +#' @return numeric +#' @author Jens Riis Baalkilde +#' @keywords models nonlinear model averaging +#' @examples +#' +#' library(bmd) +#' library(drc) +#' library(drcData) +#' library(ggplot2) +#' +#' # fit models to aconiazide data +#' aconiazide.LL.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LL.3()) +#' aconiazide.LN.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LN.3()) +#' aconiazide.W1.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W1.3()) +#' aconiazide.W2.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W2.3()) +#' +#' # plot the MA curve +#' plot(aconiazide.LL.3, type = "obs") +#' curve( +#' MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3,aconiazide.W1.3, aconiazide.W2.3), +#' modelWeights = "AIC"), +#' add = TRUE) +#' +#' # or plot using ggplot2 +#' qplotDrc(aconiazide.LL.3, type = "obs") + +#' geom_function(fun = function(x){ +#' MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3, +#' aconiazide.W1.3, aconiazide.W2.3), +#' modelWeights = "AIC") +#' }) +#' +#' @export MACurve <- function(x, modelList, modelWeights, stackingSeed = 1, stackingSplits = 2){ diff --git a/R/PAV.R b/R/PAV.R index ced17b6..0020dbf 100644 --- a/R/PAV.R +++ b/R/PAV.R @@ -1,3 +1,26 @@ +#' Pool-adjacent-violators monotonizing +#' +#' The function monotonizes a sequence of probabilities or means based on the +#' pool-adjacent-violators algorithm. +#' +#' For details on how the pool-adjacent-violators algorithm is defined see +#' Silvapulle and Sen (2004). +#' +#' Formula should be specified as in the form number/total ~ dose for binomial +#' data and response ~ for continuous data. +#' +#' @param formula an object of class "formula" expressing dose-response +#' relationship. Details of model specification are given under 'Details' +#' @param data data frame containing the variables in the formula +#' @param type character string specifying the type of data used in the model, +#' "continuous" or "binomial" or "Poisson" +#' @return A vector containing the monotonized sequence. +#' @author Signe M. Jensen +#' @references Silvapulle, M. J. and Sen, P. K. (2004). Constrained statistical +#' inference: order, inequality, and shape constraints. New York: John Wiley & +#' Sons. +#' @keywords nonparametric isotonic regression +#' @export PAV<-function(formula,data,type){ object <- formula if( identical(type,"binomial")){ diff --git a/R/absToRel.R b/R/absToRel.R new file mode 100644 index 0000000..a3ff6dd --- /dev/null +++ b/R/absToRel.R @@ -0,0 +1,15 @@ +# HELPER FUNCTION BORROWED FROM DRC PACKAGE + +"absToRel" <- function(parmVec, respl, typeCalc) +{ + ## Converting absolute to relative + if (typeCalc == "absolute") + { + p <- 100 * ((parmVec[3] - respl) / (parmVec[3] - parmVec[2])) + } else { + p <- respl + } + + p +} + diff --git a/R/bmd-package.R b/R/bmd-package.R new file mode 100644 index 0000000..dc939fc --- /dev/null +++ b/R/bmd-package.R @@ -0,0 +1,19 @@ +#' BMD: Benchmark Dose Modeling +#' +#' A package for benchmark dose modeling in toxicology and risk assessment +#' +#' @import drc +#' @import ggplot2 +#' @import dplyr +#' @importFrom graphics lines +#' @importFrom stats aggregate approx as.formula coef complete.cases +#' @importFrom stats confint constrOptim df.residual dnorm fitted +#' @importFrom stats lm model.frame model.matrix optim pnorm predict +#' @importFrom stats qchisq qnorm qt quantile rbinom resid residuals +#' @importFrom stats rnorm sd uniroot update var vcov AIC BIC logLik +#' @importFrom utils setTxtProgressBar txtProgressBar +#' +#' @name bmd-package +#' @aliases bmd-package +"_PACKAGE" + diff --git a/R/bmd.R b/R/bmd.R index 3ce060b..f591cdb 100644 --- a/R/bmd.R +++ b/R/bmd.R @@ -1,3 +1,176 @@ +#' Benchmark dose estimation +#' +#' Estimation of benchmark doses and benchmark dose lower limit from dose +#' response model fits +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' Details on the implemented definitions and methods can be found in Crump +#' (2002) +#' +#' @param object object of class \code{drc} +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param backgType character string specifying how the background level is +#' specified. For binomial data the options are "modelBased" and "absolute". +#' For continuous data the options are "modelBased","absolute", "hybridSD" and +#' "hybridPercentile". For count data (Poisson, negbin1 or negbin2) the options +#' are "modelBased" and "absolute". +#' +#' "modelBased" - the background level is obtained from the model as the level +#' for dose 0: p0 = f(0) +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument: p0 = backg for binomial response and for the "relative", "extra" +#' and "added" definition for continuous or count response data. p0 = 1 - +#' phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. +#' +#' "hybridSD" - the background risk is specified by the user in terms of number +#' of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +#' f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +#' function and sigma is the SD for the control group. +#' +#' "hybridPercentile" - the background risk is specified by the user in terms +#' of percentile from the control group distribution (assuming a normal +#' distribution). p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. where x0 is +#' the level for which the response is considered adverse, phi is the normal +#' distribution function and sigma is the SD for the control group +#' +#' If not specified, it will be set to "modelBased" for all def excluding +#' "hybridExc" and "hybridAdd", for these the default is "hybridSD". +#' @param backg numeric value specifying the background level. Defaults to 0 +#' for "absolute" background risk for binomial response (1 for decreasing +#' dose-response models), 2 SD for "hybridSD" background and 0.9 for +#' "hybridPercentile" +#' @param controlSD numeric value specifying the standard deviation of the +#' control group (used in the hybrid approach). If not specified the SD for the +#' control group will be estimated as the square root of the residual variance +#' (assuming variance homogeneity). +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "excess", "additional" and "point" are for +#' binomial response. "relative", "extra", "added", "hybridExc" (excess +#' hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +#' response. "relative", "extra", and "point" are for count response data. +#' +#' "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +#' binomial response. BMR should be between 0 and 1. +#' +#' "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +#' response. BMR should be between 0 and 1. +#' +#' "point" - The response level for which to find BMD is directly defined +#' through the BMR level: BMR = f(BMD). Works for binomial, count and +#' continuous response data +#' +#' "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for +#' continuous and count response data +#' +#' "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +#' continuous and count response data +#' +#' "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +#' response +#' +#' "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +#' (1- p0), where x0 is the level for which the response is considered adverse, +#' phi is the normal distribution function and sigma is the SD for the control +#' group. Works for continuous response +#' +#' "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +#' where x0 is the level for which the response is considered adverse, phi is +#' the normal distribution function and sigma is the SD for the control group. +#' Works for continuous response +#' @param respTrans if the dose-response model is fitted with a transformed +#' response, specifying this option ensures that the background level for the +#' BMD is computed on the original scale. Options include "none" (default), +#' "log" (natural logarithm) and "sqrt"(square root). +#' @param interval character string specifying the type of confidence interval +#' to use: "delta" (default), "inv", "profile" or "profileGrid" +#' +#' "delta" - BMDL is based on the lower limit of a Wald confidence interval +#' based on the delta method +#' +#' "inv" - BMDL is based on inverse regression, that is the dose associated +#' with the upper limit of the pointwise confidence interval of the +#' dose-response curve. Currently not available for a transformed response +#' variable. +#' +#' "profile" - A profile confidence interval is computed by reparametrising the +#' model. Only available for \code{backgType} in ("modelBased", "absolute"), +#' \code{def} in ("excess", "additional","relative", "extra", "point") and +#' dose-response models with model functions of types Log-Logistic, Log-Normal +#' and Weibull 1 and 2. The limits of the confidence interval are searched for +#' within a grid of size specified by the \code{profileGridSize} argument, +#' however the values of the confidence interval are not limited to the values +#' on the grid. +#' +#' "profileGrid" - A profile confidence interval is computed by creating a +#' multi-dimensional grid of parameter values for the model. Then, a confidence +#' region for the parameters in the model is estimated, and the BMD is +#' estimated for all combinations of parameter values within the region. The +#' interval for the BMD is then computed as the minimum and maximum values of +#' BMD values within the region. Note that for models with several parameters +#' (3-5), is might take a while to compute the confidence interval using this +#' method. The number of grid points for each parameter can be specified by the +#' \code{profileGridSize} argument. +#' @param sandwich.vcov logical. If TRUE BMDL is based on confidence intervals +#' based on robust standard errors from the sandwich covariance matrix +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @param level numeric value specifying the levle of the confidence interval +#' underlying BMDL. Default is 0.95 +#' @param profileGridSize integer specifying the number of grid points used for +#' each parameter, when \code{interval} is either "profile" or +#' "profileGridSearch". Defaults to 20 if not specified. +#' @param profileProgressInfo logical. If TRUE, progress info is be printed +#' while computed profile confidence intervals using the \code{profileGrid} +#' method. Default is TRUE. +#' @return A list of four elements: Results contain the estimated BMD and BMDL, +#' bmrScaled is the response value corresponding to the BMD, interval gives the +#' lower (BMDL) and upper (BMDU) end of the confidence interval of BMD, SE +#' gives the standard error of BMD. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @references Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +#' Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +#' \bold{57}, 698--706. +#' +#' Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +#' Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' +#' ## Fitting log-logistic two-parameter model to binomial data +#' deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial") +#' +#' ## BMD for 5% additional risk with estimated background risk +#' bmd(deguelin.m1, 0.05, backgType = "modelBased", def = "additional") +#' +#' ## BMD for 10% additional risk with 2% background risk +#' bmd(deguelin.m1, 0.1, backg = 0.02 , backgType = "absolute", def = "additional") +#' +#' ## BMD for 5% excess risk and background 0 +#' bmd(deguelin.m1, 0.05, backg = 0, backgType = "absolute", def = "excess") +#' +#' ## Dose resulting in 12% risk +#' bmd(deguelin.m1, 0.12, def = "point") +#' +#' ## Benchmark doses for a continuous response +#' ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) +#' +#' ## BMD as the dose resulting in a 5% change relative to the mean background level +#' bmd(ryegrass.m1, 0.05, backgType = "modelBased", def = "relative", display = TRUE) +#' +#' ## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk +#' bmd(ryegrass.m1, 0.05, backg = 2, backgType = "hybridSD", def = "hybridAdd", display = TRUE) +#' +#' +#' @export bmd<-function(object, bmr, backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), backg=NA, controlSD=NA, def = c("excess", "additional", @@ -92,7 +265,7 @@ bmd<-function(object, bmr, backgType = c("modelBased", "absolute", "hybridSD", " if(inherits(object, "drcMMRE")){ intMat <- matrix(qnorm(c((1-level)/2, 1-(1-level)/2), mean = bmdVal, sd = bmdSEVal), ncol = 2) } else { - intMat <- drc:::confint.basic(matrix(c(bmdVal, bmdSEVal), ncol = 2), + intMat <- confint_basic(matrix(c(bmdVal, bmdSEVal), ncol = 2), level = level, object$"type", df.residual(object), FALSE) } } else if(interval == "inv"){ @@ -178,7 +351,7 @@ bmd<-function(object, bmr, backgType = c("modelBased", "absolute", "hybridSD", " bmdSEVal <- sqrt(dBmdVal %*% varCov %*% dBmdVal) if(interval == "delta"){ - intMat <- drc:::confint.basic(matrix(c(bmdVal, bmdSEVal), ncol = 2), + intMat <- confint_basic(matrix(c(bmdVal, bmdSEVal), ncol = 2), level = level, object$"type", df.residual(object), FALSE) } diff --git a/R/bmd.edfct.R b/R/bmd.edfct.R index e518b85..285edc7 100644 --- a/R/bmd.edfct.R +++ b/R/bmd.edfct.R @@ -9,10 +9,10 @@ bmd.edfct <- function(object){ # Log-logistic if(identical(class(object$fct), "llogistic")){ if(substr(object$fct$name, 3,3) == "."){ - edfct <- function(parm, respl, reference, type, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) { parmVec[notFixed] <- parm - p <- drc:::EDhelper(parmVec, respl, reference, type) + p <- EDhelper(parmVec, respl, reference, type) tempVal <- log((100-p)/100) EDp <- parmVec[4]*(exp(-tempVal/parmVec[5])-1)^(1/parmVec[1]) @@ -31,11 +31,11 @@ bmd.edfct <- function(object){ return(list(EDp, EDder[notFixed])) } } else if(substr(object$fct$name, 3,3) == "2"){ - edfct <- function(parm, respl, reference, type, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) { parmVec[notFixed] <- parm - p <- drc:::EDhelper(parmVec, respl, reference, type) + p <- EDhelper(parmVec, respl, reference, type) tempVal <- log((100-p)/100) EDp <- exp(parmVec[4])*(exp(-tempVal/parmVec[5])-1)^(1/parmVec[1]) @@ -58,10 +58,10 @@ bmd.edfct <- function(object){ # Log-Normal if(identical(class(object$fct), "log-normal")){ - edfct <- function(parm, respl, reference, type, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) { parmVec[notFixed] <- parm - p <- drc:::absToRel(parmVec, respl, type) + p <- absToRel(parmVec, respl, type) ## Reversing p if (identical(type, "absolute")) @@ -102,10 +102,10 @@ bmd.edfct <- function(object){ # Weibull1 if(identical(class(object$fct), "Weibull-1")){ - edfct <- function(parm, respl, reference, type, ...) # function(parm, p, reference, type, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) # function(parm, p, reference, type, ...) { parmVec[notFixed] <- parm - p <- drc:::EDhelper(parmVec, respl, reference, type) + p <- EDhelper(parmVec, respl, reference, type) tempVal <- log(-log((100-p)/100)) EDp <- exp(tempVal/parmVec[1] + log(parmVec[4])) @@ -124,11 +124,11 @@ bmd.edfct <- function(object){ # Weibull2 if(identical(class(object$fct), "Weibull-2")){ - edfct <- function(parm, respl, reference, type, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) { parmVec[notFixed] <- parm - p <- drc:::absToRel(parmVec, respl, type) + p <- absToRel(parmVec, respl, type) ## Reversing p if ( (parmVec[1] > 0) && (reference == "control") && (type == "relative") ) @@ -151,10 +151,10 @@ bmd.edfct <- function(object){ } if(identical(class(object$fct), "Boltzmann")){ - edfct <- function(parm, respl, reference, type, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) { parmVec[notFixed] <- parm - p <- drc:::EDhelper(parmVec, respl, reference, type) + p <- EDhelper(parmVec, respl, reference, type) # if (parmVec[1] > 0) # { @@ -195,17 +195,17 @@ bmd.edfct <- function(object){ } if(identical(class(object$fct), "braincousens")){ - edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) { # if (is.missing(upper)) {upper <- 1000} interval <- c(lower, upper) parmVec[notFixed] <- parm - p <- drc:::EDhelper(parmVec, respl, reference, type) + p <- EDhelper(parmVec, respl, reference, type) tempVal <- (100-p)/100 edfct0 <- function(parmVec){ - p <- drc:::EDhelper(parmVec, respl, reference, type) + p <- EDhelper(parmVec, respl, reference, type) tempVal <- (100-p)/100 helpEqn <- function(dose) @@ -240,12 +240,16 @@ bmd.edfct <- function(object){ } if(identical(class(object$fct), "fp-logistic")){ + if(!requireNamespace("numDeriv")){ + stop('package "numDeriv" must be installed to use FPL models') + } + p1 <- as.numeric(unlist(strsplit(object$fct$name, split = "[,()]+"))[2]) p2 <- as.numeric(unlist(strsplit(object$fct$name, split = "[,()]+"))[3]) - edfct <- function(parm, respl, reference, type, loged = FALSE, ...) + edfct <- function(parm, respl, reference, type, lower = 1e-3, upper = 10000, loged = FALSE, ...) { parmVec[notFixed] <- parm - p <- drc:::EDhelper2(parmVec, respl, reference, type, parmVec[1] > 0) + p <- EDhelper2(parmVec, respl, reference, type, parmVec[1] > 0) invfp <- function(resp, b, e) { @@ -260,7 +264,7 @@ bmd.edfct <- function(object){ EDfct0 <- function(par) { - p <- drc:::EDhelper2(par, respl, reference, type, par[1] > 0) + p <- EDhelper2(par, respl, reference, type, par[1] > 0) invfp(log((100-p)/p), par[1], par[4]) } diff --git a/R/bmdBoot.R b/R/bmdBoot.R index 5ea7581..dc4568b 100644 --- a/R/bmdBoot.R +++ b/R/bmdBoot.R @@ -1,3 +1,131 @@ +#' Benchmark dose estimation using bootstrap +#' +#' The function estimates BMD and BMDL using bootstrap based on parametric +#' dose-response models. +#' +#' BMDL is defined as the 5th percentile in the bootstrap distribution. +#' +#' Bootstrapping with the argument boot = "nonparametric" is done by sampling +#' with replacement from the original data set. Bootstrapping with the argument +#' boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), +#' assuming equal variance between groups, in case of continuous data. For +#' binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). +#' In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the +#' resampling always produces 0 or 1, respectively. In this case data is +#' sampled from binom(N_i,(Y_i+1/4)/(N_i+1/2)). Bootstrapping with argument +#' boot = "semiparametric" is done by sampling with replacement from the +#' residuals. +#' +#' All sampling is made within dose groups. +#' +#' @param object object of class \code{drc} +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param R number of bootstrap samples. Default is 1000 +#' @param bootType character string specifying type of bootstrap used. +#' "nonparametric" (default), "semiparametric" or "parametric". "Semiparametric +#' is only available for continuous data and "nonparametric" is at present the +#' only option for count data. See details below +#' @param bmdType Type of estimate for BMD. Default is "orig" the bmd estimate +#' from the original data set. Other choices are "mean" - the mean of the +#' bootstrap estimates, or "median" - the median of the bootstrap estimates +#' @param backgType character string specifying how the background level is +#' specified. For binomial and count data the options are "modelBased" and +#' "absolute". For continuous data the options are "modelBased", "absolute", +#' "hybridSD" and "hybridPercentile" +#' +#' "modelBased" - the background level is obtained from the model as the level +#' for dose 0: p0 = f(0) +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument: p0 = backg for binomial response and for the "relative", "extra" +#' and "added" definition for continuous response. p0 = 1 - phi((back - +#' f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. +#' +#' "hybridSD" - the background risk is specified by the user in terms of number +#' of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +#' f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +#' function and sigma is the SD for the control group. "hybridPercentile" - +#' the background risk is specified by the user in terms of percentile from the +#' control group distribution (assuming a normal distribution). p0 = 1 - +#' phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +#' response is considered adverse, phi is the normal distribution function and +#' sigma is the SD for the control group +#' @param backg numeric value specifying the background level. Defaults to 0 +#' for "absolute" background level for binomial response (1 for decreasing +#' dose-response models), 2 SD for "hybridSD" background and 0.9 for +#' "hybridpercentile" +#' @param controlSD numeric value specifying the standard deviation of the +#' control group (used in the hybrid approach). If not specified the SD for the +#' control group will be estimated as the square root of the residual variance +#' (assuming variance homogeneity). +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "excess" , "additional" and "point" are for +#' binomial response whereas "relative", "extra", "added", "hybridExc" (excess +#' hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +#' response. "relative", "extra", and "point" are for count response data. +#' +#' "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +#' binomial response. BMR should be between 0 and 1. +#' +#' "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +#' response. BMR should be between 0 and 1. +#' +#' "point" - The response level for which to find BMD is directly defined +#' through the BMR level: BMR = f(BMD). Works for binomial, count and +#' continuous response +#' +#' "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +#' continuous response +#' +#' "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +#' count and continuous response +#' +#' "added" - BMR is defined as: BMR= f(BMD) + p0. Works for count and +#' continuous response +#' +#' "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +#' (1- p0), where x0 is the level for which the response is considered adverse, +#' phi is the normal distribution function and sigma is the SD for the control +#' group. Works for continuous response +#' +#' "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +#' where x0 is the level for which the response is considered adverse, phi is +#' the normal distribution function and sigma is the SD for the control group. +#' Works for continuous response +#' @param respTrans if the dose-response model is fitted with a transformed +#' response, specifying this option ensures that the background level for the +#' BMD is computed on the original scale. Options include "none" (default), +#' "log" (natural logarithm) and "sqrt"(square root). +#' @param bootInterval character string indicating type of bootstrap interval +#' used for estimating BMDL. "Percentile" (default) or "BCa" (Bias corrected +#' and adjusted) +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @param level numeric value specifying the levle of the confidence interval +#' underlying BMDL. Default is 0.95 +#' @return A list of three elements: Results contain the estimated BMD and +#' BMDL, bootEst is a vector af all of the estimated BMD values from each +#' bootstrap sample, Interval gives BMDL and BMDU, which is identical to the +#' confidence interval for the percentile interval approach. +#' @author Signe M. Jensen +#' @keywords bootstrap +#' @examples +#' +#' ## Data on root length in ryegrass after exposure to ferulic acid +#' require(drc) +#' require(drcData) +#' data(ryegrass) +#' +#' ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) +#' +#' ## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk +#' bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", R = 50) +#' +#' ## BMD from the same definitions but using parametric bootstrap +#' bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", bootType="parametric",R = 50) +#' +#' @export bmdBoot <- function(object, bmr, R=1000, bootType="nonparametric", bmdType = "orig", backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), backg=NA, @@ -352,4 +480,4 @@ bmdBoot <- function(object, bmr, R=1000, bootType="nonparametric", bmdType = "or interval = intMat) class(resBMD) <- "bmd" invisible(resBMD) -} \ No newline at end of file +} diff --git a/R/bmdHetVar.R b/R/bmdHetVar.R index e52f69d..5b75288 100644 --- a/R/bmdHetVar.R +++ b/R/bmdHetVar.R @@ -1,3 +1,118 @@ +#' Benchmark dose estimation with heterogeneous variance +#' +#' Estimation of benchmark doses and benchmark dose lower limit based on the +#' hybrid method from dose response model fits with the option to specify a +#' heterogeneous variance structure, where the variance depends on the dose +#' level and/or the fitted values +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' REFERENCES TO BE ADDED/WRITTEN +#' +#' @param object dose-response model with a heterogeneous variance structure of +#' class \code{drcHetVar} +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param backgType character string specifying how the background level is +#' specified. The options are "absolute", "hybridSD" and "hybridPercentile". +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument: p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and +#' "hybridAdd" definitions. +#' +#' "hybridSD" - the background risk is specified by the user in terms of number +#' of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma(0) + +#' f(0)) - f(0))/sigma(0)) = 1 - phi(backg), where phi is the normal +#' distribution function and sigma(0) is the SD for the control group. +#' +#' "hybridPercentile" - the background risk is specified by the user in terms +#' of percentile from the control group distribution (assuming a normal +#' distribution). p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. where x0 is +#' the level for which the response is considered adverse, phi is the normal +#' distribution function and sigma(0) is the SD for the control group +#' @param backg numeric value specifying the background level. Defaults to 2 SD +#' for "hybridSD" background and 0.9 for "hybridPercentile" +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" +#' (additional hybrid), available. +#' +#' "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - +#' p0)/ (1- p0), where x0 is the level for which the response is considered +#' adverse, phi is the normal distribution function and sigma(BMD) is the SD at +#' the benchmark dose. +#' +#' "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - +#' p0, where x0 is the level for which the response is considered adverse, phi +#' is the normal distribution function and sigma(BMD) is the SD at the +#' benchmark dose. +#' @param interval character string specifying the type of confidence interval +#' to use: "boot" (default) or "none" +#' +#' "boot" - BMDL is based on percentile bootstrapping. +#' +#' "none" - no confidence interval is computed. +#' @param R number of bootstrap samples. Ignored if \code{interval = "none"} +#' @param level numeric value specifying the levle of the confidence interval +#' underlying BMDL. Default is 0.95 +#' @param bootType character string specifying the type of bootstrap samples. +#' Options are "nonparametric" (observations are drawn without replacement from +#' the original data set), "semi-parametric" (standardised residuals are drawn +#' with replacement and subsequently rescaled according to the model) and +#' "parametric" (new observations are simulated from the distribution given by +#' the fitted model). +#' @param progressInfo logical. If TRUE, progress info is be printed while +#' bootstrap confidence intervals are estimated. Default is TRUE. +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @return A list of five elements: Results contain the estimated BMD and BMDL, +#' bmrScaled is the response value corresponding to the BMD, interval gives the +#' lower (BMDL) and upper (BMDU) end of the confidence interval of BMD +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' library(bmd) +#' # install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT. +#' +#' # ryegrass data +#' set.seed(123) +#' ryegrass.LL.4.hetVar <- drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), +#' data = ryegrass, fct = LL.4()) +#' plot(ryegrass.LL.4.hetVar) +#' bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, +#' def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, +#' display = TRUE) # increase R +#' bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, +#' def = "hybridExc", R = 50, level = 0.95, +#' bootType = "parametric", progressInfo = TRUE, display = TRUE) # parametric bootstrap +#' +#' # barley data +#' set.seed(123) +#' barley.LL.4.hetVar <- drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), data = barley, fct = LL.4()) +#' plot(barley.LL.4.hetVar) +#' bmdHetVar(barley.LL.4.hetVar, bmr = 0.1, backgType = "hybridSD", backg = 1, +#' def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) +#' +#' # GiantKelp data +#' set.seed(123) +#' GiantKelp.LL.4.hetVarSq <- drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), +#' data = GiantKelp, fct = LL.4()) +#' plot(GiantKelp.LL.4.hetVarSq) +#' bmdHetVar(GiantKelp.LL.4.hetVarSq, bmr = 0.1, backgType = "hybridSD", backg = 1, +#' def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) +#' +#' GiantKelp.LL.4.hetVarLogSq <- drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), +#' data = GiantKelp, fct = LL.4()) +#' plot(GiantKelp.LL.4.hetVarLogSq) +#' bmdHetVar(GiantKelp.LL.4.hetVarLogSq, bmr = 0.1, backgType = "hybridSD", backg = 1, +#' def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) +#' +#' @export bmdHetVar <- function(object, bmr, backgType = c("absolute", "hybridSD", "hybridPercentile"), backg = NA, def = c("hybridExc", "hybridAdd"), interval = c("boot", "none"), R = 1000, level = 0.95, bootType = "nonparametric", progressInfo = TRUE, display = TRUE){ ### Assertions ### # object @@ -171,4 +286,4 @@ bmdHetVar <- function(object, bmr, backgType = c("absolute", "hybridSD", "hybrid model = object) class(resBMD) <- c("bmdHetVar", "bmd") invisible(resBMD) -} \ No newline at end of file +} diff --git a/R/bmdHetVarMA.R b/R/bmdHetVarMA.R index 060c0aa..22a1fa0 100644 --- a/R/bmdHetVarMA.R +++ b/R/bmdHetVarMA.R @@ -1,3 +1,117 @@ +#' Benchmark dose estimation with heterogeneous variance based on model +#' averaging (MA) +#' +#' Estimation of benchmark doses and benchmark dose lower limit based on the +#' hybrid method from a list of dose response model fits with the option to +#' specify a heterogeneous variance structure, where the variance depends on +#' the dose level and/or the fitted values +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' REFERENCES TO BE ADDED/WRITTEN +#' +#' @param modelList a list of dose-response models with a heterogeneous +#' variance structure of class \code{drcHetVar} +#' @param modelWeights character string specifying the type of weights used, +#' "AIC" or "BIC", or a numeric vector of the same length as the modelList with +#' user defined weights +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param backgType character string specifying how the background level is +#' specified. The options are "absolute", "hybridSD" and "hybridPercentile". +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument: p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and +#' "hybridAdd" definitions. +#' +#' "hybridSD" - the background risk is specified by the user in terms of number +#' of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma(0) + +#' f(0)) - f(0))/sigma(0)) = 1 - phi(backg), where phi is the normal +#' distribution function and sigma(0) is the SD for the control group. +#' +#' "hybridPercentile" - the background risk is specified by the user in terms +#' of percentile from the control group distribution (assuming a normal +#' distribution). p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. where x0 is +#' the level for which the response is considered adverse, phi is the normal +#' distribution function and sigma(0) is the SD for the control group +#' @param backg numeric value specifying the background level. Defaults to 2 SD +#' for "hybridSD" background and 0.9 for "hybridPercentile" +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" +#' (additional hybrid), available. +#' +#' "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - +#' p0)/ (1- p0), where x0 is the level for which the response is considered +#' adverse, phi is the normal distribution function and sigma(BMD) is the SD at +#' the benchmark dose. +#' +#' "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - +#' p0, where x0 is the level for which the response is considered adverse, phi +#' is the normal distribution function and sigma(BMD) is the SD at the +#' benchmark dose. +#' @param interval character string specifying the type of confidence interval +#' to use: "boot" (default) or "none" +#' +#' "boot" - BMDL is based on nonparametric percentile bootstrapping. +#' +#' "none" - no confidence interval is computed. +#' @param R number of bootstrap samples. Ignored if \code{interval = "none"} +#' @param level numeric value specifying the levle of the confidence interval +#' underlying BMDL. Default is 0.95 +#' @param progressInfo logical. If TRUE, progress info is be printed while +#' bootstrap confidence intervals are estimated. Default is TRUE. +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @return A list of four elements: Results contain the estimated BMD and BMDL, +#' Boot.samples.used gives the number of boot samples that resulted in +#' succesful estimations and were accordingly used in the estimation of BMDL +#' (and BMDU), Interval gives BMDL and BMDU, which is identical to the +#' confidence interval for the percentile interval approach, and modelWeights +#' includes the estimated weights. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' library(bmd) +#' # install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT. +#' +#' # ryegrass data +#' set.seed(123) +#' ryegrass.hetVar.list <- list( +#' drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LL.4()), +#' drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LN.4()), +#' drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W1.4()), +#' drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W2.4())) +#' bmdHetVarMA(ryegrass.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridPercentile", +#' backg = 0.1, def = "hybridExc", R = 100, level = 0.95) +#' bmdHetVarMA(ryegrass.hetVar.list, modelWeights = c(0.4, 0.2, 0.1, 0.3), bmr = 0.1, +#' backgType = "hybridPercentile", backg = 0.1, +#' def = "hybridExc", R = 50, level = 0.95) # user-defined weights +#' +#' # barley data +#' set.seed(123) +#' barley.hetVar.list <- list(drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), +#' data = barley, fct = LL.4()), +#' drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), +#' data = barley, fct = W2.4())) +#' bmdHetVarMA(barley.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD", backg = 2, +#' def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) +#' +#' # GiantKelp data +#' set.seed(123) +#' GiantKelp.hetVar.list <- list( +#' drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), data = GiantKelp, fct = LL.4()), +#' drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), data = GiantKelp, fct = LL.4())) +#' bmdHetVarMA(GiantKelp.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD", +#' backg = 1, def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, +#' display = TRUE) +#' +#' @export bmdHetVarMA <- function(modelList, modelWeights = c("AIC", "BIC"), bmr, backgType = c("absolute", "hybridSD", "hybridPercentile"), backg = NA, def = c("hybridExc", "hybridAdd"), interval = c("boot", "none"), R = 1000, level = 0.95, progressInfo = TRUE, display = TRUE){ ### Assertions ### # modelList @@ -122,4 +236,4 @@ bmdHetVarMA <- function(modelList, modelWeights = c("AIC", "BIC"), bmr, backgTyp modelWeights = modelWeights0) class(resBMD) <- c("bmdHetVar", "bmd") invisible(resBMD) -} \ No newline at end of file +} diff --git a/R/bmdIso.R b/R/bmdIso.R index 9982f4d..ee855e9 100644 --- a/R/bmdIso.R +++ b/R/bmdIso.R @@ -1,3 +1,127 @@ +#' Benchmark dose estimation from isotonic regression +#' +#' The function monotonizes the sequence of response values based on the +#' pool-adjacent violators algorithm and based on these use linear +#' interpolating splines to build an isotonic regression model. From this model +#' a benchmark dose is estimated. +#' +#' Formula should be specified as in the form number/total ~ dose for binomial +#' data. For details about the use of isotonic regression for BMD estimation +#' see Piegorsch et al. (20014) and Lin et al. (2015). +#' +#' @param formula an object of class "formula" expressing the dose-response +#' relationship. Details of model specification are given under 'Details' +#' @param data data frame containing the variables in the model +#' @param type character string specifying the type of data used in the model. +#' "continuous", "binomial" or "Poisson" +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param p0 background probability for hybrid definitions +#' @param backgType character string specifying how the background level is +#' specified. For binomial data the options are "modelBased" and "absolute". +#' For continuous data the options are "absolute", "hybridSD" and +#' "hybridPercentile" +#' +#' "modelBased" - the background level is obtained from the model as the level +#' for dose 0: p0 = f(0) +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument: p0 = backg for binomial response and for the "relative" and +#' "added" definition for continuous response. p0 = 1 - phi((back - +#' f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. +#' +#' "hybridSD" - the background risk is specified by the user in terms of number +#' of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +#' f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +#' function and sigma is the SD for the control group. "hybridPercentile" - +#' the background risk is specified by the user in terms of percentile from the +#' control group distribution (assuming a normal distribution). p0 = 1 - +#' phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +#' response is considered adverse, phi is the normal distribution function and +#' sigma is the SD for the control group +#' @param backg numeric value specifying the background level. Defaults to 0 +#' for "absolute" background risk for binomial response (1 for decreasing +#' dose-response models), 2 SD for "hybridSD" background and 0.9 for +#' "hybridpercentile" +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "excess", "additional" and "point" are for +#' binomial response whereas "relative", "added", "hybridExc" (excess hybrid), +#' "hybridAdd" (additional hybrid), and "point" are for continuous response. +#' "relative", "extra", and "point" are for count response data. +#' +#' "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +#' binomial response. BMR should be between 0 and 1. +#' +#' "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +#' response. BMR should be between 0 and 1. +#' +#' "point" - The response level for which to find BMD is directly defined +#' through the BMR level: BMR = f(BMD). Works for binomial, count and +#' continuous response +#' +#' "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +#' continuous response +#' +#' "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +#' response +#' +#' "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +#' (1- p0), where x0 is the level for which the response is considered adverse, +#' phi is the normal distribution function and sigma is the SD for the control +#' group. Works for continuous response +#' +#' "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +#' where x0 is the level for which the response is considered adverse, phi is +#' the normal distribution function and sigma is the SD for the control group. +#' Works for continuous response +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @return A matrix with two columns, one containing BMD and the other +#' containing BMDL. +#' @author Signe M. Jensen +#' @references Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. +#' (2014). Benchmark dose analysis via nonparametric regression modeling. Risk +#' Analysis, 34(1), 135-151 +#' +#' Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric +#' benchmark dose estimation with continuous dose-response data. Scandinavian +#' Journal of Statistics, 42, 713-731 +#' @keywords nonparametric isotonic regression +#' @examples +#' +#' ## Data on tumor incidence in rats after exposure to formaldehyde, from Piegorsch et al. (2014) +#' formaldehyde <- data.frame(conc = c(0.0, 0.7, 2.0, 6.0, 10.0, 15.0), +#' tumor.incidence = c(0, 0, 0, 3, 21, 150), +#' total = c(122, 27, 126, 113, 34, 182)) +#' +#' # Estimating BMD from isotonic regression using excess risk definition and a BMR=0.1 +#' bmdIso(tumor.incidence/total ~ conc, +#' data=formaldehyde, +#' type="binomial", +#' bmr=0.1, +#' backgType = "modelBased", +#' def = "excess") +#' +#' +#' ## Data on root length in ryegrass after exposure to ferulic acid +#' require(drc) +#' require(drcData) +#' data(ryegrass) +#' +#' # As isotonic regression only wors for increasing dose-response relationship +#' # the association is turned +#' ryegrass1<-ryegrass +#' ryegrass1$rootl<-100-ryegrass1$rootl +#' +#' # Estimating BMD from isotonic regression using relative risk definition +#' # and a BMR=0.05 +#' bmdIso(rootl ~ conc, +#' data=ryegrass1, +#' type="continuous", +#' bmr=0.05, +#' backgType = "modelBased", +#' def = "relative") +#' @export bmdIso <- function(formula, data, type, bmr, p0, backgType = c("modelBased", "absolute","hybridSD","hybridPercentile"), backg=NA, def = c("excess", "additional", "relative", "added", "hybridExc", "hybridAdd", "point"), display=FALSE){ object <- formula PAV.p <- PAV(object, data, type) diff --git a/R/bmdIsoBoot.R b/R/bmdIsoBoot.R index 67f17a9..8b33f7e 100644 --- a/R/bmdIsoBoot.R +++ b/R/bmdIsoBoot.R @@ -1,3 +1,140 @@ +#' Benchmark dose estimation from isotonic regression +#' +#' The function estimates BMD and BMDL using bootstrap based on isotonic +#' regression. +#' +#' BMD and BMDL is defined as the median and the 5th percentile in the +#' bootstrap distribution, respectively. +#' +#' Formula should be specified as in the form number/total ~ dose for binomial +#' data. +#' +#' Bootstrapping with the argument boot = "resample" is done by sampling with +#' replacement from the original data set. Bootstrapping with the argument boot +#' = "pseudorandom" is done by sampling from norm(mean(Y_i),sd(Y_0)), assuming +#' equal variance between groups, in case of continuous data. For binomial +#' data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). In case of +#' Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the resampling always +#' produces 0 or 1, respectively. In this case data is sampled from +#' binom(N_i,(Y_i+1/3)/(N_i+1/3)). +#' +#' All sampling is made within dose groups. +#' +#' For details about the use of isotonic regression for BMD estimation see +#' Piegorsch et al. (20014) and Lin et al. (2015). +#' +#' @param formula an object of class "formula" expressing dose-response +#' relationship. Details of model specification are given under 'Details' +#' @param data data frame containing the variables in the model +#' @param type character string specifying the type of data used in the model. +#' "continuous" or "binomial" or "Poisson" +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param R number of bootstrap samples +#' @param boot character string specifying type of bootstrap used. "resample" +#' or "pseudorandom". Only option for count data is "resample" +#' @param backgType character string specifying how the background level is +#' specified. For binomial data the options are "modelBased" and "absolute". +#' For continuous data the options are "modelBased", "absolute", "hybridSD" and +#' "hybridPercentile" +#' +#' "modelBased" - the background level is obtained from the model as the level +#' for dose 0: p0 = f(0) +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument: p0 = backg for binomial response and for the "relative" and +#' "added" definition for continuous response. p0 = 1 - phi((back - +#' f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. +#' +#' "hybridSD" - the background risk is specified by the user in terms of number +#' of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +#' f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +#' function and sigma is the SD for the control group. "hybridPercentile" - +#' the background risk is specified by the user in terms of percentile from the +#' control group distribution (assuming a normal distribution). p0 = 1 - +#' phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +#' response is considered adverse, phi is the normal distribution function and +#' sigma is the SD for the control group +#' @param backg numeric value specifying the background level. Defaults to 0 +#' for "absolute" background risk for binomial response (1 for decreasing +#' dose-response models), 2 SD for "hybridSD" background and 0.9 for +#' "hybridpercentile" +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "excess", "additional" and "point" are for +#' binomial response whereas "relative", "added", "hybridExc" (excess hybrid), +#' "hybridAdd" (additional hybrid), and "point" are for continuous response. +#' "relative", "extra", and "point" are for count response data. +#' +#' "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +#' binomial response. BMR should be between 0 and 1. +#' +#' "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +#' response. BMR should be between 0 and 1. +#' +#' "point" - The response level for which to find BMD is directly defined +#' through the BMR level: BMR = f(BMD). Works for binomial, count and +#' continuous response +#' +#' "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +#' continuous response +#' +#' "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +#' response +#' +#' "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +#' (1- p0), where x0 is the level for which the response is considered adverse, +#' phi is the normal distribution function and sigma is the SD for the control +#' group. Works for continuous response +#' +#' "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +#' where x0 is the level for which the response is considered adverse, phi is +#' the normal distribution function and sigma is the SD for the control group. +#' Works for continuous response +#' @return A matrix with two columns, one containing BMD and the other +#' containing BMDL. +#' @author Signe M. Jensen +#' @references Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. +#' (2014). Benchmark dose analysis via nonparametric regression modeling. Risk +#' Analysis, 34(1), 135-151 +#' +#' Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric +#' benchmark dose estimation with continuous dose-response data. Scandinavian +#' Journal of Statistics, 42, 713-731 +#' @keywords nonparametric isotonic regression bootstrap +#' @export +#' @examples +#' +#' ## Data on tumor incidence in rats after exposure to formaldehyde, from Piegorsch et al. (2014) +#' formaldehyde <- data.frame(conc = c(0.0, 0.7, 2.0, 6.0, 10.0, 15.0), +#' tumor.incidence = c(0, 0, 0, 3, 21, 150), +#' total = c(122, 27, 126, 113, 34, 182)) +#' +#' # BMD and BMDL from isotonic regression using excess risk definition and a BMR=0.1 +#' bmdIsoBoot(tumor.incidence/total ~ conc, +#' data=formaldehyde, +#' type="binomial", +#' bmr=0.1, +#' backgType = "modelBased", +#' def = "excess") +#' +#' +#' ## Data on root length in ryegrass after exposure to ferulic acid +#' require(drc) +#' data(ryegrass) +#' +#' # As isotonic regression only wors for increasing dose-response relationship +#' # the association is turned +#' ryegrass1<-ryegrass +#' ryegrass1$rootl<-100-ryegrass1$rootl +#' +#' # Estimating BMD from isotonic regression using relative risk definition and a BMR=0.05 +#' bmdIsoBoot(rootl ~ conc, +#' data=ryegrass1, +#' type="continuous", +#' bmr=0.05, +#' backgType = "modelBased", +#' def = "relative", R = 100) +#' bmdIsoBoot <- function(formula, data, type, bmr, R=1000, boot="resample", backgType = c("modelBased", "absolute","hybridSD","hybridPercentile"), backg=NA, diff --git a/R/bmdMA.R b/R/bmdMA.R index ec38cbc..5c7a45f 100644 --- a/R/bmdMA.R +++ b/R/bmdMA.R @@ -1,3 +1,212 @@ +#' Model-averaged benchmark dose estimation +#' +#' Estimation of benchmark doses and benchmark dose lower limit based on model +#' averaging from a user-defined list of dose response model fits +#' +#' This package project is still under development. The aim to provide an R +#' package calculating the benchmark dose (BMD) and the lower limit of the +#' corresponding 95\% confidence interval (BMDL) for continuous and quantal +#' dose-response data for a range of dose-response model based on the available +#' definitions of the benchmark dose concepts. +#' +#' Details on the implemented definitions and methods can be found in Crump +#' (2002) +#' +#' Bootstrapping with the argument boot = "nonparametric" is done by sampling +#' with replacement from the original data set. Bootstrapping with the argument +#' boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), +#' assuming equal variance between groups, in case of continuous data. For +#' binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). +#' In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the +#' resampling always produces 0 or 1, respectively. In this case data is +#' sampled from binom(N_i,(Y_i+1/3)/(N_i+1/3)). +#' +#' All sampling is made within dose groups. +#' +#' @param modelList list of models of class \code{drc} +#' @param modelWeights character string specifying the type of weights used, +#' "AIC", "BIC" or "Stack" (Baalkilde, J. R., Hansen, N. R., and Jensen, S. M., +#' 2025), or a vector of the same length as the modelList with user defined +#' weights +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param backgType character string specifying how the background level is +#' specified. For binomial data the options are "modelBased" and "absolute". +#' For continuous data the options are "absolute", "hybridSD" and +#' "hybridPercentile" +#' +#' "modelBased" - the background risk is obtained from the model as the risk +#' for dose 0: p0 = f(0) +#' +#' "absolute" - the background risk is specified by the user through the backg +#' argument: p0 = backg for binomial response and for the "relative", "extra" +#' and "added" definition for continuous response. p0 = 1 - phi((back - +#' f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. +#' +#' "hybridSD" - the background risk is specified by the user in terms of number +#' of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +#' f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +#' function and sigma is the SD for the control group. "hybridPercentile" - +#' the background risk is specified by the user in terms of percentile from the +#' control group distribution (assuming a normal distribution). p0 = 1 - +#' phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +#' response is considered adverse, phi is the normal distribution function and +#' sigma is the SD for the control group +#' @param backg numeric value specifying the background level. Defaults to 0 +#' for "absolute" background risk for binomial response (1 for decreasing +#' dose-response models), 2 SD for "hybridSD" background and 0.9 for +#' "hybridpercentile" +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "excess" , "additional" and "point" are for +#' binomial response whereas "relative", "extra", "added", "hybridExc" (excess +#' hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +#' response +#' +#' "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +#' binomial response. BMR should be between 0 and 1. +#' +#' "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +#' response. BMR should be between 0 and 1. +#' +#' "point" - The response level for which to find BMD is directly defined +#' through the BMR level: BMR = f(BMD). Works for both binomial and continuous +#' response +#' +#' "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for +#' continuous response +#' +#' "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +#' continuous response +#' +#' "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +#' response +#' +#' "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +#' (1- p0), where x0 is the level for which the response is considered adverse, +#' phi is the normal distribution function and sigma is the SD for the control +#' group. Works for continuous response +#' +#' "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +#' where x0 is the level for which the response is considered adverse, phi is +#' the normal distribution function and sigma is the SD for the control group. +#' Works for continuous response +#' @param respTrans if the dose-response model is fitted with a transformed +#' response, specifying this option ensures that the background level for the +#' BMD is computed on the original scale. Options include "none" (default), +#' "log" (natural logarithm) and "sqrt"(square root). +#' @param interval character string specifying the type of confidence interval +#' to use for the individual models (no effect when type = "bootstrap" or +#' "curve"): "delta" (default), "sandwich", "inv" or "profile" +#' +#' "delta" - BMDL is based on the lower limit of a Wald confidence interval +#' based on the delta method +#' +#' "sandwich" - BMDL is based on the lower limit of a Wald confidence interval +#' based on the delta method where the sandwich covariance matrix is used +#' +#' "inv" - BMDL is based on inverse regression, that is the dose associated +#' with the upper limit of the point wise confidence interval of the +#' dose-response curve. Not possible if type = "Buckland" +#' +#' "profile" - BMDL is based on the lower limit of a profile likelihood +#' confidence interval. Not possible if type = "Buckland" +#' @param type character string specifying how to estimate BMD and BMDL: +#' "curve", "bootstrap", "Kang" or "Buckland" +#' +#' "curve" - +#' +#' "bootstrap" - +#' +#' "Kang" - +#' +#' "Buckland" - +#' @param bootstrapType character string indicating type of bootstrap sampling +#' to be used if type="bootstrap" or "curve". "nonparametric" (default), or +#' "parametric" (see details) +#' @param bootInterval character string indicating how to estimate the +#' bootstrap confidence intervals used to find BMDL type="bootstrap". +#' "percentile" (default) or "BCa" (Bias corrected and adjusted) +#' @param R number of bootstrap samples to use. Default is 1000 +#' @param level numeric value specifying the level of the confidence interval +#' underlying BMDL. Default is 0.95. Note that the full CI is also computed. +#' The full CI has level 1-2*(1-level) +#' @param stackingSeed integer or NULL: Random seed to use in the data split in +#' the estimation of the Stacking Weights when \code{modelWeights = "Stack"}. +#' The global seed is reset to the initial value after estimation of the +#' weights, so this option does not interfere with a globally set seed. +#' @param stackingSplits integer or "LOO": When \code{modelWeights = "Stack"}, +#' the Stacking Weights are estimated, which are based on V-fold +#' cross-validation. The stackingSplits argument sets the number V of data +#' splits used in the cross validation. The "LOO" (Leave one out) is a shortcut +#' to setting V equal to the number of observations in the data set. +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @param progressInfo logical. If TRUE, a progressbar is shown when computing +#' bootstrap confidence intervals. +#' @return A list of five elements: Results contain the estimated BMD and BMDL, +#' Boot.samples.used gives the number of boot samples that resulted in +#' succesful estimations and were accordingly used in the estimation of BMDL +#' (and BMDU), Interval gives BMDL and BMDU, which is identical to the +#' confidence interval for the percentile interval approach, SE gives the +#' estimated SE for the "Buckland" method, and modelWeights includes the +#' estimated weights. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @references Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +#' Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +#' \bold{57}, 698--706. +#' +#' Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +#' Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. +#' +#' Baalkilde, J. R., Hansen, N. R., and Jensen, S. M. (2025) Stacking Weights +#' and Model Space Selection in Frequentist Model Averaging for Benchmark Dose +#' Estimation, \emph{Environmetrics} \bold{36(2)}, e70002. +#' @keywords model averaging nonlinear bootstrap +#' @export +#' @examples +#' +#' library(drc) +#' library(drcData) +#' +#' ## Fitting 4 different two-parameter models to binomial data +#' deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial") +#' deguelin.m2 <- drm(r/n~dose, weights=n, data=deguelin, fct=W1.2(), type="binomial") +#' deguelin.m3 <- drm(r/n~dose, weights=n, data=deguelin, fct=W2.2(), type="binomial") +#' deguelin.m4 <- drm(r/n~dose, weights=n, data=deguelin, fct=LN.2(), type="binomial") +#' +#' +#' ## Model averaged BMD for 5% additional risk with estimated background risk +#' ## and BMDL based on Buckland et al. +#' bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, +#' backgType = "modelBased", def = "additional", +#' type = "Buckland") +#' +#' ## Model averaged BMD for 5% additional risk with estimated background risk +#' ## and BMDL based on an average of the model curves +#' bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, +#' backgType = "modelBased", def = "additional", +#' type = "curve", bootstrapType = "parametric", bootInterval = "percentile", R=50) +#' +#' +#' ## Fitting 4 different two-parameter models to binomial data +#' ryegrass.m1<-drm(rootl~conc, data=ryegrass, fct=LL.4()) +#' ryegrass.m2<-drm(rootl~conc, data=ryegrass, fct=W1.4()) +#' ryegrass.m3<-drm(rootl~conc, data=ryegrass, fct=W2.4()) +#' ryegrass.m4<-drm(rootl~conc, data=ryegrass, fct=LN.4()) +#' +#' ## Model-averaged BMD and bootstrap BMDL for bmr=5% and using the hybrid approach +#' ## to estimate the background risk. +#' bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="AIC", bmr=0.05, +#' backgType = "hybridSD", def = "hybridAdd", type = "bootstrap", +#' bootstrapType = "nonparametric", bootInterval = "percentile", R = 50) +#' +#' +#' ## Model-averaged BMD using the Stacking Weights +#' bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="Stack", bmr=0.05, +#' backgType = "hybridSD", def = "hybridAdd", type = "bootstrap", +#' bootstrapType = "nonparametric", bootInterval = "percentile", R = 50) +#' +#' bmdMA <- function(modelList, modelWeights, bmr, backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), backg=NA, diff --git a/R/bmdMACurve.R b/R/bmdMACurve.R index 10ed57d..e95964f 100644 --- a/R/bmdMACurve.R +++ b/R/bmdMACurve.R @@ -1,3 +1,104 @@ +#' Calculate Model-Averaged BMD Curve, helper to bmdMA +#' +#' @description +#' Helper function for `bmdMA` that computes Benchmark Dose (BMD) values using +#' model averaging. The function creates a weighted average of multiple dose-response +#' models and finds the dose corresponding to a specified benchmark response level. +#' +#' @param modelList list; A list of fitted dose-response models from which to compute +#' the model average. Each model should be a fitted object with components +#' including `fct`, `parmMat`, `dataList`, etc. +#' @param modelWeights numeric vector; Weights for model averaging, typically derived +#' from model selection criteria (e.g., AIC weights). Must sum to 1 and have +#' the same length as `modelList` +#' @param bmrScaled0 numeric; The benchmark response level(s) for which to calculate +#' BMD. For single curves, a scalar value; for multiple curves, a vector with +#' length equal to the number of curves +#' @param searchInterval character or numeric; Search interval for root finding. +#' If "dataBased" (default), uses data range with small lower bound adjustment. +#' If numeric, should be a vector of length 2 for single curves, or a matrix +#' with 2 columns for multiple curves specifying `[lower, upper]` bounds +#' +#' @details +#' The function handles two scenarios: +#' +#' **Single Curve Analysis:** +#' Creates a weighted combination of model functions: +#' \deqn{f_{MA}(x) = \sum_{i=1}^{m} w_i \cdot f_i(x)}{f_MA(x) = sum of w_i * f_i(x)} +#' where \eqn{w_i}{w_i} are model weights and \eqn{f_i(x)}{f_i(x)} are individual model functions. +#' +#' **Multiple Curve Analysis:** +#' Computes BMD separately for each curve using the same model averaging approach +#' but applied to curve-specific data and parameters. +#' +#' The BMD is found by solving: +#' \deqn{f_{MA}(BMD) = BMR}{f_MA(BMD) = BMR} +#' using root finding algorithms. +#' +#' **Model Function Construction:** +#' The function dynamically constructs model functions by: +#' \itemize{ +#' \item Extracting function templates from `mtList()` +#' \item Substituting fixed parameters and estimated coefficients +#' \item Handling special cases like Fractional Polynomial models +#' \item Creating weighted combinations of all models +#' } +#' +#' @return An object of class "bmd" containing: +#' \itemize{ +#' \item \strong{Results}: A matrix with BMD values. For single curves, a 1x1 matrix; +#' for multiple curves, an nx1 matrix where n is the number of curves +#' \item \strong{MACurve}: The model-averaged function used for BMD calculation. +#' For single curves, returns the combined function; for multiple curves, returns NULL +#' } +#' +#' @section Search Interval: +#' When `searchInterval = "dataBased"`: +#' \itemize{ +#' \item Lower bound: Second smallest dose value divided by 10,000 +#' \item Upper bound: Maximum dose value in the dataset +#' } +#' +#' Custom intervals can be provided to avoid convergence issues or focus on +#' specific dose ranges of interest. +#' +#' @section Model Support: +#' The function supports various dose-response models including: +#' \itemize{ +#' \item Standard 4-parameter and 5-parameter models +#' \item Fractional Polynomial models (special handling) +#' \item Models with fixed parameters +#' } +#' +#' @note +#' This is primarily an internal helper function for `bmdMA`. Direct usage requires +#' properly formatted model lists and weights. The function assumes all models in +#' `modelList` are compatible and fitted to the same dataset structure. +#' +#' @seealso +#' \code{\link{bmdMA}} for the main model averaging function, +#' \code{\link{uniroot}} for the root finding algorithm used internally +#' +#' @examples +#' \dontrun{ +#' # Typically called internally by bmdMA, but can be used directly: +#' +#' # Assume you have a list of fitted models and weights +#' models <- list(model1, model2, model3) # fitted drc models +#' weights <- c(0.5, 0.3, 0.2) # AIC weights +#' bmr <- 0.1 # 10% benchmark response +#' +#' # Calculate model-averaged BMD +#' result <- bmdMACurve(models, weights, bmr) +#' +#' # Extract BMD value +#' bmd_value <- result$Results[1, 1] +#' +#' # Use the averaged curve function +#' curve_function <- result$MACurve +#' } +#' +#' @export bmdMACurve<-function(modelList,modelWeights,bmrScaled0, searchInterval="dataBased"){ nCurves <- ncol(modelList[[1]]$parmMat) diff --git a/R/bmdOrdinal.R b/R/bmdOrdinal.R index a059145..0a379b1 100644 --- a/R/bmdOrdinal.R +++ b/R/bmdOrdinal.R @@ -1,3 +1,115 @@ +#' Benchmark dose estimation for ordinal dose-response models +#' +#' Estimation of benchmark doses and benchmark dose lower limit from ordinal +#' dose response model fits +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous, quantal, quantal and ordinal dose-response data for a range of +#' dose-response models based on the available definitions of the benchmark +#' dose concepts. +#' +#' Details on the implemented definitions and methods can be found in Crump +#' (2002) +#' +#' @param object object of class \code{drcOrdinal} +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param backgType character string specifying how the background level is +#' specified. The options are "modelBased" and "absolute". +#' +#' "modelBased" - the background level is obtained from the model as the level +#' for dose 0: p0 = f(0) +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument. +#' @param backg numeric value specifying the background level. Defaults to 0 +#' for "absolute" background risk. +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "excess", "additional" and "point" are available +#' for ordinal response. +#' +#' "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +#' binomial response. BMR should be between 0 and 1. +#' +#' "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +#' response. BMR should be between 0 and 1. +#' +#' "point" - The response level for which to find BMD is directly defined +#' through the BMR level: BMR = f(BMD). Works for binomial, count and +#' continuous response data. +#' @param interval character string specifying the type of confidence interval +#' to use: "delta" (default), "sandwich", "profile" or "bootstrap" +#' +#' "delta" - BMDL is based on the lower limit of a Wald confidence interval +#' based on the delta method +#' +#' "sandwich" - BMDL is based on the lower limit of a Wald confidence interval +#' based on the delta method, where the sandwich covariance matrix is used +#' +#' "bootstrap" - BMDL is based on bmd estimates on resampled data sets. The +#' type of bootstrap applied can be specified by the "bootType" argument. +#' Default is "nonparametric". +#' +#' "none" - No confidence interval is computed. +#' @param level numeric value specifying the levle of the confidence interval +#' underlying BMDL. Default is 0.95 +#' @param R integer specifying the number of data sets resampled from the +#' original data set when computing the confidence interval by bootstrap. +#' @param bootType character string specifying the resampling procedure for the +#' data sets used for bootstrap. +#' +#' "nonparametric" - Bootstrapping is done by sampling with replacement from +#' the original data set. +#' +#' "parametric" - Bootstrapping is done by sampling from a multinomial +#' distribution with probabilites given by the number of observations for each +#' level. If all observations for one group are in the same level, shrinkage is +#' used to avoid that the resampling always produces that particular level. In +#' this case data is sampled from a multinomial distribution with probabilities +#' (1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + +#' 1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the +#' particular group, and |K| is the number of levels. +#' +#' "model" - New data sets are resampled from the fitted model. +#' +#' "hierarchical" - If the experiment design is hierarchical (i.e. observations +#' are grouped according to a categorical variable, for instance litter), a +#' special resampling procedure is suggested (Blessinger 2020) +#' +#' All resampling is done within the dose values. +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @param progressInfo logical. If TRUE, a progressbar is displayed when +#' calculating bootstrap confidence intervals +#' @return A list of four elements: Results contain the estimated BMD and BMDL, +#' interval gives the lower (BMDL) and upper (BMDU) end of the confidence +#' interval of BMD. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @references Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +#' Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +#' \bold{57}, 698--706. +#' +#' Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +#' Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. +#' +#' Blessinger, T. D., Euling, S. Y., Wang, L., Hogan, K. A., Cai, C., +#' Klinefelter, G., Saillenfait, A.M. (2020) \emph{Environment International} +#' \bold{134} +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' data(guthion) +#' +#' guthionS <- subset(guthion, trt == "S") +#' +#' guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), +#' weights = "total", dose = "dose", data = guthionS, fct = LL.2()) +#' bmdOrdinal(guthionS.LL, bmr = 0.1, backgType = "modelBased", def = "excess", R = 50) +#' +#' @export bmdOrdinal <- function(object, bmr, backgType = c("modelBased", "absolute"), backg = NA, def=c("excess", "additional", "point"), interval = c("delta", "sandwich", "profile", "bootstrap"), level = 0.95, R = 500, bootType = c("nonparametric", "parametric", "model", "hierarchical"), display = TRUE, progressInfo = TRUE){ interval <- match.arg(interval) diff --git a/R/bmdOrdinalDeltaCI.R b/R/bmdOrdinalDeltaCI.R index 5ae560f..76edd64 100644 --- a/R/bmdOrdinalDeltaCI.R +++ b/R/bmdOrdinalDeltaCI.R @@ -145,4 +145,4 @@ # CI <- tmp$confint[1,2:3] # } # CI -# } \ No newline at end of file +# } diff --git a/R/bmdOrdinalMA.R b/R/bmdOrdinalMA.R index dfda41d..5c277bb 100644 --- a/R/bmdOrdinalMA.R +++ b/R/bmdOrdinalMA.R @@ -1,3 +1,109 @@ +#' Benchmark dose estimation for ordinal dose-response models +#' +#' Estimation of benchmark doses and benchmark dose lower limit based on model +#' averaging from a user-defined list of ordinal dose-response model fits +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous, quantal, quantal and ordinal dose-response data for a range of +#' dose-response models based on the available definitions of the benchmark +#' dose concepts. +#' +#' Details on the implemented definitions and methods can be found in Crump +#' (2002) +#' +#' @param modelList A list of ordinal dose-response models of class +#' \code{drcOrdinal} +#' @param modelWeights character string specifying the type of weights used, +#' "AIC" or "BIC", or a numeric vector of the same length as the modelList with +#' user defined weights +#' @param bmr numeric value of benchmark response level for which to calculate +#' the benchmark dose +#' @param backgType character string specifying how the background level is +#' specified. The options are "modelBased" and "absolute". +#' +#' "modelBased" - the background level is obtained from the model as the level +#' for dose 0: p0 = f(0) +#' +#' "absolute" - the background level is specified by the user through the backg +#' argument. +#' @param backg numeric value specifying the background level. Defaults to 0 +#' for "absolute" background risk. +#' @param def character string specifying the definition of the benchmark dose +#' to use in the calculations. "excess", "additional" and "point" are available +#' for ordinal response. +#' +#' "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +#' binomial response. BMR should be between 0 and 1. +#' +#' "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +#' response. BMR should be between 0 and 1. +#' +#' "point" - The response level for which to find BMD is directly defined +#' through the BMR level: BMR = f(BMD). Works for binomial, count and +#' continuous response data. +#' @param type specify the model averaging type used for the confidence +#' intervals. Options are "Kang" (confidence intervals computed as weighted +#' averages of individual confidence intervals) and "bootstrap" +#' @param level numeric value specifying the levle of the confidence interval +#' underlying BMDL. Default is 0.95 +#' @param R integer specifying the number of data sets resampled from the +#' original data set when computing the confidence interval by bootstrap. +#' @param bootType character string specifying the resampling procedure for the +#' data sets used for bootstrap. +#' +#' "nonparametric" - Bootstrapping is done by sampling with replacement from +#' the original data set. +#' +#' "parametric" - Bootstrapping is done by sampling from a multinomial +#' distribution with probabilites given by the number of observations for each +#' level. If all observations for one group are in the same level, shrinkage is +#' used to avoid that the resampling always produces that particular level. In +#' this case data is sampled from a multinomial distribution with probabilities +#' (1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + +#' 1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the +#' particular group, and |K| is the number of levels. +#' +#' All resampling is done within the dose values. +#' @param display logical. If TRUE the results are displayed; otherwise they +#' are not +#' @param progressInfo logical. If TRUE, a progressbar is displayed when +#' calculating bootstrap confidence intervals +#' @return A list of four elements: Results contain the estimated BMD and BMDL, +#' interval gives the lower (BMDL) and upper (BMDU) end of the confidence +#' interval of BMD. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @references Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +#' Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +#' \bold{57}, 698--706. +#' +#' Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +#' Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' data(guthion) +#' +#' guthionS <- subset(guthion, trt == "S") +#' +#' guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), +#' weights = "total", dose = "dose", data = guthionS, fct = LL.2()) +#' guthionS.LN <- drmOrdinal(levels = c("alive", "moribund", "dead"), +#' weights = "total", dose = "dose", data = guthionS, fct = LN.2()) +#' guthionS.W1 <- drmOrdinal(levels = c("alive", "moribund", "dead"), +#' weights = "total", dose = "dose", data = guthionS, fct = W1.2()) +#' guthionS.W2 <- drmOrdinal(levels = c("alive", "moribund", "dead"), +#' weights = "total", dose = "dose", data = guthionS, fct = W2.2()) +#' +#' bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), +#' modelWeights = "AIC", bmr = 0.1, +#' backgType = "modelBased", def = "excess", type = "Kang") +#' bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), +#' modelWeights = "AIC", bmr = 0.1, +#' backgType = "modelBased", def = "excess", type = "bootstrap", R = 50) +#' @export bmdOrdinalMA <- function(modelList, modelWeights = c("AIC", "BIC"), bmr, backgType = c("modelBased", "absolute"), backg = NA, def = c("excess", "additional", "point"), type = c("bootstrap", "Kang"), level = 0.95, R = 500, bootType = c("nonparametric", "parametric"), display = TRUE, progressInfo = TRUE){ # assertions if(!all(sapply(modelList, function(object) inherits(object, "drcOrdinal")))){ diff --git a/R/bmdProfileCI.R b/R/bmdProfileCI.R index eedbe67..ad132e2 100644 --- a/R/bmdProfileCI.R +++ b/R/bmdProfileCI.R @@ -42,4 +42,4 @@ bmdProfileCI <- function(object, slope, bmr, backgType, backg, # controlSD, upper = grid[which(grid == max(grid[accept])) + 1])$root |> try(silent = TRUE) |> as.numeric() c(BMDL = CIlower, BMDU = CIupper) -} \ No newline at end of file +} diff --git a/R/bmdProfileCIgrid.R b/R/bmdProfileCIgrid.R index 248fc31..1165313 100644 --- a/R/bmdProfileCIgrid.R +++ b/R/bmdProfileCIgrid.R @@ -112,4 +112,4 @@ bmdProfileCIgrid <- function(object, bmr, backgType = c("modelBased", "absolute" CI <- c(BMDL = min(bmdVals, na.rm = TRUE), BMDU = max(bmdVals, na.rm = TRUE)) CI -} \ No newline at end of file +} diff --git a/R/bootDataGen.R b/R/bootDataGen.R index 1c6bb6e..0122313 100644 --- a/R/bootDataGen.R +++ b/R/bootDataGen.R @@ -1,3 +1,121 @@ +#' Generate Bootstrap Data for BMD Analysis +#' +#' @description +#' Helper function for `bmdBoot` that generates bootstrap datasets from fitted +#' dose-response models. Supports multiple bootstrap methods (nonparametric, +#' parametric, and semiparametric) and handles different response types +#' (binomial, continuous, Poisson, negative binomial). +#' +#' @param object A fitted dose-response model object (typically from `drm()`) +#' containing the original data and model specifications +#' @param R integer; Number of bootstrap replicates to generate (default: 1000) +#' @param bootType character; Type of bootstrap resampling method. Options are: +#' \itemize{ +#' \item \code{"nonparametric"}: Resamples observations within dose groups +#' \item \code{"parametric"}: Generates new data from fitted distributions +#' \item \code{"semiparametric"}: Uses fitted values plus resampled residuals +#' } +#' @param aggregated logical; For binomial data, whether to return aggregated +#' (summary) format or expanded (individual observation) format (default: TRUE) +#' +#' @details +#' The function implements different bootstrap strategies based on data type and method: +#' +#' **Nonparametric Bootstrap:** +#' \itemize{ +#' \item \strong{Binomial}: Expands binomial data to individual observations, +#' resamples within dose groups, then optionally re-aggregates +#' \item \strong{Continuous/Count}: Resamples observations within dose groups +#' from the original dataset +#' } +#' +#' **Parametric Bootstrap:** +#' \itemize{ +#' \item \strong{Binomial}: Generates new binomial observations using estimated +#' success probabilities, with continuity correction (adds 0.25/0.5) for +#' boundary cases +#' \item \strong{Continuous}: Generates normal random variables using +#' dose-specific means and standard deviations from original data +#' } +#' +#' **Semiparametric Bootstrap:** +#' \itemize{ +#' \item \strong{Continuous only}: Uses fitted values plus resampled residuals +#' \item \strong{Binomial}: Not supported (throws error) +#' } +#' +#' @return A list of length R containing bootstrap datasets. Each element is a +#' data.frame with the same structure as the original data, containing: +#' \itemize{ +#' \item Dose variable (same name as original) +#' \item Response variable(s) (same name(s) as original) +#' \item For binomial data: number of successes and total observations +#' \item For multi-curve data: curve identifier (if present) +#' } +#' +#' @section Data Type Handling: +#' +#' **Binomial Data:** +#' \itemize{ +#' \item Handles both aggregated (n successes out of N trials) and expanded formats +#' \item Preserves dose group structure during resampling +#' \item Applies continuity correction in parametric bootstrap +#' } +#' +#' **Continuous Data:** +#' \itemize{ +#' \item Maintains dose group structure +#' \item Preserves within-group variability patterns +#' \item Uses original data (`origData`) when available +#' } +#' +#' **Count Data (Poisson/Negative Binomial):** +#' \itemize{ +#' \item Treated similarly to continuous data for nonparametric bootstrap +#' \item Resamples within dose groups +#' } +#' +#' @section Multi-curve Support: +#' The function handles multi-curve dose-response data by preserving curve +#' identifiers during bootstrap resampling, ensuring that the bootstrap samples +#' maintain the original experimental structure. +#' +#' @note +#' This is an internal helper function for `bmdBoot`. It assumes the input object +#' has the standard structure from `drm()` fitting, including components like +#' `data`, `origData`, `call`, `type`, etc. +#' +#' **Important considerations:** +#' \itemize{ +#' \item Semiparametric bootstrap requires model residuals and fitted values +#' \item Parametric bootstrap assumes distributional assumptions are met +#' \item Large R values may require substantial memory for complex datasets +#' } +#' +#' @seealso +#' \code{\link{bmdBoot}} for the main bootstrap BMD function, +#' +#' @examples +#' \dontrun{ +#' # Typically called internally by bmdBoot, but can be used directly: +#' +#' # Fit a dose-response model +#' model <- drm(response/total ~ dose, weights = total, +#' data = binomial_data, fct = LL.4()) +#' +#' # Generate nonparametric bootstrap samples +#' boot_data <- bootDataGen(model, R = 100, bootType = "nonparametric") +#' +#' # Generate parametric bootstrap samples +#' boot_data_param <- bootDataGen(model, R = 100, bootType = "parametric") +#' +#' # For continuous data with semiparametric bootstrap +#' cont_model <- drm(response ~ dose, data = continuous_data, fct = LL.4()) +#' boot_data_semi <- bootDataGen(cont_model, R = 100, bootType = "semiparametric") +#' +#' # Access first bootstrap sample +#' first_sample <- boot_data[[1]] +#' } bootDataGen <- function(object, R=1000, bootType="nonparametric",aggregated=TRUE){ if(bootType=="nonparametric"){ if(object$type=="binomial"){ diff --git a/R/bootDataGenHetVar.R b/R/bootDataGenHetVar.R index 5377550..2f4e4b1 100644 --- a/R/bootDataGenHetVar.R +++ b/R/bootDataGenHetVar.R @@ -47,4 +47,4 @@ bootDataGenHetVar <- function(object, R=1000, bootType=c("nonparametric", "semip } return(tmp.data) -} \ No newline at end of file +} diff --git a/R/bootDataGenOrdinal.R b/R/bootDataGenOrdinal.R index 9594c5f..902337b 100644 --- a/R/bootDataGenOrdinal.R +++ b/R/bootDataGenOrdinal.R @@ -1,6 +1,143 @@ +#' Generate Bootstrap Data for Ordinal Dose-Response Analysis +#' +#' @description +#' Helper function for `bmdOrdinal` and `bmdOrdinalMA` that generates bootstrap +#' datasets from fitted ordinal dose-response models. Supports multiple bootstrap +#' methods tailored for ordinal response data with different resampling strategies. +#' +#' @param object A fitted ordinal dose-response model object containing the original +#' data, model specifications, response levels, and fitted parameters +#' @param R integer; Number of bootstrap replicates to generate (default: 500) +#' @param bootType character; Type of bootstrap resampling method. Options are: +#' \itemize{ +#' \item \code{"nonparametric"}: Resamples individual observations within dose groups +#' \item \code{"parametric"}: Generates new observations using estimated category probabilities +#' \item \code{"model"}: Generates observations using fitted model probabilities +#' \item \code{"hierarchical"}: Hierarchical resampling accounting for block structure +#' } +#' +#' @details +#' The function implements four distinct bootstrap strategies for ordinal data: +#' +#' **Nonparametric Bootstrap:** +#' \itemize{ +#' \item Expands ordinal data to individual observations +#' \item Resamples observations within each original data row +#' \item Maintains the empirical distribution within dose groups +#' \item Most conservative approach, makes no distributional assumptions +#' } +#' +#' **Parametric Bootstrap:** +#' \itemize{ +#' \item Estimates category probabilities from original data +#' \item Applies continuity correction for boundary cases: +#' \deqn{p_{corrected} = \frac{1/K^2}{n + 1/K} \text{ when } p = 0}{p_corrected = (1/K^2)/(n + 1/K) when p = 0} +#' \deqn{p_{corrected} = \frac{n + 1/K^2}{n + 1/K} \text{ when } p = 1}{p_corrected = (n + 1/K^2)/(n + 1/K) when p = 1} +#' where K is the number of response categories and n is the sample size +#' \item Generates new observations using multinomial sampling +#' } +#' +#' **Model-Based Bootstrap:** +#' \itemize{ +#' \item Uses fitted model probabilities (\code{object$pFun}) for each dose +#' \item Generates observations directly from the fitted dose-response relationship +#' \item Assumes the fitted model accurately represents the true relationship +#' } +#' +#' **Hierarchical Bootstrap:** +#' \itemize{ +#' \item Accounts for block/cluster structure in the data +#' \item Requires \code{object$blocks} to be specified +#' \item Uses weighted resampling within dose groups +#' \item Maintains hierarchical correlation structure +#' } +#' +#' @return A list of length R containing bootstrap datasets. Each element is a +#' data.frame with the same structure as the original ordinal data, containing: +#' \itemize{ +#' \item Dose variable (same name as original) +#' \item Count columns for each response category +#' \item For hierarchical: block identifier and total counts +#' \item All columns from original data structure preserved +#' } +#' +#' @section Data Processing: +#' The function uses several data manipulation steps: +#' \itemize{ +#' \item \strong{Expansion}: Converts aggregated ordinal data to individual observations +#' \item \strong{Resampling}: Applies the specified bootstrap method +#' \item \strong{Aggregation}: Converts back to count format using \code{reshape2::dcast} +#' \item \strong{Completion}: Ensures all response categories are present (fills with 0 if missing) +#' } +#' +#' @section Dependencies: +#' This function requires the following packages: +#' \itemize{ +#' \item \code{reshape2}: For data reshaping operations +#' \item \code{dplyr}: For data manipulation (hierarchical bootstrap only) +#' \item \code{tidyr}: For data tidying operations (hierarchical bootstrap only) +#' } +#' +#' The function will stop with an informative error if required packages are not installed. +#' +#' @section Continuity Correction: +#' For parametric bootstrap, when category probabilities are 0 or 1, a continuity +#' correction is applied to prevent degenerate sampling. This ensures all categories +#' have some probability of being selected, improving bootstrap stability. +#' +#' @note +#' This is an internal helper function for ordinal BMD bootstrap procedures. It assumes +#' the input object has the standard structure from ordinal dose-response fitting, +#' including components like \code{data}, \code{levels}, \code{dose}, \code{pFun}, etc. +#' +#' **Method Selection Guidelines:** +#' \itemize{ +#' \item Use \code{"nonparametric"} for robust, assumption-free bootstrap +#' \item Use \code{"parametric"} when sample sizes are small +#' \item Use \code{"model"} to assess model-based uncertainty +#' \item Use \code{"hierarchical"} for clustered/blocked experimental designs +#' } +#' +#' @seealso +#' \code{\link{bmdOrdinal}} for ordinal BMD estimation, +#' \code{\link{bmdOrdinalMA}} for model-averaged ordinal BMD,, +#' \code{\link[reshape2]{dcast}} for data reshaping +#' +#' @examples +#' \dontrun{ +#' # Typically called internally, but can be used directly: +#' +#' # Assume you have a fitted ordinal model +#' ordinal_model <- fitOrdinalModel(response ~ dose, data = ordinal_data) +#' +#' # Generate nonparametric bootstrap samples +#' boot_data_np <- bootDataGenOrdinal(ordinal_model, R = 100, +#' bootType = "nonparametric") +#' +#' # Generate parametric bootstrap samples +#' boot_data_param <- bootDataGenOrdinal(ordinal_model, R = 100, +#' bootType = "parametric") +#' +#' # Generate model-based bootstrap samples +#' boot_data_model <- bootDataGenOrdinal(ordinal_model, R = 100, +#' bootType = "model") +#' +#' # For hierarchical data with blocks +#' boot_data_hier <- bootDataGenOrdinal(ordinal_model, R = 100, +#' bootType = "hierarchical") +#' +#' # Access first bootstrap sample +#' first_sample <- boot_data_np[[1]] +#' head(first_sample) +#' } bootDataGenOrdinal <- function(object, R = 500, bootType = c("nonparametric", "parametric", "model", "hierarchical")){ bootType <- match.arg(bootType) - + ## avoiding global binding of variables issues + variable <- NULL + row.num <- NULL + value <- NULL + row.orig <- NULL + rm(list=c("variable", "row.num", "value", "row.orig")) if(!requireNamespace("reshape2")){ stop('package "reshape2" must be installed to use bootstrapping with ordinal dose-response model') } @@ -82,6 +219,8 @@ bootDataGenOrdinal <- function(object, R = 500, bootType = c("nonparametric", "p } resample_fun <- function(levels, dose, weights, blocks, data){ + name <- NULL + rm(list("name")) data %>% dplyr::mutate(row.orig = 1:n()) %>% dplyr::group_by(.data[[dose]]) %>% diff --git a/R/coef.drcHetVar.R b/R/coef.drcHetVar.R index 9cb2bcb..032786a 100644 --- a/R/coef.drcHetVar.R +++ b/R/coef.drcHetVar.R @@ -1,7 +1,61 @@ +#' Extract Coefficients from Heteroscedastic Dose-Response Models +#' +#' @description +#' S3 method to extract coefficients from fitted heteroscedastic dose-response models. +#' This method extends the generic `coef()` function to handle `drcHetVar` objects, +#' which contain both dose-response curve parameters and variance model parameters. +#' +#' @param object An object of class "drcHetVar" containing a fitted heteroscedastic +#' dose-response model with separate curve and variance parameters +#' @param ... Additional arguments (currently unused but included for S3 method consistency) +#' +#' @details +#' Heteroscedastic dose-response models fit two components simultaneously: +#' \itemize{ +#' \item \strong{Curve parameters}: Describe the dose-response relationship +#' (e.g., slope, inflection point, asymptotes) +#' \item \strong{Variance parameters}: Model how the response variance changes +#' with dose or fitted values +#' } +#' +#' This method combines both parameter sets into a single named vector for easy +#' access and interpretation. Parameter names are prefixed to distinguish between +#' the two model components: +#' \itemize{ +#' \item \code{"Curve:"} prefix for dose-response curve parameters +#' \item \code{"Sigma:"} prefix for variance model parameters +#' } +#' +#' @return A named numeric vector containing all model parameters: +#' \itemize{ +#' \item Curve parameters with names prefixed by "Curve:" +#' \item Variance parameters with names prefixed by "Sigma:" +#' } +#' +#' @note +#' This method assumes the `drcHetVar` object contains: +#' \itemize{ +#' \item \code{curvePar}: Named vector of curve parameters +#' \item \code{sigmaPar}: Named vector of variance parameters +#' } +#' +#' The original parameter names from the fitting procedure are preserved but +#' prefixed for clarity. +#' +#' @seealso +#' \code{\link{coef}} for the generic coefficient extraction function, +#' +#' @examples +#' \dontrun{ +#' # Assuming you have a fitted heteroscedastic model +#' } +#' +#' @method coef drcHetVar +#' @export coef.drcHetVar <- function(object, ...){ curvePar <- object$curvePar names(curvePar) <- paste0("Curve:", names(curvePar)) sigmaPar <- object$sigmaPar names(sigmaPar) <- paste0("Sigma:", names(sigmaPar)) c(curvePar, sigmaPar) -} \ No newline at end of file +} diff --git a/R/confint_basic.R b/R/confint_basic.R new file mode 100644 index 0000000..ad94c6d --- /dev/null +++ b/R/confint_basic.R @@ -0,0 +1,33 @@ +# HELPER FUNCTION BORROWED FROM DRC PACKAGE +# Name in drc package: confint.basic - changed to confint_basic to avoid S3 mixup +# Defining basic function for providing confidence intervals + +"confint_basic" <- function(estMat, level, intType, dfres, formatting = TRUE) +{ + alphah <- (1 - level)/2 + # if (type == "u") {two <- qnorm(1 - alphah)} + # if (type == "t") {two <- qt(1 - alphah, df.residual(object))} + tailPercentile <- switch(intType, + binomial = qnorm(1 - alphah), + continuous = qt(1 - alphah, dfres), + event = qnorm(1 - alphah), + Poisson = qnorm(1 - alphah), + negbin1 = qnorm(1 - alphah), + negbin2 = qnorm(1 - alphah)) + + estVec <- estMat[, 1] + halfLength <- tailPercentile * estMat[, 2] + confMat <- matrix(c(estVec - halfLength, estVec + halfLength), ncol = 2) + + ## Formatting matrix + if (formatting) + { + colnames(confMat) <- c(paste(format(100 * alphah), "%", sep = " "), paste(format(100*(1 - alphah)), "%", sep = " ")) + rownames(confMat) <- rownames(estMat) + } + + return(confMat) +} + + + diff --git a/R/drmHetVar.R b/R/drmHetVar.R index 25ebf0e..28605a7 100644 --- a/R/drmHetVar.R +++ b/R/drmHetVar.R @@ -1,3 +1,75 @@ +#' Dose response modeling with heterogeneous variance +#' +#' Fit a dose-response model with heterogeneous variance dependending on dose +#' level. +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' REFERENCES TO BE ADDED/WRITTEN +#' +#' @param formula formula for the dose-response relationship +#' @param var.formula one-sided formula specifying the dependance of the dose +#' values and/or the fitted values on the point-wise standard error +#' @param data data.frame containing the observations +#' @param fct a list with three or more elements specifying the non-linear +#' function, the accompanying self starter function, the names of the parameter +#' in the non-linear function and, optionally, the first and second derivatives +#' as well as information used for calculation of ED values. Currently +#' available functions include, among others, the four- and five-parameter +#' log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use +#' drc::getMeanFunctions for a full list. +#' @param curveStart numerical of length equal to the number of parameters for +#' the curve. Starting values for the curve parameters (optional). +#' @return dose-response model with a heterogeneous variance structure of class +#' \code{drcHetVar}. +#' +#' The primary objective is to use this model for benchmark dose estimation +#' based on the hybrid method with a heterogeneous variance structure. This can +#' be done using the \code{bmdHetVar} function. +#' +#' A plot method is available, which can be useful for assessing the fit of the +#' variance structure. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' library(bmd) +#' # install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT. +#' +#' # ryegrass data +#' set.seed(123) +#' ryegrass.LL.4.hetVar <- drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), +#' data = ryegrass, fct = LL.4()) +#' plot(ryegrass.LL.4.hetVar) +#' bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, +#' def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) +#' bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, +#' def = "hybridExc", R = 50, level = 0.95, +#' bootType = "parametric", progressInfo = TRUE, display = TRUE) # parametric bootstrap +#' +#' # barley data +#' set.seed(123) +#' barley.LL.4.hetVar <- drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), data = barley, fct = LL.4()) +#' plot(barley.LL.4.hetVar) +#' +#' # GiantKelp data +#' set.seed(123) +#' GiantKelp.LL.4.hetVarSq <- drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), +#' data = GiantKelp, fct = LL.4()) +#' plot(GiantKelp.LL.4.hetVarSq) +#' +#' GiantKelp.LL.4.hetVarLogSq <- drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), +#' data = GiantKelp, fct = LL.4()) +#' plot(GiantKelp.LL.4.hetVarLogSq) +#' +#' +#' +#' @export drmHetVar <- function(formula, var.formula, data, fct, curveStart = NULL) { call <- match.call() @@ -119,4 +191,4 @@ drmHetVar <- function(formula, var.formula, data, fct, curveStart = NULL) { class(object) <- c("drcHetVar", "drc") return(object) -} \ No newline at end of file +} diff --git a/R/drmMMRE.R b/R/drmMMRE.R index bee7a26..a41af51 100644 --- a/R/drmMMRE.R +++ b/R/drmMMRE.R @@ -1,6 +1,64 @@ +#' Dose response modeling with hierarchical variance structure +#' +#' Fits a meta-analytic hierarchical dose-response model. +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' Fitting the meta-analytic model relies on a multivariate meta-analytic model +#' provided by the function \code{rma.mv} in the "metafor" package, which can +#' be installed by running \code{remotes::install_github("wviechtb/metafor")} +#' +#' Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor +#' package. Journal of Statistical Software, 36(3), 1-48. +#' doi:10.18637/jss.v036.i03 +#' +#' @param formula a symbolic description of the model to be fit of the form +#' 'response ~ dose' +#' @param exp_id the name of the column in the data set that specifies the +#' hierarchical structure of the data +#' @param data a data frame containing the variables in the model. +#' @param fct a list with three or more elements specifying the non-linear +#' function, the accompanying self starter function, the names of the parameter +#' in the non-linear function and, optionally, the first and second derivatives +#' as well as information used for calculation of ED values. Currently +#' available functions include, among others, the four- and five-parameter +#' log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use +#' drc::getMeanFunctions for a full list. +#' @param type a character string specifying the distribution of the data. The +#' default is "continuous", corresponding to assuming a normal distribution. +#' "binary" imply a binomial distribution. +#' @return meta-analytic dose-response model with a hierarchical variance +#' structure of class \code{drcMMRE}. +#' +#' The primary objective is to use this model for benchmark dose estimation +#' based on dose-response data with a heterogeneous variance structure. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' library(metafor) +#' library(bmd) +#' +#' set.seed(1) +#' data0 <- data.frame(x = rep(drcData::ryegrass$conc, 2), +#' y = rep(drcData::ryegrass$rootl, 2) + +#' c(rnorm(n = nrow(drcData::ryegrass), mean = 2, sd = 0.5), +#' rnorm(n = nrow(drcData::ryegrass), mean = 2.7, sd = 0.7)), +#' EXP_ID = rep(as.character(1:2), each = nrow(drcData::ryegrass))) +#' +#' modMMRE <- drmMMRE(y~x, exp_id = EXP_ID, data = data0, fct = LL.4()) +#' bmd(modMMRE, bmr = 0.1, backgType = "modelBased", def = "relative") +#' +#' @export drmMMRE <- function(formula, exp_id, data, fct, type = c("continuous", "binomial")){ call_expr <- match.call() - + Estimate <- NULL # to avoid global binding of variables issues + rm(list="Estimate") # assertions if (!inherits(formula, "formula")) { stop("Argument 'formula' must be a formula.") @@ -103,7 +161,21 @@ drmMMRE <- function(formula, exp_id, data, fct, type = c("continuous", "binomial object } - +#' Extract Variance-Covariance Matrix from drcMMRE Objects +#' +#' @description +#' S3 method to extract the variance-covariance matrix from fitted drcMMRE objects +#' by delegating to the underlying model-averaged model. +#' +#' @param object An object of class "drcMMRE" +#' @param ... Additional arguments (currently unused) +#' +#' @return The variance-covariance matrix of the model parameters. +#' +#' @seealso \code{\link{vcov}} for the generic function +#' +#' @method vcov drcMMRE +#' @export vcov.drcMMRE <- function(object, ...){ vcov(object$MV_MA_model) } diff --git a/R/drmOrdinal.R b/R/drmOrdinal.R index 08a711d..76127e6 100644 --- a/R/drmOrdinal.R +++ b/R/drmOrdinal.R @@ -1,3 +1,48 @@ +#' Fitting ordinal dose-response models +#' +#' A model fitting function for analysis of ordinal dose-response data. +#' +#' This functions fits a dose-response model for ordinal dose-response data by +#' fitting a series of binomial dose-response models. +#' +#' @param levels a character vector of the levels of the response variable in +#' increasing order, as they appear in the supplied data set +#' @param dose a character string specifying the column with the dose values in +#' the supplied data set +#' @param weights a character string specifying the column containing the +#' number of observations pr. group +#' @param blocks a character string specifying the column containing the blocks +#' of the experiment, if available (optional) +#' @param data a dataframe containing the observations +#' @param fct a list with three or more elements specifying the non-linear +#' function, the accompanying self starter function, the names of the parameter +#' in the non-linear function and, optionally, the first and second derivatives +#' as well, for the individual fitted curves. For more information see the help +#' page for the "drm" function in the "drc" package. Currently available +#' functions for ordinal dose-response models include, among others, the +#' log-logistic models \code{\link[drc]{LL.4}}, the log-normal model +#' \code{\link[drc]{LN.4}} and the two Weibull models \code{\link[drc]{W1.4}} +#' and \code{\link[drc]{W2.4}}. Use \code{\link[drc]{getMeanFunctions}} for a +#' full list. +#' @param p.epsilon numeric value specifying the lower bound for the +#' probabilites for each level returned by the function pFun created when +#' fitting the model. Default value is 10^(-16) +#' @return An object of (S3) class 'drcOrdinal'. +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @keywords models nonlinear +#' @examples +#' +#' library(drc) +#' library(drcData) +#' data(guthion) +#' guthionS <- subset(guthion, trt == "S") +#' +#' guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), weights = "total", +#' dose = "dose", data = guthionS, fct = LL.2()) +#' +#' plot(guthionS.LL, xlim = c(15,55)) # uses ggplot +#' +#' @export drmOrdinal <- function(levels, dose, weights, blocks, data, fct, p.epsilon = 1e-16){ if(missing(blocks)){ blocks = NULL diff --git a/R/expandBinomial.R b/R/expandBinomial.R index 68fe8d7..79d0e6c 100644 --- a/R/expandBinomial.R +++ b/R/expandBinomial.R @@ -1,3 +1,24 @@ +#' Utility function +#' +#' Utility function for expanding binomial data +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' @param data a data.frame +#' @param number the name of the column in the data set containing the number +#' of affected individuals per dose level +#' @param total the name of the column in the data set containing the total +#' number of individuals per dose level +#' @param dose the name of the column in the data set containing the dose +#' values +#' @param curveid the name of the column in the data set specifying the curveid +#' (if available) +#' @return data.frame +#' @author Signe M. Jensen and Jens Riis Baalkilde +#' @keywords models nonlinear expandBinomial <- function(data, number, total, dose, curveid = character(0)){ if(length(curveid) == 0){ df<-data.frame(number = c(rep(rep(1,length(data[,number])), data[,number]), diff --git a/R/getBmrScaledList.R b/R/getBmrScaledList.R index 75f2258..439b008 100644 --- a/R/getBmrScaledList.R +++ b/R/getBmrScaledList.R @@ -270,4 +270,4 @@ getBmrScaledList <- function(object, bmr, backgType = c("modelBased", "absolute" } list(bmrScaledMat = bmrScaledMat, dBmrScaledMat = dBmrScaledMat) -} \ No newline at end of file +} diff --git a/R/getBmrScaledRepar.R b/R/getBmrScaledRepar.R index 277ecc2..d54d8b1 100644 --- a/R/getBmrScaledRepar.R +++ b/R/getBmrScaledRepar.R @@ -179,4 +179,4 @@ getBmrScaledRepar <- function(cdVec, slope, bmr, backgType, } bmrScaled -} \ No newline at end of file +} diff --git a/R/getFctDerivx.R b/R/getFctDerivx.R index 1003f6a..e65fb53 100644 --- a/R/getFctDerivx.R +++ b/R/getFctDerivx.R @@ -9,32 +9,29 @@ getFctDerivx <- function(object){ # Log-logistic if(identical(class(object$fct), "llogistic")){ if(substr(object$fct$name, 3,3) == "."){ - derivx <- function(x, parm) + derivx <- function(dose, parm) # Changed from 'x' to 'dose' { parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE) parmMat[, notFixed] <- parm - # bNeg <- parmMat[, 1] < 0 - # parmMat[bNeg, 1] <- -parmMat[bNeg, 1] - temp1 <- x/parmMat[, 4] + temp1 <- dose/parmMat[, 4] # Changed from 'x' to 'dose' temp2 <- 1 + (temp1)^parmMat[, 1] temp3 <- parmMat[, 5]*(temp2^(parmMat[, 5] - 1))*(parmMat[, 1]/parmMat[, 4])*temp1^(parmMat[, 1] - 1) temp4 <- temp2^(2*parmMat[, 5]) (-(parmMat[, 3] - parmMat[, 2])*temp3)/temp4 retVec <- (-(parmMat[, 3] - parmMat[, 2])*temp3)/temp4 - # retVec[bNeg] <- -retVec[bNeg] retVec } } else if(substr(object$fct$name, 3,3) == "2"){ - derivx <- function(x, parm) + derivx <- function(dose, parm) # Changed from 'x' to 'dose' { parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE) parmMat[, notFixed] <- parm - temp1 <- exp(parmMat[, 1]*(log(x) - parmMat[, 4])) # x/parmMat[, 4] + temp1 <- exp(parmMat[, 1]*(log(dose) - parmMat[, 4])) # Changed from 'x' to 'dose' temp2 <- 1 + temp1 - temp3 <- parmMat[, 5]*(temp2^(parmMat[, 5] - 1))*temp1*parmMat[, 1]/x + temp3 <- parmMat[, 5]*(temp2^(parmMat[, 5] - 1))*temp1*parmMat[, 1]/dose # Changed from 'x' to 'dose' temp4 <- temp2^(2*parmMat[, 5]) (-(parmMat[, 3] - parmMat[, 2])*temp3)/temp4 @@ -52,7 +49,7 @@ getFctDerivx <- function(object){ dFct <- function (dose, b, c, d, e) { .expr1 <- d - c - .expr5 <- b * (log(dose) - transfe(e)) + .expr5 <- b * (log(dose) - log(e)) # Fixed: changed 'transfe(e)' to 'log(e)' .value <- c + .expr1 * pnorm(.expr5) .grad <- array(0, c(length(.value), 1L), list(NULL, c("dose"))) .grad[, "dose"] <- .expr1 * (dnorm(.expr5) * (b * (1/dose))) @@ -65,45 +62,45 @@ getFctDerivx <- function(object){ # Weibull1 if(identical(class(object$fct), "Weibull-1")){ - derivx <- function(x, parm) + derivx <- function(dose, parm) # Changed from 'x' to 'dose' { parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE) parmMat[, notFixed] <- parm .expr1 <- parmMat[, 3] - parmMat[, 2] # d - c - .expr6 <- exp(parmMat[, 1] * (log(x) - log(parmMat[, 4]))) + .expr6 <- exp(parmMat[, 1] * (log(dose) - log(parmMat[, 4]))) # Changed from 'x' to 'dose' .expr8 <- exp(-.expr6) .value <- parmMat[, 2] + .expr1 * .expr8 - .grad <- array(0, c(length(.value), 1L), list(NULL, c("x"))) - .grad[, "x"] <- -(.expr1 * (.expr8 * (.expr6 * (parmMat[, 1] * (1/x))))) + .grad <- array(0, c(length(.value), 1L), list(NULL, c("dose"))) # Changed from 'x' to 'dose' + .grad[, "dose"] <- -(.expr1 * (.expr8 * (.expr6 * (parmMat[, 1] * (1/dose))))) # Changed from 'x' to 'dose' .grad } } # Weibull2 if(identical(class(object$fct), "Weibull-2")){ - derivx <- function(x, parm) + derivx <- function(dose, parm) # Changed from 'x' to 'dose' { parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE) parmMat[, notFixed] <- parm .expr1 <- parmMat[, 3] - parmMat[, 2] - .expr6 <- exp(parmMat[, 1] * (log(x) - log(parmMat[, 4]))) + .expr6 <- exp(parmMat[, 1] * (log(dose) - log(parmMat[, 4]))) # Changed from 'x' to 'dose' .expr8 <- exp(-.expr6) .value <- parmMat[, 2] + .expr1 * (1 - .expr8) - .grad <- array(0, c(length(.value), 1L), list(NULL, c("x"))) - .grad[, "x"] <- .expr1 * (.expr8 * (.expr6 * (parmMat[, 1] * (1/x)))) + .grad <- array(0, c(length(.value), 1L), list(NULL, c("dose"))) # Changed from 'x' to 'dose' + .grad[, "dose"] <- .expr1 * (.expr8 * (.expr6 * (parmMat[, 1] * (1/dose)))) # Changed from 'x' to 'dose' .grad } } if(identical(class(object$fct), "Boltzmann")){ - derivx <- function(x, parm) + derivx <- function(dose, parm) # Changed from 'x' to 'dose' { parmMat <- matrix(parmVec, nrow(parm), numParm, byrow = TRUE) parmMat[, notFixed] <- parm - temp1 <- exp(parmMat[, 1]*(x - parmMat[, 4])) + temp1 <- exp(parmMat[, 1]*(dose - parmMat[, 4])) # Changed from 'x' to 'dose' (-parmMat[, 5]*(parmMat[, 3] - parmMat[, 2])*temp1*parmMat[, 1])/((1 + temp1)^(parmMat[, 5] + 1)) } @@ -149,6 +146,6 @@ getFctDerivx <- function(object){ attr(dFct(dose, parmMat[, 1], parmMat[, 2], parmMat[, 3], parmMat[, 4]), "gradient") } } - + derivx } \ No newline at end of file diff --git a/R/getStackingWeights.R b/R/getStackingWeights.R index 80e006f..41eb0f3 100644 --- a/R/getStackingWeights.R +++ b/R/getStackingWeights.R @@ -200,6 +200,46 @@ getDataSplits <- function(object, nSplits){ splitList } + + +#' Model-average dose-response curves +#' +#' Computing stacking weights. +#' +#' The aim to provide an R package calculating the benchmark dose (BMD) and the +#' lower limit of the corresponding 95\% confidence interval (BMDL) for +#' continuous and quantal dose-response data for a range of dose-response +#' models based on the available definitions of the benchmark dose concepts. +#' +#' Details on the implemented definitions and methods can be found in Crump +#' (2002) +#' +#' @param modelList list of models of class \code{drc} +#' @param nSplits integer. The Stacking Weights are based on V-fold +#' cross-validation. The nSplits argument sets the number V of data splits used +#' in the cross validation. +#' @return numeric +#' @author Jens Riis Baalkilde +#' @keywords models nonlinear model averaging +#' @examples +#' +#' library(bmd) +#' library(drc) +#' library(drcData) +#' +#' # fit models to aconiazide data +#' aconiazide.LL.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LL.3()) +#' aconiazide.LN.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LN.3()) +#' aconiazide.W1.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W1.3()) +#' aconiazide.W2.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W2.3()) +#' +#' getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3, +#' aconiazide.W1.3, aconiazide.W2.3)) +#' getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3, +#' aconiazide.W1.3, aconiazide.W2.3), +#' nSplits = 7) +#' +#' @export getStackingWeights <- function(modelList, nSplits = 2){ if(!requireNamespace("CVXR")){ stop('package "CVXR" must be installed to estimate stacking weights') diff --git a/R/invBmd.R b/R/invBmd.R index e213a3f..13a1ca3 100644 --- a/R/invBmd.R +++ b/R/invBmd.R @@ -1,3 +1,139 @@ +#' Inverse Regression for Benchmark Dose Calculation +#' +#' @description +#' Helper function for `bmd` that calculates Benchmark Dose (BMD) and confidence +#' intervals using inverse regression. This function handles multiple BMD definitions +#' and background response types by dynamically modifying the dose-response function +#' and its derivatives to solve for the dose corresponding to a specified benchmark response. +#' +#' @param object A fitted dose-response model object containing the model function, +#' derivatives, coefficients, and data information +#' @param bmr numeric; Benchmark response level for which to calculate the BMD +#' @param level numeric; Confidence level for BMD confidence intervals (default: 0.9) +#' @param slope character; Direction of dose-response relationship, either +#' "increasing" or "decreasing" +#' @param backgType character; Type of background response calculation. Options include: +#' "modelBased", "hybridSD", "absolute" +#' @param backg numeric; Background response value (used with certain backgType options). +#' Default: NA +#' @param catLev numeric; Category level for multi-level responses. Default: NA +#' @param extFactor numeric; Extension factor for maximum dose search range (default: 10) +#' @param def character; BMD definition type. Options include: +#' \itemize{ +#' \item "additional"/"added": Additional risk over background +#' \item "excess": Excess risk over background +#' \item "relative": Relative change from background +#' \item "extra": Extra risk (between background and maximum) +#' \item "hybridAdd": Hybrid additional risk using statistical criteria +#' \item "hybridExc": Hybrid excess risk using statistical criteria +#' \item "point": Point estimate (not supported for inverse regression) +#' } +#' @param useSD numeric; Standard deviation value used in hybrid definitions +#' @param sandwich.vcov logical; Whether to use sandwich variance-covariance matrix +#' for robust standard errors (default: FALSE) +#' +#' @details +#' The function implements inverse regression by solving: +#' \deqn{f(BMD) = BMR}{f(BMD) = BMR} +#' where f is the transformed dose-response function based on the specified definition. +#' +#' **BMD Definitions:** +#' +#' **Additional Risk:** \deqn{f(x) = |f_0(0) - f_0(x)|}{f(x) = |f_0(0) - f_0(x)|} +#' +#' **Excess Risk:** \deqn{f(x) = \frac{|f_0(0) - f_0(x)|}{f_0(0)}}{f(x) = |f_0(0) - f_0(x)|/f_0(0)} (decreasing) +#' \deqn{f(x) = \frac{f_0(x) - f_0(0)}{1 - f_0(0)}}{f(x) = (f_0(x) - f_0(0))/(1 - f_0(0))} (increasing) +#' +#' **Relative Risk:** \deqn{f(x) = \frac{|f_0(0) - f_0(x)|}{f_0(0)}}{f(x) = |f_0(0) - f_0(x)|/f_0(0)} +#' +#' **Extra Risk:** \deqn{f(x) = \frac{|f_0(0) - f_0(x)|}{|f_0(0) - f_0(\infty)|}}{f(x) = |f_0(0) - f_0(x)|/|f_0(0) - f_0(infinity)|} +#' +#' **Hybrid Definitions:** Use normal distribution probabilities: +#' \deqn{f(x) = \Phi\left(\frac{f_0(0) - k \cdot SD - f_0(x)}{SD}\right) - (1-\Phi(k))}{f(x) = Phi((f_0(0) - k*SD - f_0(x))/SD) - (1-Phi(k))} +#' where k is the number of standard deviations (default: 2). +#' +#' @return A matrix with 1 row and 3 columns: +#' \itemize{ +#' \item \strong{BMD}: Benchmark dose estimate +#' \item \strong{BMDL}: Lower confidence limit for BMD +#' \item \strong{BMDU}: Upper confidence limit for BMD +#' } +#' +#' If root finding fails for confidence limits, BMDL is set to 0 and BMDU to Inf. +#' +#' @section Function Modification: +#' The function dynamically modifies the model's derivative function to account +#' for different BMD definitions by: +#' \itemize{ +#' \item Parsing the derivative function body +#' \item Adding appropriate transformation terms +#' \item Handling parameter indexing for fixed vs. estimated parameters +#' \item Supporting both 4-parameter and 5-parameter models +#' } +#' +#' @section Confidence Intervals: +#' Confidence intervals are calculated using the delta method: +#' \deqn{CI = BMD \pm t_{\alpha/2} \sqrt{h(BMD)^T \Sigma h(BMD)}}{CI = BMD +/- t * sqrt(h(BMD)' * Sigma * h(BMD))} +#' where h(BMD) is the gradient vector and Σ is the variance-covariance matrix. +#' +#' For continuous data, t-distribution quantiles are used; for other data types, +#' normal distribution quantiles are used. +#' +#' @section Error Handling: +#' The function includes several error checks: +#' \itemize{ +#' \item Stops if "point" definition is used (not supported) +#' \item Stops if hybrid definitions are used without appropriate backgType +#' \item Stops if no background value is provided when required +#' \item Stops if no solution exists for the specified BMR +#' } +#' +#' @note +#' This is an internal helper function for BMD calculation. It assumes the input +#' object has the standard structure from dose-response model fitting, including +#' components like `fct`, `dataList`, `type`, etc. +#' +#' **Important considerations:** +#' \itemize{ +#' \item The search range is limited to `[0, extFactor × max(dose)]` +#' \item Hybrid definitions require careful specification of useSD and backg +#' \item Function modification uses string manipulation and may be sensitive to model structure +#' } +#' +#' @seealso +#' \code{\link{bmd}} for the main BMD calculation function, +#' \code{\link{uniroot}} for the root finding algorithm, +#' \code{\link{vcov}} for variance-covariance matrix extraction, +#' \code{\link[sandwich]{sandwich}} for robust variance estimation +#' +#' @examples +#' \dontrun{ +#' # Typically called internally by bmd(), but can be used directly: +#' # Need to be updated +#' # Fit a dose-response model +#' model <- drm(response ~ dose, data = dose_data, fct = LL.4()) +#' +#' # Calculate BMD for 10% additional risk +#' bmd_result <- invBmd(object = model, +#' bmr = 0.1, +#' level = 0.9, +#' slope = "increasing", +#' def = "additional", +#' useSD = sd(model$data$response)) +#' +#' # Extract results +#' bmd_estimate <- bmd_result[1, "BMD"] +#' bmd_lower <- bmd_result[1, "BMDL"] +#' bmd_upper <- bmd_result[1, "BMDU"] +#' +#' # Using hybrid definition with 1.5 standard deviations +#' bmd_hybrid <- invBmd(object = model, +#' bmr = 0.05, +#' def = "hybridAdd", +#' backgType = "hybridSD", +#' backg = 1.5, +#' useSD = sd(model$data$response)) +#' } invBmd <- function(object, bmr, level=0.9, slope, backgType="modelBased", backg=NA, catLev=NA, extFactor=10, def, useSD=useSD, sandwich.vcov=FALSE){ @@ -559,7 +695,7 @@ invBmd <- function(object, bmr, level=0.9, slope, backgType="modelBased", # g1<-function(x){as.numeric(g(x, matrix(coef(object), 1, length(coef(object)))))} if(sandwich.vcov){ j1<-function(x){sqrt(as.vector(h(x, matrix(coef(object), 1, length(coef(object)))))%*% - sandwich(object)%*% + sandwich::sandwich(object)%*% as.vector(h(x, matrix(coef(object), 1, length(coef(object))))))} } else{ j1<-function(x){sqrt(as.vector(h(x, matrix(coef(object), 1, length(coef(object)))))%*% diff --git a/R/logLik.drcHetVar.R b/R/logLik.drcHetVar.R index 8838022..9cc096b 100644 --- a/R/logLik.drcHetVar.R +++ b/R/logLik.drcHetVar.R @@ -1,11 +1,39 @@ +#' Log-Likelihood Method for drcHetVar Objects +#' +#' Extracts the log-likelihood from drcHetVar model objects. +#' +#' @param object A drcHetVar model object +#' @param ... Additional arguments (not used) +#' +#' @return The log-likelihood value +#' @export logLik.drcHetVar <- function(object, ...){ - object$sumList$numObs/2 * log(2*pi) - object$value/2 } +#' AIC Method for drcHetVar Objects +#' +#' Extracts the AIC from drcHetVar model objects. +#' +#' @param object A drcHetVar model object +#' @param ... Additional arguments (not used) +#' @param k Numeric value for penalty term in AIC calculation (default is 2) +#' +#' @return The log-likelihood value +#' @export AIC.drcHetVar <- function(object, ..., k = 2){ 2*object$sumList$numPar - k*logLik(object) } +#' BIC Method for drcHetVar Objects +#' +#' Extracts the BIC from drcHetVar model objects. +#' +#' @param object A drcHetVar model object +#' @param ... Additional arguments (not used) +#' +#' @return The log-likelihood value +#' @export BIC.drcHetVar <- function(object, ...){ object$sumList$numPar*log(object$sumList$numObs) - 2*logLik(object) } diff --git a/R/logLik.drcOrdinal.R b/R/logLik.drcOrdinal.R index b6eda0e..c6178c0 100644 --- a/R/logLik.drcOrdinal.R +++ b/R/logLik.drcOrdinal.R @@ -1,3 +1,12 @@ +#' Log-Likelihood Method for drcOrdinal Objects +#' +#' Extracts the log-likelihood from drcOrdinal model objects. +#' +#' @param object A drcOrdinal model object +#' @param ... Additional arguments (not used) +#' +#' @return The log-likelihood value +#' @export logLik.drcOrdinal <- function(object, ...){ dots <- list(...) if (!is.null(dots$epsilon)){ diff --git a/R/monotonicityTest.R b/R/monotonicityTest.R index c0edd37..9b69989 100644 --- a/R/monotonicityTest.R +++ b/R/monotonicityTest.R @@ -1,3 +1,51 @@ +#' Test for Monotonicity of Relationship Between Two Variables +#' +#' Conducts a test for monotonicity between a numeric independent variable +#' \code{x} and a numeric dependent variable \code{y} using specified +#' statistical tests. +#' +#' The function tests the monotonicity of the relationship between \code{x} and +#' \code{y} based on the specified test: \itemize{ \item \code{"jonckheere"}: +#' Uses the Jonckheere-Terpstra test to assess monotonic trends. \item +#' \code{"bartholomew"}: Uses Bartholomew's test to assess monotonicity. } +#' +#' The direction of the monotonicity (increasing or decreasing) is determined +#' by the sign of the coefficient from a simple linear model \code{lm(y ~ x)}. +#' +#' @param x A numeric vector or the name of the independent variable (if +#' \code{data} is provided). +#' @param y A numeric vector or the name of the dependent variable (if +#' \code{data} is provided). +#' @param data An optional data frame containing the variables \code{x} and +#' \code{y}. If provided, \code{x} and \code{y} should be column names in +#' \code{data}. +#' @param test A character string specifying the test to use. Must be one of +#' \code{"jonckheere"} (default) or \code{"bartholomew"}. +#' @param level Significance level for the test. Defaults to 0.05. +#' @param ... Additional arguments passed to the underlying test functions. +#' @return A list with the following components: \item{p.value}{The p-value of +#' the test.} \item{acceptMonotonicity}{A logical value indicating whether +#' monotonicity is accepted (\code{TRUE}) or rejected (\code{FALSE}) based on +#' the specified significance level.} +#' @author Jens Riis Baalkilde +#' @seealso \code{.jonckheereTest}, \code{.bartholomewTest} +#' @references A. R. Jonckheere (1954). "A Distribution-Free k-Sample Test +#' Against Ordered Alternatives." D. J. Bartholomew (1961). "Ordered tests in +#' the analysis of variance." OECD (2006). Rapport No. 54, Annexes. +#' @keywords monotonicity, trend test +#' @examples +#' +#' # Example with custom data +#' x <- c(1, 2, 3, 4, 5) +#' y <- c(2, 4, 6, 8, 10) +#' result <- monotonicityTest(x, y, test = "jonckheere") +#' print(result) +#' +#' data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6)) +#' result <- monotonicityTest("conc", "rootl", data = drcData::ryegrass, test = "bartholomew") +#' print(result) +#' +#' @export monotonicityTest <- function(x, y, data, test = c("jonckheere", "bartholomew"), level = 0.05, ...){ # , "drc", "quad" if(!missing(data)){ x <- data[[x]] diff --git a/R/plot.bmd.R b/R/plot.bmd.R index cbb194f..03b14c8 100644 --- a/R/plot.bmd.R +++ b/R/plot.bmd.R @@ -1,3 +1,42 @@ +#' Plotting method for benchmark doses modeling object +#' +#' \code{plot.bmd} displays benchmark dose values with options to plot +#' confidence intervals as well. +#' +#' This function is a simple function to plot benchmark dose values along with +#' the fitted curve. +#' +#' @aliases plot.bmd +#' @param x an object of class 'bmd'. +#' @param ... arguments to be passed on to \code{plot.drc}, if \code{add = +#' FALSE} +#' @param interval option to plot only the lower limit of the confidence +#' interval for the benchmark dose ("BMDL", default), both limit of the +#' confidence interval ("twosided"), or no confidence interval ("none"). +#' @return Creates a plot. No value returned. +#' @author Jens Riis Baalkilde. +#' @keywords ggplot +#' @export +#' @examples +#' +#' library(drc) +#' library(drcData) +#' +#' ## Fitting model and calculating BMD. +#' model <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) +#' bmd0 <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative") +#' +#' ## Plotting +#' plot(bmd0) +#' +#' # Plot both limits of confidence interval +#' plot(bmd0, interval = "twosided") +#' +#' # Pass argument to plot.bmd to plot confidence band around curve +#' plot(bmd0, type = "confidence") +#' +#' +#' plot.bmd <- function(x, ..., interval = c("BMDL", "twosided", "none")){ object <- x model <- object$model diff --git a/R/plot.drcHetVar.R b/R/plot.drcHetVar.R index cafc325..3f2ad6c 100644 --- a/R/plot.drcHetVar.R +++ b/R/plot.drcHetVar.R @@ -1,3 +1,12 @@ +#' Plot Method for drcHetVar Objects +#' +#' Plots the fitted dose-response curve for drcHetVar model objects. +#' +#' @param x A drcHetVar model object +#' @param ... Additional graphical parameters passed to plot +#' +#' @return Invisibly returns the x object +#' @export plot.drcHetVar <- function(x, ...){ object <- x dots <- list(...) @@ -6,7 +15,8 @@ plot.drcHetVar <- function(x, ...){ } else { gridsize <- 300 } - + sigma0 <- NULL ## avoiding global binding issues + rm(list="sigma0") # Add assertion of gridExtra if(!requireNamespace("gridExtra")){ stop('package "gridExtra" must be installed to plot drcHetVar object') @@ -57,4 +67,4 @@ plot.drcHetVar <- function(x, ...){ (gridExtra::grid.arrange(p1, p2)) invisible(list(p1,p2)) -} \ No newline at end of file +} diff --git a/R/plot.drcOrdinal.R b/R/plot.drcOrdinal.R index cf9c7ed..abbdde2 100644 --- a/R/plot.drcOrdinal.R +++ b/R/plot.drcOrdinal.R @@ -1,9 +1,24 @@ + +#' Plot Method for drcOrdinal Objects +#' +#' Plots the fitted dose-response curve for drcOrdinal model objects. +#' +#' @param x A drcOrdinal model object +#' @param ... Additional graphical parameters passed to plot +#' +#' @return Invisibly returns the x object +#' @export plot.drcOrdinal <- function(x, ...){ object <- x dots <- list(...) col_pal <- dots$col_pal xlim <- dots$xlim - + ## avoiding global binding of variables issues + name <- NULL + value <- NULL + dose <- NULL + prop <- NULL + rm(list=c("name", "value", "dose", "prop")) if(!requireNamespace("scales")){ stop('package "scales" must be installed to plot drcOrdinal object') } @@ -20,8 +35,8 @@ plot.drcOrdinal <- function(x, ...){ plotData <- tidyr::pivot_longer(object$data, cols = object$levels) %>% #-c(object$dose, object$weights)) %>% dplyr::mutate(dose = eval(parse(text=object$dose)), - cat = factor(name, levels = object$levels), - prop = value/eval(parse(text=object$weights))) + cat = factor(name, levels = object$levels), + prop = value/eval(parse(text=object$weights))) plot <- ggplot2::ggplot(plotData) + ggplot2::geom_col(aes(x = dose, y = prop, fill = cat), alpha = 0.5) + diff --git a/R/print.bmd.R b/R/print.bmd.R index a495841..b5cf362 100644 --- a/R/print.bmd.R +++ b/R/print.bmd.R @@ -1,3 +1,13 @@ +#' Print Method for bmd Objects +#' +#' Prints a summary of a bmd model object. +#' +#' @param x A bmd model object +#' @param ... Additional arguments (not used) +#' @param digits Number of significant digits to use for printing values +#' +#' @return Invisibly returns the x object +#' @export "print.bmd" <- function(x, ..., digits = max(3, getOption("digits") - 3)) { object <- x @@ -13,4 +23,4 @@ cat("\n") invisible(object) -} \ No newline at end of file +} diff --git a/R/print.bmdHetVar.R b/R/print.bmdHetVar.R index 065455b..bfd3210 100644 --- a/R/print.bmdHetVar.R +++ b/R/print.bmdHetVar.R @@ -1,3 +1,13 @@ +#' Print Method for drcHetVar Objects +#' +#' Prints a summary of a drcHetVar model object. +#' +#' @param x A drcHetVar model object +#' @param ... Additional arguments (not used) +#' @param digits Number of significant digits to use for printing values +#' +#' @return Invisibly returns the x object +#' @export "print.bmdHetVar" <- function(x, ..., digits = max(3, getOption("digits") - 3)) { object <- x @@ -13,4 +23,4 @@ cat("\n") invisible(object) -} \ No newline at end of file +} diff --git a/R/print.bmdOrdinal.R b/R/print.bmdOrdinal.R index a7357b8..4a12f55 100644 --- a/R/print.bmdOrdinal.R +++ b/R/print.bmdOrdinal.R @@ -1,3 +1,13 @@ +#' Print Method for bmdOrdinalr Objects +#' +#' Prints a summary of a bmdOrdinal model object. +#' +#' @param x A bmdOrdinal model object +#' @param ... Additional arguments (not used) +#' @param digits Number of significant digits to use for printing values +#' +#' @return Invisibly returns the x object +#' @export print.bmdOrdinal <- function(x, ..., digits = max(3, getOption("digits") - 3)) { object <- x @@ -13,4 +23,4 @@ print.bmdOrdinal <- function(x, ..., digits = max(3, getOption("digits") - 3)) cat("\n") invisible(object) -} \ No newline at end of file +} diff --git a/R/print.drcHetVar.R b/R/print.drcHetVar.R index 81a14c1..6040736 100644 --- a/R/print.drcHetVar.R +++ b/R/print.drcHetVar.R @@ -1,3 +1,13 @@ +#' Print Method for drcHetVar Objects +#' +#' Prints a summary of a drcHetVar model object. +#' +#' @param x A drcHetVar model object +#' @param ... Additional arguments (not used) +#' @param digits Number of significant digits to use for printing values +#' +#' @return Invisibly returns the x object +#' @export print.drcHetVar <- function(x, ..., digits = max(3, getOption("digits") - 3)){ object <- x classList <- class(object) @@ -17,4 +27,4 @@ print.drcHetVar <- function(x, ..., digits = max(3, getOption("digits") - 3)){ # END invisible(object) -} \ No newline at end of file +} diff --git a/R/print.drcMMRE.R b/R/print.drcMMRE.R index f139a66..14a1817 100644 --- a/R/print.drcMMRE.R +++ b/R/print.drcMMRE.R @@ -1,3 +1,13 @@ +#' Print Method for drcMMRE Objects +#' +#' Prints a summary of a drcMMRE model object. +#' +#' @param x A drcMMRE model object +#' @param ... Additional arguments (not used) +#' @param digits Number of significant digits to use for printing values +#' +#' @return Invisibly returns the x object +#' @export print.drcMMRE <- function (x, ..., digits = max(3, getOption("digits") - 3)) { object <- x @@ -14,4 +24,4 @@ print.drcMMRE <- function (x, ..., digits = max(3, getOption("digits") - 3)) } cat("\n") invisible(object) -} \ No newline at end of file +} diff --git a/R/print.drcOrdinal.R b/R/print.drcOrdinal.R index c7cfdf5..cfa8354 100644 --- a/R/print.drcOrdinal.R +++ b/R/print.drcOrdinal.R @@ -1,3 +1,13 @@ +#' Print Method for drcOrdinal Objects +#' +#' Prints a summary of a drcOrdinal model object. +#' +#' @param x A drcOrdinal model object +#' @param ... Additional arguments (not used) +#' @param digits Number of significant digits to use for printing values +#' +#' @return Invisibly returns the x object +#' @export print.drcOrdinal <- function(x, ..., digits = max(3, getOption("digits") - 3)) { object <- x diff --git a/R/qplotBmd.R b/R/qplotBmd.R index 85947b3..270467b 100644 --- a/R/qplotBmd.R +++ b/R/qplotBmd.R @@ -1,3 +1,43 @@ +#' Plotting benchmark doses using ggplot2 +#' +#' \code{qplotBmd} displays benchmark dose values with options to plot +#' confidence intervals as well using \code{ggplot2}. +#' +#' This function is a simple function to plot benchmark dose values +#' +#' @param x an object of class 'bmd'. +#' @param ... arguments to be passed on to qplotDrc, if \code{add = FALSE} +#' @param interval option to plot only the lower limit of the confidence +#' interval for the benchmark dose ("BMDL", default), both limit of the +#' confidence interval ("twosided"), or no confidence interval ("none"). +#' @param col logical. If TRUE then multiple curves specified by "curveid" in +#' the dose-response model are distinguised by colours rather than point shapes +#' and line types +#' @param add logical. If TRUE then the functions returns a list of plot layers +#' to be added to an already existing ggplot. +#' @return A \code{ggplot} object. If the option \code{add} is used, a list of +#' \code{ggplot} layers is returned. +#' @author Jens Riis Baalkilde. +#' @keywords ggplot +#' @examples +#' +#' library(drc) +#' library(drcData) +#' +#' ## Fitting model and calculating BMD. +#' model <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) +#' bmd0 <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative") +#' +#' # Plot +#' qplotBmd(bmd0, interval = "twosided", add = FALSE) +#' +#' qplotDrc(model,type="confidence") + +#' qplotBmd(bmd0, interval = "twosided", add = TRUE) +#' +#' qplotBmd(bmd0, interval = "twosided", add = FALSE) +#' +#' +#' @export qplotBmd <- function(x, ..., interval = c("BMDL", "twosided", "none"), col = FALSE, add = FALSE){ object <- x diff --git a/R/qplotDrc.R b/R/qplotDrc.R index c9a2feb..9428557 100644 --- a/R/qplotDrc.R +++ b/R/qplotDrc.R @@ -1,9 +1,137 @@ +#' Plotting fitted dose-response curves using ggplot2 +#' +#' \code{qplotDrc} displays fitted curves and observations in the same plot +#' window, distinguishing between curves by different plot symbols and line +#' types or colours using \code{ggplot2}. +#' +#' This function largely seeks to mimic the behaviour of the \code{plot} method +#' for the \code{drc} package using the \code{ggplot2} package for plotting. +#' +#' The use of \code{xlim} allows changing the range of the x axis, +#' extrapolating the fitted dose-response curves. Note that changing the range +#' on the x axis may also entail a change of the range on the y axis. +#' +#' See \code{\link{colors}} for the available colours. +#' +#' Suitable labels are automatically provided. +#' +#' The model-based standard errors used for the error bars are calculated as +#' the fitted value plus/minus the estimated error times the 1-(alpha/2) +#' quantile in the t distribution with degrees of freedom equal to the residual +#' degrees of freedom for the model (or using a standard normal distribution in +#' case of binomial and poisson data), where alpha=1-confidence.level. The +#' standard errors are obtained using the predict method with the arguments +#' interval = "confidence" and level=confidence.level. +#' +#' @param x an object of class 'drc'. +#' @param add logical. If TRUE then the functions returns a list of plot layers +#' to be added to an already existing ggplot. +#' @param level vector of curve levels to plot. To plot only the curves +#' specified by their names. +#' @param type a character string specifying how to plot the data. There are +#' currently 5 options: "average" (averages and fitted curve(s); default), +#' "none" (only the fitted curve(s)), "obs" (only the data points), "all" (all +#' data points and fitted curve(s)), "bars" (averages and fitted curve(s) with +#' model-based standard errors (see Details)), and "confidence" (confidence +#' bands for fitted curve(s)). +#' @param gridsize numeric. Number of points in the grid used for plotting the +#' fitted curves. +#' @param xtrans Transformation to use on the x-axis. The default is +#' "pesudo_log", which is a logarithmic transformation with a smooth transition +#' to 0. Other options include (among others) "log" and "identity". Can be +#' overridden by adding a scale using the \code{scale_x_continuous} function. +#' @param xlab an optional label for the x axis. +#' @param xlim a numeric vector of length two, containing the lower and upper +#' limit for the x axis. +#' @param ytrans Transformation to use on the y-axis. The default is no +#' transformation. Other options include (among others) "pseudo_log" and "log" +#' and. Can be overridden by adding a scale using the \code{scale_y_continuous} +#' function. +#' @param ylab an optional label for the y axis. +#' @param ylim a numeric vector of length two, containing the lower and upper +#' limit for the y axis. +#' @param col logical. If TRUE default ggplot colours are used, can be +#' overridden by \code{scale_color_manual}. If FALSE (default) no colours are +#' used. +#' @param normal logical. If TRUE the plot of the normalized data and fitted +#' curves are shown (for details see Weimer et al. (2012) for details). +#' @param normRef numeric specifying the reference for the normalization +#' (default is 1). +#' @param confidence.level confidence level for error bars and confidence +#' bands. Defaults to 0.95. +#' @return A \code{ggplot} object. If the option \code{add} is used, a list of +#' \code{ggplot} layers is returned. +#' @author Jens Riis Baalkilde. Based on \code{plot.drc} by Christian Ritz and +#' Jens C. Streibig with Contributions from Xiaoyan Wang and Greg Warnes. +#' @references Weimer, M., Jiang, X., Ponta, O., Stanzel, S., Freyberger, A., +#' Kopp-Schneider, A. (2012) The impact of data transformations on +#' concentration-response modeling. \emph{Toxicology Letters}, \bold{213}, +#' 292--298. +#' @keywords ggplot +#' @examples +#' +#' library(drc) +#' library(drcData) +#' library(ggplot2) +#' +#' ## Fitting models to be plotted below +#' ryegrass.m1 <- drm(rootl~conc, data = ryegrass, fct = LL.4()) +#' ryegrass.m2 <- drm(rootl~conc, data = ryegrass, fct = LL.3()) # lower limit fixed at 0 +#' +#' ## Plotting observations and fitted curve for the first model +#' p <- qplotDrc(ryegrass.m1) +#' p +#' +#' ## Add confidence region for the first model. +#' p + qplotDrc(ryegrass.m1, type="confidence", add = TRUE)$confBandLayer +#' +#' ## Plot both models +#' p + qplotDrc(ryegrass.m2, add = TRUE)$curveLayer +#' +#' ## Fitting model to be plotted below +#' spinach.m1 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4()) +#' +#' ## Plot with no colours +#' qplotDrc(spinach.m1) +#' +#' ## Plot with default colours +#' qplotDrc(spinach.m1, col = TRUE) +#' +#' ## Plot with specified colours +#' qplotDrc(spinach.m1, col = TRUE) + +#' scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod", +#' "darkslategray4", "plum4")) +#' +#' ## Plot of curves 1 and 2 only +#' qplotDrc(spinach.m1, level = c(1,4)) +#' +#' ## Plot with confidence regions +#' qplotDrc(spinach.m1, col = TRUE, type = "confidence") +#' +#' ## Plot points and add confidence regions. Confidence regions are coloured by the "fill" aesthetic. +#' ## Customising the x scale by adding a new scale. +#' qplotDrc(spinach.m1, col = TRUE, type = "confidence") + +#' qplotDrc(spinach.m1, col = TRUE, type = "average", add = TRUE)$obsLayer + +#' scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod", +#' "darkslategray4", "plum4"))+ +#' scale_fill_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod", +#' "darkslategray4", "plum4")) + +#' scale_x_continuous(trans = scales:::pseudo_log_trans(sigma = 0.2, base = exp(1))) +#' +#' +#' @export qplotDrc <- function(x, add = FALSE, level = NULL, type = c("average", "all", "bars", "none", "obs", "confidence"), gridsize = 250, xtrans = "pseudo_log", xlab, xlim, ytrans = NULL, ylab, ylim, col = FALSE, normal = FALSE, normRef = 1, confidence.level = 0.95){ object <- x type <- match.arg(type) + ### Avoiding global variable binding problems + normalizeLU <- NULL + Lower <- NULL + Upper <- NULL + y <- NULL + rm(list=(c("normalizeLU", "Lower", "Upper","y"))) ## Determining logarithmic scales if ((xtrans == "log") || (xtrans == "pseudo_log")) @@ -275,3 +403,9 @@ qplotDrc <- function(x, add = FALSE, level = NULL, type = c("average", "all", "b obsLayer = obsLayer) } } + + +getLU <- function(object){ + ## using the drc internal function + eval(parse(text = "drc:::getLU(object))")) +} diff --git a/R/shirleyTest.R b/R/shirleyTest.R index c6fb520..98cd458 100644 --- a/R/shirleyTest.R +++ b/R/shirleyTest.R @@ -117,4 +117,4 @@ dist = "t'", model = DAT) class(ans) <- "osrt" return(ans) -} \ No newline at end of file +} diff --git a/R/trendTest.R b/R/trendTest.R index 622ebfa..86990ae 100644 --- a/R/trendTest.R +++ b/R/trendTest.R @@ -1,3 +1,58 @@ +#' Test for Trend in Relationship Between Two Variables +#' +#' Conducts a test for trends between a numeric independent variable \code{x} +#' and a numeric dependent variable \code{y} using specified statistical tests. +#' +#' The function tests for a trend in the relationship between \code{x} and +#' \code{y} based on the specified test: \itemize{ \item \code{"william"}: +#' Applies Williams' test to assess trend significance. \item +#' \code{"shirley"}: Uses Shirley's test for trend analysis with ordered +#' alternatives. \item \code{"tukey"}: Implements the Tukey trend test using +#' multiple marginal models. } +#' +#' The direction of the trend (increasing or decreasing) is determined by the +#' slope of the linear model \code{lm(y ~ x)}. +#' +#' @param x A numeric vector or the name of the independent variable (if +#' \code{data} is provided). +#' @param y A numeric vector or the name of the dependent variable (if +#' \code{data} is provided). +#' @param data An optional data frame containing the variables \code{x} and +#' \code{y}. If provided, \code{x} and \code{y} should be column names in +#' \code{data}. +#' @param test A character string specifying the test to use. Must be one of +#' \code{"william"}, \code{"shirley"}, or \code{"tukey"} (default). +#' @param level Significance level for the test. Defaults to 0.05. +#' @return A list with the following components: \item{p.values}{A numeric +#' vector of p-values for the tests (if applicable).} \item{decisions}{A +#' character vector indicating whether the trend is \code{"accept"} or +#' \code{"reject"} based on the test results.} \item{acceptTrend}{A logical +#' value indicating whether a trend is accepted (\code{TRUE}) or rejected +#' (\code{FALSE}) based on the specified significance level.} +#' @author Jens Riis Baalkilde +#' @seealso \code{.williamsTest}, \code{.shirleyTest}, \code{.tukeytrendfit} +#' @references Williams, D. A. (1971). "A test for differences between +#' treatment means when several dose levels are compared with a zero dose +#' control." Biometrics, 27(1), 103-117. Shirley, E. (1977). "A non-parametric +#' equivalent of Williams' test for contrasting increasing dose levels of a +#' treatment." Biometrics, 33(2), 386-389. Schaarschmidt, F. et al. (2021). +#' "The Tukey trend test: Multiplicity adjustment using multiple marginal +#' models" Biometrics, 78(2), 789-797. +#' @keywords trend, statistical test +#' @examples +#' +#' # Example with custom data +#' x <- c(1, 2, 3, 4, 5) +#' y <- c(2, 4, 6, 8, 10) +#' result <- trendTest(x, y, test = "tukey") +#' print(result) +#' +#' # Example with a data frame +#' data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6)) +#' result <- trendTest("x", "y", data = data, test = "shirley") +#' print(result) +#' +#' @export trendTest <- function(x, y, data, test = c("william", "shirley", "tukey"), level = 0.05){ if(!missing(data)){ x <- data[[x]] @@ -37,4 +92,4 @@ trendTest <- function(x, y, data, test = c("william", "shirley", "tukey"), level } list(p.values = p.values, decisions = decisions, acceptTrend = acceptTrend) -} \ No newline at end of file +} diff --git a/R/tukeytrendfit.R b/R/tukeytrendfit.R index 570f98a..0ee876c 100644 --- a/R/tukeytrendfit.R +++ b/R/tukeytrendfit.R @@ -57,4 +57,4 @@ OUT <- c(list(mmm = MMM, mlf = MLF, df = DF), MODINFO) class(OUT) <- "tukeytrend" return(OUT) -} \ No newline at end of file +} diff --git a/R/williamsTest.R b/R/williamsTest.R index b951eef..179e9fe 100644 --- a/R/williamsTest.R +++ b/R/williamsTest.R @@ -115,4 +115,4 @@ dist = "t'") class(ans) <- "osrt" ans -} \ No newline at end of file +} diff --git a/bmd.Rproj b/bmd.Rproj index c88d76d..929b948 100644 --- a/bmd.Rproj +++ b/bmd.Rproj @@ -1,9 +1,8 @@ Version: 1.0 -ProjectId: 17a33614-0dad-4a73-9ef1-82328c71af7f -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default +RestoreWorkspace: No +SaveWorkspace: No +AlwaysSaveHistory: No EnableCodeIndexing: Yes UseSpacesForTab: Yes diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 0000000..aea341f --- /dev/null +++ b/docs/404.html @@ -0,0 +1,123 @@ + + + + + + + +Page not found (404) • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + +Content not found. Please use links in the navbar. + +
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html new file mode 100644 index 0000000..94a7f04 --- /dev/null +++ b/docs/LICENSE-text.html @@ -0,0 +1,770 @@ + +License • bmd + + +
+
+ + + +
+
+ + +
                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    {one line to give the program's name and a brief idea of what it does.}
+    Copyright (C) {year}  {name of author}
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    {project}  Copyright (C) {year}  {fullname}
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
+ +
+ + + +
+ + + +
+ +
+

Site built with pkgdown 2.1.0.

+
+ +
+ + + + + + + + diff --git a/docs/articles/basic-bmd-functions.html b/docs/articles/basic-bmd-functions.html new file mode 100644 index 0000000..f6a3931 --- /dev/null +++ b/docs/articles/basic-bmd-functions.html @@ -0,0 +1,221 @@ + + + + + + + +basic-bmd-functions • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+library(bmd)
+
+

Basic BMD Functions Examples +

+

This vignette demonstrates the usage of functions related to basic +bmd functions .

+
+
+
+
+
+library(drc)
+
+library(drcData)
+
+
+
+## Fitting log-logistic two-parameter model to binomial data
+
+deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial")
+
+
+
+## BMD for 5% additional risk with estimated background risk
+
+bmd(deguelin.m1, 0.05, backgType = "modelBased", def = "additional")
+
+
+
+## BMD for 10% additional risk with 2% background risk
+
+bmd(deguelin.m1, 0.1, backg = 0.02 , backgType = "absolute", def = "additional")
+
+
+
+## BMD for 5% excess risk and background 0
+
+bmd(deguelin.m1, 0.05, backg = 0, backgType = "absolute", def = "excess")
+
+
+
+## Dose resulting in 12% risk
+
+bmd(deguelin.m1, 0.12, def = "point")
+
+
+
+## Benchmark doses for a continuous response
+
+ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
+
+
+
+## BMD as the dose resulting in a 5% change relative to the mean background level
+
+bmd(ryegrass.m1, 0.05, backgType = "modelBased", def = "relative", display = TRUE)
+
+
+
+## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk
+
+bmd(ryegrass.m1, 0.05, backg = 2, backgType = "hybridSD", def = "hybridAdd", display = TRUE)
+
+

Bootstrapping Methods +

+
+
+## Data on root length in ryegrass after exposure to ferulic acid
+
+require(drc)
+
+require(drcData)
+
+data(ryegrass)
+
+
+
+ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
+
+
+
+## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk
+
+bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", R = 50)
+
+
+
+## BMD from the same definitions but using parametric bootstrap
+
+bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", bootType="parametric",R = 50)
+
+
+
+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/articles/bmd_Package.html b/docs/articles/bmd_Package.html new file mode 100644 index 0000000..4503bbc --- /dev/null +++ b/docs/articles/bmd_Package.html @@ -0,0 +1,317 @@ + + + + + + + +bmd Package • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+library(drcData)
+library(drc)
+#> Warning: package 'drc' was built under R version 4.4.2
+#> Loading required package: MASS
+#> 
+#> 'drc' has been loaded.
+#> Please cite R and 'drc' if used for a publication,
+#> for references type 'citation()' and 'citation('drc')'.
+#> 
+#> Attaching package: 'drc'
+#> The following objects are masked from 'package:drcData':
+#> 
+#>     auxins, nasturtium
+#> The following objects are masked from 'package:stats':
+#> 
+#>     gaussian, getInitial
+library(bmd)
+
+

Package Summary +

+

This R package focuses on Benchmark Dose (BMD) modeling, which is +commonly used in toxicology and risk assessment to determine the dose of +a substance that corresponds to a specific level of response or risk. +The package provides a comprehensive range of functionalities. It +supports various model types, confidence interval methods, and model +averaging approaches.

+
+

Core Functionalities +

+
    +
  1. +Dose-Response Modeling: +
      +
    • Fits various dose-response models including logistic, log-normal, +Weibull, and fractional polynomial models
    • +
    • Supports continuous, binomial, Poisson, and negative binomial +response types
    • +
    • Handles both single and multiple curves/groups
    • +
    +
  2. +
  3. +BMD Estimation: +
      +
    • Calculates benchmark doses (BMDs) and their lower confidence limits +(BMDLs)
    • +
    • Implements multiple BMD definitions: excess, additional, relative, +extra, added, hybrid excess, hybrid additional, and point
    • +
    • Provides various background types: model-based, absolute, hybridSD, +and hybridPercentile
    • +
    +
  4. +
  5. +Confidence Interval Methods: +
      +
    • Delta method
    • +
    • Profile likelihood
    • +
    • Bootstrap (parametric, nonparametric)
    • +
    • Sandwich estimator
    • +
    • Inverse regression
    • +
    +
  6. +
  7. +Model Averaging: +
      +
    • Implements model averaging for BMD estimation via +bmdMA() +
    • +
    • Supports various weighting schemes: AIC, BIC, and stacking +(cross-validation)
    • +
    • Implements different averaging approaches: Kang, Buckland, curve, +and bootstrap
    • +
    +
  8. +
  9. +Special Model Types: +
      +
    • Ordinal response models (drcOrdinal)
    • +
    • Heterogeneous variance models (drcHetVar)
    • +
    • Mixed models with random effects (drcMMRE)
    • +
    +
  10. +
  11. +Trend Testing: +
      +
    • Implements monotonicity tests (Jonckheere-Terpstra, +Bartholomew)
    • +
    • Provides trend tests (Williams, Shirley, Tukey)
    • +
    +
  12. +
  13. +Visualization: +
      +
    • Plot methods for BMD objects
    • +
    • ggplot2-based plotting functions (qplotDrc, +qplotBmd)
    • +
    +
  14. +
+
+
+
+

Usage of the Package +

+

The package follows a workflow typically seen in dose-response +analysis:

+
    +
  1. +Fit dose-response models using functions like +drm(), drcOrdinal(), drcHetVar(), +or drcMMRE() +
  2. +
  3. +Estimate BMDs using bmd() or +specialized functions like bmdOrdinal(), +bmdHetVar() +
  4. +
  5. +Apply model averaging with bmdMA() if +multiple models are considered
  6. +
  7. +Visualize results using plot methods or specialized +plotting functions
  8. +
  9. +Test for trends using trendTest() or +monotonicityTest() +
  10. +
+
+

Example usage: +

+
+# Fit dose-response model
+
+data("secalonic")
+model <- drm(rootl ~ dose, data = secalonic, fct = LL.4())
+## model <- drm(response ~ dose, data = mydata, fct = LL.4())
+
+# Calculate BMD
+bmd_result <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative", interval = "profile")
+#>       BMD       BMDL
+#>  0.035362 0.02619523
+
+# Plot result
+plot(bmd_result)
+

+
+## note that ggplot2 style plot can be generated using qplot function
+## qplotBmd(bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative", display = FALSE)) # display = FALSE hides output from bmd function
+
+

Fit multiple models for model averaging +

+
+# Fit multiple models for model averaging
+
+# Apply model averaging (if multiple models are fitted)
+model1 <- model
+model2 <- drm(rootl ~ dose, data = secalonic, fct = LN.3())
+model3 <- drm(rootl ~ dose, data = secalonic, fct = LN.4())
+model_list <- list(model1, model2, model3)
+bmd_ma <- bmdMA(model_list, modelWeights = "AIC", backgType = "modelBased", bmr = 0.1, 
+                def =  "relative" , type = "bootstrap")
+#> Performing bootstrap
+#>   |                                                                              |                                                                      |   0%  |                                                                              |                                                                      |   1%  |                                                                              |=                                                                     |   1%  |                                                                              |=                                                                     |   2%  |                                                                              |==                                                                    |   2%  |                                                                              |==                                                                    |   3%  |                                                                              |==                                                                    |   4%  |                                                                              |===                                                                   |   4%  |                                                                              |===                                                                   |   5%  |                                                                              |====                                                                  |   5%  |                                                                              |====                                                                  |   6%  |                                                                              |=====                                                                 |   6%  |                                                                              |=====                                                                 |   7%  |                                                                              |=====                                                                 |   8%  |                                                                              |======                                                                |   8%  |                                                                              |======                                                                |   9%  |                                                                              |=======                                                               |   9%  |                                                                              |=======                                                               |  10%  |                                                                              |=======                                                               |  11%  |                                                                              |========                                                              |  11%  |                                                                              |========                                                              |  12%  |                                                                              |=========                                                             |  12%  |                                                                              |=========                                                             |  13%  |                                                                              |=========                                                             |  14%  |                                                                              |==========                                                            |  14%  |                                                                              |==========                                                            |  15%  |                                                                              |===========                                                           |  15%  |                                                                              |===========                                                           |  16%  |                                                                              |============                                                          |  16%  |                                                                              |============                                                          |  17%  |                                                                              |============                                                          |  18%  |                                                                              |=============                                                         |  18%  |                                                                              |=============                                                         |  19%  |                                                                              |==============                                                        |  19%  |                                                                              |==============                                                        |  20%  |                                                                              |==============                                                        |  21%  |                                                                              |===============                                                       |  21%  |                                                                              |===============                                                       |  22%  |                                                                              |================                                                      |  22%  |                                                                              |================                                                      |  23%  |                                                                              |================                                                      |  24%  |                                                                              |=================                                                     |  24%  |                                                                              |=================                                                     |  25%  |                                                                              |==================                                                    |  25%  |                                                                              |==================                                                    |  26%  |                                                                              |===================                                                   |  26%  |                                                                              |===================                                                   |  27%  |                                                                              |===================                                                   |  28%  |                                                                              |====================                                                  |  28%  |                                                                              |====================                                                  |  29%  |                                                                              |=====================                                                 |  29%  |                                                                              |=====================                                                 |  30%  |                                                                              |=====================                                                 |  31%  |                                                                              |======================                                                |  31%  |                                                                              |======================                                                |  32%  |                                                                              |=======================                                               |  32%  |                                                                              |=======================                                               |  33%  |                                                                              |=======================                                               |  34%  |                                                                              |========================                                              |  34%  |                                                                              |========================                                              |  35%  |                                                                              |=========================                                             |  35%  |                                                                              |=========================                                             |  36%  |                                                                              |==========================                                            |  36%  |                                                                              |==========================                                            |  37%  |                                                                              |==========================                                            |  38%  |                                                                              |===========================                                           |  38%  |                                                                              |===========================                                           |  39%  |                                                                              |============================                                          |  39%  |                                                                              |============================                                          |  40%  |                                                                              |============================                                          |  41%  |                                                                              |=============================                                         |  41%  |                                                                              |=============================                                         |  42%  |                                                                              |==============================                                        |  42%  |                                                                              |==============================                                        |  43%  |                                                                              |==============================                                        |  44%  |                                                                              |===============================                                       |  44%  |                                                                              |===============================                                       |  45%  |                                                                              |================================                                      |  45%  |                                                                              |================================                                      |  46%  |                                                                              |=================================                                     |  46%  |                                                                              |=================================                                     |  47%  |                                                                              |=================================                                     |  48%  |                                                                              |==================================                                    |  48%  |                                                                              |==================================                                    |  49%  |                                                                              |===================================                                   |  49%  |                                                                              |===================================                                   |  50%  |                                                                              |===================================                                   |  51%  |                                                                              |====================================                                  |  51%  |                                                                              |====================================                                  |  52%  |                                                                              |=====================================                                 |  52%  |                                                                              |=====================================                                 |  53%  |                                                                              |=====================================                                 |  54%  |                                                                              |======================================                                |  54%  |                                                                              |======================================                                |  55%  |                                                                              |=======================================                               |  55%  |                                                                              |=======================================                               |  56%  |                                                                              |========================================                              |  56%  |                                                                              |========================================                              |  57%  |                                                                              |========================================                              |  58%  |                                                                              |=========================================                             |  58%  |                                                                              |=========================================                             |  59%  |                                                                              |==========================================                            |  59%  |                                                                              |==========================================                            |  60%  |                                                                              |==========================================                            |  61%  |                                                                              |===========================================                           |  61%  |                                                                              |===========================================                           |  62%  |                                                                              |============================================                          |  62%  |                                                                              |============================================                          |  63%  |                                                                              |============================================                          |  64%  |                                                                              |=============================================                         |  64%  |                                                                              |=============================================                         |  65%  |                                                                              |==============================================                        |  65%  |                                                                              |==============================================                        |  66%  |                                                                              |===============================================                       |  66%  |                                                                              |===============================================                       |  67%  |                                                                              |===============================================                       |  68%  |                                                                              |================================================                      |  68%  |                                                                              |================================================                      |  69%  |                                                                              |=================================================                     |  69%  |                                                                              |=================================================                     |  70%  |                                                                              |=================================================                     |  71%  |                                                                              |==================================================                    |  71%  |                                                                              |==================================================                    |  72%  |                                                                              |===================================================                   |  72%  |                                                                              |===================================================                   |  73%  |                                                                              |===================================================                   |  74%  |                                                                              |====================================================                  |  74%  |                                                                              |====================================================                  |  75%  |                                                                              |=====================================================                 |  75%  |                                                                              |=====================================================                 |  76%  |                                                                              |======================================================                |  76%  |                                                                              |======================================================                |  77%  |                                                                              |======================================================                |  78%  |                                                                              |=======================================================               |  78%  |                                                                              |=======================================================               |  79%  |                                                                              |========================================================              |  79%  |                                                                              |========================================================              |  80%  |                                                                              |========================================================              |  81%  |                                                                              |=========================================================             |  81%  |                                                                              |=========================================================             |  82%  |                                                                              |==========================================================            |  82%  |                                                                              |==========================================================            |  83%  |                                                                              |==========================================================            |  84%  |                                                                              |===========================================================           |  84%  |                                                                              |===========================================================           |  85%  |                                                                              |============================================================          |  85%  |                                                                              |============================================================          |  86%  |                                                                              |=============================================================         |  86%  |                                                                              |=============================================================         |  87%  |                                                                              |=============================================================         |  88%  |                                                                              |==============================================================        |  88%  |                                                                              |==============================================================        |  89%  |                                                                              |===============================================================       |  89%  |                                                                              |===============================================================       |  90%  |                                                                              |===============================================================       |  91%  |                                                                              |================================================================      |  91%  |                                                                              |================================================================      |  92%  |                                                                              |=================================================================     |  92%  |                                                                              |=================================================================     |  93%  |                                                                              |=================================================================     |  94%  |                                                                              |==================================================================    |  94%  |                                                                              |==================================================================    |  95%  |                                                                              |===================================================================   |  95%  |                                                                              |===================================================================   |  96%  |                                                                              |====================================================================  |  96%  |                                                                              |====================================================================  |  97%  |                                                                              |====================================================================  |  98%  |                                                                              |===================================================================== |  98%  |                                                                              |===================================================================== |  99%  |                                                                              |======================================================================|  99%  |                                                                              |======================================================================| 100%
+#>      BMD_MA    BMDL_MA
+#>  0.03492014 0.02809378
+print(bmd_ma)
+#> $Results
+#>      BMD_MA    BMDL_MA
+#>  0.03492014 0.02809378
+#> 
+#> $Boot.samples.used
+#> [1] 1000
+#> 
+#> $interval
+#>     BMDL_MA    BMDU_MA
+#>  0.02809378 0.03730574
+#> 
+#> $SE
+#>  SE
+#>  NA
+#> 
+#> $modelWeights
+#> [1] 0.3117292 0.4709065 0.2173643
+#> 
+#> attr(,"class")
+#> [1] "bmd"
+
+
+
+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/articles/bmd_Package_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/bmd_Package_files/figure-html/unnamed-chunk-2-1.png new file mode 100644 index 0000000..cd92224 Binary files /dev/null and b/docs/articles/bmd_Package_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html new file mode 100644 index 0000000..046eb3e --- /dev/null +++ b/docs/articles/index.html @@ -0,0 +1,107 @@ + +Articles • bmd + + +
+
+ + + +
+
+ + + +
+
+ + +
+ +
+

Site built with pkgdown 2.1.0.

+
+ +
+ + + + + + + + diff --git a/docs/articles/model-averaging.html b/docs/articles/model-averaging.html new file mode 100644 index 0000000..97c28ff --- /dev/null +++ b/docs/articles/model-averaging.html @@ -0,0 +1,294 @@ + + + + + + + +model-averaging • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+library(bmd)
+
+

Example for bmdMA function +

+
+
+
+
+
+library(drc)
+
+library(drcData)
+
+
+
+## Fitting 4 different two-parameter models to binomial data
+
+deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial")
+
+deguelin.m2 <- drm(r/n~dose, weights=n, data=deguelin, fct=W1.2(), type="binomial")
+
+deguelin.m3 <- drm(r/n~dose, weights=n, data=deguelin, fct=W2.2(), type="binomial")
+
+deguelin.m4 <- drm(r/n~dose, weights=n, data=deguelin, fct=LN.2(), type="binomial")
+
+
+
+
+
+## Model averaged BMD for 5% additional risk with estimated background risk 
+
+## and BMDL based on Buckland et al.
+
+bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, 
+
+      backgType = "modelBased", def = "additional",
+
+      type = "Buckland")
+
+
+
+## Model averaged BMD for 5% additional risk with estimated background risk
+
+## and BMDL based on an average of the model curves
+
+bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, 
+
+      backgType = "modelBased", def = "additional",
+
+      type = "curve", bootstrapType = "parametric", bootInterval = "percentile", R=50)
+
+
+
+
+
+## Fitting 4 different two-parameter models to binomial data
+
+ryegrass.m1<-drm(rootl~conc, data=ryegrass, fct=LL.4())
+
+ryegrass.m2<-drm(rootl~conc, data=ryegrass, fct=W1.4())
+
+ryegrass.m3<-drm(rootl~conc, data=ryegrass, fct=W2.4())
+
+ryegrass.m4<-drm(rootl~conc, data=ryegrass, fct=LN.4())
+
+
+
+## Model-averaged BMD and bootstrap BMDL for bmr=5% and using the hybrid approach
+
+## to estimate the background risk.  
+
+bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="AIC", bmr=0.05, 
+
+      backgType = "hybridSD", def = "hybridAdd", type = "bootstrap",
+
+      bootstrapType = "nonparametric", bootInterval = "percentile", R = 50)
+
+
+
+
+
+## Model-averaged BMD using the Stacking Weights
+
+bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="Stack", bmr=0.05, 
+
+      backgType = "hybridSD", def = "hybridAdd", type = "bootstrap",
+
+      bootstrapType = "nonparametric", bootInterval = "percentile", R = 50)
+
+
+
+
+
+

bmd MA curve +

+

+
+
+
+library(bmd)
+
+library(drc)
+
+library(drcData)
+
+library(ggplot2)
+
+
+
+# fit models to aconiazide data
+
+aconiazide.LL.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LL.3())
+
+aconiazide.LN.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LN.3())
+
+aconiazide.W1.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W1.3())
+
+aconiazide.W2.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W2.3())
+
+
+
+# plot the MA curve
+
+plot(aconiazide.LL.3, type = "obs")
+
+curve(
+
+  MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3,aconiazide.W1.3, aconiazide.W2.3),
+
+          modelWeights = "AIC"),
+
+  add = TRUE)
+
+
+
+# or plot using ggplot2
+
+qplotDrc(aconiazide.LL.3, type = "obs") +
+
+ geom_function(fun = function(x){ 
+
+                MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3,
+
+                                            aconiazide.W1.3, aconiazide.W2.3), 
+
+                        modelWeights = "AIC")
+
+                )
+
+
+
+
+

get stacking weights +

+
+getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3,
+
+                                  aconiazide.W1.3, aconiazide.W2.3))
+
+getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3,
+
+                                  aconiazide.W1.3, aconiazide.W2.3),
+
+                  nSplits = 7)
+           
+
+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/articles/specialized-models.html b/docs/articles/specialized-models.html new file mode 100644 index 0000000..de817cb --- /dev/null +++ b/docs/articles/specialized-models.html @@ -0,0 +1,439 @@ + + + + + + + +specialized-models • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+library(bmd)
+
+

Oridnal +

+
+
+
+
+
+library(drc)
+#> Warning: package 'drc' was built under R version 4.4.2
+#> Loading required package: MASS
+#> 
+#> 'drc' has been loaded.
+#> Please cite R and 'drc' if used for a publication,
+#> for references type 'citation()' and 'citation('drc')'.
+#> 
+#> Attaching package: 'drc'
+#> The following objects are masked from 'package:stats':
+#> 
+#>     gaussian, getInitial
+
+library(drcData)
+#> 
+#> Attaching package: 'drcData'
+#> The following objects are masked from 'package:drc':
+#> 
+#>     auxins, nasturtium
+
+data(guthion)
+
+guthionS <- subset(guthion, trt == "S")
+
+
+
+guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), weights = "total",
+
+                          dose = "dose", data = guthionS, fct = LL.2())
+
+
+
+plot(guthionS.LL, xlim = c(15,55)) # uses ggplot
+

+
+
+
+bmdOrdinal(guthionS.LL, bmr = 0.1, backgType = "modelBased", def = "excess", R = 50)
+#>                    BMD     BMDL
+#> moribund+dead 20.50104 17.11484
+#> dead          20.59249 16.69573
+
+

MA +

+
+
+
+
+
+library(drc)
+
+library(drcData)
+
+data(guthion)
+
+
+
+guthionS <- subset(guthion, trt == "S")
+
+
+
+guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), 
+
+                          weights = "total", dose = "dose", data = guthionS, fct = LL.2())
+
+guthionS.LN <- drmOrdinal(levels = c("alive", "moribund", "dead"), 
+
+                          weights = "total", dose = "dose", data = guthionS, fct = LN.2())
+
+guthionS.W1 <- drmOrdinal(levels = c("alive", "moribund", "dead"),
+
+                          weights = "total", dose = "dose", data = guthionS, fct = W1.2())
+
+guthionS.W2 <- drmOrdinal(levels = c("alive", "moribund", "dead"),
+
+                          weights = "total", dose = "dose", data = guthionS, fct = W2.2())
+
+
+
+bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), 
+
+             modelWeights = "AIC", bmr = 0.1, 
+
+             backgType = "modelBased", def = "excess", type = "Kang")
+
+bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), 
+
+             modelWeights = "AIC", bmr = 0.1, 
+
+             backgType = "modelBased", def = "excess", type = "bootstrap", R = 50)
+
+
+
+

Heterogenous Variance Models +

+
+
+
+
+
+library(drc)
+
+library(drcData)
+
+library(bmd)
+
+# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT.
+
+
+
+# ryegrass data
+
+set.seed(123)
+
+ryegrass.LL.4.hetVar <- drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2),
+
+                                  data = ryegrass, fct = LL.4())
+
+plot(ryegrass.LL.4.hetVar)
+
+bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1,
+
+          def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE)
+
+bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, 
+
+          def = "hybridExc", R = 50, level = 0.95, 
+
+          bootType = "parametric", progressInfo = TRUE, display = TRUE) # parametric bootstrap
+
+
+
+# barley data
+
+set.seed(123)
+
+barley.LL.4.hetVar <- drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), data = barley, fct = LL.4())
+
+plot(barley.LL.4.hetVar)
+
+
+
+# GiantKelp data
+
+set.seed(123)
+
+GiantKelp.LL.4.hetVarSq <- drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), 
+
+                                     data = GiantKelp, fct = LL.4())
+
+plot(GiantKelp.LL.4.hetVarSq)
+
+
+
+GiantKelp.LL.4.hetVarLogSq <- drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), 
+
+                                        data = GiantKelp, fct = LL.4())
+
+plot(GiantKelp.LL.4.hetVarLogSq)
+
+
+
+
+
+
+
+
+
+
+library(drc)
+
+library(drcData)
+
+library(bmd)
+
+# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT.
+
+
+
+# ryegrass data
+
+set.seed(123)
+
+ryegrass.hetVar.list <- list(
+
+  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LL.4()),
+
+  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LN.4()),
+
+  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W1.4()),
+
+  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W2.4()))
+
+bmdHetVarMA(ryegrass.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridPercentile",
+
+            backg = 0.1, def = "hybridExc", R = 100, level = 0.95)
+#> Performing bootstrap
+#>   |                                                                              |                                                                      |   0%  |                                                                              |=                                                                     |   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%  |                                                                              |================================================                      |  69%  |                                                                              |=================================================                     |  70%  |                                                                              |==================================================                    |  71%  |                                                                              |==================================================                    |  72%  |                                                                              |===================================================                   |  73%  |                                                                              |====================================================                  |  74%  |                                                                              |====================================================                  |  75%  |                                                                              |=====================================================                 |  76%  |                                                                              |======================================================                |  77%  |                                                                              |=======================================================               |  78%  |                                                                              |=======================================================               |  79%  |                                                                              |========================================================              |  80%  |                                                                              |=========================================================             |  81%  |                                                                              |=========================================================             |  82%  |                                                                              |==========================================================            |  83%  |                                                                              |===========================================================           |  84%  |                                                                              |============================================================          |  85%  |                                                                              |============================================================          |  86%  |                                                                              |=============================================================         |  87%  |                                                                              |==============================================================        |  88%  |                                                                              |==============================================================        |  89%  |                                                                              |===============================================================       |  90%  |                                                                              |================================================================      |  91%  |                                                                              |================================================================      |  92%  |                                                                              |=================================================================     |  93%  |                                                                              |==================================================================    |  94%  |                                                                              |==================================================================    |  95%  |                                                                              |===================================================================   |  96%  |                                                                              |====================================================================  |  97%  |                                                                              |===================================================================== |  98%  |                                                                              |===================================================================== |  99%  |                                                                              |======================================================================| 100%
+#>        BMD_MA   BMDL_MA
+#> [1,] 1.093996 0.7095869
+
+bmdHetVarMA(ryegrass.hetVar.list, modelWeights = c(0.4, 0.2, 0.1, 0.3), bmr = 0.1, 
+
+            backgType = "hybridPercentile", backg = 0.1, 
+
+            def = "hybridExc", R = 50, level = 0.95) # user-defined weights
+#> Performing bootstrap
+#>   |                                                                              |                                                                      |   0%  |                                                                              |=                                                                     |   2%  |                                                                              |===                                                                   |   4%  |                                                                              |====                                                                  |   6%  |                                                                              |======                                                                |   8%  |                                                                              |=======                                                               |  10%  |                                                                              |========                                                              |  12%  |                                                                              |==========                                                            |  14%  |                                                                              |===========                                                           |  16%  |                                                                              |=============                                                         |  18%  |                                                                              |==============                                                        |  20%  |                                                                              |===============                                                       |  22%  |                                                                              |=================                                                     |  24%  |                                                                              |==================                                                    |  26%  |                                                                              |====================                                                  |  28%  |                                                                              |=====================                                                 |  30%  |                                                                              |======================                                                |  32%  |                                                                              |========================                                              |  34%  |                                                                              |=========================                                             |  36%  |                                                                              |===========================                                           |  38%  |                                                                              |============================                                          |  40%  |                                                                              |=============================                                         |  42%  |                                                                              |===============================                                       |  44%  |                                                                              |================================                                      |  46%  |                                                                              |==================================                                    |  48%  |                                                                              |===================================                                   |  50%  |                                                                              |====================================                                  |  52%  |                                                                              |======================================                                |  54%  |                                                                              |=======================================                               |  56%  |                                                                              |=========================================                             |  58%  |                                                                              |==========================================                            |  60%  |                                                                              |===========================================                           |  62%  |                                                                              |=============================================                         |  64%  |                                                                              |==============================================                        |  66%  |                                                                              |================================================                      |  68%  |                                                                              |=================================================                     |  70%  |                                                                              |==================================================                    |  72%  |                                                                              |====================================================                  |  74%  |                                                                              |=====================================================                 |  76%  |                                                                              |=======================================================               |  78%  |                                                                              |========================================================              |  80%  |                                                                              |=========================================================             |  82%  |                                                                              |===========================================================           |  84%  |                                                                              |============================================================          |  86%  |                                                                              |==============================================================        |  88%  |                                                                              |===============================================================       |  90%  |                                                                              |================================================================      |  92%  |                                                                              |==================================================================    |  94%  |                                                                              |===================================================================   |  96%  |                                                                              |===================================================================== |  98%  |                                                                              |======================================================================| 100%
+#>        BMD_MA   BMDL_MA
+#> [1,] 0.964126 0.7893021
+
+
+
+# barley data
+
+set.seed(123)
+
+barley.hetVar.list <- list(drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), 
+
+                                     data = barley, fct = LL.4()),
+
+                           drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), 
+
+                                     data = barley, fct = W2.4()))
+
+bmdHetVarMA(barley.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD", backg = 2,
+
+            def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE)
+#> Performing bootstrap
+#>   |                                                                              |                                                                      |   0%  |                                                                              |=                                                                     |   2%  |                                                                              |===                                                                   |   4%  |                                                                              |====                                                                  |   6%  |                                                                              |======                                                                |   8%  |                                                                              |=======                                                               |  10%  |                                                                              |========                                                              |  12%  |                                                                              |==========                                                            |  14%  |                                                                              |===========                                                           |  16%  |                                                                              |=============                                                         |  18%  |                                                                              |==============                                                        |  20%  |                                                                              |===============                                                       |  22%  |                                                                              |=================                                                     |  24%  |                                                                              |==================                                                    |  26%  |                                                                              |====================                                                  |  28%  |                                                                              |=====================                                                 |  30%  |                                                                              |======================                                                |  32%  |                                                                              |========================                                              |  34%  |                                                                              |=========================                                             |  36%  |                                                                              |===========================                                           |  38%  |                                                                              |============================                                          |  40%  |                                                                              |=============================                                         |  42%  |                                                                              |===============================                                       |  44%  |                                                                              |================================                                      |  46%  |                                                                              |==================================                                    |  48%  |                                                                              |===================================                                   |  50%  |                                                                              |====================================                                  |  52%  |                                                                              |======================================                                |  54%  |                                                                              |=======================================                               |  56%  |                                                                              |=========================================                             |  58%  |                                                                              |==========================================                            |  60%  |                                                                              |===========================================                           |  62%  |                                                                              |=============================================                         |  64%  |                                                                              |==============================================                        |  66%  |                                                                              |================================================                      |  68%  |                                                                              |=================================================                     |  70%  |                                                                              |==================================================                    |  72%  |                                                                              |====================================================                  |  74%  |                                                                              |=====================================================                 |  76%  |                                                                              |=======================================================               |  78%  |                                                                              |========================================================              |  80%  |                                                                              |=========================================================             |  82%  |                                                                              |===========================================================           |  84%  |                                                                              |============================================================          |  86%  |                                                                              |==============================================================        |  88%  |                                                                              |===============================================================       |  90%  |                                                                              |================================================================      |  92%  |                                                                              |==================================================================    |  94%  |                                                                              |===================================================================   |  96%  |                                                                              |===================================================================== |  98%  |                                                                              |======================================================================| 100%
+#>        BMD_MA  BMDL_MA
+#> [1,] 218.9167 151.2401
+
+
+
+# GiantKelp data
+
+set.seed(123)
+
+GiantKelp.hetVar.list <- list(
+
+  drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), data = GiantKelp, fct = LL.4()),
+
+  drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), data = GiantKelp, fct = LL.4()))
+
+bmdHetVarMA(GiantKelp.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD",
+
+            backg = 1, def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, 
+
+            display = TRUE)
+#> Performing bootstrap
+#>   |                                                                              |                                                                      |   0%  |                                                                              |=                                                                     |   2%  |                                                                              |===                                                                   |   4%  |                                                                              |====                                                                  |   6%  |                                                                              |======                                                                |   8%  |                                                                              |=======                                                               |  10%  |                                                                              |========                                                              |  12%  |                                                                              |==========                                                            |  14%  |                                                                              |===========                                                           |  16%  |                                                                              |=============                                                         |  18%  |                                                                              |==============                                                        |  20%  |                                                                              |===============                                                       |  22%  |                                                                              |=================                                                     |  24%  |                                                                              |==================                                                    |  26%  |                                                                              |====================                                                  |  28%  |                                                                              |=====================                                                 |  30%  |                                                                              |======================                                                |  32%  |                                                                              |========================                                              |  34%  |                                                                              |=========================                                             |  36%  |                                                                              |===========================                                           |  38%  |                                                                              |============================                                          |  40%  |                                                                              |=============================                                         |  42%  |                                                                              |===============================                                       |  44%  |                                                                              |================================                                      |  46%  |                                                                              |==================================                                    |  48%  |                                                                              |===================================                                   |  50%  |                                                                              |====================================                                  |  52%  |                                                                              |======================================                                |  54%  |                                                                              |=======================================                               |  56%  |                                                                              |=========================================                             |  58%  |                                                                              |==========================================                            |  60%  |                                                                              |===========================================                           |  62%  |                                                                              |=============================================                         |  64%  |                                                                              |==============================================                        |  66%  |                                                                              |================================================                      |  68%  |                                                                              |=================================================                     |  70%  |                                                                              |==================================================                    |  72%  |                                                                              |====================================================                  |  74%  |                                                                              |=====================================================                 |  76%  |                                                                              |=======================================================               |  78%  |                                                                              |========================================================              |  80%  |                                                                              |=========================================================             |  82%  |                                                                              |===========================================================           |  84%  |                                                                              |============================================================          |  86%  |                                                                              |==============================================================        |  88%  |                                                                              |===============================================================       |  90%  |                                                                              |================================================================      |  92%  |                                                                              |==================================================================    |  94%  |                                                                              |===================================================================   |  96%  |                                                                              |===================================================================== |  98%  |                                                                              |======================================================================| 100%
+#>        BMD_MA   BMDL_MA
+#> [1,] 4.073336 0.6266271
+
+
+

Mixed Models +

+
+
+
+
+
+
+library(drc)
+
+library(drcData)
+
+library(metafor)
+#> Warning: package 'metafor' was built under R version 4.4.2
+#> Loading required package: Matrix
+#> Loading required package: metadat
+#> Warning: package 'metadat' was built under R version 4.4.2
+#> Loading required package: numDeriv
+#> 
+#> Loading the 'metafor' package (version 4.6-0). For an
+#> introduction to the package please type: help(metafor)
+
+library(bmd)
+
+
+
+set.seed(1)
+
+data0 <- data.frame(x = rep(drcData::ryegrass$conc, 2),
+
+                    y = rep(drcData::ryegrass$rootl, 2) +
+
+                      c(rnorm(n = nrow(drcData::ryegrass), mean = 2, sd = 0.5),
+
+                        rnorm(n = nrow(drcData::ryegrass), mean = 2.7, sd = 0.7)),
+
+                    EXP_ID = rep(as.character(1:2), each = nrow(drcData::ryegrass)))
+
+
+
+modMMRE <- drmMMRE(y~x, exp_id = EXP_ID, data = data0, fct = LL.4())
+
+bmd(modMMRE, bmr = 0.1, backgType = "modelBased", def = "relative")
+#>       BMD     BMDL
+#>  1.669136 1.316628
+
+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/articles/specialized-models_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/specialized-models_files/figure-html/unnamed-chunk-2-1.png new file mode 100644 index 0000000..b0aa377 Binary files /dev/null and b/docs/articles/specialized-models_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/statistical-tests.html b/docs/articles/statistical-tests.html new file mode 100644 index 0000000..80c6b96 --- /dev/null +++ b/docs/articles/statistical-tests.html @@ -0,0 +1,273 @@ + + + + + + + +statistical-tests • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+library(bmd)
+
+

Statistical Tests Examples +

+

This vignette demonstrates the usage of functions related to +statistical tests.

+
+

Monotonicity Test +

+
+
+
+
+
+# Example with custom data
+
+x <- c(1, 2, 3, 4, 5)
+
+y <- c(2, 4, 6, 8, 10)
+
+result <- monotonicityTest(x, y, test = "jonckheere")
+
+print(result)
+#> $p.value
+#> [1] 0.007152939
+#> 
+#> $acceptMonotonicity
+#> [1] TRUE
+
+
+
+data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6))
+
+result <- monotonicityTest("conc", "rootl", data = drcData::ryegrass, test = "bartholomew")
+#> Loading required namespace: isotone
+
+print(result)
+#> $p.value
+#> [1] 0
+#> 
+#> $acceptMonotonicity
+#> [1] TRUE
+
+
+

Trend Test +

+
+
+# Example with custom data
+
+x <- c(1, 2, 3, 4, 5)
+
+y <- c(2, 4, 6, 8, 10)
+
+result <- trendTest(x, y, test = "tukey")
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(x): essentially perfect fit: summary may be unreliable
+#> Warning in summary.lm(x): essentially perfect fit: summary may be unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(object, ...): essentially perfect fit: summary may be
+#> unreliable
+#> Warning in summary.lm(model): essentially perfect fit: summary may be
+#> unreliable
+
+print(result)
+#> $p.values
+#>       xari: xari       xord: xord xarilog: xarilog 
+#>     0.000000e+00     0.000000e+00     2.093881e-13 
+#> 
+#> $decisions
+#>       xari: xari       xord: xord xarilog: xarilog 
+#>         "accept"         "accept"         "accept" 
+#> 
+#> $acceptTrend
+#> [1] TRUE
+
+
+
+# Example with a data frame
+
+data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6))
+
+result <- trendTest("x", "y", data = data, test = "shirley")
+
+print(result)
+#> $p.values
+#> NULL
+#> 
+#> $decisions
+#>     ctr     
+#> mu1 "reject"
+#> mu2 "reject"
+#> mu3 "reject"
+#> mu4 "accept"
+#> 
+#> $acceptTrend
+#> [1] TRUE
+
+
+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/articles/utilities.html b/docs/articles/utilities.html new file mode 100644 index 0000000..e573c30 --- /dev/null +++ b/docs/articles/utilities.html @@ -0,0 +1,131 @@ + + + + + + + +utilities • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+library(bmd)
+

Utility functions included in the package bmd are: +“PAV”, “expandBinomial”, “bootDataGen”, “BCa”

+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/articles/visualization.html b/docs/articles/visualization.html new file mode 100644 index 0000000..37d6df0 --- /dev/null +++ b/docs/articles/visualization.html @@ -0,0 +1,6521 @@ + + + + + + + +visualization • bmd + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +
+library(bmd)
+

Visualization functions included in the bmd package are: +“qplotDrc”, “qplotBmd”, “plot.bmd”.

+
+library(drc)
+#> Warning: package 'drc' was built under R version 4.4.2
+#> Loading required package: MASS
+#> 
+#> 'drc' has been loaded.
+#> Please cite R and 'drc' if used for a publication,
+#> for references type 'citation()' and 'citation('drc')'.
+#> 
+#> Attaching package: 'drc'
+#> The following objects are masked from 'package:stats':
+#> 
+#>     gaussian, getInitial
+
+library(drcData)
+#> 
+#> Attaching package: 'drcData'
+#> The following objects are masked from 'package:drc':
+#> 
+#>     auxins, nasturtium
+
+
+
+## Fitting model and calculating BMD. 
+
+model <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
+
+bmd0 <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative")
+#>       BMD     BMDL
+#>  1.499026 1.169727
+
+
+
+## Plotting
+
+plot(bmd0)
+

+
+
+
+
+# Plot both limits of confidence interval
+
+plot(bmd0, interval = "twosided")
+

+
+
+
+
+# Pass argument to plot.bmd to plot confidence band around curve
+
+plot(bmd0, type = "confidence")
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+

+
+# Plot
+
+qplotBmd(bmd0, interval = "twosided", add = FALSE)
+

+
+
+
+
+qplotDrc(model,type="confidence") +
+
+  qplotBmd(bmd0, interval = "twosided", add = TRUE)
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+

+
+
+
+
+qplotBmd(bmd0, interval = "twosided", add = FALSE)
+

+
+

qplotDrc +

+
+
+library(drc)
+
+library(drcData)
+
+library(ggplot2)
+
+
+
+## Fitting models to be plotted below
+
+ryegrass.m1 <- drm(rootl~conc, data = ryegrass, fct = LL.4())
+
+ryegrass.m2 <- drm(rootl~conc, data = ryegrass, fct = LL.3())  # lower limit fixed at 0
+
+
+
+## Plotting observations and fitted curve for the first model
+
+p <- qplotDrc(ryegrass.m1) 
+
+p
+

+
+
+
+
+## Add confidence region for the first model.
+
+p + qplotDrc(ryegrass.m1, type="confidence", add = TRUE)$confBandLayer 
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+

+
+
+
+
+## Plot both models
+
+p + qplotDrc(ryegrass.m2, add = TRUE)$curveLayer
+

+
+
+
+
+## Fitting model to be plotted below
+
+spinach.m1 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4())
+
+
+
+## Plot with no colours
+
+qplotDrc(spinach.m1)
+

+
+
+
+
+## Plot with default colours
+
+qplotDrc(spinach.m1, col = TRUE)
+

+
+
+
+
+## Plot with specified colours
+
+qplotDrc(spinach.m1, col = TRUE) + 
+
+  scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod",
+
+                                "darkslategray4", "plum4"))
+

+
+
+
+
+## Plot of curves 1 and 2 only
+
+qplotDrc(spinach.m1, level = c(1,4))
+

+
+
+
+
+## Plot with confidence regions
+
+qplotDrc(spinach.m1, col = TRUE, type = "confidence")
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+

+
+
+
+
+## Plot points and add confidence regions. Confidence regions are coloured by the "fill" aesthetic.
+
+## Customising the x scale by adding a new scale.
+
+qplotDrc(spinach.m1, col = TRUE, type = "confidence") +
+
+  qplotDrc(spinach.m1, col = TRUE, type = "average", add = TRUE)$obsLayer + 
+
+  scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod",
+
+                                "darkslategray4", "plum4"))+ 
+
+  scale_fill_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod",
+
+                               "darkslategray4", "plum4")) +
+
+  scale_x_continuous(trans = scales:::pseudo_log_trans(sigma = 0.2, base = exp(1)))
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Warning in (tquan * sqrt(varVal + sumObjRV)) * c(-1, 1): Recycling array of length 1 in array-vector arithmetic is deprecated.
+#>   Use c() or as.vector() instead.
+#> Scale for x is already present.
+#> Adding another scale for x, which will replace the existing scale.
+

+
+
+ + + +
+ + + +
+ +
+

+

Site built with pkgdown 2.1.0.

+
+ +
+
+ + + + + + + + diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-2-1.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-2-1.png new file mode 100644 index 0000000..bb02c80 Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-2-2.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-2-2.png new file mode 100644 index 0000000..f389ceb Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-2-2.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-2-3.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-2-3.png new file mode 100644 index 0000000..04b1457 Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-2-3.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-3-1.png new file mode 100644 index 0000000..c64e30e Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-3-2.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-3-2.png new file mode 100644 index 0000000..a09bca2 Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-3-2.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-3-3.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-3-3.png new file mode 100644 index 0000000..c64e30e Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-3-3.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-1.png new file mode 100644 index 0000000..1d80feb Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-2.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-2.png new file mode 100644 index 0000000..f9900ab Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-2.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-3.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-3.png new file mode 100644 index 0000000..31093be Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-3.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-4.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-4.png new file mode 100644 index 0000000..344f530 Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-4.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-5.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-5.png new file mode 100644 index 0000000..8454688 Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-5.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-6.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-6.png new file mode 100644 index 0000000..5cb910d Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-6.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-7.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-7.png new file mode 100644 index 0000000..137681f Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-7.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-8.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-8.png new file mode 100644 index 0000000..374194e Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-8.png differ diff --git a/docs/articles/visualization_files/figure-html/unnamed-chunk-4-9.png b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-9.png new file mode 100644 index 0000000..a809d6f Binary files /dev/null and b/docs/articles/visualization_files/figure-html/unnamed-chunk-4-9.png differ diff --git a/docs/authors.html b/docs/authors.html new file mode 100644 index 0000000..d87c041 --- /dev/null +++ b/docs/authors.html @@ -0,0 +1,116 @@ + +Authors and Citation • bmd + + +
+
+ + + +
+
+
+ + + +
  • +

    Signe M. Jensen. Maintainer. +

    +
  • +
+
+
+

Citation

+ +
+
+ + +

Jensen, S. M., Kluxen, F. M., Streibig, J. C., Cedergreen, N., & Ritz, C. (2020) bmd: an R package for benchmark dose estimation PeerJ, 8, e10557

+
@Article{,
+  title = {bmd: an R package for benchmark dose estimation},
+  author = {S. M. Jensen and F. M. Kluxen and J. C. Streibig and N. Cedergreen and C. Ritz},
+  journal = {PeerJ},
+  volume = {8},
+  pages = {e10557},
+  year = {2020},
+  publisher = {PeerJ Inc.},
+}
+ +
+ +
+ + + +
+ +
+

Site built with pkgdown 2.1.0.

+
+ +
+ + + + + + + + diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css new file mode 100644 index 0000000..5a85941 --- /dev/null +++ b/docs/bootstrap-toc.css @@ -0,0 +1,60 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ + +/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ + +/* All levels of nav */ +nav[data-toggle='toc'] .nav > li > a { + display: block; + padding: 4px 20px; + font-size: 13px; + font-weight: 500; + color: #767676; +} +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 19px; + color: #563d7c; + text-decoration: none; + background-color: transparent; + border-left: 1px solid #563d7c; +} +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 18px; + font-weight: bold; + color: #563d7c; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +/* Nav: second level (shown on .active) */ +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} +nav[data-toggle='toc'] .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 30px; + font-size: 12px; + font-weight: normal; +} +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 29px; +} +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 28px; + font-weight: 500; +} + +/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ +nav[data-toggle='toc'] .nav > .active > ul { + display: block; +} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js new file mode 100644 index 0000000..1cdd573 --- /dev/null +++ b/docs/bootstrap-toc.js @@ -0,0 +1,159 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ +(function() { + 'use strict'; + + window.Toc = { + helpers: { + // return all matching elements in the set, or their descendants + findOrFilter: function($el, selector) { + // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ + // http://stackoverflow.com/a/12731439/358804 + var $descendants = $el.find(selector); + return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); + }, + + generateUniqueIdBase: function(el) { + var text = $(el).text(); + var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); + return anchor || el.tagName.toLowerCase(); + }, + + generateUniqueId: function(el) { + var anchorBase = this.generateUniqueIdBase(el); + for (var i = 0; ; i++) { + var anchor = anchorBase; + if (i > 0) { + // add suffix + anchor += '-' + i; + } + // check if ID already exists + if (!document.getElementById(anchor)) { + return anchor; + } + } + }, + + generateAnchor: function(el) { + if (el.id) { + return el.id; + } else { + var anchor = this.generateUniqueId(el); + el.id = anchor; + return anchor; + } + }, + + createNavList: function() { + return $(''); + }, + + createChildNavList: function($parent) { + var $childList = this.createNavList(); + $parent.append($childList); + return $childList; + }, + + generateNavEl: function(anchor, text) { + var $a = $(''); + $a.attr('href', '#' + anchor); + $a.text(text); + var $li = $('
  • '); + $li.append($a); + return $li; + }, + + generateNavItem: function(headingEl) { + var anchor = this.generateAnchor(headingEl); + var $heading = $(headingEl); + var text = $heading.data('toc-text') || $heading.text(); + return this.generateNavEl(anchor, text); + }, + + // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). + getTopLevel: function($scope) { + for (var i = 1; i <= 6; i++) { + var $headings = this.findOrFilter($scope, 'h' + i); + if ($headings.length > 1) { + return i; + } + } + + return 1; + }, + + // returns the elements for the top level, and the next below it + getHeadings: function($scope, topLevel) { + var topSelector = 'h' + topLevel; + + var secondaryLevel = topLevel + 1; + var secondarySelector = 'h' + secondaryLevel; + + return this.findOrFilter($scope, topSelector + ',' + secondarySelector); + }, + + getNavLevel: function(el) { + return parseInt(el.tagName.charAt(1), 10); + }, + + populateNav: function($topContext, topLevel, $headings) { + var $context = $topContext; + var $prevNav; + + var helpers = this; + $headings.each(function(i, el) { + var $newNav = helpers.generateNavItem(el); + var navLevel = helpers.getNavLevel(el); + + // determine the proper $context + if (navLevel === topLevel) { + // use top level + $context = $topContext; + } else if ($prevNav && $context === $topContext) { + // create a new level of the tree and switch to it + $context = helpers.createChildNavList($prevNav); + } // else use the current $context + + $context.append($newNav); + + $prevNav = $newNav; + }); + }, + + parseOps: function(arg) { + var opts; + if (arg.jquery) { + opts = { + $nav: arg + }; + } else { + opts = arg; + } + opts.$scope = opts.$scope || $(document.body); + return opts; + } + }, + + // accepts a jQuery object, or an options object + init: function(opts) { + opts = this.helpers.parseOps(opts); + + // ensure that the data attribute is in place for styling + opts.$nav.attr('data-toggle', 'toc'); + + var $topContext = this.helpers.createChildNavList(opts.$nav); + var topLevel = this.helpers.getTopLevel(opts.$scope); + var $headings = this.helpers.getHeadings(opts.$scope, topLevel); + this.helpers.populateNav($topContext, topLevel, $headings); + } + }; + + $(function() { + $('nav[data-toggle="toc"]').each(function(i, el) { + var $nav = $(el); + Toc.init($nav); + }); + }); +})(); diff --git a/docs/docsearch.css b/docs/docsearch.css new file mode 100644 index 0000000..e5f1fe1 --- /dev/null +++ b/docs/docsearch.css @@ -0,0 +1,148 @@ +/* Docsearch -------------------------------------------------------------- */ +/* + Source: https://github.com/algolia/docsearch/ + License: MIT +*/ + +.algolia-autocomplete { + display: block; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1 +} + +.algolia-autocomplete .ds-dropdown-menu { + width: 100%; + min-width: none; + max-width: none; + padding: .75rem 0; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, .1); + box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); +} + +@media (min-width:768px) { + .algolia-autocomplete .ds-dropdown-menu { + width: 175% + } +} + +.algolia-autocomplete .ds-dropdown-menu::before { + display: none +} + +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { + padding: 0; + background-color: rgb(255,255,255); + border: 0; + max-height: 80vh; +} + +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { + margin-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion { + padding: 0; + overflow: visible +} + +.algolia-autocomplete .algolia-docsearch-suggestion--category-header { + padding: .125rem 1rem; + margin-top: 0; + font-size: 1.3em; + font-weight: 500; + color: #00008B; + border-bottom: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { + float: none; + padding-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { + float: none; + width: auto; + padding: 0; + text-align: left +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content { + float: none; + width: auto; + padding: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content::before { + display: none +} + +.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { + padding-top: .75rem; + margin-top: .75rem; + border-top: 1px solid rgba(0, 0, 0, .1) +} + +.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { + display: block; + padding: .1rem 1rem; + margin-bottom: 0.1; + font-size: 1.0em; + font-weight: 400 + /* display: none */ +} + +.algolia-autocomplete .algolia-docsearch-suggestion--title { + display: block; + padding: .25rem 1rem; + margin-bottom: 0; + font-size: 0.9em; + font-weight: 400 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--text { + padding: 0 1rem .5rem; + margin-top: -.25rem; + font-size: 0.8em; + font-weight: 400; + line-height: 1.25 +} + +.algolia-autocomplete .algolia-docsearch-footer { + width: 110px; + height: 20px; + z-index: 3; + margin-top: 10.66667px; + float: right; + font-size: 0; + line-height: 0; +} + +.algolia-autocomplete .algolia-docsearch-footer--logo { + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 50%; + background-size: 100%; + overflow: hidden; + text-indent: -9000px; + width: 100%; + height: 100%; + display: block; + transform: translate(-8px); +} + +.algolia-autocomplete .algolia-docsearch-suggestion--highlight { + color: #FF8C00; + background: rgba(232, 189, 54, 0.1) +} + + +.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { + box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) +} + +.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { + background-color: rgba(192, 192, 192, .15) +} diff --git a/docs/docsearch.js b/docs/docsearch.js new file mode 100644 index 0000000..b35504c --- /dev/null +++ b/docs/docsearch.js @@ -0,0 +1,85 @@ +$(function() { + + // register a handler to move the focus to the search bar + // upon pressing shift + "/" (i.e. "?") + $(document).on('keydown', function(e) { + if (e.shiftKey && e.keyCode == 191) { + e.preventDefault(); + $("#search-input").focus(); + } + }); + + $(document).ready(function() { + // do keyword highlighting + /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ + var mark = function() { + + var referrer = document.URL ; + var paramKey = "q" ; + + if (referrer.indexOf("?") !== -1) { + var qs = referrer.substr(referrer.indexOf('?') + 1); + var qs_noanchor = qs.split('#')[0]; + var qsa = qs_noanchor.split('&'); + var keyword = ""; + + for (var i = 0; i < qsa.length; i++) { + var currentParam = qsa[i].split('='); + + if (currentParam.length !== 2) { + continue; + } + + if (currentParam[0] == paramKey) { + keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); + } + } + + if (keyword !== "") { + $(".contents").unmark({ + done: function() { + $(".contents").mark(keyword); + } + }); + } + } + }; + + mark(); + }); +}); + +/* Search term highlighting ------------------------------*/ + +function matchedWords(hit) { + var words = []; + + var hierarchy = hit._highlightResult.hierarchy; + // loop to fetch from lvl0, lvl1, etc. + for (var idx in hierarchy) { + words = words.concat(hierarchy[idx].matchedWords); + } + + var content = hit._highlightResult.content; + if (content) { + words = words.concat(content.matchedWords); + } + + // return unique words + var words_uniq = [...new Set(words)]; + return words_uniq; +} + +function updateHitURL(hit) { + + var words = matchedWords(hit); + var url = ""; + + if (hit.anchor) { + url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; + } else { + url = hit.url + '?q=' + escape(words.join(" ")); + } + + return url; +} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..8432f66 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,330 @@ + + + + + + + +Benchmark dose estimation for dose-response data • bmd + + + + + + + + + + + + +
    +
    + + + + +
    +
    +
    + +

    This is an R package for benchmark dose (BMD) estimation, which expands upon the functionality of the drc package.

    +

    This package is currently maintained by Jens Riis Baalkilde and Signe Marie Jensen, Department of Plant and Environmental Sciences, University of Copenhagen.

    +
    +

    Installation +

    +

    Install the bmd package from GitHub. The bmd package works best with the drc package installed from GitHub as well.

    +
    +install.packages("devtools")
    +devtools::install_github("DoseResponse/drcData")
    +devtools::install_github("DoseResponse/drc")
    +devtools::install_github("DoseResponse/bmd")
    +
    +
    +

    Key features +

    +

    The bmd package is a natural extension of the drc package. Key features of the bmd package includes:

    +
      +
    • Benchmark dose (BMD) estimation for quantal, continuous, count and ordinal data for a wide range of definitions of BMD. +
        +
      • A range of confidence intervals for BMD estimates, including Wald, Profile and Bootstrap intervals.
      • +
      • BMD estimation based on model averaging.
      • +
      • BMD estimation for multiple dose-response curves.
      • +
      +
    • +
    • Utility functions for plotting dose-response curves and BMD estimates.
    • +
    +
    +
    +

    Example usage +

    +

    In the following it is demonstrated how to use the functions in the bmd package on two data sets with a continuous response variable and one data set with a quantal response.

    +
    +

    Example 1 (secalonic) +

    +

    First, the data set from the drcData package is loaded, and a dose-response model is fitted.

    +
    +data("secalonic")
    +secalonic.LL.4 <- drm(rootl ~ dose, data = secalonic, fct = LL.4())
    +

    Users familiar with the drc package already know how straight-forward it is to plot dose-response models using the plot() function. The qplotDrc() function in the bmd package mimics the same functionality based on ggplot2.

    +
    +plot(secalonic.LL.4, main = "Secalonic model plotted by basic R plotting")
    +

    +
    +qplotDrc(secalonic.LL.4) + ggplot2::labs(title = "Secalonic model plotted by ggplot2")
    +

    +

    Similar to the old method of plotting dose-response curves, qplotDrc() features several options for customisation.

    +
    +qplotDrc(secalonic.LL.4, type = "all")
    +

    +
    +qplotDrc(secalonic.LL.4, type = "obs")
    +

    +
    +qplotDrc(secalonic.LL.4, type = "bars")
    +

    +
    +qplotDrc(secalonic.LL.4, type = "confidence")
    +

    +
    +

    Example 1: BMD estimation +

    +

    A wide range of BMD definitions are implemented in the bmd package. In the following, the BMD and BMDL based on the “relative risk” definition recommended by EFSA, with a BMR = 10% are computed.

    +
    +bmd(secalonic.LL.4, bmr = 0.1, backgType = "modelBased", def = "relative")
    +
    ##       BMD       BMDL
    +##  0.035362 0.01579886
    +

    The default interval is a Wald type confidence interval. If a profile likelihood confidence interval is preferred, this can be specified by the “interval” argument.

    +
    +bmd(secalonic.LL.4, bmr = 0.1, backgType = "modelBased", def = "relative", interval = "profile")
    +
    ##       BMD       BMDL
    +##  0.035362 0.02619532
    +

    The current state-of-the-art definition of the BMD is the hybrid definition. In the following, the BMD and BMDL based on the “excess risk” definition based on the hybrid method with BMR = 10%, and adverse background level set to the estimated background level minus 1SD is calculated.

    +
    +bmd(secalonic.LL.4, bmr = 0.1, backgType = "hybridSD", backg = 1, def = "hybridExc")
    +
    ##         BMD         BMDL
    +##  0.01720857 2.344327e-05
    +

    For technical reasons, profile intervals for BMD estimates based on the hybrid method, are not currently available.

    +
    +
    +

    Example 1: BMD plotting +

    +

    The qplotBmd() function ca be used to plot BMD along with the dose-response curve.

    +
    +qplotBmd(bmd(secalonic.LL.4, bmr = 0.1, backgType = "modelBased", def = "relative", display = FALSE)) # display = FALSE hides output from bmd function
    +

    +
    +
    +

    Example 1: BMD estimation using MA +

    +

    An additional set of dose-response models are fitted.

    +
    +secalonic.LL.3 <- drm(rootl ~ dose, data = secalonic, fct = LL.3())
    +secalonic.LN.3 <- drm(rootl ~ dose, data = secalonic, fct = LN.3())
    +secalonic.LN.4 <- drm(rootl ~ dose, data = secalonic, fct = LN.4())
    +secalonic.W1.3 <- drm(rootl ~ dose, data = secalonic, fct = W1.3())
    +secalonic.W1.4 <- drm(rootl ~ dose, data = secalonic, fct = W1.4())
    +secalonic.W2.3 <- drm(rootl ~ dose, data = secalonic, fct = W2.3())
    +secalonic.W2.4 <- drm(rootl ~ dose, data = secalonic, fct = W2.4())
    +
    +secalonic.modelList <- list(secalonic.LL.3, secalonic.LL.4, secalonic.LN.3, secalonic.LN.4,
    +                            secalonic.W1.3, secalonic.W1.4, secalonic.W2.3, secalonic.W2.4)
    +

    BMD can now be estimated by MA by using the function bmdMA. Type of model weights need to be specified as well as MA type.

    +
    +bmdMA(secalonic.modelList, modelWeights = "AIC", type = "Buckland", bmr = 0.1, backgType = "modelBased", def = "relative")
    +
    ##     BMD_MA    BMDL_MA
    +##  0.0317763 0.02391615
    +
    +set.seed(123)
    +bmdMA(secalonic.modelList, modelWeights = "AIC", type = "bootstrap", bmr = 0.1, backgType = "modelBased", def = "relative", R = 500, progressInfo = FALSE)
    +
    ##     BMD_MA    BMDL_MA
    +##  0.0317763 0.02821126
    +
    +bmdMA(secalonic.modelList, modelWeights = "AIC", type = "Buckland", bmr = 0.1, backgType = "hybridSD", def = "hybridExc", backg = 1)
    +
    ##      BMD_MA     BMDL_MA
    +##  0.01007999 0.004875864
    +
    +
    +
    +

    Example 2 (S.alba.comp, two dose-response curves) +

    +

    An experiment was conducted where some pots were treated with the herbicide Bentazone, and other pots were treated with Glyphosate. A model with separate curves for each herbicide is fitted as follows.

    +
    +data("S.alba.comp")
    +S.alba.comp.LL.4 <- drm(drymatter ~ dose, curveid = herbicide, data = S.alba.comp, fct = LL.4())
    +

    To plot the function, qplotDrc can be used:

    +
    +qplotDrc(S.alba.comp.LL.4)
    +

    +
    +qplotDrc(S.alba.comp.LL.4, col = TRUE, type = "confidence") +
    +  qplotDrc(S.alba.comp.LL.4, col = TRUE, type = "obs", add = TRUE)$obsLayer
    +

    +

    This also illustrates how qplotDrc() can be layered to produce custom plots, by using the argument “add = TRUE”, and choosing either the layer of observations (“obsLayer”), the layer with the dose-response curve (“curveLayer”), or the layer with the confidence band around the curves (“confBandLayer”).

    +
    +

    Example 2: BMD estimation. +

    +

    BMD and BMDL can be estimated for the individual curves:

    +
    +bmd(S.alba.comp.LL.4, bmr = 0.1, backgType = "modelBased", def = "relative")
    +
    ##                 BMD      BMDL
    +## bentazone  13.57966 10.862398
    +## glyphosate 14.16426  7.480309
    +
    +bmd(S.alba.comp.LL.4, bmr = 0.1, backgType = "hybridSD", backg = 1, def = "hybridExc")
    +
    ##                  BMD     BMDL
    +## bentazone  10.664119 7.252415
    +## glyphosate  7.425644 2.321537
    +
    +
    +
    +

    Example 3 (acute.inh, binomial response) +

    +

    20 animals were exposed to 4 doses of an unknown substance, 5 animals per dose. The number of dead animals for each dose were recorded. In the following, the data is loaded, and a 2-parameter is fitted to the data. Subsequently, a plot of the resulting dose-response curve is created using qplotDrc().

    +
    +data("acute.inh")
    +acute.inh.LL.2 <- drm(num.dead/total ~ dose, weights = total, data = acute.inh, fct = LL.2(), type = "binomial")
    +
    +qplotDrc(acute.inh.LL.2)
    +

    +
    +

    Example 3: BMD Estimation +

    +

    For binomial response data, the “excess” and “additional” BMD definitions are available. When the background response is 00, they are identical:

    +
    +bmd(acute.inh.LL.2, bmr = 0.1, backgType = "modelBased", def = "additional")
    +
    ##       BMD     BMDL
    +##  678.6335 481.0896
    +
    +bmd(acute.inh.LL.2, bmr = 0.1, backgType = "modelBased", def = "excess")
    +
    ##       BMD     BMDL
    +##  678.6335 481.0896
    +
    +qplotBmd(bmd(acute.inh.LL.2, bmr = 0.1, backgType = "modelBased", def = "additional", display = FALSE)) +
    +  ggplot2::scale_x_continuous(limits = c(0,2100), trans = scales::transform_pseudo_log(2000))
    +
    ## Scale for x is already present.
    +## Adding another scale for x, which will replace the existing scale.
    +

    +
    +
    +
    +
    +
    + + +
    + + +
    + +
    +

    +

    Site built with pkgdown 2.1.0.

    +
    + +
    +
    + + + + + + + + diff --git a/docs/link.svg b/docs/link.svg new file mode 100644 index 0000000..88ad827 --- /dev/null +++ b/docs/link.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/docs/pkgdown.css b/docs/pkgdown.css new file mode 100644 index 0000000..80ea5b8 --- /dev/null +++ b/docs/pkgdown.css @@ -0,0 +1,384 @@ +/* Sticky footer */ + +/** + * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ + * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css + * + * .Site -> body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + +html, body { + height: 100%; +} + +body { + position: relative; +} + +body > .container { + display: flex; + height: 100%; + flex-direction: column; +} + +body > .container .row { + flex: 1 0 auto; +} + +footer { + margin-top: 45px; + padding: 35px 0 36px; + border-top: 1px solid #e5e5e5; + color: #666; + display: flex; + flex-shrink: 0; +} +footer p { + margin-bottom: 0; +} +footer div { + flex: 1; +} +footer .pkgdown { + text-align: right; +} +footer p { + margin-bottom: 0; +} + +img.icon { + float: right; +} + +/* Ensure in-page images don't run outside their container */ +.contents img { + max-width: 100%; + height: auto; +} + +/* Fix bug in bootstrap (only seen in firefox) */ +summary { + display: list-item; +} + +/* Typographic tweaking ---------------------------------*/ + +.contents .page-header { + margin-top: calc(-60px + 1em); +} + +dd { + margin-left: 3em; +} + +/* Section anchors ---------------------------------*/ + +a.anchor { + display: none; + margin-left: 5px; + width: 20px; + height: 20px; + + background-image: url(./link.svg); + background-repeat: no-repeat; + background-size: 20px 20px; + background-position: center center; +} + +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; +} + +/* Fixes for fixed navbar --------------------------*/ + +.contents h1, .contents h2, .contents h3, .contents h4 { + padding-top: 60px; + margin-top: -40px; +} + +/* Navbar submenu --------------------------*/ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} + +/* Sidebar --------------------------*/ + +#pkgdown-sidebar { + margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; +} + +#pkgdown-sidebar h2 { + font-size: 1.5em; + margin-top: 1em; +} + +#pkgdown-sidebar h2:first-child { + margin-top: 0; +} + +#pkgdown-sidebar .list-unstyled li { + margin-bottom: 0.5em; +} + +/* bootstrap-toc tweaks ------------------------------------------------------*/ + +/* All levels of nav */ + +nav[data-toggle='toc'] .nav > li > a { + padding: 4px 20px 4px 6px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; +} + +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 5px; + color: inherit; + border-left: 1px solid #878787; +} + +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 5px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; + border-left: 2px solid #878787; +} + +/* Nav: second level (shown on .active) */ + +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} + +nav[data-toggle='toc'] .nav .nav > li > a { + padding-left: 16px; + font-size: 1.35rem; +} + +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 15px; +} + +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 15px; + font-weight: 500; + font-size: 1.35rem; +} + +/* orcid ------------------------------------------------------------------- */ + +.orcid { + font-size: 16px; + color: #A6CE39; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; + vertical-align: middle; +} + +/* Reference index & topics ----------------------------------------------- */ + +.ref-index th {font-weight: normal;} + +.ref-index td {vertical-align: top; min-width: 100px} +.ref-index .icon {width: 40px;} +.ref-index .alias {width: 40%;} +.ref-index-icons .alias {width: calc(40% - 40px);} +.ref-index .title {width: 60%;} + +.ref-arguments th {text-align: right; padding-right: 10px;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} +.ref-arguments .name {width: 20%;} +.ref-arguments .desc {width: 80%;} + +/* Nice scrolling for wide elements --------------------------------------- */ + +table { + display: block; + overflow: auto; +} + +/* Syntax highlighting ---------------------------------------------------- */ + +pre, code, pre code { + background-color: #f8f8f8; + color: #333; +} +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} + +pre { + border: 1px solid #eee; +} + +pre .img, pre .r-plt { + margin: 5px 0; +} + +pre .img img, pre .r-plt img { + background-color: #fff; +} + +code a, pre a { + color: #375f84; +} + +a.sourceLine:hover { + text-decoration: none; +} + +.fl {color: #1514b5;} +.fu {color: #000000;} /* function */ +.ch,.st {color: #036a07;} /* string */ +.kw {color: #264D66;} /* keyword */ +.co {color: #888888;} /* comment */ + +.error {font-weight: bolder;} +.warning {font-weight: bolder;} + +/* Clipboard --------------------------*/ + +.hasCopyButton { + position: relative; +} + +.btn-copy-ex { + position: absolute; + right: 0; + top: 0; + visibility: hidden; +} + +.hasCopyButton:hover button.btn-copy-ex { + visibility: visible; +} + +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + +/* mark.js ----------------------------*/ + +mark { + background-color: rgba(255, 255, 51, 0.5); + border-bottom: 2px solid rgba(255, 153, 51, 0.3); + padding: 1px; +} + +/* vertical spacing after htmlwidgets */ +.html-widget { + margin-bottom: 10px; +} + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js new file mode 100644 index 0000000..6f0eee4 --- /dev/null +++ b/docs/pkgdown.js @@ -0,0 +1,108 @@ +/* http://gregfranko.com/blog/jquery-best-practices/ */ +(function($) { + $(function() { + + $('.navbar-fixed-top').headroom(); + + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); + }); + + $('[data-toggle="tooltip"]').tooltip(); + + var cur_path = paths(location.pathname); + var links = $("#navbar ul li a"); + var max_length = -1; + var pos = -1; + for (var i = 0; i < links.length; i++) { + if (links[i].getAttribute("href") === "#") + continue; + // Ignore external links + if (links[i].host !== location.host) + continue; + + var nav_path = paths(links[i].pathname); + + var length = prefix_length(nav_path, cur_path); + if (length > max_length) { + max_length = length; + pos = i; + } + } + + // Add class to parent
  • , and enclosing
  • if in dropdown + if (pos >= 0) { + var menu_anchor = $(links[pos]); + menu_anchor.parent().addClass("active"); + menu_anchor.closest("li.dropdown").addClass("active"); + } + }); + + function paths(pathname) { + var pieces = pathname.split("/"); + pieces.shift(); // always starts with / + + var end = pieces[pieces.length - 1]; + if (end === "index.html" || end === "") + pieces.pop(); + return(pieces); + } + + // Returns -1 if not found + function prefix_length(needle, haystack) { + if (needle.length > haystack.length) + return(-1); + + // Special case for length-0 haystack, since for loop won't run + if (haystack.length === 0) { + return(needle.length === 0 ? 0 : -1); + } + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(i); + } + + return(haystack.length); + } + + /* Clipboard --------------------------*/ + + function changeTooltipMessage(element, msg) { + var tooltipOriginalTitle=element.getAttribute('data-original-title'); + element.setAttribute('data-original-title', msg); + $(element).tooltip('show'); + element.setAttribute('data-original-title', tooltipOriginalTitle); + } + + if(ClipboardJS.isSupported()) { + $(document).ready(function() { + var copyButton = ""; + + $("div.sourceCode").addClass("hasCopyButton"); + + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); + + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); + + // Initialize clipboard: + var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { + text: function(trigger) { + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); + } + }); + + clipboardBtnCopies.on('success', function(e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); + + clipboardBtnCopies.on('error', function() { + changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + }); + }); + } +})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml new file mode 100644 index 0000000..63a5457 --- /dev/null +++ b/docs/pkgdown.yml @@ -0,0 +1,12 @@ +pandoc: '3.5' +pkgdown: 2.1.0 +pkgdown_sha: ~ +articles: + basic-bmd-functions: basic-bmd-functions.html + bmd_Package: bmd_Package.html + model-averaging: model-averaging.html + specialized-models: specialized-models.html + statistical-tests: statistical-tests.html + utilities: utilities.html + visualization: visualization.html +last_built: 2025-07-04T09:09Z diff --git a/docs/reference/AIC.drcHetVar.html b/docs/reference/AIC.drcHetVar.html new file mode 100644 index 0000000..3023924 --- /dev/null +++ b/docs/reference/AIC.drcHetVar.html @@ -0,0 +1,103 @@ + +S3 method — AIC.drcHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcHetVar'
    +AIC(object, ..., k = 2)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/AIC.drcOrdinal.html b/docs/reference/AIC.drcOrdinal.html new file mode 100644 index 0000000..bfe661e --- /dev/null +++ b/docs/reference/AIC.drcOrdinal.html @@ -0,0 +1,103 @@ + +S3 method — AIC.drcOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcOrdinal'
    +AIC(object, ..., k = 2)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/BCa.html b/docs/reference/BCa.html new file mode 100644 index 0000000..d59b6b1 --- /dev/null +++ b/docs/reference/BCa.html @@ -0,0 +1,102 @@ + +Help funtion to bmdBoot — BCa • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Help funtion to bmdBoot

    +
    + +
    +
    BCa(obs, data, bootSample, bootjack, level)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/BIC.drcHetVar.html b/docs/reference/BIC.drcHetVar.html new file mode 100644 index 0000000..755ef83 --- /dev/null +++ b/docs/reference/BIC.drcHetVar.html @@ -0,0 +1,103 @@ + +S3 method — BIC.drcHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcHetVar'
    +BIC(object, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/BIC.drcOrdinal.html b/docs/reference/BIC.drcOrdinal.html new file mode 100644 index 0000000..1d47925 --- /dev/null +++ b/docs/reference/BIC.drcOrdinal.html @@ -0,0 +1,103 @@ + +S3 method — BIC.drcOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcOrdinal'
    +BIC(object, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/MACurve-1.png b/docs/reference/MACurve-1.png new file mode 100644 index 0000000..f10c7c5 Binary files /dev/null and b/docs/reference/MACurve-1.png differ diff --git a/docs/reference/MACurve-2.png b/docs/reference/MACurve-2.png new file mode 100644 index 0000000..30c0b07 Binary files /dev/null and b/docs/reference/MACurve-2.png differ diff --git a/docs/reference/MACurve.html b/docs/reference/MACurve.html new file mode 100644 index 0000000..7e649d5 --- /dev/null +++ b/docs/reference/MACurve.html @@ -0,0 +1,188 @@ + +Model-average dose-response curves — MACurve • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Computing weighted average response estimates across multiple dose-response +curves.

    +
    + +
    +
    MACurve(x, modelList, modelWeights, stackingSeed = 1, stackingSplits = 2)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    a vector of dose values for which the weighted average of response +estimates are to be computed

    + + +
    modelList
    +

    list of models of class drc

    + + +
    modelWeights
    +

    character string specifying the type of weights used, +"AIC", "BIC" or "Stack", or a vector of the same length as the modelList +with user defined weights

    + + +
    stackingSeed
    +

    integer or NULL: Random seed to use in the data split in +the estimation of the Stacking Weights, when modelWeights = "Stack". +The global seed is reset to the initial value after estimation of the +weights, so this option does not interfere with a globally set seed.

    + + +
    stackingSplits
    +

    integer or "LOO": When modelWeights = "Stack", +the Stacking Weights are estimated, which are based on V-fold +cross-validation. The stackingSplits argument sets the number V of data +splits used in the cross validation. The "LOO" (Leave one out) is a shortcut +to setting V equal to the number of observations in the data set.

    + +
    +
    +

    Value

    +

    numeric

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +

    Details on the implemented definitions and methods can be found in Crump +(2002)

    +
    +
    +

    Author

    +

    Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(bmd)
    +library(drc)
    +library(drcData)
    +library(ggplot2)
    +
    +# fit models to aconiazide data
    +aconiazide.LL.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LL.3())
    +aconiazide.LN.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LN.3())
    +aconiazide.W1.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W1.3())
    +aconiazide.W2.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W2.3())
    +
    +# plot the MA curve
    +plot(aconiazide.LL.3, type = "obs")
    +curve(
    +  MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3,aconiazide.W1.3, aconiazide.W2.3),
    +          modelWeights = "AIC"),
    +  add = TRUE)
    +
    +
    +# or plot using ggplot2
    +qplotDrc(aconiazide.LL.3, type = "obs") +
    + geom_function(fun = function(x){ 
    +                MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3,
    +                                            aconiazide.W1.3, aconiazide.W2.3), 
    +                        modelWeights = "AIC")
    +                })
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/PAV.html b/docs/reference/PAV.html new file mode 100644 index 0000000..d570693 --- /dev/null +++ b/docs/reference/PAV.html @@ -0,0 +1,143 @@ + +Pool-adjacent-violators monotonizing — PAV • bmd + + +
    +
    + + + +
    +
    + + +
    +

    The function monotonizes a sequence of probabilities or means based on the +pool-adjacent-violators algorithm.

    +
    + +
    +
    PAV(formula, data, type)
    +
    + +
    +

    Arguments

    + + +
    formula
    +

    an object of class "formula" expressing dose-response +relationship. Details of model specification are given under 'Details'

    + + +
    data
    +

    data frame containing the variables in the formula

    + + +
    type
    +

    character string specifying the type of data used in the model, +"continuous" or "binomial" or "Poisson"

    + +
    +
    +

    Value

    +

    A vector containing the monotonized sequence.

    +
    +
    +

    Details

    +

    For details on how the pool-adjacent-violators algorithm is defined see +Silvapulle and Sen (2004).

    +

    Formula should be specified as in the form number/total ~ dose for binomial +data and response ~ for continuous data.

    +
    +
    +

    References

    +

    Silvapulle, M. J. and Sen, P. K. (2004). Constrained statistical +inference: order, inequality, and shape constraints. New York: John Wiley & +Sons.

    +
    +
    +

    Author

    +

    Signe M. Jensen

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png new file mode 100644 index 0000000..17a3580 Binary files /dev/null and b/docs/reference/Rplot001.png differ diff --git a/docs/reference/Rplot002.png b/docs/reference/Rplot002.png new file mode 100644 index 0000000..77ae9ac Binary files /dev/null and b/docs/reference/Rplot002.png differ diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png new file mode 100644 index 0000000..1f7d22c Binary files /dev/null and b/docs/reference/Rplot003.png differ diff --git a/docs/reference/Rplot004.png b/docs/reference/Rplot004.png new file mode 100644 index 0000000..b30fec2 Binary files /dev/null and b/docs/reference/Rplot004.png differ diff --git a/docs/reference/Rplot005.png b/docs/reference/Rplot005.png new file mode 100644 index 0000000..34c7dd4 Binary files /dev/null and b/docs/reference/Rplot005.png differ diff --git a/docs/reference/Rplot006.png b/docs/reference/Rplot006.png new file mode 100644 index 0000000..92e0b83 Binary files /dev/null and b/docs/reference/Rplot006.png differ diff --git a/docs/reference/Rplot007.png b/docs/reference/Rplot007.png new file mode 100644 index 0000000..3afc15a Binary files /dev/null and b/docs/reference/Rplot007.png differ diff --git a/docs/reference/Rplot008.png b/docs/reference/Rplot008.png new file mode 100644 index 0000000..56ee7f3 Binary files /dev/null and b/docs/reference/Rplot008.png differ diff --git a/docs/reference/Rplot009.png b/docs/reference/Rplot009.png new file mode 100644 index 0000000..5daa0f9 Binary files /dev/null and b/docs/reference/Rplot009.png differ diff --git a/docs/reference/bmd-package.html b/docs/reference/bmd-package.html new file mode 100644 index 0000000..70b38b6 --- /dev/null +++ b/docs/reference/bmd-package.html @@ -0,0 +1,99 @@ + +BMD: Benchmark Dose Modeling — bmd-package • bmd + + +
    +
    + + + +
    +
    + + +
    +

    A package for benchmark dose modeling in toxicology and risk assessment

    +
    + + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmd.html b/docs/reference/bmd.html new file mode 100644 index 0000000..0c69822 --- /dev/null +++ b/docs/reference/bmd.html @@ -0,0 +1,351 @@ + +Benchmark dose estimation — bmd • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Estimation of benchmark doses and benchmark dose lower limit from dose +response model fits

    +
    + +
    +
    bmd(
    +  object,
    +  bmr,
    +  backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"),
    +  backg = NA,
    +  controlSD = NA,
    +  def = c("excess", "additional", "relative", "extra", "added", "hybridExc", "hybridAdd",
    +    "point"),
    +  respTrans = c("none", "log", "sqrt"),
    +  interval = c("delta", "sandwich", "inv", "profile", "profileGrid"),
    +  sandwich.vcov = FALSE,
    +  display = TRUE,
    +  level = 0.95,
    +  profileGridSize = NA,
    +  profileProgressInfo = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    object
    +

    object of class drc

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    backgType
    +

    character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "modelBased","absolute", "hybridSD" and +"hybridPercentile". For count data (Poisson, negbin1 or negbin2) the options +are "modelBased" and "absolute".

    +

    "modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0)

    +

    "absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative", "extra" +and "added" definition for continuous or count response data. p0 = 1 - +phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions.

    +

    "hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group.

    +

    "hybridPercentile" - the background risk is specified by the user in terms +of percentile from the control group distribution (assuming a normal +distribution). p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. where x0 is +the level for which the response is considered adverse, phi is the normal +distribution function and sigma is the SD for the control group

    +

    If not specified, it will be set to "modelBased" for all def excluding +"hybridExc" and "hybridAdd", for these the default is "hybridSD".

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridPercentile"

    + + +
    controlSD
    +

    numeric value specifying the standard deviation of the +control group (used in the hybrid approach). If not specified the SD for the +control group will be estimated as the square root of the residual variance +(assuming variance homogeneity).

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are for +binomial response. "relative", "extra", "added", "hybridExc" (excess +hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +response. "relative", "extra", and "point" are for count response data.

    +

    "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1.

    +

    "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1.

    +

    "point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response data

    +

    "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for +continuous and count response data

    +

    "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +continuous and count response data

    +

    "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response

    +

    "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response

    +

    "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response

    + + +
    respTrans
    +

    if the dose-response model is fitted with a transformed +response, specifying this option ensures that the background level for the +BMD is computed on the original scale. Options include "none" (default), +"log" (natural logarithm) and "sqrt"(square root).

    + + +
    interval
    +

    character string specifying the type of confidence interval +to use: "delta" (default), "inv", "profile" or "profileGrid"

    +

    "delta" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method

    +

    "inv" - BMDL is based on inverse regression, that is the dose associated +with the upper limit of the pointwise confidence interval of the +dose-response curve. Currently not available for a transformed response +variable.

    +

    "profile" - A profile confidence interval is computed by reparametrising the +model. Only available for backgType in ("modelBased", "absolute"), +def in ("excess", "additional","relative", "extra", "point") and +dose-response models with model functions of types Log-Logistic, Log-Normal +and Weibull 1 and 2. The limits of the confidence interval are searched for +within a grid of size specified by the profileGridSize argument, +however the values of the confidence interval are not limited to the values +on the grid.

    +

    "profileGrid" - A profile confidence interval is computed by creating a +multi-dimensional grid of parameter values for the model. Then, a confidence +region for the parameters in the model is estimated, and the BMD is +estimated for all combinations of parameter values within the region. The +interval for the BMD is then computed as the minimum and maximum values of +BMD values within the region. Note that for models with several parameters +(3-5), is might take a while to compute the confidence interval using this +method. The number of grid points for each parameter can be specified by the +profileGridSize argument.

    + + +
    sandwich.vcov
    +

    logical. If TRUE BMDL is based on confidence intervals +based on robust standard errors from the sandwich covariance matrix

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + + +
    level
    +

    numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95

    + + +
    profileGridSize
    +

    integer specifying the number of grid points used for +each parameter, when interval is either "profile" or +"profileGridSearch". Defaults to 20 if not specified.

    + + +
    profileProgressInfo
    +

    logical. If TRUE, progress info is be printed +while computed profile confidence intervals using the profileGrid +method. Default is TRUE.

    + +
    +
    +

    Value

    +

    A list of four elements: Results contain the estimated BMD and BMDL, +bmrScaled is the response value corresponding to the BMD, interval gives the +lower (BMDL) and upper (BMDU) end of the confidence interval of BMD, SE +gives the standard error of BMD.

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +

    Details on the implemented definitions and methods can be found in Crump +(2002)

    +
    +
    +

    References

    +

    Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, Biometrics +57, 698–706.

    +

    Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, Critical Reviews in Toxicology 32, 133–153.

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +#> Warning: package 'drc' was built under R version 4.4.2
    +#> Loading required package: MASS
    +#> 
    +#> 'drc' has been loaded.
    +#> Please cite R and 'drc' if used for a publication,
    +#> for references type 'citation()' and 'citation('drc')'.
    +#> 
    +#> Attaching package: 'drc'
    +#> The following objects are masked from 'package:stats':
    +#> 
    +#>     gaussian, getInitial
    +library(drcData)
    +#> 
    +#> Attaching package: 'drcData'
    +#> The following objects are masked from 'package:drc':
    +#> 
    +#>     auxins, nasturtium
    +
    +## Fitting log-logistic two-parameter model to binomial data
    +deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial")
    +
    +## BMD for 5% additional risk with estimated background risk
    +bmd(deguelin.m1, 0.05, backgType = "modelBased", def = "additional")
    +#>       BMD     BMDL
    +#>  2.176587 1.353876
    +
    +## BMD for 10% additional risk with 2% background risk
    +bmd(deguelin.m1, 0.1, backg = 0.02 , backgType = "absolute", def = "additional")
    +#>       BMD     BMDL
    +#>  3.558084 2.515197
    +
    +## BMD for 5% excess risk and background 0
    +bmd(deguelin.m1, 0.05, backg = 0, backgType = "absolute", def = "excess")
    +#>       BMD     BMDL
    +#>  2.176587 1.353876
    +
    +## Dose resulting in 12% risk
    +bmd(deguelin.m1, 0.12, def = "point")
    +#>       BMD     BMDL
    +#>  3.558084 2.515197
    +
    +## Benchmark doses for a continuous response
    +ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
    +
    +## BMD as the dose resulting in a 5% change relative to the mean background level
    +bmd(ryegrass.m1, 0.05, backgType = "modelBased", def = "relative", display = TRUE)
    +#>       BMD      BMDL
    +#>  1.165279 0.8372753
    +
    +## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk
    +bmd(ryegrass.m1, 0.05, backg = 2, backgType = "hybridSD", def = "hybridAdd", display = TRUE)
    +#>       BMD      BMDL
    +#>  1.041279 0.7106359
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdBoot.html b/docs/reference/bmdBoot.html new file mode 100644 index 0000000..e602100 --- /dev/null +++ b/docs/reference/bmdBoot.html @@ -0,0 +1,285 @@ + +Benchmark dose estimation using bootstrap — bmdBoot • bmd + + +
    +
    + + + +
    +
    + + +
    +

    The function estimates BMD and BMDL using bootstrap based on parametric +dose-response models.

    +
    + +
    +
    bmdBoot(
    +  object,
    +  bmr,
    +  R = 1000,
    +  bootType = "nonparametric",
    +  bmdType = "orig",
    +  backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"),
    +  backg = NA,
    +  controlSD = NA,
    +  def = c("excess", "additional", "relative", "extra", "added", "hybridExc", "hybridAdd",
    +    "point"),
    +  respTrans = c("none", "log", "sqrt"),
    +  bootInterval = c("percentile", "BCa"),
    +  display = TRUE,
    +  level = 0.95
    +)
    +
    + +
    +

    Arguments

    + + +
    object
    +

    object of class drc

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    R
    +

    number of bootstrap samples. Default is 1000

    + + +
    bootType
    +

    character string specifying type of bootstrap used. +"nonparametric" (default), "semiparametric" or "parametric". "Semiparametric +is only available for continuous data and "nonparametric" is at present the +only option for count data. See details below

    + + +
    bmdType
    +

    Type of estimate for BMD. Default is "orig" the bmd estimate +from the original data set. Other choices are "mean" - the mean of the +bootstrap estimates, or "median" - the median of the bootstrap estimates

    + + +
    backgType
    +

    character string specifying how the background level is +specified. For binomial and count data the options are "modelBased" and +"absolute". For continuous data the options are "modelBased", "absolute", +"hybridSD" and "hybridPercentile"

    +

    "modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0)

    +

    "absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative", "extra" +and "added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions.

    +

    "hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 0 +for "absolute" background level for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"

    + + +
    controlSD
    +

    numeric value specifying the standard deviation of the +control group (used in the hybrid approach). If not specified the SD for the +control group will be estimated as the square root of the residual variance +(assuming variance homogeneity).

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "excess" , "additional" and "point" are for +binomial response whereas "relative", "extra", "added", "hybridExc" (excess +hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +response. "relative", "extra", and "point" are for count response data.

    +

    "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1.

    +

    "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1.

    +

    "point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response

    +

    "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +continuous response

    +

    "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +count and continuous response

    +

    "added" - BMR is defined as: BMR= f(BMD) + p0. Works for count and +continuous response

    +

    "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response

    +

    "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response

    + + +
    respTrans
    +

    if the dose-response model is fitted with a transformed +response, specifying this option ensures that the background level for the +BMD is computed on the original scale. Options include "none" (default), +"log" (natural logarithm) and "sqrt"(square root).

    + + +
    bootInterval
    +

    character string indicating type of bootstrap interval +used for estimating BMDL. "Percentile" (default) or "BCa" (Bias corrected +and adjusted)

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + + +
    level
    +

    numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95

    + +
    +
    +

    Value

    +

    A list of three elements: Results contain the estimated BMD and +BMDL, bootEst is a vector af all of the estimated BMD values from each +bootstrap sample, Interval gives BMDL and BMDU, which is identical to the +confidence interval for the percentile interval approach.

    +
    +
    +

    Details

    +

    BMDL is defined as the 5th percentile in the bootstrap distribution.

    +

    Bootstrapping with the argument boot = "nonparametric" is done by sampling +with replacement from the original data set. Bootstrapping with the argument +boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), +assuming equal variance between groups, in case of continuous data. For +binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). +In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the +resampling always produces 0 or 1, respectively. In this case data is +sampled from binom(N_i,(Y_i+1/4)/(N_i+1/2)). Bootstrapping with argument +boot = "semiparametric" is done by sampling with replacement from the +residuals.

    +

    All sampling is made within dose groups.

    +
    +
    +

    Author

    +

    Signe M. Jensen

    +
    + +
    +

    Examples

    +
    
    +## Data on root length in ryegrass after exposure to ferulic acid
    +require(drc)
    +require(drcData)
    +data(ryegrass)
    +
    +ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
    +
    +## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk
    +bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", R = 50)
    +#>       BMD      BMDL
    +#>  1.041279 0.8640942
    +
    +## BMD from the same definitions but using parametric bootstrap
    +bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", bootType="parametric",R = 50)
    +#>       BMD      BMDL
    +#>  1.041279 0.7704424
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdHetVar-1.png b/docs/reference/bmdHetVar-1.png new file mode 100644 index 0000000..4a4df5d Binary files /dev/null and b/docs/reference/bmdHetVar-1.png differ diff --git a/docs/reference/bmdHetVar-2.png b/docs/reference/bmdHetVar-2.png new file mode 100644 index 0000000..e92d6d8 Binary files /dev/null and b/docs/reference/bmdHetVar-2.png differ diff --git a/docs/reference/bmdHetVar-3.png b/docs/reference/bmdHetVar-3.png new file mode 100644 index 0000000..b430a58 Binary files /dev/null and b/docs/reference/bmdHetVar-3.png differ diff --git a/docs/reference/bmdHetVar-4.png b/docs/reference/bmdHetVar-4.png new file mode 100644 index 0000000..80cf240 Binary files /dev/null and b/docs/reference/bmdHetVar-4.png differ diff --git a/docs/reference/bmdHetVar.html b/docs/reference/bmdHetVar.html new file mode 100644 index 0000000..3cf32cc --- /dev/null +++ b/docs/reference/bmdHetVar.html @@ -0,0 +1,291 @@ + +Benchmark dose estimation with heterogeneous variance — bmdHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Estimation of benchmark doses and benchmark dose lower limit based on the +hybrid method from dose response model fits with the option to specify a +heterogeneous variance structure, where the variance depends on the dose +level and/or the fitted values

    +
    + +
    +
    bmdHetVar(
    +  object,
    +  bmr,
    +  backgType = c("absolute", "hybridSD", "hybridPercentile"),
    +  backg = NA,
    +  def = c("hybridExc", "hybridAdd"),
    +  interval = c("boot", "none"),
    +  R = 1000,
    +  level = 0.95,
    +  bootType = "nonparametric",
    +  progressInfo = TRUE,
    +  display = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    object
    +

    dose-response model with a heterogeneous variance structure of +class drcHetVar

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    backgType
    +

    character string specifying how the background level is +specified. The options are "absolute", "hybridSD" and "hybridPercentile".

    +

    "absolute" - the background level is specified by the user through the backg +argument: p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and +"hybridAdd" definitions.

    +

    "hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma(0) + +f(0)) - f(0))/sigma(0)) = 1 - phi(backg), where phi is the normal +distribution function and sigma(0) is the SD for the control group.

    +

    "hybridPercentile" - the background risk is specified by the user in terms +of percentile from the control group distribution (assuming a normal +distribution). p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. where x0 is +the level for which the response is considered adverse, phi is the normal +distribution function and sigma(0) is the SD for the control group

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 2 SD +for "hybridSD" background and 0.9 for "hybridPercentile"

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" +(additional hybrid), available.

    +

    "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0)/ (1- p0), where x0 is the level for which the response is considered +adverse, phi is the normal distribution function and sigma(BMD) is the SD at +the benchmark dose.

    +

    "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0, where x0 is the level for which the response is considered adverse, phi +is the normal distribution function and sigma(BMD) is the SD at the +benchmark dose.

    + + +
    interval
    +

    character string specifying the type of confidence interval +to use: "boot" (default) or "none"

    +

    "boot" - BMDL is based on percentile bootstrapping.

    +

    "none" - no confidence interval is computed.

    + + +
    R
    +

    number of bootstrap samples. Ignored if interval = "none"

    + + +
    level
    +

    numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95

    + + +
    bootType
    +

    character string specifying the type of bootstrap samples. +Options are "nonparametric" (observations are drawn without replacement from +the original data set), "semi-parametric" (standardised residuals are drawn +with replacement and subsequently rescaled according to the model) and +"parametric" (new observations are simulated from the distribution given by +the fitted model).

    + + +
    progressInfo
    +

    logical. If TRUE, progress info is be printed while +bootstrap confidence intervals are estimated. Default is TRUE.

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + +
    +
    +

    Value

    +

    A list of five elements: Results contain the estimated BMD and BMDL, +bmrScaled is the response value corresponding to the BMD, interval gives the +lower (BMDL) and upper (BMDU) end of the confidence interval of BMD

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +

    REFERENCES TO BE ADDED/WRITTEN

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +library(bmd)
    +# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT.
    +
    +# ryegrass data
    +set.seed(123)
    +ryegrass.LL.4.hetVar <- drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2),
    +                                  data = ryegrass, fct = LL.4())
    +plot(ryegrass.LL.4.hetVar)
    +#> Loading required namespace: gridExtra
    +
    +bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, 
    +          def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, 
    +          display = TRUE) # increase R
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>           BMD      BMDL
    +#> [1,] 0.823838 0.5889243
    +bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, 
    +          def = "hybridExc", R = 50, level = 0.95, 
    +          bootType = "parametric", progressInfo = TRUE, display = TRUE) # parametric bootstrap
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>           BMD      BMDL
    +#> [1,] 0.823838 0.4823374
    +
    +# barley data
    +set.seed(123)
    +barley.LL.4.hetVar <- drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), data = barley, fct = LL.4())
    +plot(barley.LL.4.hetVar)
    +
    +bmdHetVar(barley.LL.4.hetVar, bmr = 0.1, backgType = "hybridSD", backg = 1, 
    +          def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>           BMD     BMDL
    +#> [1,] 218.0105 123.6738
    +
    +# GiantKelp data
    +set.seed(123)
    +GiantKelp.LL.4.hetVarSq <- drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), 
    +                                     data = GiantKelp, fct = LL.4())
    +plot(GiantKelp.LL.4.hetVarSq)
    +
    +bmdHetVar(GiantKelp.LL.4.hetVarSq, bmr = 0.1, backgType = "hybridSD", backg = 1, 
    +          def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>           BMD     BMDL
    +#> [1,] 3.045686 0.404048
    +
    +GiantKelp.LL.4.hetVarLogSq <- drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), 
    +                                        data = GiantKelp, fct = LL.4())
    +plot(GiantKelp.LL.4.hetVarLogSq)
    +
    +bmdHetVar(GiantKelp.LL.4.hetVarLogSq, bmr = 0.1, backgType = "hybridSD", backg = 1, 
    +          def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>           BMD      BMDL
    +#> [1,] 4.412019 0.4280083
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdHetVarMA.html b/docs/reference/bmdHetVarMA.html new file mode 100644 index 0000000..f2a3711 --- /dev/null +++ b/docs/reference/bmdHetVarMA.html @@ -0,0 +1,280 @@ + +Benchmark dose estimation with heterogeneous variance based on model averaging (MA) — bmdHetVarMA • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Estimation of benchmark doses and benchmark dose lower limit based on the +hybrid method from a list of dose response model fits with the option to +specify a heterogeneous variance structure, where the variance depends on +the dose level and/or the fitted values

    +
    + +
    +
    bmdHetVarMA(
    +  modelList,
    +  modelWeights = c("AIC", "BIC"),
    +  bmr,
    +  backgType = c("absolute", "hybridSD", "hybridPercentile"),
    +  backg = NA,
    +  def = c("hybridExc", "hybridAdd"),
    +  interval = c("boot", "none"),
    +  R = 1000,
    +  level = 0.95,
    +  progressInfo = TRUE,
    +  display = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    modelList
    +

    a list of dose-response models with a heterogeneous +variance structure of class drcHetVar

    + + +
    modelWeights
    +

    character string specifying the type of weights used, +"AIC" or "BIC", or a numeric vector of the same length as the modelList with +user defined weights

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    backgType
    +

    character string specifying how the background level is +specified. The options are "absolute", "hybridSD" and "hybridPercentile".

    +

    "absolute" - the background level is specified by the user through the backg +argument: p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and +"hybridAdd" definitions.

    +

    "hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma(0) + +f(0)) - f(0))/sigma(0)) = 1 - phi(backg), where phi is the normal +distribution function and sigma(0) is the SD for the control group.

    +

    "hybridPercentile" - the background risk is specified by the user in terms +of percentile from the control group distribution (assuming a normal +distribution). p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. where x0 is +the level for which the response is considered adverse, phi is the normal +distribution function and sigma(0) is the SD for the control group

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 2 SD +for "hybridSD" background and 0.9 for "hybridPercentile"

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" +(additional hybrid), available.

    +

    "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0)/ (1- p0), where x0 is the level for which the response is considered +adverse, phi is the normal distribution function and sigma(BMD) is the SD at +the benchmark dose.

    +

    "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0, where x0 is the level for which the response is considered adverse, phi +is the normal distribution function and sigma(BMD) is the SD at the +benchmark dose.

    + + +
    interval
    +

    character string specifying the type of confidence interval +to use: "boot" (default) or "none"

    +

    "boot" - BMDL is based on nonparametric percentile bootstrapping.

    +

    "none" - no confidence interval is computed.

    + + +
    R
    +

    number of bootstrap samples. Ignored if interval = "none"

    + + +
    level
    +

    numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95

    + + +
    progressInfo
    +

    logical. If TRUE, progress info is be printed while +bootstrap confidence intervals are estimated. Default is TRUE.

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + +
    +
    +

    Value

    +

    A list of four elements: Results contain the estimated BMD and BMDL, +Boot.samples.used gives the number of boot samples that resulted in +succesful estimations and were accordingly used in the estimation of BMDL +(and BMDU), Interval gives BMDL and BMDU, which is identical to the +confidence interval for the percentile interval approach, and modelWeights +includes the estimated weights.

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +

    REFERENCES TO BE ADDED/WRITTEN

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +library(bmd)
    +# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT.
    +
    +# ryegrass data
    +set.seed(123)
    +ryegrass.hetVar.list <- list(
    +  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LL.4()),
    +  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LN.4()),
    +  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W1.4()),
    +  drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W2.4()))
    +bmdHetVarMA(ryegrass.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridPercentile",
    +            backg = 0.1, def = "hybridExc", R = 100, level = 0.95)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   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%
      |                                                                            
      |================================================                      |  69%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  71%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |===================================================                   |  73%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |====================================================                  |  75%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |======================================================                |  77%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |=======================================================               |  79%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  81%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |==========================================================            |  83%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  85%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |=============================================================         |  87%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |==============================================================        |  89%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  91%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |=================================================================     |  93%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |==================================================================    |  95%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |====================================================================  |  97%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |===================================================================== |  99%
      |                                                                            
      |======================================================================| 100%
    +#>        BMD_MA   BMDL_MA
    +#> [1,] 1.093996 0.7095869
    +bmdHetVarMA(ryegrass.hetVar.list, modelWeights = c(0.4, 0.2, 0.1, 0.3), bmr = 0.1, 
    +            backgType = "hybridPercentile", backg = 0.1, 
    +            def = "hybridExc", R = 50, level = 0.95) # user-defined weights
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>        BMD_MA   BMDL_MA
    +#> [1,] 0.964126 0.7893021
    +
    +# barley data
    +set.seed(123)
    +barley.hetVar.list <- list(drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), 
    +                                     data = barley, fct = LL.4()),
    +                           drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), 
    +                                     data = barley, fct = W2.4()))
    +bmdHetVarMA(barley.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD", backg = 2,
    +            def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>        BMD_MA  BMDL_MA
    +#> [1,] 218.9167 151.2401
    +
    +# GiantKelp data
    +set.seed(123)
    +GiantKelp.hetVar.list <- list(
    +  drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), data = GiantKelp, fct = LL.4()),
    +  drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), data = GiantKelp, fct = LL.4()))
    +bmdHetVarMA(GiantKelp.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD",
    +            backg = 1, def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, 
    +            display = TRUE)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>        BMD_MA   BMDL_MA
    +#> [1,] 4.073336 0.6266271
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdIso.html b/docs/reference/bmdIso.html new file mode 100644 index 0000000..adb8c0a --- /dev/null +++ b/docs/reference/bmdIso.html @@ -0,0 +1,269 @@ + +Benchmark dose estimation from isotonic regression — bmdIso • bmd + + +
    +
    + + + +
    +
    + + +
    +

    The function monotonizes the sequence of response values based on the +pool-adjacent violators algorithm and based on these use linear +interpolating splines to build an isotonic regression model. From this model +a benchmark dose is estimated.

    +
    + +
    +
    bmdIso(
    +  formula,
    +  data,
    +  type,
    +  bmr,
    +  p0,
    +  backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"),
    +  backg = NA,
    +  def = c("excess", "additional", "relative", "added", "hybridExc", "hybridAdd", "point"),
    +  display = FALSE
    +)
    +
    + +
    +

    Arguments

    + + +
    formula
    +

    an object of class "formula" expressing the dose-response +relationship. Details of model specification are given under 'Details'

    + + +
    data
    +

    data frame containing the variables in the model

    + + +
    type
    +

    character string specifying the type of data used in the model. +"continuous", "binomial" or "Poisson"

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    p0
    +

    background probability for hybrid definitions

    + + +
    backgType
    +

    character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "absolute", "hybridSD" and +"hybridPercentile"

    +

    "modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0)

    +

    "absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative" and +"added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions.

    +

    "hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are for +binomial response whereas "relative", "added", "hybridExc" (excess hybrid), +"hybridAdd" (additional hybrid), and "point" are for continuous response. +"relative", "extra", and "point" are for count response data.

    +

    "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1.

    +

    "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1.

    +

    "point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response

    +

    "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +continuous response

    +

    "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response

    +

    "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response

    +

    "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + +
    +
    +

    Value

    +

    A matrix with two columns, one containing BMD and the other +containing BMDL.

    +
    +
    +

    Details

    +

    Formula should be specified as in the form number/total ~ dose for binomial +data. For details about the use of isotonic regression for BMD estimation +see Piegorsch et al. (20014) and Lin et al. (2015).

    +
    +
    +

    References

    +

    Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. +(2014). Benchmark dose analysis via nonparametric regression modeling. Risk +Analysis, 34(1), 135-151

    +

    Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric +benchmark dose estimation with continuous dose-response data. Scandinavian +Journal of Statistics, 42, 713-731

    +
    +
    +

    Author

    +

    Signe M. Jensen

    +
    + +
    +

    Examples

    +
    
    +## Data on tumor incidence in rats after exposure to formaldehyde, from Piegorsch et al. (2014)
    +formaldehyde <- data.frame(conc = c(0.0, 0.7, 2.0, 6.0, 10.0, 15.0),
    +                          tumor.incidence = c(0, 0, 0, 3, 21, 150),
    +                          total = c(122, 27, 126, 113, 34, 182))
    +                          
    +# Estimating BMD from isotonic regression using excess risk definition and a BMR=0.1
    +bmdIso(tumor.incidence/total ~ conc, 
    +      data=formaldehyde, 
    +      type="binomial",
    +      bmr=0.1,
    +      backgType = "modelBased",
    +      def = "excess")
    +#> [1] 6.49705
    +      
    +      
    +## Data on root length in ryegrass after exposure to ferulic acid
    +require(drc)
    +require(drcData)
    +data(ryegrass)
    +
    +# As isotonic regression only wors for increasing dose-response relationship 
    +# the association is turned
    +ryegrass1<-ryegrass
    +ryegrass1$rootl<-100-ryegrass1$rootl
    +
    +# Estimating BMD from isotonic regression using relative risk definition
    +# and a BMR=0.05
    +bmdIso(rootl ~ conc, 
    +      data=ryegrass1, 
    +      type="continuous",
    +      bmr=0.05,
    +      backgType = "modelBased",
    +      def = "relative")
    +#> [1] 3.682826
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdIsoBoot.html b/docs/reference/bmdIsoBoot.html new file mode 100644 index 0000000..0497dc6 --- /dev/null +++ b/docs/reference/bmdIsoBoot.html @@ -0,0 +1,282 @@ + +Benchmark dose estimation from isotonic regression — bmdIsoBoot • bmd + + +
    +
    + + + +
    +
    + + +
    +

    The function estimates BMD and BMDL using bootstrap based on isotonic +regression.

    +
    + +
    +
    bmdIsoBoot(
    +  formula,
    +  data,
    +  type,
    +  bmr,
    +  R = 1000,
    +  boot = "resample",
    +  backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"),
    +  backg = NA,
    +  def = c("excess", "additional", "relative", "added", "hybridExc", "hybridAdd", "point")
    +)
    +
    + +
    +

    Arguments

    + + +
    formula
    +

    an object of class "formula" expressing dose-response +relationship. Details of model specification are given under 'Details'

    + + +
    data
    +

    data frame containing the variables in the model

    + + +
    type
    +

    character string specifying the type of data used in the model. +"continuous" or "binomial" or "Poisson"

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    R
    +

    number of bootstrap samples

    + + +
    boot
    +

    character string specifying type of bootstrap used. "resample" +or "pseudorandom". Only option for count data is "resample"

    + + +
    backgType
    +

    character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "modelBased", "absolute", "hybridSD" and +"hybridPercentile"

    +

    "modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0)

    +

    "absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative" and +"added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions.

    +

    "hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are for +binomial response whereas "relative", "added", "hybridExc" (excess hybrid), +"hybridAdd" (additional hybrid), and "point" are for continuous response. +"relative", "extra", and "point" are for count response data.

    +

    "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1.

    +

    "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1.

    +

    "point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response

    +

    "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +continuous response

    +

    "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response

    +

    "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response

    +

    "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response

    + +
    +
    +

    Value

    +

    A matrix with two columns, one containing BMD and the other +containing BMDL.

    +
    +
    +

    Details

    +

    BMD and BMDL is defined as the median and the 5th percentile in the +bootstrap distribution, respectively.

    +

    Formula should be specified as in the form number/total ~ dose for binomial +data.

    +

    Bootstrapping with the argument boot = "resample" is done by sampling with +replacement from the original data set. Bootstrapping with the argument boot += "pseudorandom" is done by sampling from norm(mean(Y_i),sd(Y_0)), assuming +equal variance between groups, in case of continuous data. For binomial +data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). In case of +Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the resampling always +produces 0 or 1, respectively. In this case data is sampled from +binom(N_i,(Y_i+1/3)/(N_i+1/3)).

    +

    All sampling is made within dose groups.

    +

    For details about the use of isotonic regression for BMD estimation see +Piegorsch et al. (20014) and Lin et al. (2015).

    +
    +
    +

    References

    +

    Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. +(2014). Benchmark dose analysis via nonparametric regression modeling. Risk +Analysis, 34(1), 135-151

    +

    Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric +benchmark dose estimation with continuous dose-response data. Scandinavian +Journal of Statistics, 42, 713-731

    +
    +
    +

    Author

    +

    Signe M. Jensen

    +
    + +
    +

    Examples

    +
    
    +## Data on tumor incidence in rats after exposure to formaldehyde, from Piegorsch et al. (2014)
    +formaldehyde <- data.frame(conc = c(0.0, 0.7, 2.0, 6.0, 10.0, 15.0),
    +                          tumor.incidence = c(0, 0, 0, 3, 21, 150),
    +                          total = c(122, 27, 126, 113, 34, 182))
    +                          
    +# BMD and BMDL from isotonic regression using excess risk definition and a BMR=0.1
    +bmdIsoBoot(tumor.incidence/total ~ conc, 
    +      data=formaldehyde, 
    +      type="binomial",
    +      bmr=0.1,
    +      backgType = "modelBased",
    +      def = "excess")
    +#> 
    +#> 
    +#>      BMD     BMDL
    +#>  6.49705 6.322712
    +      
    +      
    +## Data on root length in ryegrass after exposure to ferulic acid
    +require(drc)
    +data(ryegrass)
    +
    +# As isotonic regression only wors for increasing dose-response relationship
    +# the association is turned
    +ryegrass1<-ryegrass
    +ryegrass1$rootl<-100-ryegrass1$rootl
    +
    +# Estimating BMD from isotonic regression using relative risk definition and a BMR=0.05
    +bmdIsoBoot(rootl ~ conc, 
    +      data=ryegrass1, 
    +      type="continuous",
    +      bmr=0.05,
    +      backgType = "modelBased",
    +      def = "relative", R = 100)
    +#> 
    +#> 
    +#>       BMD     BMDL
    +#>  3.682826 3.249387
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdMA.html b/docs/reference/bmdMA.html new file mode 100644 index 0000000..4faedcc --- /dev/null +++ b/docs/reference/bmdMA.html @@ -0,0 +1,385 @@ + +Model-averaged benchmark dose estimation — bmdMA • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Estimation of benchmark doses and benchmark dose lower limit based on model +averaging from a user-defined list of dose response model fits

    +
    + +
    +
    bmdMA(
    +  modelList,
    +  modelWeights,
    +  bmr,
    +  backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"),
    +  backg = NA,
    +  def = c("excess", "additional", "relative", "extra", "added", "hybridExc", "hybridAdd",
    +    "point"),
    +  respTrans = c("none", "log", "sqrt"),
    +  interval = c("delta", "sandwich", "inv", "profile"),
    +  type = c("curve", "bootstrap", "Kang", "Buckland"),
    +  bootstrapType = c("nonparametric", "parametric"),
    +  R = 1000,
    +  bootInterval = "percentile",
    +  level = 0.95,
    +  stackingSeed = NULL,
    +  stackingSplits = 2,
    +  display = TRUE,
    +  progressInfo = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    modelList
    +

    list of models of class drc

    + + +
    modelWeights
    +

    character string specifying the type of weights used, +"AIC", "BIC" or "Stack" (Baalkilde, J. R., Hansen, N. R., and Jensen, S. M., +2025), or a vector of the same length as the modelList with user defined +weights

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    backgType
    +

    character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "absolute", "hybridSD" and +"hybridPercentile"

    +

    "modelBased" - the background risk is obtained from the model as the risk +for dose 0: p0 = f(0)

    +

    "absolute" - the background risk is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative", "extra" +and "added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions.

    +

    "hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "excess" , "additional" and "point" are for +binomial response whereas "relative", "extra", "added", "hybridExc" (excess +hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +response

    +

    "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1.

    +

    "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1.

    +

    "point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for both binomial and continuous +response

    +

    "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for +continuous response

    +

    "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +continuous response

    +

    "added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response

    +

    "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response

    +

    "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response

    + + +
    respTrans
    +

    if the dose-response model is fitted with a transformed +response, specifying this option ensures that the background level for the +BMD is computed on the original scale. Options include "none" (default), +"log" (natural logarithm) and "sqrt"(square root).

    + + +
    interval
    +

    character string specifying the type of confidence interval +to use for the individual models (no effect when type = "bootstrap" or +"curve"): "delta" (default), "sandwich", "inv" or "profile"

    +

    "delta" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method

    +

    "sandwich" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method where the sandwich covariance matrix is used

    +

    "inv" - BMDL is based on inverse regression, that is the dose associated +with the upper limit of the point wise confidence interval of the +dose-response curve. Not possible if type = "Buckland"

    +

    "profile" - BMDL is based on the lower limit of a profile likelihood +confidence interval. Not possible if type = "Buckland"

    + + +
    type
    +

    character string specifying how to estimate BMD and BMDL: +"curve", "bootstrap", "Kang" or "Buckland"

    +

    "curve" -

    +

    "bootstrap" -

    +

    "Kang" -

    +

    "Buckland" -

    + + +
    bootstrapType
    +

    character string indicating type of bootstrap sampling +to be used if type="bootstrap" or "curve". "nonparametric" (default), or +"parametric" (see details)

    + + +
    R
    +

    number of bootstrap samples to use. Default is 1000

    + + +
    bootInterval
    +

    character string indicating how to estimate the +bootstrap confidence intervals used to find BMDL type="bootstrap". +"percentile" (default) or "BCa" (Bias corrected and adjusted)

    + + +
    level
    +

    numeric value specifying the level of the confidence interval +underlying BMDL. Default is 0.95. Note that the full CI is also computed. +The full CI has level 1-2*(1-level)

    + + +
    stackingSeed
    +

    integer or NULL: Random seed to use in the data split in +the estimation of the Stacking Weights when modelWeights = "Stack". +The global seed is reset to the initial value after estimation of the +weights, so this option does not interfere with a globally set seed.

    + + +
    stackingSplits
    +

    integer or "LOO": When modelWeights = "Stack", +the Stacking Weights are estimated, which are based on V-fold +cross-validation. The stackingSplits argument sets the number V of data +splits used in the cross validation. The "LOO" (Leave one out) is a shortcut +to setting V equal to the number of observations in the data set.

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + + +
    progressInfo
    +

    logical. If TRUE, a progressbar is shown when computing +bootstrap confidence intervals.

    + +
    +
    +

    Value

    +

    A list of five elements: Results contain the estimated BMD and BMDL, +Boot.samples.used gives the number of boot samples that resulted in +succesful estimations and were accordingly used in the estimation of BMDL +(and BMDU), Interval gives BMDL and BMDU, which is identical to the +confidence interval for the percentile interval approach, SE gives the +estimated SE for the "Buckland" method, and modelWeights includes the +estimated weights.

    +
    +
    +

    Details

    +

    This package project is still under development. The aim to provide an R +package calculating the benchmark dose (BMD) and the lower limit of the +corresponding 95% confidence interval (BMDL) for continuous and quantal +dose-response data for a range of dose-response model based on the available +definitions of the benchmark dose concepts.

    +

    Details on the implemented definitions and methods can be found in Crump +(2002)

    +

    Bootstrapping with the argument boot = "nonparametric" is done by sampling +with replacement from the original data set. Bootstrapping with the argument +boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), +assuming equal variance between groups, in case of continuous data. For +binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). +In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the +resampling always produces 0 or 1, respectively. In this case data is +sampled from binom(N_i,(Y_i+1/3)/(N_i+1/3)).

    +

    All sampling is made within dose groups.

    +
    +
    +

    References

    +

    Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, Biometrics +57, 698–706.

    +

    Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, Critical Reviews in Toxicology 32, 133–153.

    +

    Baalkilde, J. R., Hansen, N. R., and Jensen, S. M. (2025) Stacking Weights +and Model Space Selection in Frequentist Model Averaging for Benchmark Dose +Estimation, Environmetrics 36(2), e70002.

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +
    +## Fitting 4 different two-parameter models to binomial data
    +deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial")
    +deguelin.m2 <- drm(r/n~dose, weights=n, data=deguelin, fct=W1.2(), type="binomial")
    +deguelin.m3 <- drm(r/n~dose, weights=n, data=deguelin, fct=W2.2(), type="binomial")
    +deguelin.m4 <- drm(r/n~dose, weights=n, data=deguelin, fct=LN.2(), type="binomial")
    +
    +
    +## Model averaged BMD for 5% additional risk with estimated background risk 
    +## and BMDL based on Buckland et al.
    +bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, 
    +      backgType = "modelBased", def = "additional",
    +      type = "Buckland")
    +#>    BMD_MA   BMDL_MA
    +#>  1.357897 0.5643594
    +
    +## Model averaged BMD for 5% additional risk with estimated background risk
    +## and BMDL based on an average of the model curves
    +bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, 
    +      backgType = "modelBased", def = "additional",
    +      type = "curve", bootstrapType = "parametric", bootInterval = "percentile", R=50)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>    BMD_MA   BMDL_MA
    +#>  1.338646 0.5943252
    +
    +
    +## Fitting 4 different two-parameter models to binomial data
    +ryegrass.m1<-drm(rootl~conc, data=ryegrass, fct=LL.4())
    +ryegrass.m2<-drm(rootl~conc, data=ryegrass, fct=W1.4())
    +ryegrass.m3<-drm(rootl~conc, data=ryegrass, fct=W2.4())
    +ryegrass.m4<-drm(rootl~conc, data=ryegrass, fct=LN.4())
    +
    +## Model-averaged BMD and bootstrap BMDL for bmr=5% and using the hybrid approach
    +## to estimate the background risk.  
    +bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="AIC", bmr=0.05, 
    +      backgType = "hybridSD", def = "hybridAdd", type = "bootstrap",
    +      bootstrapType = "nonparametric", bootInterval = "percentile", R = 50)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>    BMD_MA   BMDL_MA
    +#>  1.179957 0.9312072
    +
    +
    +## Model-averaged BMD using the Stacking Weights
    +bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="Stack", bmr=0.05, 
    +      backgType = "hybridSD", def = "hybridAdd", type = "bootstrap",
    +      bootstrapType = "nonparametric", bootInterval = "percentile", R = 50)
    +#> Loading required namespace: CVXR
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>    BMD_MA   BMDL_MA
    +#>  1.313847 0.7801128
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdMACurve.html b/docs/reference/bmdMACurve.html new file mode 100644 index 0000000..6dcbea9 --- /dev/null +++ b/docs/reference/bmdMACurve.html @@ -0,0 +1,102 @@ + +Help funtion to bmdMA — bmdMACurve • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Help funtion to bmdMA

    +
    + +
    +
    bmdMACurve(modelList, modelWeights, bmrScaled0, searchInterval = "dataBased")
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdOrdinal.html b/docs/reference/bmdOrdinal.html new file mode 100644 index 0000000..078f101 --- /dev/null +++ b/docs/reference/bmdOrdinal.html @@ -0,0 +1,258 @@ + +Benchmark dose estimation for ordinal dose-response models — bmdOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Estimation of benchmark doses and benchmark dose lower limit from ordinal +dose response model fits

    +
    + +
    +
    bmdOrdinal(
    +  object,
    +  bmr,
    +  backgType = c("modelBased", "absolute"),
    +  backg = NA,
    +  def = c("excess", "additional", "point"),
    +  interval = c("delta", "sandwich", "profile", "bootstrap"),
    +  level = 0.95,
    +  R = 500,
    +  bootType = c("nonparametric", "parametric", "model", "hierarchical"),
    +  display = TRUE,
    +  progressInfo = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    object
    +

    object of class drcOrdinal

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    backgType
    +

    character string specifying how the background level is +specified. The options are "modelBased" and "absolute".

    +

    "modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0)

    +

    "absolute" - the background level is specified by the user through the backg +argument.

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 0 +for "absolute" background risk.

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are available +for ordinal response.

    +

    "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1.

    +

    "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1.

    +

    "point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response data.

    + + +
    interval
    +

    character string specifying the type of confidence interval +to use: "delta" (default), "sandwich", "profile" or "bootstrap"

    +

    "delta" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method

    +

    "sandwich" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method, where the sandwich covariance matrix is used

    +

    "bootstrap" - BMDL is based on bmd estimates on resampled data sets. The +type of bootstrap applied can be specified by the "bootType" argument. +Default is "nonparametric".

    +

    "none" - No confidence interval is computed.

    + + +
    level
    +

    numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95

    + + +
    R
    +

    integer specifying the number of data sets resampled from the +original data set when computing the confidence interval by bootstrap.

    + + +
    bootType
    +

    character string specifying the resampling procedure for the +data sets used for bootstrap.

    +

    "nonparametric" - Bootstrapping is done by sampling with replacement from +the original data set.

    +

    "parametric" - Bootstrapping is done by sampling from a multinomial +distribution with probabilites given by the number of observations for each +level. If all observations for one group are in the same level, shrinkage is +used to avoid that the resampling always produces that particular level. In +this case data is sampled from a multinomial distribution with probabilities +(1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + +1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the +particular group, and |K| is the number of levels.

    +

    "model" - New data sets are resampled from the fitted model.

    +

    "hierarchical" - If the experiment design is hierarchical (i.e. observations +are grouped according to a categorical variable, for instance litter), a +special resampling procedure is suggested (Blessinger 2020)

    +

    All resampling is done within the dose values.

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + + +
    progressInfo
    +

    logical. If TRUE, a progressbar is displayed when +calculating bootstrap confidence intervals

    + +
    +
    +

    Value

    +

    A list of four elements: Results contain the estimated BMD and BMDL, +interval gives the lower (BMDL) and upper (BMDU) end of the confidence +interval of BMD.

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous, quantal, quantal and ordinal dose-response data for a range of +dose-response models based on the available definitions of the benchmark +dose concepts.

    +

    Details on the implemented definitions and methods can be found in Crump +(2002)

    +
    +
    +

    References

    +

    Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, Biometrics +57, 698–706.

    +

    Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, Critical Reviews in Toxicology 32, 133–153.

    +

    Blessinger, T. D., Euling, S. Y., Wang, L., Hogan, K. A., Cai, C., +Klinefelter, G., Saillenfait, A.M. (2020) Environment International +134

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +data(guthion)
    +
    +guthionS <- subset(guthion, trt == "S")
    +
    +guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), 
    +                          weights = "total", dose = "dose", data = guthionS, fct = LL.2())
    +bmdOrdinal(guthionS.LL, bmr = 0.1, backgType = "modelBased", def = "excess", R = 50)
    +#>                    BMD     BMDL
    +#> moribund+dead 20.50104 17.11484
    +#> dead          20.59249 16.69573
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bmdOrdinalMA.html b/docs/reference/bmdOrdinalMA.html new file mode 100644 index 0000000..bfabdbd --- /dev/null +++ b/docs/reference/bmdOrdinalMA.html @@ -0,0 +1,270 @@ + +Benchmark dose estimation for ordinal dose-response models — bmdOrdinalMA • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Estimation of benchmark doses and benchmark dose lower limit based on model +averaging from a user-defined list of ordinal dose-response model fits

    +
    + +
    +
    bmdOrdinalMA(
    +  modelList,
    +  modelWeights = c("AIC", "BIC"),
    +  bmr,
    +  backgType = c("modelBased", "absolute"),
    +  backg = NA,
    +  def = c("excess", "additional", "point"),
    +  type = c("bootstrap", "Kang"),
    +  level = 0.95,
    +  R = 500,
    +  bootType = c("nonparametric", "parametric"),
    +  display = TRUE,
    +  progressInfo = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    modelList
    +

    A list of ordinal dose-response models of class +drcOrdinal

    + + +
    modelWeights
    +

    character string specifying the type of weights used, +"AIC" or "BIC", or a numeric vector of the same length as the modelList with +user defined weights

    + + +
    bmr
    +

    numeric value of benchmark response level for which to calculate +the benchmark dose

    + + +
    backgType
    +

    character string specifying how the background level is +specified. The options are "modelBased" and "absolute".

    +

    "modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0)

    +

    "absolute" - the background level is specified by the user through the backg +argument.

    + + +
    backg
    +

    numeric value specifying the background level. Defaults to 0 +for "absolute" background risk.

    + + +
    def
    +

    character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are available +for ordinal response.

    +

    "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1.

    +

    "additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1.

    +

    "point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response data.

    + + +
    type
    +

    specify the model averaging type used for the confidence +intervals. Options are "Kang" (confidence intervals computed as weighted +averages of individual confidence intervals) and "bootstrap"

    + + +
    level
    +

    numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95

    + + +
    R
    +

    integer specifying the number of data sets resampled from the +original data set when computing the confidence interval by bootstrap.

    + + +
    bootType
    +

    character string specifying the resampling procedure for the +data sets used for bootstrap.

    +

    "nonparametric" - Bootstrapping is done by sampling with replacement from +the original data set.

    +

    "parametric" - Bootstrapping is done by sampling from a multinomial +distribution with probabilites given by the number of observations for each +level. If all observations for one group are in the same level, shrinkage is +used to avoid that the resampling always produces that particular level. In +this case data is sampled from a multinomial distribution with probabilities +(1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + +1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the +particular group, and |K| is the number of levels.

    +

    All resampling is done within the dose values.

    + + +
    display
    +

    logical. If TRUE the results are displayed; otherwise they +are not

    + + +
    progressInfo
    +

    logical. If TRUE, a progressbar is displayed when +calculating bootstrap confidence intervals

    + +
    +
    +

    Value

    +

    A list of four elements: Results contain the estimated BMD and BMDL, +interval gives the lower (BMDL) and upper (BMDU) end of the confidence +interval of BMD.

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous, quantal, quantal and ordinal dose-response data for a range of +dose-response models based on the available definitions of the benchmark +dose concepts.

    +

    Details on the implemented definitions and methods can be found in Crump +(2002)

    +
    +
    +

    References

    +

    Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, Biometrics +57, 698–706.

    +

    Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, Critical Reviews in Toxicology 32, 133–153.

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +data(guthion)
    +
    +guthionS <- subset(guthion, trt == "S")
    +
    +guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), 
    +                          weights = "total", dose = "dose", data = guthionS, fct = LL.2())
    +guthionS.LN <- drmOrdinal(levels = c("alive", "moribund", "dead"), 
    +                          weights = "total", dose = "dose", data = guthionS, fct = LN.2())
    +guthionS.W1 <- drmOrdinal(levels = c("alive", "moribund", "dead"),
    +                          weights = "total", dose = "dose", data = guthionS, fct = W1.2())
    +guthionS.W2 <- drmOrdinal(levels = c("alive", "moribund", "dead"),
    +                          weights = "total", dose = "dose", data = guthionS, fct = W2.2())
    +
    +bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), 
    +             modelWeights = "AIC", bmr = 0.1, 
    +             backgType = "modelBased", def = "excess", type = "Kang")
    +#>                 BMD_MA  BMDL_MA
    +#> moribund+dead 20.20305 17.45350
    +#> dead          20.49732 17.26269
    +bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), 
    +             modelWeights = "AIC", bmr = 0.1, 
    +             backgType = "modelBased", def = "excess", type = "bootstrap", R = 50)
    +#> Loading required namespace: reshape2
    +#> Loading required namespace: tidyr
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>                 BMD_MA  BMDL_MA
    +#> moribund+dead 20.20305 16.60024
    +#> dead          20.49732 16.32929
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bootDataGen.html b/docs/reference/bootDataGen.html new file mode 100644 index 0000000..0c2eaeb --- /dev/null +++ b/docs/reference/bootDataGen.html @@ -0,0 +1,102 @@ + +Help funtion to bmdBoot — bootDataGen • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Help funtion to bmdBoot

    +
    + +
    +
    bootDataGen(object, R = 1000, bootType = "nonparametric", aggregated = TRUE)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/bootDataGenOrdinal.html b/docs/reference/bootDataGenOrdinal.html new file mode 100644 index 0000000..c6eaf5f --- /dev/null +++ b/docs/reference/bootDataGenOrdinal.html @@ -0,0 +1,106 @@ + +Help funtion to bmdOrdinal and bmdOrdinalMA — bootDataGenOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Help funtion to bmdOrdinal and bmdOrdinalMA

    +
    + +
    +
    bootDataGenOrdinal(
    +  object,
    +  R = 500,
    +  bootType = c("nonparametric", "parametric", "model", "hierarchical")
    +)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/coef.drcHetVar.html b/docs/reference/coef.drcHetVar.html new file mode 100644 index 0000000..fbbe3f9 --- /dev/null +++ b/docs/reference/coef.drcHetVar.html @@ -0,0 +1,103 @@ + +S3 method — coef.drcHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcHetVar'
    +coef(object, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/drmHetVar-1.png b/docs/reference/drmHetVar-1.png new file mode 100644 index 0000000..4a4df5d Binary files /dev/null and b/docs/reference/drmHetVar-1.png differ diff --git a/docs/reference/drmHetVar-2.png b/docs/reference/drmHetVar-2.png new file mode 100644 index 0000000..e92d6d8 Binary files /dev/null and b/docs/reference/drmHetVar-2.png differ diff --git a/docs/reference/drmHetVar-3.png b/docs/reference/drmHetVar-3.png new file mode 100644 index 0000000..b430a58 Binary files /dev/null and b/docs/reference/drmHetVar-3.png differ diff --git a/docs/reference/drmHetVar-4.png b/docs/reference/drmHetVar-4.png new file mode 100644 index 0000000..80cf240 Binary files /dev/null and b/docs/reference/drmHetVar-4.png differ diff --git a/docs/reference/drmHetVar.html b/docs/reference/drmHetVar.html new file mode 100644 index 0000000..bacda30 --- /dev/null +++ b/docs/reference/drmHetVar.html @@ -0,0 +1,208 @@ + +Dose response modeling with heterogeneous variance — drmHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Fit a dose-response model with heterogeneous variance dependending on dose +level.

    +
    + +
    +
    drmHetVar(formula, var.formula, data, fct, curveStart = NULL)
    +
    + +
    +

    Arguments

    + + +
    formula
    +

    formula for the dose-response relationship

    + + +
    var.formula
    +

    one-sided formula specifying the dependance of the dose +values and/or the fitted values on the point-wise standard error

    + + +
    data
    +

    data.frame containing the observations

    + + +
    fct
    +

    a list with three or more elements specifying the non-linear +function, the accompanying self starter function, the names of the parameter +in the non-linear function and, optionally, the first and second derivatives +as well as information used for calculation of ED values. Currently +available functions include, among others, the four- and five-parameter +log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use +drc::getMeanFunctions for a full list.

    + + +
    curveStart
    +

    numerical of length equal to the number of parameters for +the curve. Starting values for the curve parameters (optional).

    + +
    +
    +

    Value

    +

    dose-response model with a heterogeneous variance structure of class +drcHetVar.

    +

    The primary objective is to use this model for benchmark dose estimation +based on the hybrid method with a heterogeneous variance structure. This can +be done using the bmdHetVar function.

    +

    A plot method is available, which can be useful for assessing the fit of the +variance structure.

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +

    REFERENCES TO BE ADDED/WRITTEN

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +library(bmd)
    +# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT.
    +
    +# ryegrass data
    +set.seed(123)
    +ryegrass.LL.4.hetVar <- drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2),
    +                                  data = ryegrass, fct = LL.4())
    +plot(ryegrass.LL.4.hetVar)
    +
    +bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1,
    +          def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE)
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>           BMD      BMDL
    +#> [1,] 0.823838 0.5889243
    +bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, 
    +          def = "hybridExc", R = 50, level = 0.95, 
    +          bootType = "parametric", progressInfo = TRUE, display = TRUE) # parametric bootstrap
    +#> Performing bootstrap
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  32%
      |                                                                            
      |========================                                              |  34%
      |                                                                            
      |=========================                                             |  36%
      |                                                                            
      |===========================                                           |  38%
      |                                                                            
      |============================                                          |  40%
      |                                                                            
      |=============================                                         |  42%
      |                                                                            
      |===============================                                       |  44%
      |                                                                            
      |================================                                      |  46%
      |                                                                            
      |==================================                                    |  48%
      |                                                                            
      |===================================                                   |  50%
      |                                                                            
      |====================================                                  |  52%
      |                                                                            
      |======================================                                |  54%
      |                                                                            
      |=======================================                               |  56%
      |                                                                            
      |=========================================                             |  58%
      |                                                                            
      |==========================================                            |  60%
      |                                                                            
      |===========================================                           |  62%
      |                                                                            
      |=============================================                         |  64%
      |                                                                            
      |==============================================                        |  66%
      |                                                                            
      |================================================                      |  68%
      |                                                                            
      |=================================================                     |  70%
      |                                                                            
      |==================================================                    |  72%
      |                                                                            
      |====================================================                  |  74%
      |                                                                            
      |=====================================================                 |  76%
      |                                                                            
      |=======================================================               |  78%
      |                                                                            
      |========================================================              |  80%
      |                                                                            
      |=========================================================             |  82%
      |                                                                            
      |===========================================================           |  84%
      |                                                                            
      |============================================================          |  86%
      |                                                                            
      |==============================================================        |  88%
      |                                                                            
      |===============================================================       |  90%
      |                                                                            
      |================================================================      |  92%
      |                                                                            
      |==================================================================    |  94%
      |                                                                            
      |===================================================================   |  96%
      |                                                                            
      |===================================================================== |  98%
      |                                                                            
      |======================================================================| 100%
    +#>           BMD      BMDL
    +#> [1,] 0.823838 0.4823374
    +
    +# barley data
    +set.seed(123)
    +barley.LL.4.hetVar <- drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), data = barley, fct = LL.4())
    +plot(barley.LL.4.hetVar)
    +
    +
    +# GiantKelp data
    +set.seed(123)
    +GiantKelp.LL.4.hetVarSq <- drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), 
    +                                     data = GiantKelp, fct = LL.4())
    +plot(GiantKelp.LL.4.hetVarSq)
    +
    +
    +GiantKelp.LL.4.hetVarLogSq <- drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), 
    +                                        data = GiantKelp, fct = LL.4())
    +plot(GiantKelp.LL.4.hetVarLogSq)
    +
    +
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/drmMMRE.html b/docs/reference/drmMMRE.html new file mode 100644 index 0000000..888029f --- /dev/null +++ b/docs/reference/drmMMRE.html @@ -0,0 +1,190 @@ + +Dose response modeling with hierarchical variance structure — drmMMRE • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Fits a meta-analytic hierarchical dose-response model.

    +
    + +
    +
    drmMMRE(formula, exp_id, data, fct, type = c("continuous", "binomial"))
    +
    + +
    +

    Arguments

    + + +
    formula
    +

    a symbolic description of the model to be fit of the form +'response ~ dose'

    + + +
    exp_id
    +

    the name of the column in the data set that specifies the +hierarchical structure of the data

    + + +
    data
    +

    a data frame containing the variables in the model.

    + + +
    fct
    +

    a list with three or more elements specifying the non-linear +function, the accompanying self starter function, the names of the parameter +in the non-linear function and, optionally, the first and second derivatives +as well as information used for calculation of ED values. Currently +available functions include, among others, the four- and five-parameter +log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use +drc::getMeanFunctions for a full list.

    + + +
    type
    +

    a character string specifying the distribution of the data. The +default is "continuous", corresponding to assuming a normal distribution. +"binary" imply a binomial distribution.

    + +
    +
    +

    Value

    +

    meta-analytic dose-response model with a hierarchical variance +structure of class drcMMRE.

    +

    The primary objective is to use this model for benchmark dose estimation +based on dose-response data with a heterogeneous variance structure.

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +

    Fitting the meta-analytic model relies on a multivariate meta-analytic model +provided by the function rma.mv in the "metafor" package, which can +be installed by running remotes::install_github("wviechtb/metafor")

    +

    Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor +package. Journal of Statistical Software, 36(3), 1-48. +doi:10.18637/jss.v036.i03

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +library(metafor)
    +#> Warning: package 'metafor' was built under R version 4.4.2
    +#> Loading required package: Matrix
    +#> Loading required package: metadat
    +#> Warning: package 'metadat' was built under R version 4.4.2
    +#> Loading required package: numDeriv
    +#> 
    +#> Loading the 'metafor' package (version 4.6-0). For an
    +#> introduction to the package please type: help(metafor)
    +library(bmd)
    +
    +set.seed(1)
    +data0 <- data.frame(x = rep(drcData::ryegrass$conc, 2),
    +                    y = rep(drcData::ryegrass$rootl, 2) +
    +                      c(rnorm(n = nrow(drcData::ryegrass), mean = 2, sd = 0.5),
    +                        rnorm(n = nrow(drcData::ryegrass), mean = 2.7, sd = 0.7)),
    +                    EXP_ID = rep(as.character(1:2), each = nrow(drcData::ryegrass)))
    +
    +modMMRE <- drmMMRE(y~x, exp_id = EXP_ID, data = data0, fct = LL.4())
    +bmd(modMMRE, bmr = 0.1, backgType = "modelBased", def = "relative")
    +#>       BMD     BMDL
    +#>  1.669136 1.316628
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/drmOrdinal-1.png b/docs/reference/drmOrdinal-1.png new file mode 100644 index 0000000..611ccc7 Binary files /dev/null and b/docs/reference/drmOrdinal-1.png differ diff --git a/docs/reference/drmOrdinal.html b/docs/reference/drmOrdinal.html new file mode 100644 index 0000000..d4a4e47 --- /dev/null +++ b/docs/reference/drmOrdinal.html @@ -0,0 +1,182 @@ + +Fitting ordinal dose-response models — drmOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    A model fitting function for analysis of ordinal dose-response data.

    +
    + +
    +
    drmOrdinal(levels, dose, weights, blocks, data, fct, p.epsilon = 1e-16)
    +
    + +
    +

    Arguments

    + + +
    levels
    +

    a character vector of the levels of the response variable in +increasing order, as they appear in the supplied data set

    + + +
    dose
    +

    a character string specifying the column with the dose values in +the supplied data set

    + + +
    weights
    +

    a character string specifying the column containing the +number of observations pr. group

    + + +
    blocks
    +

    a character string specifying the column containing the blocks +of the experiment, if available (optional)

    + + +
    data
    +

    a dataframe containing the observations

    + + +
    fct
    +

    a list with three or more elements specifying the non-linear +function, the accompanying self starter function, the names of the parameter +in the non-linear function and, optionally, the first and second derivatives +as well, for the individual fitted curves. For more information see the help +page for the "drm" function in the "drc" package. Currently available +functions for ordinal dose-response models include, among others, the +log-logistic models LL.4, the log-normal model +LN.4 and the two Weibull models W1.4 +and W2.4. Use getMeanFunctions for a +full list.

    + + +
    p.epsilon
    +

    numeric value specifying the lower bound for the +probabilites for each level returned by the function pFun created when +fitting the model. Default value is 10^(-16)

    + +
    +
    +

    Value

    +

    An object of (S3) class 'drcOrdinal'.

    +
    +
    +

    Details

    +

    This functions fits a dose-response model for ordinal dose-response data by +fitting a series of binomial dose-response models.

    +
    +
    +

    References

    +

    # ADD REFERENCES

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +data(guthion)
    +guthionS <- subset(guthion, trt == "S")
    +
    +guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), weights = "total",
    +                          dose = "dose", data = guthionS, fct = LL.2())
    +
    +plot(guthionS.LL, xlim = c(15,55)) # uses ggplot
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/expandBinomial.html b/docs/reference/expandBinomial.html new file mode 100644 index 0000000..4f6896b --- /dev/null +++ b/docs/reference/expandBinomial.html @@ -0,0 +1,153 @@ + +Utility function — expandBinomial • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Utility function for expanding binomial data

    +
    + +
    +
    expandBinomial(data, number, total, dose, curveid = character(0))
    +
    + +
    +

    Arguments

    + + +
    data
    +

    a data.frame

    + + +
    number
    +

    the name of the column in the data set containing the number +of affected individuals per dose level

    + + +
    total
    +

    the name of the column in the data set containing the total +number of individuals per dose level

    + + +
    dose
    +

    the name of the column in the data set containing the dose +values

    + + +
    curveid
    +

    the name of the column in the data set specifying the curveid +(if available)

    + +
    +
    +

    Value

    +

    data.frame

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +
    +
    +

    Author

    +

    Signe M. Jensen and Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +} # }
    + 
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/getStackingWeights.html b/docs/reference/getStackingWeights.html new file mode 100644 index 0000000..34b3401 --- /dev/null +++ b/docs/reference/getStackingWeights.html @@ -0,0 +1,156 @@ + +Model-average dose-response curves — getStackingWeights • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Computing stacking weights.

    +
    + +
    +
    getStackingWeights(modelList, nSplits = 2)
    +
    + +
    +

    Arguments

    + + +
    modelList
    +

    list of models of class drc

    + + +
    nSplits
    +

    integer. The Stacking Weights are based on V-fold +cross-validation. The nSplits argument sets the number V of data splits used +in the cross validation.

    + +
    +
    +

    Value

    +

    numeric

    +
    +
    +

    Details

    +

    The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts.

    +

    Details on the implemented definitions and methods can be found in Crump +(2002)

    +
    +
    +

    Author

    +

    Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +library(bmd)
    +library(drc)
    +library(drcData)
    +
    +# fit models to aconiazide data
    +aconiazide.LL.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LL.3())
    +aconiazide.LN.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LN.3())
    +aconiazide.W1.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W1.3())
    +aconiazide.W2.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W2.3())
    +
    +getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3,
    +                                  aconiazide.W1.3, aconiazide.W2.3))
    +#> [1] 2.221066e-07 1.741480e-07 5.000002e-01 4.999994e-01
    +getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3,
    +                                  aconiazide.W1.3, aconiazide.W2.3),
    +                  nSplits = 7)
    +#> [1] 3.155175e-08 6.086256e-10 7.142857e-01 2.857143e-01
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/index.html b/docs/reference/index.html new file mode 100644 index 0000000..a51b90d --- /dev/null +++ b/docs/reference/index.html @@ -0,0 +1,260 @@ + +Package index • bmd + + +
    +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    All functions

    +

    +
    +

    AIC(<drcHetVar>)

    +

    S3 method

    +

    AIC(<drcOrdinal>)

    +

    S3 method

    +

    BCa()

    +

    Help funtion to bmdBoot

    +

    BIC(<drcHetVar>)

    +

    S3 method

    +

    BIC(<drcOrdinal>)

    +

    S3 method

    +

    bmd-package bmd

    +

    BMD: Benchmark Dose Modeling

    +

    bmd()

    +

    Benchmark dose estimation

    +

    bmdBoot()

    +

    Benchmark dose estimation using bootstrap

    +

    bmdHetVar()

    +

    Benchmark dose estimation with heterogeneous variance

    +

    bmdHetVarMA()

    +

    Benchmark dose estimation with heterogeneous variance based on model averaging (MA)

    +

    bmdIso()

    +

    Benchmark dose estimation from isotonic regression

    +

    bmdIsoBoot()

    +

    Benchmark dose estimation from isotonic regression

    +

    bmdMA()

    +

    Model-averaged benchmark dose estimation

    +

    bmdMACurve()

    +

    Help funtion to bmdMA

    +

    bmdOrdinal()

    +

    Benchmark dose estimation for ordinal dose-response models

    +

    bmdOrdinalMA()

    +

    Benchmark dose estimation for ordinal dose-response models

    +

    bootDataGen()

    +

    Help funtion to bmdBoot

    +

    bootDataGenOrdinal()

    +

    Help funtion to bmdOrdinal and bmdOrdinalMA

    +

    coef(<drcHetVar>)

    +

    S3 method

    +

    drmHetVar()

    +

    Dose response modeling with heterogeneous variance

    +

    drmMMRE()

    +

    Dose response modeling with hierarchical variance structure

    +

    drmOrdinal()

    +

    Fitting ordinal dose-response models

    +

    expandBinomial()

    +

    Utility function

    +

    getStackingWeights()

    +

    Model-average dose-response curves

    +

    invBmd()

    +

    Help funtion to bmd

    +

    logLik(<drcHetVar>)

    +

    S3 method

    +

    logLik(<drcOrdinal>)

    +

    S3 method

    +

    MACurve()

    +

    Model-average dose-response curves

    +

    monotonicityTest()

    +

    Test for Monotonicity of Relationship Between Two Variables

    +

    PAV()

    +

    Pool-adjacent-violators monotonizing

    +

    plot(<bmd>)

    +

    Plotting benchmark doses

    +

    plot(<drcHetVar>)

    +

    S3 method

    +

    plot(<drcOrdinal>)

    +

    S3 method

    +

    print(<bmdOrdinal>)

    +

    S3 method

    +

    print(<drcHetVar>)

    +

    S3 method

    +

    print(<drcMMRE>)

    +

    S3 method

    +

    print(<drcOrdinal>)

    +

    S3 method

    +

    qplotBmd()

    +

    Plotting benchmark doses using ggplot2

    +

    qplotDrc()

    +

    Plotting fitted dose-response curves using ggplot2

    +

    trendTest()

    +

    Test for Trend in Relationship Between Two Variables

    +

    vcov(<drcMMRE>)

    +

    S3 method

    + + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/invBmd.html b/docs/reference/invBmd.html new file mode 100644 index 0000000..b43a0d6 --- /dev/null +++ b/docs/reference/invBmd.html @@ -0,0 +1,114 @@ + +Help funtion to bmd — invBmd • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Help funtion to bmd

    +
    + +
    +
    invBmd(
    +  object,
    +  bmr,
    +  level = 0.9,
    +  slope,
    +  backgType = "modelBased",
    +  backg = NA,
    +  catLev = NA,
    +  extFactor = 10,
    +  def,
    +  useSD = useSD,
    +  sandwich.vcov = FALSE
    +)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/logLik.drcHetVar.html b/docs/reference/logLik.drcHetVar.html new file mode 100644 index 0000000..603e703 --- /dev/null +++ b/docs/reference/logLik.drcHetVar.html @@ -0,0 +1,103 @@ + +S3 method — logLik.drcHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcHetVar'
    +logLik(object, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/logLik.drcOrdinal.html b/docs/reference/logLik.drcOrdinal.html new file mode 100644 index 0000000..be3ff46 --- /dev/null +++ b/docs/reference/logLik.drcOrdinal.html @@ -0,0 +1,103 @@ + +S3 method — logLik.drcOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcOrdinal'
    +logLik(object, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/monotonicityTest.html b/docs/reference/monotonicityTest.html new file mode 100644 index 0000000..1a0aa9c --- /dev/null +++ b/docs/reference/monotonicityTest.html @@ -0,0 +1,209 @@ + +Test for Monotonicity of Relationship Between Two Variables — monotonicityTest • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Conducts a test for monotonicity between a numeric independent variable +x and a numeric dependent variable y using specified +statistical tests.

    +
    + +
    +
    monotonicityTest(
    +  x,
    +  y,
    +  data,
    +  test = c("jonckheere", "bartholomew"),
    +  level = 0.05,
    +  ...
    +)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    A numeric vector or the name of the independent variable (if +data is provided).

    + + +
    y
    +

    A numeric vector or the name of the dependent variable (if +data is provided).

    + + +
    data
    +

    An optional data frame containing the variables x and +y. If provided, x and y should be column names in +data.

    + + +
    test
    +

    A character string specifying the test to use. Must be one of +"jonckheere" (default) or "bartholomew".

    + + +
    level
    +

    Significance level for the test. Defaults to 0.05.

    + + +
    ...
    +

    Additional arguments passed to the underlying test functions.

    + +
    +
    +

    Value

    +

    A list with the following components:

    +
    p.value
    +

    The p-value of +the test.

    +
    acceptMonotonicity
    +

    A logical value indicating whether +monotonicity is accepted (TRUE) or rejected (FALSE) based on +the specified significance level.

    + +
    +
    +

    Details

    +

    The function tests the monotonicity of the relationship between x and +y based on the specified test:

    • "jonckheere": +Uses the Jonckheere-Terpstra test to assess monotonic trends.

    • +
    • "bartholomew": Uses Bartholomew's test to assess monotonicity.

    • +

    The direction of the monotonicity (increasing or decreasing) is determined +by the sign of the coefficient from a simple linear model lm(y ~ x).

    +
    +
    +

    References

    +

    A. R. Jonckheere (1954). "A Distribution-Free k-Sample Test +Against Ordered Alternatives." D. J. Bartholomew (1961). "Ordered tests in +the analysis of variance." OECD (2006). Rapport No. 54, Annexes.

    +
    +
    +

    See also

    +

    .jonckheereTest, .bartholomewTest

    +
    +
    +

    Author

    +

    Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +# Example with custom data
    +x <- c(1, 2, 3, 4, 5)
    +y <- c(2, 4, 6, 8, 10)
    +result <- monotonicityTest(x, y, test = "jonckheere")
    +print(result)
    +#> $p.value
    +#> [1] 0.007152939
    +#> 
    +#> $acceptMonotonicity
    +#> [1] TRUE
    +#> 
    +
    +data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6))
    +result <- monotonicityTest("conc", "rootl", data = drcData::ryegrass, test = "bartholomew")
    +#> Loading required namespace: isotone
    +print(result)
    +#> $p.value
    +#> [1] 0
    +#> 
    +#> $acceptMonotonicity
    +#> [1] TRUE
    +#> 
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/plot.bmd-1.png b/docs/reference/plot.bmd-1.png new file mode 100644 index 0000000..ab1a669 Binary files /dev/null and b/docs/reference/plot.bmd-1.png differ diff --git a/docs/reference/plot.bmd-2.png b/docs/reference/plot.bmd-2.png new file mode 100644 index 0000000..a25cb88 Binary files /dev/null and b/docs/reference/plot.bmd-2.png differ diff --git a/docs/reference/plot.bmd-3.png b/docs/reference/plot.bmd-3.png new file mode 100644 index 0000000..0caba94 Binary files /dev/null and b/docs/reference/plot.bmd-3.png differ diff --git a/docs/reference/plot.bmd.html b/docs/reference/plot.bmd.html new file mode 100644 index 0000000..01b9884 --- /dev/null +++ b/docs/reference/plot.bmd.html @@ -0,0 +1,365 @@ + +Plotting benchmark doses — plot.bmd • bmd + + +
    +
    + + + +
    +
    + + +
    +

    plot.bmd displays benchmark dose values with options to plot +confidence intervals as well.

    +
    + +
    +
    # S3 method for class 'bmd'
    +plot(x, ..., interval = c("BMDL", "twosided", "none"))
    +
    + +
    +

    Arguments

    + + +
    x
    +

    an object of class 'bmd'.

    + + +
    ...
    +

    arguments to be passed on to plot.drc, if add = +FALSE

    + + +
    interval
    +

    option to plot only the lower limit of the confidence +interval for the benchmark dose ("BMDL", default), both limit of the +confidence interval ("twosided"), or no confidence interval ("none").

    + +
    +
    +

    Value

    +

    Creates a plot. No value returned.

    +
    +
    +

    Details

    +

    This function is a simple function to plot benchmark dose values along with +the fitted curve.

    +
    +
    +

    Author

    +

    Jens Riis Baalkilde.

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +
    +## Fitting model and calculating BMD. 
    +model <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
    +bmd0 <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative")
    +#>       BMD     BMDL
    +#>  1.499026 1.169727
    +
    +## Plotting
    +plot(bmd0)
    +
    +
    +# Plot both limits of confidence interval
    +plot(bmd0, interval = "twosided")
    +
    +
    +# Pass argument to plot.bmd to plot confidence band around curve
    +plot(bmd0, type = "confidence")
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +
    +
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/plot.drcHetVar.html b/docs/reference/plot.drcHetVar.html new file mode 100644 index 0000000..3ebbcbc --- /dev/null +++ b/docs/reference/plot.drcHetVar.html @@ -0,0 +1,103 @@ + +S3 method — plot.drcHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcHetVar'
    +plot(x, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/plot.drcOrdinal.html b/docs/reference/plot.drcOrdinal.html new file mode 100644 index 0000000..eca5641 --- /dev/null +++ b/docs/reference/plot.drcOrdinal.html @@ -0,0 +1,103 @@ + +S3 method — plot.drcOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcOrdinal'
    +plot(x, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/print.bmdOrdinal.html b/docs/reference/print.bmdOrdinal.html new file mode 100644 index 0000000..3bacf8b --- /dev/null +++ b/docs/reference/print.bmdOrdinal.html @@ -0,0 +1,103 @@ + +S3 method — print.bmdOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'bmdOrdinal'
    +print(x, ..., digits = max(3, getOption("digits") - 3))
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/print.drcHetVar.html b/docs/reference/print.drcHetVar.html new file mode 100644 index 0000000..2bb0e3b --- /dev/null +++ b/docs/reference/print.drcHetVar.html @@ -0,0 +1,103 @@ + +S3 method — print.drcHetVar • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcHetVar'
    +print(x, ..., digits = max(3, getOption("digits") - 3))
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/print.drcMMRE.html b/docs/reference/print.drcMMRE.html new file mode 100644 index 0000000..b2fe957 --- /dev/null +++ b/docs/reference/print.drcMMRE.html @@ -0,0 +1,103 @@ + +S3 method — print.drcMMRE • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcMMRE'
    +print(x, ..., digits = max(3, getOption("digits") - 3))
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/print.drcOrdinal.html b/docs/reference/print.drcOrdinal.html new file mode 100644 index 0000000..20d1ae1 --- /dev/null +++ b/docs/reference/print.drcOrdinal.html @@ -0,0 +1,103 @@ + +S3 method — print.drcOrdinal • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcOrdinal'
    +print(x, ..., digits = max(3, getOption("digits") - 3))
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/qplotBmd-1.png b/docs/reference/qplotBmd-1.png new file mode 100644 index 0000000..6f8ac78 Binary files /dev/null and b/docs/reference/qplotBmd-1.png differ diff --git a/docs/reference/qplotBmd-2.png b/docs/reference/qplotBmd-2.png new file mode 100644 index 0000000..8340dae Binary files /dev/null and b/docs/reference/qplotBmd-2.png differ diff --git a/docs/reference/qplotBmd-3.png b/docs/reference/qplotBmd-3.png new file mode 100644 index 0000000..6f8ac78 Binary files /dev/null and b/docs/reference/qplotBmd-3.png differ diff --git a/docs/reference/qplotBmd.html b/docs/reference/qplotBmd.html new file mode 100644 index 0000000..6a7f7f5 --- /dev/null +++ b/docs/reference/qplotBmd.html @@ -0,0 +1,678 @@ + +Plotting benchmark doses using ggplot2 — qplotBmd • bmd + + +
    +
    + + + +
    +
    + + +
    +

    qplotBmd displays benchmark dose values with options to plot +confidence intervals as well using ggplot2.

    +
    + +
    +
    qplotBmd(
    +  x,
    +  ...,
    +  interval = c("BMDL", "twosided", "none"),
    +  col = FALSE,
    +  add = FALSE
    +)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    an object of class 'bmd'.

    + + +
    ...
    +

    arguments to be passed on to qplotDrc, if add = FALSE

    + + +
    interval
    +

    option to plot only the lower limit of the confidence +interval for the benchmark dose ("BMDL", default), both limit of the +confidence interval ("twosided"), or no confidence interval ("none").

    + + +
    col
    +

    logical. If TRUE then multiple curves specified by "curveid" in +the dose-response model are distinguised by colours rather than point shapes +and line types

    + + +
    add
    +

    logical. If TRUE then the functions returns a list of plot layers +to be added to an already existing ggplot.

    + +
    +
    +

    Value

    +

    A ggplot object. If the option add is used, a list of +ggplot layers is returned.

    +
    +
    +

    Details

    +

    This function is a simple function to plot benchmark dose values

    +
    +
    +

    Author

    +

    Jens Riis Baalkilde.

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +
    +## Fitting model and calculating BMD. 
    +model <- drm(rootl ~ conc, data = ryegrass, fct = LL.4())
    +bmd0 <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative")
    +#>       BMD     BMDL
    +#>  1.499026 1.169727
    +
    +# Plot
    +qplotBmd(bmd0, interval = "twosided", add = FALSE)
    +
    +
    +qplotDrc(model,type="confidence") +
    +  qplotBmd(bmd0, interval = "twosided", add = TRUE)
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +
    +
    +qplotBmd(bmd0, interval = "twosided", add = FALSE)
    +
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/qplotDrc-1.png b/docs/reference/qplotDrc-1.png new file mode 100644 index 0000000..9565918 Binary files /dev/null and b/docs/reference/qplotDrc-1.png differ diff --git a/docs/reference/qplotDrc-2.png b/docs/reference/qplotDrc-2.png new file mode 100644 index 0000000..ebdd8bf Binary files /dev/null and b/docs/reference/qplotDrc-2.png differ diff --git a/docs/reference/qplotDrc-3.png b/docs/reference/qplotDrc-3.png new file mode 100644 index 0000000..300a55a Binary files /dev/null and b/docs/reference/qplotDrc-3.png differ diff --git a/docs/reference/qplotDrc-4.png b/docs/reference/qplotDrc-4.png new file mode 100644 index 0000000..686346f Binary files /dev/null and b/docs/reference/qplotDrc-4.png differ diff --git a/docs/reference/qplotDrc-5.png b/docs/reference/qplotDrc-5.png new file mode 100644 index 0000000..8e21d20 Binary files /dev/null and b/docs/reference/qplotDrc-5.png differ diff --git a/docs/reference/qplotDrc-6.png b/docs/reference/qplotDrc-6.png new file mode 100644 index 0000000..fdcae51 Binary files /dev/null and b/docs/reference/qplotDrc-6.png differ diff --git a/docs/reference/qplotDrc-7.png b/docs/reference/qplotDrc-7.png new file mode 100644 index 0000000..31f86e0 Binary files /dev/null and b/docs/reference/qplotDrc-7.png differ diff --git a/docs/reference/qplotDrc-8.png b/docs/reference/qplotDrc-8.png new file mode 100644 index 0000000..054e44e Binary files /dev/null and b/docs/reference/qplotDrc-8.png differ diff --git a/docs/reference/qplotDrc-9.png b/docs/reference/qplotDrc-9.png new file mode 100644 index 0000000..39bd343 Binary files /dev/null and b/docs/reference/qplotDrc-9.png differ diff --git a/docs/reference/qplotDrc.html b/docs/reference/qplotDrc.html new file mode 100644 index 0000000..6a197ce --- /dev/null +++ b/docs/reference/qplotDrc.html @@ -0,0 +1,5806 @@ + +Plotting fitted dose-response curves using ggplot2 — qplotDrc • bmd + + +
    +
    + + + +
    +
    + + +
    +

    qplotDrc displays fitted curves and observations in the same plot +window, distinguishing between curves by different plot symbols and line +types or colours using ggplot2.

    +
    + +
    +
    qplotDrc(
    +  x,
    +  add = FALSE,
    +  level = NULL,
    +  type = c("average", "all", "bars", "none", "obs", "confidence"),
    +  gridsize = 250,
    +  xtrans = "pseudo_log",
    +  xlab,
    +  xlim,
    +  ytrans = NULL,
    +  ylab,
    +  ylim,
    +  col = FALSE,
    +  normal = FALSE,
    +  normRef = 1,
    +  confidence.level = 0.95
    +)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    an object of class 'drc'.

    + + +
    add
    +

    logical. If TRUE then the functions returns a list of plot layers +to be added to an already existing ggplot.

    + + +
    level
    +

    vector of curve levels to plot. To plot only the curves +specified by their names.

    + + +
    type
    +

    a character string specifying how to plot the data. There are +currently 5 options: "average" (averages and fitted curve(s); default), +"none" (only the fitted curve(s)), "obs" (only the data points), "all" (all +data points and fitted curve(s)), "bars" (averages and fitted curve(s) with +model-based standard errors (see Details)), and "confidence" (confidence +bands for fitted curve(s)).

    + + +
    gridsize
    +

    numeric. Number of points in the grid used for plotting the +fitted curves.

    + + +
    xtrans
    +

    Transformation to use on the x-axis. The default is +"pesudo_log", which is a logarithmic transformation with a smooth transition +to 0. Other options include (among others) "log" and "identity". Can be +overridden by adding a scale using the scale_x_continuous function.

    + + +
    xlab
    +

    an optional label for the x axis.

    + + +
    xlim
    +

    a numeric vector of length two, containing the lower and upper +limit for the x axis.

    + + +
    ytrans
    +

    Transformation to use on the y-axis. The default is no +transformation. Other options include (among others) "pseudo_log" and "log" +and. Can be overridden by adding a scale using the scale_y_continuous +function.

    + + +
    ylab
    +

    an optional label for the y axis.

    + + +
    ylim
    +

    a numeric vector of length two, containing the lower and upper +limit for the y axis.

    + + +
    col
    +

    logical. If TRUE default ggplot colours are used, can be +overridden by scale_color_manual. If FALSE (default) no colours are +used.

    + + +
    normal
    +

    logical. If TRUE the plot of the normalized data and fitted +curves are shown (for details see Weimer et al. (2012) for details).

    + + +
    normRef
    +

    numeric specifying the reference for the normalization +(default is 1).

    + + +
    confidence.level
    +

    confidence level for error bars and confidence +bands. Defaults to 0.95.

    + +
    +
    +

    Value

    +

    A ggplot object. If the option add is used, a list of +ggplot layers is returned.

    +
    +
    +

    Details

    +

    This function largely seeks to mimic the behaviour of the plot method +for the drc package using the ggplot2 package for plotting.

    +

    The use of xlim allows changing the range of the x axis, +extrapolating the fitted dose-response curves. Note that changing the range +on the x axis may also entail a change of the range on the y axis.

    +

    See colors for the available colours.

    +

    Suitable labels are automatically provided.

    +

    The model-based standard errors used for the error bars are calculated as +the fitted value plus/minus the estimated error times the 1-(alpha/2) +quantile in the t distribution with degrees of freedom equal to the residual +degrees of freedom for the model (or using a standard normal distribution in +case of binomial and poisson data), where alpha=1-confidence.level. The +standard errors are obtained using the predict method with the arguments +interval = "confidence" and level=confidence.level.

    +
    +
    +

    References

    +

    Weimer, M., Jiang, X., Ponta, O., Stanzel, S., Freyberger, A., +Kopp-Schneider, A. (2012) The impact of data transformations on +concentration-response modeling. Toxicology Letters, 213, +292–298.

    +
    +
    +

    Author

    +

    Jens Riis Baalkilde. Based on plot.drc by Christian Ritz and +Jens C. Streibig with Contributions from Xiaoyan Wang and Greg Warnes.

    +
    + +
    +

    Examples

    +
    
    +library(drc)
    +library(drcData)
    +library(ggplot2)
    +
    +## Fitting models to be plotted below
    +ryegrass.m1 <- drm(rootl~conc, data = ryegrass, fct = LL.4())
    +ryegrass.m2 <- drm(rootl~conc, data = ryegrass, fct = LL.3())  # lower limit fixed at 0
    +
    +## Plotting observations and fitted curve for the first model
    +p <- qplotDrc(ryegrass.m1) 
    +p
    +
    +
    +## Add confidence region for the first model.
    +p + qplotDrc(ryegrass.m1, type="confidence", add = TRUE)$confBandLayer 
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +
    +
    +## Plot both models
    +p + qplotDrc(ryegrass.m2, add = TRUE)$curveLayer
    +
    +
    +## Fitting model to be plotted below
    +spinach.m1 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4())
    +
    +## Plot with no colours
    +qplotDrc(spinach.m1)
    +
    +
    +## Plot with default colours
    +qplotDrc(spinach.m1, col = TRUE)
    +
    +
    +## Plot with specified colours
    +qplotDrc(spinach.m1, col = TRUE) + 
    +  scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod",
    +                                "darkslategray4", "plum4"))
    +
    +
    +## Plot of curves 1 and 2 only
    +qplotDrc(spinach.m1, level = c(1,4))
    +
    +
    +## Plot with confidence regions
    +qplotDrc(spinach.m1, col = TRUE, type = "confidence")
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +
    +
    +## Plot points and add confidence regions. Confidence regions are coloured by the "fill" aesthetic.
    +## Customising the x scale by adding a new scale.
    +qplotDrc(spinach.m1, col = TRUE, type = "confidence") +
    +  qplotDrc(spinach.m1, col = TRUE, type = "average", add = TRUE)$obsLayer + 
    +  scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod",
    +                                "darkslategray4", "plum4"))+ 
    +  scale_fill_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod",
    +                               "darkslategray4", "plum4")) +
    +  scale_x_continuous(trans = scales:::pseudo_log_trans(sigma = 0.2, base = exp(1)))
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Warning: Recycling array of length 1 in array-vector arithmetic is deprecated.
    +#>   Use c() or as.vector() instead.
    +#> Scale for x is already present.
    +#> Adding another scale for x, which will replace the existing scale.
    +
    +
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/trendTest.html b/docs/reference/trendTest.html new file mode 100644 index 0000000..bbec0a9 --- /dev/null +++ b/docs/reference/trendTest.html @@ -0,0 +1,247 @@ + +Test for Trend in Relationship Between Two Variables — trendTest • bmd + + +
    +
    + + + +
    +
    + + +
    +

    Conducts a test for trends between a numeric independent variable x +and a numeric dependent variable y using specified statistical tests.

    +
    + +
    +
    trendTest(x, y, data, test = c("william", "shirley", "tukey"), level = 0.05)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    A numeric vector or the name of the independent variable (if +data is provided).

    + + +
    y
    +

    A numeric vector or the name of the dependent variable (if +data is provided).

    + + +
    data
    +

    An optional data frame containing the variables x and +y. If provided, x and y should be column names in +data.

    + + +
    test
    +

    A character string specifying the test to use. Must be one of +"william", "shirley", or "tukey" (default).

    + + +
    level
    +

    Significance level for the test. Defaults to 0.05.

    + +
    +
    +

    Value

    +

    A list with the following components:

    +
    p.values
    +

    A numeric +vector of p-values for the tests (if applicable).

    +
    decisions
    +

    A +character vector indicating whether the trend is "accept" or +"reject" based on the test results.

    +
    acceptTrend
    +

    A logical +value indicating whether a trend is accepted (TRUE) or rejected +(FALSE) based on the specified significance level.

    + +
    +
    +

    Details

    +

    The function tests for a trend in the relationship between x and +y based on the specified test:

    • "william": +Applies Williams' test to assess trend significance.

    • +
    • "shirley": Uses Shirley's test for trend analysis with ordered +alternatives.

    • +
    • "tukey": Implements the Tukey trend test using +multiple marginal models.

    • +

    The direction of the trend (increasing or decreasing) is determined by the +slope of the linear model lm(y ~ x).

    +
    +
    +

    References

    +

    Williams, D. A. (1971). "A test for differences between +treatment means when several dose levels are compared with a zero dose +control." Biometrics, 27(1), 103-117. Shirley, E. (1977). "A non-parametric +equivalent of Williams' test for contrasting increasing dose levels of a +treatment." Biometrics, 33(2), 386-389. Schaarschmidt, F. et al. (2021). +"The Tukey trend test: Multiplicity adjustment using multiple marginal +models" Biometrics, 78(2), 789-797.

    +
    +
    +

    See also

    +

    .williamsTest, .shirleyTest, .tukeytrendfit

    +
    +
    +

    Author

    +

    Jens Riis Baalkilde

    +
    + +
    +

    Examples

    +
    
    +# Example with custom data
    +x <- c(1, 2, 3, 4, 5)
    +y <- c(2, 4, 6, 8, 10)
    +result <- trendTest(x, y, test = "tukey")
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +#> Warning: essentially perfect fit: summary may be unreliable
    +print(result)
    +#> $p.values
    +#>       xari: xari       xord: xord xarilog: xarilog 
    +#>     0.000000e+00     0.000000e+00     2.084999e-13 
    +#> 
    +#> $decisions
    +#>       xari: xari       xord: xord xarilog: xarilog 
    +#>         "accept"         "accept"         "accept" 
    +#> 
    +#> $acceptTrend
    +#> [1] TRUE
    +#> 
    +
    +# Example with a data frame
    +data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6))
    +result <- trendTest("x", "y", data = data, test = "shirley")
    +print(result)
    +#> $p.values
    +#> NULL
    +#> 
    +#> $decisions
    +#>     ctr     
    +#> mu1 "reject"
    +#> mu2 "reject"
    +#> mu3 "reject"
    +#> mu4 "accept"
    +#> 
    +#> $acceptTrend
    +#> [1] TRUE
    +#> 
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/vcov.drcMMRE.html b/docs/reference/vcov.drcMMRE.html new file mode 100644 index 0000000..46cacdb --- /dev/null +++ b/docs/reference/vcov.drcMMRE.html @@ -0,0 +1,103 @@ + +S3 method — vcov.drcMMRE • bmd + + +
    +
    + + + +
    +
    + + +
    +

    S3 method

    +
    + +
    +
    # S3 method for class 'drcMMRE'
    +vcov(object, ...)
    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml new file mode 100644 index 0000000..1b9da5b --- /dev/null +++ b/docs/sitemap.xml @@ -0,0 +1,57 @@ + +/404.html +/articles/basic-bmd-functions.html +/articles/bmd_Package.html +/articles/index.html +/articles/model-averaging.html +/articles/specialized-models.html +/articles/statistical-tests.html +/articles/utilities.html +/articles/visualization.html +/authors.html +/index.html +/LICENSE-text.html +/reference/AIC.drcHetVar.html +/reference/AIC.drcOrdinal.html +/reference/BCa.html +/reference/BIC.drcHetVar.html +/reference/BIC.drcOrdinal.html +/reference/bmd-package.html +/reference/bmd.html +/reference/bmdBoot.html +/reference/bmdHetVar.html +/reference/bmdHetVarMA.html +/reference/bmdIso.html +/reference/bmdIsoBoot.html +/reference/bmdMA.html +/reference/bmdMACurve.html +/reference/bmdOrdinal.html +/reference/bmdOrdinalMA.html +/reference/bootDataGen.html +/reference/bootDataGenOrdinal.html +/reference/coef.drcHetVar.html +/reference/drmHetVar.html +/reference/drmMMRE.html +/reference/drmOrdinal.html +/reference/expandBinomial.html +/reference/getStackingWeights.html +/reference/index.html +/reference/invBmd.html +/reference/logLik.drcHetVar.html +/reference/logLik.drcOrdinal.html +/reference/MACurve.html +/reference/monotonicityTest.html +/reference/PAV.html +/reference/plot.bmd.html +/reference/plot.drcHetVar.html +/reference/plot.drcOrdinal.html +/reference/print.bmdOrdinal.html +/reference/print.drcHetVar.html +/reference/print.drcMMRE.html +/reference/print.drcOrdinal.html +/reference/qplotBmd.html +/reference/qplotDrc.html +/reference/trendTest.html +/reference/vcov.drcMMRE.html + + diff --git a/man/AIC.drcHetVar.Rd b/man/AIC.drcHetVar.Rd new file mode 100644 index 0000000..32be632 --- /dev/null +++ b/man/AIC.drcHetVar.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/logLik.drcHetVar.R +\name{AIC.drcHetVar} +\alias{AIC.drcHetVar} +\title{AIC Method for drcHetVar Objects} +\usage{ +\method{AIC}{drcHetVar}(object, ..., k = 2) +} +\arguments{ +\item{object}{A drcHetVar model object} + +\item{...}{Additional arguments (not used)} + +\item{k}{Numeric value for penalty term in AIC calculation (default is 2)} +} +\value{ +The log-likelihood value +} +\description{ +Extracts the AIC from drcHetVar model objects. +} diff --git a/man/AIC.drcOrdinal.Rd b/man/AIC.drcOrdinal.Rd new file mode 100644 index 0000000..287e193 --- /dev/null +++ b/man/AIC.drcOrdinal.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/AIC.drcOrdinal.R +\name{AIC.drcOrdinal} +\alias{AIC.drcOrdinal} +\title{AIC Method for drcOrdinal Objects} +\usage{ +\method{AIC}{drcOrdinal}(object, ..., k = 2) +} +\arguments{ +\item{object}{A drcOrdinal model object} + +\item{...}{Additional arguments (not used)} + +\item{k}{The penalty per parameter to be used; default is 2} +} +\value{ +The AIC value +} +\description{ +Calculates the Akaike Information Criterion for drcOrdinal model objects. +} diff --git a/man/BCa.Rd b/man/BCa.Rd index 92eca9c..687d7a5 100644 --- a/man/BCa.Rd +++ b/man/BCa.Rd @@ -1,5 +1,62 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BCa.R \name{BCa} \alias{BCa} -\title{ -Help funtion to bmdBoot +\title{Calculate BCa (Bias-Corrected and Accelerated) Bootstrap Confidence Interval} +\usage{ +BCa(obs, data, bootSample, bootjack, level) +} +\arguments{ +\item{obs}{numeric; The observed value of the statistic computed from the original sample} + +\item{data}{data.frame or matrix; The original dataset from which bootstrap samples are drawn} + +\item{bootSample}{numeric vector; Bootstrap replicates of the statistic. Must be of length R +where R is the number of bootstrap replicates} + +\item{bootjack}{numeric vector; Jackknife replicates of the statistic. Must be of length n +where n is the number of observations in data} + +\item{level}{numeric; Confidence level between 0 and 1 (e.g., 0.95 for 95\% confidence interval)} +} +\value{ +A numeric vector of length 2 containing: +\itemize{ +\item lower: The lower confidence limit +\item upper: The upper confidence limit +} +} +\description{ +This function calculates the BCa confidence interval for a given statistic using bootstrap and jackknife estimates. +} +\details{ +It computes the BCa confidence interval for a statistic using bootstrap and jackknife estimates. +The BCa method adjusts for both bias and skewness in the bootstrap distribution and generally +provides better coverage than standard bootstrap confidence intervals. +} +\examples{ +\dontrun{ +# Example with mean as the statistic +data <- rnorm(100) +obs_mean <- mean(data) + +# Generate bootstrap samples +R <- 1000 +boot_means <- replicate(R, mean(sample(data, replace = TRUE))) + +# Generate jackknife samples +jack_means <- sapply(1:length(data), + function(i) mean(data[-i])) + +# Calculate 95\% CI +BCa(obs_mean, data, boot_means, jack_means, 0.95) +} + +} +\references{ +Efron, B. (1987). Better Bootstrap Confidence Intervals. +\emph{Journal of the American Statistical Association}, 82(397), 171-185. + +DiCiccio, T. J., & Efron, B. (1996). Bootstrap confidence intervals. +\emph{Statistical Science}, 11(3), 189-212. } diff --git a/man/BIC.drcHetVar.Rd b/man/BIC.drcHetVar.Rd new file mode 100644 index 0000000..b0cb508 --- /dev/null +++ b/man/BIC.drcHetVar.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/logLik.drcHetVar.R +\name{BIC.drcHetVar} +\alias{BIC.drcHetVar} +\title{BIC Method for drcHetVar Objects} +\usage{ +\method{BIC}{drcHetVar}(object, ...) +} +\arguments{ +\item{object}{A drcHetVar model object} + +\item{...}{Additional arguments (not used)} +} +\value{ +The log-likelihood value +} +\description{ +Extracts the BIC from drcHetVar model objects. +} diff --git a/man/BIC.drcOrdinal.Rd b/man/BIC.drcOrdinal.Rd new file mode 100644 index 0000000..fe573d3 --- /dev/null +++ b/man/BIC.drcOrdinal.Rd @@ -0,0 +1,95 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/BIC.drcOrdinal.R +\name{BIC.drcOrdinal} +\alias{BIC.drcOrdinal} +\title{BIC Method for drcOrdinal Objects} +\usage{ +\method{BIC}{drcOrdinal}(object, ...) +} +\arguments{ +\item{object}{An object of class "drcOrdinal" containing fitted ordinal +dose-response models} + +\item{...}{Additional arguments passed to the method. Currently supports: +\itemize{ +\item \code{epsilon}: Small positive value to avoid log(0) in likelihood +calculations (default: 1e-16) +}} +} +\value{ +A numeric value representing the BIC of the fitted ordinal dose-response model. +Lower values indicate better model fit when comparing models. +} +\description{ +S3 method to calculate the Bayesian Information Criterion (BIC) for fitted +ordinal dose-response models. This method extends the generic \code{BIC()} function +to handle \code{drcOrdinal} objects which contain multiple fitted dose-response models +for different response categories. +} +\details{ +The BIC is calculated using the standard formula: +\deqn{BIC = k \log(n) - 2 \log(L)}{BIC = k * log(n) - 2 * log(L)} +where: +\itemize{ +\item \eqn{k}{k} is the total number of parameters across all models in the ordinal fit +\item \eqn{n}{n} is the total number of observations (sum of weights) +\item \eqn{L}{L} is the likelihood of the fitted model +} + +For ordinal dose-response models, the total number of parameters is the sum +of parameters from all individual models in the \code{drmList} component, and the +sample size is calculated as the sum of weights in the data. + +The \code{epsilon} parameter is used in the \code{logLik()} calculation to prevent +numerical issues when probabilities approach zero. +} +\note{ +This method assumes that the \code{drcOrdinal} object contains: +\itemize{ +\item A \code{drmList} component with fitted dose-response models +\item A \code{data} component with the original data including weights +\item A \code{weights} component specifying the column name for observation weights +} +} +\section{Model Comparison}{ + +BIC penalizes model complexity more heavily than AIC, making it useful for: +\itemize{ +\item Comparing ordinal dose-response models with different numbers of parameters +\item Model selection in situations where simpler models are preferred +\item Avoiding overfitting in dose-response modeling +} +} + +\examples{ +\dontrun{ +# Assuming you have a fitted drcOrdinal object +ordinal_model <- drm(response ~ dose, + weights = count, + data = ordinal_data, + fct = cumulative.logit()) + +# Calculate BIC +bic_value <- BIC(ordinal_model) + +# Compare models +model1_bic <- BIC(ordinal_model1) +model2_bic <- BIC(ordinal_model2) + +# Lower BIC indicates better model +if(model1_bic < model2_bic) { + cat("Model 1 is preferred\n") +} else { + cat("Model 2 is preferred\n") +} + +# Use custom epsilon for numerical stability +bic_custom <- BIC(ordinal_model, epsilon = 1e-12) +} + +} +\seealso{ +\code{\link{BIC}} for the generic BIC function, +\code{\link{AIC.drcOrdinal}} for the corresponding AIC method, +\code{\link{logLik.drcOrdinal}} for the log-likelihood method +} diff --git a/man/MACurve.Rd b/man/MACurve.Rd index d2c274c..ef1d936 100644 --- a/man/MACurve.Rd +++ b/man/MACurve.Rd @@ -1,43 +1,50 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/MACurve.R \name{MACurve} \alias{MACurve} -\title{ -Model-average dose-response curves -} -\description{Computing weighted average response estimates across multiple dose-response curves. -} +\title{Model-average dose-response curves} \usage{ MACurve(x, modelList, modelWeights, stackingSeed = 1, stackingSplits = 2) } \arguments{ - \item{x}{a vector of dose values for which the weighted average of response estimates are to be computed} - \item{modelList}{list of models of class \code{drc}} - \item{modelWeights}{character string specifying the type of weights used, "AIC", "BIC" or "Stack", or a vector of the same length as the modelList with user defined weights} - \item{stackingSeed}{integer or NULL: Random seed to use in the data split in the estimation of the Stacking Weights, when \code{modelWeights = "Stack"}. The global seed is reset to the initial value after estimation of the weights, so this option does not interfere with a globally set seed.} - \item{stackingSplits}{integer or "LOO": When \code{modelWeights = "Stack"}, the Stacking Weights are estimated, which are based on V-fold cross-validation. The stackingSplits argument sets the number V of data splits used in the cross validation. The "LOO" (Leave one out) is a shortcut to setting V equal to the number of observations in the data set. } -} +\item{x}{a vector of dose values for which the weighted average of response +estimates are to be computed} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - Details on the implemented definitions and methods can be found in Crump (2002) +\item{modelList}{list of models of class \code{drc}} + +\item{modelWeights}{character string specifying the type of weights used, +"AIC", "BIC" or "Stack", or a vector of the same length as the modelList +with user defined weights} + +\item{stackingSeed}{integer or NULL: Random seed to use in the data split in +the estimation of the Stacking Weights, when \code{modelWeights = "Stack"}. +The global seed is reset to the initial value after estimation of the +weights, so this option does not interfere with a globally set seed.} + +\item{stackingSplits}{integer or "LOO": When \code{modelWeights = "Stack"}, +the Stacking Weights are estimated, which are based on V-fold +cross-validation. The stackingSplits argument sets the number V of data +splits used in the cross validation. The "LOO" (Leave one out) is a shortcut +to setting V equal to the number of observations in the data set.} } \value{ numeric } -\references{ -} - -\author{ Jens Riis Baalkilde -} -\note{ +\description{ +Computing weighted average response estimates across multiple dose-response +curves. } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. -\seealso{ +Details on the implemented definitions and methods can be found in Crump +(2002) } \examples{ + library(bmd) library(drc) library(drcData) @@ -65,8 +72,10 @@ qplotDrc(aconiazide.LL.3, type = "obs") + }) } +\author{ +Jens Riis Baalkilde +} +\keyword{averaging} +\keyword{model} \keyword{models} \keyword{nonlinear} -\keyword{model averaging} - -\concept{dose-response, MA, Model Averaging} diff --git a/man/PAV.Rd b/man/PAV.Rd index 07dcbda..7362458 100644 --- a/man/PAV.Rd +++ b/man/PAV.Rd @@ -1,40 +1,42 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PAV.R \name{PAV} \alias{PAV} -\title{ -Pool-adjacent-violators monotonizing -} -\description{The function monotonizes a sequence of probabilities or means based on the pool-adjacent-violators algorithm. -} +\title{Pool-adjacent-violators monotonizing} \usage{ -PAV(formula,data,type) +PAV(formula, data, type) } \arguments{ - \item{formula}{an object of class "formula" expressing dose-response relationship. Details of model specification are given under 'Details'} - \item{data}{data frame containing the variables in the formula} - \item{type}{character string specifying the type of data used in the model, "continuous" or "binomial" or "Poisson"} -} +\item{formula}{an object of class "formula" expressing dose-response +relationship. Details of model specification are given under 'Details'} -\details{ -For details on how the pool-adjacent-violators algorithm is defined see Silvapulle and Sen (2004). +\item{data}{data frame containing the variables in the formula} -Formula should be specified as in the form number/total ~ dose for binomial data and response ~ for continuous data. +\item{type}{character string specifying the type of data used in the model, +"continuous" or "binomial" or "Poisson"} } \value{ A vector containing the monotonized sequence. } -\references{ - Silvapulle, M. J. and Sen, P. K. (2004). Constrained statistical inference: order, inequality, and shape constraints. New York: John Wiley & Sons. +\description{ +The function monotonizes a sequence of probabilities or means based on the +pool-adjacent-violators algorithm. } +\details{ +For details on how the pool-adjacent-violators algorithm is defined see +Silvapulle and Sen (2004). -\author{ Signe M. Jensen +Formula should be specified as in the form number/total ~ dose for binomial +data and response ~ for continuous data. } -\note{ +\references{ +Silvapulle, M. J. and Sen, P. K. (2004). Constrained statistical +inference: order, inequality, and shape constraints. New York: John Wiley & +Sons. } - -\seealso{ +\author{ +Signe M. Jensen } - +\keyword{isotonic} \keyword{nonparametric} -\keyword{isotonic regression} - -\concept{Pool-adjacent-violators} \ No newline at end of file +\keyword{regression} diff --git a/man/bmd-package.Rd b/man/bmd-package.Rd new file mode 100644 index 0000000..7c4282d --- /dev/null +++ b/man/bmd-package.Rd @@ -0,0 +1,9 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmd-package.R +\docType{package} +\name{bmd-package} +\alias{bmd-package} +\title{BMD: Benchmark Dose Modeling} +\description{ +A package for benchmark dose modeling in toxicology and risk assessment +} diff --git a/man/bmd.Rd b/man/bmd.Rd index edff726..24fd0c1 100644 --- a/man/bmd.Rd +++ b/man/bmd.Rd @@ -1,157 +1,217 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmd.R \name{bmd} \alias{bmd} -\title{ -Benchmark dose estimation -} -\description{Estimation of benchmark doses and benchmark dose lower limit from dose response model fits -} +\title{Benchmark dose estimation} \usage{ -bmd(object, bmr, backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), - backg = NA, controlSD = NA, - def = c("excess", "additional", "relative", "extra", - "added", "hybridExc", "hybridAdd", "point"), - respTrans = c("none", "log", "sqrt"), - interval = c("delta", "sandwich", "inv", "profile", "profileGrid"), - sandwich.vcov = FALSE, display = TRUE, level = 0.95, - profileGridSize = NA, profileProgressInfo = TRUE) +bmd( + object, + bmr, + backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), + backg = NA, + controlSD = NA, + def = c("excess", "additional", "relative", "extra", "added", "hybridExc", "hybridAdd", + "point"), + respTrans = c("none", "log", "sqrt"), + interval = c("delta", "sandwich", "inv", "profile", "profileGrid"), + sandwich.vcov = FALSE, + display = TRUE, + level = 0.95, + profileGridSize = NA, + profileProgressInfo = TRUE +) } - \arguments{ - \item{object}{object of class \code{drc}} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{backgType}{character string specifying how the background level is specified. For binomial data the options are "modelBased" and "absolute". For continuous data the options are "modelBased","absolute", "hybridSD" and "hybridPercentile". For count data (Poisson, negbin1 or negbin2) the options are "modelBased" and "absolute". - - "modelBased" - the background level is obtained from the model as the level for dose 0: - p0 = f(0) - - "absolute" - the background level is specified by the user through the backg argument: - p0 = backg for binomial response and for the "relative", "extra" and "added" definition for continuous or count response data. - p0 = 1 - phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. - - "hybridSD" - the background risk is specified by the user in terms of number of SDs from the mean of the control group. - p0 = 1 - phi(((backg*sigma + f(0)) - f(0))/sigma) = 1 - phi(backg), - where phi is the normal distribution function and sigma is the SD for the control group. - - "hybridPercentile" - the background risk is specified by the user in terms of percentile from the control group distribution (assuming a normal distribution). - p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group - - If not specified, it will be set to "modelBased" for all def excluding "hybridExc" and "hybridAdd", for these the default is "hybridSD". - } - - \item{backg}{numeric value specifying the background level. Defaults to 0 for "absolute" background risk for binomial response (1 for decreasing dose-response models), 2 SD for "hybridSD" background and 0.9 for "hybridPercentile"} - - \item{controlSD}{numeric value specifying the standard deviation of the control group (used in the hybrid approach). If not specified the SD for the control group will be estimated as the square root of the residual variance (assuming variance homogeneity).} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "excess", "additional" and "point" are for binomial response. "relative", "extra", "added", "hybridExc" (excess hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous response. "relative", "extra", and "point" are for count response data. - - "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). - Works for binomial response. BMR should be between 0 and 1. - - "additional" - BMR is defined as: BMR = f(BMD) - p0. - Works for binomial response. BMR should be between 0 and 1. - - "point" - The response level for which to find BMD is directly defined through the BMR level: BMR = f(BMD). Works for binomial, count and continuous response data - - "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. - Works for continuous and count response data - - "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). - Works for continuous and count response data - - "added" - BMR is defined as: BMR= f(BMD) + p0. - Works for continuous response - - "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ (1- p0), - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response - - "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response} - - \item{respTrans}{if the dose-response model is fitted with a transformed response, specifying this option ensures that the background level for the BMD is computed on the original scale. - Options include "none" (default), "log" (natural logarithm) and "sqrt"(square root).} - - \item{interval}{character string specifying the type of confidence interval to use: "delta" (default), "inv", "profile" or "profileGrid" - - "delta" - BMDL is based on the lower limit of a Wald confidence interval based on the delta method - - "inv" - BMDL is based on inverse regression, that is the dose associated with the upper limit of the pointwise confidence interval of the dose-response curve. Currently not available for a transformed response variable. - - "profile" - A profile confidence interval is computed by reparametrising the model. Only available for \code{backgType} in ("modelBased", "absolute"), \code{def} in ("excess", "additional","relative", "extra", "point") and dose-response models with model functions of types Log-Logistic, Log-Normal and Weibull 1 and 2. The limits of the confidence interval are searched for within a grid of size specified by the \code{profileGridSize} argument, however the values of the confidence interval are not limited to the values on the grid. - - "profileGrid" - A profile confidence interval is computed by creating a multi-dimensional grid of parameter values for the model. Then, a confidence region for the parameters in the model is estimated, and the BMD is estimated for all combinations of parameter values within the region. The interval for the BMD is then computed as the minimum and maximum values of BMD values within the region. Note that for models with several parameters (3-5), is might take a while to compute the confidence interval using this method. The number of grid points for each parameter can be specified by the \code{profileGridSize} argument.} - - \item{sandwich.vcov}{logical. If TRUE BMDL is based on confidence intervals based on robust standard errors from the sandwich covariance matrix} - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} - - \item{level}{numeric value specifying the levle of the confidence interval underlying BMDL. Default is 0.95} - - \item{profileGridSize}{integer specifying the number of grid points used for each parameter, when \code{interval} is either "profile" or "profileGridSearch". Defaults to 20 if not specified. } - - \item{profileProgressInfo}{logical. If TRUE, progress info is be printed while computed profile confidence intervals using the \code{profileGrid} method. Default is TRUE.} -} - -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - Details on the implemented definitions and methods can be found in Crump (2002) +\item{object}{object of class \code{drc}} + +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{backgType}{character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "modelBased","absolute", "hybridSD" and +"hybridPercentile". For count data (Poisson, negbin1 or negbin2) the options +are "modelBased" and "absolute". + +"modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0) + +"absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative", "extra" +and "added" definition for continuous or count response data. p0 = 1 - +phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. + +"hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. + +"hybridPercentile" - the background risk is specified by the user in terms +of percentile from the control group distribution (assuming a normal +distribution). p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. where x0 is +the level for which the response is considered adverse, phi is the normal +distribution function and sigma is the SD for the control group + +If not specified, it will be set to "modelBased" for all def excluding +"hybridExc" and "hybridAdd", for these the default is "hybridSD".} + +\item{backg}{numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridPercentile"} + +\item{controlSD}{numeric value specifying the standard deviation of the +control group (used in the hybrid approach). If not specified the SD for the +control group will be estimated as the square root of the residual variance +(assuming variance homogeneity).} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are for +binomial response. "relative", "extra", "added", "hybridExc" (excess +hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +response. "relative", "extra", and "point" are for count response data. + +"excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1. + +"additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1. + +"point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response data + +"relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for +continuous and count response data + +"extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +continuous and count response data + +"added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response + +"hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response + +"hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response} + +\item{respTrans}{if the dose-response model is fitted with a transformed +response, specifying this option ensures that the background level for the +BMD is computed on the original scale. Options include "none" (default), +"log" (natural logarithm) and "sqrt"(square root).} + +\item{interval}{character string specifying the type of confidence interval +to use: "delta" (default), "inv", "profile" or "profileGrid" + +"delta" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method + +"inv" - BMDL is based on inverse regression, that is the dose associated +with the upper limit of the pointwise confidence interval of the +dose-response curve. Currently not available for a transformed response +variable. + +"profile" - A profile confidence interval is computed by reparametrising the +model. Only available for \code{backgType} in ("modelBased", "absolute"), +\code{def} in ("excess", "additional","relative", "extra", "point") and +dose-response models with model functions of types Log-Logistic, Log-Normal +and Weibull 1 and 2. The limits of the confidence interval are searched for +within a grid of size specified by the \code{profileGridSize} argument, +however the values of the confidence interval are not limited to the values +on the grid. + +"profileGrid" - A profile confidence interval is computed by creating a +multi-dimensional grid of parameter values for the model. Then, a confidence +region for the parameters in the model is estimated, and the BMD is +estimated for all combinations of parameter values within the region. The +interval for the BMD is then computed as the minimum and maximum values of +BMD values within the region. Note that for models with several parameters +(3-5), is might take a while to compute the confidence interval using this +method. The number of grid points for each parameter can be specified by the +\code{profileGridSize} argument.} + +\item{sandwich.vcov}{logical. If TRUE BMDL is based on confidence intervals +based on robust standard errors from the sandwich covariance matrix} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} + +\item{level}{numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95} + +\item{profileGridSize}{integer specifying the number of grid points used for +each parameter, when \code{interval} is either "profile" or +"profileGridSearch". Defaults to 20 if not specified.} + +\item{profileProgressInfo}{logical. If TRUE, progress info is be printed +while computed profile confidence intervals using the \code{profileGrid} +method. Default is TRUE.} } \value{ -A list of four elements: Results contain the estimated BMD and BMDL, bmrScaled is the response value corresponding to the BMD, interval gives the lower (BMDL) and upper (BMDU) end of the confidence interval of BMD, SE gives the standard error of BMD. +A list of four elements: Results contain the estimated BMD and BMDL, +bmrScaled is the response value corresponding to the BMD, interval gives the +lower (BMDL) and upper (BMDU) end of the confidence interval of BMD, SE +gives the standard error of BMD. } -\references{ - Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) - Benchmark Dose Calculation from Epidemiological Data, - \emph{Biometrics} \bold{57}, 698--706. - - Crump, K. (2002) - Critical Issues in Benchmark Calculations from Continuous Data, - \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. -} - -\author{ Signe M. Jensen and Jens Riis Baalkilde -} -\note{ +\description{ +Estimation of benchmark doses and benchmark dose lower limit from dose +response model fits } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. -\seealso{ +Details on the implemented definitions and methods can be found in Crump +(2002) } \examples{ + library(drc) library(drcData) ## Fitting log-logistic two-parameter model to binomial data deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial") -## BMD for 5% additional risk with estimated background risk +## BMD for 5\% additional risk with estimated background risk bmd(deguelin.m1, 0.05, backgType = "modelBased", def = "additional") -## BMD for 10% additional risk with 2% background risk +## BMD for 10\% additional risk with 2\% background risk bmd(deguelin.m1, 0.1, backg = 0.02 , backgType = "absolute", def = "additional") -## BMD for 5% excess risk and background 0 +## BMD for 5\% excess risk and background 0 bmd(deguelin.m1, 0.05, backg = 0, backgType = "absolute", def = "excess") -## Dose resulting in 12% risk +## Dose resulting in 12\% risk bmd(deguelin.m1, 0.12, def = "point") ## Benchmark doses for a continuous response ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) -## BMD as the dose resulting in a 5% change relative to the mean background level +## BMD as the dose resulting in a 5\% change relative to the mean background level bmd(ryegrass.m1, 0.05, backgType = "modelBased", def = "relative", display = TRUE) ## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk bmd(ryegrass.m1, 0.05, backg = 2, backgType = "hybridSD", def = "hybridAdd", display = TRUE) + +} +\references{ +Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +\bold{57}, 698--706. + +Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/bmdBoot.Rd b/man/bmdBoot.Rd index d0490a2..a55df1f 100644 --- a/man/bmdBoot.Rd +++ b/man/bmdBoot.Rd @@ -1,106 +1,154 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdBoot.R \name{bmdBoot} \alias{bmdBoot} -\title{ -Benchmark dose estimation using bootstrap -} -\description{The function estimates BMD and BMDL using bootstrap based on parametric dose-response models. -} +\title{Benchmark dose estimation using bootstrap} \usage{ -bmdBoot(object, bmr, R = 1000, bootType = "nonparametric", bmdType = "orig", - backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), - backg = NA, controlSD = NA, - def = c("excess", "additional", "relative", "extra", - "added", "hybridExc", "hybridAdd", "point"), - respTrans = c("none", "log", "sqrt"), bootInterval = c("percentile", "BCa"), - display = TRUE, level = 0.95) +bmdBoot( + object, + bmr, + R = 1000, + bootType = "nonparametric", + bmdType = "orig", + backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), + backg = NA, + controlSD = NA, + def = c("excess", "additional", "relative", "extra", "added", "hybridExc", "hybridAdd", + "point"), + respTrans = c("none", "log", "sqrt"), + bootInterval = c("percentile", "BCa"), + display = TRUE, + level = 0.95 +) } \arguments{ - \item{object}{object of class \code{drc}} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{R}{number of bootstrap samples. Default is 1000} - \item{bootType}{character string specifying type of bootstrap used. "nonparametric" (default), "semiparametric" or "parametric". "Semiparametric is only available for continuous data and "nonparametric" is at present the only option for count data. See details below} - \item{bmdType}{Type of estimate for BMD. Default is "orig" the bmd estimate from the original data set. Other choices are "mean" - the mean of the bootstrap estimates, or "median" - the median of the bootstrap estimates} - \item{backgType}{character string specifying how the background level is specified. For binomial and count data the options are "modelBased" and "absolute". For continuous data the options are "modelBased", "absolute", "hybridSD" and "hybridPercentile" - - "modelBased" - the background level is obtained from the model as the level for dose 0: - p0 = f(0) - - "absolute" - the background level is specified by the user through the backg argument: - p0 = backg for binomial response and for the "relative", "extra" and "added" definition for continuous response. - p0 = 1 - phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. - - "hybridSD" - the background risk is specified by the user in terms of number of SDs from the mean of the control group. - p0 = 1 - phi(((backg*sigma + f(0)) - f(0))/sigma) = 1 - phi(backg), - where phi is the normal distribution function and sigma is the SD for the control group. - "hybridPercentile" - the background risk is specified by the user in terms of percentile from the control group distribution (assuming a normal distribution). - p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group} - - \item{backg}{numeric value specifying the background level. Defaults to 0 for "absolute" background level for binomial response (1 for decreasing dose-response models), 2 SD for "hybridSD" background and 0.9 for "hybridpercentile"} - - \item{controlSD}{numeric value specifying the standard deviation of the control group (used in the hybrid approach). If not specified the SD for the control group will be estimated as the square root of the residual variance (assuming variance homogeneity).} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "excess" , "additional" and "point" are for binomial response whereas "relative", "extra", "added", "hybridExc" (excess hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous response. "relative", "extra", and "point" are for count response data. - - "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). - Works for binomial response. BMR should be between 0 and 1. - - "additional" - BMR is defined as: BMR = f(BMD) - p0. - Works for binomial response. BMR should be between 0 and 1. - - "point" - The response level for which to find BMD is directly defined through the BMR level: BMR = f(BMD). Works for binomial, count and continuous response - - "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. - Works for count and continuous response - - "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). - Works for count and continuous response - - "added" - BMR is defined as: BMR= f(BMD) + p0. - Works for count and continuous response - - "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ (1- p0), - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response - - "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response} - - \item{respTrans}{if the dose-response model is fitted with a transformed response, specifying this option ensures that the background level for the BMD is computed on the original scale. - Options include "none" (default), "log" (natural logarithm) and "sqrt"(square root).} - - \item{bootInterval}{character string indicating type of bootstrap interval used for estimating BMDL. "Percentile" (default) or "BCa" (Bias corrected and adjusted)} - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} - - \item{level}{numeric value specifying the levle of the confidence interval underlying BMDL. Default is 0.95} +\item{object}{object of class \code{drc}} -} +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} -\details{ -BMDL is defined as the 5th percentile in the bootstrap distribution. +\item{R}{number of bootstrap samples. Default is 1000} + +\item{bootType}{character string specifying type of bootstrap used. +"nonparametric" (default), "semiparametric" or "parametric". "Semiparametric +is only available for continuous data and "nonparametric" is at present the +only option for count data. See details below} + +\item{bmdType}{Type of estimate for BMD. Default is "orig" the bmd estimate +from the original data set. Other choices are "mean" - the mean of the +bootstrap estimates, or "median" - the median of the bootstrap estimates} + +\item{backgType}{character string specifying how the background level is +specified. For binomial and count data the options are "modelBased" and +"absolute". For continuous data the options are "modelBased", "absolute", +"hybridSD" and "hybridPercentile" + +"modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0) + +"absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative", "extra" +and "added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. + +"hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group} + +\item{backg}{numeric value specifying the background level. Defaults to 0 +for "absolute" background level for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"} + +\item{controlSD}{numeric value specifying the standard deviation of the +control group (used in the hybrid approach). If not specified the SD for the +control group will be estimated as the square root of the residual variance +(assuming variance homogeneity).} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "excess" , "additional" and "point" are for +binomial response whereas "relative", "extra", "added", "hybridExc" (excess +hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +response. "relative", "extra", and "point" are for count response data. + +"excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1. + +"additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1. -Bootstrapping with the argument boot = "nonparametric" is done by sampling with replacement from the original data set. Bootstrapping with the argument boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), assuming equal variance between groups, in case of continuous data. For binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the resampling always produces 0 or 1, respectively. In this case data is sampled from binom(N_i,(Y_i+1/4)/(N_i+1/2)). Bootstrapping with argument boot = "semiparametric" is done by sampling with replacement from the residuals. +"point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response -All sampling is made within dose groups. +"relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +continuous response +"extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +count and continuous response + +"added" - BMR is defined as: BMR= f(BMD) + p0. Works for count and +continuous response + +"hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response + +"hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response} + +\item{respTrans}{if the dose-response model is fitted with a transformed +response, specifying this option ensures that the background level for the +BMD is computed on the original scale. Options include "none" (default), +"log" (natural logarithm) and "sqrt"(square root).} + +\item{bootInterval}{character string indicating type of bootstrap interval +used for estimating BMDL. "Percentile" (default) or "BCa" (Bias corrected +and adjusted)} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} + +\item{level}{numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95} } \value{ -A list of three elements: Results contain the estimated BMD and BMDL, bootEst is a vector af all of the estimated BMD values from each bootstrap sample, Interval gives BMDL and BMDU, which is identical to the confidence interval for the percentile interval approach. +A list of three elements: Results contain the estimated BMD and +BMDL, bootEst is a vector af all of the estimated BMD values from each +bootstrap sample, Interval gives BMDL and BMDU, which is identical to the +confidence interval for the percentile interval approach. } -\references{ - +\description{ +The function estimates BMD and BMDL using bootstrap based on parametric +dose-response models. } +\details{ +BMDL is defined as the 5th percentile in the bootstrap distribution. -\author{ Signe M. Jensen -} -\note{ -} +Bootstrapping with the argument boot = "nonparametric" is done by sampling +with replacement from the original data set. Bootstrapping with the argument +boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), +assuming equal variance between groups, in case of continuous data. For +binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). +In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the +resampling always produces 0 or 1, respectively. In this case data is +sampled from binom(N_i,(Y_i+1/4)/(N_i+1/2)). Bootstrapping with argument +boot = "semiparametric" is done by sampling with replacement from the +residuals. -\seealso{ +All sampling is made within dose groups. } \examples{ + ## Data on root length in ryegrass after exposure to ferulic acid require(drc) require(drcData) @@ -114,7 +162,8 @@ bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", R = 50) ## BMD from the same definitions but using parametric bootstrap bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", bootType="parametric",R = 50) +} +\author{ +Signe M. Jensen } \keyword{bootstrap} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/bmdHetVar.Rd b/man/bmdHetVar.Rd index 8d94fc9..b676ebd 100644 --- a/man/bmdHetVar.Rd +++ b/man/bmdHetVar.Rd @@ -1,82 +1,111 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdHetVar.R \name{bmdHetVar} \alias{bmdHetVar} -\title{ -Benchmark dose estimation with heterogeneous variance -} -\description{Estimation of benchmark doses and benchmark dose lower limit based on the hybrid method from dose response model fits with the option to specify a heterogeneous variance structure, where the variance depends on the dose level and/or the fitted values -} +\title{Benchmark dose estimation with heterogeneous variance} \usage{ -bmdHetVar(object, bmr, backgType = c("absolute", "hybridSD", "hybridPercentile"), - backg = NA, def = c("hybridExc", "hybridAdd"), interval = c("boot", "none"), - R = 1000, level = 0.95, bootType = "nonparametric", - progressInfo = TRUE, display = TRUE) +bmdHetVar( + object, + bmr, + backgType = c("absolute", "hybridSD", "hybridPercentile"), + backg = NA, + def = c("hybridExc", "hybridAdd"), + interval = c("boot", "none"), + R = 1000, + level = 0.95, + bootType = "nonparametric", + progressInfo = TRUE, + display = TRUE +) } - \arguments{ - \item{object}{dose-response model with a heterogeneous variance structure of class \code{drcHetVar}} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{backgType}{character string specifying how the background level is specified. The options are "absolute", "hybridSD" and "hybridPercentile". - - "absolute" - the background level is specified by the user through the backg argument: - p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and "hybridAdd" definitions. - - "hybridSD" - the background risk is specified by the user in terms of number of SDs from the mean of the control group. - p0 = 1 - phi(((backg*sigma(0) + f(0)) - f(0))/sigma(0)) = 1 - phi(backg), - where phi is the normal distribution function and sigma(0) is the SD for the control group. - - "hybridPercentile" - the background risk is specified by the user in terms of percentile from the control group distribution (assuming a normal distribution). - p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma(0) is the SD for the control group} - - \item{backg}{numeric value specifying the background level. Defaults to 2 SD for "hybridSD" background and 0.9 for "hybridPercentile"} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" (additional hybrid), available. - - "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - p0)/ (1- p0), - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma(BMD) is the SD at the benchmark dose. - - "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - p0, - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma(BMD) is the SD at the benchmark dose. } - - \item{interval}{character string specifying the type of confidence interval to use: "boot" (default) or "none" - - "boot" - BMDL is based on percentile bootstrapping. - - "none" - no confidence interval is computed.} - - \item{R}{number of bootstrap samples. Ignored if \code{interval = "none"}} - - \item{level}{numeric value specifying the levle of the confidence interval underlying BMDL. Default is 0.95} - - \item{bootType}{character string specifying the type of bootstrap samples. Options are "nonparametric" (observations are drawn without replacement from the original data set), "semi-parametric" (standardised residuals are drawn with replacement and subsequently rescaled according to the model) and "parametric" (new observations are simulated from the distribution given by the fitted model).} - - \item{progressInfo}{logical. If TRUE, progress info is be printed while bootstrap confidence intervals are estimated. Default is TRUE.} - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} -} +\item{object}{dose-response model with a heterogeneous variance structure of +class \code{drcHetVar}} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - REFERENCES TO BE ADDED/WRITTEN +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{backgType}{character string specifying how the background level is +specified. The options are "absolute", "hybridSD" and "hybridPercentile". + +"absolute" - the background level is specified by the user through the backg +argument: p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and +"hybridAdd" definitions. + +"hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma(0) + +f(0)) - f(0))/sigma(0)) = 1 - phi(backg), where phi is the normal +distribution function and sigma(0) is the SD for the control group. + +"hybridPercentile" - the background risk is specified by the user in terms +of percentile from the control group distribution (assuming a normal +distribution). p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. where x0 is +the level for which the response is considered adverse, phi is the normal +distribution function and sigma(0) is the SD for the control group} + +\item{backg}{numeric value specifying the background level. Defaults to 2 SD +for "hybridSD" background and 0.9 for "hybridPercentile"} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" +(additional hybrid), available. + +"hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0)/ (1- p0), where x0 is the level for which the response is considered +adverse, phi is the normal distribution function and sigma(BMD) is the SD at +the benchmark dose. + +"hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0, where x0 is the level for which the response is considered adverse, phi +is the normal distribution function and sigma(BMD) is the SD at the +benchmark dose.} + +\item{interval}{character string specifying the type of confidence interval +to use: "boot" (default) or "none" + +"boot" - BMDL is based on percentile bootstrapping. + +"none" - no confidence interval is computed.} + +\item{R}{number of bootstrap samples. Ignored if \code{interval = "none"}} + +\item{level}{numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95} + +\item{bootType}{character string specifying the type of bootstrap samples. +Options are "nonparametric" (observations are drawn without replacement from +the original data set), "semi-parametric" (standardised residuals are drawn +with replacement and subsequently rescaled according to the model) and +"parametric" (new observations are simulated from the distribution given by +the fitted model).} + +\item{progressInfo}{logical. If TRUE, progress info is be printed while +bootstrap confidence intervals are estimated. Default is TRUE.} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} } \value{ -A list of five elements: Results contain the estimated BMD and BMDL, bmrScaled is the response value corresponding to the BMD, interval gives the lower (BMDL) and upper (BMDU) end of the confidence interval of BMD +A list of five elements: Results contain the estimated BMD and BMDL, +bmrScaled is the response value corresponding to the BMD, interval gives the +lower (BMDL) and upper (BMDU) end of the confidence interval of BMD } -\references{ -} - -\author{ Signe M. Jensen and Jens Riis Baalkilde -} -\note{ +\description{ +Estimation of benchmark doses and benchmark dose lower limit based on the +hybrid method from dose response model fits with the option to specify a +heterogeneous variance structure, where the variance depends on the dose +level and/or the fitted values } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. -\seealso{ +REFERENCES TO BE ADDED/WRITTEN } \examples{ + library(drc) library(drcData) library(bmd) @@ -115,8 +144,9 @@ plot(GiantKelp.LL.4.hetVarLogSq) bmdHetVar(GiantKelp.LL.4.hetVarLogSq, bmr = 0.1, backgType = "hybridSD", backg = 1, def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/bmdHetVarMA.Rd b/man/bmdHetVarMA.Rd index c31415b..7855ff4 100644 --- a/man/bmdHetVarMA.Rd +++ b/man/bmdHetVarMA.Rd @@ -1,81 +1,112 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdHetVarMA.R \name{bmdHetVarMA} \alias{bmdHetVarMA} -\title{ -Benchmark dose estimation with heterogeneous variance based on model averaging (MA) -} -\description{Estimation of benchmark doses and benchmark dose lower limit based on the hybrid method from a list of dose response model fits with the option to specify a heterogeneous variance structure, where the variance depends on the dose level and/or the fitted values -} +\title{Benchmark dose estimation with heterogeneous variance based on model +averaging (MA)} \usage{ -bmdHetVarMA(modelList, modelWeights = c("AIC", "BIC"), bmr, - backgType = c("absolute", "hybridSD", "hybridPercentile"), - backg = NA, def = c("hybridExc", "hybridAdd"), interval = c("boot", "none"), - R = 1000, level = 0.95, progressInfo = TRUE,display = TRUE) +bmdHetVarMA( + modelList, + modelWeights = c("AIC", "BIC"), + bmr, + backgType = c("absolute", "hybridSD", "hybridPercentile"), + backg = NA, + def = c("hybridExc", "hybridAdd"), + interval = c("boot", "none"), + R = 1000, + level = 0.95, + progressInfo = TRUE, + display = TRUE +) } - \arguments{ - \item{modelList}{a list of dose-response models with a heterogeneous variance structure of class \code{drcHetVar}} - \item{modelWeights}{character string specifying the type of weights used, "AIC" or "BIC", or a numeric vector of the same length as the modelList with user defined weights} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{backgType}{character string specifying how the background level is specified. The options are "absolute", "hybridSD" and "hybridPercentile". - - "absolute" - the background level is specified by the user through the backg argument: - p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and "hybridAdd" definitions. - - "hybridSD" - the background risk is specified by the user in terms of number of SDs from the mean of the control group. - p0 = 1 - phi(((backg*sigma(0) + f(0)) - f(0))/sigma(0)) = 1 - phi(backg), - where phi is the normal distribution function and sigma(0) is the SD for the control group. - - "hybridPercentile" - the background risk is specified by the user in terms of percentile from the control group distribution (assuming a normal distribution). - p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma(0) is the SD for the control group} - - \item{backg}{numeric value specifying the background level. Defaults to 2 SD for "hybridSD" background and 0.9 for "hybridPercentile"} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" (additional hybrid), available. - - "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - p0)/ (1- p0), - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma(BMD) is the SD at the benchmark dose. - - "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - p0, - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma(BMD) is the SD at the benchmark dose. } - - \item{interval}{character string specifying the type of confidence interval to use: "boot" (default) or "none" - - "boot" - BMDL is based on nonparametric percentile bootstrapping. - - "none" - no confidence interval is computed.} - - \item{R}{number of bootstrap samples. Ignored if \code{interval = "none"}} - - \item{level}{numeric value specifying the levle of the confidence interval underlying BMDL. Default is 0.95} - - \item{progressInfo}{logical. If TRUE, progress info is be printed while bootstrap confidence intervals are estimated. Default is TRUE.} - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} -} +\item{modelList}{a list of dose-response models with a heterogeneous +variance structure of class \code{drcHetVar}} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - REFERENCES TO BE ADDED/WRITTEN +\item{modelWeights}{character string specifying the type of weights used, +"AIC" or "BIC", or a numeric vector of the same length as the modelList with +user defined weights} + +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{backgType}{character string specifying how the background level is +specified. The options are "absolute", "hybridSD" and "hybridPercentile". + +"absolute" - the background level is specified by the user through the backg +argument: p0 = 1 - phi((back - f(0))/sigma(0)) for "hybridExc" and +"hybridAdd" definitions. + +"hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma(0) + +f(0)) - f(0))/sigma(0)) = 1 - phi(backg), where phi is the normal +distribution function and sigma(0) is the SD for the control group. + +"hybridPercentile" - the background risk is specified by the user in terms +of percentile from the control group distribution (assuming a normal +distribution). p0 = 1 - phi((x0 - f(0))/sigma(0)) = 1 - backg. where x0 is +the level for which the response is considered adverse, phi is the normal +distribution function and sigma(0) is the SD for the control group} + +\item{backg}{numeric value specifying the background level. Defaults to 2 SD +for "hybridSD" background and 0.9 for "hybridPercentile"} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "hybridExc" (excess hybrid), "hybridAdd" +(additional hybrid), available. + +"hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0)/ (1- p0), where x0 is the level for which the response is considered +adverse, phi is the normal distribution function and sigma(BMD) is the SD at +the benchmark dose. + +"hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma(BMD)) - +p0, where x0 is the level for which the response is considered adverse, phi +is the normal distribution function and sigma(BMD) is the SD at the +benchmark dose.} + +\item{interval}{character string specifying the type of confidence interval +to use: "boot" (default) or "none" + +"boot" - BMDL is based on nonparametric percentile bootstrapping. + +"none" - no confidence interval is computed.} + +\item{R}{number of bootstrap samples. Ignored if \code{interval = "none"}} + +\item{level}{numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95} + +\item{progressInfo}{logical. If TRUE, progress info is be printed while +bootstrap confidence intervals are estimated. Default is TRUE.} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} } \value{ -A list of four elements: Results contain the estimated BMD and BMDL, Boot.samples.used gives the number of boot samples that resulted in succesful estimations and were accordingly used in the estimation of BMDL (and BMDU), Interval gives BMDL and BMDU, which is identical to the confidence interval for the percentile interval approach, and modelWeights includes the estimated weights. +A list of four elements: Results contain the estimated BMD and BMDL, +Boot.samples.used gives the number of boot samples that resulted in +succesful estimations and were accordingly used in the estimation of BMDL +(and BMDU), Interval gives BMDL and BMDU, which is identical to the +confidence interval for the percentile interval approach, and modelWeights +includes the estimated weights. } -\references{ -} - -\author{ Signe M. Jensen and Jens Riis Baalkilde -} -\note{ +\description{ +Estimation of benchmark doses and benchmark dose lower limit based on the +hybrid method from a list of dose response model fits with the option to +specify a heterogeneous variance structure, where the variance depends on +the dose level and/or the fitted values } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. -\seealso{ +REFERENCES TO BE ADDED/WRITTEN } \examples{ + library(drc) library(drcData) library(bmd) @@ -112,8 +143,9 @@ bmdHetVarMA(GiantKelp.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = backg = 1, def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/bmdIso.Rd b/man/bmdIso.Rd index 464ed22..8bbf8c2 100644 --- a/man/bmdIso.Rd +++ b/man/bmdIso.Rd @@ -1,89 +1,115 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdIso.R \name{bmdIso} \alias{bmdIso} -\title{ -Benchmark dose estimation from isotonic regression -} -\description{The function monotonizes the sequence of response values based on the pool-adjacent violators algorithm and based on these use linear interpolating splines to build an isotonic regression model. From this model a benchmark dose is estimated. -} +\title{Benchmark dose estimation from isotonic regression} \usage{ -bmdIso(formula, data, type, bmr, p0, - backgType = c("modelBased", "absolute","hybridSD","hybridPercentile"), - backg = NA, def = c("excess", "additional", "relative", - "added", "hybridExc", "hybridAdd", "point"), - display = FALSE) +bmdIso( + formula, + data, + type, + bmr, + p0, + backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), + backg = NA, + def = c("excess", "additional", "relative", "added", "hybridExc", "hybridAdd", "point"), + display = FALSE +) } \arguments{ - \item{formula}{an object of class "formula" expressing the dose-response relationship. Details of model specification are given under 'Details'} - \item{data}{data frame containing the variables in the model} - \item{type}{character string specifying the type of data used in the model. "continuous", "binomial" or "Poisson"} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{p0}{background probability for hybrid definitions} - \item{backgType}{character string specifying how the background level is specified. For binomial data the options are "modelBased" and "absolute". For continuous data the options are "absolute", "hybridSD" and "hybridPercentile" - - "modelBased" - the background level is obtained from the model as the level for dose 0: - p0 = f(0) - - "absolute" - the background level is specified by the user through the backg argument: - p0 = backg for binomial response and for the "relative" and "added" definition for continuous response. - p0 = 1 - phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. - - "hybridSD" - the background risk is specified by the user in terms of number of SDs from the mean of the control group. - p0 = 1 - phi(((backg*sigma + f(0)) - f(0))/sigma) = 1 - phi(backg), - where phi is the normal distribution function and sigma is the SD for the control group. - "hybridPercentile" - the background risk is specified by the user in terms of percentile from the control group distribution (assuming a normal distribution). - p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group} - - \item{backg}{numeric value specifying the background level. Defaults to 0 for "absolute" background risk for binomial response (1 for decreasing dose-response models), 2 SD for "hybridSD" background and 0.9 for "hybridpercentile"} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "excess", "additional" and "point" are for binomial response whereas "relative", "added", "hybridExc" (excess hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous response. "relative", "extra", and "point" are for count response data. - - "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). - Works for binomial response. BMR should be between 0 and 1. - - "additional" - BMR is defined as: BMR = f(BMD) - p0. - Works for binomial response. BMR should be between 0 and 1. - - "point" - The response level for which to find BMD is directly defined through the BMR level: BMR = f(BMD). Works for binomial, count and continuous response - - "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. - Works for count and continuous response - - "added" - BMR is defined as: BMR= f(BMD) + p0. - Works for continuous response - - "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ (1- p0), - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response - - "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response} - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} -} +\item{formula}{an object of class "formula" expressing the dose-response +relationship. Details of model specification are given under 'Details'} -\details{ -Formula should be specified as in the form number/total ~ dose for binomial data. -For details about the use of isotonic regression for BMD estimation see Piegorsch et al. (20014) and Lin et al. (2015). -} -\value{ -A matrix with two columns, one containing BMD and the other containing BMDL. -} -\references{ - Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. (2014). Benchmark dose analysis via nonparametric regression modeling. Risk Analysis, 34(1), 135-151 +\item{data}{data frame containing the variables in the model} - Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric benchmark dose estimation with continuous dose-response data. Scandinavian Journal of Statistics, 42, 713-731 -} +\item{type}{character string specifying the type of data used in the model. +"continuous", "binomial" or "Poisson"} + +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{p0}{background probability for hybrid definitions} + +\item{backgType}{character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "absolute", "hybridSD" and +"hybridPercentile" + +"modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0) + +"absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative" and +"added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. + +"hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group} + +\item{backg}{numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are for +binomial response whereas "relative", "added", "hybridExc" (excess hybrid), +"hybridAdd" (additional hybrid), and "point" are for continuous response. +"relative", "extra", and "point" are for count response data. -\author{ Signe M. Jensen +"excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1. + +"additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1. + +"point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response + +"relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +continuous response + +"added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response + +"hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response + +"hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} } -\note{ +\value{ +A matrix with two columns, one containing BMD and the other +containing BMDL. } - -\seealso{ +\description{ +The function monotonizes the sequence of response values based on the +pool-adjacent violators algorithm and based on these use linear +interpolating splines to build an isotonic regression model. From this model +a benchmark dose is estimated. +} +\details{ +Formula should be specified as in the form number/total ~ dose for binomial +data. For details about the use of isotonic regression for BMD estimation +see Piegorsch et al. (20014) and Lin et al. (2015). } \examples{ + ## Data on tumor incidence in rats after exposure to formaldehyde, from Piegorsch et al. (2014) formaldehyde <- data.frame(conc = c(0.0, 0.7, 2.0, 6.0, 10.0, 15.0), tumor.incidence = c(0, 0, 0, 3, 21, 150), @@ -117,7 +143,18 @@ bmdIso(rootl ~ conc, backgType = "modelBased", def = "relative") } -\keyword{nonparametric} -\keyword{isotonic regression} +\references{ +Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. +(2014). Benchmark dose analysis via nonparametric regression modeling. Risk +Analysis, 34(1), 135-151 -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file +Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric +benchmark dose estimation with continuous dose-response data. Scandinavian +Journal of Statistics, 42, 713-731 +} +\author{ +Signe M. Jensen +} +\keyword{isotonic} +\keyword{nonparametric} +\keyword{regression} diff --git a/man/bmdIsoBoot.Rd b/man/bmdIsoBoot.Rd index 8d9521e..bdc80d0 100644 --- a/man/bmdIsoBoot.Rd +++ b/man/bmdIsoBoot.Rd @@ -1,95 +1,129 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdIsoBoot.R \name{bmdIsoBoot} \alias{bmdIsoBoot} -\title{ -Benchmark dose estimation from isotonic regression -} -\description{The function estimates BMD and BMDL using bootstrap based on isotonic regression. -} +\title{Benchmark dose estimation from isotonic regression} \usage{ -bmdIsoBoot(formula, data, type, bmr, R=1000, boot="resample", - backgType = c("modelBased", "absolute","hybridSD","hybridPercentile"), - backg=NA, def = c("excess", "additional", "relative", - "added", "hybridExc", "hybridAdd", "point")) +bmdIsoBoot( + formula, + data, + type, + bmr, + R = 1000, + boot = "resample", + backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), + backg = NA, + def = c("excess", "additional", "relative", "added", "hybridExc", "hybridAdd", "point") +) } \arguments{ - \item{formula}{an object of class "formula" expressing dose-response relationship. Details of model specification are given under 'Details'} - \item{data}{data frame containing the variables in the model} - \item{type}{character string specifying the type of data used in the model. "continuous" or "binomial" or "Poisson"} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{R}{number of bootstrap samples} - \item{boot}{character string specifying type of bootstrap used. "resample" or "pseudorandom". Only option for count data is "resample"} - \item{backgType}{character string specifying how the background level is specified. For binomial data the options are "modelBased" and "absolute". For continuous data the options are "modelBased", "absolute", "hybridSD" and "hybridPercentile" - - "modelBased" - the background level is obtained from the model as the level for dose 0: - p0 = f(0) - - "absolute" - the background level is specified by the user through the backg argument: - p0 = backg for binomial response and for the "relative" and "added" definition for continuous response. - p0 = 1 - phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. - - "hybridSD" - the background risk is specified by the user in terms of number of SDs from the mean of the control group. - p0 = 1 - phi(((backg*sigma + f(0)) - f(0))/sigma) = 1 - phi(backg), - where phi is the normal distribution function and sigma is the SD for the control group. - "hybridPercentile" - the background risk is specified by the user in terms of percentile from the control group distribution (assuming a normal distribution). - p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group} - - \item{backg}{numeric value specifying the background level. Defaults to 0 for "absolute" background risk for binomial response (1 for decreasing dose-response models), 2 SD for "hybridSD" background and 0.9 for "hybridpercentile"} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "excess", "additional" and "point" are for binomial response whereas "relative", "added", "hybridExc" (excess hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous response. "relative", "extra", and "point" are for count response data. - - "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). - Works for binomial response. BMR should be between 0 and 1. - - "additional" - BMR is defined as: BMR = f(BMD) - p0. - Works for binomial response. BMR should be between 0 and 1. - - "point" - The response level for which to find BMD is directly defined through the BMR level: BMR = f(BMD). Works for binomial, count and continuous response - - "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. - Works for count and continuous response - - "added" - BMR is defined as: BMR= f(BMD) + p0. - Works for continuous response - - "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ (1- p0), - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response - - "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response} - -} +\item{formula}{an object of class "formula" expressing dose-response +relationship. Details of model specification are given under 'Details'} -\details{ -BMD and BMDL is defined as the median and the 5th percentile in the bootstrap distribution, respectively. +\item{data}{data frame containing the variables in the model} + +\item{type}{character string specifying the type of data used in the model. +"continuous" or "binomial" or "Poisson"} + +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{R}{number of bootstrap samples} + +\item{boot}{character string specifying type of bootstrap used. "resample" +or "pseudorandom". Only option for count data is "resample"} + +\item{backgType}{character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "modelBased", "absolute", "hybridSD" and +"hybridPercentile" + +"modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0) + +"absolute" - the background level is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative" and +"added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. + +"hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group} + +\item{backg}{numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are for +binomial response whereas "relative", "added", "hybridExc" (excess hybrid), +"hybridAdd" (additional hybrid), and "point" are for continuous response. +"relative", "extra", and "point" are for count response data. + +"excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1. + +"additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1. + +"point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response -Formula should be specified as in the form number/total ~ dose for binomial data. +"relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for count and +continuous response -Bootstrapping with the argument boot = "resample" is done by sampling with replacement from the original data set. Bootstrapping with the argument boot = "pseudorandom" is done by sampling from norm(mean(Y_i),sd(Y_0)), assuming equal variance between groups, in case of continuous data. For binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the resampling always produces 0 or 1, respectively. In this case data is sampled from binom(N_i,(Y_i+1/3)/(N_i+1/3)). +"added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response -All sampling is made within dose groups. +"hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response -For details about the use of isotonic regression for BMD estimation see Piegorsch et al. (20014) and Lin et al. (2015). +"hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response} } \value{ -A matrix with two columns, one containing BMD and the other containing BMDL. +A matrix with two columns, one containing BMD and the other +containing BMDL. } -\references{ - Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. (2014). Benchmark dose analysis via nonparametric regression modeling. Risk Analysis, 34(1), 135-151 - - Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric benchmark dose estimation with continuous dose-response data. Scandinavian Journal of Statistics, 42, 713-731 +\description{ +The function estimates BMD and BMDL using bootstrap based on isotonic +regression. } +\details{ +BMD and BMDL is defined as the median and the 5th percentile in the +bootstrap distribution, respectively. -\author{ Signe M. Jensen -} -\note{ -} +Formula should be specified as in the form number/total ~ dose for binomial +data. + +Bootstrapping with the argument boot = "resample" is done by sampling with +replacement from the original data set. Bootstrapping with the argument boot += "pseudorandom" is done by sampling from norm(mean(Y_i),sd(Y_0)), assuming +equal variance between groups, in case of continuous data. For binomial +data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). In case of +Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the resampling always +produces 0 or 1, respectively. In this case data is sampled from +binom(N_i,(Y_i+1/3)/(N_i+1/3)). -\seealso{ +All sampling is made within dose groups. + +For details about the use of isotonic regression for BMD estimation see +Piegorsch et al. (20014) and Lin et al. (2015). } \examples{ + ## Data on tumor incidence in rats after exposure to formaldehyde, from Piegorsch et al. (2014) formaldehyde <- data.frame(conc = c(0.0, 0.7, 2.0, 6.0, 10.0, 15.0), tumor.incidence = c(0, 0, 0, 3, 21, 150), @@ -120,9 +154,21 @@ bmdIsoBoot(rootl ~ conc, bmr=0.05, backgType = "modelBased", def = "relative", R = 100) + } -\keyword{nonparametric} -\keyword{isotonic regression} -\keyword{bootstrap} +\references{ +Piegorsch, W. W., Xiong, H., Bhattacharya, R. N., & Lin, L. +(2014). Benchmark dose analysis via nonparametric regression modeling. Risk +Analysis, 34(1), 135-151 -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file +Lin, L., Piegorsch, W. W. and Bhattacharya R. (2015). Nonparametric +benchmark dose estimation with continuous dose-response data. Scandinavian +Journal of Statistics, 42, 713-731 +} +\author{ +Signe M. Jensen +} +\keyword{bootstrap} +\keyword{isotonic} +\keyword{nonparametric} +\keyword{regression} diff --git a/man/bmdMA.Rd b/man/bmdMA.Rd index 8670152..f9d9f8d 100644 --- a/man/bmdMA.Rd +++ b/man/bmdMA.Rd @@ -1,150 +1,204 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdMA.R \name{bmdMA} \alias{bmdMA} -\title{ -Model-averaged benchmark dose estimation -} -\description{Estimation of benchmark doses and benchmark dose lower limit based on model averaging from a user-defined list of dose response model fits -} +\title{Model-averaged benchmark dose estimation} \usage{ -bmdMA(modelList, modelWeights, bmr, - backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), - backg = NA, def = c("excess", "additional", "relative", "extra", - "added", "hybridExc", "hybridAdd", "point"), - respTrans = c("none", "log", "sqrt"), - interval = c("delta","sandwich","inv", "profile"), - type = c("curve","bootstrap","Kang","Buckland"), - bootstrapType = c("nonparametric", "parametric"), R=1000, - bootInterval = "percentile", level=0.95, stackingSeed, - stackingSplits, display = TRUE, progressInfo = TRUE) +bmdMA( + modelList, + modelWeights, + bmr, + backgType = c("modelBased", "absolute", "hybridSD", "hybridPercentile"), + backg = NA, + def = c("excess", "additional", "relative", "extra", "added", "hybridExc", "hybridAdd", + "point"), + respTrans = c("none", "log", "sqrt"), + interval = c("delta", "sandwich", "inv", "profile"), + type = c("curve", "bootstrap", "Kang", "Buckland"), + bootstrapType = c("nonparametric", "parametric"), + R = 1000, + bootInterval = "percentile", + level = 0.95, + stackingSeed = NULL, + stackingSplits = 2, + display = TRUE, + progressInfo = TRUE +) } \arguments{ - \item{modelList}{list of models of class \code{drc}} - \item{modelWeights}{character string specifying the type of weights used, "AIC", "BIC" or "Stack" (Baalkilde, J. R., Hansen, N. R., and Jensen, S. M., 2025), or a vector of the same length as the modelList with user defined weights} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{backgType}{character string specifying how the background level is specified. For binomial data the options are "modelBased" and "absolute". For continuous data the options are "absolute", "hybridSD" and "hybridPercentile" - - "modelBased" - the background risk is obtained from the model as the risk for dose 0: - p0 = f(0) - - "absolute" - the background risk is specified by the user through the backg argument: - p0 = backg for binomial response and for the "relative", "extra" and "added" definition for continuous response. - p0 = 1 - phi((back - f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. - - "hybridSD" - the background risk is specified by the user in terms of number of SDs from the mean of the control group. - p0 = 1 - phi(((backg*sigma + f(0)) - f(0))/sigma) = 1 - phi(backg), - where phi is the normal distribution function and sigma is the SD for the control group. - "hybridPercentile" - the background risk is specified by the user in terms of percentile from the control group distribution (assuming a normal distribution). - p0 = 1 - phi((x0 - f(0))/sigma) = 1 - backg. - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group} - - \item{backg}{numeric value specifying the background level. Defaults to 0 for "absolute" background risk for binomial response (1 for decreasing dose-response models), 2 SD for "hybridSD" background and 0.9 for "hybridpercentile"} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "excess" , "additional" and "point" are for binomial response whereas "relative", "extra", "added", "hybridExc" (excess hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous response - - "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). - Works for binomial response. BMR should be between 0 and 1. - - "additional" - BMR is defined as: BMR = f(BMD) - p0. - Works for binomial response. BMR should be between 0 and 1. - - "point" - The response level for which to find BMD is directly defined through the BMR level: BMR = f(BMD). Works for both binomial and continuous response - - "relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. - Works for continuous response - - "extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). - Works for continuous response - - "added" - BMR is defined as: BMR= f(BMD) + p0. - Works for continuous response - - "hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ (1- p0), - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response - - "hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, - where x0 is the level for which the response is considered adverse, phi is the normal distribution function and sigma is the SD for the control group. - Works for continuous response} - - \item{respTrans}{if the dose-response model is fitted with a transformed response, specifying this option ensures that the background level for the BMD is computed on the original scale. - Options include "none" (default), "log" (natural logarithm) and "sqrt"(square root).} - - \item{interval}{character string specifying the type of confidence interval to use for the individual models (no effect when type = "bootstrap" or "curve"): "delta" (default), "sandwich", "inv" or "profile" - - "delta" - BMDL is based on the lower limit of a Wald confidence interval based on the delta method - - "sandwich" - BMDL is based on the lower limit of a Wald confidence interval based on the delta method where the sandwich covariance matrix is used - - "inv" - BMDL is based on inverse regression, that is the dose associated with the upper limit of the point wise confidence interval of the dose-response curve. Not possible if type = "Buckland" - - "profile" - BMDL is based on the lower limit of a profile likelihood confidence interval. Not possible if type = "Buckland"} - - \item{type}{character string specifying how to estimate BMD and BMDL: "curve", "bootstrap", "Kang" or "Buckland" - - "curve" - - - "bootstrap" - - - "Kang" - - - "Buckland" - - } - - \item{bootstrapType}{character string indicating type of bootstrap sampling to be used if type="bootstrap" or "curve". "nonparametric" (default), or "parametric" (see details)} - - \item{bootInterval}{character string indicating how to estimate the bootstrap confidence intervals used to find BMDL type="bootstrap". "percentile" (default) or "BCa" (Bias corrected and adjusted)} - - \item{R}{number of bootstrap samples to use. Default is 1000} - - \item{level}{numeric value specifying the level of the confidence interval underlying BMDL. Default is 0.95. Note that the full CI is also computed. The full CI has level 1-2*(1-level)} - - \item{stackingSeed}{integer or NULL: Random seed to use in the data split in the estimation of the Stacking Weights when \code{modelWeights = "Stack"}. The global seed is reset to the initial value after estimation of the weights, so this option does not interfere with a globally set seed.} - - \item{stackingSplits}{integer or "LOO": When \code{modelWeights = "Stack"}, the Stacking Weights are estimated, which are based on V-fold cross-validation. The stackingSplits argument sets the number V of data splits used in the cross validation. The "LOO" (Leave one out) is a shortcut to setting V equal to the number of observations in the data set. } - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} - - \item{progressInfo}{logical. If TRUE, a progressbar is shown when computing bootstrap confidence intervals.} - -} +\item{modelList}{list of models of class \code{drc}} -\details{ -This package project is still under development. The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response model based on the available - definitions of the benchmark dose concepts. - - Details on the implemented definitions and methods can be found in Crump (2002) - - Bootstrapping with the argument boot = "nonparametric" is done by sampling with replacement from the original data set. Bootstrapping with the argument boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), assuming equal variance between groups, in case of continuous data. For binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the resampling always produces 0 or 1, respectively. In this case data is sampled from binom(N_i,(Y_i+1/3)/(N_i+1/3)). - -All sampling is made within dose groups. +\item{modelWeights}{character string specifying the type of weights used, +"AIC", "BIC" or "Stack" (Baalkilde, J. R., Hansen, N. R., and Jensen, S. M., +2025), or a vector of the same length as the modelList with user defined +weights} + +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{backgType}{character string specifying how the background level is +specified. For binomial data the options are "modelBased" and "absolute". +For continuous data the options are "absolute", "hybridSD" and +"hybridPercentile" + +"modelBased" - the background risk is obtained from the model as the risk +for dose 0: p0 = f(0) + +"absolute" - the background risk is specified by the user through the backg +argument: p0 = backg for binomial response and for the "relative", "extra" +and "added" definition for continuous response. p0 = 1 - phi((back - +f(0))/sigma) for "hybridExc" and "hybridAdd" definitions. + +"hybridSD" - the background risk is specified by the user in terms of number +of SDs from the mean of the control group. p0 = 1 - phi(((backg*sigma + +f(0)) - f(0))/sigma) = 1 - phi(backg), where phi is the normal distribution +function and sigma is the SD for the control group. "hybridPercentile" - +the background risk is specified by the user in terms of percentile from the +control group distribution (assuming a normal distribution). p0 = 1 - +phi((x0 - f(0))/sigma) = 1 - backg. where x0 is the level for which the +response is considered adverse, phi is the normal distribution function and +sigma is the SD for the control group} + +\item{backg}{numeric value specifying the background level. Defaults to 0 +for "absolute" background risk for binomial response (1 for decreasing +dose-response models), 2 SD for "hybridSD" background and 0.9 for +"hybridpercentile"} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "excess" , "additional" and "point" are for +binomial response whereas "relative", "extra", "added", "hybridExc" (excess +hybrid), "hybridAdd" (additional hybrid), and "point" are for continuous +response + +"excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1. + +"additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1. + +"point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for both binomial and continuous +response + +"relative" - BMR is defined as: BMR = (f(BMD) - p0)/p0. Works for +continuous response + +"extra" - BMR is defined as: BMR = (f(BMD) - p0)/(f(Inf) - p0). Works for +continuous response + +"added" - BMR is defined as: BMR= f(BMD) + p0. Works for continuous +response + +"hybridExc" - BMR is defined as: BMR = (1 - phi((x0 - f(BMD))/sigma) - p0)/ +(1- p0), where x0 is the level for which the response is considered adverse, +phi is the normal distribution function and sigma is the SD for the control +group. Works for continuous response + +"hybridAdd" - BMR is defined as: BMR = 1 - phi((x0 - f(BMD))/sigma) - p0, +where x0 is the level for which the response is considered adverse, phi is +the normal distribution function and sigma is the SD for the control group. +Works for continuous response} + +\item{respTrans}{if the dose-response model is fitted with a transformed +response, specifying this option ensures that the background level for the +BMD is computed on the original scale. Options include "none" (default), +"log" (natural logarithm) and "sqrt"(square root).} + +\item{interval}{character string specifying the type of confidence interval +to use for the individual models (no effect when type = "bootstrap" or +"curve"): "delta" (default), "sandwich", "inv" or "profile" + +"delta" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method + +"sandwich" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method where the sandwich covariance matrix is used + +"inv" - BMDL is based on inverse regression, that is the dose associated +with the upper limit of the point wise confidence interval of the +dose-response curve. Not possible if type = "Buckland" + +"profile" - BMDL is based on the lower limit of a profile likelihood +confidence interval. Not possible if type = "Buckland"} + +\item{type}{character string specifying how to estimate BMD and BMDL: +"curve", "bootstrap", "Kang" or "Buckland" + +"curve" - + +"bootstrap" - + +"Kang" - + +"Buckland" -} + +\item{bootstrapType}{character string indicating type of bootstrap sampling +to be used if type="bootstrap" or "curve". "nonparametric" (default), or +"parametric" (see details)} + +\item{R}{number of bootstrap samples to use. Default is 1000} + +\item{bootInterval}{character string indicating how to estimate the +bootstrap confidence intervals used to find BMDL type="bootstrap". +"percentile" (default) or "BCa" (Bias corrected and adjusted)} + +\item{level}{numeric value specifying the level of the confidence interval +underlying BMDL. Default is 0.95. Note that the full CI is also computed. +The full CI has level 1-2*(1-level)} + +\item{stackingSeed}{integer or NULL: Random seed to use in the data split in +the estimation of the Stacking Weights when \code{modelWeights = "Stack"}. +The global seed is reset to the initial value after estimation of the +weights, so this option does not interfere with a globally set seed.} + +\item{stackingSplits}{integer or "LOO": When \code{modelWeights = "Stack"}, +the Stacking Weights are estimated, which are based on V-fold +cross-validation. The stackingSplits argument sets the number V of data +splits used in the cross validation. The "LOO" (Leave one out) is a shortcut +to setting V equal to the number of observations in the data set.} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} + +\item{progressInfo}{logical. If TRUE, a progressbar is shown when computing +bootstrap confidence intervals.} } \value{ -A list of five elements: Results contain the estimated BMD and BMDL, Boot.samples.used gives the number of boot samples that resulted in succesful estimations and were accordingly used in the estimation of BMDL (and BMDU), Interval gives BMDL and BMDU, which is identical to the confidence interval for the percentile interval approach, SE gives the estimated SE for the "Buckland" method, and modelWeights includes the estimated weights. +A list of five elements: Results contain the estimated BMD and BMDL, +Boot.samples.used gives the number of boot samples that resulted in +succesful estimations and were accordingly used in the estimation of BMDL +(and BMDU), Interval gives BMDL and BMDU, which is identical to the +confidence interval for the percentile interval approach, SE gives the +estimated SE for the "Buckland" method, and modelWeights includes the +estimated weights. } -\references{ - Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) - Benchmark Dose Calculation from Epidemiological Data, - \emph{Biometrics} \bold{57}, 698--706. - - Crump, K. (2002) - Critical Issues in Benchmark Calculations from Continuous Data, - \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. - - Baalkilde, J. R., Hansen, N. R., and Jensen, S. M. (2025) - Stacking Weights and Model Space Selection in Frequentist Model Averaging for Benchmark Dose Estimation, - \emph{Environmetrics} \bold{36(2)}, e70002. +\description{ +Estimation of benchmark doses and benchmark dose lower limit based on model +averaging from a user-defined list of dose response model fits } +\details{ +This package project is still under development. The aim to provide an R +package calculating the benchmark dose (BMD) and the lower limit of the +corresponding 95\\% confidence interval (BMDL) for continuous and quantal +dose-response data for a range of dose-response model based on the available +definitions of the benchmark dose concepts. -\author{ Signe M. Jensen and Jens Riis Baalkilde -} -\note{ -} +Details on the implemented definitions and methods can be found in Crump +(2002) -\seealso{ +Bootstrapping with the argument boot = "nonparametric" is done by sampling +with replacement from the original data set. Bootstrapping with the argument +boot = "parametric" is done by sampling from norm(mean(Y_i),sd(Y_0)), +assuming equal variance between groups, in case of continuous data. For +binomial data, each bootstrap data set is sampled from binom(N_i,Y_i/N_i). +In case of Y_i = 0 or Y_i = N_i shrinkage is used to avoid that the +resampling always produces 0 or 1, respectively. In this case data is +sampled from binom(N_i,(Y_i+1/3)/(N_i+1/3)). + +All sampling is made within dose groups. } \examples{ + library(drc) library(drcData) @@ -155,13 +209,13 @@ deguelin.m3 <- drm(r/n~dose, weights=n, data=deguelin, fct=W2.2(), type="binomia deguelin.m4 <- drm(r/n~dose, weights=n, data=deguelin, fct=LN.2(), type="binomial") -## Model averaged BMD for 5% additional risk with estimated background risk +## Model averaged BMD for 5\% additional risk with estimated background risk ## and BMDL based on Buckland et al. bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, backgType = "modelBased", def = "additional", type = "Buckland") -## Model averaged BMD for 5% additional risk with estimated background risk +## Model averaged BMD for 5\% additional risk with estimated background risk ## and BMDL based on an average of the model curves bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, backgType = "modelBased", def = "additional", @@ -174,7 +228,7 @@ ryegrass.m2<-drm(rootl~conc, data=ryegrass, fct=W1.4()) ryegrass.m3<-drm(rootl~conc, data=ryegrass, fct=W2.4()) ryegrass.m4<-drm(rootl~conc, data=ryegrass, fct=LN.4()) -## Model-averaged BMD and bootstrap BMDL for bmr=5% and using the hybrid approach +## Model-averaged BMD and bootstrap BMDL for bmr=5\% and using the hybrid approach ## to estimate the background risk. bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="AIC", bmr=0.05, backgType = "hybridSD", def = "hybridAdd", type = "bootstrap", @@ -186,9 +240,24 @@ bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="Stack backgType = "hybridSD", def = "hybridAdd", type = "bootstrap", bootstrapType = "nonparametric", bootInterval = "percentile", R = 50) + } -\keyword{model averaging} -\keyword{nonlinear} -\keyword{bootstrap} +\references{ +Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +\bold{57}, 698--706. + +Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. -\concept{BMD BMDL benchmark dose-response model averaging} \ No newline at end of file +Baalkilde, J. R., Hansen, N. R., and Jensen, S. M. (2025) Stacking Weights +and Model Space Selection in Frequentist Model Averaging for Benchmark Dose +Estimation, \emph{Environmetrics} \bold{36(2)}, e70002. +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde +} +\keyword{averaging} +\keyword{bootstrap} +\keyword{model} +\keyword{nonlinear} diff --git a/man/bmdMACurve.Rd b/man/bmdMACurve.Rd index ec58447..9e446d9 100644 --- a/man/bmdMACurve.Rd +++ b/man/bmdMACurve.Rd @@ -1,5 +1,116 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdMACurve.R \name{bmdMACurve} \alias{bmdMACurve} -\title{ -Help funtion to bmdMA +\title{Calculate Model-Averaged BMD Curve, helper to bmdMA} +\usage{ +bmdMACurve(modelList, modelWeights, bmrScaled0, searchInterval = "dataBased") +} +\arguments{ +\item{modelList}{list; A list of fitted dose-response models from which to compute +the model average. Each model should be a fitted object with components +including \code{fct}, \code{parmMat}, \code{dataList}, etc.} + +\item{modelWeights}{numeric vector; Weights for model averaging, typically derived +from model selection criteria (e.g., AIC weights). Must sum to 1 and have +the same length as \code{modelList}} + +\item{bmrScaled0}{numeric; The benchmark response level(s) for which to calculate +BMD. For single curves, a scalar value; for multiple curves, a vector with +length equal to the number of curves} + +\item{searchInterval}{character or numeric; Search interval for root finding. +If "dataBased" (default), uses data range with small lower bound adjustment. +If numeric, should be a vector of length 2 for single curves, or a matrix +with 2 columns for multiple curves specifying \verb{[lower, upper]} bounds} +} +\value{ +An object of class "bmd" containing: +\itemize{ +\item \strong{Results}: A matrix with BMD values. For single curves, a 1x1 matrix; +for multiple curves, an nx1 matrix where n is the number of curves +\item \strong{MACurve}: The model-averaged function used for BMD calculation. +For single curves, returns the combined function; for multiple curves, returns NULL +} +} +\description{ +Helper function for \code{bmdMA} that computes Benchmark Dose (BMD) values using +model averaging. The function creates a weighted average of multiple dose-response +models and finds the dose corresponding to a specified benchmark response level. +} +\details{ +The function handles two scenarios: + +\strong{Single Curve Analysis:} +Creates a weighted combination of model functions: +\deqn{f_{MA}(x) = \sum_{i=1}^{m} w_i \cdot f_i(x)}{f_MA(x) = sum of w_i * f_i(x)} +where \eqn{w_i}{w_i} are model weights and \eqn{f_i(x)}{f_i(x)} are individual model functions. + +\strong{Multiple Curve Analysis:} +Computes BMD separately for each curve using the same model averaging approach +but applied to curve-specific data and parameters. + +The BMD is found by solving: +\deqn{f_{MA}(BMD) = BMR}{f_MA(BMD) = BMR} +using root finding algorithms. + +\strong{Model Function Construction:} +The function dynamically constructs model functions by: +\itemize{ +\item Extracting function templates from \code{mtList()} +\item Substituting fixed parameters and estimated coefficients +\item Handling special cases like Fractional Polynomial models +\item Creating weighted combinations of all models +} +} +\note{ +This is primarily an internal helper function for \code{bmdMA}. Direct usage requires +properly formatted model lists and weights. The function assumes all models in +\code{modelList} are compatible and fitted to the same dataset structure. +} +\section{Search Interval}{ + +When \code{searchInterval = "dataBased"}: +\itemize{ +\item Lower bound: Second smallest dose value divided by 10,000 +\item Upper bound: Maximum dose value in the dataset +} + +Custom intervals can be provided to avoid convergence issues or focus on +specific dose ranges of interest. +} + +\section{Model Support}{ + +The function supports various dose-response models including: +\itemize{ +\item Standard 4-parameter and 5-parameter models +\item Fractional Polynomial models (special handling) +\item Models with fixed parameters +} +} + +\examples{ +\dontrun{ +# Typically called internally by bmdMA, but can be used directly: + +# Assume you have a list of fitted models and weights +models <- list(model1, model2, model3) # fitted drc models +weights <- c(0.5, 0.3, 0.2) # AIC weights +bmr <- 0.1 # 10\% benchmark response + +# Calculate model-averaged BMD +result <- bmdMACurve(models, weights, bmr) + +# Extract BMD value +bmd_value <- result$Results[1, 1] + +# Use the averaged curve function +curve_function <- result$MACurve +} + +} +\seealso{ +\code{\link{bmdMA}} for the main model averaging function, +\code{\link{uniroot}} for the root finding algorithm used internally } diff --git a/man/bmdOrdinal.Rd b/man/bmdOrdinal.Rd index 328abfe..b54ad74 100644 --- a/man/bmdOrdinal.Rd +++ b/man/bmdOrdinal.Rd @@ -1,103 +1,126 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdOrdinal.R \name{bmdOrdinal} \alias{bmdOrdinal} -\title{ -Benchmark dose estimation for ordinal dose-response models -} -\description{Estimation of benchmark doses and benchmark dose lower limit from ordinal dose response model fits -} +\title{Benchmark dose estimation for ordinal dose-response models} \usage{ -bmdOrdinal(object, bmr, backgType = c("modelBased", "absolute"), backg = NA, - def = c("excess", "additional", "point"), - interval = c("delta", "sandwich", "profile", "bootstrap"), level = 0.95, - R = 500, bootType = c("nonparametric", "parametric", "model", "hierarchical"), - display = TRUE, progressInfo = TRUE) +bmdOrdinal( + object, + bmr, + backgType = c("modelBased", "absolute"), + backg = NA, + def = c("excess", "additional", "point"), + interval = c("delta", "sandwich", "profile", "bootstrap"), + level = 0.95, + R = 500, + bootType = c("nonparametric", "parametric", "model", "hierarchical"), + display = TRUE, + progressInfo = TRUE +) } \arguments{ - \item{object}{object of class \code{drcOrdinal}} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{backgType}{character string specifying how the background level is specified. The options are "modelBased" and "absolute". - - "modelBased" - the background level is obtained from the model as the level for dose 0: - p0 = f(0) - - "absolute" - the background level is specified by the user through the backg argument.} - - \item{backg}{numeric value specifying the background level. Defaults to 0 for "absolute" background risk.} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "excess", "additional" and "point" are available for ordinal response. - - "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). - Works for binomial response. BMR should be between 0 and 1. - - "additional" - BMR is defined as: BMR = f(BMD) - p0. - Works for binomial response. BMR should be between 0 and 1. - - "point" - The response level for which to find BMD is directly defined through the BMR level: BMR = f(BMD). Works for binomial, count and continuous response data.} - - \item{interval}{character string specifying the type of confidence interval to use: "delta" (default), "sandwich", "profile" or "bootstrap" - - "delta" - BMDL is based on the lower limit of a Wald confidence interval based on the delta method - - "sandwich" - BMDL is based on the lower limit of a Wald confidence interval based on the delta method, where the sandwich covariance matrix is used - - "bootstrap" - BMDL is based on bmd estimates on resampled data sets. The type of bootstrap applied can be specified by the "bootType" argument. Default is "nonparametric". - - "none" - No confidence interval is computed.} - - \item{level}{numeric value specifying the levle of the confidence interval underlying BMDL. Default is 0.95} - - \item{R}{integer specifying the number of data sets resampled from the original data set when computing the confidence interval by bootstrap.} - - \item{bootType}{character string specifying the resampling procedure for the data sets used for bootstrap. - - "nonparametric" - Bootstrapping is done by sampling with replacement from the original data set. - - "parametric" - Bootstrapping is done by sampling from a multinomial distribution with probabilites given by the number of observations for each level. If all observations for one group are in the same level, shrinkage is used to avoid that the resampling always produces that particular level. In this case data is sampled from a multinomial distribution with probabilities (1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + 1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the particular group, and |K| is the number of levels. - - "model" - New data sets are resampled from the fitted model. - - "hierarchical" - If the experiment design is hierarchical (i.e. observations are grouped according to a categorical variable, for instance litter), a special resampling procedure is suggested (Blessinger 2020) - - All resampling is done within the dose values. - } - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} - - \item{progressInfo}{logical. If TRUE, a progressbar is displayed when calculating bootstrap confidence intervals} -} +\item{object}{object of class \code{drcOrdinal}} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous, quantal, quantal and ordinal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - Details on the implemented definitions and methods can be found in Crump (2002) +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{backgType}{character string specifying how the background level is +specified. The options are "modelBased" and "absolute". + +"modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0) + +"absolute" - the background level is specified by the user through the backg +argument.} + +\item{backg}{numeric value specifying the background level. Defaults to 0 +for "absolute" background risk.} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are available +for ordinal response. + +"excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1. + +"additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1. + +"point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response data.} + +\item{interval}{character string specifying the type of confidence interval +to use: "delta" (default), "sandwich", "profile" or "bootstrap" + +"delta" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method + +"sandwich" - BMDL is based on the lower limit of a Wald confidence interval +based on the delta method, where the sandwich covariance matrix is used + +"bootstrap" - BMDL is based on bmd estimates on resampled data sets. The +type of bootstrap applied can be specified by the "bootType" argument. +Default is "nonparametric". + +"none" - No confidence interval is computed.} + +\item{level}{numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95} + +\item{R}{integer specifying the number of data sets resampled from the +original data set when computing the confidence interval by bootstrap.} + +\item{bootType}{character string specifying the resampling procedure for the +data sets used for bootstrap. + +"nonparametric" - Bootstrapping is done by sampling with replacement from +the original data set. + +"parametric" - Bootstrapping is done by sampling from a multinomial +distribution with probabilites given by the number of observations for each +level. If all observations for one group are in the same level, shrinkage is +used to avoid that the resampling always produces that particular level. In +this case data is sampled from a multinomial distribution with probabilities +(1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + +1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the +particular group, and |K| is the number of levels. + +"model" - New data sets are resampled from the fitted model. + +"hierarchical" - If the experiment design is hierarchical (i.e. observations +are grouped according to a categorical variable, for instance litter), a +special resampling procedure is suggested (Blessinger 2020) + +All resampling is done within the dose values.} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} + +\item{progressInfo}{logical. If TRUE, a progressbar is displayed when +calculating bootstrap confidence intervals} } \value{ -A list of four elements: Results contain the estimated BMD and BMDL, interval gives the lower (BMDL) and upper (BMDU) end of the confidence interval of BMD. -} -\references{ - Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) - Benchmark Dose Calculation from Epidemiological Data, - \emph{Biometrics} \bold{57}, 698--706. - - Crump, K. (2002) - Critical Issues in Benchmark Calculations from Continuous Data, - \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. - - Blessinger, T. D., Euling, S. Y., Wang, L., Hogan, K. A., Cai, C., Klinefelter, G., Saillenfait, A.M. (2020) - \emph{Environment International} \bold{134} -} - -\author{ Signe M. Jensen and Jens Riis Baalkilde +A list of four elements: Results contain the estimated BMD and BMDL, +interval gives the lower (BMDL) and upper (BMDU) end of the confidence +interval of BMD. } -\note{ +\description{ +Estimation of benchmark doses and benchmark dose lower limit from ordinal +dose response model fits } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous, quantal, quantal and ordinal dose-response data for a range of +dose-response models based on the available definitions of the benchmark +dose concepts. -\seealso{ +Details on the implemented definitions and methods can be found in Crump +(2002) } \examples{ + library(drc) library(drcData) data(guthion) @@ -107,8 +130,22 @@ guthionS <- subset(guthion, trt == "S") guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), weights = "total", dose = "dose", data = guthionS, fct = LL.2()) bmdOrdinal(guthionS.LL, bmr = 0.1, backgType = "modelBased", def = "excess", R = 50) + +} +\references{ +Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +\bold{57}, 698--706. + +Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. + +Blessinger, T. D., Euling, S. Y., Wang, L., Hogan, K. A., Cai, C., +Klinefelter, G., Saillenfait, A.M. (2020) \emph{Environment International} +\bold{134} +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/bmdOrdinalMA.Rd b/man/bmdOrdinalMA.Rd index 6a1fe77..6388b67 100644 --- a/man/bmdOrdinalMA.Rd +++ b/man/bmdOrdinalMA.Rd @@ -1,90 +1,115 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bmdOrdinalMA.R \name{bmdOrdinalMA} \alias{bmdOrdinalMA} -\title{ -Benchmark dose estimation for ordinal dose-response models -} -\description{Estimation of benchmark doses and benchmark dose lower limit based on model averaging from a user-defined list of ordinal dose-response model fits -} +\title{Benchmark dose estimation for ordinal dose-response models} \usage{ -bmdOrdinalMA(modelList, modelWeights = c("AIC", "BIC"), bmr, - backgType = c("modelBased", "absolute"), backg = NA, - def=c("excess", "additional", "point"), type = c("bootstrap", "Kang"), - level = 0.95, R = 500, - bootType = c("nonparametric", "parametric"), - display = TRUE, progressInfo = TRUE) +bmdOrdinalMA( + modelList, + modelWeights = c("AIC", "BIC"), + bmr, + backgType = c("modelBased", "absolute"), + backg = NA, + def = c("excess", "additional", "point"), + type = c("bootstrap", "Kang"), + level = 0.95, + R = 500, + bootType = c("nonparametric", "parametric"), + display = TRUE, + progressInfo = TRUE +) } \arguments{ - \item{modelList}{A list of ordinal dose-response models of class \code{drcOrdinal}} - \item{modelWeights}{character string specifying the type of weights used, "AIC" or "BIC", or a numeric vector of the same length as the modelList with user defined weights} - \item{bmr}{numeric value of benchmark response level for which to calculate the benchmark dose} - \item{backgType}{character string specifying how the background level is specified. The options are "modelBased" and "absolute". - - "modelBased" - the background level is obtained from the model as the level for dose 0: - p0 = f(0) - - "absolute" - the background level is specified by the user through the backg argument.} - - \item{backg}{numeric value specifying the background level. Defaults to 0 for "absolute" background risk.} - - \item{def}{character string specifying the definition of the benchmark dose to use in the calculations. "excess", "additional" and "point" are available for ordinal response. - - "excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). - Works for binomial response. BMR should be between 0 and 1. - - "additional" - BMR is defined as: BMR = f(BMD) - p0. - Works for binomial response. BMR should be between 0 and 1. - - "point" - The response level for which to find BMD is directly defined through the BMR level: BMR = f(BMD). Works for binomial, count and continuous response data.} - - \item{type}{specify the model averaging type used for the confidence intervals. Options are "Kang" (confidence intervals computed as weighted averages of individual confidence intervals) and "bootstrap"} - - \item{level}{numeric value specifying the levle of the confidence interval underlying BMDL. Default is 0.95} - - \item{R}{integer specifying the number of data sets resampled from the original data set when computing the confidence interval by bootstrap.} - - \item{bootType}{character string specifying the resampling procedure for the data sets used for bootstrap. - - "nonparametric" - Bootstrapping is done by sampling with replacement from the original data set. - - "parametric" - Bootstrapping is done by sampling from a multinomial distribution with probabilites given by the number of observations for each level. If all observations for one group are in the same level, shrinkage is used to avoid that the resampling always produces that particular level. In this case data is sampled from a multinomial distribution with probabilities (1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + 1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the particular group, and |K| is the number of levels. - - All resampling is done within the dose values. - } - - \item{display}{logical. If TRUE the results are displayed; otherwise they are not} - - \item{progressInfo}{logical. If TRUE, a progressbar is displayed when calculating bootstrap confidence intervals} -} +\item{modelList}{A list of ordinal dose-response models of class +\code{drcOrdinal}} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous, quantal, quantal and ordinal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - Details on the implemented definitions and methods can be found in Crump (2002) -} -\value{ -A list of four elements: Results contain the estimated BMD and BMDL, interval gives the lower (BMDL) and upper (BMDU) end of the confidence interval of BMD. -} -\references{ - Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) - Benchmark Dose Calculation from Epidemiological Data, - \emph{Biometrics} \bold{57}, 698--706. +\item{modelWeights}{character string specifying the type of weights used, +"AIC" or "BIC", or a numeric vector of the same length as the modelList with +user defined weights} - Crump, K. (2002) - Critical Issues in Benchmark Calculations from Continuous Data, - \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. -} +\item{bmr}{numeric value of benchmark response level for which to calculate +the benchmark dose} + +\item{backgType}{character string specifying how the background level is +specified. The options are "modelBased" and "absolute". + +"modelBased" - the background level is obtained from the model as the level +for dose 0: p0 = f(0) + +"absolute" - the background level is specified by the user through the backg +argument.} + +\item{backg}{numeric value specifying the background level. Defaults to 0 +for "absolute" background risk.} + +\item{def}{character string specifying the definition of the benchmark dose +to use in the calculations. "excess", "additional" and "point" are available +for ordinal response. + +"excess" - BMR is defined as: BMR = (f(BMD) - p0)/(1 - p0). Works for +binomial response. BMR should be between 0 and 1. + +"additional" - BMR is defined as: BMR = f(BMD) - p0. Works for binomial +response. BMR should be between 0 and 1. + +"point" - The response level for which to find BMD is directly defined +through the BMR level: BMR = f(BMD). Works for binomial, count and +continuous response data.} -\author{ Signe M. Jensen and Jens Riis Baalkilde +\item{type}{specify the model averaging type used for the confidence +intervals. Options are "Kang" (confidence intervals computed as weighted +averages of individual confidence intervals) and "bootstrap"} + +\item{level}{numeric value specifying the levle of the confidence interval +underlying BMDL. Default is 0.95} + +\item{R}{integer specifying the number of data sets resampled from the +original data set when computing the confidence interval by bootstrap.} + +\item{bootType}{character string specifying the resampling procedure for the +data sets used for bootstrap. + +"nonparametric" - Bootstrapping is done by sampling with replacement from +the original data set. + +"parametric" - Bootstrapping is done by sampling from a multinomial +distribution with probabilites given by the number of observations for each +level. If all observations for one group are in the same level, shrinkage is +used to avoid that the resampling always produces that particular level. In +this case data is sampled from a multinomial distribution with probabilities +(1/|K|^2)/(N_i + 1/|K|) for the levels with 0 observations, and (N_i + +1/|K|^2)/(N_i + 1/|K|), where N_i is the number of observatiions for the +particular group, and |K| is the number of levels. + +All resampling is done within the dose values.} + +\item{display}{logical. If TRUE the results are displayed; otherwise they +are not} + +\item{progressInfo}{logical. If TRUE, a progressbar is displayed when +calculating bootstrap confidence intervals} } -\note{ +\value{ +A list of four elements: Results contain the estimated BMD and BMDL, +interval gives the lower (BMDL) and upper (BMDU) end of the confidence +interval of BMD. } +\description{ +Estimation of benchmark doses and benchmark dose lower limit based on model +averaging from a user-defined list of ordinal dose-response model fits +} +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous, quantal, quantal and ordinal dose-response data for a range of +dose-response models based on the available definitions of the benchmark +dose concepts. -\seealso{ +Details on the implemented definitions and methods can be found in Crump +(2002) } \examples{ + library(drc) library(drcData) data(guthion) @@ -107,7 +132,16 @@ bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), modelWeights = "AIC", bmr = 0.1, backgType = "modelBased", def = "excess", type = "bootstrap", R = 50) } +\references{ +Budtz-Jorgensen, E., Keiding, N., and Grandjean, P. (2001) +Benchmark Dose Calculation from Epidemiological Data, \emph{Biometrics} +\bold{57}, 698--706. + +Crump, K. (2002) Critical Issues in Benchmark Calculations from Continuous +Data, \emph{Critical Reviews in Toxicology} \bold{32}, 133--153. +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde +} \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/bootDataGen.Rd b/man/bootDataGen.Rd index 155bf2c..8f55b20 100644 --- a/man/bootDataGen.Rd +++ b/man/bootDataGen.Rd @@ -1,5 +1,134 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bootDataGen.R \name{bootDataGen} \alias{bootDataGen} -\title{ -Help funtion to bmdBoot +\title{Generate Bootstrap Data for BMD Analysis} +\usage{ +bootDataGen(object, R = 1000, bootType = "nonparametric", aggregated = TRUE) +} +\arguments{ +\item{object}{A fitted dose-response model object (typically from \code{drm()}) +containing the original data and model specifications} + +\item{R}{integer; Number of bootstrap replicates to generate (default: 1000)} + +\item{bootType}{character; Type of bootstrap resampling method. Options are: +\itemize{ +\item \code{"nonparametric"}: Resamples observations within dose groups +\item \code{"parametric"}: Generates new data from fitted distributions +\item \code{"semiparametric"}: Uses fitted values plus resampled residuals +}} + +\item{aggregated}{logical; For binomial data, whether to return aggregated +(summary) format or expanded (individual observation) format (default: TRUE)} +} +\value{ +A list of length R containing bootstrap datasets. Each element is a +data.frame with the same structure as the original data, containing: +\itemize{ +\item Dose variable (same name as original) +\item Response variable(s) (same name(s) as original) +\item For binomial data: number of successes and total observations +\item For multi-curve data: curve identifier (if present) +} +} +\description{ +Helper function for \code{bmdBoot} that generates bootstrap datasets from fitted +dose-response models. Supports multiple bootstrap methods (nonparametric, +parametric, and semiparametric) and handles different response types +(binomial, continuous, Poisson, negative binomial). +} +\details{ +The function implements different bootstrap strategies based on data type and method: + +\strong{Nonparametric Bootstrap:} +\itemize{ +\item \strong{Binomial}: Expands binomial data to individual observations, +resamples within dose groups, then optionally re-aggregates +\item \strong{Continuous/Count}: Resamples observations within dose groups +from the original dataset +} + +\strong{Parametric Bootstrap:} +\itemize{ +\item \strong{Binomial}: Generates new binomial observations using estimated +success probabilities, with continuity correction (adds 0.25/0.5) for +boundary cases +\item \strong{Continuous}: Generates normal random variables using +dose-specific means and standard deviations from original data +} + +\strong{Semiparametric Bootstrap:} +\itemize{ +\item \strong{Continuous only}: Uses fitted values plus resampled residuals +\item \strong{Binomial}: Not supported (throws error) +} +} +\note{ +This is an internal helper function for \code{bmdBoot}. It assumes the input object +has the standard structure from \code{drm()} fitting, including components like +\code{data}, \code{origData}, \code{call}, \code{type}, etc. + +\strong{Important considerations:} +\itemize{ +\item Semiparametric bootstrap requires model residuals and fitted values +\item Parametric bootstrap assumes distributional assumptions are met +\item Large R values may require substantial memory for complex datasets +} +} +\section{Data Type Handling}{ + + +\strong{Binomial Data:} +\itemize{ +\item Handles both aggregated (n successes out of N trials) and expanded formats +\item Preserves dose group structure during resampling +\item Applies continuity correction in parametric bootstrap +} + +\strong{Continuous Data:} +\itemize{ +\item Maintains dose group structure +\item Preserves within-group variability patterns +\item Uses original data (\code{origData}) when available +} + +\strong{Count Data (Poisson/Negative Binomial):} +\itemize{ +\item Treated similarly to continuous data for nonparametric bootstrap +\item Resamples within dose groups +} +} + +\section{Multi-curve Support}{ + +The function handles multi-curve dose-response data by preserving curve +identifiers during bootstrap resampling, ensuring that the bootstrap samples +maintain the original experimental structure. +} + +\examples{ +\dontrun{ +# Typically called internally by bmdBoot, but can be used directly: + +# Fit a dose-response model +model <- drm(response/total ~ dose, weights = total, + data = binomial_data, fct = LL.4()) + +# Generate nonparametric bootstrap samples +boot_data <- bootDataGen(model, R = 100, bootType = "nonparametric") + +# Generate parametric bootstrap samples +boot_data_param <- bootDataGen(model, R = 100, bootType = "parametric") + +# For continuous data with semiparametric bootstrap +cont_model <- drm(response ~ dose, data = continuous_data, fct = LL.4()) +boot_data_semi <- bootDataGen(cont_model, R = 100, bootType = "semiparametric") + +# Access first bootstrap sample +first_sample <- boot_data[[1]] +} +} +\seealso{ +\code{\link{bmdBoot}} for the main bootstrap BMD function, } diff --git a/man/bootDataGenOrdinal.Rd b/man/bootDataGenOrdinal.Rd index f900b14..a8b1371 100644 --- a/man/bootDataGenOrdinal.Rd +++ b/man/bootDataGenOrdinal.Rd @@ -1,5 +1,153 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bootDataGenOrdinal.R \name{bootDataGenOrdinal} \alias{bootDataGenOrdinal} -\title{ -Help funtion to bmdOrdinal and bmdOrdinalMA +\title{Generate Bootstrap Data for Ordinal Dose-Response Analysis} +\usage{ +bootDataGenOrdinal( + object, + R = 500, + bootType = c("nonparametric", "parametric", "model", "hierarchical") +) +} +\arguments{ +\item{object}{A fitted ordinal dose-response model object containing the original +data, model specifications, response levels, and fitted parameters} + +\item{R}{integer; Number of bootstrap replicates to generate (default: 500)} + +\item{bootType}{character; Type of bootstrap resampling method. Options are: +\itemize{ +\item \code{"nonparametric"}: Resamples individual observations within dose groups +\item \code{"parametric"}: Generates new observations using estimated category probabilities +\item \code{"model"}: Generates observations using fitted model probabilities +\item \code{"hierarchical"}: Hierarchical resampling accounting for block structure +}} +} +\value{ +A list of length R containing bootstrap datasets. Each element is a +data.frame with the same structure as the original ordinal data, containing: +\itemize{ +\item Dose variable (same name as original) +\item Count columns for each response category +\item For hierarchical: block identifier and total counts +\item All columns from original data structure preserved +} +} +\description{ +Helper function for \code{bmdOrdinal} and \code{bmdOrdinalMA} that generates bootstrap +datasets from fitted ordinal dose-response models. Supports multiple bootstrap +methods tailored for ordinal response data with different resampling strategies. +} +\details{ +The function implements four distinct bootstrap strategies for ordinal data: + +\strong{Nonparametric Bootstrap:} +\itemize{ +\item Expands ordinal data to individual observations +\item Resamples observations within each original data row +\item Maintains the empirical distribution within dose groups +\item Most conservative approach, makes no distributional assumptions +} + +\strong{Parametric Bootstrap:} +\itemize{ +\item Estimates category probabilities from original data +\item Applies continuity correction for boundary cases: +\deqn{p_{corrected} = \frac{1/K^2}{n + 1/K} \text{ when } p = 0}{p_corrected = (1/K^2)/(n + 1/K) when p = 0} +\deqn{p_{corrected} = \frac{n + 1/K^2}{n + 1/K} \text{ when } p = 1}{p_corrected = (n + 1/K^2)/(n + 1/K) when p = 1} +where K is the number of response categories and n is the sample size +\item Generates new observations using multinomial sampling +} + +\strong{Model-Based Bootstrap:} +\itemize{ +\item Uses fitted model probabilities (\code{object$pFun}) for each dose +\item Generates observations directly from the fitted dose-response relationship +\item Assumes the fitted model accurately represents the true relationship +} + +\strong{Hierarchical Bootstrap:} +\itemize{ +\item Accounts for block/cluster structure in the data +\item Requires \code{object$blocks} to be specified +\item Uses weighted resampling within dose groups +\item Maintains hierarchical correlation structure +} +} +\note{ +This is an internal helper function for ordinal BMD bootstrap procedures. It assumes +the input object has the standard structure from ordinal dose-response fitting, +including components like \code{data}, \code{levels}, \code{dose}, \code{pFun}, etc. + +\strong{Method Selection Guidelines:} +\itemize{ +\item Use \code{"nonparametric"} for robust, assumption-free bootstrap +\item Use \code{"parametric"} when sample sizes are small +\item Use \code{"model"} to assess model-based uncertainty +\item Use \code{"hierarchical"} for clustered/blocked experimental designs +} +} +\section{Data Processing}{ + +The function uses several data manipulation steps: +\itemize{ +\item \strong{Expansion}: Converts aggregated ordinal data to individual observations +\item \strong{Resampling}: Applies the specified bootstrap method +\item \strong{Aggregation}: Converts back to count format using \code{reshape2::dcast} +\item \strong{Completion}: Ensures all response categories are present (fills with 0 if missing) +} +} + +\section{Dependencies}{ + +This function requires the following packages: +\itemize{ +\item \code{reshape2}: For data reshaping operations +\item \code{dplyr}: For data manipulation (hierarchical bootstrap only) +\item \code{tidyr}: For data tidying operations (hierarchical bootstrap only) +} + +The function will stop with an informative error if required packages are not installed. +} + +\section{Continuity Correction}{ + +For parametric bootstrap, when category probabilities are 0 or 1, a continuity +correction is applied to prevent degenerate sampling. This ensures all categories +have some probability of being selected, improving bootstrap stability. +} + +\examples{ +\dontrun{ +# Typically called internally, but can be used directly: + +# Assume you have a fitted ordinal model +ordinal_model <- fitOrdinalModel(response ~ dose, data = ordinal_data) + +# Generate nonparametric bootstrap samples +boot_data_np <- bootDataGenOrdinal(ordinal_model, R = 100, + bootType = "nonparametric") + +# Generate parametric bootstrap samples +boot_data_param <- bootDataGenOrdinal(ordinal_model, R = 100, + bootType = "parametric") + +# Generate model-based bootstrap samples +boot_data_model <- bootDataGenOrdinal(ordinal_model, R = 100, + bootType = "model") + +# For hierarchical data with blocks +boot_data_hier <- bootDataGenOrdinal(ordinal_model, R = 100, + bootType = "hierarchical") + +# Access first bootstrap sample +first_sample <- boot_data_np[[1]] +head(first_sample) +} +} +\seealso{ +\code{\link{bmdOrdinal}} for ordinal BMD estimation, +\code{\link{bmdOrdinalMA}} for model-averaged ordinal BMD,, +\code{\link[reshape2]{dcast}} for data reshaping } diff --git a/man/coef.drcHetVar.Rd b/man/coef.drcHetVar.Rd new file mode 100644 index 0000000..abe4516 --- /dev/null +++ b/man/coef.drcHetVar.Rd @@ -0,0 +1,62 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/coef.drcHetVar.R +\name{coef.drcHetVar} +\alias{coef.drcHetVar} +\title{Extract Coefficients from Heteroscedastic Dose-Response Models} +\usage{ +\method{coef}{drcHetVar}(object, ...) +} +\arguments{ +\item{object}{An object of class "drcHetVar" containing a fitted heteroscedastic +dose-response model with separate curve and variance parameters} + +\item{...}{Additional arguments (currently unused but included for S3 method consistency)} +} +\value{ +A named numeric vector containing all model parameters: +\itemize{ +\item Curve parameters with names prefixed by "Curve:" +\item Variance parameters with names prefixed by "Sigma:" +} +} +\description{ +S3 method to extract coefficients from fitted heteroscedastic dose-response models. +This method extends the generic \code{coef()} function to handle \code{drcHetVar} objects, +which contain both dose-response curve parameters and variance model parameters. +} +\details{ +Heteroscedastic dose-response models fit two components simultaneously: +\itemize{ +\item \strong{Curve parameters}: Describe the dose-response relationship +(e.g., slope, inflection point, asymptotes) +\item \strong{Variance parameters}: Model how the response variance changes +with dose or fitted values +} + +This method combines both parameter sets into a single named vector for easy +access and interpretation. Parameter names are prefixed to distinguish between +the two model components: +\itemize{ +\item \code{"Curve:"} prefix for dose-response curve parameters +\item \code{"Sigma:"} prefix for variance model parameters +} +} +\note{ +This method assumes the \code{drcHetVar} object contains: +\itemize{ +\item \code{curvePar}: Named vector of curve parameters +\item \code{sigmaPar}: Named vector of variance parameters +} + +The original parameter names from the fitting procedure are preserved but +prefixed for clarity. +} +\examples{ +\dontrun{ +# Assuming you have a fitted heteroscedastic model +} + +} +\seealso{ +\code{\link{coef}} for the generic coefficient extraction function, +} diff --git a/man/drmHetVar.Rd b/man/drmHetVar.Rd index cb99bc9..2783fe5 100644 --- a/man/drmHetVar.Rd +++ b/man/drmHetVar.Rd @@ -1,48 +1,55 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/drmHetVar.R \name{drmHetVar} \alias{drmHetVar} -\title{ -Dose response modeling with heterogeneous variance -} -\description{Fit a dose-response model with heterogeneous variance dependending on dose level. -} +\title{Dose response modeling with heterogeneous variance} \usage{ drmHetVar(formula, var.formula, data, fct, curveStart = NULL) } - \arguments{ - \item{formula}{formula for the dose-response relationship} - \item{var.formula}{one-sided formula specifying the dependance of the dose values and/or the fitted values on the point-wise standard error} - \item{data}{data.frame containing the observations} - \item{fct}{a list with three or more elements specifying the non-linear function, the accompanying self starter function, the names of the parameter in the non-linear function and, optionally, the first and second derivatives as well as information used for calculation of ED values. Currently available functions include, among others, the four- and five-parameter log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use drc::getMeanFunctions for a full list.} - \item{curveStart}{numerical of length equal to the number of parameters for the curve. Starting values for the curve parameters (optional).} -} +\item{formula}{formula for the dose-response relationship} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - REFERENCES TO BE ADDED/WRITTEN -} -\value{ -dose-response model with a heterogeneous variance structure of class \code{drcHetVar}. +\item{var.formula}{one-sided formula specifying the dependance of the dose +values and/or the fitted values on the point-wise standard error} -The primary objective is to use this model for benchmark dose estimation based on the hybrid method with a heterogeneous variance structure. This can be done using the \code{bmdHetVar} function. +\item{data}{data.frame containing the observations} -A plot method is available, which can be useful for assessing the fit of the variance structure. -} -\references{ +\item{fct}{a list with three or more elements specifying the non-linear +function, the accompanying self starter function, the names of the parameter +in the non-linear function and, optionally, the first and second derivatives +as well as information used for calculation of ED values. Currently +available functions include, among others, the four- and five-parameter +log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use +drc::getMeanFunctions for a full list.} + +\item{curveStart}{numerical of length equal to the number of parameters for +the curve. Starting values for the curve parameters (optional).} } +\value{ +dose-response model with a heterogeneous variance structure of class +\code{drcHetVar}. -\author{ Signe M. Jensen and Jens Riis Baalkilde +The primary objective is to use this model for benchmark dose estimation +based on the hybrid method with a heterogeneous variance structure. This can +be done using the \code{bmdHetVar} function. + +A plot method is available, which can be useful for assessing the fit of the +variance structure. } -\note{ +\description{ +Fit a dose-response model with heterogeneous variance dependending on dose +level. } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. -\seealso{ +REFERENCES TO BE ADDED/WRITTEN } \examples{ + library(drc) library(drcData) library(bmd) @@ -76,8 +83,9 @@ plot(GiantKelp.LL.4.hetVarLogSq) +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/drmMMRE.Rd b/man/drmMMRE.Rd index b17f1b2..11b5639 100644 --- a/man/drmMMRE.Rd +++ b/man/drmMMRE.Rd @@ -1,49 +1,58 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/drmMMRE.R \name{drmMMRE} \alias{drmMMRE} -\title{ -Dose response modeling with hierarchical variance structure -} -\description{Fits a meta-analytic hierarchical dose-response model. -} +\title{Dose response modeling with hierarchical variance structure} \usage{ drmMMRE(formula, exp_id, data, fct, type = c("continuous", "binomial")) } - \arguments{ - \item{formula}{a symbolic description of the model to be fit of the form 'response ~ dose'} - \item{exp_id}{the name of the column in the data set that specifies the hierarchical structure of the data} - \item{data}{a data frame containing the variables in the model.} - \item{fct}{a list with three or more elements specifying the non-linear function, the accompanying self starter function, the names of the parameter in the non-linear function and, optionally, the first and second derivatives as well as information used for calculation of ED values. Currently available functions include, among others, the four- and five-parameter log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use drc::getMeanFunctions for a full list.} - \item{type}{a character string specifying the distribution of the data. The default is "continuous", corresponding to assuming a normal distribution. "binary" imply a binomial distribution.} -} +\item{formula}{a symbolic description of the model to be fit of the form +'response ~ dose'} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - Fitting the meta-analytic model relies on a multivariate meta-analytic model provided by the function \code{rma.mv} in the "metafor" package, which can be installed by running - \code{remotes::install_github("wviechtb/metafor")} - - Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1-48. doi:10.18637/jss.v036.i03 +\item{exp_id}{the name of the column in the data set that specifies the +hierarchical structure of the data} + +\item{data}{a data frame containing the variables in the model.} + +\item{fct}{a list with three or more elements specifying the non-linear +function, the accompanying self starter function, the names of the parameter +in the non-linear function and, optionally, the first and second derivatives +as well as information used for calculation of ED values. Currently +available functions include, among others, the four- and five-parameter +log-logistic models LL.4, LL.5 and the Weibull model W1.4. Use +drc::getMeanFunctions for a full list.} + +\item{type}{a character string specifying the distribution of the data. The +default is "continuous", corresponding to assuming a normal distribution. +"binary" imply a binomial distribution.} } \value{ -meta-analytic dose-response model with a hierarchical variance structure of class \code{drcMMRE}. +meta-analytic dose-response model with a hierarchical variance +structure of class \code{drcMMRE}. -The primary objective is to use this model for benchmark dose estimation based on dose-response data with a heterogeneous variance structure. +The primary objective is to use this model for benchmark dose estimation +based on dose-response data with a heterogeneous variance structure. } -\references{ +\description{ +Fits a meta-analytic hierarchical dose-response model. } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. -\author{ Signe M. Jensen and Jens Riis Baalkilde -} -\note{ -} +Fitting the meta-analytic model relies on a multivariate meta-analytic model +provided by the function \code{rma.mv} in the "metafor" package, which can +be installed by running \code{remotes::install_github("wviechtb/metafor")} -\seealso{ +Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor +package. Journal of Statistical Software, 36(3), 1-48. +doi:10.18637/jss.v036.i03 } \examples{ + library(drc) library(drcData) library(metafor) @@ -59,8 +68,9 @@ data0 <- data.frame(x = rep(drcData::ryegrass$conc, 2), modMMRE <- drmMMRE(y~x, exp_id = EXP_ID, data = data0, fct = LL.4()) bmd(modMMRE, bmr = 0.1, backgType = "modelBased", def = "relative") +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/drmOrdinal.Rd b/man/drmOrdinal.Rd index e87207e..1ba0018 100644 --- a/man/drmOrdinal.Rd +++ b/man/drmOrdinal.Rd @@ -1,52 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/drmOrdinal.R \name{drmOrdinal} \alias{drmOrdinal} -\title{ -Fitting ordinal dose-response models -} -\description{A model fitting function for analysis of ordinal dose-response data. -} +\title{Fitting ordinal dose-response models} \usage{ drmOrdinal(levels, dose, weights, blocks, data, fct, p.epsilon = 1e-16) } \arguments{ - \item{levels}{a character vector of the levels of the response variable in increasing order, as they appear in the supplied data set} - - \item{dose}{a character string specifying the column with the dose values in the supplied data set} - - \item{weights}{a character string specifying the column containing the number of observations pr. group} - - \item{blocks}{a character string specifying the column containing the blocks of the experiment, if available (optional)} - - \item{data}{a dataframe containing the observations} - - \item{fct}{a list with three or more elements specifying the non-linear - function, the accompanying self starter function, the names of the parameter in the non-linear function and, - optionally, the first and second derivatives as well, for the individual fitted curves. For more information see the help page for the "drm" function in the "drc" package. - Currently available functions for ordinal dose-response models include, among others, the log-logistic models - \code{\link[drc]{LL.4}}, the log-normal model \code{\link[drc]{LN.4}} and the two Weibull models \code{\link[drc]{W1.4}} and \code{\link[drc]{W2.4}}. Use - \code{\link[drc]{getMeanFunctions}} for a full list.} +\item{levels}{a character vector of the levels of the response variable in +increasing order, as they appear in the supplied data set} - \item{p.epsilon}{numeric value specifying the lower bound for the probabilites for each level returned by the function pFun created when fitting the model. Default value is 10^(-16)} -} +\item{dose}{a character string specifying the column with the dose values in +the supplied data set} -\details{ - This functions fits a dose-response model for ordinal dose-response data by fitting a series of binomial dose-response models. +\item{weights}{a character string specifying the column containing the +number of observations pr. group} + +\item{blocks}{a character string specifying the column containing the blocks +of the experiment, if available (optional)} + +\item{data}{a dataframe containing the observations} + +\item{fct}{a list with three or more elements specifying the non-linear +function, the accompanying self starter function, the names of the parameter +in the non-linear function and, optionally, the first and second derivatives +as well, for the individual fitted curves. For more information see the help +page for the "drm" function in the "drc" package. Currently available +functions for ordinal dose-response models include, among others, the +log-logistic models \code{\link[drc]{LL.4}}, the log-normal model +\code{\link[drc]{LN.4}} and the two Weibull models \code{\link[drc]{W1.4}} +and \code{\link[drc]{W2.4}}. Use \code{\link[drc]{getMeanFunctions}} for a +full list.} + +\item{p.epsilon}{numeric value specifying the lower bound for the +probabilites for each level returned by the function pFun created when +fitting the model. Default value is 10^(-16)} } \value{ - An object of (S3) class 'drcOrdinal'. +An object of (S3) class 'drcOrdinal'. } -\references{ - # ADD REFERENCES +\description{ +A model fitting function for analysis of ordinal dose-response data. } - -\author{ Signe M. Jensen and Jens Riis Baalkilde -} -\note{ -} - -\seealso{ +\details{ +This functions fits a dose-response model for ordinal dose-response data by +fitting a series of binomial dose-response models. } \examples{ + library(drc) library(drcData) data(guthion) @@ -57,8 +58,9 @@ guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), weights = "to plot(guthionS.LL, xlim = c(15,55)) # uses ggplot +} +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/expandBinomial.Rd b/man/expandBinomial.Rd index d268302..786998c 100644 --- a/man/expandBinomial.Rd +++ b/man/expandBinomial.Rd @@ -1,46 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/expandBinomial.R \name{expandBinomial} \alias{expandBinomial} -\title{ -Utility function -} -\description{Utility function for expanding binomial data -} +\title{Utility function} \usage{ expandBinomial(data, number, total, dose, curveid = character(0)) } - \arguments{ - \item{data}{a data.frame} - \item{number}{the name of the column in the data set containing the number of affected individuals per dose level} - \item{total}{the name of the column in the data set containing the total number of individuals per dose level} - \item{dose}{the name of the column in the data set containing the dose values} - \item{curveid}{the name of the column in the data set specifying the curveid (if available)} -} +\item{data}{a data.frame} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. +\item{number}{the name of the column in the data set containing the number +of affected individuals per dose level} + +\item{total}{the name of the column in the data set containing the total +number of individuals per dose level} + +\item{dose}{the name of the column in the data set containing the dose +values} +\item{curveid}{the name of the column in the data set specifying the curveid +(if available)} } \value{ data.frame } -\references{ +\description{ +Utility function for expanding binomial data } - -\author{ Signe M. Jensen and Jens Riis Baalkilde -} -\note{ -} - -\seealso{ +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. } - -\examples{ +\author{ +Signe M. Jensen and Jens Riis Baalkilde } \keyword{models} \keyword{nonlinear} - -\concept{BMD BMDL benchmark dose-response} \ No newline at end of file diff --git a/man/getStackingWeights.Rd b/man/getStackingWeights.Rd index 516ad61..9a067c5 100644 --- a/man/getStackingWeights.Rd +++ b/man/getStackingWeights.Rd @@ -1,40 +1,35 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/getStackingWeights.R \name{getStackingWeights} \alias{getStackingWeights} -\title{ -Model-average dose-response curves -} -\description{Computing stacking weights. -} +\title{Model-average dose-response curves} \usage{ getStackingWeights(modelList, nSplits = 2) } \arguments{ - \item{modelList}{list of models of class \code{drc}} - \item{nSplits}{integer. The Stacking Weights are based on V-fold cross-validation. The nSplits argument sets the number V of data splits used in the cross validation.} -} +\item{modelList}{list of models of class \code{drc}} -\details{ -The aim to provide an R package - calculating the benchmark dose (BMD) and the lower limit of the corresponding 95\% confidence interval (BMDL) - for continuous and quantal dose-response data for a range of dose-response models based on the available - definitions of the benchmark dose concepts. - - Details on the implemented definitions and methods can be found in Crump (2002) +\item{nSplits}{integer. The Stacking Weights are based on V-fold +cross-validation. The nSplits argument sets the number V of data splits used +in the cross validation.} } \value{ numeric } -\references{ -} - -\author{ Jens Riis Baalkilde -} -\note{ +\description{ +Computing stacking weights. } +\details{ +The aim to provide an R package calculating the benchmark dose (BMD) and the +lower limit of the corresponding 95\\% confidence interval (BMDL) for +continuous and quantal dose-response data for a range of dose-response +models based on the available definitions of the benchmark dose concepts. -\seealso{ +Details on the implemented definitions and methods can be found in Crump +(2002) } \examples{ + library(bmd) library(drc) library(drcData) @@ -52,8 +47,10 @@ getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3, nSplits = 7) } +\author{ +Jens Riis Baalkilde +} +\keyword{averaging} +\keyword{model} \keyword{models} \keyword{nonlinear} -\keyword{model averaging} - -\concept{dose-response, MA, Model Averaging} diff --git a/man/invBmd.Rd b/man/invBmd.Rd index c825536..f149ddc 100644 --- a/man/invBmd.Rd +++ b/man/invBmd.Rd @@ -1,5 +1,173 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/invBmd.R \name{invBmd} \alias{invBmd} -\title{ -Help funtion to bmd +\title{Inverse Regression for Benchmark Dose Calculation} +\usage{ +invBmd( + object, + bmr, + level = 0.9, + slope, + backgType = "modelBased", + backg = NA, + catLev = NA, + extFactor = 10, + def, + useSD = useSD, + sandwich.vcov = FALSE +) +} +\arguments{ +\item{object}{A fitted dose-response model object containing the model function, +derivatives, coefficients, and data information} + +\item{bmr}{numeric; Benchmark response level for which to calculate the BMD} + +\item{level}{numeric; Confidence level for BMD confidence intervals (default: 0.9)} + +\item{slope}{character; Direction of dose-response relationship, either +"increasing" or "decreasing"} + +\item{backgType}{character; Type of background response calculation. Options include: +"modelBased", "hybridSD", "absolute"} + +\item{backg}{numeric; Background response value (used with certain backgType options). +Default: NA} + +\item{catLev}{numeric; Category level for multi-level responses. Default: NA} + +\item{extFactor}{numeric; Extension factor for maximum dose search range (default: 10)} + +\item{def}{character; BMD definition type. Options include: +\itemize{ +\item "additional"/"added": Additional risk over background +\item "excess": Excess risk over background +\item "relative": Relative change from background +\item "extra": Extra risk (between background and maximum) +\item "hybridAdd": Hybrid additional risk using statistical criteria +\item "hybridExc": Hybrid excess risk using statistical criteria +\item "point": Point estimate (not supported for inverse regression) +}} + +\item{useSD}{numeric; Standard deviation value used in hybrid definitions} + +\item{sandwich.vcov}{logical; Whether to use sandwich variance-covariance matrix +for robust standard errors (default: FALSE)} +} +\value{ +A matrix with 1 row and 3 columns: +\itemize{ +\item \strong{BMD}: Benchmark dose estimate +\item \strong{BMDL}: Lower confidence limit for BMD +\item \strong{BMDU}: Upper confidence limit for BMD +} + +If root finding fails for confidence limits, BMDL is set to 0 and BMDU to Inf. +} +\description{ +Helper function for \code{bmd} that calculates Benchmark Dose (BMD) and confidence +intervals using inverse regression. This function handles multiple BMD definitions +and background response types by dynamically modifying the dose-response function +and its derivatives to solve for the dose corresponding to a specified benchmark response. +} +\details{ +The function implements inverse regression by solving: +\deqn{f(BMD) = BMR}{f(BMD) = BMR} +where f is the transformed dose-response function based on the specified definition. + +\strong{BMD Definitions:} + +\strong{Additional Risk:} \deqn{f(x) = |f_0(0) - f_0(x)|}{f(x) = |f_0(0) - f_0(x)|} + +\strong{Excess Risk:} \deqn{f(x) = \frac{|f_0(0) - f_0(x)|}{f_0(0)}}{f(x) = |f_0(0) - f_0(x)|/f_0(0)} (decreasing) +\deqn{f(x) = \frac{f_0(x) - f_0(0)}{1 - f_0(0)}}{f(x) = (f_0(x) - f_0(0))/(1 - f_0(0))} (increasing) + +\strong{Relative Risk:} \deqn{f(x) = \frac{|f_0(0) - f_0(x)|}{f_0(0)}}{f(x) = |f_0(0) - f_0(x)|/f_0(0)} + +\strong{Extra Risk:} \deqn{f(x) = \frac{|f_0(0) - f_0(x)|}{|f_0(0) - f_0(\infty)|}}{f(x) = |f_0(0) - f_0(x)|/|f_0(0) - f_0(infinity)|} + +\strong{Hybrid Definitions:} Use normal distribution probabilities: +\deqn{f(x) = \Phi\left(\frac{f_0(0) - k \cdot SD - f_0(x)}{SD}\right) - (1-\Phi(k))}{f(x) = Phi((f_0(0) - k*SD - f_0(x))/SD) - (1-Phi(k))} +where k is the number of standard deviations (default: 2). +} +\note{ +This is an internal helper function for BMD calculation. It assumes the input +object has the standard structure from dose-response model fitting, including +components like \code{fct}, \code{dataList}, \code{type}, etc. + +\strong{Important considerations:} +\itemize{ +\item The search range is limited to \verb{[0, extFactor × max(dose)]} +\item Hybrid definitions require careful specification of useSD and backg +\item Function modification uses string manipulation and may be sensitive to model structure +} +} +\section{Function Modification}{ + +The function dynamically modifies the model's derivative function to account +for different BMD definitions by: +\itemize{ +\item Parsing the derivative function body +\item Adding appropriate transformation terms +\item Handling parameter indexing for fixed vs. estimated parameters +\item Supporting both 4-parameter and 5-parameter models +} +} + +\section{Confidence Intervals}{ + +Confidence intervals are calculated using the delta method: +\deqn{CI = BMD \pm t_{\alpha/2} \sqrt{h(BMD)^T \Sigma h(BMD)}}{CI = BMD +/- t * sqrt(h(BMD)' * Sigma * h(BMD))} +where h(BMD) is the gradient vector and Σ is the variance-covariance matrix. + +For continuous data, t-distribution quantiles are used; for other data types, +normal distribution quantiles are used. +} + +\section{Error Handling}{ + +The function includes several error checks: +\itemize{ +\item Stops if "point" definition is used (not supported) +\item Stops if hybrid definitions are used without appropriate backgType +\item Stops if no background value is provided when required +\item Stops if no solution exists for the specified BMR +} +} + +\examples{ +\dontrun{ +# Typically called internally by bmd(), but can be used directly: +# Need to be updated +# Fit a dose-response model +model <- drm(response ~ dose, data = dose_data, fct = LL.4()) + +# Calculate BMD for 10\% additional risk +bmd_result <- invBmd(object = model, + bmr = 0.1, + level = 0.9, + slope = "increasing", + def = "additional", + useSD = sd(model$data$response)) + +# Extract results +bmd_estimate <- bmd_result[1, "BMD"] +bmd_lower <- bmd_result[1, "BMDL"] +bmd_upper <- bmd_result[1, "BMDU"] + +# Using hybrid definition with 1.5 standard deviations +bmd_hybrid <- invBmd(object = model, + bmr = 0.05, + def = "hybridAdd", + backgType = "hybridSD", + backg = 1.5, + useSD = sd(model$data$response)) +} +} +\seealso{ +\code{\link{bmd}} for the main BMD calculation function, +\code{\link{uniroot}} for the root finding algorithm, +\code{\link{vcov}} for variance-covariance matrix extraction, +\code{\link[sandwich]{sandwich}} for robust variance estimation } diff --git a/man/logLik.drcHetVar.Rd b/man/logLik.drcHetVar.Rd new file mode 100644 index 0000000..e935cee --- /dev/null +++ b/man/logLik.drcHetVar.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/logLik.drcHetVar.R +\name{logLik.drcHetVar} +\alias{logLik.drcHetVar} +\title{Log-Likelihood Method for drcHetVar Objects} +\usage{ +\method{logLik}{drcHetVar}(object, ...) +} +\arguments{ +\item{object}{A drcHetVar model object} + +\item{...}{Additional arguments (not used)} +} +\value{ +The log-likelihood value +} +\description{ +Extracts the log-likelihood from drcHetVar model objects. +} diff --git a/man/logLik.drcOrdinal.Rd b/man/logLik.drcOrdinal.Rd new file mode 100644 index 0000000..f5eadcd --- /dev/null +++ b/man/logLik.drcOrdinal.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/logLik.drcOrdinal.R +\name{logLik.drcOrdinal} +\alias{logLik.drcOrdinal} +\title{Log-Likelihood Method for drcOrdinal Objects} +\usage{ +\method{logLik}{drcOrdinal}(object, ...) +} +\arguments{ +\item{object}{A drcOrdinal model object} + +\item{...}{Additional arguments (not used)} +} +\value{ +The log-likelihood value +} +\description{ +Extracts the log-likelihood from drcOrdinal model objects. +} diff --git a/man/monotonicityTest.Rd b/man/monotonicityTest.Rd index ab2c915..f6f8feb 100644 --- a/man/monotonicityTest.Rd +++ b/man/monotonicityTest.Rd @@ -1,35 +1,58 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/monotonicityTest.R \name{monotonicityTest} \alias{monotonicityTest} \title{Test for Monotonicity of Relationship Between Two Variables} -\description{ - Conducts a test for monotonicity between a numeric independent variable \code{x} and a numeric dependent variable \code{y} using specified statistical tests. -} \usage{ -monotonicityTest(x, y, data, test = c("jonckheere", "bartholomew"), level = 0.05, ...) +monotonicityTest( + x, + y, + data, + test = c("jonckheere", "bartholomew"), + level = 0.05, + ... +) } \arguments{ - \item{x}{A numeric vector or the name of the independent variable (if \code{data} is provided).} - \item{y}{A numeric vector or the name of the dependent variable (if \code{data} is provided).} - \item{data}{An optional data frame containing the variables \code{x} and \code{y}. If provided, \code{x} and \code{y} should be column names in \code{data}.} - \item{test}{A character string specifying the test to use. Must be one of \code{"jonckheere"} (default) or \code{"bartholomew"}.} - \item{level}{Significance level for the test. Defaults to 0.05.} - \item{...}{Additional arguments passed to the underlying test functions.} -} -\details{ - The function tests the monotonicity of the relationship between \code{x} and \code{y} based on the specified test: - \itemize{ - \item \code{"jonckheere"}: Uses the Jonckheere-Terpstra test to assess monotonic trends. - \item \code{"bartholomew"}: Uses Bartholomew's test to assess monotonicity. - } +\item{x}{A numeric vector or the name of the independent variable (if +\code{data} is provided).} + +\item{y}{A numeric vector or the name of the dependent variable (if +\code{data} is provided).} + +\item{data}{An optional data frame containing the variables \code{x} and +\code{y}. If provided, \code{x} and \code{y} should be column names in +\code{data}.} - The direction of the monotonicity (increasing or decreasing) is determined by the sign of the coefficient from a simple linear model \code{lm(y ~ x)}. +\item{test}{A character string specifying the test to use. Must be one of +\code{"jonckheere"} (default) or \code{"bartholomew"}.} + +\item{level}{Significance level for the test. Defaults to 0.05.} + +\item{...}{Additional arguments passed to the underlying test functions.} } \value{ - A list with the following components: - \item{p.value}{The p-value of the test.} - \item{acceptMonotonicity}{A logical value indicating whether monotonicity is accepted (\code{TRUE}) or rejected (\code{FALSE}) based on the specified significance level.} +A list with the following components: \item{p.value}{The p-value of +the test.} \item{acceptMonotonicity}{A logical value indicating whether +monotonicity is accepted (\code{TRUE}) or rejected (\code{FALSE}) based on +the specified significance level.} +} +\description{ +Conducts a test for monotonicity between a numeric independent variable +\code{x} and a numeric dependent variable \code{y} using specified +statistical tests. +} +\details{ +The function tests the monotonicity of the relationship between \code{x} and +\code{y} based on the specified test: \itemize{ \item \code{"jonckheere"}: +Uses the Jonckheere-Terpstra test to assess monotonic trends. \item +\code{"bartholomew"}: Uses Bartholomew's test to assess monotonicity. } + +The direction of the monotonicity (increasing or decreasing) is determined +by the sign of the coefficient from a simple linear model \code{lm(y ~ x)}. } \examples{ + # Example with custom data x <- c(1, 2, 3, 4, 5) y <- c(2, 4, 6, 8, 10) @@ -39,17 +62,19 @@ print(result) data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6)) result <- monotonicityTest("conc", "rootl", data = drcData::ryegrass, test = "bartholomew") print(result) -} - -\author{Jens Riis Baalkilde} -\seealso{ - \code{.jonckheereTest}, \code{.bartholomewTest} } - \references{ - A. R. Jonckheere (1954). "A Distribution-Free k-Sample Test Against Ordered Alternatives." - D. J. Bartholomew (1961). "Ordered tests in the analysis of variance." - OECD (2006). Rapport No. 54, Annexes. +A. R. Jonckheere (1954). "A Distribution-Free k-Sample Test +Against Ordered Alternatives." D. J. Bartholomew (1961). "Ordered tests in +the analysis of variance." OECD (2006). Rapport No. 54, Annexes. +} +\seealso{ +\code{.jonckheereTest}, \code{.bartholomewTest} +} +\author{ +Jens Riis Baalkilde } -\keyword{monotonicity, trend test} +\keyword{monotonicity,} +\keyword{test} +\keyword{trend} diff --git a/man/plot.bmd.Rd b/man/plot.bmd.Rd index 74367fd..534eca0 100644 --- a/man/plot.bmd.Rd +++ b/man/plot.bmd.Rd @@ -1,44 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot.bmd.R \name{plot.bmd} \alias{plot.bmd} -\alias{\method{plot}{bmd}} - -\title{Plotting benchmark doses} - -\description{ - \code{plot.bmd} displays benchmark dose values with options to plot confidence intervals as well. -} - +\title{Plotting method for benchmark doses modeling object} \usage{ - \method{plot}{bmd}(x, ..., interval = c("BMDL", "twosided", "none")) +\method{plot}{bmd}(x, ..., interval = c("BMDL", "twosided", "none")) } - \arguments{ - \item{x}{an object of class 'bmd'.} - \item{...}{arguments to be passed on to \code{plot.drc}, if \code{add = FALSE}} - \item{interval}{option to plot only the lower limit of the confidence interval for the benchmark dose ("BMDL", default), both limit - of the confidence interval ("twosided"), or no confidence interval ("none").} -} +\item{x}{an object of class 'bmd'.} -\details{ - This function is a simple function to plot benchmark dose values along with the fitted curve. -} +\item{...}{arguments to be passed on to \code{plot.drc}, if \code{add = +FALSE}} +\item{interval}{option to plot only the lower limit of the confidence +interval for the benchmark dose ("BMDL", default), both limit of the +confidence interval ("twosided"), or no confidence interval ("none").} +} \value{ - Creates a plot. No value returned. +Creates a plot. No value returned. } - -\author{ - Jens Riis Baalkilde. +\description{ +\code{plot.bmd} displays benchmark dose values with options to plot +confidence intervals as well. +} +\details{ +This function is a simple function to plot benchmark dose values along with +the fitted curve. } - -%\references{ -%} - -%\note{ ~~further notes~~ } - -%\seealso{\code{\link{plotraw}} plots the observations only.} - \examples{ + library(drc) library(drcData) @@ -56,5 +46,9 @@ plot(bmd0, interval = "twosided") plot(bmd0, type = "confidence") + +} +\author{ +Jens Riis Baalkilde. } -\keyword{ggplot} \ No newline at end of file +\keyword{ggplot} diff --git a/man/plot.drcHetVar.Rd b/man/plot.drcHetVar.Rd new file mode 100644 index 0000000..aaa6140 --- /dev/null +++ b/man/plot.drcHetVar.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot.drcHetVar.R +\name{plot.drcHetVar} +\alias{plot.drcHetVar} +\title{Plot Method for drcHetVar Objects} +\usage{ +\method{plot}{drcHetVar}(x, ...) +} +\arguments{ +\item{x}{A drcHetVar model object} + +\item{...}{Additional graphical parameters passed to plot} +} +\value{ +Invisibly returns the x object +} +\description{ +Plots the fitted dose-response curve for drcHetVar model objects. +} diff --git a/man/plot.drcOrdinal.Rd b/man/plot.drcOrdinal.Rd new file mode 100644 index 0000000..5466eb5 --- /dev/null +++ b/man/plot.drcOrdinal.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/plot.drcOrdinal.R +\name{plot.drcOrdinal} +\alias{plot.drcOrdinal} +\title{Plot Method for drcOrdinal Objects} +\usage{ +\method{plot}{drcOrdinal}(x, ...) +} +\arguments{ +\item{x}{A drcOrdinal model object} + +\item{...}{Additional graphical parameters passed to plot} +} +\value{ +Invisibly returns the x object +} +\description{ +Plots the fitted dose-response curve for drcOrdinal model objects. +} diff --git a/man/print.bmd.Rd b/man/print.bmd.Rd new file mode 100644 index 0000000..f48b628 --- /dev/null +++ b/man/print.bmd.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/print.bmd.R +\name{print.bmd} +\alias{print.bmd} +\title{Print Method for bmd Objects} +\usage{ +\method{print}{bmd}(x, ..., digits = max(3, getOption("digits") - 3)) +} +\arguments{ +\item{x}{A bmd model object} + +\item{...}{Additional arguments (not used)} + +\item{digits}{Number of significant digits to use for printing values} +} +\value{ +Invisibly returns the x object +} +\description{ +Prints a summary of a bmd model object. +} diff --git a/man/print.bmdHetVar.Rd b/man/print.bmdHetVar.Rd new file mode 100644 index 0000000..942fdc6 --- /dev/null +++ b/man/print.bmdHetVar.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/print.bmdHetVar.R +\name{print.bmdHetVar} +\alias{print.bmdHetVar} +\title{Print Method for drcHetVar Objects} +\usage{ +\method{print}{bmdHetVar}(x, ..., digits = max(3, getOption("digits") - 3)) +} +\arguments{ +\item{x}{A drcHetVar model object} + +\item{...}{Additional arguments (not used)} + +\item{digits}{Number of significant digits to use for printing values} +} +\value{ +Invisibly returns the x object +} +\description{ +Prints a summary of a drcHetVar model object. +} diff --git a/man/print.bmdOrdinal.Rd b/man/print.bmdOrdinal.Rd new file mode 100644 index 0000000..d3539fb --- /dev/null +++ b/man/print.bmdOrdinal.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/print.bmdOrdinal.R +\name{print.bmdOrdinal} +\alias{print.bmdOrdinal} +\title{Print Method for bmdOrdinalr Objects} +\usage{ +\method{print}{bmdOrdinal}(x, ..., digits = max(3, getOption("digits") - 3)) +} +\arguments{ +\item{x}{A bmdOrdinal model object} + +\item{...}{Additional arguments (not used)} + +\item{digits}{Number of significant digits to use for printing values} +} +\value{ +Invisibly returns the x object +} +\description{ +Prints a summary of a bmdOrdinal model object. +} diff --git a/man/print.drcHetVar.Rd b/man/print.drcHetVar.Rd new file mode 100644 index 0000000..f7ab367 --- /dev/null +++ b/man/print.drcHetVar.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/print.drcHetVar.R +\name{print.drcHetVar} +\alias{print.drcHetVar} +\title{Print Method for drcHetVar Objects} +\usage{ +\method{print}{drcHetVar}(x, ..., digits = max(3, getOption("digits") - 3)) +} +\arguments{ +\item{x}{A drcHetVar model object} + +\item{...}{Additional arguments (not used)} + +\item{digits}{Number of significant digits to use for printing values} +} +\value{ +Invisibly returns the x object +} +\description{ +Prints a summary of a drcHetVar model object. +} diff --git a/man/print.drcMMRE.Rd b/man/print.drcMMRE.Rd new file mode 100644 index 0000000..e252907 --- /dev/null +++ b/man/print.drcMMRE.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/print.drcMMRE.R +\name{print.drcMMRE} +\alias{print.drcMMRE} +\title{Print Method for drcMMRE Objects} +\usage{ +\method{print}{drcMMRE}(x, ..., digits = max(3, getOption("digits") - 3)) +} +\arguments{ +\item{x}{A drcMMRE model object} + +\item{...}{Additional arguments (not used)} + +\item{digits}{Number of significant digits to use for printing values} +} +\value{ +Invisibly returns the x object +} +\description{ +Prints a summary of a drcMMRE model object. +} diff --git a/man/print.drcOrdinal.Rd b/man/print.drcOrdinal.Rd new file mode 100644 index 0000000..03d1f5e --- /dev/null +++ b/man/print.drcOrdinal.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/print.drcOrdinal.R +\name{print.drcOrdinal} +\alias{print.drcOrdinal} +\title{Print Method for drcOrdinal Objects} +\usage{ +\method{print}{drcOrdinal}(x, ..., digits = max(3, getOption("digits") - 3)) +} +\arguments{ +\item{x}{A drcOrdinal model object} + +\item{...}{Additional arguments (not used)} + +\item{digits}{Number of significant digits to use for printing values} +} +\value{ +Invisibly returns the x object +} +\description{ +Prints a summary of a drcOrdinal model object. +} diff --git a/man/qplotBmd.Rd b/man/qplotBmd.Rd index b8189a1..24e8a24 100644 --- a/man/qplotBmd.Rd +++ b/man/qplotBmd.Rd @@ -1,46 +1,46 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/qplotBmd.R \name{qplotBmd} - \alias{qplotBmd} - \title{Plotting benchmark doses using ggplot2} - -\description{ - \code{qplotBmd} displays benchmark dose values with options to plot confidence intervals as well using \code{ggplot2}. -} - \usage{ - qplotBmd(x, ..., interval = c("BMDL", "twosided", "none"), col = FALSE, add = FALSE) +qplotBmd( + x, + ..., + interval = c("BMDL", "twosided", "none"), + col = FALSE, + add = FALSE +) } - \arguments{ - \item{x}{an object of class 'bmd'.} - \item{...}{arguments to be passed on to qplotDrc, if \code{add = FALSE}} - \item{interval}{option to plot only the lower limit of the confidence interval for the benchmark dose ("BMDL", default), both limit - of the confidence interval ("twosided"), or no confidence interval ("none").} - \item{col}{logical. If TRUE then multiple curves specified by "curveid" in the dose-response model are distinguised by colours rather than point shapes and line types} - \item{add}{logical. If TRUE then the functions returns a list of plot layers to be added to an already existing ggplot.} -} +\item{x}{an object of class 'bmd'.} -\details{ - This function is a simple function to plot benchmark dose values -} +\item{...}{arguments to be passed on to qplotDrc, if \code{add = FALSE}} +\item{interval}{option to plot only the lower limit of the confidence +interval for the benchmark dose ("BMDL", default), both limit of the +confidence interval ("twosided"), or no confidence interval ("none").} + +\item{col}{logical. If TRUE then multiple curves specified by "curveid" in +the dose-response model are distinguised by colours rather than point shapes +and line types} + +\item{add}{logical. If TRUE then the functions returns a list of plot layers +to be added to an already existing ggplot.} +} \value{ - A \code{ggplot} object. If the option \code{add} is used, a list of \code{ggplot} layers is returned. +A \code{ggplot} object. If the option \code{add} is used, a list of +\code{ggplot} layers is returned. } - -\author{ - Jens Riis Baalkilde. +\description{ +\code{qplotBmd} displays benchmark dose values with options to plot +confidence intervals as well using \code{ggplot2}. +} +\details{ +This function is a simple function to plot benchmark dose values } - -%\references{ -%} - -%\note{ ~~further notes~~ } - -%\seealso{\code{\link{plotraw}} plots the observations only.} - \examples{ + library(drc) library(drcData) @@ -58,4 +58,7 @@ qplotBmd(bmd0, interval = "twosided", add = FALSE) } -\keyword{ggplot} \ No newline at end of file +\author{ +Jens Riis Baalkilde. +} +\keyword{ggplot} diff --git a/man/qplotDrc.Rd b/man/qplotDrc.Rd index 3692671..9602f51 100644 --- a/man/qplotDrc.Rd +++ b/man/qplotDrc.Rd @@ -1,91 +1,110 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/qplotDrc.R \name{qplotDrc} - \alias{qplotDrc} - \title{Plotting fitted dose-response curves using ggplot2} - -\description{ - \code{qplotDrc} displays fitted curves and observations in the same plot window, - distinguishing between curves by different plot symbols and line types or colours using \code{ggplot2}. -} - \usage{ - - qplotDrc(x, add = FALSE, level = NULL, - type = c("average", "all", "bars", "none", "obs", "confidence"), - gridsize = 250, xtrans = "pseudo_log", xlab, xlim, - ytrans = NULL, ylab, ylim, col = FALSE, - normal = FALSE, normRef = 1, confidence.level = 0.95) +qplotDrc( + x, + add = FALSE, + level = NULL, + type = c("average", "all", "bars", "none", "obs", "confidence"), + gridsize = 250, + xtrans = "pseudo_log", + xlab, + xlim, + ytrans = NULL, + ylab, + ylim, + col = FALSE, + normal = FALSE, + normRef = 1, + confidence.level = 0.95 +) } - \arguments{ - \item{x}{an object of class 'drc'.} - \item{add}{logical. If TRUE then the functions returns a list of plot layers to be added to an already existing ggplot.} - \item{level}{vector of curve levels to plot. To plot only the curves specified by their names.} - \item{type}{a character string specifying how to plot the data. There are currently - 5 options: "average" (averages and fitted curve(s); default), - "none" (only the fitted curve(s)), "obs" (only the data points), - "all" (all data points and fitted curve(s)), - "bars" (averages and fitted curve(s) with model-based standard errors (see Details)), and - "confidence" (confidence bands for fitted curve(s)).} - \item{gridsize}{numeric. Number of points in the grid used for plotting the fitted curves.} - \item{xtrans}{Transformation to use on the x-axis. The default is "pesudo_log", which is a logarithmic - transformation with a smooth transition to 0. Other options include (among others) "log" and "identity". Can be overridden - by adding a scale using the \code{scale_x_continuous} function.} - \item{xlab}{an optional label for the x axis.} - \item{xlim}{a numeric vector of length two, containing the lower and upper limit for the x axis.} - \item{ytrans}{Transformation to use on the y-axis. The default is no transformation. Other options include (among others) "pseudo_log" and "log" and. Can be overridden - by adding a scale using the \code{scale_y_continuous} function.} - \item{ylab}{an optional label for the y axis.} - \item{ylim}{a numeric vector of length two, containing the lower and upper limit for the y axis.} - \item{col}{logical. If TRUE default ggplot colours are used, can be overridden by \code{scale_color_manual}. - If FALSE (default) no colours are used.} - \item{normal}{logical. If TRUE the plot of the normalized data and fitted curves are shown - (for details see Weimer et al. (2012) for details).} - \item{normRef}{numeric specifying the reference for the normalization (default is 1).} - \item{confidence.level}{confidence level for error bars and confidence bands. Defaults to 0.95.} -} +\item{x}{an object of class 'drc'.} -\details{ - This function largely seeks to mimic the behaviour of the \code{plot} method for the \code{drc} package using - the \code{ggplot2} package for plotting. - - The use of \code{xlim} allows changing the range of the x axis, extrapolating the fitted dose-response curves. - Note that changing the range on the x axis may also entail a change of the range on the y axis. - - See \code{\link{colors}} for the available colours. - - Suitable labels are automatically provided. - - The model-based standard errors used for the error bars are calculated - as the fitted value plus/minus the estimated error times the - 1-(alpha/2) quantile in the t distribution with degrees of freedom - equal to the residual degrees of freedom for the model (or using a - standard normal distribution in case of binomial and poisson data), - where alpha=1-confidence.level. The standard errors are obtained using - the predict method with the arguments interval = "confidence" - and level=confidence.level. -} +\item{add}{logical. If TRUE then the functions returns a list of plot layers +to be added to an already existing ggplot.} + +\item{level}{vector of curve levels to plot. To plot only the curves +specified by their names.} + +\item{type}{a character string specifying how to plot the data. There are +currently 5 options: "average" (averages and fitted curve(s); default), +"none" (only the fitted curve(s)), "obs" (only the data points), "all" (all +data points and fitted curve(s)), "bars" (averages and fitted curve(s) with +model-based standard errors (see Details)), and "confidence" (confidence +bands for fitted curve(s)).} + +\item{gridsize}{numeric. Number of points in the grid used for plotting the +fitted curves.} + +\item{xtrans}{Transformation to use on the x-axis. The default is +"pesudo_log", which is a logarithmic transformation with a smooth transition +to 0. Other options include (among others) "log" and "identity". Can be +overridden by adding a scale using the \code{scale_x_continuous} function.} + +\item{xlab}{an optional label for the x axis.} + +\item{xlim}{a numeric vector of length two, containing the lower and upper +limit for the x axis.} + +\item{ytrans}{Transformation to use on the y-axis. The default is no +transformation. Other options include (among others) "pseudo_log" and "log" +and. Can be overridden by adding a scale using the \code{scale_y_continuous} +function.} + +\item{ylab}{an optional label for the y axis.} +\item{ylim}{a numeric vector of length two, containing the lower and upper +limit for the y axis.} + +\item{col}{logical. If TRUE default ggplot colours are used, can be +overridden by \code{scale_color_manual}. If FALSE (default) no colours are +used.} + +\item{normal}{logical. If TRUE the plot of the normalized data and fitted +curves are shown (for details see Weimer et al. (2012) for details).} + +\item{normRef}{numeric specifying the reference for the normalization +(default is 1).} + +\item{confidence.level}{confidence level for error bars and confidence +bands. Defaults to 0.95.} +} \value{ - A \code{ggplot} object. If the option \code{add} is used, a list of \code{ggplot} layers is returned. +A \code{ggplot} object. If the option \code{add} is used, a list of +\code{ggplot} layers is returned. } - -\author{ - Jens Riis Baalkilde. Based on \code{plot.drc} by Christian Ritz and Jens C. Streibig with Contributions from Xiaoyan Wang and Greg Warnes. +\description{ +\code{qplotDrc} displays fitted curves and observations in the same plot +window, distinguishing between curves by different plot symbols and line +types or colours using \code{ggplot2}. } +\details{ +This function largely seeks to mimic the behaviour of the \code{plot} method +for the \code{drc} package using the \code{ggplot2} package for plotting. -\references{ - Weimer, M., Jiang, X., Ponta, O., Stanzel, S., Freyberger, A., Kopp-Schneider, A. (2012) - The impact of data transformations on concentration-response modeling. - \emph{Toxicology Letters}, \bold{213}, 292--298. -} +The use of \code{xlim} allows changing the range of the x axis, +extrapolating the fitted dose-response curves. Note that changing the range +on the x axis may also entail a change of the range on the y axis. -%\note{ ~~further notes~~ } +See \code{\link{colors}} for the available colours. -%\seealso{\code{\link{plotraw}} plots the observations only.} +Suitable labels are automatically provided. +The model-based standard errors used for the error bars are calculated as +the fitted value plus/minus the estimated error times the 1-(alpha/2) +quantile in the t distribution with degrees of freedom equal to the residual +degrees of freedom for the model (or using a standard normal distribution in +case of binomial and poisson data), where alpha=1-confidence.level. The +standard errors are obtained using the predict method with the arguments +interval = "confidence" and level=confidence.level. +} \examples{ + library(drc) library(drcData) library(ggplot2) @@ -136,4 +155,14 @@ qplotDrc(spinach.m1, col = TRUE, type = "confidence") + } -\keyword{ggplot} \ No newline at end of file +\references{ +Weimer, M., Jiang, X., Ponta, O., Stanzel, S., Freyberger, A., +Kopp-Schneider, A. (2012) The impact of data transformations on +concentration-response modeling. \emph{Toxicology Letters}, \bold{213}, +292--298. +} +\author{ +Jens Riis Baalkilde. Based on \code{plot.drc} by Christian Ritz and +Jens C. Streibig with Contributions from Xiaoyan Wang and Greg Warnes. +} +\keyword{ggplot} diff --git a/man/trendTest.Rd b/man/trendTest.Rd index 172bf5e..2e6dba7 100644 --- a/man/trendTest.Rd +++ b/man/trendTest.Rd @@ -1,36 +1,52 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/trendTest.R \name{trendTest} \alias{trendTest} \title{Test for Trend in Relationship Between Two Variables} -\description{ - Conducts a test for trends between a numeric independent variable \code{x} and a numeric dependent variable \code{y} using specified statistical tests. -} \usage{ trendTest(x, y, data, test = c("william", "shirley", "tukey"), level = 0.05) } \arguments{ - \item{x}{A numeric vector or the name of the independent variable (if \code{data} is provided).} - \item{y}{A numeric vector or the name of the dependent variable (if \code{data} is provided).} - \item{data}{An optional data frame containing the variables \code{x} and \code{y}. If provided, \code{x} and \code{y} should be column names in \code{data}.} - \item{test}{A character string specifying the test to use. Must be one of \code{"william"}, \code{"shirley"}, or \code{"tukey"} (default).} - \item{level}{Significance level for the test. Defaults to 0.05.} -} -\details{ - The function tests for a trend in the relationship between \code{x} and \code{y} based on the specified test: - \itemize{ - \item \code{"william"}: Applies Williams' test to assess trend significance. - \item \code{"shirley"}: Uses Shirley's test for trend analysis with ordered alternatives. - \item \code{"tukey"}: Implements the Tukey trend test using multiple marginal models. - } +\item{x}{A numeric vector or the name of the independent variable (if +\code{data} is provided).} + +\item{y}{A numeric vector or the name of the dependent variable (if +\code{data} is provided).} - The direction of the trend (increasing or decreasing) is determined by the slope of the linear model \code{lm(y ~ x)}. +\item{data}{An optional data frame containing the variables \code{x} and +\code{y}. If provided, \code{x} and \code{y} should be column names in +\code{data}.} + +\item{test}{A character string specifying the test to use. Must be one of +\code{"william"}, \code{"shirley"}, or \code{"tukey"} (default).} + +\item{level}{Significance level for the test. Defaults to 0.05.} } \value{ - A list with the following components: - \item{p.values}{A numeric vector of p-values for the tests (if applicable).} - \item{decisions}{A character vector indicating whether the trend is \code{"accept"} or \code{"reject"} based on the test results.} - \item{acceptTrend}{A logical value indicating whether a trend is accepted (\code{TRUE}) or rejected (\code{FALSE}) based on the specified significance level.} +A list with the following components: \item{p.values}{A numeric +vector of p-values for the tests (if applicable).} \item{decisions}{A +character vector indicating whether the trend is \code{"accept"} or +\code{"reject"} based on the test results.} \item{acceptTrend}{A logical +value indicating whether a trend is accepted (\code{TRUE}) or rejected +(\code{FALSE}) based on the specified significance level.} +} +\description{ +Conducts a test for trends between a numeric independent variable \code{x} +and a numeric dependent variable \code{y} using specified statistical tests. +} +\details{ +The function tests for a trend in the relationship between \code{x} and +\code{y} based on the specified test: \itemize{ \item \code{"william"}: +Applies Williams' test to assess trend significance. \item +\code{"shirley"}: Uses Shirley's test for trend analysis with ordered +alternatives. \item \code{"tukey"}: Implements the Tukey trend test using +multiple marginal models. } + +The direction of the trend (increasing or decreasing) is determined by the +slope of the linear model \code{lm(y ~ x)}. } \examples{ + # Example with custom data x <- c(1, 2, 3, 4, 5) y <- c(2, 4, 6, 8, 10) @@ -41,16 +57,23 @@ print(result) data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6)) result <- trendTest("x", "y", data = data, test = "shirley") print(result) -} -\seealso{ - \code{.williamsTest}, \code{.shirleyTest}, \code{.tukeytrendfit} + } \references{ - Williams, D. A. (1971). "A test for differences between treatment means when several dose levels are compared with a zero dose control." Biometrics, 27(1), 103-117. - Shirley, E. (1977). "A non-parametric equivalent of Williams' test for contrasting increasing dose levels of a treatment." Biometrics, 33(2), 386-389. - Schaarschmidt, F. et al. (2021). "The Tukey trend test: Multiplicity adjustment using multiple marginal models" Biometrics, 78(2), 789-797. +Williams, D. A. (1971). "A test for differences between +treatment means when several dose levels are compared with a zero dose +control." Biometrics, 27(1), 103-117. Shirley, E. (1977). "A non-parametric +equivalent of Williams' test for contrasting increasing dose levels of a +treatment." Biometrics, 33(2), 386-389. Schaarschmidt, F. et al. (2021). +"The Tukey trend test: Multiplicity adjustment using multiple marginal +models" Biometrics, 78(2), 789-797. +} +\seealso{ +\code{.williamsTest}, \code{.shirleyTest}, \code{.tukeytrendfit} } \author{ - Jens Riis Baalkilde +Jens Riis Baalkilde } -\keyword{trend, statistical test} +\keyword{statistical} +\keyword{test} +\keyword{trend,} diff --git a/man/vcov.drcMMRE.Rd b/man/vcov.drcMMRE.Rd new file mode 100644 index 0000000..63cb1fa --- /dev/null +++ b/man/vcov.drcMMRE.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/drmMMRE.R +\name{vcov.drcMMRE} +\alias{vcov.drcMMRE} +\title{Extract Variance-Covariance Matrix from drcMMRE Objects} +\usage{ +\method{vcov}{drcMMRE}(object, ...) +} +\arguments{ +\item{object}{An object of class "drcMMRE"} + +\item{...}{Additional arguments (currently unused)} +} +\value{ +The variance-covariance matrix of the model parameters. +} +\description{ +S3 method to extract the variance-covariance matrix from fitted drcMMRE objects +by delegating to the underlying model-averaged model. +} +\seealso{ +\code{\link{vcov}} for the generic function +} diff --git a/tests/testthat.R b/tests/testthat.R index b00de44..01d0433 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -8,5 +8,5 @@ library(testthat) library(bmd) - +library(drc) test_check("bmd") diff --git a/tests/testthat/test-bmd.R b/tests/testthat/test-bmd.R index 5a30a68..dd9ade0 100644 --- a/tests/testthat/test-bmd.R +++ b/tests/testthat/test-bmd.R @@ -30,7 +30,7 @@ # - correct bmd estimate (point, extra, hybridExc) # - delta # - Meta analytic model (drmMMRE) - +library(drc) # Arguments and structure ------------------------------------------------- diff --git a/vignettes/.gitignore b/vignettes/.gitignore new file mode 100644 index 0000000..097b241 --- /dev/null +++ b/vignettes/.gitignore @@ -0,0 +1,2 @@ +*.html +*.R diff --git a/vignettes/basic-bmd-functions.Rmd b/vignettes/basic-bmd-functions.Rmd new file mode 100644 index 0000000..cebb5aa --- /dev/null +++ b/vignettes/basic-bmd-functions.Rmd @@ -0,0 +1,120 @@ +--- +title: "basic-bmd-functions" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{basic-bmd-functions} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(bmd) +``` + +# Basic BMD Functions Examples + +This vignette demonstrates the usage of functions related to +basic bmd functions +. +```r + + + + +library(drc) + +library(drcData) + + + +## Fitting log-logistic two-parameter model to binomial data + +deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial") + + + +## BMD for 5% additional risk with estimated background risk + +bmd(deguelin.m1, 0.05, backgType = "modelBased", def = "additional") + + + +## BMD for 10% additional risk with 2% background risk + +bmd(deguelin.m1, 0.1, backg = 0.02 , backgType = "absolute", def = "additional") + + + +## BMD for 5% excess risk and background 0 + +bmd(deguelin.m1, 0.05, backg = 0, backgType = "absolute", def = "excess") + + + +## Dose resulting in 12% risk + +bmd(deguelin.m1, 0.12, def = "point") + + + +## Benchmark doses for a continuous response + +ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) + + + +## BMD as the dose resulting in a 5% change relative to the mean background level + +bmd(ryegrass.m1, 0.05, backgType = "modelBased", def = "relative", display = TRUE) + + + +## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk + +bmd(ryegrass.m1, 0.05, backg = 2, backgType = "hybridSD", def = "hybridAdd", display = TRUE) + + +``` + + + + +## Bootstrapping Methods + +```r + +## Data on root length in ryegrass after exposure to ferulic acid + +require(drc) + +require(drcData) + +data(ryegrass) + + + +ryegrass.m1 <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) + + + +## BMD using the hybrid method, background risk is 2 SD, hybrid definition using excess risk + +bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", R = 50) + + + +## BMD from the same definitions but using parametric bootstrap + +bmdBoot(ryegrass.m1, 0.05, backgType = "hybridSD", def = "hybridAdd", bootType="parametric",R = 50) + + + +``` + diff --git a/vignettes/bmd_Package.Rmd b/vignettes/bmd_Package.Rmd new file mode 100644 index 0000000..9e14681 --- /dev/null +++ b/vignettes/bmd_Package.Rmd @@ -0,0 +1,107 @@ +--- +title: "bmd Package" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{bmd_Package} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(drcData) +library(drc) +library(bmd) +``` + + +## Package Summary + +This R package focuses on Benchmark Dose (BMD) modeling, which is commonly used in toxicology and risk assessment to determine the dose of a substance that corresponds to a specific level of response or risk. The package provides a comprehensive range of functionalities. It supports various model types, confidence interval methods, and model averaging approaches. + +### Core Functionalities + +1. **Dose-Response Modeling**: + - Fits various dose-response models including logistic, log-normal, Weibull, and fractional polynomial models + - Supports continuous, binomial, Poisson, and negative binomial response types + - Handles both single and multiple curves/groups + +2. **BMD Estimation**: + - Calculates benchmark doses (BMDs) and their lower confidence limits (BMDLs) + - Implements multiple BMD definitions: excess, additional, relative, extra, added, hybrid excess, hybrid additional, and point + - Provides various background types: model-based, absolute, hybridSD, and hybridPercentile + +3. **Confidence Interval Methods**: + - Delta method + - Profile likelihood + - Bootstrap (parametric, nonparametric) + - Sandwich estimator + - Inverse regression + +4. **Model Averaging**: + - Implements model averaging for BMD estimation via `bmdMA()` + - Supports various weighting schemes: AIC, BIC, and stacking (cross-validation) + - Implements different averaging approaches: Kang, Buckland, curve, and bootstrap + +5. **Special Model Types**: + - Ordinal response models (`drcOrdinal`) + - Heterogeneous variance models (`drcHetVar`) + - Mixed models with random effects (`drcMMRE`) + +6. **Trend Testing**: + - Implements monotonicity tests (Jonckheere-Terpstra, Bartholomew) + - Provides trend tests (Williams, Shirley, Tukey) + +7. **Visualization**: + - Plot methods for BMD objects + - ggplot2-based plotting functions (`qplotDrc`, `qplotBmd`) + +## Usage of the Package + +The package follows a workflow typically seen in dose-response analysis: + +1. **Fit dose-response models** using functions like `drm()`, `drcOrdinal()`, `drcHetVar()`, or `drcMMRE()` +2. **Estimate BMDs** using `bmd()` or specialized functions like `bmdOrdinal()`, `bmdHetVar()` +3. **Apply model averaging** with `bmdMA()` if multiple models are considered +4. **Visualize results** using plot methods or specialized plotting functions +5. **Test for trends** using `trendTest()` or `monotonicityTest()` + +### Example usage: + +```{r} +# Fit dose-response model + +data("secalonic") +model <- drm(rootl ~ dose, data = secalonic, fct = LL.4()) +## model <- drm(response ~ dose, data = mydata, fct = LL.4()) + +# Calculate BMD +bmd_result <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative", interval = "profile") + +# Plot result +plot(bmd_result) +## note that ggplot2 style plot can be generated using qplot function +## qplotBmd(bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative", display = FALSE)) # display = FALSE hides output from bmd function +``` + +#### Fit multiple models for model averaging + +```{r} +# Fit multiple models for model averaging + +# Apply model averaging (if multiple models are fitted) +model1 <- model +model2 <- drm(rootl ~ dose, data = secalonic, fct = LN.3()) +model3 <- drm(rootl ~ dose, data = secalonic, fct = LN.4()) +model_list <- list(model1, model2, model3) +bmd_ma <- bmdMA(model_list, modelWeights = "AIC", backgType = "modelBased", bmr = 0.1, + def = "relative" , type = "bootstrap") +print(bmd_ma) +``` + diff --git a/vignettes/model-averaging.Rmd b/vignettes/model-averaging.Rmd new file mode 100644 index 0000000..ba34e26 --- /dev/null +++ b/vignettes/model-averaging.Rmd @@ -0,0 +1,191 @@ +--- +title: "model-averaging" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{model-averaging} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(bmd) +``` + + +## Example for `bmdMA` function + +```r + + + + +library(drc) + +library(drcData) + + + +## Fitting 4 different two-parameter models to binomial data + +deguelin.m1 <- drm(r/n~dose, weights=n, data=deguelin, fct=LL.2(), type="binomial") + +deguelin.m2 <- drm(r/n~dose, weights=n, data=deguelin, fct=W1.2(), type="binomial") + +deguelin.m3 <- drm(r/n~dose, weights=n, data=deguelin, fct=W2.2(), type="binomial") + +deguelin.m4 <- drm(r/n~dose, weights=n, data=deguelin, fct=LN.2(), type="binomial") + + + + + +## Model averaged BMD for 5% additional risk with estimated background risk + +## and BMDL based on Buckland et al. + +bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, + + backgType = "modelBased", def = "additional", + + type = "Buckland") + + + +## Model averaged BMD for 5% additional risk with estimated background risk + +## and BMDL based on an average of the model curves + +bmdMA(list(deguelin.m1,deguelin.m2,deguelin.m3,deguelin.m4), modelWeights="AIC", 0.05, + + backgType = "modelBased", def = "additional", + + type = "curve", bootstrapType = "parametric", bootInterval = "percentile", R=50) + + + + + +## Fitting 4 different two-parameter models to binomial data + +ryegrass.m1<-drm(rootl~conc, data=ryegrass, fct=LL.4()) + +ryegrass.m2<-drm(rootl~conc, data=ryegrass, fct=W1.4()) + +ryegrass.m3<-drm(rootl~conc, data=ryegrass, fct=W2.4()) + +ryegrass.m4<-drm(rootl~conc, data=ryegrass, fct=LN.4()) + + + +## Model-averaged BMD and bootstrap BMDL for bmr=5% and using the hybrid approach + +## to estimate the background risk. + +bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="AIC", bmr=0.05, + + backgType = "hybridSD", def = "hybridAdd", type = "bootstrap", + + bootstrapType = "nonparametric", bootInterval = "percentile", R = 50) + + + + + +## Model-averaged BMD using the Stacking Weights + +bmdMA(list(ryegrass.m1,ryegrass.m2,ryegrass.m3,ryegrass.m4), modelWeights="Stack", bmr=0.05, + + backgType = "hybridSD", def = "hybridAdd", type = "bootstrap", + + bootstrapType = "nonparametric", bootInterval = "percentile", R = 50) + + + + + +``` + +## bmd MA curve + +```r + + + + +library(bmd) + +library(drc) + +library(drcData) + +library(ggplot2) + + + +# fit models to aconiazide data + +aconiazide.LL.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LL.3()) + +aconiazide.LN.3 <- drm(weightChange ~ dose,data = aconiazide,fct = LN.3()) + +aconiazide.W1.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W1.3()) + +aconiazide.W2.3 <- drm(weightChange ~ dose,data= aconiazide,fct = W2.3()) + + + +# plot the MA curve + +plot(aconiazide.LL.3, type = "obs") + +curve( + + MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3,aconiazide.W1.3, aconiazide.W2.3), + + modelWeights = "AIC"), + + add = TRUE) + + + +# or plot using ggplot2 + +qplotDrc(aconiazide.LL.3, type = "obs") + + + geom_function(fun = function(x){ + + MACurve(x, modelList = list(aconiazide.LL.3, aconiazide.LN.3, + + aconiazide.W1.3, aconiazide.W2.3), + + modelWeights = "AIC") + + ) + + + +``` + +## get stacking weights + +```r +getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3, + + aconiazide.W1.3, aconiazide.W2.3)) + +getStackingWeights(modelList = list(aconiazide.LL.3, aconiazide.LN.3, + + aconiazide.W1.3, aconiazide.W2.3), + + nSplits = 7) + + + +``` \ No newline at end of file diff --git a/vignettes/specialized-models.Rmd b/vignettes/specialized-models.Rmd new file mode 100644 index 0000000..f514071 --- /dev/null +++ b/vignettes/specialized-models.Rmd @@ -0,0 +1,306 @@ +--- +title: "specialized-models" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{specialized-models} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(bmd) +``` + + +## Oridnal + +```{r} + + + + +library(drc) + +library(drcData) + +data(guthion) + +guthionS <- subset(guthion, trt == "S") + + + +guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), weights = "total", + + dose = "dose", data = guthionS, fct = LL.2()) + + + +plot(guthionS.LL, xlim = c(15,55)) # uses ggplot + + +bmdOrdinal(guthionS.LL, bmr = 0.1, backgType = "modelBased", def = "excess", R = 50) + + +``` + + +### MA + +```r + + + + +library(drc) + +library(drcData) + +data(guthion) + + + +guthionS <- subset(guthion, trt == "S") + + + +guthionS.LL <- drmOrdinal(levels = c("alive", "moribund", "dead"), + + weights = "total", dose = "dose", data = guthionS, fct = LL.2()) + +guthionS.LN <- drmOrdinal(levels = c("alive", "moribund", "dead"), + + weights = "total", dose = "dose", data = guthionS, fct = LN.2()) + +guthionS.W1 <- drmOrdinal(levels = c("alive", "moribund", "dead"), + + weights = "total", dose = "dose", data = guthionS, fct = W1.2()) + +guthionS.W2 <- drmOrdinal(levels = c("alive", "moribund", "dead"), + + weights = "total", dose = "dose", data = guthionS, fct = W2.2()) + + + +bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), + + modelWeights = "AIC", bmr = 0.1, + + backgType = "modelBased", def = "excess", type = "Kang") + +bmdOrdinalMA(list(guthionS.LL, guthionS.LN, guthionS.W1, guthionS.W2), + + modelWeights = "AIC", bmr = 0.1, + + backgType = "modelBased", def = "excess", type = "bootstrap", R = 50) + +``` + + + +## Heterogenous Variance Models + + +```r + + + + +library(drc) + +library(drcData) + +library(bmd) + +# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT. + + + +# ryegrass data + +set.seed(123) + +ryegrass.LL.4.hetVar <- drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), + + data = ryegrass, fct = LL.4()) + +plot(ryegrass.LL.4.hetVar) + +bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, + + def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) + +bmdHetVar(ryegrass.LL.4.hetVar, bmr = 0.1, backgType = "hybridPercentile", backg = 0.1, + + def = "hybridExc", R = 50, level = 0.95, + + bootType = "parametric", progressInfo = TRUE, display = TRUE) # parametric bootstrap + + + +# barley data + +set.seed(123) + +barley.LL.4.hetVar <- drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), data = barley, fct = LL.4()) + +plot(barley.LL.4.hetVar) + + + +# GiantKelp data + +set.seed(123) + +GiantKelp.LL.4.hetVarSq <- drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), + + data = GiantKelp, fct = LL.4()) + +plot(GiantKelp.LL.4.hetVarSq) + + + +GiantKelp.LL.4.hetVarLogSq <- drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), + + data = GiantKelp, fct = LL.4()) + +plot(GiantKelp.LL.4.hetVarLogSq) + + + + + + + +``` + + + +```{r} + + + + +library(drc) + +library(drcData) + +library(bmd) + +# install.packages("gridExtra") # OPTIONAL - USED FOR PLOTTING A drcHetVar OBJECT. + + + +# ryegrass data + +set.seed(123) + +ryegrass.hetVar.list <- list( + + drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LL.4()), + + drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = LN.4()), + + drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W1.4()), + + drmHetVar(rootl ~ conc, ~ fitted + I(fitted^2), data = ryegrass, fct = W2.4())) + +bmdHetVarMA(ryegrass.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridPercentile", + + backg = 0.1, def = "hybridExc", R = 100, level = 0.95) + +bmdHetVarMA(ryegrass.hetVar.list, modelWeights = c(0.4, 0.2, 0.1, 0.3), bmr = 0.1, + + backgType = "hybridPercentile", backg = 0.1, + + def = "hybridExc", R = 50, level = 0.95) # user-defined weights + + + +# barley data + +set.seed(123) + +barley.hetVar.list <- list(drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), + + data = barley, fct = LL.4()), + + drmHetVar(weight ~ Dose, ~ fitted + I(fitted^2), + + data = barley, fct = W2.4())) + +bmdHetVarMA(barley.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD", backg = 2, + + def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, display = TRUE) + + + +# GiantKelp data + +set.seed(123) + +GiantKelp.hetVar.list <- list( + + drmHetVar(tubeLength ~ dose, ~ fitted + I(fitted^2), data = GiantKelp, fct = LL.4()), + + drmHetVar(tubeLength ~ dose, ~ log(dose+1) + I(log(dose+1)^2), data = GiantKelp, fct = LL.4())) + +bmdHetVarMA(GiantKelp.hetVar.list, modelWeights = "AIC", bmr = 0.1, backgType = "hybridSD", + + backg = 1, def = "hybridExc", R = 50, level = 0.95, progressInfo = TRUE, + + display = TRUE) + + + +``` + +## Mixed Models + +```{r} + + + + + +library(drc) + +library(drcData) + +library(metafor) + +library(bmd) + + + +set.seed(1) + +data0 <- data.frame(x = rep(drcData::ryegrass$conc, 2), + + y = rep(drcData::ryegrass$rootl, 2) + + + c(rnorm(n = nrow(drcData::ryegrass), mean = 2, sd = 0.5), + + rnorm(n = nrow(drcData::ryegrass), mean = 2.7, sd = 0.7)), + + EXP_ID = rep(as.character(1:2), each = nrow(drcData::ryegrass))) + + + +modMMRE <- drmMMRE(y~x, exp_id = EXP_ID, data = data0, fct = LL.4()) + +bmd(modMMRE, bmr = 0.1, backgType = "modelBased", def = "relative") + + + +``` + + + + diff --git a/vignettes/statistical-tests.Rmd b/vignettes/statistical-tests.Rmd new file mode 100644 index 0000000..31f1f73 --- /dev/null +++ b/vignettes/statistical-tests.Rmd @@ -0,0 +1,82 @@ +--- +title: "statistical-tests" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{statistical-tests} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(bmd) +``` + +# Statistical Tests Examples + +This vignette demonstrates the usage of functions related to +statistical tests. + +## Monotonicity Test + +```{r} + + + + +# Example with custom data + +x <- c(1, 2, 3, 4, 5) + +y <- c(2, 4, 6, 8, 10) + +result <- monotonicityTest(x, y, test = "jonckheere") + +print(result) + + + +data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6)) + +result <- monotonicityTest("conc", "rootl", data = drcData::ryegrass, test = "bartholomew") + +print(result) + + + + +``` + + + +## Trend Test + +```{r} + +# Example with custom data + +x <- c(1, 2, 3, 4, 5) + +y <- c(2, 4, 6, 8, 10) + +result <- trendTest(x, y, test = "tukey") + +print(result) + + + +# Example with a data frame + +data <- data.frame(x = c(1, 2, 3, 4, 5), y = c(10, 9, 8, 7, 6)) + +result <- trendTest("x", "y", data = data, test = "shirley") + +print(result) +``` + diff --git a/vignettes/utilities.Rmd b/vignettes/utilities.Rmd new file mode 100644 index 0000000..f32e985 --- /dev/null +++ b/vignettes/utilities.Rmd @@ -0,0 +1,21 @@ +--- +title: "utilities" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{utilities} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>" +) +``` + +```{r setup} +library(bmd) +``` + +Utility functions included in the package `bmd` are: "PAV", "expandBinomial", "bootDataGen", "BCa" \ No newline at end of file diff --git a/vignettes/visualization.Rmd b/vignettes/visualization.Rmd new file mode 100644 index 0000000..78fbf42 --- /dev/null +++ b/vignettes/visualization.Rmd @@ -0,0 +1,183 @@ +--- +title: "visualization" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{visualization} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + warning = FALSE, + message = FALSE +) +``` + +```{r setup} +library(bmd) +``` + +Visualization functions included in the `bmd` package are: "qplotDrc", "qplotBmd", "plot.bmd". + + +```{r} +library(drc) + +library(drcData) + + + +## Fitting model and calculating BMD. + +model <- drm(rootl ~ conc, data = ryegrass, fct = LL.4()) + +bmd0 <- bmd(model, bmr = 0.1, backgType = "modelBased", def = "relative") + + + +## Plotting + +plot(bmd0) + + + +# Plot both limits of confidence interval + +plot(bmd0, interval = "twosided") + + + +# Pass argument to plot.bmd to plot confidence band around curve + +plot(bmd0, type = "confidence") + +``` + + + +```{r} +# Plot + +qplotBmd(bmd0, interval = "twosided", add = FALSE) + + + +qplotDrc(model,type="confidence") + + + qplotBmd(bmd0, interval = "twosided", add = TRUE) + + + +qplotBmd(bmd0, interval = "twosided", add = FALSE) + + +``` + + +## qplotDrc + +```{r} + +library(drc) + +library(drcData) + +library(ggplot2) + + + +## Fitting models to be plotted below + +ryegrass.m1 <- drm(rootl~conc, data = ryegrass, fct = LL.4()) + +ryegrass.m2 <- drm(rootl~conc, data = ryegrass, fct = LL.3()) # lower limit fixed at 0 + + + +## Plotting observations and fitted curve for the first model + +p <- qplotDrc(ryegrass.m1) + +p + + + +## Add confidence region for the first model. + +p + qplotDrc(ryegrass.m1, type="confidence", add = TRUE)$confBandLayer + + + +## Plot both models + +p + qplotDrc(ryegrass.m2, add = TRUE)$curveLayer + + + +## Fitting model to be plotted below + +spinach.m1 <- drm(SLOPE~DOSE, CURVE, data = spinach, fct = LL.4()) + + + +## Plot with no colours + +qplotDrc(spinach.m1) + + + +## Plot with default colours + +qplotDrc(spinach.m1, col = TRUE) + + + +## Plot with specified colours + +qplotDrc(spinach.m1, col = TRUE) + + + scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod", + + "darkslategray4", "plum4")) + + + +## Plot of curves 1 and 2 only + +qplotDrc(spinach.m1, level = c(1,4)) + + + +## Plot with confidence regions + +qplotDrc(spinach.m1, col = TRUE, type = "confidence") + + + +## Plot points and add confidence regions. Confidence regions are coloured by the "fill" aesthetic. + +## Customising the x scale by adding a new scale. + +qplotDrc(spinach.m1, col = TRUE, type = "confidence") + + + qplotDrc(spinach.m1, col = TRUE, type = "average", add = TRUE)$obsLayer + + + scale_color_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod", + + "darkslategray4", "plum4"))+ + + scale_fill_manual(values = c("darkolivegreen4", "lightcoral", "goldenrod", + + "darkslategray4", "plum4")) + + + scale_x_continuous(trans = scales:::pseudo_log_trans(sigma = 0.2, base = exp(1))) + + + + +``` + +