Learn R Programming

R2GUESS (version 2.0)

get.g.sweep: Internal function used to generate the regression coefficients. This function extracts the values of the shrinkage factor g for a given model specified by its ranked posterior probability

Description

Internal function used for the generation of the regression coefficients beta. get.g.sweep extracts the values of the shrinkage factor g associated with the sweeps at which a given model has been visited. The model under investigation is defined by its rank in terms of posterior probability.

Usage

get.g.sweep(x, res, model)

Arguments

x

an object of class ESS.

res

a matrix of boolean values indicating at which sweeps of the MCMC run the model has been visited. This matrix is the output of get.sweep.best.model.

model

integer specifying the rank (according to the model posterior probability) of the model under investigation.

Value

An object of class g.prior containing:

g.value

the observed values of g for the chosen model.

predictors

the variables belonging to the model considered.

X

the X design matrix for the model.

Y

the centred outcome matrix.

See Also

get.sweep.best.model