Plot Objective Values of a Collection of Fits
Source:R/alignment.R, R/parClass.R, R/plots.R, and 1 more
plotValues.RdDraws the waterfall plot of a fit collection: the objective values in ascending order against their rank. A converged fit is colored by the number of iterations, an unconverged one is red.
Usage
# S3 method for class 'alignment'
plotValues(
x,
...,
tol = 1,
showSteps = FALSE,
pseudoLog = FALSE,
relative = FALSE
)
# S3 method for class 'parframe'
plotValues(
x,
...,
tol = 1,
showSteps = FALSE,
pseudoLog = FALSE,
relative = FALSE
)
# S3 method for class 'data.frame'
plotValues(
x,
...,
tol = 1,
showSteps = FALSE,
pseudoLog = FALSE,
relative = FALSE
)
# S3 method for class 'parlist'
plotValues(
x,
...,
tol = 1,
showSteps = FALSE,
pseudoLog = FALSE,
relative = FALSE
)
# S3 method for class 'list'
plotValues(
x,
...,
tol = 1,
showSteps = FALSE,
pseudoLog = FALSE,
relative = FALSE
)
plotValues(x, ...)
# S3 method for class 'em'
plotValues(
x,
...,
tol = 1,
showSteps = FALSE,
pseudoLog = FALSE,
relative = FALSE
)Arguments
- x
A collection of fits: a parframe, the result of
mstrust(), a data frame with columnvalueand optionallyconvergedanditerations, a fit ofmsem()or an alignment fromalign(), whose starts are plotted. Or a named list of collections, one panel each.- ...
Logical expressions to subset
x, every collection of a list.- tol
A value more than
tolabove the lowest value of the current step starts a new step. Defaults to 1.- showSteps
Logical.
TRUEmarks the detected steps by dashed vertical lines labeled by their index. Defaults toFALSE.- pseudoLog
Logical.
TRUEdraws the values on a pseudo-log10 scale, linear below 1 in absolute value and defined for negative values. Defaults toFALSE, a linear scale.- relative
TRUEdraws every value above the best value in the same collection, as for collections whose objectives differ by a constant; a number draws every value above that number, as the best of all collections. Defaults toFALSE.
Value
A ggplot object with the plotted data frame as attribute
"data"; the column delta is the distance to the best fit in the same
collection, set the collection of a list.
Examples
fits <- parframe(data.frame(value = c(10, 10.2, 15, 40), converged = TRUE,
iterations = 20, a = c(1, 1.1, 2, 3)),
parameters = "a")
plotValues(fits)