TABLE OF CONTENTS


CmakeLikelihood/LikelihoodParamHazard [ Functions ]

NAME

    LikelihoodParamHazard --- likelihood of hazard parametric parameters

FUNCTION

Compute loglikelihood of parameters for the parametric component of the hazard curve. See also mklik.param.haz.

SYNOPSIS

1778 static inline double LikelihoodParamHazard(curveP hazard, curveP frailty, regressionP regression)

INPUTS

    hazard        CCurve for the hazard
    frailty       CCurve for the frailty
    regression    CRegression structure

OUTPUTS

    lik    loglikelihood of hazard->ParamPar

SOURCE

1782 {
1783     double * frailelp = regression->frailelp;
1784     double * hazYcum = hazard->Ycum;
1785    
1786     // point process likelihood
1787     double lik = LikelihoodHazardLogSum(hazard->nx, regression->status, hazard->ParamY);
1788     lik -= ddotWrapper(regression->n, frailelp, hazard->ParamYcum);
1789     int c1=1;
1790     // Gaussian prior for parameters
1791     lik -= pow(F77_CALL(dnrm2)(&(hazard->np), hazard->ParamPar, &c1),2)/(2*hazard->ParamPriorvar[0]);
1792     return lik;
1793 }