View source: R/toplikelihood.R
toplikelihood | R Documentation |
Probability of top (maximal change in response from baseline) being outside the cutoff band.
toplikelihood(
fname,
cutoff,
conc,
resp,
ps,
top,
mll,
errfun = "dt4",
poly2.biphasic = TRUE,
verbose = FALSE
)
fname |
Model function name (equal to model name except hill which uses "hillfn") |
cutoff |
Desired cutoff. |
conc |
Vector of concentrations. |
resp |
Vector of responses. |
ps |
Vector of parameters, must be in order: a, tp, b, ga, p, la, q, er |
top |
Model predicted top, maximal predicted change in response from baseline. |
mll |
Winning model maximum log-likelihood. |
errfun |
Which error distribution to assume for each point, defaults to "dt4". "dt4" is the original 4 degrees of freedom t-distribution. Another supported distribution is "dnorm", the normal distribution. |
poly2.biphasic |
Which fitting method to use for poly2. If poly2.biphasic = TRUE, allows for biphasic polynomial 2 model fits (i.e. both monotonic and non-monotonic). (Defaults to TRUE.) |
verbose |
If verbose = TRUE, will print status of empirical calculations. (Defaults to FALSE.) |
Should only be called by hitcontinner. Uses profile likelihood, similar to bmdbounds. Here, the y-scale type parameter is substituted in such a way that the top equals the cutoff. Then the log-likelihood is compared to the maximum log-likelihood using pchisq function to retrieve probability.
Probability of top being outside the cutoff band.
fname = "hillfn"
conc = c(.03,.1,.3,1,3,10,30,100)
resp = c(0,.1,0,.2,.6,.9,1.1,1)
ps = c(1.033239, 2.453014, 1.592714, er = -3.295307)
top = 1.023239
mll = 12.71495
toplikelihood(fname, cutoff = .8, conc, resp, ps, top, mll)
toplikelihood(fname, cutoff = 1, conc, resp, ps, top, mll)
toplikelihood(fname, cutoff = 1.2, conc, resp, ps, top, mll)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.