prof_gp_endpt {longevity} | R Documentation |
Profile likelihood for the endpoint of the generalized Pareto distribution
Description
This function returns the profile log likelihood over a grid of values of psi
, the endpoints.
Usage
prof_gp_endpt(
time,
time2 = NULL,
event = NULL,
thresh = 0,
type = c("right", "left", "interval", "interval2"),
ltrunc = NULL,
rtrunc = NULL,
weights = rep(1, length(time)),
psi = NULL,
confint = FALSE,
level = 0.95,
arguments = NULL,
...
)
Arguments
time |
excess time of the event of follow-up time, depending on the value of event |
time2 |
ending excess time of the interval for interval censored data only. |
event |
status indicator, normally 0=alive, 1=dead. Other choices are |
thresh |
vector of thresholds |
type |
character string specifying the type of censoring. Possible values are " |
ltrunc |
lower truncation limit, default to |
rtrunc |
upper truncation limit, default to |
weights |
weights for observations |
psi |
mandatory vector of endpoints at which to compute the profile |
confint |
logical; if |
level |
numeric; the level for the confidence intervals |
arguments |
a named list specifying default arguments of the function that are common to all |
... |
additional parameters, currently ignored |
Value
a list with the maximum likelihood estimate of the endpoint and the profile log-likelihood
Examples
set.seed(2023)
time <- relife(n = 100, scale = 3, shape = -0.3, family = "gp")
endpt <- prof_gp_endpt(
time = time,
psi = seq(max(time) + 1e-4, max(time) + 40, length.out = 51L))
print(endpt)
plot(endpt)
confint(endpt)