Hi everyone,
I would like to ask for advice about multivariate shape-preserving approximation in Julia. I am working on a problem that involves solving the generalized Euler equation in a style of Klein, Krusell, and Ríos-Rull globally, unfortunately that problem involves 3 continuous state variables and one shock, hence univariate Schumaker splines aren’t an option. I need to use a shape-preserving approximation to ensure convergence of the projection algorithm (Maliar and Maliar, 2016).
Is there some ready to use package that provides multivariate shape-preserving approximation capabilities?
Best,
Honza
What shapes do you need the approximation scheme to preserve, @Honza9723 ? Piecewise linear approximation preserves monotonicity and concavity/convexity.
@john.stachurski Thank you for your response! I am a bit afraid that linear interpolation wouldn’t be very efficient (especially in 4D). Is there some feasible alternative?
It is rather idiosyncratic to the problem you are solving. Two cents from my own experience (I’ve been struggling with some shape preserving stuff myself): If you only make one of your state variables continuous then there are a lot of robust methods, as even a simple cubic spline or a Chebyshev polynomial would do the work perfectly; if you want several of your state variables to be continuous (in the program), then piecewise linear is the only robust one, and probably the best choice. Any multi dimensional smoothing kernels will bring you trouble.
Thank you for sharing your experience! Linear interpolation sounds like the most robust option, I am just afraid, how efficient would be in my 4D problem (expected to grow to 6D).
Numerous people have used that in macro. I would say first try linear interpolation to at least yield some result, and then think about other methods…
1 Like