Nothing
## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE, comment = "#>", message = FALSE, warning = FALSE,
fig.width = 7, fig.height = 5.5
)
library(idiographic)
data(esm_srl)
has_cograph <- requireNamespace("cograph", quietly = TRUE)
## ----vars-audit---------------------------------------------------------------
vars <- c("efficacy", "value", "planning", "monitoring", "effort")
complete_n <- tapply(complete.cases(esm_srl[vars]), esm_srl$name, sum)
selection <- data.frame(subject = names(complete_n),
complete = as.integer(complete_n))
selection <- selection[order(-selection$complete, selection$subject), ]
selected_ids <- head(selection$subject, 4)
head(selection, 4)
preprocess(esm_srl[esm_srl$name %in% selected_ids, ],
vars = vars, id = "name")
## ----fit----------------------------------------------------------------------
students <- esm_srl[esm_srl$name %in% selected_ids, ]
gimme_fit <- fit_gimme(
students, vars = vars, id = "name", time = "occasion",
ar = TRUE, groupcutoff = 0.75, subcutoff = 0.75, seed = 1
)
gimme_fit
## ----summary------------------------------------------------------------------
summary(gimme_fit)
## ----edges--------------------------------------------------------------------
edges(gimme_fit)
## ----coefs-nodes--------------------------------------------------------------
head(coefs(gimme_fit))
nodes(gimme_fit)
## ----matrices-----------------------------------------------------------------
matrices(gimme_fit)
## ----plot-prop, eval=has_cograph----------------------------------------------
plot(gimme_fit, weight = "prop")
## ----plot-coef, eval=has_cograph----------------------------------------------
plot(gimme_fit, weight = "coef")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.