Description Usage Arguments Value Examples
Relevant statistics for Lehmann models of ROC curves.
1 |
formula |
A formula containing the covariates to be analyzed. |
data |
A data.frame containing the variables named in the formula. |
The output is a list of relavant statistics. theta
,
var_theta
, auc
, and var_auc
are all numerics.
partial_auc
and var_partial_auc
are both functions of the
false positive rate. roc
is a list containing numeric vectors
TPR
and FPR
. var_roc
is a function of the false
positive rate. If the input formula contains concomitant covariates,
the return list will contain functions. For example, theta
would now be a function of the covariate values. The apply_covariates
function should be used to input values of covariates into appropriate
lehmann_roc objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Import a dataset
ovarian <- survival::ovarian
head(ovarian)
# Create a Lehmann ROC model using only disease status.
l <- lehmann_roc(futime~resid.ds, ovarian)
summary(l)
plot(l)
l$theta
l$auc
l$partial_auc(0.5)
# Create a Lehmann ROC model with age as a concomitant covariate.
l <- lehmann_roc(futime~resid.ds*age, ovarian)
# The output is now a list of functions
summary(l)
## Not run:
l # errors
plot(l) # errors
## End(Not run)
# Use the apply_covariates function
l_objects <- apply_covariates(l, list(age=21))
l2 <- l_objects[["21"]]
l2
l2$partial_auc(0.5)
plot(l2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.