Commit bc6042fb authored by Marco Ratto's avatar Marco Ratto
Browse files

Improved display of bivariate projections when pprior=0,

specially useful when neighborhood_width is used
parent ebbae793
......@@ -88,6 +88,7 @@ nshock = nshock + estim_params_.nvn;
nshock = nshock + estim_params_.ncx;
nshock = nshock + estim_params_.ncn;
lpmat0=[];
xparam1=[];
pshape = bayestopt_.pshape(nshock+1:end);
p1 = bayestopt_.p1(nshock+1:end);
......@@ -396,6 +397,9 @@ else
end
load(filetoload,'lpmat','lpmat0','iunstable','istable','iindeterm','iwrong','egg','yys','nspred','nboth','nfwrd')
Nsam = size(lpmat,1);
if pprior==0,
eval(['load ' options_.mode_file '.mat;']);
end
if prepSA & isempty(strmatch('T',who('-file', filetoload),'exact')),
......@@ -531,18 +535,18 @@ if length(iunstable)>0 & length(iunstable)<Nsam,
c0=corrcoef(lpmat(istable,:));
c00=tril(c0,-1);
stab_map_2(lpmat(istable,:),alpha2, pvalue_corr, asname, OutputDirectoryName);
stab_map_2(lpmat(istable,:),alpha2, pvalue_corr, asname, OutputDirectoryName,xparam1);
if length(iunstable)>10,
stab_map_2(lpmat(iunstable,:),alpha2, pvalue_corr, auname, OutputDirectoryName);
stab_map_2(lpmat(iunstable,:),alpha2, pvalue_corr, auname, OutputDirectoryName,xparam1);
end
if length(iindeterm)>10,
stab_map_2(lpmat(iindeterm,:),alpha2, pvalue_corr, aindname, OutputDirectoryName);
stab_map_2(lpmat(iindeterm,:),alpha2, pvalue_corr, aindname, OutputDirectoryName,xparam1);
end
if length(ixun)>10,
stab_map_2(lpmat(ixun,:),alpha2, pvalue_corr, aunstname, OutputDirectoryName);
stab_map_2(lpmat(ixun,:),alpha2, pvalue_corr, aunstname, OutputDirectoryName,xparam1);
end
if length(iwrong)>10,
stab_map_2(lpmat(iwrong,:),alpha2, pvalue_corr, awrongname, OutputDirectoryName);
stab_map_2(lpmat(iwrong,:),alpha2, pvalue_corr, awrongname, OutputDirectoryName,xparam1);
end
x0=0.5.*(bayestopt_.ub(1:nshock)-bayestopt_.lb(1:nshock))+bayestopt_.lb(1:nshock);
......
function stab_map_2(x,alpha2, pvalue, fnam, dirname)
function stab_map_2(x,alpha2, pvalue, fnam, dirname,xparam1)
% function stab_map_2(x, alpha2, pvalue, fnam, dirname)
%
% Written by Marco Ratto
......@@ -38,6 +38,9 @@ end
if nargin<5,
dirname='';
end
if nargin<6,
xparam1=[];
end
ys_ = oo_.dr.ys;
dr_ = oo_.dr;
......@@ -55,6 +58,9 @@ ifig=0;
j2=0;
if ishock==0
npar=estim_params_.np;
if ~isempty(xparam1),
xparam1=xparam1(nshock+1:end);
end
else
npar=estim_params_.np+nshock;
end
......@@ -77,6 +83,9 @@ for j=1:npar,
%plot(stock_par(ixx(nfilt+1:end,i),j),stock_par(ixx(nfilt+1:end,i),i2(jx)),'.k')
%hold on,
plot(x(:,j),x(:,i2(jx)),'.')
if ~isempty(xparam1)
hold on, plot(xparam1(j),xparam1(i2(jx)),'ro')
end
% xlabel(deblank(estim_params_.param_names(j,:)),'interpreter','none'),
% ylabel(deblank(estim_params_.param_names(i2(jx),:)),'interpreter','none'),
if ishock,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment