plotConditionalMedianFunction {SHELF}R Documentation

Plot the conditional median function

Description

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.

Usage

plotConditionalMedianFunction(
  yCP,
  xMed,
  yLimits = NULL,
  link = "identity",
  xlab = "Y",
  ylab = "median of X given Y",
  fs = 12,
  ybreaks = NULL,
  xbreaks = NULL
)

Arguments

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 yCP.

yLimits

limits for the extension variable, used to set the axis limits in the plot

link

link in the median function. One of "identity", "log" or "logit".

xlab

x-axis label

ylab

y-axis label

fs

font size

ybreaks

tick marks on the y-axis

xbreaks

tick marks on the axis

Author(s)

Jeremy Oakley <j.oakley@sheffield.ac.uk>

Examples

## 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)


[Package SHELF version 1.10.0 Index]