Skip to contents

Draws, for each profiled parameter, the changes of all other parameters along the profile of that parameter in one panel. The nPars parameters with the largest change are colored and named, the others are gray. Requires the package cowplot.

Usage

plotPathsMulti(profs, whichPar, nPars = 5, normalizePaths = FALSE)

Arguments

profs

A parframe of profiles as returned by profile().

whichPar

Character vector, the profiled parameters to draw.

nPars

Integer, number of colored and named paths. Defaults to 5.

normalizePaths

Logical. TRUE scales each path to a maximum absolute value of 1. Defaults to FALSE.

Value

A ggplot object; for several whichPar the grid of cowplot::plot_grid().

Examples

pars <- c(a = 1, b = 0.5, c = 2)
obj <- constraintL2(mu = pars, sigma = 0.1)
profs <- profile(obj, pars, whichPar = c("a", "b"), limits = c(-1, 1),
                 cores = 1)
plotPathsMulti(profs, c("a", "b"), nPars = 2)