1 / 12

Stat 6601 Project: Bootstrapping Linear Models (V&R 6.6)

Stat 6601 Project: Bootstrapping Linear Models (V&R 6.6). Jaimie Kwon Statistics, CSUH. Goal. How do we apply bootstrap to linear regression models?. Data. ‘Phones’ data: the annual numbers of telephone calls, in Belgium ‘year’ : The last two digits of the year.

zeph-hill
Download Presentation

Stat 6601 Project: Bootstrapping Linear Models (V&R 6.6)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stat 6601 Project: Bootstrapping Linear Models (V&R 6.6) Jaimie Kwon Statistics, CSUH

  2. Goal • How do we apply bootstrap to linear regression models?

  3. Data • ‘Phones’ data: the annual numbers of telephone calls, in Belgium • ‘year’ : The last two digits of the year. • ‘calls’ : The number of telephone calls made (in millions of calls).

  4. Model • Linear models of the form: Y=X + in which only  is considered random.

  5. Method • Most obvious form of bootstrapping: randomly sample pairs (xi, yi) with replacement. (called “case-based resampling” in Davison and Hinkley (1997)) • Might not be appropriate • Alternative: “Model-based resampling” – resample the residulas.

  6. Method (Continued) • Procedure: • After fitting the linear model to get:yi=xib + ei • Create a new dataset by yi=xib + ei where ei* are resample with replacement from the residuals (ei). • Some issues:

  7. Codes • library(MASS) • library(boot) • plot(phones$year, phones$calls) • fit <- lm(calls ~ year, data=phones) • ph <- data.frame(phones, res=resid(fit), fitted=fitted(fit)) • ph.fun <- function(data, i){ • d <- data • d$calls <- d$fitted + d$res[i] • coef(update(fit, data=d)) • } • (ph.lm.boot <- boot(ph, ph.fun, R=999)) • plot(ph.lm.boot)

  8. Results • Bootstrap Statistics : • original bias std. error • t1* -260.059246 -3.5164095 96.730498 • t2* 5.041478 0.0690514 1.567871

  9. Summary • Phones data • Bootstrap linear models

  10. Some Tips • Don’t try to cover too much. • Keep it structured. • Don’t put too much in the slides. • Let them listen to you. • Plan to use blackboards as well. • Don’t agonize over equations (or equation editor). • Make slides look neat & pleasant. • Practice and time your presentation.

More Related