TABLE OF CONTENTS


CmakeLikelihood/LikelihoodWeightFrailty [ Functions ]

NAME

    LikelihoodWeightFrailty --- likelihood of weight for frailty curve

FUNCTION

Compute loglikelihood of weight parameter for the frailty curve, if the frailty curve has both. See also mklik.weight.frail.

SYNOPSIS

1871 double LikelihoodWeightFrailty(curveP hazard, curveP frailty, regressionP regression)

INPUTS

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

OUTPUTS

    lik   loglikelihood of frailty->Weight

SOURCE

1875 {
1876     double lik =  LikelihoodFrailtyLogSum(frailty->nx, frailty->Y);
1877 
1878     lik += (frailty->WeightHyper[0] - 1.0) * log(frailty->Weight[0])
1879           +(frailty->WeightHyper[1] - 1.0) * log(1.0 - frailty->Weight[0]);
1880     return lik;
1881 }