Estimate the parameters that best describe LD50
Logistic and logit models are the same but with different parametrization:
logistic = 1/(1+exp((1/S)*(P-d)))
logit = 1/(1+exp(P+d*S))
See these publications for the description of equations:
Girondot, M. 1999. Statistical description of temperature-dependent sex determination using maximum likelihood. Evolutionary Ecology Research, 1, 479-486.
Godfrey, M.H., Delmas, V., Girondot, M., 2003. Assessment of patterns of temperature-dependent sex determination using maximum likelihood model selection. Ecoscience 10, 265-272.
Hulin, V., Delmas, V., Girondot, M., Godfrey, M.H., Guillon, J.-M., 2009. Temperature-dependent sex determination and global change: are some species at greater risk? Oecologia 160, 493-506.
The flexit equation is not still published :
LD50(
df = NULL,
alive = NULL,
dead = NULL,
N = NULL,
doses = NULL,
l = 0.05,
parameters.initial = NULL,
fixed.parameters = NULL,
SE = NULL,
equation = "logistic",
replicates = 1000,
range.CI = 0.95,
limit.low.TRD.minimum = 5,
limit.high.TRD.maximum = 1000,
print = TRUE,
doses.plot = seq(from = 0, to = 1000, by = 0.1)
)
A dataframe with at least two columns named alive, dead or N and doses columns
A vector with alive individuals at the end of experiment
A vector with dead individuals at the end of experiment
A vector with total numbers of tested individuals
The doses
The limit to define TRD (see Girondot, 1999)
Initial values for P, S or K search as a vector, ex. c(P=29, S=-0.3)
Parameters that will not be changed during fit
Standard errors for parameters
Could be "logistic", "logit", "probit", Hill", "Richards", "Hulin", "flexit" or "Double-Richards"
Number of replicates to estimate confidence intervals
The range of confidence interval for estimation, default=0.95
Minimum lower limit for TRD
Maximum higher limit for TRD
Do the results must be printed at screen? TRUE (default) or FALSE
Sequences of doses that will be used for plotting. If NULL, does not estimate them
A list with the LD50, Transitional Range of Doses and their SE
LD50 estimates the parameters that best describe LD50
Other LD50 functions:
LD50_MHmcmc_p()
,
LD50_MHmcmc()
,
logLik.LD50()
,
plot.LD50()
,
predict.LD50()
# NOT RUN {
library("HelpersMG")
data <- data.frame(Doses=c(80, 120, 150, 150, 180, 200),
Alive=c(10, 12, 8, 6, 2, 1),
Dead=c(0, 1, 5, 6, 9, 15))
LD50_logistic <- LD50(data, equation="logistic")
predict(LD50_logistic, doses=c(140, 170))
plot(LD50_logistic, xlim=c(0, 300), at=seq(from=0, to=300, by=50))
LD50_probit <- LD50(data, equation="probit")
predict(LD50_probit, doses=c(140, 170))
plot(LD50_probit)
LD50_logit <- LD50(data, equation="logit")
predict(LD50_logit, doses=c(140, 170))
plot(LD50_logit)
LD50_hill <- LD50(data, equation="hill")
predict(LD50_hill, doses=c(140, 170))
plot(LD50_hill)
LD50_Richards <- LD50(data, equation="Richards")
predict(LD50_Richards, doses=c(140, 170))
plot(LD50_Richards)
LD50_Hulin <- LD50(data, equation="Hulin")
predict(LD50_Hulin, doses=c(140, 170))
plot(LD50_Hulin)
LD50_DoubleRichards <- LD50(data, equation="Double-Richards")
predict(LD50_DoubleRichards, doses=c(140, 170))
plot(LD50_DoubleRichards)
LD50_flexit <- LD50(data, equation="flexit")
predict(LD50_flexit, doses=c(140, 170))
plot(LD50_flexit)
# }
Run the code above in your browser using DataLab