##Generate Data
Y1=rweibull(100,4,1)
##Create sequence from (0,max(Y1)) for approximation
Y=seq(.01,max(Y1),.01)
##Parameters used to approximate the mean
s=c(0,1,max(Y1))
lam=c(-2,0,-2)
J=1
ApproxMean( Y, s, lam, J)
Run the code above in your browser using DataLab