Title: | Analyze Bioassays and Probit Graphs |
---|---|
Description: | A robust framework for analyzing mortality data from bioassays for one or several strains/lines/populations. |
Authors: | Piyal Karunarathne [aut, cre] , Pascal Milesi [aut] , Pierrick Labbé [aut] |
Maintainer: | Piyal Karunarathne <[email protected]> |
License: | AGPL (>= 3) |
Version: | 1.1.900 |
Built: | 2024-11-15 10:08:05 UTC |
Source: | https://github.com/milesilab/biorssay |
Example bioassay data set
data(bioassay)
data(bioassay)
An object of class list
of length 2.
data(bioassay) head(bioassay$assay1)
data(bioassay) head(bioassay$assay1)
This function is used when comparing at least two strains. It tests whether the mortality-dose regressions are similar for different strains, using a likelihood ratio test (LRT). If there are more than two strains, it also computes pairwise tests, using sequential Bonferroni correction (Hommel, 1988) to account for multiple testing.
model.signif(data, full.pval = FALSE)
model.signif(data, full.pval = FALSE)
data |
a data frame of probit transformed mortality data using the function probit.trans |
full.pval |
logical. If TRUE, output prints the complete length of the pvalue both for the model and the comparison of strains. If FALSE (default), output pvalue is rounded to five decimals. |
A global LRT test assesses a strain’s effect, by comparing two models, one with and one without this effect (i.e. comparing a model with several strains to a model where all the data originate from a single strain). If there are more than two strains, pairwise tests are computed, and p-values of significance are assessed using sequential Bonferroni correction (Hommel, 1988) to account for multiple testing.
Warning: We strongly encourage users to not use this function when the dose-mortality response for at least one strain significantly deviates from linearity (see resist.ratio() function for more details): in such cases the test cannot be interpreted.
a list with model outputs: a chi-square test if there are only two strains or if there are more than two strains, first an overall model assessment (i.e. one strain vs. all) and given overall model is significant, then a bonferroni test of significance from a pairwise model comparison.
Pascal Milesi, Piyal Karunarathne, Pierrick Labbé
data(bioassay) transd<-probit.trans(bioassay$assay2) data<-transd$tr.data model.signif(data)
data(bioassay) transd<-probit.trans(bioassay$assay2) data<-transd$tr.data model.signif(data)
This function plots the probit-transformed mortalities (probit.trans()
function) as a function of the log10 of the dose, the regressions predicted
by the resist.ratio() function, with or without confidence levels, if the
dose-mortality responses are linear (option).
mort.plot( data, strains = NULL, plot.conf = TRUE, conf.level = 0.95, LD.value = c(25, 50, 95), test.validity = TRUE, legend.par = c("bottomleft"), ... )
mort.plot( data, strains = NULL, plot.conf = TRUE, conf.level = 0.95, LD.value = c(25, 50, 95), test.validity = TRUE, legend.par = c("bottomleft"), ... )
data |
a data frame of probit transformed mortality data using the
function |
strains |
character. list of test strains to be plotted. If not provided, the function will plot all the strains in the data set. |
plot.conf |
logical. Whether to plot the confidence intervals for each strain, default TRUE |
conf.level |
numerical. The confidence interval to be plotted |
LD.value |
numerical. Level of lethal dose to be tested. default=c(25,50,95) |
test.validity |
logical. When TRUE (default), if a strain
mortality-dose response fails the chi-square test for linearity in the
|
legend.par |
multi-type. Arguments to be passed to the legend as in
|
... |
parameters to be passed on to graphics for the plot (e.g. col, pch) |
A plot of dose-mortality responses for bioassays
Piyal Karunarathne, Pascal Milesi, Pierrick Labbé
data(bioassay) transd<-probit.trans(bioassay$assay2) data<-transd$tr.data strains<-levels(data$strain) mort.plot(data,strains)
data(bioassay) transd<-probit.trans(bioassay$assay2) data<-transd$tr.data strains<-levels(data$strain) mort.plot(data,strains)
This function applies probit transformation to the data, after applying Abbott's correction (see reference) when control groups (e.g. unexposed susceptible strain) show non-negligible mortality.
probit.trans(dataf, conf = 0.05)
probit.trans(dataf, conf = 0.05)
dataf |
a data frame of mortality data containing four mandatory columns "strain", "dose", "total", "dead" (not necessarily in that order). |
conf |
numerical. Threshold for the mortality in the controls above which the correction should be applied (default=0.05) |
Returns a list. convrg: with correction values and convergence (NULL if mortality in the controls is below conf.), tr.data: transformed data
Pascal Milesi, Piyal Karunarathne, Pierrick Labbé
Abbott, WS (1925). A method of computing the effectiveness of an insecticide. J. Econ. Entomol.;18:265‐267.
data(bioassay) transd<-probit.trans(bioassay)
data(bioassay) transd<-probit.trans(bioassay)
Using a generalized linear model (GLM, logit link function), this function computes the lethal doses for 25 of the population (LD25, LD50 and LD95, resp.), and their confidence intervals (LDmax and LDmin, 0.95 by default). See details for more info.
resist.ratio( data, conf.level = 0.95, LD.value = c(25, 50, 95), ref.strain = NULL, plot = FALSE, plot.conf = TRUE, test.validity = TRUE, legend.par = c("bottomright"), ... )
resist.ratio( data, conf.level = 0.95, LD.value = c(25, 50, 95), ref.strain = NULL, plot = FALSE, plot.conf = TRUE, test.validity = TRUE, legend.par = c("bottomright"), ... )
data |
a data frame of probit-transformed mortality data using the function probit.trans() |
conf.level |
numerical. level for confidence intervals to be applied to the models (default 0.95) |
LD.value |
numerical. Level of lethal dose to be tested. default=c(25,50,95) |
ref.strain |
character. name of the reference strain if present (see details) |
plot |
logical. Whether to draw the plot. Default FALSE |
plot.conf |
logical. If plot=TRUE, whether to plot the 95 percent confidence intervals. Default TRUE |
test.validity |
logical. If plot=TRUE (default), the regression for a strain that failed the linearity test is not plotted |
legend.par |
arguments to be passed on to |
... |
parameters to be passed on to graphics for the plot (e.g. col, pch) |
If a name is provided in ref.strain=, it will be used as the reference to compute the resistance ratios (RR). Alternatively, the function will look for a strain with the suffix "-ref" in the dataset. If this returns NULL, the strain with the lowest LD50 will be considered as reference.
In addition to LD values, the function in a nutshell uses a script modified from Johnson et al (2013), which allows taking the g factor into account ("With almost all good sets of data, g will be substantially smaller than 1.0 and seldom greater than 0.4." Finney, 1971) and the heterogeneity (h) of the data (Finney, 1971) to calculate the confidence intervals (i.e. a larger heterogeneity will increase the confidence intervals). It also computes the corresponding resistance ratios (RR), i.e. the ratios between a given strain and the strain with the lower LD50 and LD95, respectively for RR50 and RR95 (usually, it is the susceptible reference strain), with their 95 Robertson and Preisler (1992). Finally, it also computes the coefficients (slope and intercept, with their standard error) of the linear regressions) and tests for the linearity of the dose-mortality response using a chi-square test (Chi(p)) between the observed dead numbers (data) and the dead numbers predicted by the regression (the test is significant if the data is not linear, e.g. mixed populations).
Returns a data frame with the various estimates mentioned above. If plot=TRUE, plots the mortality on a probit-transformed scale against the log_10 doses.
Pascal Milesi, Piyal Karunarathne, Pierrick Labbé
Finney DJ (1971). Probitanalysis. Cambridge:Cambridge University Press. 350p.
Hommel G (1988). A stage wise rejective multiple test procedure based on a modified Bonferroni test. Biometrika 75, 383-6.
Johnson RM, Dahlgren L, Siegfried BD, Ellis MD (2013). Acaricide,fungicide and drug interactions in honeybees (Apis mellifera). PLoSONE8(1): e54092.
Robertson, J. L., and H.K. Preisler.1992. Pesticide bioassays with arthropods. CRC, Boca Raton, FL.
data(bioassay) transd<-probit.trans(bioassay$assay2) data<-transd$tr.data resist.ratio(data,plot=TRUE)
data(bioassay) transd<-probit.trans(bioassay$assay2) data<-transd$tr.data resist.ratio(data,plot=TRUE)