Fit a model averaged continuous BMD model.
ma_continuous_fit(
D,
Y,
model_list = NA,
fit_type = "laplace",
BMD_TYPE = "sd",
BMR = 0.1,
point_p = 0.01,
alpha = 0.05,
samples = 21000,
burnin = 1000
)This function model object containing a list of individual fits and model averaging fits
Individual_Model_X: Here X is a number \(1\leq X \leq n,\) where \(n\)
is the number of models in the model average. For each X, this is an individual model
fit identical to what is returned in `single_continuous_fit.'
ma_bmd: The CDF of the model averaged BMD distribution.
posterior_probs: The posterior model probabilities used in the MA.
bmd: The BMD and the \(100\times(1-2\alpha)\%\) confidence intervals.
doses matrix
response matrix
a list of configurations for the single models (priors, model type). To create a model list, one creates a list of
continuous model priors using create_continuous_prior.
the method used to fit ("laplace", "mle", or "mcmc")
BMD_TYPE specifies the type of benchmark dose analysis to be performed. For continuous models, there are four types of BMD definitions that are commonly used.
- Standard deviation is the default option, but it can be explicitly specified with 'BMR_TYPE = "sd"' This definition defines the BMD as the dose associated with the mean/median changing a specified number of standard deviations from the mean at the control dose., i.e., it is the dose, BMD, that solves \(\mid f(dose)-f(0) \mid = BMR \times \sigma\)
- Relative deviation can be specified with 'BMR_TYPE = "rel"'. This defines the BMD as the dose that changes the control mean/median a certain percentage from the background dose, i.e. it is the dose, BMD that solves \(\mid f(dose) - f(0) \mid = (1 \pm BMR) f(0)\)
- Hybrid deviation can be specified with 'BMR_TYPE = "hybrid"'. This defines the BMD that changes the probability of an adverse event by a stated amount relitive to no exposure (i.e 0). That is, it is the dose, BMD, that solves \(\frac{Pr(X > x| dose) - Pr(X >x|0)}{Pr(X < x|0)} = BMR\). For this definition, \(Pr(X < x|0) = 1 - Pr(X > X|0) = \pi_0\), where \(0 \leq \pi_0 < 1\) is defined by the user as "point_p," and it defaults to 0.01. Note: this discussion assumed increasing data. The fitter determines the direction of the data and inverts the probability statements for decreasing data.
- Absolute deviation can be specified with 'BMR_TYPE="abs"'. This defines the BMD as an absolute change from the control dose of zero by a specified amount. That is the BMD is the dose that solves the equation \(\mid f(dose) - f(0) \mid = BMR\)
This option specifies the benchmark response BMR. The BMR is defined in relation to the BMD calculation requested (see BMD). By default, the "BMR = 0.1."
This option is only used for hybrid BMD calculations. It defines a probability that is the cutpoint for observations. It is the probability that observations have this probability, or less, of being observed at the background dose.
Alpha is the specified nominal coverage rate for computation of the lower bound on the BMDL and BMDU, i.e., one computes a \(100\times(1-\alpha)\%\) confidence interval. For the interval (BMDL,BMDU) this is a \(100\times(1-2\alpha)\% \). By default, it is set to 0.05.
the number of samples to take (MCMC only)
the number of burnin samples to take (MCMC only)
# \donttest{
hill_m <- function(doses){
returnV <- 481 -250.3*doses^1.3/(40^1.3 + doses^1.3)
return(returnV)
}
doses <- rep(c(0,6.25,12.5,25,50,100),each=10)
mean <- hill_m(doses)
y <- rnorm(length(mean),mean,20.14)
model <- ma_continuous_fit(doses, y, fit_type = "laplace", BMD_TYPE = 'sd', BMR = 1)
summary(model)
# }
Run the code above in your browser using DataLab