logLikuh {npsurv} | R Documentation |
Computes the Log-likelihood Value of a U-shaped Hazard Function
Description
logLikuh
returns the log-likelihood value of a U-shaped hazard
function, given a data set.
Usage
logLikuh(h, data)
Arguments
h |
an object of class |
data |
numeric vector or matrix for exact or interval-censored
observations, or an object of class |
Value
Log-likelihood value evaluated at h
, given data
.
Author(s)
Yong Wang <yongwang@auckland.ac.nz>
References
Wang, Y. and Fani, S. (2018). Nonparametric maximum likelihood computation of a U-shaped hazard function. Statistics and Computing, 28, 187-200.
See Also
Examples
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")
[Package npsurv version 0.5-0 Index]