Activity for Aakash Shah

  • Aakash Shah Aakash Shah posted a comment on discussion Help

    I am having the same problem. I have tried tightening the priors but does not help. mixed_effects_model <- function(){ for(n in 1:N){ y[n]~dbern(p[n]) logit(p[n])=x[n,1]*rbeta[group[n],1]+x[n,2]*beta[1]+x[n,3]*beta[2]+x[n,4]*beta[3]+x[n,5]*rbeta[group[n],2]+x[n,6]*rbeta[group[n],3]+x[n,7]*rbeta[group[n],4]+x[n,8]*rbeta[group[n],5]+x[n,9]*rbeta[group[n],6]+x[n,10]*rbeta[group[n],7] } for(k in 1:K){ beta[k]~dnorm(0,1/5) } for(l in 1:L){ for(j in 1:J){ rbeta[l,j]~dnorm(rbeta_mu[j],rbeta_tau[j]) } }...

  • Aakash Shah Aakash Shah posted a comment on discussion Open Discussion

    I am trying to model a mixed effects logistic regression. However the effective sample size is too low. So when i run longer chains I get the following error: Failure to calculate log denisty I am not sure if it is somehting to do with the prior or the starting values. I am new to JAGS and appreicate all help i can get. This is my model: mixed_effects_model <- function(){ for(n in 1:N){ y[n]~dbern(p[n]) logit(p[n])=x[n,1]*rbeta[group[n],1]+x[n,2]*beta[1]+x[n,3]*beta[2]+x[n,4]*beta[3]+x[n,5]*rbeta[group[n],2]+x[n,6]*rbeta[group[n],3]+x[n,7]*rbeta[group[n],4]+x[n,8]*rbeta[group[n],5]+x[n,9]*rbeta[group[n],6]+x[n,10]*rbeta[group[n],7]+x[n,11]*rbeta[group[n],8]+x[n,12]*rbeta[group[n],9]+x[n,13]*rbeta[group[n],10]...

  • Aakash Shah Aakash Shah posted a comment on discussion Open Discussion

    HI I am facing a similar issue, coul you please help me... This is my model: model <- function(){ for(n in 1:N){ y[n]~dbern(p[n]) logit(p[n])=x[n,1]beta[group[n],1]+x[n,2]beta[group[n],2]+x[n,3]beta[group[n],3]+x[n,4]beta[group[n],4]+x[n,5]beta[group[n],5]+x[n,6]beta[group[n],6]+x[n,7]beta[group[n],7]+x[n,8]beta[group[n],8]+x[n,9]beta[group[n],9]+x[n,10]beta[group[n],10]+x[n,11]beta[group[n],11]+x[n,12]beta[group[n],12]+x[n,13]beta[group[n],13]+x[n,14]beta[group[n],14]+x[n,15]beta[group[n],15]+x[n,16]beta[group[n],16]+x[n,17]beta[group[n],17]+x[n,18]beta[group[n],18]+x[n,19]beta[group[n],19]+x[n,20]beta[group[n],20]+x[n,21]beta[group[n],21]+x[n,22]beta[group[n],22]+x[n,23]beta[group[n],23]+x[n,24]beta[group[n],24]+x[n,25]beta[group[n],25]+x[n,26]beta[group[n],26]...

  • Aakash Shah Aakash Shah posted a comment on discussion Help

    Hi, I have a similar problem. This is my model model <- function(){ for(n in 1:N){ y[n]~dbern(p[n]) logit(p[n])=x[n,1]beta[group[n],1]+x[n,2]beta[group[n],2]+x[n,3]beta[group[n],3]+x[n,4]beta[group[n],4]+x[n,5]beta[group[n],5]+x[n,6]beta[group[n],6]+x[n,7]beta[group[n],7]+x[n,8]beta[group[n],8]+x[n,9]beta[grop[n],9]+x[n,10]beta[group[n],10]+x[n,11]beta[group[n],11]+x[n,12]beta[group[n],12]+x[n,13]beta[group[n],13]+x[n,14]beta[group[n],14]+x[n,15]beta[group[n],15]+x[n,16]beta[group[n],16]+x[n,17]beta[group[n],17]+x[n,18]beta[group[n],18]+x[n,19]beta[group[n],19]+x[n,20]beta[group[n],20]+x[n,21]beta[group[n],21]+x[n,22]beta[group[n],22]+x[n,23]beta[group[n],23]+x[n,24]beta[group[n],24]+x[n,25]beta[group[n],25]+x[n,26]beta[group[n],26]...

  • Aakash Shah Aakash Shah posted a comment on discussion Help

    Hi, I have the similar problem. I am building a multilevel logistic model where I am allowing the intercept and the slopes to vary across the groups. This the code: model <- function(){ for(n in 1:N){ y[n]~dbern(p[n]) logit(p[n])=x[n,1]beta[group[n],1]+x[n,2]beta[group[n],2]+x[n,3]beta[group[n],3]+x[n,4]beta[group[n],4]+x[n,5]beta[group[n],5]+x[n,6]beta[group[n],6]+x[n,7]beta[group[n],7]+x[n,8]beta[group[n],8]+x[n,9]beta[grop[n],9]+x[n,10]beta[group[n],10]+x[n,11]beta[group[n],11]+x[n,12]beta[group[n],12]+x[n,13]beta[group[n],13]+x[n,14]beta[group[n],14]+x[n,15]beta[group[n],15]+x[n,16]beta[group[n],16]+x[n,17]beta[group[n],17]+x[n,18]beta[group[n],18]+x[n,19]beta[group[n],19]+x[n,20]beta[group[n],20]+x[n,21]beta[group[n],21]+x[n,22]beta[group[n],22]+x[n,23]beta[group[n],23]+x[n,24]beta[group[n],24]+x[n,25]beta[group[n],25]+x[n,26]beta[group[n],26]...

1
MongoDB Logo MongoDB