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.

4.7. PRACTICE 1274.7.12. Missing heights. e weights listed below were recorded in the !Kung census, but heightswere not recorded for these individuals. Provide predicted heights and 90% confidence intervals(HPDI or PCI is fine) for each of these individuals. at is, fill in the table below, using model-basedpredictions.Individual weight expected height 90% confidence interval1 46.952 43.723 64.784 32.595 54.634.7.13. Non-adults. Select out all the rows in the Howell1 data with ages below 18 years of age. Ifyou do it right, you should end up with a new data frame with 192 rows in it.(a) Fit a linear regression to these data, using map. Present and interpret the estimates. For every10 units of increase in weight, how much taller does the model predict a child gets?(b) Plot the raw data, with height on the vertical axis and weight on the horizontal axis. Superimposethe MAP regression line and 90% HPDI for the mean. Also superimpose the 90% HPDI forpredicted heights.(c) What aspects of the model fit concern you? Describe the kinds of assumptions you wouldchange, if any, to improve the model. You don’t have to write any new code. Just explain what themodel appears to be doing a bad job of, and what you hypothesize would be a better model.4.7.14. Logjam. Suppose a colleague of yours, who works on allometry, glances at the practiceproblems just above. Your colleague exclaims, “at’s silly. Everyone knows that it’s only the logarithmof body weight that scales with height!” Let’s take your colleague’s advice and see what happens.(a) Model the relationship between height (cm) and the natural logarithm of weight (log-kg). Usethe entire Howell1 data frame, all 544 rows, adults and non-adults. Fit this model, using quadraticapproximation:h i ∼ Normal(µ i , σ)µ i = α + β log(w i )α ∼ Normal(138, 100)β ∼ Normal(0, 100)σ ∼ Uniform(0, 50)where h i is the height of individual i and w i is the weight (in kg) of individual i. e function forcomputing a natural log in R is just log. Can you interpret the resulting estimates?(b) Begin with this plot:plot( height ~ weight , data=Howell1 ,col=col.alpha("slateblue",0.4) )R code4.69en use samples from the quadratic approximate posterior of the model in (a) to superimpose onthe plot: (1) the predicted mean height as a function of weight, (2) the 95% HPDI for the mean, and(3) the 95% HPDI for predicted heights.

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

Saved successfully!

Ooh no, something went wrong!