View source: R/extensionScripts.R
plotConditionalMedianFunction | R Documentation |
Produces a plot of the conditional median function, given a set of conditioning points for the extension variable, a set of corresponding medians of the target variable, given the extension variable, and a choice of link. The identity link is the default, a log link can be used for non-negative target variables, and a logit link can be used for target variables constrained to lie between 0 and 1.
plotConditionalMedianFunction(
yCP,
xMed,
yLimits = NULL,
link = "identity",
xlab = "Y",
ylab = "median of X given Y",
fs = 12,
ybreaks = NULL,
xbreaks = NULL
)
yCP |
vector of conditioning points for the extension variable. |
xMed |
vector of medians of the target variable, corresponding to
each value of the extension variable in |
yLimits |
limits for the extension variable, used to set the axis limits in the plot |
link |
link in the median function. One of |
xlab |
x-axis label |
ylab |
y-axis label |
fs |
font size |
ybreaks |
tick marks on the y-axis |
xbreaks |
tick marks on the axis |
Jeremy Oakley <j.oakley@sheffield.ac.uk>
## Not run:
plotConditionalMedianFunction(yCP = c(3, 5, 7, 9.5, 13.5),
xMed = c(2, 6.5, 9, 13, 20),
yLimits = c(0, 20),
link = "log")
plotConditionalMedianFunction(yCP = c(2, 4, 6, 8, 10),
xMed = c(0.1, 0.3, 0.5, 0.7, 0.9),
yLimits = c(0, 15),
link = "logit")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.