Search found 99 matches
- Fri Sep 05, 2025 8:22 pm
- Forum: State Space Models/DSGE
- Topic: SV-AR(1) model
- Replies: 20
- Views: 76083
Re: SV-AR(1) model
In the event this helps: 1. In macro forecasting, Bayesian vector autoregressions with stochastic volatility are used commonly and work well. The replication package for a recent paper of mine published in JMCB has RATS code for a BVAR-SV (procedure file is BVAR.SV.src). This is more than you want f...
- Mon Jul 21, 2025 12:37 pm
- Forum: Examples and Sample Code
- Topic: LASSO—Least Absolute Shrinkage and Selection Operator
- Replies: 3
- Views: 64794
Re: LASSO—Least Absolute Shrinkage and Selection Operator
Terrific, thanks very much for adding that!
- Sun Jun 15, 2025 6:57 pm
- Forum: Examples and Sample Code
- Topic: LASSO—Least Absolute Shrinkage and Selection Operator
- Replies: 3
- Views: 64794
Re: LASSO—Least Absolute Shrinkage and Selection Operator
Thanks for adding the Lasso capability with the PLS command. As I understand the documentation, the output from PLS does not seem to yield a list of the regressors selected as belonging in the regression (and having non-zero coefficients)? So one needs to check the %beta obtained from PLS to directl...
- Wed Jun 11, 2025 5:34 pm
- Forum: Data: Reading, Writing, Transforming
- Topic: summing available daily observations to monthly
- Replies: 2
- Views: 48151
Re: summing available daily observations to monthly
Fantastic -- thanks very much!
- Wed Jun 11, 2025 7:46 am
- Forum: Data: Reading, Writing, Transforming
- Topic: summing available daily observations to monthly
- Replies: 2
- Views: 48151
summing available daily observations to monthly
Following other work in a literature, I would like to read in data that are daily at a limited number of dates (these come from an event study approach to constructing monetary policy shocks) to create monthly series that sum the available observations within a month and contains zeros for months wi...
- Wed Jan 22, 2025 7:39 pm
- Forum: Looking for Code?
- Topic: Nowcasting inflation, Knotek and Zaman (2014,2017,2024)
- Replies: 6
- Views: 28425
Re: Nowcasting inflation, Knotek and Zaman (2014,2017,2024)
Sometimes the authors in question are busy and need time to reply. You might also try checking journal websites, especially with journals that encourage or require code and data. In the case of the Knotek and Zaman work, the JMCB data archive has a replication package with their code (in Matlab) and...
- Mon Jul 01, 2024 2:45 pm
- Forum: Looking for Code?
- Topic: density function for inverse Wishart distribution
- Replies: 5
- Views: 27094
Re: density function for inverse Wishart distribution
Great -- thanks very much. I actually did not know/remember that, and it will be very handy for the problem at hand.
- Mon Jul 01, 2024 10:24 am
- Forum: Looking for Code?
- Topic: density function for inverse Wishart distribution
- Replies: 5
- Views: 27094
Re: density function for inverse Wishart distribution
Ok, Tom, you are right: the multivariate gamma piece is irrelevant (cancels out), and everything else is straightforward matrix computation with existing commands and functions. Sorry, I should have realized this before posting.
- Mon Jul 01, 2024 9:01 am
- Forum: Looking for Code?
- Topic: density function for inverse Wishart distribution
- Replies: 5
- Views: 27094
Re: density function for inverse Wishart distribution
Thanks, Tom -- fair point, I will need to work through what exactly suffices in this case. What I am trying to do is make use of a Metropolis step (within a Gibbs sampler) to make the prior governing time variation in some parameters something to be estimated, as in a JBES paper by Amir-Ahmadi, Matt...
- Sun Jun 30, 2024 2:46 pm
- Forum: Looking for Code?
- Topic: density function for inverse Wishart distribution
- Replies: 5
- Views: 27094
density function for inverse Wishart distribution
RATS has functions covering the pdfs of many common distributions, but this does not seem to cover the Inverse Wishart (the pdf is given in sources such as https://en.wikipedia.org/wiki/Inverse-Wishart_distribution). Has anyone in the RATS community by chance already coded this up? The calculations ...
- Thu Mar 21, 2024 11:01 am
- Forum: Examples and Sample Code
- Topic: GIBBSVAR—Gibbs Sampling for BVAR
- Replies: 3
- Views: 25305
Re: GIBBSVAR—Gibbs Sampling for BVAR
Karlsson has a fairly exhaustive survey in the Handbook of Economic Forecasting published several years ago: Sune Karlsson, Chapter 15 - Forecasting with Bayesian Vector Autoregression, Editor(s): Graham Elliott, Allan Timmermann, Handbook of Economic Forecasting, Elsevier, Volume 2, Part B, 2013, P...
- Tue Sep 26, 2023 6:36 pm
- Forum: Help With Programming
- Topic: subsets of variables from unique combinations of larger set
- Replies: 2
- Views: 46007
Re: subsets of variables from unique combinations of larger
Perfect -- thanks very much. I searched various places for "combination" and related terms but didn't hit on that solution.
- Tue Sep 26, 2023 2:54 pm
- Forum: Help With Programming
- Topic: subsets of variables from unique combinations of larger set
- Replies: 2
- Views: 46007
subsets of variables from unique combinations of larger set
With a total of n regressors, I would like to consider models (quantile regressions, actually) estimated separately for each unique combination of 1 to k variables, where k < n. For the k=2, it is trivial to use a pair of do loops for this. But in the more general case with k > 2, something more ele...
- Fri May 12, 2023 4:14 pm
- Forum: Help With Programming
- Topic: dropping out series with missing observations
- Replies: 0
- Views: 33244
dropping out series with missing observations
I have a problem that is going to involve recursively looping over time to form estimates from a set of series with data available. Over time, the number of series with data will change. So I want to read in all of the series and then, for each time loop, pull the subset of variables with complete d...
- Fri May 12, 2023 3:58 pm
- Forum: RATS Procedures
- Topic: QFM--estimation of quantile factor model
- Replies: 0
- Views: 35892
QFM--estimation of quantile factor model
This attached procedure estimates the quantile factor model of Liang Chen, Juan J. Dolado, Jesús Gonzalo (2021), "Quantile Factor Models," Econometrica, p.875-910 (https://doi.org/10.3982/ECTA15746). The computations follow the Matlab function IQR.m of Chen, et al. I have verified that a f...