dfpBayLas: Performs DFP for the Bayesian Lasso Prior

Description Usage Arguments Value Author(s)

View source: R/dfpBayLas.R

Description

This function runs DFP using the Bayesian Lasso prior on data batches previously stored in the indicated paths. It saves the performance statistics indicated in the paper as well as the current point estimates and sufficient statistics used for the following batch. It returns samples for selected parameters for monitoring, as well as the updated sufficient statistics as well as the updated partition and partition threshold parameter.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
dfpBayLas(
  staBat = 1,
  endBat = staBat,
  XDatPat = "./dat/datX-complete-",
  yDatPat = "./dat/daty-complete-",
  staPat = "./out/sta.RData",
  curParPat = "./out/curPar.RData",
  savPat = "./out/savPar.RData",
  suffix = "complete-dfp-BayLas",
  cores = parallel::detectCores()/2,
  staFla = TRUE,
  savCurPar = FALSE,
  nmcmc = 100,
  hlsh = 1,
  hlsc = 1,
  progress = TRUE,
  updPar = 1,
  staPar,
  savBol = TRUE,
  savCoe,
  datPer = seq(1:endBat),
  M,
  iniPar
)

Arguments

staBat

Starting batch number.

endBat

End batch number. As default is set as the starting batch.

XDatPat

Path to the batch predictors. A default is provided as a suggestion.

yDatPat

Path to the batch responses.

staPat

Path to the statistics of previous batches. If no file has been created a new one is created with the path provided.

curParPat

Path to the current parameter point estimates, partition and sufficient statistics.

savPat

Path to the file to save the parameters requested.

suffix

Suffix to be added to the file paths.

cores

Number of cores to be used in the parallel computations. Set as default as half the number of cores detected.

staFla

A boolean indicating if the statistics will be saved.

savCurPar

A boolean indicating if the updated parameters will be saved.

nmcmc

Number of samples of the parameters.

hlsh

Hyper-prior for the lambda parameter shape. Default is 1.

hlsc

Hyper-prior for the lambda parameter rate. Default is 1.

progress

A boolean indicating if a progress bar is desired. Default is TRUE.

updPar

Number of batches processed before the partition is updated. Default is 1.

staPar

Starting value for the parameters. Used only for the first batch.

savBol

Boolean indicating if the selected parameters will be saved.

savCoe

Vector indicating the index of the coefficients to be saved. This will also saved the associated parameters to each coefficient.

datPer

Vector containing the order in which the data is to be processed.

M

Maximum number of elements in each part of the partition.

iniPar

Initial partition.

Value

A list containing selected parameter samples, sufficient statistics, and parameter partition.

sb

A matrix with samples for the selected coefficients, 1 sample per row.

st

A matrix with samples for the selected local shrinkage parameters associated to the selected coefficients, 1 sample per row.

ss

Samples for sigma.

sl

Samples for the global shrinkage parameter.

XX

Updated sufficient statistic X'X.

Xy

Updated sufficient statistic X'y.

yy

Updated sufficient statistic y'y.

sN

Updated sufficient statistic for the number of observations processed so far.

P

Updated partition.

treshold

Updated partition treshold correlation.

Author(s)

Rene Gutierrez Marquez


Rene-Gutierrez/DynParRegReg documentation built on Dec. 18, 2021, 9:57 a.m.