# NOT RUN {
# }
# NOT RUN {
library(Rlda)
# Presence
data(presence)
# Set seed
set.seed(9842)
# Hyperparameters for each prior distribution
gamma <- 0.01
alpha0 <- 0.01
alpha1 <- 0.01
presence$loc.id<-seq(1,nrow(presence))
# Execute the LDA for the Bernoulli entry
res <- rlda.fastbernoulli(data = presence, loc.id='loc.id', n_community = 10,
alpha0 = alpha0, alpha1 = alpha1, gamma = gamma,
n_gibbs = 5000,ll_prior = TRUE, display_progress = TRUE)
# }
Run the code above in your browser using DataLab