Learn R Programming

Rlda (version 0.2.6)

generateBernoulliLDA: Simulates a Bernoulli LDA.

Description

Simulates a Bernoulli LDA.

Usage

# S3 method for rlda
generateBernoulliLDA(seed0, community, variables,
  observations, alpha0, alpha1, gamma, ...)

Arguments

seed0

Initial seed to simulate a Bernoulli LDA.

community

Total number of latent clusters. Must be greater than 2.

variables

Total number of variables. Must be greater than the number of communities.

observations

Total number of observations. Must be greater than 1.

alpha0

Scalar hyperparameters that must be positive.

alpha1

Scalar hyperparameters that must be positive.

gamma

Scalar hyperparameters that must be positive.

...

other arguments may be useful.

Details

Generates a list with the simulated Theta and Phi matrix of parameters, Z latent matrix of communities and and Data matrix for the Bernoulli LDA.

See Also

generateMultinomialLDA, generateBinomialLDA

Examples

Run this code
# NOT RUN {
#Generate fake data
res<- generateBernoulliLDA.rlda(seed0=9292, community=3,
                                variables=100, observations=1000,
                                alpha0=0.01, alpha1=0.01, gamma=0.01)
#Show results
res
# }

Run the code above in your browser using DataLab