Description Usage Arguments Details Value Note
Compute the probability of a threshold exceedance across a range of baseline values
1 | pExcessByBaseline(object, M, n = 200)
|
object |
An object of class 'margarita' |
M |
The threshold of interest. |
n |
The number of values to compute the probability at. Defaults to |
Creates a sequency of n
equally spaced values between the minimum and
maximum of the baseline values in the robust regression component of the margarita
object, repeats this sequence for each level of the treatment factor, gets the fitted
values from the robust regression for each baseline and treatment, then adds the
GP modelling threshold as obtained from the evmSim component of the margarita object.
The function then uses predict.evmSim
to compute the parameter matrix from
the Markov chains and then computes the probability of exceeding M
across
the range of baseline values and treatment factors.
A data.frame
with columns for baseline, treatment, threshold (linear model
fitted value plus GP threshold) and a summary of the distribution of the probabilities
of exceeding M
. The means and medians ought to be similar. Presumably a plot
of the mean over the range of baseline values is desired. The expected probabilities
could also be used to integrate over the observed baseline distribution to obtain an
estimate of the population probability of exceeding M
.
WARNING: the code has been tested with treatment as a factor and as linear numeric. More complicated structures, such as a combo of a factor and a linear effect are unliekly to work. There is a test function. Take a look at it.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.