Learn R Programming

estimateW (version 0.1.0)

beta_sampler: An R6 class for sampling slope parameters

Description

This class samples slope parameters with a Gaussian prior from the conditional posterior. Use the beta_priors class for setup.

Arguments

Format

An R6Class generator object

Public fields

beta_prior

The current beta_priors

curr_beta

The current value of \(\beta\)

Methods


Method new()

Usage

beta_sampler$new(beta_prior)

Arguments

beta_prior

The list returned by beta_priors


Method sample()

Usage

beta_sampler$sample(Y, X, curr_sigma)

Arguments

Y

The \(N\) by \(1\) matrix of responses

X

The \(N\) by \(k\) design matrix

curr_sigma

The variance parameter \(\sigma^2\)