logLikuh {npsurv} | R Documentation |
logLikuh
returns the log-likelihood value of a U-shaped hazard
function, given a data set.
logLikuh(h, data)
h |
an object of class |
data |
numeric vector or matrix for exact or interval-censored
observations, or an object of class |
Log-likelihood value evaluated at h
, given data
.
Yong Wang <yongwang@auckland.ac.nz>
Wang, Y. and Fani, S. (2018). Nonparametric maximum likelihood computation of a U-shaped hazard function. Statistics and Computing, 28, 187-200.
data(ap)
(h0 = uh(.2, NULL, NULL, NULL, NULL, 15, 1)) # Uniform hazard
plot(h0, ylim=c(0,.3))
logLikuh(h0, ap)
r = Uhaz(ap, deg=2)
r$ll
logLikuh(r$h, ap)
plot(r$h, add=TRUE, col="red3")