# NOT RUN {
# load sample models:
data(rotif.mods)
# choose a particular model to play with:
mod <- rotif.mods$models[[1]]
predPlot(model = mod)
predPlot(model = mod, thresh = 0.5)
# you can first select a threshold optimized according to a particular metric:
# }
# NOT RUN {
threshold <- optiThresh(mod, measures = "TSS", optimize = "each")
threshold <- threshold$optimals.each[ , "threshold"]
threshold
predPlot(model = mod, thresh = threshold)
# }
# NOT RUN {
# you can also use 'predPlot' with vectors of observed and predicted values
# instead of a model object:
presabs <- mod$y
prediction <- mod$fitted.values
predPlot(obs = presabs, pred = prediction)
predPlot(obs = presabs, pred = prediction, thresh = 0.5)
# }
Run the code above in your browser using DataLab