1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- %%
- good_partis_sub=[];
- for ppp=1:length(partis_sub)
- % Loading dataset
- if strcmp( partis_sub{ppp,:},'p11')
- load([mainfolder 'logfiles/resultfile_p11_table_repaired.mat'])
- subtable=sub
- else
- subtable=[];
- sub = tdfread([mainfolder 'logfiles/resultfile_' partis_sub{ppp,:} '.txt'],'tab'); %Logfile for this participant
- subtable=struct2table(sub);
- end
- totalinc=(sum(subtable.acc_trial_concrete_cued==1))
- n=length(subtable.acc_trial_concrete_cued)
- p=ones(size(subtable.acc_trial_concrete_cued))*.5
- bt=myBinomTest(totalinc,n,0.5,'one')
- totalinc2=(sum(subtable.acc_trial_concrete_uncued==1))
- n2=sum(~isnan(subtable.acc_trial_concrete_uncued))
- p=ones(size(subtable.acc_trial_concrete_cued))*.5
- bt2=myBinomTest(totalinc2,n2,0.5,'one')
- gen_acc_(ppp,1)=totalinc/n;
- gen_acc_(ppp,2)=bt<0.05
- gen_acc_(ppp,3)=totalinc2/n2;
- gen_acc_(ppp,4)=bt2<0.05
- gen_acc_(ppp,6)=ppp;
- if (gen_acc_(ppp,1)<=0.5|gen_acc_(ppp,2)==0)|(gen_acc_(ppp,3)<=0.5|gen_acc_(ppp,4)==0)
- gen_acc_(ppp,5)=0
- else
- gen_acc_(ppp,5)=1
-
- good_partis_sub=[good_partis_sub;{partis_sub{ppp,:}}]
- end
- end
- %% Plots
- if accuracy_plots
-
- sum(gen_acc_(:,5))/length(gen_acc_(:,5))
-
- figure;
-
- plot1=scatter(gen_acc_(:,6),gen_acc_(:,1),75,'MarkerEdgeColor',[0 .5 .5],...
- 'MarkerFaceColor',[0 .7 .7],...
- 'LineWidth',1.5); hold on;
-
- plot2=scatter(gen_acc_(:,6),gen_acc_(:,3),75,'MarkerEdgeColor',[.5 .5 0],...
- 'MarkerFaceColor',[0.9 .5 0.7],...
- 'LineWidth',1.5); hold on;
-
-
- line([0,length(gen_acc_(:,5))+1], [0.5,0.5], 'Color', 'k','LineStyle','-');hold on;
- line([0,length(gen_acc_(:,5))+1], [0.55,0.55], 'Color', 'k','LineStyle','--');hold on;
- line([0,length(gen_acc_(:,5))+1], [0.45,0.45], 'Color', 'k','LineStyle','--');hold on;
-
- for ppp=1:length(gen_acc_(:,5))
-
- line([ppp,ppp], [gen_acc_(ppp,1),gen_acc_(ppp,3)], 'Color', 'k','LineStyle',':');hold on;
-
- end
- end
|