Gibbs_AS_posteriorCPP: Use a Gibbs sampler for the A and S variables (E-step of the...

View source: R/RcppExports.R

Gibbs_AS_posteriorCPPR Documentation

Use a Gibbs sampler for the A and S variables (E-step of the EM)

Description

Use a Gibbs sampler for the A and S variables (E-step of the EM)

Usage

Gibbs_AS_posteriorCPP(
  nsamp,
  nburn,
  template_mean,
  template_var,
  S,
  G,
  tau_v,
  Y,
  alpha,
  final,
  return_samp
)

Arguments

nsamp

the number of posterior samples to output after burn-in

nburn

the number of posterior samples to throw away before saving

template_mean

a matrix with dimensions V x Q giving the mean value of the independent components

template_var

a matrix with dimensions V x Q giving the variance of the independent components

S

a matrix with dimensions V x Q of subject independent components

G

a Q x Q matrix of the prior covariance of A

tau_v

a length V vector with noise variance for each data location

Y

a matrix with dimensions V x T of observed BOLD data

alpha

a length Q vector of the prior mean of all rows of A

final

a boolean. Should posterior samples be returned instead of summary measures?

return_samp

a boolean. Should posterior samples be returned?

Value

List with estimates for A, S, and possibly other quantities


templateICAr documentation built on Feb. 16, 2023, 8:14 p.m.