function [err]=comp_omegabare(x,param)
psi      =  param(1);
epsn     =  param(2);
gamma    =  param(3);
betat    =  param(4);
sigma    =  param(5);
beta     =  param(6);
alpha    =  param(7);
DL       =  param(8);
Lf_ss    =  param(9);
muD      =  param(10);
deltaD   =  param(11);
a        =  param(12);

QY       =  beta*gamma*(1-alpha)*(sigma-1)/sigma/Lf_ss*DL*x^(-gamma)/((1+muD)*(1-beta*(1-deltaD)));

err=[psi*(epsn*DL*x)^(-psi-1)*epsn*betat/(1-betat)/sigma  - (1-alpha)*(sigma-1)/sigma/Lf_ss*x^(-gamma) + a*QY];
end