Cross-Classified Models in Stan (Part Deux)

31 views
Skip to first unread message

Pasky Pascual

unread,
Jun 5, 2017, 9:54:33 AM6/5/17
to Stan users mailing list
Following up on this earlier discussion (https://groups.google.com/forum/#!topic/stan-users/kpV7R6f9x1M), providing the syntax for cross-classified model for an intercept, if one wanted to extend the model to include slopes, would it be a simple matter of extending the use of the index, as follows:

y[n] ~ inv_logit(alpha1[state[n]] + alpha2[sex[n]] + alpha +
beta*income[n] + beta1[state[n]]*income[n] + beta2[sex[n]]); 
  
alpha1 ~ normal(0,sigma_alpha1); 
 alpha2 ~ normal(0,sigma_alpha2); 
 sigma_alpha1 ~ ... 
  sigma_alpha2 ~ ... 
  alpha ~ ... 


beta1 ~ normal(0,sigma_beta1); 
beta2 ~ normal(0,sigma_beta2); 
 sigma_beta1 ~ ... 
  sigma_beta2 ~ ... 
beta ~ ... 



Reply all
Reply to author
Forward
0 new messages