Predicts the model at parameter sets taken along one profile, starting at the optimum, and colors the trajectories by the value of the profiled parameter.
Usage
plotArray(
par,
profs,
prd,
times,
...,
direction = c("up", "down"),
covtable = NULL,
nSim = 4,
fixed = NULL
)Arguments
- par
Character, the profiled parameter.
- profs
- prd
A prediction function, e.g.
g*x*p, called asprd(times, pars, deriv = FALSE).- times
Numeric vector of time points for the prediction.
- ...
Logical expressions in the columns
time,name,value,conditionand those ofcovtableto subset the plotted data.- direction
"up"(default) or"down", the side of the profile that is traced from the optimum.- covtable
Condition table, e.g. from
covariates(), merged with the predictions by condition so that...can refer to the table columns. DefaultNULL.- nSim
Number of trajectories, evenly spaced along the profile side and starting at the optimum; at most the number of profile points on that side. Defaults to 4.
- fixed
Named numeric vector of the parameters held fixed in the profiles (the
fixedof profile()), added to every parameter set. DefaultNULL.
Examples
times <- 0:5
grid <- data.frame(name = "A", time = times, row.names = paste0("A", times))
x <- Xd(grid)
pars <- structure(exp(-times / 2), names = getParameters(x))
obj <- constraintL2(mu = pars, sigma = 0.1)
profs <- profile(obj, pars, whichPar = "A2", limits = c(-1, 1), cores = 1)
plotArray("A2", profs, x, seq(0, 5, 0.1))