imi_simulate: Simulated IMI values

imi_simulateR Documentation

Simulated IMI values

Description

Given a topic and particular words, this function calculates IMI scores for those words based on a simulated term-document matrix (conditioned on the topic). These simulations are the basis for the posterior check in imi_check (q.v.).

Usage

imi_simulate(m, k, words, groups = NULL, n_reps = 20)

Arguments

m

mallet_model object with sampling state loaded via load_sampling_state

k

topic number (calculations are only done for one topic at a time)

words

vector of words to calculate IMI values for

groups

optional grouping factor for documents. If supplied, the IMI values will be for words over groups rather than over individual documents

n_reps

number of simulations

Value

a matrix of simulated IMI values, with one row for each element of words and one column for each simulation

See Also

imi_check


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.