Commit 3d2eaed9 authored by Simon Ciranka's avatar Simon Ciranka
Browse files

added matlab code for pxp

parent e74e9477
%% fist, i have to get the fitted parameters.
% get the BICs from R. format should be: models x subs
options.families = {[1,3,7,9], [2,4,8,10],[5,6]};
%% VBA fullFB
LLFull=load('LL_behavdat_fullFB_prob_flip.mat');
[posteriorFull,outFull] = VBA_groupBMC(LLFull.m');
%% VBA NoNeighrep
LL_noNeigh=load('LLbehavdat_TI_prob_noNeighrep_flip.mat');
[posteriornoNeigh,outnoNeigh] = VBA_groupBMC(LL_noNeigh.m');
%% fire up the VBA toolbox
LL_EEG=load('behavdat_TI_prob_EEGn35_flip.mat');
[posteriorEEG,outEEG] = VBA_groupBMC(LL_EEG.m');
%% fire up the VBA toolbox
LL_online=load('LL_behavdat_TI_prob_online_flip.mat');
%[posteriorOnline,outOnline] = VBA_groupBMC(LL_online.m',options);
[posteriorOnline2,outOnline2] = VBA_groupBMC(LL_online.m');
%% fire up the VBA toolbox
LL_det=load('LL_behavdat_TI_det_flip.mat');
[posteriordet,outdet] = VBA_groupBMC(LL_det.m');
%% fire up the VBA toolbox and read all TI trials
LL_AllTI=load('LL_behavdat_all_TI.mat');
[posterior_AllTI,out_ALLTI] = VBA_groupBMC(LL_AllTI.m');
%% save
dataFull=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceFull_flip.mat'];
dataNoNeighrep=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_NoNeighrep_flip.mat'];
dataEEG=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceEEG_flip.mat'];
dataOnline=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceOnline_flip.mat'];
dataDet=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceDet_flip.mat'];
dataALL=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_ALL_4.mat'];
dataFullAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceFullAllInfo_flip.mat'];
dataNoNeighrepAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_NoNeighrepAllInfo_flip.mat'];
dataEEGAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceEEGAllInfo_flip.mat'];
dataOnlineAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceOnlineAllInfo_flip.mat'];
dataDetAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceDetAllInfo_flip.mat'];
dataALLAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_ALLAllInfo_flip.mat'];
outFullep=outFull.pxp;
outnoNeighep=outnoNeigh.pxp;
outEEGep=outEEG.pxp;
outOnlineep=outOnline2.pxp;
outdetep=outdet.pxp;
outallep=out_ALLTI.pxp;
save(dataFull, 'outFullep');
save(dataNoNeighrep, 'outnoNeighep');
save(dataEEG, 'outEEGep');
save(dataOnline, 'outOnlineep');
save(dataDet, 'outdetep');
save(dataFullAllInfo, 'outFull');
save(dataNoNeighrepAllInfo, 'outnoNeigh');
save(dataEEGAllInfo, 'outEEG');
save(dataOnlineAllInfo, 'outOnline');
save(dataDetAllInfo, 'outdet');
save(dataALLAllInfo, 'outallep');
%% fist, i have to get the fitted parameters.
% get the BICs from R. format should be: models x subs
options.families = {[1,3,7,9], [2,4,8,10],[5,6]};
%% VBA fullFB
LLFull=load('LL_behavdat_fullFB_prob_conf.mat');
[posteriorFull,outFull] = VBA_groupBMC(LLFull.m',options);
%% VBA NoNeighrep
LL_noNeigh=load('LLbehavdat_TI_prob_noNeighrep_conf.mat');
[posteriornoNeigh,outnoNeigh] = VBA_groupBMC(LL_noNeigh.m',options);
%% fire up the VBA toolbox
LL_EEG=load('behavdat_TI_prob_EEGn35_conf.mat');
[posteriorEEG,outEEG] = VBA_groupBMC(LL_EEG.m',options);
%% fire up the VBA toolbox
LL_online=load('LL_behavdat_TI_prob_online_conf.mat');
[posteriorOnline,outOnline] = VBA_groupBMC(LL_online.m',options);
%[posteriorOnline2,outOnline2] = VBA_groupBMC(man(:,[3,7]));
%% fire up the VBA toolbox
LL_det=load('LL_behavdat_TI_det_conf.mat');
[posteriordet,outdet] = VBA_groupBMC(LL_det.m',options);
%% fire up the VBA toolbox and read all TI trials
LL_AllTI=load('LL_behavdat_all_TI.mat');
[posterior_AllTI,out_ALLTI] = VBA_groupBMC(LL_AllTI.m',options);
%% save
dataFull=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceFull_conf.mat'];
dataNoNeighrep=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_NoNeighrep_conf.mat'];
dataEEG=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceEEG_conf.mat'];
dataOnline=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceOnline_conf.mat'];
dataDet=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceDet_conf.mat'];
dataALL=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_ALL_4.mat'];
dataFullAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceFullAllInfo_conf.mat'];
dataNoNeighrepAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_NoNeighrepAllInfo_conf.mat'];
dataEEGAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceEEGAllInfo_conf.mat'];
dataOnlineAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceOnlineAllInfo_conf.mat'];
dataDetAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceDetAllInfo_conf.mat'];
dataALLAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_ALLAllInfo_conf.mat'];
outFullep=outFull.ep;
outnoNeighep=outnoNeigh.ep;
outEEGep=outEEG.ep;
outOnlineep=outOnline.ep;
outdetep=outdet.ep;
outallep=out_ALLTI.ep;
save(dataFull, 'outFullep');
save(dataNoNeighrep, 'outnoNeighep');
save(dataEEG, 'outEEGep');
save(dataOnline, 'outOnlineep');
save(dataDet, 'outdetep');
save(dataFullAllInfo, 'outFull');
save(dataNoNeighrepAllInfo, 'outnoNeigh');
save(dataEEGAllInfo, 'outEEG');
save(dataOnlineAllInfo, 'outOnline');
save(dataDetAllInfo, 'outdet');
save(dataALLAllInfo, 'outallep');
%% fist, i have to get the fitted parameters.
% get the BICs from R. format should be: models x subs
options.families = {1:10 11:20};
%% VBA fullFB
LLFull=load('LL_behavdat_fullFB_prob.mat');
LLFullconfmix=load('LL_behavdat_fullFB_prob_confmix.mat');
LLFullconfmix_norm=cat(1,LLFull.m',LLFullconfmix.m');
[posteriorFull,outFull] = VBA_groupBMC(LLFullconfmix.m');
%% VBA NoNeighrep
LL_noNeigh=load('LLbehavdat_TI_prob_noNeighrep.mat');
LL_noNeighconfmix=load('LLbehavdat_TI_prob_noNeighrep_confmix.mat');
LLnoNeighconfmix_norm=cat(1,LL_noNeigh.m',LL_noNeighconfmix.m');
[posteriornoNeigh,outnoNeigh] = VBA_groupBMC(LL_noNeighconfmix.m');
%% fire up the VBA toolbox
LL_EEG=load('behavdat_TI_prob_EEGn35.mat');
LL_EEGconfmix=load('behavdat_TI_prob_EEGn35_confmix.mat');
LLconfmix_norm=cat(1,LL_EEG.m',LL_EEGconfmix.m');
[posteriorEEG,outEEG] = VBA_groupBMC(LL_EEGconfmix.m');
%% fire up the VBA toolbox
LL_online=load('LL_behavdat_TI_prob_online.mat');
LL_onlineconfmix=load('LL_behavdat_TI_prob_online_confmix.mat');
LLonlineconfmix_norm=cat(1,LL_online.m',LL_onlineconfmix.m');
[posteriorOnline,outOnline] = VBA_groupBMC(LL_onlineconfmix.m');
%[posteriorOnline2,outOnline2] = VBA_groupBMC(man(:,[3,7]));
%% fire up the VBA toolbox
LL_det=load('LL_behavdat_TI_det_conf.mat');
LL_detconfmix=load('LL_behavdat_TI_det_confmix.mat');
LL_detconfmix_norm=cat(1,LL_det.m',LL_detconfmix.m');
[posteriordet,outdet] = VBA_groupBMC(LL_detconfmix.m');
%% fire up the VBA toolbox and read all TI trials
%LL_AllTI=load('LL_behavdat_all_TI.mat');
%[posterior_AllTI,out_ALLTI] = VBA_groupBMC(LL_AllTI.m',options);
%% save
dataFull=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceFull_confmix.mat'];
dataNoNeighrep=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_NoNeighrep_confmix.mat'];
dataEEG=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceEEG_confmix.mat'];
dataOnline=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceOnline_confmix.mat'];
dataDet=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceDet_confmix.mat'];
%dataALL=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_ALL_4.mat'];
dataFullAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceFullAllInfo_confmix.mat'];
dataNoNeighrepAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_NoNeighrepAllInfo_confmix.mat'];
dataEEGAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceEEGAllInfo_confmix.mat'];
dataOnlineAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceOnlineAllInfo_confmix.mat'];
dataDetAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedanceDetAllInfo_confmix.mat'];
%dataALLAllInfo=['..' filesep '..' filesep 'R' filesep 'Simon' filesep 'B_Modelfits' filesep 'exceedance_ALLAllInfo_conf.mat'];
outFullep=outFull.pxp;
outnoNeighep=outnoNeigh.pxp;
outEEGep=outEEG.pxp;
outOnlineep=outOnline.pxp;
outdetep=outdet.pxp;
%outallep=out_ALLTI.ep;
save(dataFull, 'outFullep');
save(dataNoNeighrep, 'outnoNeighep');
save(dataEEG, 'outEEGep');
save(dataOnline, 'outOnlineep');
save(dataDet, 'outdetep');
save(dataFullAllInfo, 'outFull');
save(dataNoNeighrepAllInfo, 'outnoNeigh');
save(dataEEGAllInfo, 'outEEG');
save(dataOnlineAllInfo, 'outOnline');
save(dataDetAllInfo, 'outdet');
%save(dataALLAllInfo, 'outallep');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment