TABLE OF CONTENTS


CmakeLikelihood/LikelihoodRegression [ Functions ]

NAME

    LikelihoodRegression --- likelihood of regression coefficients

FUNCTION

Computes the likelihood of regression coefficients beta, called by MH_Regression. See also mklik.coef.

SYNOPSIS

1682 static inline double LikelihoodRegression(curveP hazard,curveP frailty,regressionP regression)

INPUTS

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

OUTPUTS

    lik    loglikelihood of regression->coefficients

SOURCE

1686 {
1687     double lik; 
1688     double * hazYcum = hazard->Ycum;
1689     double * frailelp = regression->frailelp;
1690     lik = ddotWrapper(regression->n, regression->status, regression->lp);
1691     lik -= ddotWrapper(regression->n, frailelp, hazYcum);
1692     int c1 = 1;
1693     lik -= pow(F77_CALL(dnrm2)(&(regression->p), regression->coefficients, &c1),2)/
1694         (2*regression->priorvar[0]);
1695     return lik;
1696 }