
Last chance! 50% off unlimited learning
Sale ends in
rcspline.plot
function does not allow for interactions as do
lrm
and cph
, but it can provide detailed output for
checking spline fits. This function uses the rcspline.eval
,
lrm.fit
, and Therneau's coxph.fit
functions
and plots the estimated spline regression and confidence limits,
placing summary statistics on the graph. If there are no
adjustment variables, rcspline.plot
can also plot two alternative
estimates of the regression function when model="logistic"
:
proportions or logit
proportions on grouped data, and a nonparametric estimate. The
nonparametric regression estimate is based on smoothing the binary
responses and taking the logit transformation of the smoothed
estimates, if desired. The smoothing uses supsmu
.rcspline.plot(x,y,model="logistic",xrange,event,nk=5,knots=NULL,
show="xbeta",adj=NULL,xlab,ylab,ylim,plim=c(0,1),plotcl=TRUE,
showknots=TRUE,add=FALSE,subset,lty=1,noprint=FALSE,m,smooth=FALSE,bass=1,
main="auto",statloc)
y
should be 0-1
."logistic"
or "cox"
. For "cox"
, uses the coxph.fit
with
method="efron"
.
function.x
, default is f
and 1-f
quantiles of x
,
where f=10/max(n,200)
model="cox"
. If event
is
present, model
is assumed to be "cox"
x
(by
rcspline.eval
)"xbeta"
or "prob"
- what is plotted on y
-axisx
-axis label, default is "label"
attribute of x
y
y
-axis limits for logit or log hazardy
-axis limits for probability scalesubset=sex=="male"
model="logistic"
, plot grouped estimates with triangles. Each
group contains m
ordered observations on x
.model="logistic"
and adj
is
not specifiedsupsmu
)"Estimated Spline Transformation"
"ll"
to place below the graph on the
lower left, or the actual x
and y
knots, x, xbeta, lower, upper
which are respectively
the knot locations, design matrix, linear predictor, and lower and upper
confidence limitslrm
, cph
, rcspline.eval
, plot
, supsmu
, coxph.fit
, lrm.fit
# rcspline.plot(cad.dur, tvdlm, m=150)
# rcspline.plot(log10(cad.dur+1), tvdlm, m=150)
Run the code above in your browser using DataLab