downgrade roxygen2 to v5.0.1, rename EMGLLF -> EMGLLF_R
[valse.git] / reports / bazar Emilie / sautDeDimension.m
CommitLineData
3f62d540 1%Saut de dimension
2figure(1)
3vec=[0,10:100:1210];
4
5for r=vec
6 tableauBis(:,:,r+1) = tableauLassoMLE;
7 [aaaa,bbbb]= min(tableauLassoMLE(:,4)+r*tableauLassoMLE(:,2));
8 tableauBis(:,4,r+1) = tableauLassoMLE(:,4)+r*tableauLassoMLE(:,2);
9 reponse(r+1)=tableauLassoMLE(bbbb,3);
10end
11
12[x1,y1] = stairs(vec,reponse(vec+1))
13plot(x1,y1,'LineWidth',2)
14xlabel('$\kappa$','Interpreter','LaTex','FontSize', 45)
15ylabel('Model dimension','FontSize', 45)
16set(gca, 'FontSize', 40, 'fontName','Times');
17[Cx1,IA,IC] = unique(y1,'stable')
18hold on
19plot([x1(IA(2))-0.001,x1(IA(2))],[0,Cx1(2)],'--','LineWidth',2)
20plot([2*x1(IA(2))-0.001,2*x1(IA(2))],[0,Cx1(3)],'--','LineWidth',2)
21%plot([0,2*x1(IA(2))],[Cx1(3),Cx1(3)],'--','LineWidth',2)
22set(gca,'Box','off')
23set(gca,'YTick',unique([0:800:700]))
24set(gca,'XTick',unique([0:1300:1200]))
25text(x1(IA(2))-20,-20,'$\hat{\kappa}$','Interpreter','LaTex','FontSize',45)
26text(2*x1(IA(2))-20,-20,'$2 \hat{\kappa}$','Interpreter','LaTex','FontSize',45)
27%text(-80,Cx1(3),'$\hat{m}$','Interpreter','LaTex','FontSize',45)
28axis([0 1200 0 650])
29hold off
30
31%LLF pénalisé
32
33% figure(2)
34% plot(tableauLassoMLE(:,3),tableauLassoMLE(:,4)+0*tableauLassoMLE(:,2),'.','markersize', 20)
35% xlabel('Model dimension','FontSize', 30)
36% ylabel('Log-likelihood','Interpreter','LaTex','FontSize', 30)
37% set(gca, 'FontSize', 20, 'fontName','Times');
38figure(3)
39ind = find(tableauLassoMLE(:,4) >4000);
40tableauLassoMLE(ind,:)=[];
41plot(tableauLassoMLE(2:end,3),tableauLassoMLE(2:end,4)+1100*tableauLassoMLE(2:end,2),'.','markersize', 30)
42indiceInt = find(tableauLassoMLE(:,4)+1100*tableauLassoMLE(:,2)<-4401);
43indiceBis = find(tableauLassoMLE(:,3)==53);
44hold on
45plot(tableauLassoMLE(indiceInt,3),tableauLassoMLE(indiceInt,4)+1100*tableauLassoMLE(indiceInt,2),'sr','markersize', 30,'linewidth',5)
46plot(tableauLassoMLE(indiceBis,3),tableauLassoMLE(indiceBis,4)+1100*tableauLassoMLE(indiceBis,2),'dg','markersize', 30,'linewidth',5)
47xlabel('Model dimension','Interpreter','LaTex','FontSize', 45)
48ylabel('Penalized log-likelihood for $2 \hat{\kappa}$','Interpreter','LaTex','FontSize', 45)
49set(gca, 'FontSize', 30, 'fontName','Times');
50set(gcf,'Units','normal')
51set(gca,'Position',[.1 .1 .88 .85])
52hold off
53% figure(4)
54% plot(tableauLassoMLE(:,3),tableauLassoMLE(:,4)+3000*tableauLassoMLE(:,2),'.','markersize', 20)
55% xlabel('Model dimension','FontSize', 30)
56% ylabel('Penalized log-likelihood for $\kappa$ = 3000','Interpreter','LaTex','FontSize', 30)
57% set(gca, 'FontSize', 20, 'fontName','Times');
58%
59% figure(5)
60% n2 = find(piLassoMLE(3,:)~=0,1)-1;
61% n3 = find(piLassoMLE(4,:)~=0,1)-1;
62% plot(tableauLassoMLE(:,3),tableauLassoMLE(:,4)+0*tableauLassoMLE(:,2),'.','markersize', 20)
63% xlabel('Model dimension','FontSize', 30)
64% ylabel('Log-likelihood','Interpreter','LaTex','FontSize', 30)
65% set(gca, 'FontSize', 20, 'fontName','Times');