| getPosteriorParms {bfp} | R Documentation | 
Extract updated posterior parameters for the normal inverse gamma distribution from a model, given a shrinkage factor.
Description
Conditional on a fixed shrinkage factor t=g/(g+1), the posterior joint distribution of the effects and the regression variance is normal inverse gamma. With this function, you can compute the parameters of this distribution.
Usage
getPosteriorParms(x, shrinkage=x[[1]]$postExpectedShrinkage,  
                  design = getDesignMatrix(x))
Arguments
| x | a valid  | 
| shrinkage | shrinkage factor used in the computations (defaults
to the posterior expected shrinkage factor in the model  | 
| design | (centered) design matrix for the model | 
Value
A list with four parameters:
| aStar | the first parameter of the inverse gamma distribution | 
| VStar | the covariance matrix part of the multivariate normal distribution | 
| mStar | the expectation of the multivariate normal distribution | 
| bStar | the second parameter of the inverse gamma distribution | 
Author(s)
Daniel Saban\'es Bov\'e
Examples
## construct a BayesMfp object
set.seed(19)
x1 <- rnorm (n=15)
x2 <- rbinom (n=15, size=20, prob=0.5) 
x3 <- rexp (n=15)
y <- rt (n=15, df=2)
test <- BayesMfp (y ~ bfp (x2, max = 4) + uc (x1 + x3), nModels = 200, method="exhaustive")
## now get the posterior parameters of the third best model
getPosteriorParms(test[3])
[Package bfp version 0.0-48 Index]