clearanceEstimatorBayes estimates the parasite clearance rates by using a Bayesian hierarchical model.
Moreover, it provides regression analysis of clearance rates on given covariates.
clearanceEstimatorBayes(data, covariates = NULL, seed = 1234,
detect.limit = 40, outlier.detect = TRUE, conf.level = 0.95,
niteration = 1e+05, burnin = 500, thin = 50,
filename = "output.csv")a data frame containing the profiles of patients.
This data frame must contain id, time, and count columns,
in that order. The first column represents the IDs of patients.
The second and third columns contain parasite measurements (per microliter) in different times.
an optional data frame containing individual level covariates. This argument may be NULL,
in which case estimation of clearance rates is of primary interest.
a user-specified number used to initialize a pseudorandom number generator.
The default value is set to be 1234 for reproducibility. If seed = NULL, then its value will be
automatically obtained from the system clock.
detection limit of the parasite density in blood (parasites per microliter)
indicator of whether or not to use Flegg's outlier detection method.
outlier.detect = TRUE is recommended.
required confidence level for reporting credible intervals
total number of simulations after the burn-in period
length of the burn-in period in the MCMC used in clearanceEstimatorBayes
step size of the thinning process in the MCMC used in clearanceEstimatorBayes
the name of the csv file used to store some output elements. This file contains
id, clearance.mean, lag.median, and tail.median.
The function summary (i.e., summary.bhrcr) can be used to obtain a summary of the results.
clearanceEstimatorBayes returns an object of class "bhrcr" which is a list containing:
function call
posterior distributions of clearance rates
mean values of the posterior distributions of clearance rates
median values of the posterior distributions of clearance rates
posterior distributions of the intercepts (alpha_i's) in the model
posterior distribution of gamma
thinned posterior sample of gamma
mean values of the posterior distribution of gamma
median values of the posterior distribution of gamma
Credible intervals for gamma
posterior distribution for the effect of covariates on log half-lives
mean values of the posterior distribution for the effect of covariates on log half-lives
median values of the posterior distribution for the effect of covariates on log half-lives
Credible intervals for the effect of covariates on log half-lives
PCE estimates
posterior distribution of eta
posterior distributions of changetime between lag and decay phases
posterior distributions of changetime between decay and tail phases
median values of the posterior distributions of changetime between lag and decay phases
median values of the posterior distributions of changetime between decay and tail phases
posterior variance of epsilon after simulation
thinned posterior sample of variance of epsilon
posterior distribution of variance of alpha
posterior distribution of variance of beta
a list containing each patient's indices in the data
Original parasite counts of all patients
Parasite counts of all patients after sampling censored measurements
measurement times of all patients
posterior value of the priori probability of there being a lag phase after simulation
thinned posterior sample of the priori probability of there being a lag phase
posterior value of the priori probability of there being a tail phase after simulation
thinned posterior sample of the priori probability of there being a tail phase
posterior distribution of c^2
posterior distribution of d^2
posterior distribution of a
posterior distribution of b
the detection limit of parasitemia
posterior distributions of index of changetime between lag and decay phases
posterior distributions of index of changetime between decay and tail phases
posterior distributions of log-parasite-count's mean in lag phase
posterior distributions of log-parasite-count's mean in tail phase
length of the burn-in period
This function estimates parasite clearance rates, along with the effect of covariates on them, by using the Bayesian hierarchical model which was introduced in Fogarty et al. (2015). A change point model is used on the log of the parasite densities to account for three potential phases: (1) a constant phase (the lag phase); (2) a phase with a linear decrease (decay phase); (3) another constant phase (the tail phase). Hence the estimation of the parasite clearance rate is only based on observations within the decay phase. The Bayesian approach allows us to treat the delineation between lag, decay, and tail phases within an individual's clearance profile as themselves being random variables, thus taking into account the additional uncertainty of boundaries between phases. Details are in Fogarty et al. (2015).
Flegg, J. A., Guerin, P. J., White, N. J., & Stepniewska, K. (2011). Standardizing the measurement of parasite clearance in falciparum malaria: the parasite clearance estimator. Malaria journal, 10(1), 339.
Fogarty, C. B., Fay, M. P., Flegg, J. A., Stepniewska, K., Fairhurst, R. M., & Small, D. S. (2015). Bayesian hierarchical regression on clearance rates in the presence of "lag" and "tail" phases with an application to malaria parasites. Biometrics, 71(3), 751-759.
# NOT RUN {
data("pursat")
data("pursat_covariates")
out <- clearanceEstimatorBayes(data = pursat, covariates = pursat_covariates, outlier.detect = TRUE,
niteration = 200, burnin = 50, thin = 10)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab