transform_stm: Refits a STM with a content-based covariate so that all...

View source: R/transform_stm.R

transform_stmR Documentation

Refits a STM with a content-based covariate so that all document-level topic-proportions are estimated "as-treated". Also allows for calculation of the SR sufficient reduction and optional coarsening to reduce the dimension of the data, reduce noise, or apply other design rules (e.g. - to exclude words that occur in too few or too many documents).

Description

Refits a STM with a content-based covariate so that all document-level topic-proportions are estimated "as-treated". Also allows for calculation of the SR sufficient reduction and optional coarsening to reduce the dimension of the data, reduce noise, or apply other design rules (e.g. - to exclude words that occur in too few or too many documents).

Usage

transform_stm(mod, out, Z, calc.SR = FALSE, coarsen = FALSE, simplex = FALSE)

Arguments

mod

a fitted stm object

out

the original call to the STM

Z

an indicator for treatment assignment

calc.SR

an indicator for returning the sufficient reduction. Default is TRUE.

coarsen

an indicator for returning the coarsened STM

Value

A bounded DFM


reaganmozer/textmatch documentation built on March 7, 2024, 2:41 p.m.