Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

law

Law school data from Efron and Tibshirani


Description

The law school data. A random sample of size n=15 from the universe of 82 USA law schools. Two measurements: LSAT (average score on a national law test) and GPA (average undergraduate grade-point average). law82 contains data for the whole universe of 82 law schools.

Usage

data(law)

Format

A data frame with 15 observations on the following 2 variables.

LSAT

a numeric vector

GPA

a numeric vector

Details

In the book for which this package is support software, this example is used to bootstrap the correlation coefficient.

Source

Efron, B. and Tibshirani, R. (1993) An Introduction to the Bootstrap. Chapman and Hall, New York, London.

See Also

Examples

str(law)
if(interactive())par(ask=TRUE)
plot(law)
theta <- function(ind) cor(law[ind,1], law[ind,2])
theta(1:15) # sample estimate
law.boot <- bootstrap(1:15, 2000, theta)
sd(law.boot$thetastar) # bootstrap standard error
hist(law.boot$thetastar)
# bootstrap t confidence limits for the correlation coefficient:
theta <- function(ind) cor(law[ind,1], law[ind,2])
boott(1:15, theta, VS=FALSE)$confpoints
boott(1:15, theta, VS=TRUE)$confpoints
# Observe the difference! See page 162 of the book. 
# abcnon(as.matrix(law), function(p,x) cov.wt(x, p, cor=TRUE)$cor[1,2]  )$limits
# The above cannot be used, as the resampling vector can take negative values!

bootstrap

Functions for the Book "An Introduction to the Bootstrap"

v2019.6
BSD_3_clause + file LICENSE
Authors
S original, from StatLib, by Rob Tibshirani. R port by Friedrich Leisch.
Initial release
2019-06-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.