--- title: "Using minTriadicClosure in LOLOG Models" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Using minTriadicClosure in LOLOG Models} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} library(MinTriadic) library(network) library(lolog) ``` # Introduction The `minTriadicClosure()` function defines a smoothed triadic closure statistic for use in LOLOG models. It counts how many nodes are part of at least `k` closed triangles, using a sigmoid function for smoothing. # Integration with LOLOG This statistic can be added to LOLOG model formulas. Below is an example using a small toy network. ```{r example} # Load required libraries library(MinTriadic) library(lolog) library(network) # Register the triadic change statistic registerMinTriadicClosure() # Load the Lazega collaboration network data(lazega, package = "lolog") # Fit LOLOG model with edges and minTriadicClosure model <- lolog(lazega ~ edges + minTriadicClosure(k = 2, alpha = 1.5), verbose = FALSE) # View model summary summary(model) ```