## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE, comment = "#>", message = FALSE, warning = FALSE,
  fig.width = 7, fig.height = 5.5
)
library(idiographic)
data(srl)
has_cograph <- requireNamespace("cograph", quietly = TRUE)

## ----data---------------------------------------------------------------------
vars <- c("efficacy", "value", "planning", "monitoring", "effort")

## ----audit--------------------------------------------------------------------
audit <- preprocess(srl, vars = vars, id = "name", min_obs = 100)
audit

## ----compare------------------------------------------------------------------
cmp <- compare_idiographic(
  srl, vars = vars, id = "name",
  estimators = c("var", "graphical_var"),
  estimator_args = list(
    var = list(subject = "Grace", scale = TRUE),
    graphical_var = list(subject = "Grace", n_lambda = 8)
  )
)
as.data.frame(cmp)

