Internal function
dot-rcspline.plot.RdAdjusted version of the rcspline.plot function where only the output is returned and no plot is made
Usage
.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
)Arguments
- x
a numeric predictor
- y
a numeric response. For binary logistic regression,
yshould be either 0 or 1.- model
"logistic"or"cox". For"cox", uses thecoxph.fitfunction withmethod="efron"argument set.- xrange
range for evaluating
x, default is \(f\) and \(1 - f\) quantiles ofx, where \(f = \frac{10}{\max{(n, 200)}}\) and \(n\) the number of observations- event
event/censoring indicator if
model="cox". Ifeventis present,modelis assumed to be"cox"- nk
number of knots
- knots
knot locations, default based on quantiles of
x(byrcspline.eval)- show
"xbeta"or"prob"- what is plotted ony-axis- adj
optional matrix of adjustment variables
- xlab
x-axis label, default is the “label” attribute ofx- ylab
y-axis label, default is the “label” attribute ofy- ylim
y-axis limits for logit or log hazard- plim
y-axis limits for probability scale- plotcl
plot confidence limits
- showknots
show knot locations with arrows
- add
add this plot to an already existing plot
- plot
logical to indicate whether a plot has to be made.
FALSEsuppresses the plot.- subset
subset of observations to process, e.g.
sex == "male"- lty
line type for plotting estimated spline function
- noprint
suppress printing regression coefficients and standard errors
- m
for
model="logistic", plot grouped estimates with triangles. Each group containsmordered observations onx.- smooth
plot nonparametric estimate if
model="logistic"andadjis not specified- bass
smoothing parameter (see
supsmu)- main
main title, default is
"Estimated Spline Transformation"- statloc
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 actualxandycoordinates. Use"none"to suppress statistics.