srLSE {convexHaz}R Documentation

Compute the LSE of a convex hazard with fixed antimode

Description

This function computes the LSE of a convex hazard function on [0,TT] with antimode a.

Usage

srLSE(x, a, TT, M = 100, GRIDLESS = 0, tol = 1e-08, max.loop = 250, print = 0, 
solve.tol = .Machine$double.eps) 

Arguments

x vector containing the data.
a value of the antimode (the location of the minimum of the hazard rate).
TT value specifiying TT in the interval [0,TT] over which the LSE if found.
M size of the grid used in the implementation of the algorithm. The default value is M=100.
GRIDLESS boolean variable. If GRIDLESS=1, then a 'gridless' implementation of the algorithm is used. The default value is GRIDLESS=0.
tol tolerance value of the algorithm. The default is tol=1e-08.
max.loop maximum number of iterations in the algorithm. The default is
max.loop=250. To be used for troubleshooting.
print boolean variable. If print=1, then the results of each iteration are printed. The default value is print=0. To be used for troubleshooting.
solve.tol tolerance value used in solve() invoked by the algorithm. To be used for troubleshooting. The default value is the same as for the solve() function.

Details

Let HHn be the empirical cumulative hazard function for the data x. Then the LSE is the convex hazard function, with minimum at a, which is closest to the hazard function whose integral is given by HHn, in the least squares sense. See Jankowski and Wellner (2007) for further details.

The function implements the support reduction algorithm Groeneboom, Jongbloed and Wellner (2007).

Increasing M, decreasing tol, and setting GRIDLESS=1 will each increase the accuracy of the algorithm. However, these will also increase the computing time, especially increasing M.

Value

A list which includes
lse list containing the support supp and mixing measure mix (further lists) for the computed LSE. The function h can translate these into a hazard function.
ls value of the least squares criterion function at the LSE.
iter number of iterations of the algorithm.
conv boolean indicating if the algorithm has converged.

Troubleshooting

If the algorithm fails to converge, then there are several options available. Setting print=1 can reveal the reason behind the failure. If the maximal number of iterations was reached, then increasing max.loop may solve the problem. If a linear solve problem occured, then one can try to decrease the tolerance of the solve() function, solve.tol.

Author(s)

Hanna Jankowski: hkj@mathstat.yorku.ca, Ivy Wang, Hugh McCague, Jon A. Wellner

References

Groeneboom, Jongbloed and Wellner (2008). The support reduction algorithm for computing nonparametric function estimates in mixture models. Scan. J. Statist. 35, 385–399.

Jankowski and Wellner (2007). Nonparametric estimation of a convex bathtub-shaped hazard function. Technical Report 521, Department of Statistics, University of Washington.

Jankowski and Wellner (2008). Computation of nonparametric convex hazard estimators via profile methods. Technical Report 542, Department of Statistics, University of Washington.

See Also

convexMLE convexLSE hazard srMLE

Examples

# Generate sample data:
set.seed(1111, kind="default")
x 	<- rweibull(50, 3) 

# Find the LSE with antimode a=0 over the range [0,1]:
TT	<- 1	
lse 	<- srLSE(x, a=0, TT=TT)

# plot the true hazard function and the lse
h.true 	<- function(x) 3*x^2
tt	<- c(0,sort(lse$lse$supp$tau), sort(lse$lse$supp$eta), TT)
yy	<- sapply(tt, h, supp=lse$lse$supp, hpar=lse$lse$mix)


plot(h.true, xlim=c(0,TT), lwd=2, col="blue", ylab="hazard", xlab="time", main="LSE (a=0)")
lines(tt,yy, lwd=2, col="red")
legend("topleft", c("true","estimated"),col=c("blue", "red"), lwd=2, inset = .05)

[Package convexHaz version 0.2 Index]