sageLabels: Displays verbose labels that describe topics and...

View source: R/sageLabels.R

sageLabelsR Documentation

Displays verbose labels that describe topics and topic-covariate groups in depth.

Description

For each topic or, when there is a covariate at the bottom of the model, for each topic-covariate group, sageLabels provides a list of the highest marginal probability words, the highest marginal FREX words, the highest marginal lift words, and the highest marginal score words, where marginal means it is summing over all potential covariates. It also provides each topic's Kappa (words associated with each topic) and baselined Kappa (baseline word distribution).

Usage

sageLabels(model, n = 7)

Arguments

model

A fitted STM model object.

n

The number of words to print per topic/topic-covariate set. Default is 7.

Details

This can be used as an more detailed alternative to labelTopics.

Value

marginal

A list of matrices, containing the high-probability labels, FREX labels, lift labels, and high scoring words.

K

The number of topics in the STM.

covnames

Names of the covariate values used in the STM.

kappa

Words associated with topics, covariates, and topic/covariate interactions.

kappa.m

Baseline word distribution.

n

The n parameter passed by the user to this function; number of words per topic or topic-covariate pair (when covariates are used on the bottom of the model)

cov.betas

Covariate-specific beta matrices, listing for each covariate a matrix of highest-probability, FREX, lift, and high scoring words. Note that the actual vocabulary has been substituted for word indices.


stm documentation built on June 24, 2024, 5:18 p.m.