% BBCDLmodelcomp_ss_defs

% original variables
c1c = log(c1css);
c1cd = log(c1cdss);
c1mc = log(c1mcss);
c1y = log(c1yss);
c1g = log(c1gss);
c1rpcpd = log(c1rpcpdss);
c1dcore = c1pistar;
c1hp = log(c1hpss);
c1gp = log(c1gpss);
c1pstar = log(1);
c1pid = c1pistar;
c1deltad = 0;
c1rn = c1rnss;

c2c = log(c2css);
c2cd = log(c2cdss);
c2mc = log(c2mcss);
c2y = log(c2yss);
c2g = log(c2gss);
c2rpcpd = log(c2rpcpdss);
c2dcore = c2pistar;
c2hp = log(c2hpss);
c2gp = log(c2gpss);
c2pstar = log(1);
c2pid = c2pistar;
c2deltad = 0;
c2rn = c2rnss;

c1rer = log(c1rerss);
c2rerss = 1/c1rerss;
c2rer = log(c2rerss);
c1shockgy = c1shockgyss;
c1z = c1zss;
c1taupvar = c1taupvarss;
c2shockgy = c2shockgyss;
c2z = c2zss;
c2taupvar = c2taupvarss;

c1pcore = log(1);
c2pcore = log(1);
c1ngdp  = log(c1yss);
c2ngdp  = log(c2yss);
c1dnxf  = log(1);
c2dnxf  = log(1);


Util1 = Util1ss; 
Util2 = Util2ss; 
Welfcon1 = Welfcon1;
Welf1 = Util1/(1-nbeta); 
Welf2 = Util2/(1-nbeta); 
Util = omega_welf1*Util1 + omega_welf2*Util2; 
Welf = Util/(1-nbeta); 
instr1 = c1dnxf;
instr2 = c2dnxf;
c1deltadlag =c1deltad; 
c1deltadlag2 =c1deltad; 
c1ngdplag =c1ngdp; 
c1ngdplag2 =c1ngdp; 
c1pcorelag =c1pcore; 
c1pcorelag2 =c1pcore; 
c1rerlag =c1rer; 
c1rerlag2 =c1rer; 
c1rnlag =c1rn; 
c1rnlag2 =c1rn; 
c1rpcpdlag =c1rpcpd; 
c1rpcpdlag2 =c1rpcpd; 
c1ylag =c1y; 
c1ylag2 =c1y; 
c2deltadlag =c2deltad; 
c2deltadlag2 =c2deltad; 
c2ngdplag =c2ngdp; 
c2ngdplag2 =c2ngdp; 
c2pcorelag =c2pcore; 
c2pcorelag2 =c2pcore; 
c2rerlag =c2rer; 
c2rerlag2 =c2rer; 
c2rnlag =c2rn; 
c2rnlag2 =c2rn; 
c2rpcpdlag =c2rpcpd; 
c2rpcpdlag2 =c2rpcpd; 
c2ylag =c2y; 
c2ylag2 =c2y; 

nvars = M_.endo_nbr;
for i_indx = 1:nvars
  varstring = M_.endo_names{i_indx};
  if isempty(strfind(varstring,'mult')) && isempty(strfind(varstring,'AUX')) && isempty(strfind(varstring,'Welfcorrection'))
      eval([varstring,'_ss = ',varstring,';']);
  end
end
BBCDLmodelcomp_nash_c1dnxf_c2dnxf_lmss; 

c1lmult1=lmss_vals(1); 
c1lmult2=lmss_vals(2); 
c1lmult3=lmss_vals(3); 
c1lmult4=lmss_vals(4); 
c1lmult5=lmss_vals(5); 
c1lmult6=lmss_vals(6); 
c1lmult7=lmss_vals(7); 
c1lmult8=lmss_vals(8); 
c1lmult9=lmss_vals(9); 
c1lmult10=lmss_vals(10); 
c1lmult11=lmss_vals(11); 
c1lmult12=lmss_vals(12); 
c1lmult13=lmss_vals(13); 
c1lmult14=lmss_vals(14); 
c1lmult15=lmss_vals(15); 
c1lmult16=lmss_vals(16); 
c1lmult17=lmss_vals(17); 
c1lmult18=lmss_vals(18); 
c1lmult19=lmss_vals(19); 
c1lmult20=lmss_vals(20); 
c1lmult21=lmss_vals(21); 
c1lmult22=lmss_vals(22); 
c1lmult23=lmss_vals(23); 
c1lmult24=lmss_vals(24); 
c1lmult25=lmss_vals(25); 
c1lmult26=lmss_vals(26); 
c1lmult27=lmss_vals(27); 
c1lmult28=lmss_vals(28); 
c1lmult29=lmss_vals(29); 
c1lmult30=lmss_vals(30); 
c1lmult31=lmss_vals(31); 
c1lmult32=lmss_vals(32); 
c1lmult33=lmss_vals(33); 
c1lmult34=lmss_vals(34); 
c1lmult35=lmss_vals(35); 
c1lmult36=lmss_vals(36); 
c1lmult37=lmss_vals(37); 
c1lmult38=lmss_vals(38); 
c1lmult39=lmss_vals(39); 
c1lmult40=lmss_vals(40); 
c1lmult41=lmss_vals(41); 
c1lmult42=lmss_vals(42); 
c1lmult43=lmss_vals(43); 
c1lmult44=lmss_vals(44); 
c1lmult45=lmss_vals(45); 
c1lmult46=lmss_vals(46); 
c1lmult47=lmss_vals(47); 
c1lmult48=lmss_vals(48); 
c1lmult49=lmss_vals(49); 
c2lmult1=lmss_vals(50); 
c2lmult2=lmss_vals(51); 
c2lmult3=lmss_vals(52); 
c2lmult4=lmss_vals(53); 
c2lmult5=lmss_vals(54); 
c2lmult6=lmss_vals(55); 
c2lmult7=lmss_vals(56); 
c2lmult8=lmss_vals(57); 
c2lmult9=lmss_vals(58); 
c2lmult10=lmss_vals(59); 
c2lmult11=lmss_vals(60); 
c2lmult12=lmss_vals(61); 
c2lmult13=lmss_vals(62); 
c2lmult14=lmss_vals(63); 
c2lmult15=lmss_vals(64); 
c2lmult16=lmss_vals(65); 
c2lmult17=lmss_vals(66); 
c2lmult18=lmss_vals(67); 
c2lmult19=lmss_vals(68); 
c2lmult20=lmss_vals(69); 
c2lmult21=lmss_vals(70); 
c2lmult22=lmss_vals(71); 
c2lmult23=lmss_vals(72); 
c2lmult24=lmss_vals(73); 
c2lmult25=lmss_vals(74); 
c2lmult26=lmss_vals(75); 
c2lmult27=lmss_vals(76); 
c2lmult28=lmss_vals(77); 
c2lmult29=lmss_vals(78); 
c2lmult30=lmss_vals(79); 
c2lmult31=lmss_vals(80); 
c2lmult32=lmss_vals(81); 
c2lmult33=lmss_vals(82); 
c2lmult34=lmss_vals(83); 
c2lmult35=lmss_vals(84); 
c2lmult36=lmss_vals(85); 
c2lmult37=lmss_vals(86); 
c2lmult38=lmss_vals(87); 
c2lmult39=lmss_vals(88); 
c2lmult40=lmss_vals(89); 
c2lmult41=lmss_vals(90); 
c2lmult42=lmss_vals(91); 
c2lmult43=lmss_vals(92); 
c2lmult44=lmss_vals(93); 
c2lmult45=lmss_vals(94); 
c2lmult46=lmss_vals(95); 
c2lmult47=lmss_vals(96); 
c2lmult48=lmss_vals(97); 
c2lmult49=lmss_vals(98); 

