Description Usage Arguments Value Author(s)
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. Notice that in this case, the partition is implied in the spike indicator functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | dfpSpiLas(
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,
hds1 = 1,
hds2 = 1,
progress = TRUE,
staPar,
savBol = TRUE,
savCoe,
datPer = seq(1:endBat),
c,
iniPar
)
|
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. |
hds1 |
Hyper-prior for the theta (sparsity) parameter. Default is 1. |
hds2 |
Hyper-prior for the theta (sparsity) parameter. Default is 1. |
progress |
A boolean indicating if a progress bar is desired. Default is TRUE. |
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. |
c |
Spike parameter value. |
iniPar |
Initial partition. |
A list containing selected parameter samples, sufficient statistics, and parameter partition.
A matrix with samples for the selected coefficients, 1 sample per row.
A matrix with samples for the selected local shrinkage parameters associated to the selected coefficients, 1 sample per row.
Samples for sigma.
Samples for the global shrinkage parameter.
Samples for the sparsity parameter.
Samples for the Lasso indicators.
Updated sufficient statistic X'X.
Updated sufficient statistic X'y.
Updated sufficient statistic y'y.
Updated sufficient statistic for the number of observations processed so far.
Rene Gutierrez Marquez
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.