View source: R/presence.absence.summary.R
presence.absence.summary | R Documentation |
Produces four types of Presence/Absence accuracy plots for a single set of model Predictions.
presence.absence.summary(DATA, threshold = 101, find.auc = TRUE, which.model = 1, na.rm = FALSE, main = NULL, model.names = NULL, alpha = 0.05, N.bins = 5, N.bars = 10, truncate.tallest = FALSE, opt.thresholds = NULL, opt.methods = NULL, req.sens, req.spec, obs.prev = NULL, smoothing = 1, vert.lines = FALSE, add.legend = TRUE, add.opt.legend=TRUE, legend.cex = 0.6, opt.legend.cex = 0.6, pch = NULL, FPC, FNC, cost.line = FALSE)
DATA |
a matrix or dataframe of observed and predicted values where each row represents one plot and where columns are:
| |||||||||||||||||||||||||||||||||
threshold |
cutoff values between zero and one used for translating predicted probabilities into 0 /1 values, defaults to 0.5. It can be a single value between zero and one, a vector of values between zero and one, or a positive integer representing the number of evenly spaced thresholds to calculate. | |||||||||||||||||||||||||||||||||
find.auc |
a logical indicating if area under the curve should be calculated | |||||||||||||||||||||||||||||||||
which.model |
a number indicating which model from | |||||||||||||||||||||||||||||||||
na.rm |
a logical indicating whether missing values should be removed | |||||||||||||||||||||||||||||||||
main |
an overall title for the plot | |||||||||||||||||||||||||||||||||
model.names |
a vector of the names of each model included in | |||||||||||||||||||||||||||||||||
alpha |
alpha value for confidence intervals for | |||||||||||||||||||||||||||||||||
N.bins |
integer giving number of bins for predicted probabilities for | |||||||||||||||||||||||||||||||||
N.bars |
number of bars in histogram | |||||||||||||||||||||||||||||||||
truncate.tallest |
a logical indicating if the tallest bar should be truncated to fit for | |||||||||||||||||||||||||||||||||
opt.thresholds |
a logical indicating whether the optimal thresholds should be calculated and plotted | |||||||||||||||||||||||||||||||||
opt.methods |
what methods should be used to optimize thresholds. Argument can be given either as a vector of method names or method numbers. Possible values are:
| |||||||||||||||||||||||||||||||||
req.sens |
a value between zero and one giving the user defined required sensitivity. Only used if | |||||||||||||||||||||||||||||||||
req.spec |
a value between zero and one giving the user defined required sspecificity. Only used if | |||||||||||||||||||||||||||||||||
obs.prev |
observed prevalence for | |||||||||||||||||||||||||||||||||
smoothing |
smoothing factor for maximizing/minimizing. Only used if | |||||||||||||||||||||||||||||||||
vert.lines |
a logical where: | |||||||||||||||||||||||||||||||||
add.legend |
logical indicating if a legend should be included on the plot | |||||||||||||||||||||||||||||||||
add.opt.legend |
logical indicating if optimization criteria legend should be included on the plot | |||||||||||||||||||||||||||||||||
legend.cex |
cex for legends | |||||||||||||||||||||||||||||||||
opt.legend.cex |
cex for optimization criteria legend | |||||||||||||||||||||||||||||||||
pch |
plotting "character", i.e., symbol to use for the thresholds specified in | |||||||||||||||||||||||||||||||||
FPC |
False Positive Costs, or for C/B ratio C = 'net costs of treating nondiseased individuals'. | |||||||||||||||||||||||||||||||||
FNC |
False Negative Costs, or for C/B ratio B = 'net benefits of treating diseased individuals'. | |||||||||||||||||||||||||||||||||
cost.line |
a logical indicating if the line representing the realtive cost ratio should be added to the plot. |
presence.absence.summary
produces a set of summary plots for a single model, along with calculating AUC and optimal thresholds. presence.absence.summary
is not quite as flexible as the individual plot functions, as some arguments are preset so that the plots will be comparable, but the remaining arguments have the same meaning. See the individual plot functions error.threshold.plot, auc.roc.plot, calibration.plot, and presence.absence.hist for further details.
creates a graphical plot
Elizabeth Freeman eafreeman@fs.fed.us
optimal.thresholds, error.threshold.plot, auc.roc.plot, calibration.plot, presence.absence.hist
data(SIM3DATA) presence.absence.summary(SIM3DATA) presence.absence.summary( SIM3DATA, threshold=101, find.auc=TRUE, which.model=2, na.rm=FALSE, main=NULL, model.names=NULL, alpha=0.05, N.bins=5, N.bars=10, truncate.tallest=FALSE, opt.thresholds=TRUE, opt.methods=c(1,2,4), req.sens=0.85, req.spec=0.85, obs.prev=NULL, smoothing=1, vert.lines=FALSE, add.legend=TRUE, add.opt.legend=TRUE, legend.cex=0.6, opt.legend.cex=0.6, pch=NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.