Hello fellow Statalisters:
I am using the ldagibbs user written command, and replicating the procedure outlined in Schwarz (2018) article on how to use the command but I am running into a couple of problems with the code. I keep getting an error r(198) message. Any help in identifying my mistakes would be helpful (I am using Stata 17).
Using the following code
I get the following message:

Using the following code
I get the following message: 
Thanks in advance for your time.
References
Schwarz, C. (2018). ldagibbs: A command for topic modeling in Stata using latent Dirichlet allocation. The Stata Journal, 18(1), 101-117.
I am using the ldagibbs user written command, and replicating the procedure outlined in Schwarz (2018) article on how to use the command but I am running into a couple of problems with the code. I keep getting an error r(198) message. Any help in identifying my mistakes would be helpful (I am using Stata 17).
Using the following code
Code:
*list example topics*
forvalues i=1/15 {
gsort -topic_prob`i´
list title topic_prob`i´ if _n<=15,, str(45)
}
Using the following code
Code:
forvalues i=1/15{
gsort - topic_prob`i´
display as error `i´
list title if _n<5
replace topic_prob`i´ = float(round(topic_prob`i´,0.0000001))
gen topic_`i´ = (max_prob==topic_prob`i´)
}
Thanks in advance for your time.
References
Schwarz, C. (2018). ldagibbs: A command for topic modeling in Stata using latent Dirichlet allocation. The Stata Journal, 18(1), 101-117.

Comment