TABLE OF CONTENTS
CmakeLikelihood/LikelihoodWeightHazard [ Functions ]
NAME
LikelihoodWeightHazard --- likelihood of weight for hazard curve
FUNCTION
Compute loglikelihood of weight parameter for the hazard curve, if the hazard curve has both. See also mklik.weight.haz.
SYNOPSIS
1839 double LikelihoodWeightHazard(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->Weight
SOURCE
1843 { 1844 double * frailelp = regression->frailelp; 1845 double * hazYcum = hazard->Ycum; 1846 1847 // point process likelihood 1848 double lik = LikelihoodHazardLogSum(hazard->nx, regression->status, hazard->Y); 1849 lik -= ddotWrapper(regression->n, frailelp, hazYcum); 1850 // prior on the weight 1851 lik += (hazard->WeightHyper[0] - 1.0) * log(hazard->Weight[0]) 1852 +(hazard->WeightHyper[1] - 1.0) * log(1.0 - hazard->Weight[0]); 1853 return lik; 1854 }