In our model mui follows a normal distribution with mean Xi^T %*% beta and precision rho. Additionally we assume that beta follows a mvnormal prior with mean 0 and precision (rho_Beta) * I.This function draws from the posterior distribution of beta under these assumptions.
postBeta(rhoBeta = 0.01, rho, Xi, muI)
A vector representing a draw from the posterior distribution of beta parameters.
A scalar representing the prior precision parameter for beta.
A scalar representing the precision parameter.
A matrix of covariates, where each row represents an individual and each column represents a covariate.
A vector where each element is the mean for individual i.
This function assumes that Xi
is a (num Individuals) x (dimension of beta) matrix of covariates.