law {bootstrap} R Documentation

## 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.

`law82`.

### Examples

```str(law)
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!
```

[Package bootstrap version 2019.6 Index]