load([s1 '500' s3])
ttt1a=getres1(thhat1,theta0');
ttt2a=getres1(thhat2,theta0');
ttt3a=getres1(thhat3,theta0');


load([s1 '2000' s3])
ttt1b=getres1(thhat1,theta0');
ttt2b=getres1(thhat2,theta0');
ttt3b=getres1(thhat3,theta0');


load([s1 '8000' s3])
ttt1c=getres1(thhat1,theta0');
ttt2c=getres1(thhat2,theta0');
ttt3c=getres1(thhat3,theta0');

fprintf('\n\n\n')

fprintf('\\\\ \n')
fprintf('\\multicolumn{18}{c}{Logit MLE} \\\\ \n')
fprintf(' \\\\ \n')
fprintf('& \\multicolumn{5}{c}{$n=500$} &  & \\multicolumn{5}{c}{$n=2000$} & & \\multicolumn{5}{c}{$n=8000$} \\\\ \n')
lbl={'True' 'Bias' 'MAE '};
for i=1:3
    fprintf(' & \\multicolumn{1}{c}{$\\gamma_1$} & \\multicolumn{1}{c}{$\\gamma_2$} & \\multicolumn{1}{c}{$\\beta_1$} & \\multicolumn{1}{c}{$\\beta_2$} & \\multicolumn{1}{c}{$\\beta_3$} ')
    if i<3
        fprintf(' & ')
    end
end
fprintf('\\\\ \n')
pri_tex([ttt1a ttt1b ttt1c],'6.2',lbl)

fprintf(' \\\\ \n')
fprintf('\\multicolumn{18}{c}{Logit MLE with Estimated Fixed Effects} \\\\ \n')
fprintf(' \\\\ \n')
fprintf('& \\multicolumn{5}{c}{$n=500$} &  & \\multicolumn{5}{c}{$n=2000$} & & \\multicolumn{5}{c}{$n=8000$} \\\\ \n')
lbl={'True' 'Bias' 'MAE '};
for i=1:3
    fprintf(' & \\multicolumn{1}{c}{$\\gamma_1$} & \\multicolumn{1}{c}{$\\gamma_2$} & \\multicolumn{1}{c}{$\\beta_1$} & \\multicolumn{1}{c}{$\\beta_2$} & \\multicolumn{1}{c}{$\\beta_3$} ')
    if i<3
        fprintf(' & ')
    end
end
fprintf('\\\\ \n')
pri_tex([ttt3a ttt3b ttt3c],'6.2',lbl)

fprintf(' \\\\ \n')
fprintf('\\multicolumn{18}{c}{GMM} \\\\ \n')
fprintf(' \\\\ \n')
fprintf('& \\multicolumn{5}{c}{$n=500$} &  & \\multicolumn{5}{c}{$n=2000$} & & \\multicolumn{5}{c}{$n=8000$} \\\\ \n')
lbl={'True' 'Bias' 'MAE '};
for i=1:3
    fprintf(' & \\multicolumn{1}{c}{$\\gamma_1$} & \\multicolumn{1}{c}{$\\gamma_2$} & \\multicolumn{1}{c}{$\\beta_1$} & \\multicolumn{1}{c}{$\\beta_2$} & \\multicolumn{1}{c}{$\\beta_3$} ')
    if i<3
        fprintf(' & ')
    end
end
fprintf('\\\\ \n')
pri_tex([ttt2a ttt2b ttt2c],'6.2',lbl)