Learn R Programming

dynamichazard (version 1.0.2)

logLik.ddhazard: Log Likelihood of Mean Path of ddhazard Object

Description

Computes the log likelihood of (a potentially new) data set given the estimated: $$E_{\theta}(\alpha_1 | y_{1:d}), E_{\theta}(\alpha_{2} | y_{1:d}), ..., E_{\theta}(\alpha_{d} | y_{1:d})$$

of the ddhazard object. Note that this is not the log likelihood of the observed data given the outcome.

Usage

# S3 method for ddhazard
logLik(object, data = NULL, id, ...)

Value

Returns an ojbect of class logLik. See logLik.

Arguments

object

an object of class ddhazard.

data

new data to evaluate the likelihood for.

id

the individual identifiers as in ddhazard.

...

unused.

Examples

Run this code
library(dynamichazard)
fit <- ddhazard(
 Surv(time, status == 2) ~ log(bili), pbc, id = pbc$id, max_T = 3600,
 Q_0 = diag(1, 2), Q = diag(1e-4, 2), by = 50,
 control = ddhazard_control(method = "GMA"))
logLik(fit)

Run the code above in your browser using DataLab