Search found 93 matches

by tclark
Mon Jul 01, 2024 2:45 pm
Forum: Looking for Code?
Topic: density function for inverse Wishart distribution
Replies: 5
Views: 227

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.
by tclark
Mon Jul 01, 2024 10:24 am
Forum: Looking for Code?
Topic: density function for inverse Wishart distribution
Replies: 5
Views: 227

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.
by tclark
Mon Jul 01, 2024 9:01 am
Forum: Looking for Code?
Topic: density function for inverse Wishart distribution
Replies: 5
Views: 227

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...
by tclark
Sun Jun 30, 2024 2:46 pm
Forum: Looking for Code?
Topic: density function for inverse Wishart distribution
Replies: 5
Views: 227

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 ...
by tclark
Thu Mar 21, 2024 11:01 am
Forum: Examples and Sample Code
Topic: GIBBSVAR—Gibbs Sampling for BVAR
Replies: 3
Views: 23520

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...
by tclark
Tue Sep 26, 2023 6:36 pm
Forum: Help With Programming
Topic: subsets of variables from unique combinations of larger set
Replies: 2
Views: 23602

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.
by tclark
Tue Sep 26, 2023 2:54 pm
Forum: Help With Programming
Topic: subsets of variables from unique combinations of larger set
Replies: 2
Views: 23602

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...
by tclark
Fri May 12, 2023 4:14 pm
Forum: Help With Programming
Topic: dropping out series with missing observations
Replies: 0
Views: 11320

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...
by tclark
Fri May 12, 2023 3:58 pm
Forum: RATS Procedures
Topic: QFM--estimation of quantile factor model
Replies: 0
Views: 15994

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...
by tclark
Tue Jul 13, 2021 7:30 pm
Forum: Help With Programming
Topic: percentiles from an empirical density obtained with DENSITY
Replies: 2
Views: 12966

percentiles from an empirical density obtained with DENSITY

After I use DENSITY to obtain a kernel-smoothed empirical density for a given series, is there a direct way to get the percentiles from that smoothed density? One option is to use %rangrid to take draws and compute percentiles from those draws. Is there a better way? Thanks much.
by tclark
Wed Apr 07, 2021 9:19 am
Forum: Help With Programming
Topic: sum of series of arrays
Replies: 4
Views: 14861

Re: sum of series of arrays

Ok, thanks
by tclark
Tue Apr 06, 2021 5:56 pm
Forum: Help With Programming
Topic: sum of series of arrays
Replies: 4
Views: 14861

Re: sum of series of arrays

I need to take the sum over time of the time series of the matrices in question, to get a matrix of the same shape.
by tclark
Tue Apr 06, 2021 3:01 pm
Forum: Help With Programming
Topic: sum of series of arrays
Replies: 4
Views: 14861

sum of series of arrays

I have time series of matrices (e.g., ser[symm] and ser[rec]) for which I take the sum. I currently use a do loop over time to compute the sums needed. Is there a command or function available to do this (compute the sums of the the time series of matrices) faster? Thanks much.