sample.beta: Posterior distribution of the regression coefficients for a...

Description Usage Arguments Value Author(s) Examples

View source: R/sample.beta.R

Description

The sample.beta function generates the effect size estimates of a chosen model within the best models.

Usage

1
  sample.beta(x, res.g, Nmonte.sigma = 1, Nmonte = 1)

Arguments

x

an object of class ESS

res.g

an object of class g.prior produced by get.g.sweep.

Nmonte.sigma

number of re-samples of the posterior variance covariance matrix of the outcomes (Sigma), for a given value of g among those observed for the model under investigation.

Nmonte

number of re-samples of the regression coefficient vector, for a given value of g and of the Sigma matrix.

Value

A list containing the sampled values of the regression coefficients. Re-samples for a given value of g among those observed for the model under investigation are presented in rows (Nmonte x Nmonte.sigma rows) and columns are arranged such that the k-th block of q values represents the regression coefficients of predictor k for all q outcomes.

Author(s)

Benoit Liquet, b.liquet@uq.edu.au,
Marc Chadeau-Hyam m.chadeau@imperial.ac.uk,
Leonardo Bottolo l.bottolo@imperial.ac.uk,
Gianluca Campanella g.campanella11@imperial.ac.uk

Examples

1
2
3
4
5
modelY_Hopx <- example.as.ESS.object()
n.sweep <- get.sweep.best.model(modelY_Hopx,models=1:2)
res.g <- get.g.sweep(modelY_Hopx,n.sweep$result,model=1)
beta <- sample.beta(modelY_Hopx,res.g,Nmonte=5,Nmonte.sigma=5)
res.D14Mit3 <- boxplotbeta(modelY_Hopx,beta,variable="D14Mit3")

R2GUESS documentation built on May 2, 2019, 1:47 p.m.