Description Usage Arguments Details Value Author(s) References See Also

Tools for looking at the variance of document-topic weights.

1 2 3 |

`counts` |
A matrix of multinomial response counts, as inputed to the |

`theta` |
A fitted topic matrix, as ouput from the |

`omega` |
A fitted document topic-weight matrix, as ouput from the |

`prob` |
A probability vector (positive and sums to one) or a matrix with probability vector rows. |

`eta` |
A vector of the natural exponential family parameterization for a probability vector (with first category taken as null) or a matrix with each row the NEF parameters for a single observation. |

These function use the natural exponential family (NEF) parametrization of a probability vector *q_0 ... q_{K-1}* with the first element corresponding to a 'null' category; that is, with
*NEF(q) = e_1 ... e_{K-1}* and setting *e_0 = 0*, the probabilities are

*q_k = \frac{exp[e_k]}{1 + ∑ exp[e_j]}.*

Refer to Taddy (2012) for details.

`topicVar`

returns an array with dimensions *(K-1,K-1,n)*, where `K=ncol(omega)=ncol(theta)`

and `n = nrow(counts) = nrow(omega)`

, filled with the posterior covariance matrix for the NEF parametrization of each row of `omega`

. Utility `logit`

performs the NEF transformation and `expit`

reverses it.

Matt Taddy taddy@chicagobooth.edu

Taddy (2012), *On Estimation and Selection for Topic Models*.
http://arxiv.org/abs/1109.4518

topics, predict.topics

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.