11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

360 15. MISSING DATA AND OTHER OPPORTUNITIESDivorce rate4 6 8 10 12 14Divorce rate4 6 8 10 12 1423 24 25 26 27 28 29Median age marriage0 1 2 3log populationFIGURE 15.1. Le: Divorce rate by median age of marriage, States of theUnited States. Vertical bars show plus and minus one standard deviation ofthe Gaussian uncertainty in measured divorce rate. Southern States shownin blue. Right: Divorce rate, again with standard deviations, against logpopulation of each State. Smaller States produce more uncertain estimates.R code15.2And then we also use these D est,i as data in the regression equation. is will not onlyallow us to estimate coefficients for predictions that take into account the uncertainty in theoutcome, but it will also update the prior for divorce rate in each State.Here’s what the model looks like:D est,i ∼ Normal(µ i , σ)[“likelihood” for estimates]µ i = α + β A A i + β R R i [linear model]D est,i ∼ Normal(D obs,i , D SE,i )α ∼ Normal(0, 10)β A ∼ Normal(0, 10)β R ∼ Normal(0, 10)σ ∼ Cauchy(0, 2.5)[prior for estimates]So really the only difference between this model and a typical linear regression is replacingthe outcome with a vector of parameters and assigning to each “outcome” parameter a priorthat is a Gaussian distribution defined by the respective mean and standard deviation of themeasurement.Now for the Stan model code:model_code

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

Saved successfully!

Ooh no, something went wrong!