TABLE OF CONTENTS


CMetropolisHastings/UpdatePostvarRegression [ Functions ]

NAME

    UpdatePostvarRegression --- update prior variance for regression coefficients

FUNCTION

Update the prior varaince of regression coefficients using inverse-gamma prior and the given hyperparameters.

SYNOPSIS

2623 void UpdatePostvarRegression(regressionP theReg)

INPUTS

    theReg        a CRegression structure

OUTPUTS

    theReg        the input, with theReg->priorvar updated

SOURCE

2627 {
2628     int c1 = 1;
2629     theReg->priorvar[0] = rinvgamma(
2630             (double) theReg->p / 2 + theReg->hyper[0],
2631             pow(F77_CALL(dnrm2)(&(theReg->p), theReg->coefficients, &c1),2)/2+ theReg->hyper[1] );
2632 }