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.

116 4. LINEAR MODELSYou end up with a big matrix of values of µ. Each row is a sample from the posterior distribution(link defaults to use 1000 samples). Each column is a case (row) in the data. ereare 352 rows in d2, corresponding to 352 individuals. So there are 352 columns in the matrixmu above.Now what can we do with this big matrix? Lots of things. e function link providesa posterior distribution of µ for each case we feed it. So above we have a distribution ofµ for each individual in the original data. We actually want something slightly different: adistribution of µ for each unique weight value on the horizontal axis. It’s only slightly harderto compute that, by just passing link some new data:R code4.50# define sequence of weights to compute predictions for# these values will be on the horizontal axisweight.seq

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

Saved successfully!

Ooh no, something went wrong!