plot_dfa {pooling} | R Documentation |
Plot Log-OR vs. X for Normal Discriminant Function Approach
Description
Archived on 7/23/2018. Please use plot_ndfa
instead.
Usage
plot_dfa(estimates, varcov = NULL, xrange, xname = "X", cvals = NULL,
set_labels = NULL, set_panels = TRUE)
Arguments
estimates |
Numeric vector of point estimates for
|
varcov |
Numeric matrix with variance-covariance matrix for
|
xrange |
Numeric vector specifying range of X values to plot. |
xname |
Character vector specifying name of X variable, for plot title and x-axis label. |
cvals |
Numeric vector or list of numeric vectors specifying covariate values to use in log-odds ratio calculations. |
set_labels |
Character vector of labels for the sets of covariate
values. Only used if |
set_panels |
Logical value for whether to use separate panels for each set of covariate values, as opposed to using different colors on a single plot. |
Value
Plot of log-OR vs. X
generated by
ggplot
.
Examples
# Fit discriminant function model for poolwise Xtilde vs. (Y, C), without
# assuming a constant log-OR. Ignoring processing errors for simplicity.
data(pdat1)
fit <- p_dfa_xerrors(g = pdat1$g, y = pdat1$numcases, xtilde = pdat1$xtilde,
c = pdat1$c, errors = "neither", constant_or = FALSE)
# Plot estimated log-OR vs. X at mean value for C
p <- plot_dfa(estimates = fit$estimates, varcov = fit$theta.var,
xrange = range(pdat1$xtilde / pdat1$g),
cvals = mean(pdat1$c / pdat1$g))
p
[Package pooling version 1.1.2 Index]