Plots each off-diagonal precision entry (or, with normalize = TRUE,
partial correlation) against v0 along the ladder, one panel per group.
Entries whose PIP is below thres at a step are drawn as 0.
Usage
plot_path(
v0s,
obj,
thres = 0.5,
normalize = FALSE,
xlab = "",
ylab = "",
main = "",
par = c(1, 2),
ylim = NULL,
reverse = FALSE,
position = "bottomright",
...
)Arguments
- v0s
The v0 values of the fit (
obj$v0s).- obj
An
ssjglobject.- thres
PIP threshold. Default 0.5.
- normalize
Logical. If
TRUE, plot partial correlations instead of precision entries. DefaultFALSE.- xlab
String for xlab. Default empty.
- ylab
string for y-axis label. Default empty.
- main
string for main title. Default empty.
- par
Layout
c(rows, cols)for the K panels, passed topar(mfrow = )and restored on exit. Defaultc(1, 2);NULLleaves the layout alone.- ylim
default NULL and will calculate from range
- reverse
Default FALSE. If want to reverse direction of plot.
- position
Legend position, or
"none". Default"bottomright".- ...
other parameters passed in to base plot
Examples
sim <- simulate_ssjgl_data(K = 2, p = 8, n = 100, seed = 42)
fit <- ssjgl(sim$data_list, lambda0 = 1, lambda1 = 1, lambda2 = 1,
v0s = make_v0_ladder(1, n_steps = 5, min_ratio = 5, max_ratio = 200),
standardize = TRUE, maxitr.em = 50, impute = FALSE)
plot_path(fit$v0s, fit, thres = 0.5,
xlab = expression(v[0]), ylab = "Precision entries",
main = c("Group 1", "Group 2"))