| compare_idiographic | R Documentation |
Fits one or more idiographic estimators to the same data and returns a tidy
per-method/per-network comparison table. This is a reporting layer: it does
not define a new model, and each row is computed from the estimator's own
summary() method plus common edge-table accessors.
compare_idiographic(
data,
vars,
estimators = c("var", "graphical_var"),
id = NULL,
day = NULL,
beep = NULL,
estimator_args = list(),
keep_fits = FALSE
)
data |
A |
vars |
Character vector of variable names. |
estimators |
Character vector naming registered network estimators to
fit. Built-in values are |
id |
Character. Name of the person-ID column, or |
day |
Character. Name of the day/session column, or |
beep |
Character. Name of the measurement-occasion column, or |
estimator_args |
Named list of per-estimator argument lists, e.g.
|
keep_fits |
Logical. Store fitted model objects? Default |
A model_comparison object with $comparison, $failures, and
optionally $fits. $comparison is a tidy data.frame with one row per
method/network.
set.seed(1)
d <- data.frame(id = 1, day = rep(1:4, each = 15),
beep = rep(1:15, 4),
A = rnorm(60), B = rnorm(60), C = rnorm(60))
cmp <- compare_idiographic(
d, vars = c("A", "B", "C"), id = "id", day = "day", beep = "beep",
estimators = c("var", "graphical_var"),
estimator_args = list(graphical_var = list(n_lambda = 5))
)
cmp$comparison
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.