Description Usage Arguments Value Examples
View source: R/plotting_functions.R
Plot elicited data, fitted marginals or model output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  plotDesignPoint(
Z,
X = NULL,
design.pt = NULL,
elicited.fractiles = TRUE,
fitted.fractiles = FALSE,
fitted.curve = FALSE,
CI.prob = NULL,
estimated.probs = NULL,
modelled.fractiles = FALSE,
modelled.curve = FALSE,
cumul.prob.bounds = c(0.05, 0.95),
theta.bounds = NULL,
ylim.max = NULL,
xlog = FALSE,
design.table = TRUE,
n.pts = 101
)

Z 
list object that contains matrix 
X 
design matrix (can be 
design.pt 
single integer that denotes design point of interest 
elicited.fractiles 
logical, plot vertical lines for elicited fractiles? 
fitted.fractiles 
logical, plot vertical lines for fitted conditional
mean prior fractiles for this design point? Alternatively, a numeric vector of arbitrary fractiles to be
plotted from the fitted elicitation distribution. If 
fitted.curve, 
logical plot fitted conditional mean prior density for this design point? 
CI.prob 
numeric scalar, locally specified probability assigned to the
elicited central credible interval of the current design point. Defaults to

estimated.probs 
numeric vector of values for which estimated
probabilities are to be estimated from the fitted elicitation
distribution for the target theta. Default is 
modelled.fractiles 
logical, plot vertical lines for modelled
fractiles from the conditional mean prior distribution fit to
all design points? This option requires a design matrix 
modelled.curve 
logical, plot modelled conditional mean prior density for
the entire model? This option requires a design matrix 
cumul.prob.bounds 
numeric vector of length two, giving plot bounds by
cumulative probability. This argument is ignored if there is not enough data
to fit a parametric distribution or if 
theta.bounds 
numeric vector giving support of response for plotting
purposes (can be 
ylim.max 
numeric maximum value of yaxis (can be 
xlog 
logical log xaxis 
design.table 
logical include design dataframe, elicited fractiles and modelled or fitted fractiles 
n.pts 
numeric giving number of point to evalate density curve (if plotted) 
a plot to the current device. See dev.cur()
to check.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51  # design matrix: two scenarios
X < matrix(c(1, 1, 0, 1), nrow = 2)
rownames(X) < c("scenario1", "scenario2")
colnames(X) < c("covariate1", "covariate2")
# logit link
# central credible intervals with probability = 1/2
Z < designLink(design = X, link = "logit", CI.prob = 0.5)
# 1st design point
# no elicited fractiles
indirect::plotDesignPoint(Z, design.pt = 1)
# elicited median
Z < indirect::elicitPt(Z, design.pt = 1,
lower.CI.bound = NA,
median = 0.4,
upper.CI.bound = NA,
CI.prob = NULL)
indirect::plotDesignPoint(Z, design.pt = 1,
elicited.fractiles = TRUE, theta.bounds = c(0, 1))
# lower and upper quartiles and median
Z < indirect::elicitPt(Z, design.pt = 1,
lower.CI.bound = 0.2,
median = 0.4,
upper.CI.bound = 0.6,
comment = "Completed.")
indirect::plotDesignPoint(Z, design.pt = 1,
elicited.fractiles = TRUE, theta.bounds = c(0, 1),
fitted.fractiles = TRUE, fitted.curve = TRUE)
indirect::plotDesignPoint(Z, design.pt = 1,
elicited.fractiles = TRUE, theta.bounds = c(0, 1),
fitted.fractiles = c(1/10, 1/4, 1/2, 3/4, 9/10),
fitted.curve = TRUE)
# second design point
# central credible intervals with probability = 1/3
# elicit upper and lower tertiles
Z < elicitPt(Z, design.pt = 2,
lower.CI.bound = 0.1,
upper.CI.bound = 0.3,
CI.prob = 1/3,
comment = "Switched to tertiles.")
indirect::plotDesignPoint(Z, design.pt = 2,
elicited.fractiles = TRUE, theta.bounds = c(0, 1))
indirect::plotDesignPoint(Z, design.pt = 2,
elicited.fractiles = TRUE, theta.bounds = c(0, 1),
fitted.fractiles = TRUE, fitted.curve = TRUE)
indirect::plotDesignPoint(Z, design.pt = 2,
elicited.fractiles = TRUE, theta.bounds = c(0, 1),
fitted.fractiles = c(1/10, 1/3, 1/2, 2/3, 9/10),
fitted.curve = TRUE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.