rp.logistic {rpanel} | R Documentation |
The function rp.logistic
plots a binary or binomial response variable
against a single covariates and creates a panel which controls the position of
a logistic curve and allows a logistic regression to be fitted to the data and
displayed on the plot.
rp.logistic(x, y, xlab = NA, ylab = NA, panel.plot = TRUE, line.showing = TRUE, hscale = NA, vscale = hscale)
x |
a vector of covariate values. |
y |
a vector of response values with two levels, or a two-column matrix whose first column is the number of ‘successes’ and the second column is the number of ‘failures’ at each covariate value. |
xlab |
a character variable used for the covariate axis label. |
ylab |
a character variable used for the response axis label. |
panel.plot |
a logical variable which determines whether the plot is placed inside the control panel. |
line.showing |
a logical value determining whether a regression line is shown on the plot when the function starts. |
hscale, vscale |
horizontal and vertical scaling factors for the size of the plots. It can be useful to adjust these for projection on a screen, for example. The default values are 1 on Unix platforms and 1.4 on Windows platforms. |
The control panel allows a logistic regression line to be drawn on the plot and the intercept and slope of the linear predictor altered interactively. The fitted logistic regression can also be displayed.
If y
is a vector of responses with two values, these are treated as a factor which is then converted to the (0,1) scale by as.numeric
.
The values of the response variable can be ‘jittered’.
Nothing is returned.
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
if (interactive()) { data(river) attach(river) rp.logistic(Temperature, Low) }