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.

5.1. SPURIOUS ASSOCIATION 131Divorce6 8 10 12Divorce6 8 10 12-1 0 1 2Marriage.s-2 -1 0 1 2 3MedianAgeMarriage.sFIGURE 5.2. Divorce rate is associated with both marriage rate (le) andmedian age at marriage (right). Both predictor variables are standardized inthis example. e average marriage rate across States is 20, and the averagemedian age at marriage is 26.figure. But does marriage cause divorce? In a trivial sense it obviously does: one cannotget a divorce without first getting married. But there’s no reason beyond that for high marriagerate to be correlated with divorce—it’s easy to imagine high marriage rate indicatinghigh cultural valuation of marriage and therefore being associated with low divorce rate. Sosomething is suspicious here.Another predictor associated with divorce is the median age at marriage, displayed inthe righthand plot in FIGURE 5.2. Age at marriage is also a good predictor of divorce rate—higher age at marriage predicts less divorce. You can replicate the righthand plot in the figureby fitting this linear regression model:D i ∼ Normal(µ i , σ)µ i = α + β a a iα ∼ Normal(10, 10)β a ∼ Normal(0, 1)σ ∼ Uniform(0, 10)D i is the divorce rate for State i, and a i is State i’s median age at marriage. ere are no newcode tricks or techniques here, but I’ll add comments to help explain the mass of code. We’regoing to standardize the predictor here, because it’s a good habit to get into.# load datalibrary(rethinking)data(WaffleDivorce)d

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

Saved successfully!

Ooh no, something went wrong!