function f = OSIH_laborsupply_fun(labor_guess)
% function file for Optimal_Social_Insurance_and_Health_Inequality.m
% compoutes optimal labor supply

global tau s w delta n eta sigma kappa_0 tau_g z A alpha_1 beta_1 h1
ell=labor_guess;

y=z*w*ell(3);
a1=alpha_1*exp(-beta_1*h1/A);
g1 = my_poisspdf(n,a1);
L=sum(g1.*ell);
TT=tau_g*w*L;

f=kappa_0.*exp(delta.*n).*ell.^(1/eta).*((1-tau-s-tau_g).*w.*ell+y+TT).^sigma-(1-tau-s-tau_g).*w;

