# find.shapeMLE: Compute the MLE of a shape-constrained hazard function In CPHshape: Find the maximum likelihood estimator of the shape constrained hazard baseline and the effect parameters in the Cox proportional hazards model

## Description

Compute the maximum likelihood estimator (MLE) of a shape-constrained hazard function under IID sampling. We assume that the data are continuous and allow for right censoring. The function 'find.shapeMLE' allows for four different shape constraints: increasing, decreasing, unimodal, and u-shaped.

## Usage

 `1` ```find.shapeMLE(x, delta=rep(1, length(x)), type = "increasing", plot = FALSE) ```

## Arguments

 `x` vector of length n containing the data `delta` logical vector containing the (right) censoring information. If delta_i=1 then the observation was not censored. The default is delta_i=1 for all i, that is, assuming that no observations were censored. `type` string indicating type of shape constraint. Options are "increasing", "decreasing", "unimodal", and "ushaped". `plot` logical, if TRUE, the graphical representation of the MLE is shown

## Value

A list containing the following elements:

 `h.range` endpoints for the values of the hazard MLE `h.val` values of the hazard MLE in between the endpoints `phi` the criterion function `Phi` (negative log-likelihood) evaluated at the MLE `H` the cumulative hazard MLE evaluated at the data points `mode` location of the mode (for unimodal) or antimode (for u-shaped). Note that the antimode is not unique, and the midpoint of all possible values is returned. `type` string indicating type of shape constraint used

## Note

The MLE can be found in different ways. We use the graphical representation via convex minorants or concave majorants of appropriate functions. Also, for the increasing and unimodal setting, the MLE takes the value of infinity at the mode (the largest observation for `type="increasing"`). In such situations, this value is removed from the likelihood in the maximization process. A similar approach was taken in Gernander (1956).

## Author(s)

Rihong Hui and Hanna Jankowski <[email protected]>

## References

Hui, R. and Jankowski, H. (2012). Maximum likelihood estimation of a shape-constrained hazard in the proportional hazard model. Technical Report. http://www.math.yorku.ca/~hkj/

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15``` ```# random sample from the uniform density n <- 500 x <- runif(n) # compute MLE of increasing hazard mle <- find.shapeMLE(x, type="increasing") # plot the fitted hazard plot(mle) rug(x) # add true hazard to the plot h.true <- function(x) 1/(1-x) plot(h.true, col="red", add=TRUE) ```

CPHshape documentation built on May 30, 2017, 4:32 a.m.