Learn R Programming

logconcens (version 0.17-4)

cure.profile: Evaluate the Profile Log-Likelihood on a Grid of \(p_0\)-Values

Description

For each of a series of values for the cure parameter \(p_0\) run the function logcon and evaluate the (normalized) log-likelihood at \((\phi,p_0)\), where \(\phi\) is the log subprobability density returned by logcon. This serves for (approximate) joint likelihood maximization in \((\phi,p_0)\).

Usage

cure.profile(x, p0grid=seq(0,0.95,0.05), knot.prec=IQR(x[x

Value

A list containing the following values:

p0hat

the element in p0grid that maximizes the profile likelihood (in the very unlikely case of ties, only the smallest such element is returned).

status

the vector of (normalized) profile log-likelihood values for the elements of p0grid.

Arguments

x

a two-column matrix of \(n \geq 2\) rows containing the data intervals.

p0grid

a vector of values \(p_0\) for which the profile log-likelihood is to be evaluated.

knot.prec, reduce, control

arguments passed to the function logcon.

See Also

logcon, loglike

Examples

Run this code
## The example from the logconcens-package help page:
set.seed(11)
x <- rgamma(50,3,1)
x <- cbind(x,ifelse(rexp(50,1/3) < x,Inf,x))

if (FALSE) {
plotint(x)
progrid <- seq(0.1,0.6,0.025)
prores <- cure.profile(x, progrid)
plot(progrid, prores$loglike)
prores$p0hat
res <- logcon(x, p0=prores$p0hat)
plot(res, type="survival")
}

Run the code above in your browser using DataLab