R/topic-extract.R
topics_by_doc_date.Rd
topics_by_doc_date
retrieves the likelihoods that a document is
generated from a topic (gamma in the passed topic STM model). Related
functions and examples in this package interpret this likelihood effectively
as a topic share.
topics_by_doc_date(topicModel, termsDfm, textData, documentIdColumn, dateColumn)
topicModel | an |
---|---|
termsDfm | a document-feature-matrix of type
|
textData | a dataframe containing the original text source reduced to
the document-feature-matrix provided in the |
documentIdColumn | the column name in |
dateColumn | the column name in |
a dataframe with topic shares/likelihoods per document, where:
a publication date associated with document
a numeric identifier of a topic
the
likelihood that document
is generated from the topic with
topic_id
; the analyses in this package interprete this likelihood as
the share of this topic in this document.