BGLR fits Gaussian models of the form
where
The terms of the linear predictor (ETA, when this term is not included in the model, by default, BGLR fits an intercept model of the form
Simulating posterior samples for an intercept only model
The following script shows how to fit this model, which will estimate
library(BGLR)
# simulating data
mu=123
n=1000
error=rnorm(n,sd=2)
y=mu+error
# fitting the model
fm=BGLR(y=y, nIter=6000,burnIn=1000, verbose=FALSE)Retrieving posterior means and posterior SDs.
The following script shows how to retrieve posterior means and posterior SD of the intercetp and the error variance.
# Intercept
fm$mu #posterior mean
fm$SD.mu $ posterior SD
# Error variance
fm$varE # posterior mean
fm$SD.varE # posterior SD