Description

2005 Hopkins Epi-Biostat Summer Institute. 2. Key Points from yesterday.

Transcripts

Module 2: Bayesian Hierarchical Models Francesca Dominici Michael Griswold The Johns Hopkins University Bloomberg School of Public Health 2005 Hopkins Epi-Biostat Summer Institute

Key Points from yesterday "Multi-level" Models: Have covariates from many levels and their connections Acknowledge relationship among perceptions from inside a level (group) Random impact MLMs condition on surreptitiously "inactive factors" to depict relationships Random Effects models fit actually into a Bayesian worldview Bayesian strategies join earlier convictions with the probability of the watched information to get back surmisings 2005 Hopkins Epi-Biostat Summer Institute

Bayesian Hierarchical Models Module 2: Example 1: School Test Scores The least difficult two-arrange display WinBUGS Example 2: Aww Rats A typical progressive model for rehashed measures WinBUGS 2005 Hopkins Epi-Biostat Summer Institute

Example 1: School Test Scores 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools Goldstein et al. (1993) Goal: separate amongst `good\' and `bad\' schools Outcome: Standardized Test Scores Sample: 1978 understudies from 38 schools MLM: understudies (obs) inside schools (group) Possible Analyses: Calculate every school\'s watched normal score Calculate a general normal for all schools Borrow quality crosswise over schools to enhance singular school gauges 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools Why obtain data crosswise over schools? Middle # of understudies per school: 48, Range: 1-198 Suppose little school (N=3) has: 90, 90,10 (avg=63) Suppose extensive school (N=100) has avg=65 Suppose school with N=1 has: 69 (avg=69) Which school is \'better\'? Hard to state, little N exceedingly factor gauges For bigger schools we have great appraisals, for littler schools we might have the capacity to get data from different schools to get more precise assessments How? Bayes 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools: "Coordinate Estimates" Mean Scores & C.I.s for Individual Schools Model: E(Y ij ) = j = + b * j b * j 2005 Hopkins Epi-Biostat Summer Institute

j = X (general avg) j = X j (shool avg) Fixed and Random Effects Standard Normal relapse models: ij ~ N(0, 2 ) 1. Y ij = + ij 2. Y ij = j + ij = + b * j + ij Fixed Effects = X + b* j = X + ( X j – X) 2005 Hopkins Epi-Biostat Summer Institute

j = X (general avg) j = X j (shool avg) Fixed and Random Effects Standard Normal relapse models: ij ~ N(0, 2 ) 1. Y ij = + ij 2. Y ij = j + ij = + b * j + ij An arbitrary impacts show: 3. Y ij | b j = + b j + ij , with: b j ~ N( 0 , 2 ) Random Effects Fixed Effects = X + b* j = X + ( X j – X) Represents Prior convictions about similitudes between schools! 2005 Hopkins Epi-Biostat Summer Institute

j = X (general avg) j = X j (shool avg) j = X + b j blup = X + b* j = X + ( X j – X) Fixed and Random Effects Standard Normal relapse models: ij ~ N(0, 2 ) 1. Y ij = + ij 2. Y ij = j + ij = + b * j + ij An arbitrary impacts demonstrate: 3. Y ij | b j = + b j + ij , with: b j ~ N( 0 , 2 ) Random Effects Estimate is part-path between the model and the information Amount relies on upon fluctuation ( ) and fundamental truth ( ) Fixed Effects = X + b* j = X + ( X j – X) 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools: Shrinkage Plot b * j b j 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools: Winbugs Data: i=1..1978 (understudies), s=1… 38 (schools) Model : Y is ~ Normal( s , 2 y ) s ~ Normal( , 2 ) (priors on school avgs) Note: WinBUGS utilizes exactness rather than difference to determine a typical dissemination! WinBUGS : Y is ~ Normal( s , y ) with: 2 y = 1/ y s ~ Normal( , ) with: 2 = 1/ 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools: WinBUGS Model : Y is ~ Normal( s , y ) with: 2 y = 1/ y s ~ Normal( , ) with: 2 = 1/ y ~ (0.001,0.001) (earlier on accuracy) Hyperpriors Prior on mean of school means ~ Normal( 0 , 1/1000000 ) Prior on exactness (inv. fluctuation) of school means ~ (0.001,0.001) Using "Obscure"/"Noninformative" Priors 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools: Winbugs Full WinBUGS Model : Y is ~ Normal( s , y ) with: 2 y = 1/ y s ~ Normal( , ) with: 2 = 1/ y ~ (0.001,0.001) ~ Normal( 0 , 1/1000000) ~ (0.001,0.001) 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools: WinBUGS Code : demonstrate { for( i in 1 : N ) { Y[i] ~ dnorm(mu[i],y.tau) mu[i] <- alpha[school[i]] } for( s in 1 : M ) { alpha[s] ~ dnorm(alpha.c, alpha.tau) } y.tau ~ dgamma(0.001,0.001) sigma <- 1/sqrt(y.tau) alpha.c ~ dnorm(0.0,1.0E-6) alpha.tau ~ dgamma(0.001,0.001) } 2005 Hopkins Epi-Biostat Summer Institute

Example 2: Aww, Rats… A typical progressive model for rehashed measures 2005 Hopkins Epi-Biostat Summer Institute

Improving individual-level evaluations Gelfand et al (1990) 30 youthful rats, weights measured week after week for five weeks Dependent variable (Y ij ) is weight for rodent "i" at week "j" Data: Multilevel: weights (perceptions) inside rats (groups) 2005 Hopkins Epi-Biostat Summer Institute

Individual & populace development Rat "i" has its own normal development line: E(Y ij ) = b 0i + b 1i X j There is additionally a by and large, normal populace development line: E(Y ij ) = 0 + 1 X j Weight Pop line (normal development) Individual Growth Lines Study Day (focused) 2005 Hopkins Epi-Biostat Summer Institute

Improving individual-level assessments Possible Analyses Each rodent (bunch) has its own particular line: intercept= b i0 , slope= b i1 All rats take after a similar line: b i0 = 0 , b i1 = 1 A trade off between these two: Each rodent has its own particular line, BUT… the lines originate from an accepted appropriation E(Y ij | b i0 , b i1 ) = b i0 + b i1 X j b i0 ~ N( 0 , 0 2 ) b i1 ~ N( 1 , 1 2 ) "Irregular Effects" 2005 Hopkins Epi-Biostat Summer Institute

A bargain: Each rodent has its own line, yet data is obtained crosswise over rats to enlighten us regarding singular rodent development Weight Pop line (normal development) Bayes-Shrunk Individual Growth Lines 2005 Hopkins Epi-Biostat Summer Institute Study Day (focused)

Rats: Winbugs (see help: Examples Vol I) WinBUGS Model : 2005 Hopkins Epi-Biostat Summer Institute

Rats: Winbugs (see help: Examples Vol I) WinBUGS Code : 2005 Hopkins Epi-Biostat Summer Institute

Rats: Winbugs (see help: Examples Vol I) WinBUGS Results: 10000 redesigns 2005 Hopkins Epi-Biostat Summer Institute

WinBUGS Diagnostics: MC mistake instructs you to what degree reenactment blunder adds to the instability in the estimation of the mean. This can be diminished by creating extra specimens. Continuously look at the hint of the specimens. To do this choose the history catch on the Sample Monitor Tool. Search for: Trends Correlations 2005 Hopkins Epi-Biostat Summer Institute

Rats: Winbugs (see help: Examples Vol I) WinBUGS Diagnostics: history 2005 Hopkins Epi-Biostat Summer Institute

WinBUGS Diagnostics: Examine test autocorrelation straightforwardly by selecting the \'auto cor\' catch. On the off chance that autocorrelation exists, produce extra examples and thin more. 2005 Hopkins Epi-Biostat Summer Institute

Rats: Winbugs (see help: Examples Vol I) WinBUGS Diagnostics: autocorrelation 2005 Hopkins Epi-Biostat Summer Institute

WinBUGS gives apparatus to Bayesian worldview "shrinkage gauges" in MLMs Bayes Weight Pop line (normal development) Pop line (normal development) Bayes-Shrunk Growth Lines Individual Growth Lines Study Day (focused) 2005 Hopkins Epi-Biostat Summer Institute Study Day (focused)

School Test Scores Revisited 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools returned to Suppose we needed to incorporate covariate data in the school test scores case Student-level covariates Gender London Reading Test (LRT) score Verbal thinking (VR) test classification (1, 2 or 3) School - level covariates Gender allow (all young ladies, all young men or blended) Religious section (Church of England, Roman Catholic, State school or other) 2005 Hopkins Epi-Biostat Summer Institute

Testing in Schools returned to Model Wow! Can YOU fit this model? Yes you can! See WinBUGS>help>Examples Vol II for information, code, comes about, and so forth. All the more Importantly: Do you comprehend this model? 2005 Hopkins Epi-Biostat Summer Institute

Bayesian Concepts Frequentist: Parameters are "reality" Bayesian: Parameters have a circulation "Obtain Strength" from different perceptions "Recoil Estimates" towards general midpoints Compromise between model & information Incorporate earlier/other data in assessments Account for different wellsprings of instability Posterior Likelihood * Prior 2005 Hopkins Epi-Biostat Summer Institute