Skip to content
Snippets Groups Projects
Commit 0faf6e19 authored by Marco Ratto's avatar Marco Ratto
Browse files

Allow inverse transform and set minimum threshold for lam

parent ae6302c3
Branches
Tags
No related merge requests found
function [yy, xdir, isig, lam]=log_trans_(y0,xdir0)
function [yy, xdir, isig, lam]=log_trans_(y0,xdir0,isig,lam)
% Copyright (C) 2012 Dynare Team
%
......@@ -17,6 +17,12 @@ function [yy, xdir, isig, lam]=log_trans_(y0,xdir0)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if nargin==4,
% inverse transformation
yy = (exp(y0)-lam)*isig;
return
end
if nargin==1,
xdir0='';
end
......@@ -67,5 +73,6 @@ else
lam = -min(y0)+abs(median(y0)); %abs(100*(1+min(y0)));
end
end
lam = max(lam,0);
yy = log(y0+lam);
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment