TABLE OF CONTENTS
MetropolisHastings/updatepostvar.coef [ Functions ]
NAME
updatepostvar.coef --- update prior variance for regression coefficients
FUNCTION
Updates prior variance of regression coefficients using inverse-gamma prior and given hyperparameters.
SYNOPSIS
3133 updatepostvar.coef <- function(regression)
INPUTS
regression an RRegression structure
OUTPUTS
regression updated regression
SOURCE
3136 { 3137 regression$priorvar <- rinvgamma(1, length(regression$coefficients) / 2 + 3138 regression$hyper[1], scale = sum(regression$coefficients^2) / 2 + regression$hyper[2]) 3139 return(regression) 3140 }