Adjusted version of the rcspline.plot
function where only the output is returned and no plot is made
.rcspline.plot(
x,
y,
model = c("logistic", "cox", "ols"),
xrange,
event,
nk = 5,
knots = NULL,
show = c("xbeta", "prob"),
adj = NULL,
xlab,
ylab,
ylim,
plim = c(0, 1),
plotcl = TRUE,
showknots = TRUE,
add = FALSE,
plot = TRUE,
subset,
lty = 1,
noprint = FALSE,
m,
smooth = FALSE,
bass = 1,
main = "auto",
statloc
)
list with components (knots, x, xbeta, lower, upper) which are respectively the knot locations, design matrix, linear predictor, and lower and upper confidence limits
a numeric predictor
a numeric response. For binary logistic regression, y
should be either 0 or 1.
"logistic"
or "cox"
. For "cox"
, uses the coxph.fit
function with method="efron"
argument set.
range for evaluating x
, default is \(f\) and \(1 - f\) quantiles of x
,
where \(f = \frac{10}{\max{(n, 200)}}\) and \(n\) the number of observations
event/censoring indicator if model="cox"
. If event
is present, model
is assumed to be "cox"
number of knots
knot locations, default based on quantiles of x
(by rcspline.eval
)
"xbeta"
or "prob"
- what is plotted on y
-axis
optional matrix of adjustment variables
x
-axis label, default is the “label” attribute of x
y
-axis label, default is the “label” attribute of y
y
-axis limits for logit or log hazard
y
-axis limits for probability scale
plot confidence limits
show knot locations with arrows
add this plot to an already existing plot
logical to indicate whether a plot has to be made. FALSE
suppresses the plot.
subset of observations to process, e.g. sex == "male"
line type for plotting estimated spline function
suppress printing regression coefficients and standard errors
for model="logistic"
, plot grouped estimates with triangles. Each group contains m
ordered observations on x
.
plot nonparametric estimate if model="logistic"
and adj
is not specified
smoothing parameter (see supsmu
)
main title, default is "Estimated Spline Transformation"
location of summary statistics. Default positioning by clicking left mouse button where upper left corner of statistics should appear.
Alternative is "ll"
to place below the graph on the lower left, or the actual x
and y
coordinates. Use "none"
to suppress statistics.
lrm
, cph
, rcspline.eval
, plot
, supsmu
,
coxph.fit
, lrm.fit