Sunday, March 02, 2008

Ordered logistic model with varying intercepts (random effects)

I coauthor a paper with Ozan, a friend who I know when I was TAing Bayesian Methods in ICPSR. The paper tries to see if the 9/11 has any effect on American's attitudes on Muslim. We have dataset from different years: 2 from pre-9/11 periods and 2 from post-9/11 periods. The outcome variable y is ordered categorical in that:

1: very unfavorable; 2: mostly unfavorable; 3: mostly favorable; 4: very favorable

The most common way to model ordinal data like this is to postulate the existence of an underlying latent (unobserved) variable z associated with each response k of y. In other words, we fit such data with ordered logit/probit models. Since the data is time series cross sectional, the reasonable way to model it is to fit a multilevel model (See Andrew Gelman, 2007, Data Analysis using Regression and Multilevel/Hierarchical Models).

Here is the formal expression of the model with varying intercepts (random effects) by year:

Here is the code for BUGS, mologit.txt. A trick to genereate initial values for cutpoints is to assign 0 to each cutpoints. So for our model, it is a 4*3 matrix of 0's. (4 years, 3 cutpoints for each years). If you are using R2WinBUGS, the R code for the inits should be:


inits <- function(){
list(C=matrix(0,4,3))
}

Our preliminary result suggests that there is no effect of 9/11 on American's attitudes on Muslim. The paper is going to present at this year's MPSA conference at Chicago. The presenting time is on April 5 at 10:00am. We are welcome for comments on the paper.

3 comments:

Anonymous said...

"Our preliminary result suggests that there is no effect of 9/11 on American's attitudes on Muslim." This is a really surprising finding, isn't it? I mean CNN calls this a "controversial photo".

BTW: Do you intend to publish your paper online?

P.S.: Nice article and thanks for the BUGS code :-)

Yu-Sung Su said...

Hi Bernd,

The paper is going to be a conference proceeding after we present it. In the meantime, we are still working on it. I will post the updated news on our paper in my blog.

Thank you!

partha giri said...

amazing to be able to read what actually happens and try and picture the action.
http://www.suainlogistics.com/