nomogram.mk6 {QHScrnomo} | R Documentation |
Construct a Nomogram for a Regression Model
Description
Draws a partial nomogram that can be used to manually obtain predicted values. This is a modified version of nomogram
.
Usage
nomogram.mk6(
fit,
...,
adj.to,
lp = TRUE,
lp.at,
lplabel = "Linear Predictor",
fun,
fun.at,
fun.lp.at,
funlabel = "Predicted Value",
fun.side,
interact = NULL,
intercept = 1,
conf.int = FALSE,
col.conf = c(1, 12),
conf.space = c(0.08, 0.2),
conf.lp = c("representative", "all", "none"),
est.all = TRUE,
abbrev = FALSE,
minlength = 4,
maxscale = 100,
nint = 10,
label.every = 1,
force.label = FALSE,
xfrac = 0.35,
cex.axis = 0.85,
cex.var = 1,
col.grid = NULL,
vnames = c("labels", "names"),
varname.label = TRUE,
varname.label.sep = "=",
ia.space = 0.7,
tck = NA,
tcl = -0.25,
lmgp = 0.4,
omit = NULL,
naxes,
points.label = "Points",
total.points.label = "Total Points",
total.sep.page = FALSE,
total.fun,
verbose = FALSE,
cap.labels = FALSE,
total.min,
total.max,
survtime,
mikeomit = NULL
)
Arguments
fit |
A regression model that was created with |
... |
Settings of variables to use in constructing axes.
If |
adj.to |
If you didn't define |
lp |
Set to |
lp.at |
If |
lplabel |
label for linear predictor axis.
Default is |
fun |
on another axis. If more than one transformation is plotted,
put them in a list, e.g. |
fun.at |
function values to label on axis. Default |
fun.lp.at |
If you want to
evaluate one of the functions at a different set of linear predictor
values than may have been used in constructing the linear predictor axis,
specify a vector or list of vectors
of linear predictor values at which to evaluate the function. This is
especially useful for discrete functions. The presence of this attribute
also does away with the need for |
funlabel |
label for |
fun.side |
a vector or list of vectors of |
interact |
When a continuous variable interacts with a discrete one,
axes are constructed so that the continuous variable moves within the axis,
and separate axes represent levels of interacting factors. For
interactions between two continuous variables, all but the axis variable
must have discrete levels defined in |
intercept |
for models such as the ordinal logistic model with multiple intercepts, specifies which one to use in evaluating the linear predictor. |
conf.int |
confidence levels to display for each scoring.
Default is |
col.conf |
colors corresponding to |
conf.space |
a 2-element vector with the vertical range within which to draw confidence bars, in units of 1=spacing between main bars. Four heights are used within this range (8 for the linear predictor if more than 16 unique values were evaluated), cycling them among separate confidence intervals to reduce overlapping |
conf.lp |
default is |
est.all |
To plot axes for only the subset of variables named in
|
abbrev |
Set to |
minlength |
|
maxscale |
default maximum point score is 100 |
nint |
number of intervals to label for axes representing continuous
variables.
See |
label.every |
Specify |
force.label |
set to |
xfrac |
fraction of horizontal plot to set aside for axis titles |
cex.axis |
character size for tick mark labels |
cex.var |
character size for axis titles (variable names) |
col.grid |
If left unspecified, no vertical reference lines are drawn.
Specify a vector of length one (to use the same color for both minor and
major reference lines) or two (corresponding to the color for the major and
minor divisions, respectively) containing colors, to cause vertical
reference lines to the top points scale to be drawn. For R, a good choice
is |
vnames |
By default, variable labels are used to label axes. Set
|
varname.label |
In constructing axis titles for interactions, the
default is to add |
varname.label.sep |
If |
ia.space |
When multiple axes are draw for levels of interacting factors, the default is to group combinations related to a main effect. This is done by spacing the axes for the second to last of these within a group only 0.7 (by default) of the way down as compared with normal space of 1 unit. |
tck |
see |
tcl |
length of tick marks in nomogram |
lmgp |
spacing between numeric axis labels and axis
(see |
omit |
vector of character strings containing names of variables for which to suppress drawing axes. Default is to show all variables. |
naxes |
maximum number of axes to allow on one plot. If the nomogram requires more than one “page”, the “Points” axis will be repeated at the top of each page when necessary. |
points.label |
a character string giving the axis label for the points scale |
total.points.label |
a character string giving the axis label for the total points scale |
total.sep.page |
set to |
total.fun |
a user-provided function that will be executed before the
total points axis is drawn. Default is not toe xecute a function.
This is useful e.g. when |
verbose |
set to |
cap.labels |
logical: should the factor labels have their first letter capitalized? |
total.min |
the minimum point for the total point axis |
total.max |
the maxmum point for the total point axis |
survtime |
specified survival time for the predicted survival probability |
mikeomit |
a modified version of |
Value
A nomogram
Note
Used internally for nomogram.crr
. See nomogram
.
References
Banks J: Nomograms. Encylopedia of Statistical Sciences, Vol 6. Editors: S Kotz and NL Johnson. New York: Wiley; 1985.
Lubsen J, Pool J, van der Does, E: A practical device for the application of a diagnostic or prognostic function. Meth. Inform. Med. 17:127–129; 1978.
Wikipedia: Nomogram, https://en.wikipedia.org/wiki/Nomogram.
See Also
nomogram.crr
rms
nomogram
plot.summary.rms
axis
pretty
approx
Examples
data(prostate.dat)
dd <- datadist(prostate.dat)
options(datadist = "dd")
prostate.f <- cph(Surv(TIME_EVENT,EVENT_DOD == 1) ~ TX + rcs(PSA,3) +
BX_GLSN_CAT + CLIN_STG + rcs(AGE,3) +
RACE_AA, data = prostate.dat,
x = TRUE, y= TRUE, surv=TRUE,time.inc = 144)
## make a cph nomogram
nomogram.mk6(prostate.f, survtime=120, lp=FALSE,
funlabel = "Predicted 10-year cumulative incidence")