xmp06.12 {Devore6} | R Documentation

## data from Example 6.12

### Description

The `xmp06.12` data frame has 20 rows and 1 columns of data on the survival times of mice subjected to radiation.

### Format

This data frame contains the following columns:

Survival
  a numeric vector of survival times (weeks) of mice subjected to 240 rads of gamma radiation.

### Details

### Source

Devore, J. L. (2003) Probability and Statistics for Engineering and the Sciences (6th ed), Duxbury.

Gross, A. J. and Clark, V. (1976) Survival Distributions: Reliability Applications in the Biomedical Sciences, Wiley.

### Examples

    data(xmp06.12)
    attach(xmp06.12)
    gamma.MoM <- function(x) {
       ## calculate method of moments estimates for gamma distribution
       xbar <- mean(x)
       mnSqDev <- mean((x - xbar)^2)
       c(alpha = xbar^2/mnSqDev, beta = mnSqDev/xbar)
    }
    ## method of moments estimates
    print(surv.MoM <- gamma.MoM(Survival))
    ## evaluating the negative log-likelihood
    gammaLlik <- function(x) {
       ## argument x is a vector of shape (alpha) and scale (beta)
       -sum(dgamma(Survival, shape = x[1], scale = x[2], log = TRUE))
    }
    ## maximum likelihood estimates - use MoM estimates as starting value
    MLE <- optim(par = surv.MoM, gammaLlik)
    print(MLE)
    detach()

[Package Devore6 version 0.5-6 Index]