TABLE OF CONTENTS


makeLikelihood/mklik.param.haz [ Functions ]

NAME

    mklik.param.haz --- likelihood of parametric component parameters for hazard

FUNCTION

Compute loglikelihood of parametric component parameters for the hazard curve

SYNOPSIS

2426 mklik.param.haz <- function(param.par, hazard, frailty, regression)

INPUTS

    param.par  a vector of parameters for each of the parametric component
    hazard     RCurve for hazard
    frailty    RCurve for frailty
    regression RRegression structure

OUTPUTS

    lik        loglikelihood of param.par

SOURCE

2429 {
2430     if(!hazard$haspar) return(0)
2431     # update parametric component
2432     hazard <- updateparametric(hazard, param.par)
2433     status <- regression$status
2434     lp <- regression$lp
2435     frailrep <- rep(frailty$x, regression$Ji)
2436     # likelihood computation
2437     lik <- sum(status * log(hazard$y) - frailrep * hazard$ycum * exp(lp))
2438     lik <- lik - sum(param.par^2) / (2 * hazard$param.priorvar)
2439     return(lik)
2440 }