Running examples in ‘stminsights-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: get_network
> ### Title: extract topic correlation network
> ### Aliases: get_network
> 
> ### ** Examples
> 
> 
> library(stm)
stm v1.3.7 successfully loaded. See ?stm for help. 
 Papers, resources, and other materials at structuraltopicmodel.com
> library(ggraph)
Loading required package: ggplot2
> library(quanteda)
Package version: 4.0.1
Unicode version: 15.0
ICU version: 72.1
Parallel computing: 3 of 32 threads used.
See https://quanteda.io for tutorials and examples.
> 
> # prepare data
> data <- corpus(gadarian, text_field = 'open.ended.response')
> docvars(data)$text <- as.character(data)
> 
> data <- tokens(data, remove_punct = TRUE) |>
+   tokens_wordstem() |>
+   tokens_remove(stopwords('english')) |> dfm() |>
+   dfm_trim(min_termfreq = 2)
> 
> out <- convert(data, to = 'stm')
> 
> # fit model
> gadarian_10 <- stm(documents = out$documents,
+                    vocab = out$vocab,
+                    data = out$meta,
+                    prevalence = ~ treatment + s(pid_rep),
+                    K = 10,
+                    max.em.its = 1, # reduce computation time for example
+                    verbose = FALSE)
> 
> # extract network
> stm_corrs <- get_network(model = gadarian_10,
+                          method = 'simple',
+                          labels = paste('Topic', 1:10),
+                          cutoff = 0.001,
+                          cutiso = TRUE)
Error in get_network(model = gadarian_10, method = "simple", labels = paste("Topic",  : 
  There are no (sufficiently high) correlations between the topics of this STM model.
Execution halted
Running examples in ‘stminsights-Ex.R’ failed
The error most likely occurred in:

> ### Name: get_network
> ### Title: extract topic correlation network
> ### Aliases: get_network
> 
> ### ** Examples
> 
> 
> library(stm)
stm v1.3.7 successfully loaded. See ?stm for help. 
 Papers, resources, and other materials at structuraltopicmodel.com
> library(ggraph)
Loading required package: ggplot2
> library(quanteda)
Package version: 4.0.1
Unicode version: 13.0
ICU version: 69.1
Parallel computing: disabled
See https://quanteda.io for tutorials and examples.
> 
> # prepare data
> data <- corpus(gadarian, text_field = 'open.ended.response')
> docvars(data)$text <- as.character(data)
> 
> data <- tokens(data, remove_punct = TRUE) |>
+   tokens_wordstem() |>
+   tokens_remove(stopwords('english')) |> dfm() |>
+   dfm_trim(min_termfreq = 2)
> 
> out <- convert(data, to = 'stm')
> 
> # fit model
> gadarian_10 <- stm(documents = out$documents,
+                    vocab = out$vocab,
+                    data = out$meta,
+                    prevalence = ~ treatment + s(pid_rep),
+                    K = 10,
+                    max.em.its = 1, # reduce computation time for example
+                    verbose = FALSE)
> 
> # extract network
> stm_corrs <- get_network(model = gadarian_10,
+                          method = 'simple',
+                          labels = paste('Topic', 1:10),
+                          cutoff = 0.001,
+                          cutiso = TRUE)
Error in get_network(model = gadarian_10, method = "simple", labels = paste("Topic",  : 
  There are no (sufficiently high) correlations between the topics of this STM model.
Execution halted
Running examples in ‘stminsights-Ex.R’ failed
The error most likely occurred in:

> ### Name: get_network
> ### Title: extract topic correlation network
> ### Aliases: get_network
> 
> ### ** Examples
> 
> 
> library(stm)
stm v1.3.7 successfully loaded. See ?stm for help. 
 Papers, resources, and other materials at structuraltopicmodel.com
> library(ggraph)
Loading required package: ggplot2
> library(quanteda)
Package version: 4.0.1
Unicode version: 13.0
ICU version: 69.1
Parallel computing: disabled
See https://quanteda.io for tutorials and examples.
> 
> # prepare data
> data <- corpus(gadarian, text_field = 'open.ended.response')
> docvars(data)$text <- as.character(data)
> 
> data <- tokens(data, remove_punct = TRUE) |>
+   tokens_wordstem() |>
+   tokens_remove(stopwords('english')) |> dfm() |>
+   dfm_trim(min_termfreq = 2)
> 
> out <- convert(data, to = 'stm')
> 
> # fit model
> gadarian_10 <- stm(documents = out$documents,
+                    vocab = out$vocab,
+                    data = out$meta,
+                    prevalence = ~ treatment + s(pid_rep),
+                    K = 10,
+                    max.em.its = 1, # reduce computation time for example
+                    verbose = FALSE)
> 
> # extract network
> stm_corrs <- get_network(model = gadarian_10,
+                          method = 'simple',
+                          labels = paste('Topic', 1:10),
+                          cutoff = 0.001,
+                          cutiso = TRUE)
Error in get_network(model = gadarian_10, method = "simple", labels = paste("Topic",  : 
  There are no (sufficiently high) correlations between the topics of this STM model.
Execution halted
Running examples in ‘stminsights-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: get_network
> ### Title: extract topic correlation network
> ### Aliases: get_network
> 
> ### ** Examples
> 
> 
> library(stm)
stm v1.3.7 successfully loaded. See ?stm for help. 
 Papers, resources, and other materials at structuraltopicmodel.com
> library(ggraph)
Loading required package: ggplot2
> library(quanteda)
Package version: 4.0.1
Unicode version: 15.0
ICU version: 72.1
Parallel computing: 3 of 32 threads used.
See https://quanteda.io for tutorials and examples.
> 
> # prepare data
> data <- corpus(gadarian, text_field = 'open.ended.response')
> docvars(data)$text <- as.character(data)
> 
> data <- tokens(data, remove_punct = TRUE) |>
+   tokens_wordstem() |>
+   tokens_remove(stopwords('english')) |> dfm() |>
+   dfm_trim(min_termfreq = 2)
> 
> out <- convert(data, to = 'stm')
> 
> # fit model
> gadarian_10 <- stm(documents = out$documents,
+                    vocab = out$vocab,
+                    data = out$meta,
+                    prevalence = ~ treatment + s(pid_rep),
+                    K = 10,
+                    max.em.its = 1, # reduce computation time for example
+                    verbose = FALSE)
> 
> # extract network
> stm_corrs <- get_network(model = gadarian_10,
+                          method = 'simple',
+                          labels = paste('Topic', 1:10),
+                          cutoff = 0.001,
+                          cutiso = TRUE)
Error in get_network(model = gadarian_10, method = "simple", labels = paste("Topic",  : 
  There are no (sufficiently high) correlations between the topics of this STM model.
Execution halted
Running examples in ‘stminsights-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: get_network
> ### Title: extract topic correlation network
> ### Aliases: get_network
> 
> ### ** Examples
> 
> 
> library(stm)
stm v1.3.7 successfully loaded. See ?stm for help. 
 Papers, resources, and other materials at structuraltopicmodel.com
> library(ggraph)
Loading required package: ggplot2
> library(quanteda)
Package version: 4.0.1
Unicode version: 15.0
ICU version: 72.1
Parallel computing: 3 of 32 threads used.
See https://quanteda.io for tutorials and examples.
> 
> # prepare data
> data <- corpus(gadarian, text_field = 'open.ended.response')
> docvars(data)$text <- as.character(data)
> 
> data <- tokens(data, remove_punct = TRUE) |>
+   tokens_wordstem() |>
+   tokens_remove(stopwords('english')) |> dfm() |>
+   dfm_trim(min_termfreq = 2)
> 
> out <- convert(data, to = 'stm')
> 
> # fit model
> gadarian_10 <- stm(documents = out$documents,
+                    vocab = out$vocab,
+                    data = out$meta,
+                    prevalence = ~ treatment + s(pid_rep),
+                    K = 10,
+                    max.em.its = 1, # reduce computation time for example
+                    verbose = FALSE)
> 
> # extract network
> stm_corrs <- get_network(model = gadarian_10,
+                          method = 'simple',
+                          labels = paste('Topic', 1:10),
+                          cutoff = 0.001,
+                          cutiso = TRUE)
Error in get_network(model = gadarian_10, method = "simple", labels = paste("Topic",  : 
  There are no (sufficiently high) correlations between the topics of this STM model.
Execution halted