11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

354 14. MULTILEVEL MODELS II10 E female 94 299 393 0 10 511 F male 22 351 373 1 11 612 F female 24 317 341 0 12 6On the righthand side, you can see the new columns. e first row is row 1 within cluster 1.e 6th row is the 2nd row within cluster 3.With this new notation in hand, the model we want to estimate is:A ij ∼ Binomial(n ij , p ij )logit p ij = α + α j + βm ijα j ∼ Normal(0, σ)[likelihood][linear model][prior for varying intercepts]α ∼ Normal(0, 10) [prior for α]β ∼ Normal(0, 1) [prior for β]σ ∼ Cauchy(0, 2.5) [prior for σ]e outcome variable A ij is the number of admit decisions, admit, and the sample size in eachcase is n ij , applications. Notice that the index on the p values is now ij. is is becauseprobabilities vary by department, as indexed by j. Once there are predictor variables in thelog-odds linear model, p ij will also vary by i. Likewise, the parameters to estimate, α j , alsovary by department. All that has really changed is that now multiple rows in the data willcontribute data to the estimated varying effect for each cluster. But the above notation is verystandard and actually much more common than the tadpole example above. So it’s worthmaking sure you understand it.Here’s the code to fit this model:R code14.2m14.1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!