Hello,
I am new to Stata and I am trying to run a Bayesian analysis. I have a model using Jags in R and tried to run this same model in Stata. The results are different. Would you be able to check whether the 2 models below are the same, or if there is anything I missed? I am using Stata 16 and I received the message that dbern was not supported by Stata.
Jags model in R:
model {
for (i in 1:N) {
fail[i] ~ dbern(pi[i])
probit(pi[i]) <-b[1] + b[2]*temp[i]
}
for (j in 1:2) {b[j] ~ dnorm(0, 0.01)}
}
Model in Stata:
bayesmh fail temp, likelihood(probit) prior({fail}, binom(({fail:temp, xb}),1)) prior({fail:temp}, normal(0,100)) prior({fail:_cons}, normal(0,100)) initial({fail:} 0) saving(challm3)
Many thanks,
Giovanna
Related Posts with Bayesian analysis question with Stata
Using Restricted Maximum Likelihood in random-effects meta-analysis for binary outcomesI'm coming from R, so I'm hoping to find an easy way to get a similar output with Stata. I know that…
Force the study entry date from an exposed subject to a matched non-exposed subjectDear Statalisters, I wish to perform a survival analysis comparing exposed and non-exposed subjects…
T-Test with foreach (for 4 Variables)Hey listers, I want to do a t-test for 4 variables (buy1,sell1, buy2, sell2) (they all match certain…
'codebook' throws error with complicated missings and large samplesI'm attempting to summarize and review a new dataset using 'codebook' and am encountering an error. …
Referencing first non-omitted level of factor variable?I'm trying to put a title over a factor variable by using the refcat command of esttab. However, the…
Subscribe to:
Post Comments (Atom)
0 Response to Bayesian analysis question with Stata
Post a Comment