diff --git a/analysis/matlab/derived/mergeA2_d0_10.csv b/analysis/matlab/derived/mergeA2_d0_10.csv
new file mode 100644
index 0000000..26a1889
--- /dev/null
+++ b/analysis/matlab/derived/mergeA2_d0_10.csv
@@ -0,0 +1,127 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-4.92063492063492,24.2126480221718
+Banh-mi-1,Electrode-Box-B2,1,35,86,-3.92063492063492,15.371378180902
+Banh-mi-1,Electrode-Box-B2,2,47,110,-2.92063492063492,8.53010833963215
+Banh-mi-1,Electrode-Box-B2,3,65,140,-1.92063492063492,3.68883849836231
+Banh-mi-1,Electrode-Box-B2,4,70,127,-0.920634920634921,0.847568657092467
+Banh-mi-1,Electrode-Box-B2,5,102,142,0.0793650793650791,0.0062988158226253
+Banh-mi-1,Electrode-Box-B2,6,90,131,1.07936507936508,1.16502897455278
+Banh-mi-1,Electrode-Box-B2,7,109,148,2.07936507936508,4.32375913328294
+Banh-mi-1,Electrode-Box-B2,8,104,137,3.07936507936508,9.4824892920131
+Banh-mi-1,Electrode-Box-B2,9,119,150,4.07936507936508,16.6412194507433
+Banh-mi-1,Electrode-Box-B2,10,121,158,5.07936507936508,25.7999496094734
+Banh-mi-2,Electrode-Box-A2,0,25,97,-4.92063492063492,24.2126480221718
+Banh-mi-2,Electrode-Box-A2,1,22,101,-3.92063492063492,15.371378180902
+Banh-mi-2,Electrode-Box-A2,2,22,119,-2.92063492063492,8.53010833963215
+Banh-mi-2,Electrode-Box-A2,3,29,118,-1.92063492063492,3.68883849836231
+Banh-mi-2,Electrode-Box-A2,4,27,136,-0.920634920634921,0.847568657092467
+Banh-mi-2,Electrode-Box-A2,5,43,146,0.0793650793650791,0.0062988158226253
+Banh-mi-2,Electrode-Box-A2,6,74,146,1.07936507936508,1.16502897455278
+Banh-mi-2,Electrode-Box-A2,7,70,148,2.07936507936508,4.32375913328294
+Banh-mi-2,Electrode-Box-A2,8,65,130,3.07936507936508,9.4824892920131
+Banh-mi-2,Electrode-Box-A2,9,79,151,4.07936507936508,16.6412194507433
+Banh-mi-2,Electrode-Box-A2,10,93,152,5.07936507936508,25.7999496094734
+Egg-tart-1,Electrode-Box-B2,0,7,56,-4.92063492063492,24.2126480221718
+Egg-tart-1,Electrode-Box-B2,1,16,78,-3.92063492063492,15.371378180902
+Egg-tart-1,Electrode-Box-B2,2,23,103,-2.92063492063492,8.53010833963215
+Egg-tart-1,Electrode-Box-B2,3,63,120,-1.92063492063492,3.68883849836231
+Egg-tart-1,Electrode-Box-B2,4,69,132,-0.920634920634921,0.847568657092467
+Egg-tart-1,Electrode-Box-B2,5,83,136,0.0793650793650791,0.0062988158226253
+Egg-tart-1,Electrode-Box-B2,6,71,142,1.07936507936508,1.16502897455278
+Egg-tart-1,Electrode-Box-B2,7,79,138,2.07936507936508,4.32375913328294
+Egg-tart-1,Electrode-Box-B2,8,98,142,3.07936507936508,9.4824892920131
+Egg-tart-1,Electrode-Box-B2,9,89,139,4.07936507936508,16.6412194507433
+Egg-tart-1,Electrode-Box-B2,10,96,143,5.07936507936508,25.7999496094734
+Egg-tart-2,Electrode-Box-A2,0,9,32,-4.92063492063492,24.2126480221718
+Egg-tart-2,Electrode-Box-A2,1,2,38,-3.92063492063492,15.371378180902
+Egg-tart-2,Electrode-Box-A2,2,31,93,-2.92063492063492,8.53010833963215
+Egg-tart-2,Electrode-Box-A2,3,44,101,-1.92063492063492,3.68883849836231
+Egg-tart-2,Electrode-Box-A2,4,54,131,-0.920634920634921,0.847568657092467
+Egg-tart-2,Electrode-Box-A2,5,84,139,0.0793650793650791,0.0062988158226253
+Egg-tart-2,Electrode-Box-A2,6,85,145,1.07936507936508,1.16502897455278
+Egg-tart-2,Electrode-Box-A2,7,79,143,2.07936507936508,4.32375913328294
+Egg-tart-2,Electrode-Box-A2,8,76,131,3.07936507936508,9.4824892920131
+Egg-tart-2,Electrode-Box-A2,9,88,149,4.07936507936508,16.6412194507433
+Egg-tart-2,Electrode-Box-A2,10,81,151,5.07936507936508,25.7999496094734
+Khoai-lang-1,Electrode-Box-B2,0,3,69,-4.92063492063492,24.2126480221718
+Khoai-lang-1,Electrode-Box-B2,1,18,97,-3.92063492063492,15.371378180902
+Khoai-lang-1,Electrode-Box-B2,2,27,84,-2.92063492063492,8.53010833963215
+Khoai-lang-1,Electrode-Box-B2,3,46,121,-1.92063492063492,3.68883849836231
+Khoai-lang-1,Electrode-Box-B2,4,65,143,-0.920634920634921,0.847568657092467
+Khoai-lang-1,Electrode-Box-B2,5,76,141,0.0793650793650791,0.0062988158226253
+Khoai-lang-1,Electrode-Box-B2,6,79,146,1.07936507936508,1.16502897455278
+Khoai-lang-1,Electrode-Box-B2,7,81,153,2.07936507936508,4.32375913328294
+Khoai-lang-1,Electrode-Box-B2,8,98,144,3.07936507936508,9.4824892920131
+Khoai-lang-1,Electrode-Box-B2,9,101,149,4.07936507936508,16.6412194507433
+Khoai-lang-1,Electrode-Box-B2,10,103,150,5.07936507936508,25.7999496094734
+Khoai-lang-2,Naive,0,0,0,-4.92063492063492,24.2126480221718
+Khoai-lang-2,Naive,1,0,0,-3.92063492063492,15.371378180902
+Khoai-lang-2,Naive,2,10,47,-2.92063492063492,8.53010833963215
+Khoai-lang-2,Naive,3,11,52,-1.92063492063492,3.68883849836231
+Khoai-lang-2,Naive,4,9,56,-0.920634920634921,0.847568657092467
+Khoai-lang-2,Naive,5,34,95,0.0793650793650791,0.0062988158226253
+Khoai-lang-2,Naive,6,21,72,1.07936507936508,1.16502897455278
+Khoai-lang-2,Naive,7,23,99,2.07936507936508,4.32375913328294
+Khoai-lang-2,Naive,8,64,136,3.07936507936508,9.4824892920131
+Khoai-lang-2,Naive,9,75,131,4.07936507936508,16.6412194507433
+Khoai-lang-2,Naive,10,63,134,5.07936507936508,25.7999496094734
+Khoai-tay-1,Electrode-Box-A2,0,14,62,-4.92063492063492,24.2126480221718
+Khoai-tay-1,Electrode-Box-A2,1,22,83,-3.92063492063492,15.371378180902
+Khoai-tay-1,Electrode-Box-A2,2,6,79,-2.92063492063492,8.53010833963215
+Khoai-tay-1,Electrode-Box-A2,3,28,97,-1.92063492063492,3.68883849836231
+Khoai-tay-1,Electrode-Box-A2,4,60,134,-0.920634920634921,0.847568657092467
+Khoai-tay-1,Electrode-Box-A2,5,75,138,0.0793650793650791,0.0062988158226253
+Khoai-tay-1,Electrode-Box-A2,6,81,137,1.07936507936508,1.16502897455278
+Khoai-tay-1,Electrode-Box-A2,7,78,147,2.07936507936508,4.32375913328294
+Khoai-tay-1,Electrode-Box-A2,8,91,132,3.07936507936508,9.4824892920131
+Khoai-tay-1,Electrode-Box-A2,9,99,146,4.07936507936508,16.6412194507433
+Khoai-tay-1,Electrode-Box-A2,10,94,143,5.07936507936508,25.7999496094734
+Khoai-tay-2,Naive,1,21,68,-3.92063492063492,15.371378180902
+Khoai-tay-2,Naive,2,6,79,-2.92063492063492,8.53010833963215
+Khoai-tay-2,Naive,3,0,83,-1.92063492063492,3.68883849836231
+Khoai-tay-2,Naive,4,28,87,-0.920634920634921,0.847568657092467
+Khoai-tay-2,Naive,5,31,125,0.0793650793650791,0.0062988158226253
+Khoai-tay-2,Naive,6,62,144,1.07936507936508,1.16502897455278
+Khoai-tay-2,Naive,7,87,141,2.07936507936508,4.32375913328294
+Khoai-tay-2,Naive,8,105,152,3.07936507936508,9.4824892920131
+Khoai-tay-2,Naive,9,75,148,4.07936507936508,16.6412194507433
+Khoai-tay-2,Naive,10,101,149,5.07936507936508,25.7999496094734
+OM-2,Naive,0,1,7,-4.92063492063492,24.2126480221718
+OM-2,Naive,1,11,33,-3.92063492063492,15.371378180902
+OM-2,Naive,2,19,62,-2.92063492063492,8.53010833963215
+OM-2,Naive,3,29,117,-1.92063492063492,3.68883849836231
+OM-2,Naive,4,73,126,-0.920634920634921,0.847568657092467
+OM-2,Naive,5,53,135,0.0793650793650791,0.0062988158226253
+OM-2,Naive,6,73,138,1.07936507936508,1.16502897455278
+OM-2,Naive,7,80,131,2.07936507936508,4.32375913328294
+OM-2,Naive,8,91,141,3.07936507936508,9.4824892920131
+OM-2,Naive,9,90,135,4.07936507936508,16.6412194507433
+OM-2,Naive,10,95,142,5.07936507936508,25.7999496094734
+Root-beer-1,Electrode-Box-B2,0,11,85,-4.92063492063492,24.2126480221718
+Root-beer-1,Electrode-Box-B2,1,18,76,-3.92063492063492,15.371378180902
+Root-beer-1,Electrode-Box-B2,2,40,105,-2.92063492063492,8.53010833963215
+Root-beer-1,Electrode-Box-B2,3,55,134,-1.92063492063492,3.68883849836231
+Root-beer-1,Electrode-Box-B2,4,75,136,-0.920634920634921,0.847568657092467
+Root-beer-1,Electrode-Box-B2,5,64,133,0.0793650793650791,0.0062988158226253
+Root-beer-1,Electrode-Box-B2,6,104,139,1.07936507936508,1.16502897455278
+Root-beer-1,Electrode-Box-B2,7,98,148,2.07936507936508,4.32375913328294
+Root-beer-1,Electrode-Box-B2,8,81,145,3.07936507936508,9.4824892920131
+Root-beer-1,Electrode-Box-B2,9,89,156,4.07936507936508,16.6412194507433
+Root-beer-1,Electrode-Box-B2,10,105,158,5.07936507936508,25.7999496094734
+Root-beer-2,Electrode-Box-A2,0,22,74,-4.92063492063492,24.2126480221718
+Root-beer-2,Electrode-Box-A2,1,31,87,-3.92063492063492,15.371378180902
+Root-beer-2,Electrode-Box-A2,2,49,134,-2.92063492063492,8.53010833963215
+Root-beer-2,Electrode-Box-A2,3,31,89,-1.92063492063492,3.68883849836231
+Root-beer-2,Electrode-Box-A2,4,60,140,-0.920634920634921,0.847568657092467
+Root-beer-2,Electrode-Box-A2,5,84,147,0.0793650793650791,0.0062988158226253
+Vu-vuong,Naive,0,18,61,-4.92063492063492,24.2126480221718
+Vu-vuong,Naive,1,35,91,-3.92063492063492,15.371378180902
+Vu-vuong,Naive,2,61,127,-2.92063492063492,8.53010833963215
+Vu-vuong,Naive,3,34,146,-1.92063492063492,3.68883849836231
+Vu-vuong,Naive,4,61,141,-0.920634920634921,0.847568657092467
+Vu-vuong,Naive,5,37,151,0.0793650793650791,0.0062988158226253
+Vu-vuong,Naive,6,49,131,1.07936507936508,1.16502897455278
+Vu-vuong,Naive,7,65,149,2.07936507936508,4.32375913328294
+Vu-vuong,Naive,8,67,141,3.07936507936508,9.4824892920131
+Vu-vuong,Naive,9,73,140,4.07936507936508,16.6412194507433
+Vu-vuong,Naive,10,72,131,5.07936507936508,25.7999496094734
diff --git a/analysis/matlab/derived/mergeA2_d0_13.csv b/analysis/matlab/derived/mergeA2_d0_13.csv
new file mode 100644
index 0000000..d6ddd3d
--- /dev/null
+++ b/analysis/matlab/derived/mergeA2_d0_13.csv
@@ -0,0 +1,153 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-6.125,37.515625
+Banh-mi-1,Electrode-Box-B2,1,35,86,-5.125,26.265625
+Banh-mi-1,Electrode-Box-B2,2,47,110,-4.125,17.015625
+Banh-mi-1,Electrode-Box-B2,3,65,140,-3.125,9.765625
+Banh-mi-1,Electrode-Box-B2,4,70,127,-2.125,4.515625
+Banh-mi-1,Electrode-Box-B2,5,102,142,-1.125,1.265625
+Banh-mi-1,Electrode-Box-B2,6,90,131,-0.125,0.015625
+Banh-mi-1,Electrode-Box-B2,7,109,148,0.875,0.765625
+Banh-mi-1,Electrode-Box-B2,8,104,137,1.875,3.515625
+Banh-mi-1,Electrode-Box-B2,9,119,150,2.875,8.265625
+Banh-mi-1,Electrode-Box-B2,10,121,158,3.875,15.015625
+Banh-mi-1,Electrode-Box-B2,11,121,148,4.875,23.765625
+Banh-mi-1,Electrode-Box-B2,12,120,149,5.875,34.515625
+Banh-mi-1,Electrode-Box-B2,13,135,154,6.875,47.265625
+Banh-mi-2,Electrode-Box-A2,0,25,97,-6.125,37.515625
+Banh-mi-2,Electrode-Box-A2,1,22,101,-5.125,26.265625
+Banh-mi-2,Electrode-Box-A2,2,22,119,-4.125,17.015625
+Banh-mi-2,Electrode-Box-A2,3,29,118,-3.125,9.765625
+Banh-mi-2,Electrode-Box-A2,4,27,136,-2.125,4.515625
+Banh-mi-2,Electrode-Box-A2,5,43,146,-1.125,1.265625
+Banh-mi-2,Electrode-Box-A2,6,74,146,-0.125,0.015625
+Banh-mi-2,Electrode-Box-A2,7,70,148,0.875,0.765625
+Banh-mi-2,Electrode-Box-A2,8,65,130,1.875,3.515625
+Banh-mi-2,Electrode-Box-A2,9,79,151,2.875,8.265625
+Banh-mi-2,Electrode-Box-A2,10,93,152,3.875,15.015625
+Egg-tart-1,Electrode-Box-B2,0,7,56,-6.125,37.515625
+Egg-tart-1,Electrode-Box-B2,1,16,78,-5.125,26.265625
+Egg-tart-1,Electrode-Box-B2,2,23,103,-4.125,17.015625
+Egg-tart-1,Electrode-Box-B2,3,63,120,-3.125,9.765625
+Egg-tart-1,Electrode-Box-B2,4,69,132,-2.125,4.515625
+Egg-tart-1,Electrode-Box-B2,5,83,136,-1.125,1.265625
+Egg-tart-1,Electrode-Box-B2,6,71,142,-0.125,0.015625
+Egg-tart-1,Electrode-Box-B2,7,79,138,0.875,0.765625
+Egg-tart-1,Electrode-Box-B2,8,98,142,1.875,3.515625
+Egg-tart-1,Electrode-Box-B2,9,89,139,2.875,8.265625
+Egg-tart-1,Electrode-Box-B2,10,96,143,3.875,15.015625
+Egg-tart-1,Electrode-Box-B2,11,96,148,4.875,23.765625
+Egg-tart-1,Electrode-Box-B2,12,101,156,5.875,34.515625
+Egg-tart-1,Electrode-Box-B2,13,103,152,6.875,47.265625
+Egg-tart-2,Electrode-Box-A2,0,9,32,-6.125,37.515625
+Egg-tart-2,Electrode-Box-A2,1,2,38,-5.125,26.265625
+Egg-tart-2,Electrode-Box-A2,2,31,93,-4.125,17.015625
+Egg-tart-2,Electrode-Box-A2,3,44,101,-3.125,9.765625
+Egg-tart-2,Electrode-Box-A2,4,54,131,-2.125,4.515625
+Egg-tart-2,Electrode-Box-A2,5,84,139,-1.125,1.265625
+Egg-tart-2,Electrode-Box-A2,6,85,145,-0.125,0.015625
+Egg-tart-2,Electrode-Box-A2,7,79,143,0.875,0.765625
+Egg-tart-2,Electrode-Box-A2,8,76,131,1.875,3.515625
+Egg-tart-2,Electrode-Box-A2,9,88,149,2.875,8.265625
+Egg-tart-2,Electrode-Box-A2,10,81,151,3.875,15.015625
+Egg-tart-2,Electrode-Box-A2,11,78,152,4.875,23.765625
+Egg-tart-2,Electrode-Box-A2,12,96,155,5.875,34.515625
+Egg-tart-2,Electrode-Box-A2,13,84,155,6.875,47.265625
+Khoai-lang-1,Electrode-Box-B2,0,3,69,-6.125,37.515625
+Khoai-lang-1,Electrode-Box-B2,1,18,97,-5.125,26.265625
+Khoai-lang-1,Electrode-Box-B2,2,27,84,-4.125,17.015625
+Khoai-lang-1,Electrode-Box-B2,3,46,121,-3.125,9.765625
+Khoai-lang-1,Electrode-Box-B2,4,65,143,-2.125,4.515625
+Khoai-lang-1,Electrode-Box-B2,5,76,141,-1.125,1.265625
+Khoai-lang-1,Electrode-Box-B2,6,79,146,-0.125,0.015625
+Khoai-lang-1,Electrode-Box-B2,7,81,153,0.875,0.765625
+Khoai-lang-1,Electrode-Box-B2,8,98,144,1.875,3.515625
+Khoai-lang-1,Electrode-Box-B2,9,101,149,2.875,8.265625
+Khoai-lang-1,Electrode-Box-B2,10,103,150,3.875,15.015625
+Khoai-lang-1,Electrode-Box-B2,11,113,154,4.875,23.765625
+Khoai-lang-1,Electrode-Box-B2,12,117,148,5.875,34.515625
+Khoai-lang-1,Electrode-Box-B2,13,114,146,6.875,47.265625
+Khoai-lang-2,Naive,0,0,0,-6.125,37.515625
+Khoai-lang-2,Naive,1,0,0,-5.125,26.265625
+Khoai-lang-2,Naive,2,10,47,-4.125,17.015625
+Khoai-lang-2,Naive,3,11,52,-3.125,9.765625
+Khoai-lang-2,Naive,4,9,56,-2.125,4.515625
+Khoai-lang-2,Naive,5,34,95,-1.125,1.265625
+Khoai-lang-2,Naive,6,21,72,-0.125,0.015625
+Khoai-lang-2,Naive,7,23,99,0.875,0.765625
+Khoai-lang-2,Naive,8,64,136,1.875,3.515625
+Khoai-lang-2,Naive,9,75,131,2.875,8.265625
+Khoai-lang-2,Naive,10,63,134,3.875,15.015625
+Khoai-lang-2,Naive,11,59,139,4.875,23.765625
+Khoai-lang-2,Naive,12,51,129,5.875,34.515625
+Khoai-lang-2,Naive,13,73,143,6.875,47.265625
+Khoai-tay-1,Electrode-Box-A2,0,14,62,-6.125,37.515625
+Khoai-tay-1,Electrode-Box-A2,1,22,83,-5.125,26.265625
+Khoai-tay-1,Electrode-Box-A2,2,6,79,-4.125,17.015625
+Khoai-tay-1,Electrode-Box-A2,3,28,97,-3.125,9.765625
+Khoai-tay-1,Electrode-Box-A2,4,60,134,-2.125,4.515625
+Khoai-tay-1,Electrode-Box-A2,5,75,138,-1.125,1.265625
+Khoai-tay-1,Electrode-Box-A2,6,81,137,-0.125,0.015625
+Khoai-tay-1,Electrode-Box-A2,7,78,147,0.875,0.765625
+Khoai-tay-1,Electrode-Box-A2,8,91,132,1.875,3.515625
+Khoai-tay-1,Electrode-Box-A2,9,99,146,2.875,8.265625
+Khoai-tay-1,Electrode-Box-A2,10,94,143,3.875,15.015625
+Khoai-tay-1,Electrode-Box-A2,11,110,156,4.875,23.765625
+Khoai-tay-1,Electrode-Box-A2,12,105,143,5.875,34.515625
+Khoai-tay-1,Electrode-Box-A2,13,106,153,6.875,47.265625
+Khoai-tay-2,Naive,1,21,68,-5.125,26.265625
+Khoai-tay-2,Naive,2,6,79,-4.125,17.015625
+Khoai-tay-2,Naive,3,0,83,-3.125,9.765625
+Khoai-tay-2,Naive,4,28,87,-2.125,4.515625
+Khoai-tay-2,Naive,5,31,125,-1.125,1.265625
+Khoai-tay-2,Naive,6,62,144,-0.125,0.015625
+Khoai-tay-2,Naive,7,87,141,0.875,0.765625
+Khoai-tay-2,Naive,8,105,152,1.875,3.515625
+Khoai-tay-2,Naive,9,75,148,2.875,8.265625
+Khoai-tay-2,Naive,10,101,149,3.875,15.015625
+Khoai-tay-2,Naive,11,102,154,4.875,23.765625
+Khoai-tay-2,Naive,12,95,144,5.875,34.515625
+Khoai-tay-2,Naive,13,77,149,6.875,47.265625
+OM-2,Naive,0,1,7,-6.125,37.515625
+OM-2,Naive,1,11,33,-5.125,26.265625
+OM-2,Naive,2,19,62,-4.125,17.015625
+OM-2,Naive,3,29,117,-3.125,9.765625
+OM-2,Naive,4,73,126,-2.125,4.515625
+OM-2,Naive,5,53,135,-1.125,1.265625
+OM-2,Naive,6,73,138,-0.125,0.015625
+OM-2,Naive,7,80,131,0.875,0.765625
+OM-2,Naive,8,91,141,1.875,3.515625
+OM-2,Naive,9,90,135,2.875,8.265625
+OM-2,Naive,10,95,142,3.875,15.015625
+OM-2,Naive,11,60,133,4.875,23.765625
+OM-2,Naive,12,58,142,5.875,34.515625
+Root-beer-1,Electrode-Box-B2,0,11,85,-6.125,37.515625
+Root-beer-1,Electrode-Box-B2,1,18,76,-5.125,26.265625
+Root-beer-1,Electrode-Box-B2,2,40,105,-4.125,17.015625
+Root-beer-1,Electrode-Box-B2,3,55,134,-3.125,9.765625
+Root-beer-1,Electrode-Box-B2,4,75,136,-2.125,4.515625
+Root-beer-1,Electrode-Box-B2,5,64,133,-1.125,1.265625
+Root-beer-1,Electrode-Box-B2,6,104,139,-0.125,0.015625
+Root-beer-1,Electrode-Box-B2,7,98,148,0.875,0.765625
+Root-beer-1,Electrode-Box-B2,8,81,145,1.875,3.515625
+Root-beer-1,Electrode-Box-B2,9,89,156,2.875,8.265625
+Root-beer-1,Electrode-Box-B2,10,105,158,3.875,15.015625
+Root-beer-2,Electrode-Box-A2,0,22,74,-6.125,37.515625
+Root-beer-2,Electrode-Box-A2,1,31,87,-5.125,26.265625
+Root-beer-2,Electrode-Box-A2,2,49,134,-4.125,17.015625
+Root-beer-2,Electrode-Box-A2,3,31,89,-3.125,9.765625
+Root-beer-2,Electrode-Box-A2,4,60,140,-2.125,4.515625
+Root-beer-2,Electrode-Box-A2,5,84,147,-1.125,1.265625
+Vu-vuong,Naive,0,18,61,-6.125,37.515625
+Vu-vuong,Naive,1,35,91,-5.125,26.265625
+Vu-vuong,Naive,2,61,127,-4.125,17.015625
+Vu-vuong,Naive,3,34,146,-3.125,9.765625
+Vu-vuong,Naive,4,61,141,-2.125,4.515625
+Vu-vuong,Naive,5,37,151,-1.125,1.265625
+Vu-vuong,Naive,6,49,131,-0.125,0.015625
+Vu-vuong,Naive,7,65,149,0.875,0.765625
+Vu-vuong,Naive,8,67,141,1.875,3.515625
+Vu-vuong,Naive,9,73,140,2.875,8.265625
+Vu-vuong,Naive,10,72,131,3.875,15.015625
+Vu-vuong,Naive,11,89,158,4.875,23.765625
+Vu-vuong,Naive,12,97,154,5.875,34.515625
+Vu-vuong,Naive,13,93,145,6.875,47.265625
diff --git a/analysis/matlab/derived/mergeA2_full.csv b/analysis/matlab/derived/mergeA2_full.csv
new file mode 100644
index 0000000..07d68db
--- /dev/null
+++ b/analysis/matlab/derived/mergeA2_full.csv
@@ -0,0 +1,186 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-8.2972972972973,68.845142439737
+Banh-mi-1,Electrode-Box-B2,1,35,86,-7.2972972972973,53.2505478451424
+Banh-mi-1,Electrode-Box-B2,2,47,110,-6.2972972972973,39.6559532505478
+Banh-mi-1,Electrode-Box-B2,3,65,140,-5.2972972972973,28.0613586559532
+Banh-mi-1,Electrode-Box-B2,4,70,127,-4.2972972972973,18.4667640613586
+Banh-mi-1,Electrode-Box-B2,5,102,142,-3.2972972972973,10.8721694667641
+Banh-mi-1,Electrode-Box-B2,6,90,131,-2.2972972972973,5.27757487216946
+Banh-mi-1,Electrode-Box-B2,7,109,148,-1.2972972972973,1.68298027757487
+Banh-mi-1,Electrode-Box-B2,8,104,137,-0.297297297297296,0.0883856829802771
+Banh-mi-1,Electrode-Box-B2,9,119,150,0.702702702702704,0.493791088385684
+Banh-mi-1,Electrode-Box-B2,10,121,158,1.7027027027027,2.89919649379109
+Banh-mi-1,Electrode-Box-B2,11,121,148,2.7027027027027,7.3046018991965
+Banh-mi-1,Electrode-Box-B2,12,120,149,3.7027027027027,13.7100073046019
+Banh-mi-1,Electrode-Box-B2,13,135,154,4.7027027027027,22.1154127100073
+Banh-mi-2,Electrode-Box-A2,0,25,97,-8.2972972972973,68.845142439737
+Banh-mi-2,Electrode-Box-A2,1,22,101,-7.2972972972973,53.2505478451424
+Banh-mi-2,Electrode-Box-A2,2,22,119,-6.2972972972973,39.6559532505478
+Banh-mi-2,Electrode-Box-A2,3,29,118,-5.2972972972973,28.0613586559532
+Banh-mi-2,Electrode-Box-A2,4,27,136,-4.2972972972973,18.4667640613586
+Banh-mi-2,Electrode-Box-A2,5,43,146,-3.2972972972973,10.8721694667641
+Banh-mi-2,Electrode-Box-A2,6,74,146,-2.2972972972973,5.27757487216946
+Banh-mi-2,Electrode-Box-A2,7,70,148,-1.2972972972973,1.68298027757487
+Banh-mi-2,Electrode-Box-A2,8,65,130,-0.297297297297296,0.0883856829802771
+Banh-mi-2,Electrode-Box-A2,9,79,151,0.702702702702704,0.493791088385684
+Banh-mi-2,Electrode-Box-A2,10,93,152,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,0,7,56,-8.2972972972973,68.845142439737
+Egg-tart-1,Electrode-Box-B2,1,16,78,-7.2972972972973,53.2505478451424
+Egg-tart-1,Electrode-Box-B2,2,23,103,-6.2972972972973,39.6559532505478
+Egg-tart-1,Electrode-Box-B2,3,63,120,-5.2972972972973,28.0613586559532
+Egg-tart-1,Electrode-Box-B2,4,69,132,-4.2972972972973,18.4667640613586
+Egg-tart-1,Electrode-Box-B2,5,83,136,-3.2972972972973,10.8721694667641
+Egg-tart-1,Electrode-Box-B2,6,71,142,-2.2972972972973,5.27757487216946
+Egg-tart-1,Electrode-Box-B2,7,79,138,-1.2972972972973,1.68298027757487
+Egg-tart-1,Electrode-Box-B2,8,98,142,-0.297297297297296,0.0883856829802771
+Egg-tart-1,Electrode-Box-B2,9,89,139,0.702702702702704,0.493791088385684
+Egg-tart-1,Electrode-Box-B2,10,96,143,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,11,96,148,2.7027027027027,7.3046018991965
+Egg-tart-1,Electrode-Box-B2,12,101,156,3.7027027027027,13.7100073046019
+Egg-tart-1,Electrode-Box-B2,13,103,152,4.7027027027027,22.1154127100073
+Egg-tart-1,Electrode-Box-B2,14,97,152,5.7027027027027,32.5208181154127
+Egg-tart-2,Electrode-Box-A2,0,9,32,-8.2972972972973,68.845142439737
+Egg-tart-2,Electrode-Box-A2,1,2,38,-7.2972972972973,53.2505478451424
+Egg-tart-2,Electrode-Box-A2,2,31,93,-6.2972972972973,39.6559532505478
+Egg-tart-2,Electrode-Box-A2,3,44,101,-5.2972972972973,28.0613586559532
+Egg-tart-2,Electrode-Box-A2,4,54,131,-4.2972972972973,18.4667640613586
+Egg-tart-2,Electrode-Box-A2,5,84,139,-3.2972972972973,10.8721694667641
+Egg-tart-2,Electrode-Box-A2,6,85,145,-2.2972972972973,5.27757487216946
+Egg-tart-2,Electrode-Box-A2,7,79,143,-1.2972972972973,1.68298027757487
+Egg-tart-2,Electrode-Box-A2,8,76,131,-0.297297297297296,0.0883856829802771
+Egg-tart-2,Electrode-Box-A2,9,88,149,0.702702702702704,0.493791088385684
+Egg-tart-2,Electrode-Box-A2,10,81,151,1.7027027027027,2.89919649379109
+Egg-tart-2,Electrode-Box-A2,11,78,152,2.7027027027027,7.3046018991965
+Egg-tart-2,Electrode-Box-A2,12,96,155,3.7027027027027,13.7100073046019
+Egg-tart-2,Electrode-Box-A2,13,84,155,4.7027027027027,22.1154127100073
+Khoai-lang-1,Electrode-Box-B2,0,3,69,-8.2972972972973,68.845142439737
+Khoai-lang-1,Electrode-Box-B2,1,18,97,-7.2972972972973,53.2505478451424
+Khoai-lang-1,Electrode-Box-B2,2,27,84,-6.2972972972973,39.6559532505478
+Khoai-lang-1,Electrode-Box-B2,3,46,121,-5.2972972972973,28.0613586559532
+Khoai-lang-1,Electrode-Box-B2,4,65,143,-4.2972972972973,18.4667640613586
+Khoai-lang-1,Electrode-Box-B2,5,76,141,-3.2972972972973,10.8721694667641
+Khoai-lang-1,Electrode-Box-B2,6,79,146,-2.2972972972973,5.27757487216946
+Khoai-lang-1,Electrode-Box-B2,7,81,153,-1.2972972972973,1.68298027757487
+Khoai-lang-1,Electrode-Box-B2,8,98,144,-0.297297297297296,0.0883856829802771
+Khoai-lang-1,Electrode-Box-B2,9,101,149,0.702702702702704,0.493791088385684
+Khoai-lang-1,Electrode-Box-B2,10,103,150,1.7027027027027,2.89919649379109
+Khoai-lang-1,Electrode-Box-B2,11,113,154,2.7027027027027,7.3046018991965
+Khoai-lang-1,Electrode-Box-B2,12,117,148,3.7027027027027,13.7100073046019
+Khoai-lang-1,Electrode-Box-B2,13,114,146,4.7027027027027,22.1154127100073
+Khoai-lang-1,Electrode-Box-B2,14,119,132,5.7027027027027,32.5208181154127
+Khoai-lang-1,Electrode-Box-B2,15,111,156,6.7027027027027,44.9262235208181
+Khoai-lang-1,Electrode-Box-B2,16,74,156,7.7027027027027,59.3316289262235
+Khoai-lang-1,Electrode-Box-B2,17,109,139,8.7027027027027,75.7370343316289
+Khoai-lang-1,Electrode-Box-B2,18,88,138,9.7027027027027,94.1424397370344
+Khoai-lang-1,Electrode-Box-B2,19,98,140,10.7027027027027,114.54784514244
+Khoai-lang-1,Electrode-Box-B2,20,118,153,11.7027027027027,136.953250547845
+Khoai-lang-1,Electrode-Box-B2,21,109,146,12.7027027027027,161.358655953251
+Khoai-lang-1,Electrode-Box-B2,22,106,141,13.7027027027027,187.764061358656
+Khoai-lang-2,Naive,0,0,0,-8.2972972972973,68.845142439737
+Khoai-lang-2,Naive,1,0,0,-7.2972972972973,53.2505478451424
+Khoai-lang-2,Naive,2,10,47,-6.2972972972973,39.6559532505478
+Khoai-lang-2,Naive,3,11,52,-5.2972972972973,28.0613586559532
+Khoai-lang-2,Naive,4,9,56,-4.2972972972973,18.4667640613586
+Khoai-lang-2,Naive,5,34,95,-3.2972972972973,10.8721694667641
+Khoai-lang-2,Naive,6,21,72,-2.2972972972973,5.27757487216946
+Khoai-lang-2,Naive,7,23,99,-1.2972972972973,1.68298027757487
+Khoai-lang-2,Naive,8,64,136,-0.297297297297296,0.0883856829802771
+Khoai-lang-2,Naive,9,75,131,0.702702702702704,0.493791088385684
+Khoai-lang-2,Naive,10,63,134,1.7027027027027,2.89919649379109
+Khoai-lang-2,Naive,11,59,139,2.7027027027027,7.3046018991965
+Khoai-lang-2,Naive,12,51,129,3.7027027027027,13.7100073046019
+Khoai-lang-2,Naive,13,73,143,4.7027027027027,22.1154127100073
+Khoai-lang-2,Naive,14,82,136,5.7027027027027,32.5208181154127
+Khoai-lang-2,Naive,15,70,145,6.7027027027027,44.9262235208181
+Khoai-lang-2,Naive,16,76,135,7.7027027027027,59.3316289262235
+Khoai-lang-2,Naive,17,76,150,8.7027027027027,75.7370343316289
+Khoai-lang-2,Naive,18,63,122,9.7027027027027,94.1424397370344
+Khoai-lang-2,Naive,19,48,116,10.7027027027027,114.54784514244
+Khoai-lang-2,Naive,20,65,134,11.7027027027027,136.953250547845
+Khoai-lang-2,Naive,21,75,131,12.7027027027027,161.358655953251
+Khoai-lang-2,Naive,22,98,146,13.7027027027027,187.764061358656
+Khoai-lang-2,Naive,23,88,139,14.7027027027027,216.169466764061
+Khoai-lang-2,Naive,24,94,148,15.7027027027027,246.574872169467
+Khoai-lang-2,Naive,25,56,102,16.7027027027027,278.980277574872
+Khoai-lang-2,Naive,26,75,143,17.7027027027027,313.385682980278
+Khoai-tay-1,Electrode-Box-A2,0,14,62,-8.2972972972973,68.845142439737
+Khoai-tay-1,Electrode-Box-A2,1,22,83,-7.2972972972973,53.2505478451424
+Khoai-tay-1,Electrode-Box-A2,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-1,Electrode-Box-A2,3,28,97,-5.2972972972973,28.0613586559532
+Khoai-tay-1,Electrode-Box-A2,4,60,134,-4.2972972972973,18.4667640613586
+Khoai-tay-1,Electrode-Box-A2,5,75,138,-3.2972972972973,10.8721694667641
+Khoai-tay-1,Electrode-Box-A2,6,81,137,-2.2972972972973,5.27757487216946
+Khoai-tay-1,Electrode-Box-A2,7,78,147,-1.2972972972973,1.68298027757487
+Khoai-tay-1,Electrode-Box-A2,8,91,132,-0.297297297297296,0.0883856829802771
+Khoai-tay-1,Electrode-Box-A2,9,99,146,0.702702702702704,0.493791088385684
+Khoai-tay-1,Electrode-Box-A2,10,94,143,1.7027027027027,2.89919649379109
+Khoai-tay-1,Electrode-Box-A2,11,110,156,2.7027027027027,7.3046018991965
+Khoai-tay-1,Electrode-Box-A2,12,105,143,3.7027027027027,13.7100073046019
+Khoai-tay-1,Electrode-Box-A2,13,106,153,4.7027027027027,22.1154127100073
+Khoai-tay-1,Electrode-Box-A2,14,91,152,5.7027027027027,32.5208181154127
+Khoai-tay-2,Naive,1,21,68,-7.2972972972973,53.2505478451424
+Khoai-tay-2,Naive,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-2,Naive,3,0,83,-5.2972972972973,28.0613586559532
+Khoai-tay-2,Naive,4,28,87,-4.2972972972973,18.4667640613586
+Khoai-tay-2,Naive,5,31,125,-3.2972972972973,10.8721694667641
+Khoai-tay-2,Naive,6,62,144,-2.2972972972973,5.27757487216946
+Khoai-tay-2,Naive,7,87,141,-1.2972972972973,1.68298027757487
+Khoai-tay-2,Naive,8,105,152,-0.297297297297296,0.0883856829802771
+Khoai-tay-2,Naive,9,75,148,0.702702702702704,0.493791088385684
+Khoai-tay-2,Naive,10,101,149,1.7027027027027,2.89919649379109
+Khoai-tay-2,Naive,11,102,154,2.7027027027027,7.3046018991965
+Khoai-tay-2,Naive,12,95,144,3.7027027027027,13.7100073046019
+Khoai-tay-2,Naive,13,77,149,4.7027027027027,22.1154127100073
+Khoai-tay-2,Naive,14,91,153,5.7027027027027,32.5208181154127
+OM-2,Naive,0,1,7,-8.2972972972973,68.845142439737
+OM-2,Naive,1,11,33,-7.2972972972973,53.2505478451424
+OM-2,Naive,2,19,62,-6.2972972972973,39.6559532505478
+OM-2,Naive,3,29,117,-5.2972972972973,28.0613586559532
+OM-2,Naive,4,73,126,-4.2972972972973,18.4667640613586
+OM-2,Naive,5,53,135,-3.2972972972973,10.8721694667641
+OM-2,Naive,6,73,138,-2.2972972972973,5.27757487216946
+OM-2,Naive,7,80,131,-1.2972972972973,1.68298027757487
+OM-2,Naive,8,91,141,-0.297297297297296,0.0883856829802771
+OM-2,Naive,9,90,135,0.702702702702704,0.493791088385684
+OM-2,Naive,10,95,142,1.7027027027027,2.89919649379109
+OM-2,Naive,11,60,133,2.7027027027027,7.3046018991965
+OM-2,Naive,12,58,142,3.7027027027027,13.7100073046019
+Root-beer-1,Electrode-Box-B2,0,11,85,-8.2972972972973,68.845142439737
+Root-beer-1,Electrode-Box-B2,1,18,76,-7.2972972972973,53.2505478451424
+Root-beer-1,Electrode-Box-B2,2,40,105,-6.2972972972973,39.6559532505478
+Root-beer-1,Electrode-Box-B2,3,55,134,-5.2972972972973,28.0613586559532
+Root-beer-1,Electrode-Box-B2,4,75,136,-4.2972972972973,18.4667640613586
+Root-beer-1,Electrode-Box-B2,5,64,133,-3.2972972972973,10.8721694667641
+Root-beer-1,Electrode-Box-B2,6,104,139,-2.2972972972973,5.27757487216946
+Root-beer-1,Electrode-Box-B2,7,98,148,-1.2972972972973,1.68298027757487
+Root-beer-1,Electrode-Box-B2,8,81,145,-0.297297297297296,0.0883856829802771
+Root-beer-1,Electrode-Box-B2,9,89,156,0.702702702702704,0.493791088385684
+Root-beer-1,Electrode-Box-B2,10,105,158,1.7027027027027,2.89919649379109
+Root-beer-2,Electrode-Box-A2,0,22,74,-8.2972972972973,68.845142439737
+Root-beer-2,Electrode-Box-A2,1,31,87,-7.2972972972973,53.2505478451424
+Root-beer-2,Electrode-Box-A2,2,49,134,-6.2972972972973,39.6559532505478
+Root-beer-2,Electrode-Box-A2,3,31,89,-5.2972972972973,28.0613586559532
+Root-beer-2,Electrode-Box-A2,4,60,140,-4.2972972972973,18.4667640613586
+Root-beer-2,Electrode-Box-A2,5,84,147,-3.2972972972973,10.8721694667641
+Vu-vuong,Naive,0,18,61,-8.2972972972973,68.845142439737
+Vu-vuong,Naive,1,35,91,-7.2972972972973,53.2505478451424
+Vu-vuong,Naive,2,61,127,-6.2972972972973,39.6559532505478
+Vu-vuong,Naive,3,34,146,-5.2972972972973,28.0613586559532
+Vu-vuong,Naive,4,61,141,-4.2972972972973,18.4667640613586
+Vu-vuong,Naive,5,37,151,-3.2972972972973,10.8721694667641
+Vu-vuong,Naive,6,49,131,-2.2972972972973,5.27757487216946
+Vu-vuong,Naive,7,65,149,-1.2972972972973,1.68298027757487
+Vu-vuong,Naive,8,67,141,-0.297297297297296,0.0883856829802771
+Vu-vuong,Naive,9,73,140,0.702702702702704,0.493791088385684
+Vu-vuong,Naive,10,72,131,1.7027027027027,2.89919649379109
+Vu-vuong,Naive,11,89,158,2.7027027027027,7.3046018991965
+Vu-vuong,Naive,12,97,154,3.7027027027027,13.7100073046019
+Vu-vuong,Naive,13,93,145,4.7027027027027,22.1154127100073
+Vu-vuong,Naive,14,75,147,5.7027027027027,32.5208181154127
+Vu-vuong,Naive,15,68,142,6.7027027027027,44.9262235208181
+Vu-vuong,Naive,16,96,162,7.7027027027027,59.3316289262235
+Vu-vuong,Naive,17,68,144,8.7027027027027,75.7370343316289
+Vu-vuong,Naive,18,81,134,9.7027027027027,94.1424397370344
+Vu-vuong,Naive,19,66,144,10.7027027027027,114.54784514244
+Vu-vuong,Naive,20,84,127,11.7027027027027,136.953250547845
+Vu-vuong,Naive,21,66,133,12.7027027027027,161.358655953251
diff --git a/analysis/matlab/derived/mergeB2_d0_10.csv b/analysis/matlab/derived/mergeB2_d0_10.csv
new file mode 100644
index 0000000..3559030
--- /dev/null
+++ b/analysis/matlab/derived/mergeB2_d0_10.csv
@@ -0,0 +1,127 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-4.92063492063492,24.2126480221718
+Banh-mi-1,Electrode-Box-B2,1,35,86,-3.92063492063492,15.371378180902
+Banh-mi-1,Electrode-Box-B2,2,47,110,-2.92063492063492,8.53010833963215
+Banh-mi-1,Electrode-Box-B2,3,65,140,-1.92063492063492,3.68883849836231
+Banh-mi-1,Electrode-Box-B2,4,70,127,-0.920634920634921,0.847568657092467
+Banh-mi-1,Electrode-Box-B2,5,102,142,0.0793650793650791,0.0062988158226253
+Banh-mi-1,Electrode-Box-B2,6,90,131,1.07936507936508,1.16502897455278
+Banh-mi-1,Electrode-Box-B2,7,109,148,2.07936507936508,4.32375913328294
+Banh-mi-1,Electrode-Box-B2,8,104,137,3.07936507936508,9.4824892920131
+Banh-mi-1,Electrode-Box-B2,9,119,150,4.07936507936508,16.6412194507433
+Banh-mi-1,Electrode-Box-B2,10,121,158,5.07936507936508,25.7999496094734
+Banh-mi-2,Electrode-Box-A2,0,25,97,-4.92063492063492,24.2126480221718
+Banh-mi-2,Electrode-Box-A2,1,22,101,-3.92063492063492,15.371378180902
+Banh-mi-2,Electrode-Box-A2,2,22,119,-2.92063492063492,8.53010833963215
+Banh-mi-2,Electrode-Box-A2,3,29,118,-1.92063492063492,3.68883849836231
+Banh-mi-2,Electrode-Box-A2,4,27,136,-0.920634920634921,0.847568657092467
+Banh-mi-2,Electrode-Box-A2,5,43,146,0.0793650793650791,0.0062988158226253
+Banh-mi-2,Electrode-Box-A2,6,74,146,1.07936507936508,1.16502897455278
+Banh-mi-2,Electrode-Box-A2,7,70,148,2.07936507936508,4.32375913328294
+Banh-mi-2,Electrode-Box-A2,8,65,130,3.07936507936508,9.4824892920131
+Banh-mi-2,Electrode-Box-A2,9,79,151,4.07936507936508,16.6412194507433
+Banh-mi-2,Electrode-Box-A2,10,93,152,5.07936507936508,25.7999496094734
+Egg-tart-1,Electrode-Box-B2,0,7,56,-4.92063492063492,24.2126480221718
+Egg-tart-1,Electrode-Box-B2,1,16,78,-3.92063492063492,15.371378180902
+Egg-tart-1,Electrode-Box-B2,2,23,103,-2.92063492063492,8.53010833963215
+Egg-tart-1,Electrode-Box-B2,3,63,120,-1.92063492063492,3.68883849836231
+Egg-tart-1,Electrode-Box-B2,4,69,132,-0.920634920634921,0.847568657092467
+Egg-tart-1,Electrode-Box-B2,5,83,136,0.0793650793650791,0.0062988158226253
+Egg-tart-1,Electrode-Box-B2,6,71,142,1.07936507936508,1.16502897455278
+Egg-tart-1,Electrode-Box-B2,7,79,138,2.07936507936508,4.32375913328294
+Egg-tart-1,Electrode-Box-B2,8,98,142,3.07936507936508,9.4824892920131
+Egg-tart-1,Electrode-Box-B2,9,89,139,4.07936507936508,16.6412194507433
+Egg-tart-1,Electrode-Box-B2,10,96,143,5.07936507936508,25.7999496094734
+Egg-tart-2,Electrode-Box-A2,0,9,32,-4.92063492063492,24.2126480221718
+Egg-tart-2,Electrode-Box-A2,1,2,38,-3.92063492063492,15.371378180902
+Egg-tart-2,Electrode-Box-A2,2,31,93,-2.92063492063492,8.53010833963215
+Egg-tart-2,Electrode-Box-A2,3,44,101,-1.92063492063492,3.68883849836231
+Egg-tart-2,Electrode-Box-A2,4,54,131,-0.920634920634921,0.847568657092467
+Egg-tart-2,Electrode-Box-A2,5,84,139,0.0793650793650791,0.0062988158226253
+Egg-tart-2,Electrode-Box-A2,6,85,145,1.07936507936508,1.16502897455278
+Egg-tart-2,Electrode-Box-A2,7,79,143,2.07936507936508,4.32375913328294
+Egg-tart-2,Electrode-Box-A2,8,76,131,3.07936507936508,9.4824892920131
+Egg-tart-2,Electrode-Box-A2,9,88,149,4.07936507936508,16.6412194507433
+Egg-tart-2,Electrode-Box-A2,10,81,151,5.07936507936508,25.7999496094734
+Khoai-lang-1,Electrode-Box-B2,0,3,69,-4.92063492063492,24.2126480221718
+Khoai-lang-1,Electrode-Box-B2,1,18,97,-3.92063492063492,15.371378180902
+Khoai-lang-1,Electrode-Box-B2,2,27,84,-2.92063492063492,8.53010833963215
+Khoai-lang-1,Electrode-Box-B2,3,46,121,-1.92063492063492,3.68883849836231
+Khoai-lang-1,Electrode-Box-B2,4,65,143,-0.920634920634921,0.847568657092467
+Khoai-lang-1,Electrode-Box-B2,5,76,141,0.0793650793650791,0.0062988158226253
+Khoai-lang-1,Electrode-Box-B2,6,79,146,1.07936507936508,1.16502897455278
+Khoai-lang-1,Electrode-Box-B2,7,81,153,2.07936507936508,4.32375913328294
+Khoai-lang-1,Electrode-Box-B2,8,98,144,3.07936507936508,9.4824892920131
+Khoai-lang-1,Electrode-Box-B2,9,101,149,4.07936507936508,16.6412194507433
+Khoai-lang-1,Electrode-Box-B2,10,103,150,5.07936507936508,25.7999496094734
+Khoai-lang-2,Naive,0,0,0,-4.92063492063492,24.2126480221718
+Khoai-lang-2,Naive,1,0,0,-3.92063492063492,15.371378180902
+Khoai-lang-2,Naive,2,10,47,-2.92063492063492,8.53010833963215
+Khoai-lang-2,Naive,3,11,52,-1.92063492063492,3.68883849836231
+Khoai-lang-2,Naive,4,9,56,-0.920634920634921,0.847568657092467
+Khoai-lang-2,Naive,5,34,95,0.0793650793650791,0.0062988158226253
+Khoai-lang-2,Naive,6,21,72,1.07936507936508,1.16502897455278
+Khoai-lang-2,Naive,7,23,99,2.07936507936508,4.32375913328294
+Khoai-lang-2,Naive,8,64,136,3.07936507936508,9.4824892920131
+Khoai-lang-2,Naive,9,75,131,4.07936507936508,16.6412194507433
+Khoai-lang-2,Naive,10,63,134,5.07936507936508,25.7999496094734
+Khoai-tay-1,Electrode-Box-B2,0,14,62,-4.92063492063492,24.2126480221718
+Khoai-tay-1,Electrode-Box-B2,1,22,83,-3.92063492063492,15.371378180902
+Khoai-tay-1,Electrode-Box-B2,2,6,79,-2.92063492063492,8.53010833963215
+Khoai-tay-1,Electrode-Box-B2,3,28,97,-1.92063492063492,3.68883849836231
+Khoai-tay-1,Electrode-Box-B2,4,60,134,-0.920634920634921,0.847568657092467
+Khoai-tay-1,Electrode-Box-B2,5,75,138,0.0793650793650791,0.0062988158226253
+Khoai-tay-1,Electrode-Box-B2,6,81,137,1.07936507936508,1.16502897455278
+Khoai-tay-1,Electrode-Box-B2,7,78,147,2.07936507936508,4.32375913328294
+Khoai-tay-1,Electrode-Box-B2,8,91,132,3.07936507936508,9.4824892920131
+Khoai-tay-1,Electrode-Box-B2,9,99,146,4.07936507936508,16.6412194507433
+Khoai-tay-1,Electrode-Box-B2,10,94,143,5.07936507936508,25.7999496094734
+Khoai-tay-2,Naive,1,21,68,-3.92063492063492,15.371378180902
+Khoai-tay-2,Naive,2,6,79,-2.92063492063492,8.53010833963215
+Khoai-tay-2,Naive,3,0,83,-1.92063492063492,3.68883849836231
+Khoai-tay-2,Naive,4,28,87,-0.920634920634921,0.847568657092467
+Khoai-tay-2,Naive,5,31,125,0.0793650793650791,0.0062988158226253
+Khoai-tay-2,Naive,6,62,144,1.07936507936508,1.16502897455278
+Khoai-tay-2,Naive,7,87,141,2.07936507936508,4.32375913328294
+Khoai-tay-2,Naive,8,105,152,3.07936507936508,9.4824892920131
+Khoai-tay-2,Naive,9,75,148,4.07936507936508,16.6412194507433
+Khoai-tay-2,Naive,10,101,149,5.07936507936508,25.7999496094734
+OM-2,Naive,0,1,7,-4.92063492063492,24.2126480221718
+OM-2,Naive,1,11,33,-3.92063492063492,15.371378180902
+OM-2,Naive,2,19,62,-2.92063492063492,8.53010833963215
+OM-2,Naive,3,29,117,-1.92063492063492,3.68883849836231
+OM-2,Naive,4,73,126,-0.920634920634921,0.847568657092467
+OM-2,Naive,5,53,135,0.0793650793650791,0.0062988158226253
+OM-2,Naive,6,73,138,1.07936507936508,1.16502897455278
+OM-2,Naive,7,80,131,2.07936507936508,4.32375913328294
+OM-2,Naive,8,91,141,3.07936507936508,9.4824892920131
+OM-2,Naive,9,90,135,4.07936507936508,16.6412194507433
+OM-2,Naive,10,95,142,5.07936507936508,25.7999496094734
+Root-beer-1,Electrode-Box-B2,0,11,85,-4.92063492063492,24.2126480221718
+Root-beer-1,Electrode-Box-B2,1,18,76,-3.92063492063492,15.371378180902
+Root-beer-1,Electrode-Box-B2,2,40,105,-2.92063492063492,8.53010833963215
+Root-beer-1,Electrode-Box-B2,3,55,134,-1.92063492063492,3.68883849836231
+Root-beer-1,Electrode-Box-B2,4,75,136,-0.920634920634921,0.847568657092467
+Root-beer-1,Electrode-Box-B2,5,64,133,0.0793650793650791,0.0062988158226253
+Root-beer-1,Electrode-Box-B2,6,104,139,1.07936507936508,1.16502897455278
+Root-beer-1,Electrode-Box-B2,7,98,148,2.07936507936508,4.32375913328294
+Root-beer-1,Electrode-Box-B2,8,81,145,3.07936507936508,9.4824892920131
+Root-beer-1,Electrode-Box-B2,9,89,156,4.07936507936508,16.6412194507433
+Root-beer-1,Electrode-Box-B2,10,105,158,5.07936507936508,25.7999496094734
+Root-beer-2,Electrode-Box-A2,0,22,74,-4.92063492063492,24.2126480221718
+Root-beer-2,Electrode-Box-A2,1,31,87,-3.92063492063492,15.371378180902
+Root-beer-2,Electrode-Box-A2,2,49,134,-2.92063492063492,8.53010833963215
+Root-beer-2,Electrode-Box-A2,3,31,89,-1.92063492063492,3.68883849836231
+Root-beer-2,Electrode-Box-A2,4,60,140,-0.920634920634921,0.847568657092467
+Root-beer-2,Electrode-Box-A2,5,84,147,0.0793650793650791,0.0062988158226253
+Vu-vuong,Naive,0,18,61,-4.92063492063492,24.2126480221718
+Vu-vuong,Naive,1,35,91,-3.92063492063492,15.371378180902
+Vu-vuong,Naive,2,61,127,-2.92063492063492,8.53010833963215
+Vu-vuong,Naive,3,34,146,-1.92063492063492,3.68883849836231
+Vu-vuong,Naive,4,61,141,-0.920634920634921,0.847568657092467
+Vu-vuong,Naive,5,37,151,0.0793650793650791,0.0062988158226253
+Vu-vuong,Naive,6,49,131,1.07936507936508,1.16502897455278
+Vu-vuong,Naive,7,65,149,2.07936507936508,4.32375913328294
+Vu-vuong,Naive,8,67,141,3.07936507936508,9.4824892920131
+Vu-vuong,Naive,9,73,140,4.07936507936508,16.6412194507433
+Vu-vuong,Naive,10,72,131,5.07936507936508,25.7999496094734
diff --git a/analysis/matlab/derived/mergeB2_d0_13.csv b/analysis/matlab/derived/mergeB2_d0_13.csv
new file mode 100644
index 0000000..342f724
--- /dev/null
+++ b/analysis/matlab/derived/mergeB2_d0_13.csv
@@ -0,0 +1,153 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-6.125,37.515625
+Banh-mi-1,Electrode-Box-B2,1,35,86,-5.125,26.265625
+Banh-mi-1,Electrode-Box-B2,2,47,110,-4.125,17.015625
+Banh-mi-1,Electrode-Box-B2,3,65,140,-3.125,9.765625
+Banh-mi-1,Electrode-Box-B2,4,70,127,-2.125,4.515625
+Banh-mi-1,Electrode-Box-B2,5,102,142,-1.125,1.265625
+Banh-mi-1,Electrode-Box-B2,6,90,131,-0.125,0.015625
+Banh-mi-1,Electrode-Box-B2,7,109,148,0.875,0.765625
+Banh-mi-1,Electrode-Box-B2,8,104,137,1.875,3.515625
+Banh-mi-1,Electrode-Box-B2,9,119,150,2.875,8.265625
+Banh-mi-1,Electrode-Box-B2,10,121,158,3.875,15.015625
+Banh-mi-1,Electrode-Box-B2,11,121,148,4.875,23.765625
+Banh-mi-1,Electrode-Box-B2,12,120,149,5.875,34.515625
+Banh-mi-1,Electrode-Box-B2,13,135,154,6.875,47.265625
+Banh-mi-2,Electrode-Box-A2,0,25,97,-6.125,37.515625
+Banh-mi-2,Electrode-Box-A2,1,22,101,-5.125,26.265625
+Banh-mi-2,Electrode-Box-A2,2,22,119,-4.125,17.015625
+Banh-mi-2,Electrode-Box-A2,3,29,118,-3.125,9.765625
+Banh-mi-2,Electrode-Box-A2,4,27,136,-2.125,4.515625
+Banh-mi-2,Electrode-Box-A2,5,43,146,-1.125,1.265625
+Banh-mi-2,Electrode-Box-A2,6,74,146,-0.125,0.015625
+Banh-mi-2,Electrode-Box-A2,7,70,148,0.875,0.765625
+Banh-mi-2,Electrode-Box-A2,8,65,130,1.875,3.515625
+Banh-mi-2,Electrode-Box-A2,9,79,151,2.875,8.265625
+Banh-mi-2,Electrode-Box-A2,10,93,152,3.875,15.015625
+Egg-tart-1,Electrode-Box-B2,0,7,56,-6.125,37.515625
+Egg-tart-1,Electrode-Box-B2,1,16,78,-5.125,26.265625
+Egg-tart-1,Electrode-Box-B2,2,23,103,-4.125,17.015625
+Egg-tart-1,Electrode-Box-B2,3,63,120,-3.125,9.765625
+Egg-tart-1,Electrode-Box-B2,4,69,132,-2.125,4.515625
+Egg-tart-1,Electrode-Box-B2,5,83,136,-1.125,1.265625
+Egg-tart-1,Electrode-Box-B2,6,71,142,-0.125,0.015625
+Egg-tart-1,Electrode-Box-B2,7,79,138,0.875,0.765625
+Egg-tart-1,Electrode-Box-B2,8,98,142,1.875,3.515625
+Egg-tart-1,Electrode-Box-B2,9,89,139,2.875,8.265625
+Egg-tart-1,Electrode-Box-B2,10,96,143,3.875,15.015625
+Egg-tart-1,Electrode-Box-B2,11,96,148,4.875,23.765625
+Egg-tart-1,Electrode-Box-B2,12,101,156,5.875,34.515625
+Egg-tart-1,Electrode-Box-B2,13,103,152,6.875,47.265625
+Egg-tart-2,Electrode-Box-A2,0,9,32,-6.125,37.515625
+Egg-tart-2,Electrode-Box-A2,1,2,38,-5.125,26.265625
+Egg-tart-2,Electrode-Box-A2,2,31,93,-4.125,17.015625
+Egg-tart-2,Electrode-Box-A2,3,44,101,-3.125,9.765625
+Egg-tart-2,Electrode-Box-A2,4,54,131,-2.125,4.515625
+Egg-tart-2,Electrode-Box-A2,5,84,139,-1.125,1.265625
+Egg-tart-2,Electrode-Box-A2,6,85,145,-0.125,0.015625
+Egg-tart-2,Electrode-Box-A2,7,79,143,0.875,0.765625
+Egg-tart-2,Electrode-Box-A2,8,76,131,1.875,3.515625
+Egg-tart-2,Electrode-Box-A2,9,88,149,2.875,8.265625
+Egg-tart-2,Electrode-Box-A2,10,81,151,3.875,15.015625
+Egg-tart-2,Electrode-Box-A2,11,78,152,4.875,23.765625
+Egg-tart-2,Electrode-Box-A2,12,96,155,5.875,34.515625
+Egg-tart-2,Electrode-Box-A2,13,84,155,6.875,47.265625
+Khoai-lang-1,Electrode-Box-B2,0,3,69,-6.125,37.515625
+Khoai-lang-1,Electrode-Box-B2,1,18,97,-5.125,26.265625
+Khoai-lang-1,Electrode-Box-B2,2,27,84,-4.125,17.015625
+Khoai-lang-1,Electrode-Box-B2,3,46,121,-3.125,9.765625
+Khoai-lang-1,Electrode-Box-B2,4,65,143,-2.125,4.515625
+Khoai-lang-1,Electrode-Box-B2,5,76,141,-1.125,1.265625
+Khoai-lang-1,Electrode-Box-B2,6,79,146,-0.125,0.015625
+Khoai-lang-1,Electrode-Box-B2,7,81,153,0.875,0.765625
+Khoai-lang-1,Electrode-Box-B2,8,98,144,1.875,3.515625
+Khoai-lang-1,Electrode-Box-B2,9,101,149,2.875,8.265625
+Khoai-lang-1,Electrode-Box-B2,10,103,150,3.875,15.015625
+Khoai-lang-1,Electrode-Box-B2,11,113,154,4.875,23.765625
+Khoai-lang-1,Electrode-Box-B2,12,117,148,5.875,34.515625
+Khoai-lang-1,Electrode-Box-B2,13,114,146,6.875,47.265625
+Khoai-lang-2,Naive,0,0,0,-6.125,37.515625
+Khoai-lang-2,Naive,1,0,0,-5.125,26.265625
+Khoai-lang-2,Naive,2,10,47,-4.125,17.015625
+Khoai-lang-2,Naive,3,11,52,-3.125,9.765625
+Khoai-lang-2,Naive,4,9,56,-2.125,4.515625
+Khoai-lang-2,Naive,5,34,95,-1.125,1.265625
+Khoai-lang-2,Naive,6,21,72,-0.125,0.015625
+Khoai-lang-2,Naive,7,23,99,0.875,0.765625
+Khoai-lang-2,Naive,8,64,136,1.875,3.515625
+Khoai-lang-2,Naive,9,75,131,2.875,8.265625
+Khoai-lang-2,Naive,10,63,134,3.875,15.015625
+Khoai-lang-2,Naive,11,59,139,4.875,23.765625
+Khoai-lang-2,Naive,12,51,129,5.875,34.515625
+Khoai-lang-2,Naive,13,73,143,6.875,47.265625
+Khoai-tay-1,Electrode-Box-B2,0,14,62,-6.125,37.515625
+Khoai-tay-1,Electrode-Box-B2,1,22,83,-5.125,26.265625
+Khoai-tay-1,Electrode-Box-B2,2,6,79,-4.125,17.015625
+Khoai-tay-1,Electrode-Box-B2,3,28,97,-3.125,9.765625
+Khoai-tay-1,Electrode-Box-B2,4,60,134,-2.125,4.515625
+Khoai-tay-1,Electrode-Box-B2,5,75,138,-1.125,1.265625
+Khoai-tay-1,Electrode-Box-B2,6,81,137,-0.125,0.015625
+Khoai-tay-1,Electrode-Box-B2,7,78,147,0.875,0.765625
+Khoai-tay-1,Electrode-Box-B2,8,91,132,1.875,3.515625
+Khoai-tay-1,Electrode-Box-B2,9,99,146,2.875,8.265625
+Khoai-tay-1,Electrode-Box-B2,10,94,143,3.875,15.015625
+Khoai-tay-1,Electrode-Box-B2,11,110,156,4.875,23.765625
+Khoai-tay-1,Electrode-Box-B2,12,105,143,5.875,34.515625
+Khoai-tay-1,Electrode-Box-B2,13,106,153,6.875,47.265625
+Khoai-tay-2,Naive,1,21,68,-5.125,26.265625
+Khoai-tay-2,Naive,2,6,79,-4.125,17.015625
+Khoai-tay-2,Naive,3,0,83,-3.125,9.765625
+Khoai-tay-2,Naive,4,28,87,-2.125,4.515625
+Khoai-tay-2,Naive,5,31,125,-1.125,1.265625
+Khoai-tay-2,Naive,6,62,144,-0.125,0.015625
+Khoai-tay-2,Naive,7,87,141,0.875,0.765625
+Khoai-tay-2,Naive,8,105,152,1.875,3.515625
+Khoai-tay-2,Naive,9,75,148,2.875,8.265625
+Khoai-tay-2,Naive,10,101,149,3.875,15.015625
+Khoai-tay-2,Naive,11,102,154,4.875,23.765625
+Khoai-tay-2,Naive,12,95,144,5.875,34.515625
+Khoai-tay-2,Naive,13,77,149,6.875,47.265625
+OM-2,Naive,0,1,7,-6.125,37.515625
+OM-2,Naive,1,11,33,-5.125,26.265625
+OM-2,Naive,2,19,62,-4.125,17.015625
+OM-2,Naive,3,29,117,-3.125,9.765625
+OM-2,Naive,4,73,126,-2.125,4.515625
+OM-2,Naive,5,53,135,-1.125,1.265625
+OM-2,Naive,6,73,138,-0.125,0.015625
+OM-2,Naive,7,80,131,0.875,0.765625
+OM-2,Naive,8,91,141,1.875,3.515625
+OM-2,Naive,9,90,135,2.875,8.265625
+OM-2,Naive,10,95,142,3.875,15.015625
+OM-2,Naive,11,60,133,4.875,23.765625
+OM-2,Naive,12,58,142,5.875,34.515625
+Root-beer-1,Electrode-Box-B2,0,11,85,-6.125,37.515625
+Root-beer-1,Electrode-Box-B2,1,18,76,-5.125,26.265625
+Root-beer-1,Electrode-Box-B2,2,40,105,-4.125,17.015625
+Root-beer-1,Electrode-Box-B2,3,55,134,-3.125,9.765625
+Root-beer-1,Electrode-Box-B2,4,75,136,-2.125,4.515625
+Root-beer-1,Electrode-Box-B2,5,64,133,-1.125,1.265625
+Root-beer-1,Electrode-Box-B2,6,104,139,-0.125,0.015625
+Root-beer-1,Electrode-Box-B2,7,98,148,0.875,0.765625
+Root-beer-1,Electrode-Box-B2,8,81,145,1.875,3.515625
+Root-beer-1,Electrode-Box-B2,9,89,156,2.875,8.265625
+Root-beer-1,Electrode-Box-B2,10,105,158,3.875,15.015625
+Root-beer-2,Electrode-Box-A2,0,22,74,-6.125,37.515625
+Root-beer-2,Electrode-Box-A2,1,31,87,-5.125,26.265625
+Root-beer-2,Electrode-Box-A2,2,49,134,-4.125,17.015625
+Root-beer-2,Electrode-Box-A2,3,31,89,-3.125,9.765625
+Root-beer-2,Electrode-Box-A2,4,60,140,-2.125,4.515625
+Root-beer-2,Electrode-Box-A2,5,84,147,-1.125,1.265625
+Vu-vuong,Naive,0,18,61,-6.125,37.515625
+Vu-vuong,Naive,1,35,91,-5.125,26.265625
+Vu-vuong,Naive,2,61,127,-4.125,17.015625
+Vu-vuong,Naive,3,34,146,-3.125,9.765625
+Vu-vuong,Naive,4,61,141,-2.125,4.515625
+Vu-vuong,Naive,5,37,151,-1.125,1.265625
+Vu-vuong,Naive,6,49,131,-0.125,0.015625
+Vu-vuong,Naive,7,65,149,0.875,0.765625
+Vu-vuong,Naive,8,67,141,1.875,3.515625
+Vu-vuong,Naive,9,73,140,2.875,8.265625
+Vu-vuong,Naive,10,72,131,3.875,15.015625
+Vu-vuong,Naive,11,89,158,4.875,23.765625
+Vu-vuong,Naive,12,97,154,5.875,34.515625
+Vu-vuong,Naive,13,93,145,6.875,47.265625
diff --git a/analysis/matlab/derived/mergeB2_full.csv b/analysis/matlab/derived/mergeB2_full.csv
new file mode 100644
index 0000000..eceb064
--- /dev/null
+++ b/analysis/matlab/derived/mergeB2_full.csv
@@ -0,0 +1,186 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-8.2972972972973,68.845142439737
+Banh-mi-1,Electrode-Box-B2,1,35,86,-7.2972972972973,53.2505478451424
+Banh-mi-1,Electrode-Box-B2,2,47,110,-6.2972972972973,39.6559532505478
+Banh-mi-1,Electrode-Box-B2,3,65,140,-5.2972972972973,28.0613586559532
+Banh-mi-1,Electrode-Box-B2,4,70,127,-4.2972972972973,18.4667640613586
+Banh-mi-1,Electrode-Box-B2,5,102,142,-3.2972972972973,10.8721694667641
+Banh-mi-1,Electrode-Box-B2,6,90,131,-2.2972972972973,5.27757487216946
+Banh-mi-1,Electrode-Box-B2,7,109,148,-1.2972972972973,1.68298027757487
+Banh-mi-1,Electrode-Box-B2,8,104,137,-0.297297297297296,0.0883856829802771
+Banh-mi-1,Electrode-Box-B2,9,119,150,0.702702702702704,0.493791088385684
+Banh-mi-1,Electrode-Box-B2,10,121,158,1.7027027027027,2.89919649379109
+Banh-mi-1,Electrode-Box-B2,11,121,148,2.7027027027027,7.3046018991965
+Banh-mi-1,Electrode-Box-B2,12,120,149,3.7027027027027,13.7100073046019
+Banh-mi-1,Electrode-Box-B2,13,135,154,4.7027027027027,22.1154127100073
+Banh-mi-2,Electrode-Box-A2,0,25,97,-8.2972972972973,68.845142439737
+Banh-mi-2,Electrode-Box-A2,1,22,101,-7.2972972972973,53.2505478451424
+Banh-mi-2,Electrode-Box-A2,2,22,119,-6.2972972972973,39.6559532505478
+Banh-mi-2,Electrode-Box-A2,3,29,118,-5.2972972972973,28.0613586559532
+Banh-mi-2,Electrode-Box-A2,4,27,136,-4.2972972972973,18.4667640613586
+Banh-mi-2,Electrode-Box-A2,5,43,146,-3.2972972972973,10.8721694667641
+Banh-mi-2,Electrode-Box-A2,6,74,146,-2.2972972972973,5.27757487216946
+Banh-mi-2,Electrode-Box-A2,7,70,148,-1.2972972972973,1.68298027757487
+Banh-mi-2,Electrode-Box-A2,8,65,130,-0.297297297297296,0.0883856829802771
+Banh-mi-2,Electrode-Box-A2,9,79,151,0.702702702702704,0.493791088385684
+Banh-mi-2,Electrode-Box-A2,10,93,152,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,0,7,56,-8.2972972972973,68.845142439737
+Egg-tart-1,Electrode-Box-B2,1,16,78,-7.2972972972973,53.2505478451424
+Egg-tart-1,Electrode-Box-B2,2,23,103,-6.2972972972973,39.6559532505478
+Egg-tart-1,Electrode-Box-B2,3,63,120,-5.2972972972973,28.0613586559532
+Egg-tart-1,Electrode-Box-B2,4,69,132,-4.2972972972973,18.4667640613586
+Egg-tart-1,Electrode-Box-B2,5,83,136,-3.2972972972973,10.8721694667641
+Egg-tart-1,Electrode-Box-B2,6,71,142,-2.2972972972973,5.27757487216946
+Egg-tart-1,Electrode-Box-B2,7,79,138,-1.2972972972973,1.68298027757487
+Egg-tart-1,Electrode-Box-B2,8,98,142,-0.297297297297296,0.0883856829802771
+Egg-tart-1,Electrode-Box-B2,9,89,139,0.702702702702704,0.493791088385684
+Egg-tart-1,Electrode-Box-B2,10,96,143,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,11,96,148,2.7027027027027,7.3046018991965
+Egg-tart-1,Electrode-Box-B2,12,101,156,3.7027027027027,13.7100073046019
+Egg-tart-1,Electrode-Box-B2,13,103,152,4.7027027027027,22.1154127100073
+Egg-tart-1,Electrode-Box-B2,14,97,152,5.7027027027027,32.5208181154127
+Egg-tart-2,Electrode-Box-A2,0,9,32,-8.2972972972973,68.845142439737
+Egg-tart-2,Electrode-Box-A2,1,2,38,-7.2972972972973,53.2505478451424
+Egg-tart-2,Electrode-Box-A2,2,31,93,-6.2972972972973,39.6559532505478
+Egg-tart-2,Electrode-Box-A2,3,44,101,-5.2972972972973,28.0613586559532
+Egg-tart-2,Electrode-Box-A2,4,54,131,-4.2972972972973,18.4667640613586
+Egg-tart-2,Electrode-Box-A2,5,84,139,-3.2972972972973,10.8721694667641
+Egg-tart-2,Electrode-Box-A2,6,85,145,-2.2972972972973,5.27757487216946
+Egg-tart-2,Electrode-Box-A2,7,79,143,-1.2972972972973,1.68298027757487
+Egg-tart-2,Electrode-Box-A2,8,76,131,-0.297297297297296,0.0883856829802771
+Egg-tart-2,Electrode-Box-A2,9,88,149,0.702702702702704,0.493791088385684
+Egg-tart-2,Electrode-Box-A2,10,81,151,1.7027027027027,2.89919649379109
+Egg-tart-2,Electrode-Box-A2,11,78,152,2.7027027027027,7.3046018991965
+Egg-tart-2,Electrode-Box-A2,12,96,155,3.7027027027027,13.7100073046019
+Egg-tart-2,Electrode-Box-A2,13,84,155,4.7027027027027,22.1154127100073
+Khoai-lang-1,Electrode-Box-B2,0,3,69,-8.2972972972973,68.845142439737
+Khoai-lang-1,Electrode-Box-B2,1,18,97,-7.2972972972973,53.2505478451424
+Khoai-lang-1,Electrode-Box-B2,2,27,84,-6.2972972972973,39.6559532505478
+Khoai-lang-1,Electrode-Box-B2,3,46,121,-5.2972972972973,28.0613586559532
+Khoai-lang-1,Electrode-Box-B2,4,65,143,-4.2972972972973,18.4667640613586
+Khoai-lang-1,Electrode-Box-B2,5,76,141,-3.2972972972973,10.8721694667641
+Khoai-lang-1,Electrode-Box-B2,6,79,146,-2.2972972972973,5.27757487216946
+Khoai-lang-1,Electrode-Box-B2,7,81,153,-1.2972972972973,1.68298027757487
+Khoai-lang-1,Electrode-Box-B2,8,98,144,-0.297297297297296,0.0883856829802771
+Khoai-lang-1,Electrode-Box-B2,9,101,149,0.702702702702704,0.493791088385684
+Khoai-lang-1,Electrode-Box-B2,10,103,150,1.7027027027027,2.89919649379109
+Khoai-lang-1,Electrode-Box-B2,11,113,154,2.7027027027027,7.3046018991965
+Khoai-lang-1,Electrode-Box-B2,12,117,148,3.7027027027027,13.7100073046019
+Khoai-lang-1,Electrode-Box-B2,13,114,146,4.7027027027027,22.1154127100073
+Khoai-lang-1,Electrode-Box-B2,14,119,132,5.7027027027027,32.5208181154127
+Khoai-lang-1,Electrode-Box-B2,15,111,156,6.7027027027027,44.9262235208181
+Khoai-lang-1,Electrode-Box-B2,16,74,156,7.7027027027027,59.3316289262235
+Khoai-lang-1,Electrode-Box-B2,17,109,139,8.7027027027027,75.7370343316289
+Khoai-lang-1,Electrode-Box-B2,18,88,138,9.7027027027027,94.1424397370344
+Khoai-lang-1,Electrode-Box-B2,19,98,140,10.7027027027027,114.54784514244
+Khoai-lang-1,Electrode-Box-B2,20,118,153,11.7027027027027,136.953250547845
+Khoai-lang-1,Electrode-Box-B2,21,109,146,12.7027027027027,161.358655953251
+Khoai-lang-1,Electrode-Box-B2,22,106,141,13.7027027027027,187.764061358656
+Khoai-lang-2,Naive,0,0,0,-8.2972972972973,68.845142439737
+Khoai-lang-2,Naive,1,0,0,-7.2972972972973,53.2505478451424
+Khoai-lang-2,Naive,2,10,47,-6.2972972972973,39.6559532505478
+Khoai-lang-2,Naive,3,11,52,-5.2972972972973,28.0613586559532
+Khoai-lang-2,Naive,4,9,56,-4.2972972972973,18.4667640613586
+Khoai-lang-2,Naive,5,34,95,-3.2972972972973,10.8721694667641
+Khoai-lang-2,Naive,6,21,72,-2.2972972972973,5.27757487216946
+Khoai-lang-2,Naive,7,23,99,-1.2972972972973,1.68298027757487
+Khoai-lang-2,Naive,8,64,136,-0.297297297297296,0.0883856829802771
+Khoai-lang-2,Naive,9,75,131,0.702702702702704,0.493791088385684
+Khoai-lang-2,Naive,10,63,134,1.7027027027027,2.89919649379109
+Khoai-lang-2,Naive,11,59,139,2.7027027027027,7.3046018991965
+Khoai-lang-2,Naive,12,51,129,3.7027027027027,13.7100073046019
+Khoai-lang-2,Naive,13,73,143,4.7027027027027,22.1154127100073
+Khoai-lang-2,Naive,14,82,136,5.7027027027027,32.5208181154127
+Khoai-lang-2,Naive,15,70,145,6.7027027027027,44.9262235208181
+Khoai-lang-2,Naive,16,76,135,7.7027027027027,59.3316289262235
+Khoai-lang-2,Naive,17,76,150,8.7027027027027,75.7370343316289
+Khoai-lang-2,Naive,18,63,122,9.7027027027027,94.1424397370344
+Khoai-lang-2,Naive,19,48,116,10.7027027027027,114.54784514244
+Khoai-lang-2,Naive,20,65,134,11.7027027027027,136.953250547845
+Khoai-lang-2,Naive,21,75,131,12.7027027027027,161.358655953251
+Khoai-lang-2,Naive,22,98,146,13.7027027027027,187.764061358656
+Khoai-lang-2,Naive,23,88,139,14.7027027027027,216.169466764061
+Khoai-lang-2,Naive,24,94,148,15.7027027027027,246.574872169467
+Khoai-lang-2,Naive,25,56,102,16.7027027027027,278.980277574872
+Khoai-lang-2,Naive,26,75,143,17.7027027027027,313.385682980278
+Khoai-tay-1,Electrode-Box-B2,0,14,62,-8.2972972972973,68.845142439737
+Khoai-tay-1,Electrode-Box-B2,1,22,83,-7.2972972972973,53.2505478451424
+Khoai-tay-1,Electrode-Box-B2,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-1,Electrode-Box-B2,3,28,97,-5.2972972972973,28.0613586559532
+Khoai-tay-1,Electrode-Box-B2,4,60,134,-4.2972972972973,18.4667640613586
+Khoai-tay-1,Electrode-Box-B2,5,75,138,-3.2972972972973,10.8721694667641
+Khoai-tay-1,Electrode-Box-B2,6,81,137,-2.2972972972973,5.27757487216946
+Khoai-tay-1,Electrode-Box-B2,7,78,147,-1.2972972972973,1.68298027757487
+Khoai-tay-1,Electrode-Box-B2,8,91,132,-0.297297297297296,0.0883856829802771
+Khoai-tay-1,Electrode-Box-B2,9,99,146,0.702702702702704,0.493791088385684
+Khoai-tay-1,Electrode-Box-B2,10,94,143,1.7027027027027,2.89919649379109
+Khoai-tay-1,Electrode-Box-B2,11,110,156,2.7027027027027,7.3046018991965
+Khoai-tay-1,Electrode-Box-B2,12,105,143,3.7027027027027,13.7100073046019
+Khoai-tay-1,Electrode-Box-B2,13,106,153,4.7027027027027,22.1154127100073
+Khoai-tay-1,Electrode-Box-B2,14,91,152,5.7027027027027,32.5208181154127
+Khoai-tay-2,Naive,1,21,68,-7.2972972972973,53.2505478451424
+Khoai-tay-2,Naive,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-2,Naive,3,0,83,-5.2972972972973,28.0613586559532
+Khoai-tay-2,Naive,4,28,87,-4.2972972972973,18.4667640613586
+Khoai-tay-2,Naive,5,31,125,-3.2972972972973,10.8721694667641
+Khoai-tay-2,Naive,6,62,144,-2.2972972972973,5.27757487216946
+Khoai-tay-2,Naive,7,87,141,-1.2972972972973,1.68298027757487
+Khoai-tay-2,Naive,8,105,152,-0.297297297297296,0.0883856829802771
+Khoai-tay-2,Naive,9,75,148,0.702702702702704,0.493791088385684
+Khoai-tay-2,Naive,10,101,149,1.7027027027027,2.89919649379109
+Khoai-tay-2,Naive,11,102,154,2.7027027027027,7.3046018991965
+Khoai-tay-2,Naive,12,95,144,3.7027027027027,13.7100073046019
+Khoai-tay-2,Naive,13,77,149,4.7027027027027,22.1154127100073
+Khoai-tay-2,Naive,14,91,153,5.7027027027027,32.5208181154127
+OM-2,Naive,0,1,7,-8.2972972972973,68.845142439737
+OM-2,Naive,1,11,33,-7.2972972972973,53.2505478451424
+OM-2,Naive,2,19,62,-6.2972972972973,39.6559532505478
+OM-2,Naive,3,29,117,-5.2972972972973,28.0613586559532
+OM-2,Naive,4,73,126,-4.2972972972973,18.4667640613586
+OM-2,Naive,5,53,135,-3.2972972972973,10.8721694667641
+OM-2,Naive,6,73,138,-2.2972972972973,5.27757487216946
+OM-2,Naive,7,80,131,-1.2972972972973,1.68298027757487
+OM-2,Naive,8,91,141,-0.297297297297296,0.0883856829802771
+OM-2,Naive,9,90,135,0.702702702702704,0.493791088385684
+OM-2,Naive,10,95,142,1.7027027027027,2.89919649379109
+OM-2,Naive,11,60,133,2.7027027027027,7.3046018991965
+OM-2,Naive,12,58,142,3.7027027027027,13.7100073046019
+Root-beer-1,Electrode-Box-B2,0,11,85,-8.2972972972973,68.845142439737
+Root-beer-1,Electrode-Box-B2,1,18,76,-7.2972972972973,53.2505478451424
+Root-beer-1,Electrode-Box-B2,2,40,105,-6.2972972972973,39.6559532505478
+Root-beer-1,Electrode-Box-B2,3,55,134,-5.2972972972973,28.0613586559532
+Root-beer-1,Electrode-Box-B2,4,75,136,-4.2972972972973,18.4667640613586
+Root-beer-1,Electrode-Box-B2,5,64,133,-3.2972972972973,10.8721694667641
+Root-beer-1,Electrode-Box-B2,6,104,139,-2.2972972972973,5.27757487216946
+Root-beer-1,Electrode-Box-B2,7,98,148,-1.2972972972973,1.68298027757487
+Root-beer-1,Electrode-Box-B2,8,81,145,-0.297297297297296,0.0883856829802771
+Root-beer-1,Electrode-Box-B2,9,89,156,0.702702702702704,0.493791088385684
+Root-beer-1,Electrode-Box-B2,10,105,158,1.7027027027027,2.89919649379109
+Root-beer-2,Electrode-Box-A2,0,22,74,-8.2972972972973,68.845142439737
+Root-beer-2,Electrode-Box-A2,1,31,87,-7.2972972972973,53.2505478451424
+Root-beer-2,Electrode-Box-A2,2,49,134,-6.2972972972973,39.6559532505478
+Root-beer-2,Electrode-Box-A2,3,31,89,-5.2972972972973,28.0613586559532
+Root-beer-2,Electrode-Box-A2,4,60,140,-4.2972972972973,18.4667640613586
+Root-beer-2,Electrode-Box-A2,5,84,147,-3.2972972972973,10.8721694667641
+Vu-vuong,Naive,0,18,61,-8.2972972972973,68.845142439737
+Vu-vuong,Naive,1,35,91,-7.2972972972973,53.2505478451424
+Vu-vuong,Naive,2,61,127,-6.2972972972973,39.6559532505478
+Vu-vuong,Naive,3,34,146,-5.2972972972973,28.0613586559532
+Vu-vuong,Naive,4,61,141,-4.2972972972973,18.4667640613586
+Vu-vuong,Naive,5,37,151,-3.2972972972973,10.8721694667641
+Vu-vuong,Naive,6,49,131,-2.2972972972973,5.27757487216946
+Vu-vuong,Naive,7,65,149,-1.2972972972973,1.68298027757487
+Vu-vuong,Naive,8,67,141,-0.297297297297296,0.0883856829802771
+Vu-vuong,Naive,9,73,140,0.702702702702704,0.493791088385684
+Vu-vuong,Naive,10,72,131,1.7027027027027,2.89919649379109
+Vu-vuong,Naive,11,89,158,2.7027027027027,7.3046018991965
+Vu-vuong,Naive,12,97,154,3.7027027027027,13.7100073046019
+Vu-vuong,Naive,13,93,145,4.7027027027027,22.1154127100073
+Vu-vuong,Naive,14,75,147,5.7027027027027,32.5208181154127
+Vu-vuong,Naive,15,68,142,6.7027027027027,44.9262235208181
+Vu-vuong,Naive,16,96,162,7.7027027027027,59.3316289262235
+Vu-vuong,Naive,17,68,144,8.7027027027027,75.7370343316289
+Vu-vuong,Naive,18,81,134,9.7027027027027,94.1424397370344
+Vu-vuong,Naive,19,66,144,10.7027027027027,114.54784514244
+Vu-vuong,Naive,20,84,127,11.7027027027027,136.953250547845
+Vu-vuong,Naive,21,66,133,12.7027027027027,161.358655953251
diff --git a/analysis/matlab/derived/mergeNaive_full.csv b/analysis/matlab/derived/mergeNaive_full.csv
new file mode 100644
index 0000000..8db6919
--- /dev/null
+++ b/analysis/matlab/derived/mergeNaive_full.csv
@@ -0,0 +1,186 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-8.2972972972973,68.845142439737
+Banh-mi-1,Electrode-Box-B2,1,35,86,-7.2972972972973,53.2505478451424
+Banh-mi-1,Electrode-Box-B2,2,47,110,-6.2972972972973,39.6559532505478
+Banh-mi-1,Electrode-Box-B2,3,65,140,-5.2972972972973,28.0613586559532
+Banh-mi-1,Electrode-Box-B2,4,70,127,-4.2972972972973,18.4667640613586
+Banh-mi-1,Electrode-Box-B2,5,102,142,-3.2972972972973,10.8721694667641
+Banh-mi-1,Electrode-Box-B2,6,90,131,-2.2972972972973,5.27757487216946
+Banh-mi-1,Electrode-Box-B2,7,109,148,-1.2972972972973,1.68298027757487
+Banh-mi-1,Electrode-Box-B2,8,104,137,-0.297297297297296,0.0883856829802771
+Banh-mi-1,Electrode-Box-B2,9,119,150,0.702702702702704,0.493791088385684
+Banh-mi-1,Electrode-Box-B2,10,121,158,1.7027027027027,2.89919649379109
+Banh-mi-1,Electrode-Box-B2,11,121,148,2.7027027027027,7.3046018991965
+Banh-mi-1,Electrode-Box-B2,12,120,149,3.7027027027027,13.7100073046019
+Banh-mi-1,Electrode-Box-B2,13,135,154,4.7027027027027,22.1154127100073
+Banh-mi-2,Electrode-Box-A2,0,25,97,-8.2972972972973,68.845142439737
+Banh-mi-2,Electrode-Box-A2,1,22,101,-7.2972972972973,53.2505478451424
+Banh-mi-2,Electrode-Box-A2,2,22,119,-6.2972972972973,39.6559532505478
+Banh-mi-2,Electrode-Box-A2,3,29,118,-5.2972972972973,28.0613586559532
+Banh-mi-2,Electrode-Box-A2,4,27,136,-4.2972972972973,18.4667640613586
+Banh-mi-2,Electrode-Box-A2,5,43,146,-3.2972972972973,10.8721694667641
+Banh-mi-2,Electrode-Box-A2,6,74,146,-2.2972972972973,5.27757487216946
+Banh-mi-2,Electrode-Box-A2,7,70,148,-1.2972972972973,1.68298027757487
+Banh-mi-2,Electrode-Box-A2,8,65,130,-0.297297297297296,0.0883856829802771
+Banh-mi-2,Electrode-Box-A2,9,79,151,0.702702702702704,0.493791088385684
+Banh-mi-2,Electrode-Box-A2,10,93,152,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,0,7,56,-8.2972972972973,68.845142439737
+Egg-tart-1,Electrode-Box-B2,1,16,78,-7.2972972972973,53.2505478451424
+Egg-tart-1,Electrode-Box-B2,2,23,103,-6.2972972972973,39.6559532505478
+Egg-tart-1,Electrode-Box-B2,3,63,120,-5.2972972972973,28.0613586559532
+Egg-tart-1,Electrode-Box-B2,4,69,132,-4.2972972972973,18.4667640613586
+Egg-tart-1,Electrode-Box-B2,5,83,136,-3.2972972972973,10.8721694667641
+Egg-tart-1,Electrode-Box-B2,6,71,142,-2.2972972972973,5.27757487216946
+Egg-tart-1,Electrode-Box-B2,7,79,138,-1.2972972972973,1.68298027757487
+Egg-tart-1,Electrode-Box-B2,8,98,142,-0.297297297297296,0.0883856829802771
+Egg-tart-1,Electrode-Box-B2,9,89,139,0.702702702702704,0.493791088385684
+Egg-tart-1,Electrode-Box-B2,10,96,143,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,11,96,148,2.7027027027027,7.3046018991965
+Egg-tart-1,Electrode-Box-B2,12,101,156,3.7027027027027,13.7100073046019
+Egg-tart-1,Electrode-Box-B2,13,103,152,4.7027027027027,22.1154127100073
+Egg-tart-1,Electrode-Box-B2,14,97,152,5.7027027027027,32.5208181154127
+Egg-tart-2,Electrode-Box-A2,0,9,32,-8.2972972972973,68.845142439737
+Egg-tart-2,Electrode-Box-A2,1,2,38,-7.2972972972973,53.2505478451424
+Egg-tart-2,Electrode-Box-A2,2,31,93,-6.2972972972973,39.6559532505478
+Egg-tart-2,Electrode-Box-A2,3,44,101,-5.2972972972973,28.0613586559532
+Egg-tart-2,Electrode-Box-A2,4,54,131,-4.2972972972973,18.4667640613586
+Egg-tart-2,Electrode-Box-A2,5,84,139,-3.2972972972973,10.8721694667641
+Egg-tart-2,Electrode-Box-A2,6,85,145,-2.2972972972973,5.27757487216946
+Egg-tart-2,Electrode-Box-A2,7,79,143,-1.2972972972973,1.68298027757487
+Egg-tart-2,Electrode-Box-A2,8,76,131,-0.297297297297296,0.0883856829802771
+Egg-tart-2,Electrode-Box-A2,9,88,149,0.702702702702704,0.493791088385684
+Egg-tart-2,Electrode-Box-A2,10,81,151,1.7027027027027,2.89919649379109
+Egg-tart-2,Electrode-Box-A2,11,78,152,2.7027027027027,7.3046018991965
+Egg-tart-2,Electrode-Box-A2,12,96,155,3.7027027027027,13.7100073046019
+Egg-tart-2,Electrode-Box-A2,13,84,155,4.7027027027027,22.1154127100073
+Khoai-lang-1,Electrode-Box-B2,0,3,69,-8.2972972972973,68.845142439737
+Khoai-lang-1,Electrode-Box-B2,1,18,97,-7.2972972972973,53.2505478451424
+Khoai-lang-1,Electrode-Box-B2,2,27,84,-6.2972972972973,39.6559532505478
+Khoai-lang-1,Electrode-Box-B2,3,46,121,-5.2972972972973,28.0613586559532
+Khoai-lang-1,Electrode-Box-B2,4,65,143,-4.2972972972973,18.4667640613586
+Khoai-lang-1,Electrode-Box-B2,5,76,141,-3.2972972972973,10.8721694667641
+Khoai-lang-1,Electrode-Box-B2,6,79,146,-2.2972972972973,5.27757487216946
+Khoai-lang-1,Electrode-Box-B2,7,81,153,-1.2972972972973,1.68298027757487
+Khoai-lang-1,Electrode-Box-B2,8,98,144,-0.297297297297296,0.0883856829802771
+Khoai-lang-1,Electrode-Box-B2,9,101,149,0.702702702702704,0.493791088385684
+Khoai-lang-1,Electrode-Box-B2,10,103,150,1.7027027027027,2.89919649379109
+Khoai-lang-1,Electrode-Box-B2,11,113,154,2.7027027027027,7.3046018991965
+Khoai-lang-1,Electrode-Box-B2,12,117,148,3.7027027027027,13.7100073046019
+Khoai-lang-1,Electrode-Box-B2,13,114,146,4.7027027027027,22.1154127100073
+Khoai-lang-1,Electrode-Box-B2,14,119,132,5.7027027027027,32.5208181154127
+Khoai-lang-1,Electrode-Box-B2,15,111,156,6.7027027027027,44.9262235208181
+Khoai-lang-1,Electrode-Box-B2,16,74,156,7.7027027027027,59.3316289262235
+Khoai-lang-1,Electrode-Box-B2,17,109,139,8.7027027027027,75.7370343316289
+Khoai-lang-1,Electrode-Box-B2,18,88,138,9.7027027027027,94.1424397370344
+Khoai-lang-1,Electrode-Box-B2,19,98,140,10.7027027027027,114.54784514244
+Khoai-lang-1,Electrode-Box-B2,20,118,153,11.7027027027027,136.953250547845
+Khoai-lang-1,Electrode-Box-B2,21,109,146,12.7027027027027,161.358655953251
+Khoai-lang-1,Electrode-Box-B2,22,106,141,13.7027027027027,187.764061358656
+Khoai-lang-2,Electrode-Box-A2,0,0,0,-8.2972972972973,68.845142439737
+Khoai-lang-2,Electrode-Box-A2,1,0,0,-7.2972972972973,53.2505478451424
+Khoai-lang-2,Electrode-Box-A2,2,10,47,-6.2972972972973,39.6559532505478
+Khoai-lang-2,Electrode-Box-A2,3,11,52,-5.2972972972973,28.0613586559532
+Khoai-lang-2,Electrode-Box-A2,4,9,56,-4.2972972972973,18.4667640613586
+Khoai-lang-2,Electrode-Box-A2,5,34,95,-3.2972972972973,10.8721694667641
+Khoai-lang-2,Electrode-Box-A2,6,21,72,-2.2972972972973,5.27757487216946
+Khoai-lang-2,Electrode-Box-A2,7,23,99,-1.2972972972973,1.68298027757487
+Khoai-lang-2,Electrode-Box-A2,8,64,136,-0.297297297297296,0.0883856829802771
+Khoai-lang-2,Electrode-Box-A2,9,75,131,0.702702702702704,0.493791088385684
+Khoai-lang-2,Electrode-Box-A2,10,63,134,1.7027027027027,2.89919649379109
+Khoai-lang-2,Electrode-Box-A2,11,59,139,2.7027027027027,7.3046018991965
+Khoai-lang-2,Electrode-Box-A2,12,51,129,3.7027027027027,13.7100073046019
+Khoai-lang-2,Electrode-Box-A2,13,73,143,4.7027027027027,22.1154127100073
+Khoai-lang-2,Electrode-Box-A2,14,82,136,5.7027027027027,32.5208181154127
+Khoai-lang-2,Electrode-Box-A2,15,70,145,6.7027027027027,44.9262235208181
+Khoai-lang-2,Electrode-Box-A2,16,76,135,7.7027027027027,59.3316289262235
+Khoai-lang-2,Electrode-Box-A2,17,76,150,8.7027027027027,75.7370343316289
+Khoai-lang-2,Electrode-Box-A2,18,63,122,9.7027027027027,94.1424397370344
+Khoai-lang-2,Electrode-Box-A2,19,48,116,10.7027027027027,114.54784514244
+Khoai-lang-2,Electrode-Box-A2,20,65,134,11.7027027027027,136.953250547845
+Khoai-lang-2,Electrode-Box-A2,21,75,131,12.7027027027027,161.358655953251
+Khoai-lang-2,Electrode-Box-A2,22,98,146,13.7027027027027,187.764061358656
+Khoai-lang-2,Electrode-Box-A2,23,88,139,14.7027027027027,216.169466764061
+Khoai-lang-2,Electrode-Box-A2,24,94,148,15.7027027027027,246.574872169467
+Khoai-lang-2,Electrode-Box-A2,25,56,102,16.7027027027027,278.980277574872
+Khoai-lang-2,Electrode-Box-A2,26,75,143,17.7027027027027,313.385682980278
+Khoai-tay-1,Electrode-Box-A,0,14,62,-8.2972972972973,68.845142439737
+Khoai-tay-1,Electrode-Box-A,1,22,83,-7.2972972972973,53.2505478451424
+Khoai-tay-1,Electrode-Box-A,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-1,Electrode-Box-A,3,28,97,-5.2972972972973,28.0613586559532
+Khoai-tay-1,Electrode-Box-A,4,60,134,-4.2972972972973,18.4667640613586
+Khoai-tay-1,Electrode-Box-A,5,75,138,-3.2972972972973,10.8721694667641
+Khoai-tay-1,Electrode-Box-A,6,81,137,-2.2972972972973,5.27757487216946
+Khoai-tay-1,Electrode-Box-A,7,78,147,-1.2972972972973,1.68298027757487
+Khoai-tay-1,Electrode-Box-A,8,91,132,-0.297297297297296,0.0883856829802771
+Khoai-tay-1,Electrode-Box-A,9,99,146,0.702702702702704,0.493791088385684
+Khoai-tay-1,Electrode-Box-A,10,94,143,1.7027027027027,2.89919649379109
+Khoai-tay-1,Electrode-Box-A,11,110,156,2.7027027027027,7.3046018991965
+Khoai-tay-1,Electrode-Box-A,12,105,143,3.7027027027027,13.7100073046019
+Khoai-tay-1,Electrode-Box-A,13,106,153,4.7027027027027,22.1154127100073
+Khoai-tay-1,Electrode-Box-A,14,91,152,5.7027027027027,32.5208181154127
+Khoai-tay-2,Electrode-Box-A2,1,21,68,-7.2972972972973,53.2505478451424
+Khoai-tay-2,Electrode-Box-A2,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-2,Electrode-Box-A2,3,0,83,-5.2972972972973,28.0613586559532
+Khoai-tay-2,Electrode-Box-A2,4,28,87,-4.2972972972973,18.4667640613586
+Khoai-tay-2,Electrode-Box-A2,5,31,125,-3.2972972972973,10.8721694667641
+Khoai-tay-2,Electrode-Box-A2,6,62,144,-2.2972972972973,5.27757487216946
+Khoai-tay-2,Electrode-Box-A2,7,87,141,-1.2972972972973,1.68298027757487
+Khoai-tay-2,Electrode-Box-A2,8,105,152,-0.297297297297296,0.0883856829802771
+Khoai-tay-2,Electrode-Box-A2,9,75,148,0.702702702702704,0.493791088385684
+Khoai-tay-2,Electrode-Box-A2,10,101,149,1.7027027027027,2.89919649379109
+Khoai-tay-2,Electrode-Box-A2,11,102,154,2.7027027027027,7.3046018991965
+Khoai-tay-2,Electrode-Box-A2,12,95,144,3.7027027027027,13.7100073046019
+Khoai-tay-2,Electrode-Box-A2,13,77,149,4.7027027027027,22.1154127100073
+Khoai-tay-2,Electrode-Box-A2,14,91,153,5.7027027027027,32.5208181154127
+OM-2,Electrode-Box-A2,0,1,7,-8.2972972972973,68.845142439737
+OM-2,Electrode-Box-A2,1,11,33,-7.2972972972973,53.2505478451424
+OM-2,Electrode-Box-A2,2,19,62,-6.2972972972973,39.6559532505478
+OM-2,Electrode-Box-A2,3,29,117,-5.2972972972973,28.0613586559532
+OM-2,Electrode-Box-A2,4,73,126,-4.2972972972973,18.4667640613586
+OM-2,Electrode-Box-A2,5,53,135,-3.2972972972973,10.8721694667641
+OM-2,Electrode-Box-A2,6,73,138,-2.2972972972973,5.27757487216946
+OM-2,Electrode-Box-A2,7,80,131,-1.2972972972973,1.68298027757487
+OM-2,Electrode-Box-A2,8,91,141,-0.297297297297296,0.0883856829802771
+OM-2,Electrode-Box-A2,9,90,135,0.702702702702704,0.493791088385684
+OM-2,Electrode-Box-A2,10,95,142,1.7027027027027,2.89919649379109
+OM-2,Electrode-Box-A2,11,60,133,2.7027027027027,7.3046018991965
+OM-2,Electrode-Box-A2,12,58,142,3.7027027027027,13.7100073046019
+Root-beer-1,Electrode-Box-B2,0,11,85,-8.2972972972973,68.845142439737
+Root-beer-1,Electrode-Box-B2,1,18,76,-7.2972972972973,53.2505478451424
+Root-beer-1,Electrode-Box-B2,2,40,105,-6.2972972972973,39.6559532505478
+Root-beer-1,Electrode-Box-B2,3,55,134,-5.2972972972973,28.0613586559532
+Root-beer-1,Electrode-Box-B2,4,75,136,-4.2972972972973,18.4667640613586
+Root-beer-1,Electrode-Box-B2,5,64,133,-3.2972972972973,10.8721694667641
+Root-beer-1,Electrode-Box-B2,6,104,139,-2.2972972972973,5.27757487216946
+Root-beer-1,Electrode-Box-B2,7,98,148,-1.2972972972973,1.68298027757487
+Root-beer-1,Electrode-Box-B2,8,81,145,-0.297297297297296,0.0883856829802771
+Root-beer-1,Electrode-Box-B2,9,89,156,0.702702702702704,0.493791088385684
+Root-beer-1,Electrode-Box-B2,10,105,158,1.7027027027027,2.89919649379109
+Root-beer-2,Electrode-Box-A2,0,22,74,-8.2972972972973,68.845142439737
+Root-beer-2,Electrode-Box-A2,1,31,87,-7.2972972972973,53.2505478451424
+Root-beer-2,Electrode-Box-A2,2,49,134,-6.2972972972973,39.6559532505478
+Root-beer-2,Electrode-Box-A2,3,31,89,-5.2972972972973,28.0613586559532
+Root-beer-2,Electrode-Box-A2,4,60,140,-4.2972972972973,18.4667640613586
+Root-beer-2,Electrode-Box-A2,5,84,147,-3.2972972972973,10.8721694667641
+Vu-vuong,Electrode-Box-A2,0,18,61,-8.2972972972973,68.845142439737
+Vu-vuong,Electrode-Box-A2,1,35,91,-7.2972972972973,53.2505478451424
+Vu-vuong,Electrode-Box-A2,2,61,127,-6.2972972972973,39.6559532505478
+Vu-vuong,Electrode-Box-A2,3,34,146,-5.2972972972973,28.0613586559532
+Vu-vuong,Electrode-Box-A2,4,61,141,-4.2972972972973,18.4667640613586
+Vu-vuong,Electrode-Box-A2,5,37,151,-3.2972972972973,10.8721694667641
+Vu-vuong,Electrode-Box-A2,6,49,131,-2.2972972972973,5.27757487216946
+Vu-vuong,Electrode-Box-A2,7,65,149,-1.2972972972973,1.68298027757487
+Vu-vuong,Electrode-Box-A2,8,67,141,-0.297297297297296,0.0883856829802771
+Vu-vuong,Electrode-Box-A2,9,73,140,0.702702702702704,0.493791088385684
+Vu-vuong,Electrode-Box-A2,10,72,131,1.7027027027027,2.89919649379109
+Vu-vuong,Electrode-Box-A2,11,89,158,2.7027027027027,7.3046018991965
+Vu-vuong,Electrode-Box-A2,12,97,154,3.7027027027027,13.7100073046019
+Vu-vuong,Electrode-Box-A2,13,93,145,4.7027027027027,22.1154127100073
+Vu-vuong,Electrode-Box-A2,14,75,147,5.7027027027027,32.5208181154127
+Vu-vuong,Electrode-Box-A2,15,68,142,6.7027027027027,44.9262235208181
+Vu-vuong,Electrode-Box-A2,16,96,162,7.7027027027027,59.3316289262235
+Vu-vuong,Electrode-Box-A2,17,68,144,8.7027027027027,75.7370343316289
+Vu-vuong,Electrode-Box-A2,18,81,134,9.7027027027027,94.1424397370344
+Vu-vuong,Electrode-Box-A2,19,66,144,10.7027027027027,114.54784514244
+Vu-vuong,Electrode-Box-A2,20,84,127,11.7027027027027,136.953250547845
+Vu-vuong,Electrode-Box-A2,21,66,133,12.7027027027027,161.358655953251
diff --git a/analysis/matlab/derived/unmerged_d0_10.csv b/analysis/matlab/derived/unmerged_d0_10.csv
new file mode 100644
index 0000000..c581905
--- /dev/null
+++ b/analysis/matlab/derived/unmerged_d0_10.csv
@@ -0,0 +1,127 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-4.92063492063492,24.2126480221718
+Banh-mi-1,Electrode-Box-B2,1,35,86,-3.92063492063492,15.371378180902
+Banh-mi-1,Electrode-Box-B2,2,47,110,-2.92063492063492,8.53010833963215
+Banh-mi-1,Electrode-Box-B2,3,65,140,-1.92063492063492,3.68883849836231
+Banh-mi-1,Electrode-Box-B2,4,70,127,-0.920634920634921,0.847568657092467
+Banh-mi-1,Electrode-Box-B2,5,102,142,0.0793650793650791,0.0062988158226253
+Banh-mi-1,Electrode-Box-B2,6,90,131,1.07936507936508,1.16502897455278
+Banh-mi-1,Electrode-Box-B2,7,109,148,2.07936507936508,4.32375913328294
+Banh-mi-1,Electrode-Box-B2,8,104,137,3.07936507936508,9.4824892920131
+Banh-mi-1,Electrode-Box-B2,9,119,150,4.07936507936508,16.6412194507433
+Banh-mi-1,Electrode-Box-B2,10,121,158,5.07936507936508,25.7999496094734
+Banh-mi-2,Electrode-Box-A2,0,25,97,-4.92063492063492,24.2126480221718
+Banh-mi-2,Electrode-Box-A2,1,22,101,-3.92063492063492,15.371378180902
+Banh-mi-2,Electrode-Box-A2,2,22,119,-2.92063492063492,8.53010833963215
+Banh-mi-2,Electrode-Box-A2,3,29,118,-1.92063492063492,3.68883849836231
+Banh-mi-2,Electrode-Box-A2,4,27,136,-0.920634920634921,0.847568657092467
+Banh-mi-2,Electrode-Box-A2,5,43,146,0.0793650793650791,0.0062988158226253
+Banh-mi-2,Electrode-Box-A2,6,74,146,1.07936507936508,1.16502897455278
+Banh-mi-2,Electrode-Box-A2,7,70,148,2.07936507936508,4.32375913328294
+Banh-mi-2,Electrode-Box-A2,8,65,130,3.07936507936508,9.4824892920131
+Banh-mi-2,Electrode-Box-A2,9,79,151,4.07936507936508,16.6412194507433
+Banh-mi-2,Electrode-Box-A2,10,93,152,5.07936507936508,25.7999496094734
+Egg-tart-1,Electrode-Box-B2,0,7,56,-4.92063492063492,24.2126480221718
+Egg-tart-1,Electrode-Box-B2,1,16,78,-3.92063492063492,15.371378180902
+Egg-tart-1,Electrode-Box-B2,2,23,103,-2.92063492063492,8.53010833963215
+Egg-tart-1,Electrode-Box-B2,3,63,120,-1.92063492063492,3.68883849836231
+Egg-tart-1,Electrode-Box-B2,4,69,132,-0.920634920634921,0.847568657092467
+Egg-tart-1,Electrode-Box-B2,5,83,136,0.0793650793650791,0.0062988158226253
+Egg-tart-1,Electrode-Box-B2,6,71,142,1.07936507936508,1.16502897455278
+Egg-tart-1,Electrode-Box-B2,7,79,138,2.07936507936508,4.32375913328294
+Egg-tart-1,Electrode-Box-B2,8,98,142,3.07936507936508,9.4824892920131
+Egg-tart-1,Electrode-Box-B2,9,89,139,4.07936507936508,16.6412194507433
+Egg-tart-1,Electrode-Box-B2,10,96,143,5.07936507936508,25.7999496094734
+Egg-tart-2,Electrode-Box-A2,0,9,32,-4.92063492063492,24.2126480221718
+Egg-tart-2,Electrode-Box-A2,1,2,38,-3.92063492063492,15.371378180902
+Egg-tart-2,Electrode-Box-A2,2,31,93,-2.92063492063492,8.53010833963215
+Egg-tart-2,Electrode-Box-A2,3,44,101,-1.92063492063492,3.68883849836231
+Egg-tart-2,Electrode-Box-A2,4,54,131,-0.920634920634921,0.847568657092467
+Egg-tart-2,Electrode-Box-A2,5,84,139,0.0793650793650791,0.0062988158226253
+Egg-tart-2,Electrode-Box-A2,6,85,145,1.07936507936508,1.16502897455278
+Egg-tart-2,Electrode-Box-A2,7,79,143,2.07936507936508,4.32375913328294
+Egg-tart-2,Electrode-Box-A2,8,76,131,3.07936507936508,9.4824892920131
+Egg-tart-2,Electrode-Box-A2,9,88,149,4.07936507936508,16.6412194507433
+Egg-tart-2,Electrode-Box-A2,10,81,151,5.07936507936508,25.7999496094734
+Khoai-lang-1,Right-Electrode,0,3,69,-4.92063492063492,24.2126480221718
+Khoai-lang-1,Right-Electrode,1,18,97,-3.92063492063492,15.371378180902
+Khoai-lang-1,Right-Electrode,2,27,84,-2.92063492063492,8.53010833963215
+Khoai-lang-1,Right-Electrode,3,46,121,-1.92063492063492,3.68883849836231
+Khoai-lang-1,Right-Electrode,4,65,143,-0.920634920634921,0.847568657092467
+Khoai-lang-1,Right-Electrode,5,76,141,0.0793650793650791,0.0062988158226253
+Khoai-lang-1,Right-Electrode,6,79,146,1.07936507936508,1.16502897455278
+Khoai-lang-1,Right-Electrode,7,81,153,2.07936507936508,4.32375913328294
+Khoai-lang-1,Right-Electrode,8,98,144,3.07936507936508,9.4824892920131
+Khoai-lang-1,Right-Electrode,9,101,149,4.07936507936508,16.6412194507433
+Khoai-lang-1,Right-Electrode,10,103,150,5.07936507936508,25.7999496094734
+Khoai-lang-2,Naive,0,0,0,-4.92063492063492,24.2126480221718
+Khoai-lang-2,Naive,1,0,0,-3.92063492063492,15.371378180902
+Khoai-lang-2,Naive,2,10,47,-2.92063492063492,8.53010833963215
+Khoai-lang-2,Naive,3,11,52,-1.92063492063492,3.68883849836231
+Khoai-lang-2,Naive,4,9,56,-0.920634920634921,0.847568657092467
+Khoai-lang-2,Naive,5,34,95,0.0793650793650791,0.0062988158226253
+Khoai-lang-2,Naive,6,21,72,1.07936507936508,1.16502897455278
+Khoai-lang-2,Naive,7,23,99,2.07936507936508,4.32375913328294
+Khoai-lang-2,Naive,8,64,136,3.07936507936508,9.4824892920131
+Khoai-lang-2,Naive,9,75,131,4.07936507936508,16.6412194507433
+Khoai-lang-2,Naive,10,63,134,5.07936507936508,25.7999496094734
+Khoai-tay-1,Electrode-Box-A,0,14,62,-4.92063492063492,24.2126480221718
+Khoai-tay-1,Electrode-Box-A,1,22,83,-3.92063492063492,15.371378180902
+Khoai-tay-1,Electrode-Box-A,2,6,79,-2.92063492063492,8.53010833963215
+Khoai-tay-1,Electrode-Box-A,3,28,97,-1.92063492063492,3.68883849836231
+Khoai-tay-1,Electrode-Box-A,4,60,134,-0.920634920634921,0.847568657092467
+Khoai-tay-1,Electrode-Box-A,5,75,138,0.0793650793650791,0.0062988158226253
+Khoai-tay-1,Electrode-Box-A,6,81,137,1.07936507936508,1.16502897455278
+Khoai-tay-1,Electrode-Box-A,7,78,147,2.07936507936508,4.32375913328294
+Khoai-tay-1,Electrode-Box-A,8,91,132,3.07936507936508,9.4824892920131
+Khoai-tay-1,Electrode-Box-A,9,99,146,4.07936507936508,16.6412194507433
+Khoai-tay-1,Electrode-Box-A,10,94,143,5.07936507936508,25.7999496094734
+Khoai-tay-2,Naive,1,21,68,-3.92063492063492,15.371378180902
+Khoai-tay-2,Naive,2,6,79,-2.92063492063492,8.53010833963215
+Khoai-tay-2,Naive,3,0,83,-1.92063492063492,3.68883849836231
+Khoai-tay-2,Naive,4,28,87,-0.920634920634921,0.847568657092467
+Khoai-tay-2,Naive,5,31,125,0.0793650793650791,0.0062988158226253
+Khoai-tay-2,Naive,6,62,144,1.07936507936508,1.16502897455278
+Khoai-tay-2,Naive,7,87,141,2.07936507936508,4.32375913328294
+Khoai-tay-2,Naive,8,105,152,3.07936507936508,9.4824892920131
+Khoai-tay-2,Naive,9,75,148,4.07936507936508,16.6412194507433
+Khoai-tay-2,Naive,10,101,149,5.07936507936508,25.7999496094734
+OM-2,Naive,0,1,7,-4.92063492063492,24.2126480221718
+OM-2,Naive,1,11,33,-3.92063492063492,15.371378180902
+OM-2,Naive,2,19,62,-2.92063492063492,8.53010833963215
+OM-2,Naive,3,29,117,-1.92063492063492,3.68883849836231
+OM-2,Naive,4,73,126,-0.920634920634921,0.847568657092467
+OM-2,Naive,5,53,135,0.0793650793650791,0.0062988158226253
+OM-2,Naive,6,73,138,1.07936507936508,1.16502897455278
+OM-2,Naive,7,80,131,2.07936507936508,4.32375913328294
+OM-2,Naive,8,91,141,3.07936507936508,9.4824892920131
+OM-2,Naive,9,90,135,4.07936507936508,16.6412194507433
+OM-2,Naive,10,95,142,5.07936507936508,25.7999496094734
+Root-beer-1,Electrode-Box-B2,0,11,85,-4.92063492063492,24.2126480221718
+Root-beer-1,Electrode-Box-B2,1,18,76,-3.92063492063492,15.371378180902
+Root-beer-1,Electrode-Box-B2,2,40,105,-2.92063492063492,8.53010833963215
+Root-beer-1,Electrode-Box-B2,3,55,134,-1.92063492063492,3.68883849836231
+Root-beer-1,Electrode-Box-B2,4,75,136,-0.920634920634921,0.847568657092467
+Root-beer-1,Electrode-Box-B2,5,64,133,0.0793650793650791,0.0062988158226253
+Root-beer-1,Electrode-Box-B2,6,104,139,1.07936507936508,1.16502897455278
+Root-beer-1,Electrode-Box-B2,7,98,148,2.07936507936508,4.32375913328294
+Root-beer-1,Electrode-Box-B2,8,81,145,3.07936507936508,9.4824892920131
+Root-beer-1,Electrode-Box-B2,9,89,156,4.07936507936508,16.6412194507433
+Root-beer-1,Electrode-Box-B2,10,105,158,5.07936507936508,25.7999496094734
+Root-beer-2,Electrode-Box-A2,0,22,74,-4.92063492063492,24.2126480221718
+Root-beer-2,Electrode-Box-A2,1,31,87,-3.92063492063492,15.371378180902
+Root-beer-2,Electrode-Box-A2,2,49,134,-2.92063492063492,8.53010833963215
+Root-beer-2,Electrode-Box-A2,3,31,89,-1.92063492063492,3.68883849836231
+Root-beer-2,Electrode-Box-A2,4,60,140,-0.920634920634921,0.847568657092467
+Root-beer-2,Electrode-Box-A2,5,84,147,0.0793650793650791,0.0062988158226253
+Vu-vuong,Naive,0,18,61,-4.92063492063492,24.2126480221718
+Vu-vuong,Naive,1,35,91,-3.92063492063492,15.371378180902
+Vu-vuong,Naive,2,61,127,-2.92063492063492,8.53010833963215
+Vu-vuong,Naive,3,34,146,-1.92063492063492,3.68883849836231
+Vu-vuong,Naive,4,61,141,-0.920634920634921,0.847568657092467
+Vu-vuong,Naive,5,37,151,0.0793650793650791,0.0062988158226253
+Vu-vuong,Naive,6,49,131,1.07936507936508,1.16502897455278
+Vu-vuong,Naive,7,65,149,2.07936507936508,4.32375913328294
+Vu-vuong,Naive,8,67,141,3.07936507936508,9.4824892920131
+Vu-vuong,Naive,9,73,140,4.07936507936508,16.6412194507433
+Vu-vuong,Naive,10,72,131,5.07936507936508,25.7999496094734
diff --git a/analysis/matlab/derived/unmerged_d0_13.csv b/analysis/matlab/derived/unmerged_d0_13.csv
new file mode 100644
index 0000000..6f92936
--- /dev/null
+++ b/analysis/matlab/derived/unmerged_d0_13.csv
@@ -0,0 +1,153 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-6.125,37.515625
+Banh-mi-1,Electrode-Box-B2,1,35,86,-5.125,26.265625
+Banh-mi-1,Electrode-Box-B2,2,47,110,-4.125,17.015625
+Banh-mi-1,Electrode-Box-B2,3,65,140,-3.125,9.765625
+Banh-mi-1,Electrode-Box-B2,4,70,127,-2.125,4.515625
+Banh-mi-1,Electrode-Box-B2,5,102,142,-1.125,1.265625
+Banh-mi-1,Electrode-Box-B2,6,90,131,-0.125,0.015625
+Banh-mi-1,Electrode-Box-B2,7,109,148,0.875,0.765625
+Banh-mi-1,Electrode-Box-B2,8,104,137,1.875,3.515625
+Banh-mi-1,Electrode-Box-B2,9,119,150,2.875,8.265625
+Banh-mi-1,Electrode-Box-B2,10,121,158,3.875,15.015625
+Banh-mi-1,Electrode-Box-B2,11,121,148,4.875,23.765625
+Banh-mi-1,Electrode-Box-B2,12,120,149,5.875,34.515625
+Banh-mi-1,Electrode-Box-B2,13,135,154,6.875,47.265625
+Banh-mi-2,Electrode-Box-A2,0,25,97,-6.125,37.515625
+Banh-mi-2,Electrode-Box-A2,1,22,101,-5.125,26.265625
+Banh-mi-2,Electrode-Box-A2,2,22,119,-4.125,17.015625
+Banh-mi-2,Electrode-Box-A2,3,29,118,-3.125,9.765625
+Banh-mi-2,Electrode-Box-A2,4,27,136,-2.125,4.515625
+Banh-mi-2,Electrode-Box-A2,5,43,146,-1.125,1.265625
+Banh-mi-2,Electrode-Box-A2,6,74,146,-0.125,0.015625
+Banh-mi-2,Electrode-Box-A2,7,70,148,0.875,0.765625
+Banh-mi-2,Electrode-Box-A2,8,65,130,1.875,3.515625
+Banh-mi-2,Electrode-Box-A2,9,79,151,2.875,8.265625
+Banh-mi-2,Electrode-Box-A2,10,93,152,3.875,15.015625
+Egg-tart-1,Electrode-Box-B2,0,7,56,-6.125,37.515625
+Egg-tart-1,Electrode-Box-B2,1,16,78,-5.125,26.265625
+Egg-tart-1,Electrode-Box-B2,2,23,103,-4.125,17.015625
+Egg-tart-1,Electrode-Box-B2,3,63,120,-3.125,9.765625
+Egg-tart-1,Electrode-Box-B2,4,69,132,-2.125,4.515625
+Egg-tart-1,Electrode-Box-B2,5,83,136,-1.125,1.265625
+Egg-tart-1,Electrode-Box-B2,6,71,142,-0.125,0.015625
+Egg-tart-1,Electrode-Box-B2,7,79,138,0.875,0.765625
+Egg-tart-1,Electrode-Box-B2,8,98,142,1.875,3.515625
+Egg-tart-1,Electrode-Box-B2,9,89,139,2.875,8.265625
+Egg-tart-1,Electrode-Box-B2,10,96,143,3.875,15.015625
+Egg-tart-1,Electrode-Box-B2,11,96,148,4.875,23.765625
+Egg-tart-1,Electrode-Box-B2,12,101,156,5.875,34.515625
+Egg-tart-1,Electrode-Box-B2,13,103,152,6.875,47.265625
+Egg-tart-2,Electrode-Box-A2,0,9,32,-6.125,37.515625
+Egg-tart-2,Electrode-Box-A2,1,2,38,-5.125,26.265625
+Egg-tart-2,Electrode-Box-A2,2,31,93,-4.125,17.015625
+Egg-tart-2,Electrode-Box-A2,3,44,101,-3.125,9.765625
+Egg-tart-2,Electrode-Box-A2,4,54,131,-2.125,4.515625
+Egg-tart-2,Electrode-Box-A2,5,84,139,-1.125,1.265625
+Egg-tart-2,Electrode-Box-A2,6,85,145,-0.125,0.015625
+Egg-tart-2,Electrode-Box-A2,7,79,143,0.875,0.765625
+Egg-tart-2,Electrode-Box-A2,8,76,131,1.875,3.515625
+Egg-tart-2,Electrode-Box-A2,9,88,149,2.875,8.265625
+Egg-tart-2,Electrode-Box-A2,10,81,151,3.875,15.015625
+Egg-tart-2,Electrode-Box-A2,11,78,152,4.875,23.765625
+Egg-tart-2,Electrode-Box-A2,12,96,155,5.875,34.515625
+Egg-tart-2,Electrode-Box-A2,13,84,155,6.875,47.265625
+Khoai-lang-1,Right-Electrode,0,3,69,-6.125,37.515625
+Khoai-lang-1,Right-Electrode,1,18,97,-5.125,26.265625
+Khoai-lang-1,Right-Electrode,2,27,84,-4.125,17.015625
+Khoai-lang-1,Right-Electrode,3,46,121,-3.125,9.765625
+Khoai-lang-1,Right-Electrode,4,65,143,-2.125,4.515625
+Khoai-lang-1,Right-Electrode,5,76,141,-1.125,1.265625
+Khoai-lang-1,Right-Electrode,6,79,146,-0.125,0.015625
+Khoai-lang-1,Right-Electrode,7,81,153,0.875,0.765625
+Khoai-lang-1,Right-Electrode,8,98,144,1.875,3.515625
+Khoai-lang-1,Right-Electrode,9,101,149,2.875,8.265625
+Khoai-lang-1,Right-Electrode,10,103,150,3.875,15.015625
+Khoai-lang-1,Right-Electrode,11,113,154,4.875,23.765625
+Khoai-lang-1,Right-Electrode,12,117,148,5.875,34.515625
+Khoai-lang-1,Right-Electrode,13,114,146,6.875,47.265625
+Khoai-lang-2,Naive,0,0,0,-6.125,37.515625
+Khoai-lang-2,Naive,1,0,0,-5.125,26.265625
+Khoai-lang-2,Naive,2,10,47,-4.125,17.015625
+Khoai-lang-2,Naive,3,11,52,-3.125,9.765625
+Khoai-lang-2,Naive,4,9,56,-2.125,4.515625
+Khoai-lang-2,Naive,5,34,95,-1.125,1.265625
+Khoai-lang-2,Naive,6,21,72,-0.125,0.015625
+Khoai-lang-2,Naive,7,23,99,0.875,0.765625
+Khoai-lang-2,Naive,8,64,136,1.875,3.515625
+Khoai-lang-2,Naive,9,75,131,2.875,8.265625
+Khoai-lang-2,Naive,10,63,134,3.875,15.015625
+Khoai-lang-2,Naive,11,59,139,4.875,23.765625
+Khoai-lang-2,Naive,12,51,129,5.875,34.515625
+Khoai-lang-2,Naive,13,73,143,6.875,47.265625
+Khoai-tay-1,Electrode-Box-A,0,14,62,-6.125,37.515625
+Khoai-tay-1,Electrode-Box-A,1,22,83,-5.125,26.265625
+Khoai-tay-1,Electrode-Box-A,2,6,79,-4.125,17.015625
+Khoai-tay-1,Electrode-Box-A,3,28,97,-3.125,9.765625
+Khoai-tay-1,Electrode-Box-A,4,60,134,-2.125,4.515625
+Khoai-tay-1,Electrode-Box-A,5,75,138,-1.125,1.265625
+Khoai-tay-1,Electrode-Box-A,6,81,137,-0.125,0.015625
+Khoai-tay-1,Electrode-Box-A,7,78,147,0.875,0.765625
+Khoai-tay-1,Electrode-Box-A,8,91,132,1.875,3.515625
+Khoai-tay-1,Electrode-Box-A,9,99,146,2.875,8.265625
+Khoai-tay-1,Electrode-Box-A,10,94,143,3.875,15.015625
+Khoai-tay-1,Electrode-Box-A,11,110,156,4.875,23.765625
+Khoai-tay-1,Electrode-Box-A,12,105,143,5.875,34.515625
+Khoai-tay-1,Electrode-Box-A,13,106,153,6.875,47.265625
+Khoai-tay-2,Naive,1,21,68,-5.125,26.265625
+Khoai-tay-2,Naive,2,6,79,-4.125,17.015625
+Khoai-tay-2,Naive,3,0,83,-3.125,9.765625
+Khoai-tay-2,Naive,4,28,87,-2.125,4.515625
+Khoai-tay-2,Naive,5,31,125,-1.125,1.265625
+Khoai-tay-2,Naive,6,62,144,-0.125,0.015625
+Khoai-tay-2,Naive,7,87,141,0.875,0.765625
+Khoai-tay-2,Naive,8,105,152,1.875,3.515625
+Khoai-tay-2,Naive,9,75,148,2.875,8.265625
+Khoai-tay-2,Naive,10,101,149,3.875,15.015625
+Khoai-tay-2,Naive,11,102,154,4.875,23.765625
+Khoai-tay-2,Naive,12,95,144,5.875,34.515625
+Khoai-tay-2,Naive,13,77,149,6.875,47.265625
+OM-2,Naive,0,1,7,-6.125,37.515625
+OM-2,Naive,1,11,33,-5.125,26.265625
+OM-2,Naive,2,19,62,-4.125,17.015625
+OM-2,Naive,3,29,117,-3.125,9.765625
+OM-2,Naive,4,73,126,-2.125,4.515625
+OM-2,Naive,5,53,135,-1.125,1.265625
+OM-2,Naive,6,73,138,-0.125,0.015625
+OM-2,Naive,7,80,131,0.875,0.765625
+OM-2,Naive,8,91,141,1.875,3.515625
+OM-2,Naive,9,90,135,2.875,8.265625
+OM-2,Naive,10,95,142,3.875,15.015625
+OM-2,Naive,11,60,133,4.875,23.765625
+OM-2,Naive,12,58,142,5.875,34.515625
+Root-beer-1,Electrode-Box-B2,0,11,85,-6.125,37.515625
+Root-beer-1,Electrode-Box-B2,1,18,76,-5.125,26.265625
+Root-beer-1,Electrode-Box-B2,2,40,105,-4.125,17.015625
+Root-beer-1,Electrode-Box-B2,3,55,134,-3.125,9.765625
+Root-beer-1,Electrode-Box-B2,4,75,136,-2.125,4.515625
+Root-beer-1,Electrode-Box-B2,5,64,133,-1.125,1.265625
+Root-beer-1,Electrode-Box-B2,6,104,139,-0.125,0.015625
+Root-beer-1,Electrode-Box-B2,7,98,148,0.875,0.765625
+Root-beer-1,Electrode-Box-B2,8,81,145,1.875,3.515625
+Root-beer-1,Electrode-Box-B2,9,89,156,2.875,8.265625
+Root-beer-1,Electrode-Box-B2,10,105,158,3.875,15.015625
+Root-beer-2,Electrode-Box-A2,0,22,74,-6.125,37.515625
+Root-beer-2,Electrode-Box-A2,1,31,87,-5.125,26.265625
+Root-beer-2,Electrode-Box-A2,2,49,134,-4.125,17.015625
+Root-beer-2,Electrode-Box-A2,3,31,89,-3.125,9.765625
+Root-beer-2,Electrode-Box-A2,4,60,140,-2.125,4.515625
+Root-beer-2,Electrode-Box-A2,5,84,147,-1.125,1.265625
+Vu-vuong,Naive,0,18,61,-6.125,37.515625
+Vu-vuong,Naive,1,35,91,-5.125,26.265625
+Vu-vuong,Naive,2,61,127,-4.125,17.015625
+Vu-vuong,Naive,3,34,146,-3.125,9.765625
+Vu-vuong,Naive,4,61,141,-2.125,4.515625
+Vu-vuong,Naive,5,37,151,-1.125,1.265625
+Vu-vuong,Naive,6,49,131,-0.125,0.015625
+Vu-vuong,Naive,7,65,149,0.875,0.765625
+Vu-vuong,Naive,8,67,141,1.875,3.515625
+Vu-vuong,Naive,9,73,140,2.875,8.265625
+Vu-vuong,Naive,10,72,131,3.875,15.015625
+Vu-vuong,Naive,11,89,158,4.875,23.765625
+Vu-vuong,Naive,12,97,154,5.875,34.515625
+Vu-vuong,Naive,13,93,145,6.875,47.265625
diff --git a/analysis/matlab/derived/unmerged_full.csv b/analysis/matlab/derived/unmerged_full.csv
new file mode 100644
index 0000000..c4dd920
--- /dev/null
+++ b/analysis/matlab/derived/unmerged_full.csv
@@ -0,0 +1,186 @@
+subject,group,day,success,total,day_c,day_c2
+Banh-mi-1,Electrode-Box-B2,0,13,84,-8.2972972972973,68.845142439737
+Banh-mi-1,Electrode-Box-B2,1,35,86,-7.2972972972973,53.2505478451424
+Banh-mi-1,Electrode-Box-B2,2,47,110,-6.2972972972973,39.6559532505478
+Banh-mi-1,Electrode-Box-B2,3,65,140,-5.2972972972973,28.0613586559532
+Banh-mi-1,Electrode-Box-B2,4,70,127,-4.2972972972973,18.4667640613586
+Banh-mi-1,Electrode-Box-B2,5,102,142,-3.2972972972973,10.8721694667641
+Banh-mi-1,Electrode-Box-B2,6,90,131,-2.2972972972973,5.27757487216946
+Banh-mi-1,Electrode-Box-B2,7,109,148,-1.2972972972973,1.68298027757487
+Banh-mi-1,Electrode-Box-B2,8,104,137,-0.297297297297296,0.0883856829802771
+Banh-mi-1,Electrode-Box-B2,9,119,150,0.702702702702704,0.493791088385684
+Banh-mi-1,Electrode-Box-B2,10,121,158,1.7027027027027,2.89919649379109
+Banh-mi-1,Electrode-Box-B2,11,121,148,2.7027027027027,7.3046018991965
+Banh-mi-1,Electrode-Box-B2,12,120,149,3.7027027027027,13.7100073046019
+Banh-mi-1,Electrode-Box-B2,13,135,154,4.7027027027027,22.1154127100073
+Banh-mi-2,Electrode-Box-A2,0,25,97,-8.2972972972973,68.845142439737
+Banh-mi-2,Electrode-Box-A2,1,22,101,-7.2972972972973,53.2505478451424
+Banh-mi-2,Electrode-Box-A2,2,22,119,-6.2972972972973,39.6559532505478
+Banh-mi-2,Electrode-Box-A2,3,29,118,-5.2972972972973,28.0613586559532
+Banh-mi-2,Electrode-Box-A2,4,27,136,-4.2972972972973,18.4667640613586
+Banh-mi-2,Electrode-Box-A2,5,43,146,-3.2972972972973,10.8721694667641
+Banh-mi-2,Electrode-Box-A2,6,74,146,-2.2972972972973,5.27757487216946
+Banh-mi-2,Electrode-Box-A2,7,70,148,-1.2972972972973,1.68298027757487
+Banh-mi-2,Electrode-Box-A2,8,65,130,-0.297297297297296,0.0883856829802771
+Banh-mi-2,Electrode-Box-A2,9,79,151,0.702702702702704,0.493791088385684
+Banh-mi-2,Electrode-Box-A2,10,93,152,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,0,7,56,-8.2972972972973,68.845142439737
+Egg-tart-1,Electrode-Box-B2,1,16,78,-7.2972972972973,53.2505478451424
+Egg-tart-1,Electrode-Box-B2,2,23,103,-6.2972972972973,39.6559532505478
+Egg-tart-1,Electrode-Box-B2,3,63,120,-5.2972972972973,28.0613586559532
+Egg-tart-1,Electrode-Box-B2,4,69,132,-4.2972972972973,18.4667640613586
+Egg-tart-1,Electrode-Box-B2,5,83,136,-3.2972972972973,10.8721694667641
+Egg-tart-1,Electrode-Box-B2,6,71,142,-2.2972972972973,5.27757487216946
+Egg-tart-1,Electrode-Box-B2,7,79,138,-1.2972972972973,1.68298027757487
+Egg-tart-1,Electrode-Box-B2,8,98,142,-0.297297297297296,0.0883856829802771
+Egg-tart-1,Electrode-Box-B2,9,89,139,0.702702702702704,0.493791088385684
+Egg-tart-1,Electrode-Box-B2,10,96,143,1.7027027027027,2.89919649379109
+Egg-tart-1,Electrode-Box-B2,11,96,148,2.7027027027027,7.3046018991965
+Egg-tart-1,Electrode-Box-B2,12,101,156,3.7027027027027,13.7100073046019
+Egg-tart-1,Electrode-Box-B2,13,103,152,4.7027027027027,22.1154127100073
+Egg-tart-1,Electrode-Box-B2,14,97,152,5.7027027027027,32.5208181154127
+Egg-tart-2,Electrode-Box-A2,0,9,32,-8.2972972972973,68.845142439737
+Egg-tart-2,Electrode-Box-A2,1,2,38,-7.2972972972973,53.2505478451424
+Egg-tart-2,Electrode-Box-A2,2,31,93,-6.2972972972973,39.6559532505478
+Egg-tart-2,Electrode-Box-A2,3,44,101,-5.2972972972973,28.0613586559532
+Egg-tart-2,Electrode-Box-A2,4,54,131,-4.2972972972973,18.4667640613586
+Egg-tart-2,Electrode-Box-A2,5,84,139,-3.2972972972973,10.8721694667641
+Egg-tart-2,Electrode-Box-A2,6,85,145,-2.2972972972973,5.27757487216946
+Egg-tart-2,Electrode-Box-A2,7,79,143,-1.2972972972973,1.68298027757487
+Egg-tart-2,Electrode-Box-A2,8,76,131,-0.297297297297296,0.0883856829802771
+Egg-tart-2,Electrode-Box-A2,9,88,149,0.702702702702704,0.493791088385684
+Egg-tart-2,Electrode-Box-A2,10,81,151,1.7027027027027,2.89919649379109
+Egg-tart-2,Electrode-Box-A2,11,78,152,2.7027027027027,7.3046018991965
+Egg-tart-2,Electrode-Box-A2,12,96,155,3.7027027027027,13.7100073046019
+Egg-tart-2,Electrode-Box-A2,13,84,155,4.7027027027027,22.1154127100073
+Khoai-lang-1,Right-Electrode,0,3,69,-8.2972972972973,68.845142439737
+Khoai-lang-1,Right-Electrode,1,18,97,-7.2972972972973,53.2505478451424
+Khoai-lang-1,Right-Electrode,2,27,84,-6.2972972972973,39.6559532505478
+Khoai-lang-1,Right-Electrode,3,46,121,-5.2972972972973,28.0613586559532
+Khoai-lang-1,Right-Electrode,4,65,143,-4.2972972972973,18.4667640613586
+Khoai-lang-1,Right-Electrode,5,76,141,-3.2972972972973,10.8721694667641
+Khoai-lang-1,Right-Electrode,6,79,146,-2.2972972972973,5.27757487216946
+Khoai-lang-1,Right-Electrode,7,81,153,-1.2972972972973,1.68298027757487
+Khoai-lang-1,Right-Electrode,8,98,144,-0.297297297297296,0.0883856829802771
+Khoai-lang-1,Right-Electrode,9,101,149,0.702702702702704,0.493791088385684
+Khoai-lang-1,Right-Electrode,10,103,150,1.7027027027027,2.89919649379109
+Khoai-lang-1,Right-Electrode,11,113,154,2.7027027027027,7.3046018991965
+Khoai-lang-1,Right-Electrode,12,117,148,3.7027027027027,13.7100073046019
+Khoai-lang-1,Right-Electrode,13,114,146,4.7027027027027,22.1154127100073
+Khoai-lang-1,Right-Electrode,14,119,132,5.7027027027027,32.5208181154127
+Khoai-lang-1,Right-Electrode,15,111,156,6.7027027027027,44.9262235208181
+Khoai-lang-1,Right-Electrode,16,74,156,7.7027027027027,59.3316289262235
+Khoai-lang-1,Right-Electrode,17,109,139,8.7027027027027,75.7370343316289
+Khoai-lang-1,Right-Electrode,18,88,138,9.7027027027027,94.1424397370344
+Khoai-lang-1,Right-Electrode,19,98,140,10.7027027027027,114.54784514244
+Khoai-lang-1,Right-Electrode,20,118,153,11.7027027027027,136.953250547845
+Khoai-lang-1,Right-Electrode,21,109,146,12.7027027027027,161.358655953251
+Khoai-lang-1,Right-Electrode,22,106,141,13.7027027027027,187.764061358656
+Khoai-lang-2,Naive,0,0,0,-8.2972972972973,68.845142439737
+Khoai-lang-2,Naive,1,0,0,-7.2972972972973,53.2505478451424
+Khoai-lang-2,Naive,2,10,47,-6.2972972972973,39.6559532505478
+Khoai-lang-2,Naive,3,11,52,-5.2972972972973,28.0613586559532
+Khoai-lang-2,Naive,4,9,56,-4.2972972972973,18.4667640613586
+Khoai-lang-2,Naive,5,34,95,-3.2972972972973,10.8721694667641
+Khoai-lang-2,Naive,6,21,72,-2.2972972972973,5.27757487216946
+Khoai-lang-2,Naive,7,23,99,-1.2972972972973,1.68298027757487
+Khoai-lang-2,Naive,8,64,136,-0.297297297297296,0.0883856829802771
+Khoai-lang-2,Naive,9,75,131,0.702702702702704,0.493791088385684
+Khoai-lang-2,Naive,10,63,134,1.7027027027027,2.89919649379109
+Khoai-lang-2,Naive,11,59,139,2.7027027027027,7.3046018991965
+Khoai-lang-2,Naive,12,51,129,3.7027027027027,13.7100073046019
+Khoai-lang-2,Naive,13,73,143,4.7027027027027,22.1154127100073
+Khoai-lang-2,Naive,14,82,136,5.7027027027027,32.5208181154127
+Khoai-lang-2,Naive,15,70,145,6.7027027027027,44.9262235208181
+Khoai-lang-2,Naive,16,76,135,7.7027027027027,59.3316289262235
+Khoai-lang-2,Naive,17,76,150,8.7027027027027,75.7370343316289
+Khoai-lang-2,Naive,18,63,122,9.7027027027027,94.1424397370344
+Khoai-lang-2,Naive,19,48,116,10.7027027027027,114.54784514244
+Khoai-lang-2,Naive,20,65,134,11.7027027027027,136.953250547845
+Khoai-lang-2,Naive,21,75,131,12.7027027027027,161.358655953251
+Khoai-lang-2,Naive,22,98,146,13.7027027027027,187.764061358656
+Khoai-lang-2,Naive,23,88,139,14.7027027027027,216.169466764061
+Khoai-lang-2,Naive,24,94,148,15.7027027027027,246.574872169467
+Khoai-lang-2,Naive,25,56,102,16.7027027027027,278.980277574872
+Khoai-lang-2,Naive,26,75,143,17.7027027027027,313.385682980278
+Khoai-tay-1,Electrode-Box-A,0,14,62,-8.2972972972973,68.845142439737
+Khoai-tay-1,Electrode-Box-A,1,22,83,-7.2972972972973,53.2505478451424
+Khoai-tay-1,Electrode-Box-A,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-1,Electrode-Box-A,3,28,97,-5.2972972972973,28.0613586559532
+Khoai-tay-1,Electrode-Box-A,4,60,134,-4.2972972972973,18.4667640613586
+Khoai-tay-1,Electrode-Box-A,5,75,138,-3.2972972972973,10.8721694667641
+Khoai-tay-1,Electrode-Box-A,6,81,137,-2.2972972972973,5.27757487216946
+Khoai-tay-1,Electrode-Box-A,7,78,147,-1.2972972972973,1.68298027757487
+Khoai-tay-1,Electrode-Box-A,8,91,132,-0.297297297297296,0.0883856829802771
+Khoai-tay-1,Electrode-Box-A,9,99,146,0.702702702702704,0.493791088385684
+Khoai-tay-1,Electrode-Box-A,10,94,143,1.7027027027027,2.89919649379109
+Khoai-tay-1,Electrode-Box-A,11,110,156,2.7027027027027,7.3046018991965
+Khoai-tay-1,Electrode-Box-A,12,105,143,3.7027027027027,13.7100073046019
+Khoai-tay-1,Electrode-Box-A,13,106,153,4.7027027027027,22.1154127100073
+Khoai-tay-1,Electrode-Box-A,14,91,152,5.7027027027027,32.5208181154127
+Khoai-tay-2,Naive,1,21,68,-7.2972972972973,53.2505478451424
+Khoai-tay-2,Naive,2,6,79,-6.2972972972973,39.6559532505478
+Khoai-tay-2,Naive,3,0,83,-5.2972972972973,28.0613586559532
+Khoai-tay-2,Naive,4,28,87,-4.2972972972973,18.4667640613586
+Khoai-tay-2,Naive,5,31,125,-3.2972972972973,10.8721694667641
+Khoai-tay-2,Naive,6,62,144,-2.2972972972973,5.27757487216946
+Khoai-tay-2,Naive,7,87,141,-1.2972972972973,1.68298027757487
+Khoai-tay-2,Naive,8,105,152,-0.297297297297296,0.0883856829802771
+Khoai-tay-2,Naive,9,75,148,0.702702702702704,0.493791088385684
+Khoai-tay-2,Naive,10,101,149,1.7027027027027,2.89919649379109
+Khoai-tay-2,Naive,11,102,154,2.7027027027027,7.3046018991965
+Khoai-tay-2,Naive,12,95,144,3.7027027027027,13.7100073046019
+Khoai-tay-2,Naive,13,77,149,4.7027027027027,22.1154127100073
+Khoai-tay-2,Naive,14,91,153,5.7027027027027,32.5208181154127
+OM-2,Naive,0,1,7,-8.2972972972973,68.845142439737
+OM-2,Naive,1,11,33,-7.2972972972973,53.2505478451424
+OM-2,Naive,2,19,62,-6.2972972972973,39.6559532505478
+OM-2,Naive,3,29,117,-5.2972972972973,28.0613586559532
+OM-2,Naive,4,73,126,-4.2972972972973,18.4667640613586
+OM-2,Naive,5,53,135,-3.2972972972973,10.8721694667641
+OM-2,Naive,6,73,138,-2.2972972972973,5.27757487216946
+OM-2,Naive,7,80,131,-1.2972972972973,1.68298027757487
+OM-2,Naive,8,91,141,-0.297297297297296,0.0883856829802771
+OM-2,Naive,9,90,135,0.702702702702704,0.493791088385684
+OM-2,Naive,10,95,142,1.7027027027027,2.89919649379109
+OM-2,Naive,11,60,133,2.7027027027027,7.3046018991965
+OM-2,Naive,12,58,142,3.7027027027027,13.7100073046019
+Root-beer-1,Electrode-Box-B2,0,11,85,-8.2972972972973,68.845142439737
+Root-beer-1,Electrode-Box-B2,1,18,76,-7.2972972972973,53.2505478451424
+Root-beer-1,Electrode-Box-B2,2,40,105,-6.2972972972973,39.6559532505478
+Root-beer-1,Electrode-Box-B2,3,55,134,-5.2972972972973,28.0613586559532
+Root-beer-1,Electrode-Box-B2,4,75,136,-4.2972972972973,18.4667640613586
+Root-beer-1,Electrode-Box-B2,5,64,133,-3.2972972972973,10.8721694667641
+Root-beer-1,Electrode-Box-B2,6,104,139,-2.2972972972973,5.27757487216946
+Root-beer-1,Electrode-Box-B2,7,98,148,-1.2972972972973,1.68298027757487
+Root-beer-1,Electrode-Box-B2,8,81,145,-0.297297297297296,0.0883856829802771
+Root-beer-1,Electrode-Box-B2,9,89,156,0.702702702702704,0.493791088385684
+Root-beer-1,Electrode-Box-B2,10,105,158,1.7027027027027,2.89919649379109
+Root-beer-2,Electrode-Box-A2,0,22,74,-8.2972972972973,68.845142439737
+Root-beer-2,Electrode-Box-A2,1,31,87,-7.2972972972973,53.2505478451424
+Root-beer-2,Electrode-Box-A2,2,49,134,-6.2972972972973,39.6559532505478
+Root-beer-2,Electrode-Box-A2,3,31,89,-5.2972972972973,28.0613586559532
+Root-beer-2,Electrode-Box-A2,4,60,140,-4.2972972972973,18.4667640613586
+Root-beer-2,Electrode-Box-A2,5,84,147,-3.2972972972973,10.8721694667641
+Vu-vuong,Naive,0,18,61,-8.2972972972973,68.845142439737
+Vu-vuong,Naive,1,35,91,-7.2972972972973,53.2505478451424
+Vu-vuong,Naive,2,61,127,-6.2972972972973,39.6559532505478
+Vu-vuong,Naive,3,34,146,-5.2972972972973,28.0613586559532
+Vu-vuong,Naive,4,61,141,-4.2972972972973,18.4667640613586
+Vu-vuong,Naive,5,37,151,-3.2972972972973,10.8721694667641
+Vu-vuong,Naive,6,49,131,-2.2972972972973,5.27757487216946
+Vu-vuong,Naive,7,65,149,-1.2972972972973,1.68298027757487
+Vu-vuong,Naive,8,67,141,-0.297297297297296,0.0883856829802771
+Vu-vuong,Naive,9,73,140,0.702702702702704,0.493791088385684
+Vu-vuong,Naive,10,72,131,1.7027027027027,2.89919649379109
+Vu-vuong,Naive,11,89,158,2.7027027027027,7.3046018991965
+Vu-vuong,Naive,12,97,154,3.7027027027027,13.7100073046019
+Vu-vuong,Naive,13,93,145,4.7027027027027,22.1154127100073
+Vu-vuong,Naive,14,75,147,5.7027027027027,32.5208181154127
+Vu-vuong,Naive,15,68,142,6.7027027027027,44.9262235208181
+Vu-vuong,Naive,16,96,162,7.7027027027027,59.3316289262235
+Vu-vuong,Naive,17,68,144,8.7027027027027,75.7370343316289
+Vu-vuong,Naive,18,81,134,9.7027027027027,94.1424397370344
+Vu-vuong,Naive,19,66,144,10.7027027027027,114.54784514244
+Vu-vuong,Naive,20,84,127,11.7027027027027,136.953250547845
+Vu-vuong,Naive,21,66,133,12.7027027027027,161.358655953251
diff --git a/analysis/matlab/results/lme_mergeA2_d0_10.txt b/analysis/matlab/results/lme_mergeA2_d0_10.txt
new file mode 100644
index 0000000..209c1ed
--- /dev/null
+++ b/analysis/matlab/results/lme_mergeA2_d0_10.txt
@@ -0,0 +1,70 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeA2_d0_10
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 8 subjects, 83 sessions
+day coverage: Box-B2 0..10, Box-A2 0..10
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 83
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 673.84 688.35 -330.92 661.84
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 15.599 3.7298 4.1822 79 7.4136e-05
+ {'day' } 8.3258 0.66962 12.434 79 2.7592e-20
+ {'tDCS' } 4.1737 5.2381 0.79679 79 0.42796
+ {'day:tDCS' } 1.3833 0.9137 1.514 79 0.13402
+
+
+ Lower Upper
+ 8.175 23.023
+ 6.9929 9.6586
+ -6.2525 14.6
+ -0.43535 3.202
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0
+
+
+ Lower Upper
+ NaN NaN
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 13.04 11.2 15.183
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(79)= 1.51 F(1)= 2.292 p=0.134
+days (learning) t(79)= 12.43 F(1)= 154.593 p=2.759e-20
+tDCS (main, at Day 1) t(79)= 0.80 F(1)= 0.635 p=0.428
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.1340, slope diff=1.38) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=2.8e-20) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): n.s. (p=0.4280) -> the groups are comparable (as in the paper) on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_mergeA2_d0_13.txt b/analysis/matlab/results/lme_mergeA2_d0_13.txt
new file mode 100644
index 0000000..9eeca59
--- /dev/null
+++ b/analysis/matlab/results/lme_mergeA2_d0_13.txt
@@ -0,0 +1,70 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeA2_d0_13
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 8 subjects, 98 sessions
+day coverage: Box-B2 0..13, Box-A2 0..13
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 98
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 809.08 824.59 -398.54 797.08
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 19.458 3.7166 5.2352 94 1.0011e-06
+ {'day' } 7.1842 0.54693 13.135 94 5.4028e-23
+ {'tDCS' } 5.841 5.1946 1.1244 94 0.26369
+ {'day:tDCS' } 1.0024 0.73807 1.3581 94 0.17769
+
+
+ Lower Upper
+ 12.078 26.837
+ 6.0982 8.2701
+ -4.473 16.155
+ -0.4631 2.4678
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0
+
+
+ Lower Upper
+ NaN NaN
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 14.123 12.278 16.245
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(94)= 1.36 F(1)= 1.844 p=0.1777
+days (learning) t(94)= 13.14 F(1)= 172.537 p=5.403e-23
+tDCS (main, at Day 1) t(94)= 1.12 F(1)= 1.264 p=0.2637
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.1777, slope diff=1.00) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=5.4e-23) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): n.s. (p=0.2637) -> the groups are comparable (as in the paper) on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_mergeA2_full.txt b/analysis/matlab/results/lme_mergeA2_full.txt
new file mode 100644
index 0000000..120a120
--- /dev/null
+++ b/analysis/matlab/results/lme_mergeA2_full.txt
@@ -0,0 +1,73 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeA2_full
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 8 subjects, 109 sessions
+day coverage: Box-B2 0..22, Box-A2 0..14
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+** WARNING: the groups' day coverage is UNEQUAL (differ by 8 days). The
+ interaction/slope over this window EXTRAPOLATES the shorter group's line and is
+ CONFOUNDED -- prefer the _d0_14 window (both groups have data throughout). **
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 109
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 962.68 978.83 -475.34 950.68
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 20.701 4.9127 4.2138 105 5.3256e-05
+ {'day' } 6.8599 0.69872 9.8178 105 1.5726e-16
+ {'tDCS' } 22.092 6.4372 3.4319 105 0.00085848
+ {'day:tDCS' } -2.1793 0.81821 -2.6635 105 0.0089525
+
+
+ Lower Upper
+ 10.96 30.442
+ 5.4745 8.2453
+ 9.3279 34.855
+ -3.8016 -0.55692
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 2.1043e-15
+
+
+ Lower Upper
+ NaN NaN
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 18.954 16.597 21.644
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(105)= -2.66 F(1)= 7.094 p=0.008953
+days (learning) t(105)= 9.82 F(1)= 96.388 p=1.573e-16
+tDCS (main, at Day 1) t(105)= 3.43 F(1)= 11.778 p=0.0008585
+
+INTERPRETATION
+ - days x tDCS interaction: SIGNIFICANT (p=0.0090, slope diff=-2.18) -> the tDCS (Box-B2) group improves SLOWER -- groups CONVERGE (Box-B2 is ahead early, the gap narrows).
+ - days (learning): SIGNIFICANT (p=1.6e-16) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): SIGNIFICANT (p=0.0009) -> the groups already DIFFER on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_mergeB2_d0_10.txt b/analysis/matlab/results/lme_mergeB2_d0_10.txt
new file mode 100644
index 0000000..b7971b8
--- /dev/null
+++ b/analysis/matlab/results/lme_mergeB2_d0_10.txt
@@ -0,0 +1,70 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeB2_d0_10
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 8 subjects, 83 sessions
+day coverage: Box-B2 0..10, Box-A2 0..10
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 83
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 669.06 683.57 -328.53 657.06
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 17.318 5.1725 3.348 79 0.0012488
+ {'day' } 7.9975 0.75795 10.551 79 9.547e-17
+ {'tDCS' } 0.42782 6.5088 0.06573 79 0.94776
+ {'day:tDCS' } 1.7407 0.91342 1.9057 79 0.060324
+
+
+ Lower Upper
+ 7.0221 27.613
+ 6.4888 9.5061
+ -12.528 13.383
+ -0.07739 3.5588
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.7075
+
+
+ Lower Upper
+ 2.7829 11.705
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 11.955 10.184 14.034
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(79)= 1.91 F(1)= 3.632 p=0.06032
+days (learning) t(79)= 10.55 F(1)= 111.334 p=9.547e-17
+tDCS (main, at Day 1) t(79)= 0.07 F(1)= 0.004 p=0.9478
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.0603, slope diff=1.74) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=9.5e-17) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): n.s. (p=0.9478) -> the groups are comparable (as in the paper) on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_mergeB2_d0_13.txt b/analysis/matlab/results/lme_mergeB2_d0_13.txt
new file mode 100644
index 0000000..29be387
--- /dev/null
+++ b/analysis/matlab/results/lme_mergeB2_d0_13.txt
@@ -0,0 +1,70 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeB2_d0_13
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 8 subjects, 98 sessions
+day coverage: Box-B2 0..13, Box-A2 0..13
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 98
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 803.97 819.48 -395.99 791.97
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 21.528 5.1581 4.1736 94 6.6907e-05
+ {'day' } 6.6603 0.67208 9.91 94 2.855e-16
+ {'tDCS' } 1.8428 6.4496 0.28572 94 0.77572
+ {'day:tDCS' } 1.5375 0.78742 1.9525 94 0.053848
+
+
+ Lower Upper
+ 11.286 31.769
+ 5.3259 7.9948
+ -10.963 14.649
+ -0.025966 3.1009
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.4251
+
+
+ Lower Upper
+ 2.6045 11.3
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 13.148 11.362 15.215
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(94)= 1.95 F(1)= 3.812 p=0.05385
+days (learning) t(94)= 9.91 F(1)= 98.208 p=2.855e-16
+tDCS (main, at Day 1) t(94)= 0.29 F(1)= 0.082 p=0.7757
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.0538, slope diff=1.54) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=2.9e-16) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): n.s. (p=0.7757) -> the groups are comparable (as in the paper) on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_mergeB2_full.txt b/analysis/matlab/results/lme_mergeB2_full.txt
new file mode 100644
index 0000000..be7ca25
--- /dev/null
+++ b/analysis/matlab/results/lme_mergeB2_full.txt
@@ -0,0 +1,73 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeB2_full
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 8 subjects, 109 sessions
+day coverage: Box-B2 0..22, Box-A2 0..13
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+** WARNING: the groups' day coverage is UNEQUAL (differ by 9 days). The
+ interaction/slope over this window EXTRAPOLATES the shorter group's line and is
+ CONFOUNDED -- prefer the _d0_13 window (both groups have data throughout). **
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 109
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 967.24 983.39 -477.62 955.24
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 21.7 5.9981 3.6178 105 0.00045861
+ {'day' } 6.4863 0.9412 6.8916 105 4.2336e-10
+ {'tDCS' } 17.493 7.1288 2.4538 105 0.015779
+ {'day:tDCS' } -1.4651 1.025 -1.4294 105 0.15586
+
+
+ Lower Upper
+ 9.8069 33.593
+ 4.6201 8.3526
+ 3.3578 31.628
+ -3.4974 0.56726
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 2.1487e-15
+
+
+ Lower Upper
+ NaN NaN
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 19.354 16.948 22.101
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(105)= -1.43 F(1)= 2.043 p=0.1559
+days (learning) t(105)= 6.89 F(1)= 47.494 p=4.234e-10
+tDCS (main, at Day 1) t(105)= 2.45 F(1)= 6.021 p=0.01578
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.1559, slope diff=-1.47) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=4.2e-10) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): SIGNIFICANT (p=0.0158) -> the groups already DIFFER on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_unmerged_d0_10.txt b/analysis/matlab/results/lme_unmerged_d0_10.txt
new file mode 100644
index 0000000..87e83fc
--- /dev/null
+++ b/analysis/matlab/results/lme_unmerged_d0_10.txt
@@ -0,0 +1,70 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_unmerged_d0_10
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 6 subjects, 61 sessions
+day coverage: Box-B2 0..10, Box-A2 0..10
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 61
+ Fixed effects coefficients 4
+ Random effects coefficients 6
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 499.59 512.25 -243.79 487.59
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 17.372 5.1906 3.3469 57 0.0014518
+ {'day' } 7.9666 0.79053 10.077 57 2.8317e-14
+ {'tDCS' } 4.9763 7.2862 0.68298 57 0.49739
+ {'day:tDCS' } 1.5577 1.0483 1.4858 57 0.14283
+
+
+ Lower Upper
+ 6.9783 27.766
+ 6.3836 9.5496
+ -9.614 19.567
+ -0.5416 3.6569
+
+Random effects covariance parameters (95% CIs):
+Group: subject (6 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.3536
+
+
+ Lower Upper
+ 2.1542 13.305
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 12.508 10.37 15.086
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(57)= 1.49 F(1)= 2.208 p=0.1428
+days (learning) t(57)= 10.08 F(1)= 101.556 p=2.832e-14
+tDCS (main, at Day 1) t(57)= 0.68 F(1)= 0.466 p=0.4974
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.1428, slope diff=1.56) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=2.8e-14) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): n.s. (p=0.4974) -> the groups are comparable (as in the paper) on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_unmerged_d0_13.txt b/analysis/matlab/results/lme_unmerged_d0_13.txt
new file mode 100644
index 0000000..324970d
--- /dev/null
+++ b/analysis/matlab/results/lme_unmerged_d0_13.txt
@@ -0,0 +1,70 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_unmerged_d0_13
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 6 subjects, 70 sessions
+day coverage: Box-B2 0..13, Box-A2 0..13
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 70
+ Fixed effects coefficients 4
+ Random effects coefficients 6
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 586.72 600.22 -287.36 574.72
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 21.7 4.5484 4.7709 66 1.0537e-05
+ {'day' } 6.4863 0.71372 9.0881 66 3.0346e-13
+ {'tDCS' } 6.0226 6.3135 0.95392 66 0.3436
+ {'day:tDCS' } 1.5467 0.93755 1.6497 66 0.10376
+
+
+ Lower Upper
+ 12.619 30.781
+ 5.0614 7.9113
+ -6.5827 18.628
+ -0.32523 3.4185
+
+Random effects covariance parameters (95% CIs):
+Group: subject (6 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0
+
+
+ Lower Upper
+ NaN NaN
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 14.676 12.436 17.32
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(66)= 1.65 F(1)= 2.721 p=0.1038
+days (learning) t(66)= 9.09 F(1)= 82.593 p=3.035e-13
+tDCS (main, at Day 1) t(66)= 0.95 F(1)= 0.910 p=0.3436
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.1038, slope diff=1.55) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=3e-13) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): n.s. (p=0.3436) -> the groups are comparable (as in the paper) on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/lme_unmerged_full.txt b/analysis/matlab/results/lme_unmerged_full.txt
new file mode 100644
index 0000000..a6f2630
--- /dev/null
+++ b/analysis/matlab/results/lme_unmerged_full.txt
@@ -0,0 +1,70 @@
+==============================================================================
+LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_unmerged_full
+==============================================================================
+model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
+N = 6 subjects, 71 sessions
+day coverage: Box-B2 0..14, Box-A2 0..13
+(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
+ main effect below is the group difference on Day 1 -- comparable to the paper.)
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 71
+ Fixed effects coefficients 4
+ Random effects coefficients 6
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + day*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 596.33 609.9 -292.16 584.33
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 21.53 5.5382 3.8874 67 0.00023506
+ {'day' } 6.6587 0.72367 9.2014 67 1.6706e-13
+ {'tDCS' } 8.0204 7.6977 1.0419 67 0.3012
+ {'day:tDCS' } 0.93747 0.9187 1.0204 67 0.3112
+
+
+ Lower Upper
+ 10.475 32.584
+ 5.2143 8.1032
+ -7.3444 23.385
+ -0.89627 2.7712
+
+Random effects covariance parameters (95% CIs):
+Group: subject (6 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.7931
+
+
+ Lower Upper
+ 2.4723 13.574
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 14.163 11.93 16.813
+
+
+effect t (df) F (df1) p
+----------------------------------------------------------------------
+days x tDCS (interaction) t(67)= 1.02 F(1)= 1.041 p=0.3112
+days (learning) t(67)= 9.20 F(1)= 84.665 p=1.671e-13
+tDCS (main, at Day 1) t(67)= 1.04 F(1)= 1.086 p=0.3012
+
+INTERPRETATION
+ - days x tDCS interaction: n.s. (p=0.3112, slope diff=0.94) -> slopes are parallel (no differential change over training).
+ - days (learning): SIGNIFICANT (p=1.7e-13) -> performance improves with training.
+ - tDCS main effect on Day 1 (our day 0): n.s. (p=0.3012) -> the groups are comparable (as in the paper) on Day 1.
+
+Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
+ days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
+ (Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
diff --git a/analysis/matlab/results/mergeA2_d0_10.txt b/analysis/matlab/results/mergeA2_d0_10.txt
new file mode 100644
index 0000000..9a76f7e
--- /dev/null
+++ b/analysis/matlab/results/mergeA2_d0_10.txt
@@ -0,0 +1,199 @@
+==============================================================================
+tDCS GLM report -- scenario: mergeA2_d0_10
+==============================================================================
+merge key: mergeA2 day window: 0..10 observations: 126
+==============================================================================
+DESCRIPTIVES
+==============================================================================
+group n_subj n_sessions mean_success mean_rate max_day
+--------------------------------------------------------------------------
+Electrode-Box-B2 4 44 68.3 0.541 10
+Electrode-Box-A2 4 39 54.0 0.452 10
+Naive 4 43 46.8 0.440 10
+
+==============================================================================
+(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 126
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 297.29 314.31 -142.65 285.29
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 4.2656 0.092258 46.236 121
+ {'group_Electrode-Box-A2'} -0.12664 0.12996 -0.97447 121
+ {'group_Naive' } -0.41983 0.12988 -3.2324 121
+ {'day_c' } 0.20187 0.0052718 38.293 121
+ {'day_c2' } -0.024068 0.0015714 -15.317 121
+
+
+ pValue Lower Upper
+ 9.3543e-79 4.083 4.4483
+ 0.33177 -0.38392 0.13065
+ 0.0015818 -0.67696 -0.1627
+ 1.7547e-69 0.19144 0.21231
+ 4.2028e-30 -0.027179 -0.020957
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.17893
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 124
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Binomial
+ Link Logit
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 363.74 380.67 -175.87 351.74
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 0.15282 0.1244 1.2285 119
+ {'group_Electrode-Box-A2'} -0.28467 0.17474 -1.6291 119
+ {'group_Naive' } -0.57945 0.17473 -3.3162 119
+ {'day_c' } 0.21677 0.0069268 31.294 119
+ {'day_c2' } -0.013732 0.0021989 -6.2451 119
+
+
+ pValue Lower Upper
+ 0.22169 -0.0935 0.39915
+ 0.10595 -0.63068 0.061343
+ 0.0012101 -0.92543 -0.23346
+ 2.8838e-59 0.20305 0.23048
+ 6.7844e-09 -0.018086 -0.0093781
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.23963
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 126
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + day_c2 + group*day_c + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 304.66 327.35 -144.33 288.66
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.2968 0.091824 46.794
+ {'group_Electrode-Box-A2' } -0.15174 0.12947 -1.172
+ {'group_Naive' } -0.50686 0.13029 -3.8902
+ {'day_c' } 0.18436 0.0072535 25.417
+ {'day_c2' } -0.024459 0.001577 -15.509
+ {'group_Electrode-Box-A2:day_c'} 0.014228 0.010876 1.3082
+ {'group_Naive:day_c' } 0.051203 0.011091 4.6167
+
+
+ DF pValue Lower Upper
+ 119 1.7772e-78 4.115 4.4786
+ 119 0.24354 -0.4081 0.10462
+ 119 0.00016554 -0.76486 -0.24887
+ 119 6.5517e-50 0.17 0.19872
+ 119 2.3835e-30 -0.027581 -0.021336
+ 119 0.19332 -0.0073071 0.035763
+ 119 9.9271e-06 0.029242 0.073164
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.17742
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
+Per-subject OLS slope of success vs day: Box-B2 mean=9.71, Box-A2 mean=9.18
+ Welch two-sided p=0.556, Mann-Whitney p=0.686 (nB=4, nA=4) -> parallel learning (no slope difference detected)
+(Reference only: the GLMM group x day_c joint F-test gives p=0.0001, but with just
+ observation-level DF (df2=119) it is ANTICONSERVATIVE for this few-subject design and is
+ NOT the basis for the conclusion above.)
+
+==============================================================================
+INTERPRETATION
+==============================================================================
+Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
+Python reference's population-average GEE -- directions/magnitudes should agree,
+exact ratios and p-values will differ.
+
+Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
+ [count/level] Box-B2 = 1.14x Box-A2 (one-sided p=0.1649) -> not supported
+ [rate/level ] Box-B2 = 1.33x Box-A2 (one-sided p=0.0517) -> not supported
+
+Per-animal (Box-B2 n=4 vs Box-A2 n=4), pure stats (no GLME):
+ count (per-subject mean success): Welch two-sided p=0.0230, Mann-Whitney one-sided (B2>A2) p=0.0143
+ rate (per-subject pooled success/total): Welch two-sided p=0.0689, Mann-Whitney one-sided (B2>A2) p=0.0571
+
+(No unknown groups -- they were merged into the anchors; only the H2 anchor
+contrast applies.)
+
+==============================================================================
+CAVEATS
+==============================================================================
+ - Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
+ depending on merge), and -- in unmerged scenarios -- each unknown condition
+ (Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
+ comparison here as preliminary.
+ - Single-subject classification: for a 1-subject unknown, 'matches anchor X'
+ means 'not statistically distinguishable from X', NOT proof of equivalence;
+ inference with a single subject in a group is fragile.
+ - Count vs rate: 'success' alone is a raw count; the rate model
+ (success/attempts) is the fairer accuracy comparison when attempt counts differ
+ between groups.
diff --git a/analysis/matlab/results/mergeA2_full.txt b/analysis/matlab/results/mergeA2_full.txt
new file mode 100644
index 0000000..5eafbc4
--- /dev/null
+++ b/analysis/matlab/results/mergeA2_full.txt
@@ -0,0 +1,199 @@
+==============================================================================
+tDCS GLM report -- scenario: mergeA2_full
+==============================================================================
+merge key: mergeA2 day window: 0..26 observations: 185
+==============================================================================
+DESCRIPTIVES
+==============================================================================
+group n_subj n_sessions mean_success mean_rate max_day
+--------------------------------------------------------------------------
+Electrode-Box-B2 4 63 80.2 0.605 22
+Electrode-Box-A2 4 46 60.4 0.484 14
+Naive 4 76 59.6 0.492 26
+
+==============================================================================
+(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 564.95 584.27 -276.47 552.95
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 4.5232 0.058089 77.867 180
+ {'group_Electrode-Box-A2'} -0.1219 0.083374 -1.4621 180
+ {'group_Naive' } -0.36897 0.082023 -4.4984 180
+ {'day_c' } 0.10078 0.002307 43.684 180
+ {'day_c2' } -0.0064744 0.00024857 -26.047 180
+
+
+ pValue Lower Upper
+ 1.4699e-140 4.4086 4.6379
+ 0.14547 -0.28641 0.042619
+ 1.2247e-05 -0.53082 -0.20712
+ 9.6816e-98 0.096227 0.10533
+ 5.8173e-63 -0.0069649 -0.0059839
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.11179
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 183
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Binomial
+ Link Logit
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 661.66 680.91 -324.83 649.66
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 0.62325 0.10794 5.7739 178
+ {'group_Electrode-Box-A2'} -0.33496 0.15306 -2.1884 178
+ {'group_Naive' } -0.64512 0.15201 -4.2441 178
+ {'day_c' } 0.12541 0.0034219 36.649 178
+ {'day_c2' } -0.0069611 0.00035344 -19.695 178
+
+
+ pValue Lower Upper
+ 3.3843e-08 0.41024 0.83626
+ 0.029941 -0.63701 -0.032914
+ 3.5275e-05 -0.94509 -0.34516
+ 7.5329e-85 0.11866 0.13216
+ 1.4145e-46 -0.0076585 -0.0062636
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.20951
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + day_c2 + group*day_c + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 557.88 583.64 -270.94 541.88
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.5419 0.060057 75.626
+ {'group_Electrode-Box-A2' } -0.13686 0.086298 -1.5859
+ {'group_Naive' } -0.41002 0.085075 -4.8196
+ {'day_c' } 0.090967 0.0032463 28.021
+ {'day_c2' } -0.0068957 0.0002769 -24.904
+ {'group_Electrode-Box-A2:day_c'} 0.0071293 0.0064228 1.11
+ {'group_Naive:day_c' } 0.023329 0.0043517 5.3609
+
+
+ DF pValue Lower Upper
+ 178 3.0366e-137 4.4233 4.6604
+ 178 0.11453 -0.30716 0.033436
+ 178 3.0699e-06 -0.57791 -0.24214
+ 178 3.6033e-67 0.084561 0.097373
+ 178 6.7558e-60 -0.0074422 -0.0063493
+ 178 0.2685 -0.0055454 0.019804
+ 178 2.5437e-07 0.014742 0.031917
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.11568
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
+Per-subject OLS slope of success vs day: Box-B2 mean=6.92, Box-A2 mean=7.95
+ Welch two-sided p=0.531, Mann-Whitney p=0.886 (nB=4, nA=4) -> parallel learning (no slope difference detected)
+(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
+ observation-level DF (df2=178) it is ANTICONSERVATIVE for this few-subject design and is
+ NOT the basis for the conclusion above.)
+
+==============================================================================
+INTERPRETATION
+==============================================================================
+Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
+Python reference's population-average GEE -- directions/magnitudes should agree,
+exact ratios and p-values will differ.
+
+Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
+ [count/level] Box-B2 = 1.13x Box-A2 (one-sided p=0.0719) -> not supported
+ [rate/level ] Box-B2 = 1.40x Box-A2 (one-sided p=0.0143) -> SUPPORTED
+
+Per-animal (Box-B2 n=4 vs Box-A2 n=4), pure stats (no GLME):
+ count (per-subject mean success): Welch two-sided p=0.0348, Mann-Whitney one-sided (B2>A2) p=0.0286
+ rate (per-subject pooled success/total): Welch two-sided p=0.0555, Mann-Whitney one-sided (B2>A2) p=0.0286
+
+(No unknown groups -- they were merged into the anchors; only the H2 anchor
+contrast applies.)
+
+==============================================================================
+CAVEATS
+==============================================================================
+ - Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
+ depending on merge), and -- in unmerged scenarios -- each unknown condition
+ (Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
+ comparison here as preliminary.
+ - Single-subject classification: for a 1-subject unknown, 'matches anchor X'
+ means 'not statistically distinguishable from X', NOT proof of equivalence;
+ inference with a single subject in a group is fragile.
+ - Count vs rate: 'success' alone is a raw count; the rate model
+ (success/attempts) is the fairer accuracy comparison when attempt counts differ
+ between groups.
diff --git a/analysis/matlab/results/mergeB2_d0_10.txt b/analysis/matlab/results/mergeB2_d0_10.txt
new file mode 100644
index 0000000..872247e
--- /dev/null
+++ b/analysis/matlab/results/mergeB2_d0_10.txt
@@ -0,0 +1,199 @@
+==============================================================================
+tDCS GLM report -- scenario: mergeB2_d0_10
+==============================================================================
+merge key: mergeB2 day window: 0..10 observations: 126
+==============================================================================
+DESCRIPTIVES
+==============================================================================
+group n_subj n_sessions mean_success mean_rate max_day
+--------------------------------------------------------------------------
+Electrode-Box-B2 5 55 66.4 0.533 10
+Electrode-Box-A2 3 28 52.1 0.433 10
+Naive 4 43 46.8 0.440 10
+
+==============================================================================
+(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 126
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 297.84 314.85 -142.92 285.84
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 4.2369 0.08452 50.129 121
+ {'group_Electrode-Box-A2'} -0.091837 0.13759 -0.66748 121
+ {'group_Naive' } -0.39133 0.12596 -3.1068 121
+ {'day_c' } 0.2019 0.0052735 38.287 121
+ {'day_c2' } -0.024069 0.0015714 -15.317 121
+
+
+ pValue Lower Upper
+ 8.553e-83 4.0696 4.4042
+ 0.50574 -0.36423 0.18055
+ 0.0023571 -0.64071 -0.14196
+ 1.787e-69 0.19146 0.21235
+ 4.1977e-30 -0.02718 -0.020958
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.18296
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 124
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Binomial
+ Link Logit
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 364.15 381.07 -176.07 352.15
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 0.11026 0.11374 0.96938 119
+ {'group_Electrode-Box-A2'} -0.26616 0.18448 -1.4427 119
+ {'group_Naive' } -0.53698 0.16912 -3.1751 119
+ {'day_c' } 0.21673 0.0069278 31.283 119
+ {'day_c2' } -0.013726 0.0021988 -6.2424 119
+
+
+ pValue Lower Upper
+ 0.33432 -0.11496 0.33548
+ 0.15172 -0.63144 0.09913
+ 0.0019073 -0.87186 -0.2021
+ 2.9856e-59 0.20301 0.23044
+ 6.8729e-09 -0.01808 -0.009372
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.24468
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 126
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + day_c2 + group*day_c + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 304.98 327.67 -144.49 288.98
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.2592 0.082682 51.513
+ {'group_Electrode-Box-A2' } -0.10296 0.13455 -0.76522
+ {'group_Naive' } -0.46886 0.1243 -3.7722
+ {'day_c' } 0.1907 0.0067258 28.354
+ {'day_c2' } -0.02454 0.0015791 -15.541
+ {'group_Electrode-Box-A2:day_c'} -0.0023862 0.012062 -0.19783
+ {'group_Naive:day_c' } 0.045036 0.010729 4.1975
+
+
+ DF pValue Lower Upper
+ 119 3.2785e-83 4.0955 4.423
+ 119 0.44566 -0.36937 0.16346
+ 119 0.00025365 -0.71498 -0.22275
+ 119 9.114e-55 0.17738 0.20402
+ 119 2.0273e-30 -0.027667 -0.021413
+ 119 0.84352 -0.02627 0.021498
+ 119 5.2317e-05 0.023791 0.066281
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.17816
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
+Per-subject OLS slope of success vs day: Box-B2 mean=9.74, Box-A2 mean=8.96
+ Welch two-sided p=0.517, Mann-Whitney p=0.571 (nB=5, nA=3) -> parallel learning (no slope difference detected)
+(Reference only: the GLMM group x day_c joint F-test gives p=0.0001, but with just
+ observation-level DF (df2=119) it is ANTICONSERVATIVE for this few-subject design and is
+ NOT the basis for the conclusion above.)
+
+==============================================================================
+INTERPRETATION
+==============================================================================
+Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
+Python reference's population-average GEE -- directions/magnitudes should agree,
+exact ratios and p-values will differ.
+
+Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
+ [count/level] Box-B2 = 1.10x Box-A2 (one-sided p=0.2522) -> not supported
+ [rate/level ] Box-B2 = 1.30x Box-A2 (one-sided p=0.0745) -> not supported
+
+Per-animal (Box-B2 n=5 vs Box-A2 n=3), pure stats (no GLME):
+ count (per-subject mean success): Welch two-sided p=0.0228, Mann-Whitney one-sided (B2>A2) p=0.0179
+ rate (per-subject pooled success/total): Welch two-sided p=0.0943, Mann-Whitney one-sided (B2>A2) p=0.0714
+
+(No unknown groups -- they were merged into the anchors; only the H2 anchor
+contrast applies.)
+
+==============================================================================
+CAVEATS
+==============================================================================
+ - Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
+ depending on merge), and -- in unmerged scenarios -- each unknown condition
+ (Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
+ comparison here as preliminary.
+ - Single-subject classification: for a 1-subject unknown, 'matches anchor X'
+ means 'not statistically distinguishable from X', NOT proof of equivalence;
+ inference with a single subject in a group is fragile.
+ - Count vs rate: 'success' alone is a raw count; the rate model
+ (success/attempts) is the fairer accuracy comparison when attempt counts differ
+ between groups.
diff --git a/analysis/matlab/results/mergeB2_full.txt b/analysis/matlab/results/mergeB2_full.txt
new file mode 100644
index 0000000..753a25c
--- /dev/null
+++ b/analysis/matlab/results/mergeB2_full.txt
@@ -0,0 +1,199 @@
+==============================================================================
+tDCS GLM report -- scenario: mergeB2_full
+==============================================================================
+merge key: mergeB2 day window: 0..26 observations: 185
+==============================================================================
+DESCRIPTIVES
+==============================================================================
+group n_subj n_sessions mean_success mean_rate max_day
+--------------------------------------------------------------------------
+Electrode-Box-B2 5 78 78.4 0.596 22
+Electrode-Box-A2 3 31 55.4 0.448 13
+Naive 4 76 59.6 0.492 26
+
+==============================================================================
+(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 565.84 585.16 -276.92 553.84
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 4.4986 0.054066 83.206 180
+ {'group_Electrode-Box-A2'} -0.096187 0.09052 -1.0626 180
+ {'group_Naive' } -0.34448 0.080981 -4.2538 180
+ {'day_c' } 0.10082 0.0023113 43.621 180
+ {'day_c2' } -0.00647 0.00024877 -26.008 180
+
+
+ pValue Lower Upper
+ 1.3263e-145 4.3919 4.6053
+ 0.28939 -0.2748 0.08243
+ 3.3739e-05 -0.50427 -0.18468
+ 1.2306e-97 0.096261 0.10538
+ 7.2052e-63 -0.0069609 -0.0059791
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.1166
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 183
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Binomial
+ Link Logit
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 661.88 681.14 -324.94 649.88
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 0.57975 0.098046 5.913 178
+ {'group_Electrode-Box-A2'} -0.33262 0.16122 -2.0631 178
+ {'group_Naive' } -0.60174 0.14641 -4.1098 178
+ {'day_c' } 0.12534 0.0034238 36.607 178
+ {'day_c2' } -0.0069519 0.00035349 -19.666 178
+
+
+ pValue Lower Upper
+ 1.6792e-08 0.38627 0.77323
+ 0.040554 -0.65077 -0.014466
+ 6.0348e-05 -0.89067 -0.31281
+ 9.0274e-85 0.11858 0.13209
+ 1.6927e-46 -0.0076494 -0.0062543
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.21289
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + day_c2 + group*day_c + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 560.22 585.99 -272.11 544.22
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.516 0.055699 81.079
+ {'group_Electrode-Box-A2' } -0.11558 0.094376 -1.2247
+ {'group_Naive' } -0.38342 0.083677 -4.5821
+ {'day_c' } 0.092386 0.0030001 30.794
+ {'day_c2' } -0.006943 0.00027446 -25.297
+ {'group_Electrode-Box-A2:day_c'} 0.0036285 0.0081693 0.44417
+ {'group_Naive:day_c' } 0.022361 0.0042611 5.2476
+
+
+ DF pValue Lower Upper
+ 178 1.781e-142 4.4061 4.6259
+ 178 0.22231 -0.30182 0.070658
+ 178 8.6367e-06 -0.54854 -0.21829
+ 178 3.1867e-73 0.086466 0.098307
+ 178 7.6668e-61 -0.0074846 -0.0064014
+ 178 0.65746 -0.012493 0.01975
+ 178 4.3478e-07 0.013952 0.03077
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.12017
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
+Per-subject OLS slope of success vs day: Box-B2 mean=6.98, Box-A2 mean=8.19
+ Welch two-sided p=0.508, Mann-Whitney p=0.786 (nB=5, nA=3) -> parallel learning (no slope difference detected)
+(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
+ observation-level DF (df2=178) it is ANTICONSERVATIVE for this few-subject design and is
+ NOT the basis for the conclusion above.)
+
+==============================================================================
+INTERPRETATION
+==============================================================================
+Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
+Python reference's population-average GEE -- directions/magnitudes should agree,
+exact ratios and p-values will differ.
+
+Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
+ [count/level] Box-B2 = 1.10x Box-A2 (one-sided p=0.1440) -> not supported
+ [rate/level ] Box-B2 = 1.39x Box-A2 (one-sided p=0.0196) -> SUPPORTED
+
+Per-animal (Box-B2 n=5 vs Box-A2 n=3), pure stats (no GLME):
+ count (per-subject mean success): Welch two-sided p=0.0204, Mann-Whitney one-sided (B2>A2) p=0.0179
+ rate (per-subject pooled success/total): Welch two-sided p=0.0440, Mann-Whitney one-sided (B2>A2) p=0.0179
+
+(No unknown groups -- they were merged into the anchors; only the H2 anchor
+contrast applies.)
+
+==============================================================================
+CAVEATS
+==============================================================================
+ - Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
+ depending on merge), and -- in unmerged scenarios -- each unknown condition
+ (Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
+ comparison here as preliminary.
+ - Single-subject classification: for a 1-subject unknown, 'matches anchor X'
+ means 'not statistically distinguishable from X', NOT proof of equivalence;
+ inference with a single subject in a group is fragile.
+ - Count vs rate: 'success' alone is a raw count; the rate model
+ (success/attempts) is the fairer accuracy comparison when attempt counts differ
+ between groups.
diff --git a/analysis/matlab/results/mergeNaive_full.txt b/analysis/matlab/results/mergeNaive_full.txt
new file mode 100644
index 0000000..bd7ad09
--- /dev/null
+++ b/analysis/matlab/results/mergeNaive_full.txt
@@ -0,0 +1,199 @@
+==============================================================================
+tDCS GLM report -- scenario: mergeNaive_full
+==============================================================================
+merge key: mergeNaive day window: 0..26 observations: 185
+==============================================================================
+DESCRIPTIVES
+==============================================================================
+group n_subj n_sessions mean_success mean_rate max_day
+--------------------------------------------------------------------------
+Electrode-Box-B2 4 63 80.2 0.605 22
+Electrode-Box-A 1 15 70.7 0.557 14
+Electrode-Box-A2 7 107 58.4 0.479 26
+
+==============================================================================
+(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 569.28 588.6 -278.64 557.28
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.5235 0.074032 61.102
+ {'group_Electrode-Box-A' } -0.12346 0.16529 -0.74694
+ {'group_Electrode-Box-A2'} -0.26481 0.093039 -2.8462
+ {'day_c' } 0.10065 0.0023081 43.608
+ {'day_c2' } -0.0064638 0.00024915 -25.944
+
+
+ DF pValue Lower Upper
+ 180 2.6809e-122 4.3774 4.6696
+ 180 0.45607 -0.44962 0.2027
+ 180 0.0049387 -0.44839 -0.081217
+ 180 1.2924e-97 0.096096 0.10521
+ 180 1.0244e-62 -0.0069555 -0.0059722
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.14464
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 183
+ Fixed effects coefficients 5
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Binomial
+ Link Logit
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 663.16 682.41 -325.58 651.16
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 0.62291 0.11692 5.3275
+ {'group_Electrode-Box-A' } -0.21631 0.26048 -0.83042
+ {'group_Electrode-Box-A2'} -0.5314 0.14632 -3.6318
+ {'day_c' } 0.12505 0.003415 36.618
+ {'day_c2' } -0.0069489 0.00035361 -19.651
+
+
+ DF pValue Lower Upper
+ 178 2.981e-07 0.39218 0.85365
+ 178 0.40742 -0.73034 0.29772
+ 178 0.00036793 -0.82014 -0.24265
+ 178 8.6013e-85 0.11831 0.13179
+ 178 1.8602e-46 -0.0076467 -0.0062511
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.22797
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + day_c2 + group*day_c + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 561.97 587.73 -272.98 545.97
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.5372 0.083001 54.664
+ {'group_Electrode-Box-A' } -0.13394 0.18535 -0.72264
+ {'group_Electrode-Box-A2' } -0.27771 0.10424 -2.6641
+ {'day_c' } 0.090249 0.0032246 27.988
+ {'day_c2' } -0.0066704 0.00025769 -25.885
+ {'group_Electrode-Box-A:day_c' } 0.010369 0.0086089 1.2044
+ {'group_Electrode-Box-A2:day_c'} 0.020125 0.0041158 4.8897
+
+
+ DF pValue Lower Upper
+ 178 3.3741e-113 4.3734 4.701
+ 178 0.47085 -0.4997 0.23182
+ 178 0.0084289 -0.48341 -0.071999
+ 178 4.2889e-67 0.083886 0.096613
+ 178 3.0498e-62 -0.0071789 -0.0061619
+ 178 0.23002 -0.0066197 0.027358
+ 178 2.2462e-06 0.012003 0.028247
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.16287
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
+Per-subject OLS slope of success vs day: Box-B2 mean=6.92, Box-A2 mean=6.25
+ Welch two-sided p=0.689, Mann-Whitney p=0.527 (nB=4, nA=7) -> parallel learning (no slope difference detected)
+(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
+ observation-level DF (df2=178) it is ANTICONSERVATIVE for this few-subject design and is
+ NOT the basis for the conclusion above.)
+
+==============================================================================
+INTERPRETATION
+==============================================================================
+Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
+Python reference's population-average GEE -- directions/magnitudes should agree,
+exact ratios and p-values will differ.
+
+Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
+ [count/level] Box-B2 = 1.30x Box-A2 (one-sided p=0.0022) -> SUPPORTED
+ [rate/level ] Box-B2 = 1.70x Box-A2 (one-sided p=0.0001) -> SUPPORTED
+
+Per-animal (Box-B2 n=4 vs Box-A2 n=7), pure stats (no GLME):
+ count (per-subject mean success): Welch two-sided p=0.0158, Mann-Whitney one-sided (B2>A2) p=0.0030
+ rate (per-subject pooled success/total): Welch two-sided p=0.0207, Mann-Whitney one-sided (B2>A2) p=0.0030
+
+(No unknown groups -- they were merged into the anchors; only the H2 anchor
+contrast applies.)
+
+==============================================================================
+CAVEATS
+==============================================================================
+ - Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
+ depending on merge), and -- in unmerged scenarios -- each unknown condition
+ (Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
+ comparison here as preliminary.
+ - Single-subject classification: for a 1-subject unknown, 'matches anchor X'
+ means 'not statistically distinguishable from X', NOT proof of equivalence;
+ inference with a single subject in a group is fragile.
+ - Count vs rate: 'success' alone is a raw count; the rate model
+ (success/attempts) is the fairer accuracy comparison when attempt counts differ
+ between groups.
diff --git a/analysis/matlab/results/paper_mergeA2.txt b/analysis/matlab/results/paper_mergeA2.txt
new file mode 100644
index 0000000..3ab9756
--- /dev/null
+++ b/analysis/matlab/results/paper_mergeA2.txt
@@ -0,0 +1,67 @@
+==============================================================================
+PAPER LME REPLICATION -- mergeA2
+==============================================================================
+model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
+N = 8 rats, 109 sessions (day raw; day 0 = paper "Day 1")
+day coverage: stim(B2) 0..22, control(A2) 0..14
+** WARNING: unequal day coverage -- the full-range stim:day interaction
+ extrapolates the control group's line and is CONFOUNDED here (the paper's
+ groups had equal coverage). See the _d0_13 fair-window and phased analyses. **
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 109
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ behavior ~ 1 + day*stim + (1 | rat)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 962.68 978.83 -475.34 950.68
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 20.701 4.9127 4.2138 105 5.3256e-05
+ {'day' } 6.8599 0.69872 9.8178 105 1.5726e-16
+ {'stim' } 22.092 6.4372 3.4319 105 0.00085848
+ {'day:stim' } -2.1793 0.81821 -2.6635 105 0.0089525
+
+
+ Lower Upper
+ 10.96 30.442
+ 5.4745 8.2453
+ 9.3279 34.855
+ -3.8016 -0.55692
+
+Random effects covariance parameters (95% CIs):
+Group: rat (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 2.1043e-15
+
+
+ Lower Upper
+ NaN NaN
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 18.954 16.597 21.644
+
+
+
+effect t (df) F (df1) p
+------------------------------------------------------------------
+stim x day (interaction) t(105)= -2.66 F(1)= 7.094 p=0.008953
+day (learning) t(105)= 9.82 F(1)= 96.388 p=1.573e-16
+stim (main, Day 1) t(105)= 3.43 F(1)= 11.778 p=0.0008585
+interaction 95% CI: [-3.80, -0.56]
+
+Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
+ F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
diff --git a/analysis/matlab/results/paper_mergeB2.txt b/analysis/matlab/results/paper_mergeB2.txt
new file mode 100644
index 0000000..b72684c
--- /dev/null
+++ b/analysis/matlab/results/paper_mergeB2.txt
@@ -0,0 +1,67 @@
+==============================================================================
+PAPER LME REPLICATION -- mergeB2
+==============================================================================
+model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
+N = 8 rats, 109 sessions (day raw; day 0 = paper "Day 1")
+day coverage: stim(B2) 0..22, control(A2) 0..13
+** WARNING: unequal day coverage -- the full-range stim:day interaction
+ extrapolates the control group's line and is CONFOUNDED here (the paper's
+ groups had equal coverage). See the _d0_13 fair-window and phased analyses. **
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 109
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ behavior ~ 1 + day*stim + (1 | rat)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 967.24 983.39 -477.62 955.24
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 21.7 5.9981 3.6178 105 0.00045861
+ {'day' } 6.4863 0.9412 6.8916 105 4.2336e-10
+ {'stim' } 17.493 7.1288 2.4538 105 0.015779
+ {'day:stim' } -1.4651 1.025 -1.4294 105 0.15586
+
+
+ Lower Upper
+ 9.8069 33.593
+ 4.6201 8.3526
+ 3.3578 31.628
+ -3.4974 0.56726
+
+Random effects covariance parameters (95% CIs):
+Group: rat (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 2.1487e-15
+
+
+ Lower Upper
+ NaN NaN
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 19.354 16.948 22.101
+
+
+
+effect t (df) F (df1) p
+------------------------------------------------------------------
+stim x day (interaction) t(105)= -1.43 F(1)= 2.043 p=0.1559
+day (learning) t(105)= 6.89 F(1)= 47.494 p=4.234e-10
+stim (main, Day 1) t(105)= 2.45 F(1)= 6.021 p=0.01578
+interaction 95% CI: [-3.50, +0.57]
+
+Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
+ F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
diff --git a/analysis/matlab/results/paper_mergeNaive.txt b/analysis/matlab/results/paper_mergeNaive.txt
new file mode 100644
index 0000000..965a056
--- /dev/null
+++ b/analysis/matlab/results/paper_mergeNaive.txt
@@ -0,0 +1,67 @@
+==============================================================================
+PAPER LME REPLICATION -- mergeNaive
+==============================================================================
+model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
+N = 11 rats, 170 sessions (day raw; day 0 = paper "Day 1")
+day coverage: stim(B2) 0..22, control(A2) 0..26
+** WARNING: unequal day coverage -- the full-range stim:day interaction
+ extrapolates the control group's line and is CONFOUNDED here (the paper's
+ groups had equal coverage). See the _d0_13 fair-window and phased analyses. **
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 170
+ Fixed effects coefficients 4
+ Random effects coefficients 11
+ Covariance parameters 2
+
+Formula:
+ behavior ~ 1 + day*stim + (1 | rat)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 1526.4 1545.2 -757.2 1514.4
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 30.553 4.7932 6.3742 166 1.7469e-09
+ {'day' } 3.5345 0.33399 10.583 166 2.5084e-20
+ {'stim' } 10.155 8.0021 1.2691 166 0.2062
+ {'day:stim' } 1.5835 0.58611 2.7018 166 0.0076138
+
+
+ Lower Upper
+ 21.089 40.016
+ 2.8751 4.1939
+ -5.6439 25.954
+ 0.42633 2.7407
+
+Random effects covariance parameters (95% CIs):
+Group: rat (11 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 9.2449
+
+
+ Lower Upper
+ 5.388 15.863
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 19.866 17.802 22.168
+
+
+
+effect t (df) F (df1) p
+------------------------------------------------------------------
+stim x day (interaction) t(166)= 2.70 F(1)= 7.299 p=0.007614
+day (learning) t(166)= 10.58 F(1)= 111.990 p=2.508e-20
+stim (main, Day 1) t(166)= 1.27 F(1)= 1.611 p=0.2062
+interaction 95% CI: [+0.43, +2.74]
+
+Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
+ F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
diff --git a/analysis/matlab/results/paper_unmerged.txt b/analysis/matlab/results/paper_unmerged.txt
new file mode 100644
index 0000000..4c25bb6
--- /dev/null
+++ b/analysis/matlab/results/paper_unmerged.txt
@@ -0,0 +1,64 @@
+==============================================================================
+PAPER LME REPLICATION -- unmerged
+==============================================================================
+model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
+N = 6 rats, 71 sessions (day raw; day 0 = paper "Day 1")
+day coverage: stim(B2) 0..14, control(A2) 0..13
+
+==============================================================================
+FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 71
+ Fixed effects coefficients 4
+ Random effects coefficients 6
+ Covariance parameters 2
+
+Formula:
+ behavior ~ 1 + day*stim + (1 | rat)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 596.33 609.9 -292.16 584.33
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 21.53 5.5382 3.8874 67 0.00023506
+ {'day' } 6.6587 0.72367 9.2014 67 1.6706e-13
+ {'stim' } 8.0204 7.6977 1.0419 67 0.3012
+ {'day:stim' } 0.93747 0.9187 1.0204 67 0.3112
+
+
+ Lower Upper
+ 10.475 32.584
+ 5.2143 8.1032
+ -7.3444 23.385
+ -0.89627 2.7712
+
+Random effects covariance parameters (95% CIs):
+Group: rat (6 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.7931
+
+
+ Lower Upper
+ 2.4723 13.574
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 14.163 11.93 16.813
+
+
+
+effect t (df) F (df1) p
+------------------------------------------------------------------
+stim x day (interaction) t(67)= 1.02 F(1)= 1.041 p=0.3112
+day (learning) t(67)= 9.20 F(1)= 84.665 p=1.671e-13
+stim (main, Day 1) t(67)= 1.04 F(1)= 1.086 p=0.3012
+interaction 95% CI: [-0.90, +2.77]
+
+Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
+ F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
diff --git a/analysis/matlab/results/phase_mergeA2.txt b/analysis/matlab/results/phase_mergeA2.txt
new file mode 100644
index 0000000..cb5d9f4
--- /dev/null
+++ b/analysis/matlab/results/phase_mergeA2.txt
@@ -0,0 +1,155 @@
+==============================================================================
+PHASED days x tDCS LME -- mergeA2 (Box-B2 vs Box-A2)
+==============================================================================
+model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day - phaseStart]
+
+phase N A2slope B2slope day p tDCS(lvl) p interaction p slopeDiff [95% CI]
+--------------------------------------------------------------------------------------------
+0-5 8 10.54 15.16 1.5e-10 0.693 0.014 +4.62 [+1.00, +8.24]
+6-10 7 3.17 4.83 0.035 0.127 0.390 +1.66 [-2.22, +5.53]
+6-13 7 2.92 4.47 0.00032 0.125 0.118 +1.55 [-0.41, +3.52]
+
+Note: the interaction p (and CI) use fitlme observation-level DF and are
+ANTICONSERVATIVE at these small subject counts (see tdcs_power_sim). The early
+phase carries the Box-B2 faster-acquisition signal; late phases converge.
+==============================================================================
+FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 48
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 381.01 392.23 -184.5 369.01
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 10.06 4.465 2.253 44 0.029296
+ {'dayp' } 10.543 1.27 8.3016 44 1.4943e-10
+ {'tDCS' } -2.5119 6.3144 -0.3978 44 0.6927
+ {'dayp:tDCS' } 4.6214 1.796 2.5731 44 0.013526
+
+
+ Lower Upper
+ 1.061 19.058
+ 7.9834 13.102
+ -15.238 10.214
+ 1.0018 8.2411
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 4.5394
+
+
+ Lower Upper
+ 1.7406 11.838
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 10.625 8.5345 13.229
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 35
+ Fixed effects coefficients 4
+ Random effects coefficients 7
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 265.24 274.57 -126.62 253.24
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 75.867 4.9313 15.385 31 4.6291e-16
+ {'dayp' } 3.1667 1.4366 2.2043 31 0.035054
+ {'tDCS' } 10.233 6.5234 1.5687 31 0.12687
+ {'dayp:tDCS' } 1.6583 1.9004 0.87262 31 0.38958
+
+
+ Lower Upper
+ 65.809 85.924
+ 0.23676 6.0966
+ -3.0713 23.538
+ -2.2176 5.5342
+
+Random effects covariance parameters (95% CIs):
+Group: subject (7 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.9837
+
+
+ Lower Upper
+ 2.9396 12.18
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 7.8684 6.0554 10.224
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-13: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 50
+ Fixed effects coefficients 4
+ Random effects coefficients 7
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 367.22 378.69 -177.61 355.22
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 76.4 4.9765 15.352 46 1.0096e-19
+ {'dayp' } 2.9189 0.74973 3.8932 46 0.00031772
+ {'tDCS' } 10.289 6.5773 1.5643 46 0.12459
+ {'dayp:tDCS' } 1.554 0.97562 1.5928 46 0.11805
+
+
+ Lower Upper
+ 66.382 86.417
+ 1.4097 4.428
+ -2.9502 23.528
+ -0.40985 3.5178
+
+Random effects covariance parameters (95% CIs):
+Group: subject (7 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 7.1357
+
+
+ Lower Upper
+ 3.9247 12.974
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 7.3202 5.9279 9.0395
+
+
diff --git a/analysis/matlab/results/phase_mergeB2.txt b/analysis/matlab/results/phase_mergeB2.txt
new file mode 100644
index 0000000..ae4b8c7
--- /dev/null
+++ b/analysis/matlab/results/phase_mergeB2.txt
@@ -0,0 +1,155 @@
+==============================================================================
+PHASED days x tDCS LME -- mergeB2 (Box-B2 vs Box-A2)
+==============================================================================
+model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day - phaseStart]
+
+phase N A2slope B2slope day p tDCS(lvl) p interaction p slopeDiff [95% CI]
+--------------------------------------------------------------------------------------------
+0-5 8 9.86 14.65 2.9e-08 0.399 0.013 +4.79 [+1.06, +8.53]
+6-10 7 2.40 4.80 0.18 0.142 0.253 +2.40 [-1.80, +6.60]
+6-13 7 1.71 4.42 0.083 0.127 0.018 +2.71 [+0.50, +4.93]
+
+Note: the interaction p (and CI) use fitlme observation-level DF and are
+ANTICONSERVATIVE at these small subject counts (see tdcs_power_sim). The early
+phase carries the Box-B2 faster-acquisition signal; late phases converge.
+==============================================================================
+FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 48
+ Fixed effects coefficients 4
+ Random effects coefficients 8
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 383.06 394.29 -185.53 371.06
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 12.524 5.5254 2.2666 44 0.028385
+ {'dayp' } 9.8571 1.4654 6.7268 44 2.8783e-08
+ {'tDCS' } -5.9524 6.9892 -0.85166 44 0.39902
+ {'dayp:tDCS' } 4.7943 1.8536 2.5865 44 0.013079
+
+
+ Lower Upper
+ 1.3881 23.66
+ 6.9039 12.81
+ -20.038 8.1334
+ 1.0587 8.5299
+
+Random effects covariance parameters (95% CIs):
+Group: subject (8 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.7044
+
+
+ Lower Upper
+ 2.6066 12.484
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 10.618 8.5282 13.219
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 35
+ Fixed effects coefficients 4
+ Random effects coefficients 7
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 264.22 273.56 -126.11 252.22
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 74.2 5.8956 12.586 31 1.0133e-13
+ {'dayp' } 2.4 1.7415 1.3781 31 0.17803
+ {'tDCS' } 10.52 6.9757 1.5081 31 0.14166
+ {'dayp:tDCS' } 2.4 2.0606 1.1647 31 0.25302
+
+
+ Lower Upper
+ 62.176 86.224
+ -1.1518 5.9518
+ -3.7071 24.747
+ -1.8026 6.6026
+
+Random effects covariance parameters (95% CIs):
+Group: subject (7 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 5.7551
+
+
+ Lower Upper
+ 2.7955 11.848
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 7.7883 5.9937 10.12
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-13: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 50
+ Fixed effects coefficients 4
+ Random effects coefficients 7
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 362.57 374.04 -175.28 350.57
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 75.168 5.6188 13.378 46 1.8212e-17
+ {'dayp' } 1.712 0.96716 1.7701 46 0.083338
+ {'tDCS' } 10.291 6.6299 1.5522 46 0.12747
+ {'dayp:tDCS' } 2.7116 1.1009 2.4631 46 0.017575
+
+
+ Lower Upper
+ 63.858 86.478
+ -0.23482 3.6588
+ -3.0544 23.636
+ 0.49565 4.9275
+
+Random effects covariance parameters (95% CIs):
+Group: subject (7 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 6.379
+
+
+ Lower Upper
+ 3.4793 11.695
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 7.0508 5.7111 8.7047
+
+
diff --git a/analysis/matlab/results/phase_mergeNaive.txt b/analysis/matlab/results/phase_mergeNaive.txt
new file mode 100644
index 0000000..ab25f10
--- /dev/null
+++ b/analysis/matlab/results/phase_mergeNaive.txt
@@ -0,0 +1,155 @@
+==============================================================================
+PHASED days x tDCS LME -- mergeNaive (Box-B2 vs Box-A2)
+==============================================================================
+model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day - phaseStart]
+
+phase N A2slope B2slope day p tDCS(lvl) p interaction p slopeDiff [95% CI]
+--------------------------------------------------------------------------------------------
+0-5 11 8.26 15.16 1.6e-10 0.852 0.000 +6.90 [+3.40, +10.41]
+6-10 10 5.97 4.83 3.9e-05 0.007 0.584 -1.14 [-5.31, +3.03]
+6-13 10 2.83 4.47 0.00071 0.012 0.196 +1.65 [-0.87, +4.17]
+
+Note: the interaction p (and CI) use fitlme observation-level DF and are
+ANTICONSERVATIVE at these small subject counts (see tdcs_power_sim). The early
+phase carries the Box-B2 faster-acquisition signal; late phases converge.
+==============================================================================
+FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 65
+ Fixed effects coefficients 4
+ Random effects coefficients 11
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 532.27 545.32 -260.14 520.27
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 9.046 4.8672 1.8586 61 0.067913
+ {'dayp' } 8.2602 1.0773 7.6677 61 1.6422e-10
+ {'tDCS' } -1.4984 7.9706 -0.188 61 0.8515
+ {'dayp:tDCS' } 6.9041 1.7525 3.9397 61 0.00021248
+
+
+ Lower Upper
+ -0.68649 18.779
+ 6.106 10.414
+ -17.437 14.44
+ 3.3998 10.408
+
+Random effects covariance parameters (95% CIs):
+Group: subject (11 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 9.4501
+
+
+ Lower Upper
+ 5.5672 16.041
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 11.565 9.5751 13.968
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 50
+ Fixed effects coefficients 4
+ Random effects coefficients 10
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 404.12 415.59 -196.06 392.12
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 62.1 5.345 11.618 46 2.7953e-15
+ {'dayp' } 5.9667 1.3111 4.5509 46 3.8983e-05
+ {'tDCS' } 24 8.4512 2.8398 46 0.0067003
+ {'dayp:tDCS' } -1.1417 2.073 -0.55073 46 0.58449
+
+
+ Lower Upper
+ 51.341 72.859
+ 3.3276 8.6058
+ 6.9887 41.011
+ -5.3144 3.0311
+
+Random effects covariance parameters (95% CIs):
+Group: subject (10 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 10.466
+
+
+ Lower Upper
+ 6.207 17.646
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 10.156 8.1572 12.644
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-13: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 73
+ Fixed effects coefficients 4
+ Random effects coefficients 10
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 593.06 606.81 -290.53 581.06
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 66.814 4.8749 13.706 69 2.2545e-21
+ {'dayp' } 2.8256 0.79686 3.5459 69 0.00070793
+ {'tDCS' } 19.873 7.7041 2.5796 69 0.012026
+ {'dayp:tDCS' } 1.648 1.2621 1.3058 69 0.19595
+
+
+ Lower Upper
+ 57.089 76.539
+ 1.2359 4.4153
+ 4.504 35.242
+ -0.86972 4.1658
+
+Random effects covariance parameters (95% CIs):
+Group: subject (10 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 9.246
+
+
+ Lower Upper
+ 5.4692 15.631
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 11.498 9.661 13.686
+
+
diff --git a/analysis/matlab/results/phase_unmerged.txt b/analysis/matlab/results/phase_unmerged.txt
new file mode 100644
index 0000000..c4659d1
--- /dev/null
+++ b/analysis/matlab/results/phase_unmerged.txt
@@ -0,0 +1,155 @@
+==============================================================================
+PHASED days x tDCS LME -- unmerged (Box-B2 vs Box-A2)
+==============================================================================
+model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day - phaseStart]
+
+phase N A2slope B2slope day p tDCS(lvl) p interaction p slopeDiff [95% CI]
+--------------------------------------------------------------------------------------------
+0-5 6 9.86 15.22 1.6e-07 0.689 0.015 +5.36 [+1.11, +9.62]
+6-10 5 2.40 4.17 0.23 0.098 0.486 +1.77 [-3.41, +6.95]
+6-13 5 1.71 3.98 0.12 0.101 0.097 +2.27 [-0.44, +4.97]
+
+Note: the interaction p (and CI) use fitlme observation-level DF and are
+ANTICONSERVATIVE at these small subject counts (see tdcs_power_sim). The early
+phase carries the Box-B2 faster-acquisition signal; late phases converge.
+==============================================================================
+FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 36
+ Fixed effects coefficients 4
+ Random effects coefficients 6
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 289.66 299.16 -138.83 277.66
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 12.524 5.2775 2.3731 32 0.023816
+ {'dayp' } 9.8571 1.4772 6.6729 32 1.5706e-07
+ {'tDCS' } -3.0159 7.4635 -0.40408 32 0.68884
+ {'dayp:tDCS' } 5.3619 2.089 2.5667 32 0.015149
+
+
+ Lower Upper
+ 1.7739 23.274
+ 6.8482 12.866
+ -18.219 12.187
+ 1.1067 9.6172
+
+Random effects covariance parameters (95% CIs):
+Group: subject (6 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 4.8527
+
+
+ Lower Upper
+ 1.7069 13.796
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 10.703 8.3104 13.785
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 25
+ Fixed effects coefficients 4
+ Random effects coefficients 5
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 196.97 204.29 -92.486 184.97
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 74.2 6.4017 11.591 21 1.3774e-10
+ {'dayp' } 2.4 1.9295 1.2439 21 0.22726
+ {'tDCS' } 14.333 8.2646 1.7343 21 0.097522
+ {'dayp:tDCS' } 1.7667 2.491 0.70923 21 0.48598
+
+
+ Lower Upper
+ 60.887 87.513
+ -1.6126 6.4126
+ -2.8539 31.521
+ -3.4136 6.9469
+
+Random effects covariance parameters (95% CIs):
+Group: subject (5 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 6.1065
+
+
+ Lower Upper
+ 2.5428 14.665
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 8.6289 6.3295 11.764
+
+
+==============================================================================
+FULL MODEL SUMMARY -- phase 6-13: success ~ dayp*tDCS + (1|subject)
+==============================================================================
+
+Linear mixed-effects model fit by ML
+
+Model information:
+ Number of observations 34
+ Fixed effects coefficients 4
+ Random effects coefficients 5
+ Covariance parameters 2
+
+Formula:
+ success ~ 1 + dayp*tDCS + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 257.04 266.2 -122.52 245.04
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF pValue
+ {'(Intercept)'} 75.17 6.2311 12.064 30 4.8879e-13
+ {'dayp' } 1.7101 1.061 1.6117 30 0.11749
+ {'tDCS' } 13.563 8.0252 1.69 30 0.1014
+ {'dayp:tDCS' } 2.267 1.3237 1.7126 30 0.097101
+
+
+ Lower Upper
+ 62.445 87.896
+ -0.45682 3.877
+ -2.8271 29.952
+ -0.43635 4.9703
+
+Random effects covariance parameters (95% CIs):
+Group: subject (5 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 7.1166
+
+
+ Lower Upper
+ 3.4834 14.539
+
+Group: Error
+ Name Estimate Lower Upper
+ {'Res Std'} 7.7328 5.9847 9.9914
+
+
diff --git a/analysis/matlab/results/unmerged_d0_10.txt b/analysis/matlab/results/unmerged_d0_10.txt
new file mode 100644
index 0000000..5eafa8f
--- /dev/null
+++ b/analysis/matlab/results/unmerged_d0_10.txt
@@ -0,0 +1,232 @@
+==============================================================================
+tDCS GLM report -- scenario: unmerged_d0_10
+==============================================================================
+merge key: unmerged day window: 0..10 observations: 126
+==============================================================================
+DESCRIPTIVES
+==============================================================================
+group n_subj n_sessions mean_success mean_rate max_day
+--------------------------------------------------------------------------
+Electrode-Box-B2 3 33 70.0 0.555 10
+Electrode-Box-A 1 11 58.9 0.499 10
+Electrode-Box-A2 3 28 52.1 0.433 10
+Naive 4 43 46.8 0.440 10
+Right-Electrode 1 11 63.4 0.499 10
+
+==============================================================================
+(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 126
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 301.01 323.7 -142.51 285.01
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 4.2892 0.10522 40.765 119
+ {'group_Electrode-Box-A' } -0.16759 0.20935 -0.80052 119
+ {'group_Electrode-Box-A2'} -0.14442 0.14887 -0.97013 119
+ {'group_Naive' } -0.44336 0.13882 -3.1938 119
+ {'group_Right-Electrode' } -0.094696 0.20909 -0.45289 119
+ {'day_c' } 0.20188 0.0052727 38.287 119
+ {'day_c2' } -0.024069 0.0015714 -15.317 119
+
+
+ pValue Lower Upper
+ 9.1655e-72 4.0809 4.4976
+ 0.425 -0.58213 0.24695
+ 0.33395 -0.43919 0.15035
+ 0.0017973 -0.71824 -0.16848
+ 0.65145 -0.50872 0.31933
+ 9.4346e-69 0.19144 0.21232
+ 6.4425e-30 -0.02718 -0.020957
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.17716
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 124
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Binomial
+ Link Logit
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 366.74 389.3 -175.37 350.74
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 0.21772 0.13736 1.585 117
+ {'group_Electrode-Box-A' } -0.27791 0.2726 -1.0195 117
+ {'group_Electrode-Box-A2'} -0.37423 0.19356 -1.9334 117
+ {'group_Naive' } -0.64393 0.18075 -3.5625 117
+ {'group_Right-Electrode' } -0.25889 0.27218 -0.95118 117
+ {'day_c' } 0.21668 0.0069264 31.283 117
+ {'day_c2' } -0.013737 0.0021988 -6.2475 117
+
+
+ pValue Lower Upper
+ 0.11567 -0.054325 0.48976
+ 0.31008 -0.81779 0.26196
+ 0.0556 -0.75756 0.0091015
+ 0.0005325 -1.0019 -0.28596
+ 0.34348 -0.79792 0.28014
+ 1.1453e-58 0.20296 0.2304
+ 6.9755e-09 -0.018092 -0.0093824
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.22892
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 126
+ Fixed effects coefficients 11
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + day_c2 + group*day_c + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 305.19 339.23 -140.6 281.19
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.3338 0.10278 42.165
+ {'group_Electrode-Box-A' } -0.23805 0.20569 -1.1574
+ {'group_Electrode-Box-A2' } -0.17701 0.14533 -1.218
+ {'group_Naive' } -0.54258 0.13655 -3.9736
+ {'group_Right-Electrode' } -0.15185 0.20519 -0.74005
+ {'day_c' } 0.17638 0.0080904 21.802
+ {'day_c2' } -0.024639 0.0015803 -15.591
+ {'group_Electrode-Box-A:day_c' } 0.044079 0.016893 2.6093
+ {'group_Electrode-Box-A2:day_c'} 0.011922 0.012896 0.92443
+ {'group_Naive:day_c' } 0.059567 0.011689 5.0961
+ {'group_Right-Electrode:day_c' } 0.036369 0.016336 2.2263
+
+
+ DF pValue Lower Upper
+ 115 8.6925e-72 4.1302 4.5374
+ 115 0.24953 -0.64548 0.16937
+ 115 0.22572 -0.46489 0.11086
+ 115 0.00012391 -0.81305 -0.27211
+ 115 0.46078 -0.5583 0.25459
+ 115 1.1738e-42 0.16036 0.19241
+ 115 3.8845e-30 -0.027769 -0.021509
+ 115 0.010278 0.010617 0.07754
+ 115 0.3572 -0.013623 0.037467
+ 115 1.3744e-06 0.036414 0.08272
+ 115 0.027945 0.00401 0.068729
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.17214
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
+Per-subject OLS slope of success vs day: Box-B2 mean=9.52, Box-A2 mean=8.96
+ Welch two-sided p=0.643, Mann-Whitney p=0.700 (nB=3, nA=3) -> parallel learning (no slope difference detected)
+(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
+ observation-level DF (df2=115) it is ANTICONSERVATIVE for this few-subject design and is
+ NOT the basis for the conclusion above.)
+
+==============================================================================
+INTERPRETATION
+==============================================================================
+Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
+Python reference's population-average GEE -- directions/magnitudes should agree,
+exact ratios and p-values will differ.
+
+Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
+ [count/level] Box-B2 = 1.16x Box-A2 (one-sided p=0.1660) -> not supported
+ [rate/level ] Box-B2 = 1.45x Box-A2 (one-sided p=0.0266) -> SUPPORTED
+
+Per-animal (Box-B2 n=3 vs Box-A2 n=3), pure stats (no GLME):
+ count (per-subject mean success): Welch two-sided p=0.0414, Mann-Whitney one-sided (B2>A2) p=0.0500
+ rate (per-subject pooled success/total): Welch two-sided p=0.0702, Mann-Whitney one-sided (B2>A2) p=0.0500
+
+Classification -- is each UNKNOWN condition A2-like or B2-like?
+(ratio >1 = above that anchor; p = differs from that anchor)
+
+ Electrode-Box-A:
+ [count/level] vs Box-A2: 0.98x p=0.912 vs Box-B2: 0.85x p=0.425
+ -> AMBIGUOUS (nearer Electrode-Box-A2)
+ [rate/level ] vs Box-A2: 1.10x p=0.725 vs Box-B2: 0.76x p=0.310
+ -> AMBIGUOUS (nearer Electrode-Box-A2)
+
+ Right-Electrode:
+ [count/level] vs Box-A2: 1.05x p=0.813 vs Box-B2: 0.91x p=0.651
+ -> AMBIGUOUS (nearer Electrode-Box-A2)
+ [rate/level ] vs Box-A2: 1.12x p=0.673 vs Box-B2: 0.77x p=0.343
+ -> AMBIGUOUS (nearer Electrode-Box-A2)
+
+ NOTE: each unknown has ONLY 1 subject. 'Matches' means 'not statistically
+ distinguishable', weak evidence at n=1, not proof of equivalence.
+
+==============================================================================
+CAVEATS
+==============================================================================
+ - Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
+ depending on merge), and -- in unmerged scenarios -- each unknown condition
+ (Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
+ comparison here as preliminary.
+ - Single-subject classification: for a 1-subject unknown, 'matches anchor X'
+ means 'not statistically distinguishable from X', NOT proof of equivalence;
+ inference with a single subject in a group is fragile.
+ - Count vs rate: 'success' alone is a raw count; the rate model
+ (success/attempts) is the fairer accuracy comparison when attempt counts differ
+ between groups.
diff --git a/analysis/matlab/results/unmerged_full.txt b/analysis/matlab/results/unmerged_full.txt
new file mode 100644
index 0000000..cacb3ac
--- /dev/null
+++ b/analysis/matlab/results/unmerged_full.txt
@@ -0,0 +1,232 @@
+==============================================================================
+tDCS GLM report -- scenario: unmerged_full
+==============================================================================
+merge key: unmerged day window: 0..26 observations: 185
+==============================================================================
+DESCRIPTIVES
+==============================================================================
+group n_subj n_sessions mean_success mean_rate max_day
+--------------------------------------------------------------------------
+Electrode-Box-B2 3 40 77.0 0.591 14
+Electrode-Box-A 1 15 70.7 0.557 14
+Electrode-Box-A2 3 31 55.4 0.448 13
+Naive 4 76 59.6 0.492 26
+Right-Electrode 1 23 85.8 0.627 22
+
+==============================================================================
+(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 567.38 593.14 -275.69 551.38
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 4.5636 0.062818 72.648 178
+ {'group_Electrode-Box-A' } -0.16366 0.1251 -1.3082 178
+ {'group_Electrode-Box-A2'} -0.16301 0.090874 -1.7939 178
+ {'group_Naive' } -0.41017 0.083133 -4.9339 178
+ {'group_Right-Electrode' } -0.15781 0.12382 -1.2745 178
+ {'day_c' } 0.10084 0.0023114 43.629 178
+ {'day_c2' } -0.0064669 0.00024857 -26.016 178
+
+
+ pValue Lower Upper
+ 3.0937e-134 4.4397 4.6876
+ 0.19249 -0.41052 0.083214
+ 0.074534 -0.34234 0.016314
+ 1.8418e-06 -0.57422 -0.24612
+ 0.20416 -0.40216 0.086543
+ 5.5938e-97 0.096281 0.1054
+ 1.4969e-62 -0.0069574 -0.0059764
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.10379
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 183
+ Fixed effects coefficients 7
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Binomial
+ Link Logit
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + group + day_c + day_c2 + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 664.34 690.01 -324.17 648.34
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat DF
+ {'(Intercept)' } 0.67246 0.11921 5.6411 176
+ {'group_Electrode-Box-A' } -0.2656 0.23687 -1.1213 176
+ {'group_Electrode-Box-A2'} -0.42592 0.16928 -2.5161 176
+ {'group_Naive' } -0.69483 0.15707 -4.4236 176
+ {'group_Right-Electrode' } -0.19395 0.23547 -0.82369 176
+ {'day_c' } 0.12539 0.0034255 36.605 176
+ {'day_c2' } -0.0069542 0.0003534 -19.678 176
+
+
+ pValue Lower Upper
+ 6.6327e-08 0.4372 0.90772
+ 0.26369 -0.73306 0.20187
+ 0.012762 -0.75999 -0.091839
+ 1.6969e-05 -1.0048 -0.38484
+ 0.41123 -0.65866 0.27075
+ 3.2383e-84 0.11863 0.13215
+ 2.5332e-46 -0.0076517 -0.0062568
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.19922
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+==============================================================================
+(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
+==============================================================================
+
+Generalized linear mixed-effects model fit by PL
+
+Model information:
+ Number of observations 185
+ Fixed effects coefficients 11
+ Random effects coefficients 12
+ Covariance parameters 1
+ Distribution Poisson
+ Link Log
+ FitMethod MPL
+
+Formula:
+ success ~ 1 + day_c2 + group*day_c + (1 | subject)
+
+Model fit statistics:
+ AIC BIC LogLikelihood Deviance
+ 566.35 604.99 -271.17 542.35
+
+Fixed effects coefficients (95% CIs):
+ Name Estimate SE tStat
+ {'(Intercept)' } 4.5639 0.066952 68.167
+ {'group_Electrode-Box-A' } -0.1538 0.13339 -1.1531
+ {'group_Electrode-Box-A2' } -0.16353 0.097941 -1.6697
+ {'group_Naive' } -0.4286 0.088752 -4.8292
+ {'group_Right-Electrode' } -0.10141 0.13294 -0.76285
+ {'day_c' } 0.084832 0.0050395 16.833
+ {'day_c2' } -0.0071091 0.00030673 -23.177
+ {'group_Electrode-Box-A:day_c' } 0.015434 0.0094241 1.6377
+ {'group_Electrode-Box-A2:day_c'} 0.010314 0.0089464 1.1529
+ {'group_Naive:day_c' } 0.031147 0.0065742 4.7377
+ {'group_Right-Electrode:day_c' } 0.011613 0.007034 1.651
+
+
+ DF pValue Lower Upper
+ 174 1.9324e-127 4.4318 4.6961
+ 174 0.25047 -0.41707 0.10946
+ 174 0.096774 -0.35684 0.029772
+ 174 2.9893e-06 -0.60377 -0.25343
+ 174 0.44659 -0.3638 0.16097
+ 174 2.3384e-38 0.074885 0.094778
+ 174 4.4285e-55 -0.0077145 -0.0065037
+ 174 0.10329 -0.0031665 0.034034
+ 174 0.25055 -0.0073435 0.027971
+ 174 4.4703e-06 0.018171 0.044122
+ 174 0.10054 -0.0022698 0.025496
+
+Random effects covariance parameters:
+Group: subject (12 Levels)
+ Name1 Name2 Type Estimate
+ {'(Intercept)'} {'(Intercept)'} {'std'} 0.11116
+
+Group: Error
+ Name Estimate
+ {'sqrt(Dispersion)'} 1
+
+
+Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
+Per-subject OLS slope of success vs day: Box-B2 mean=7.96, Box-A2 mean=8.19
+ Welch two-sided p=0.896, Mann-Whitney p=1.000 (nB=3, nA=3) -> parallel learning (no slope difference detected)
+(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
+ observation-level DF (df2=174) it is ANTICONSERVATIVE for this few-subject design and is
+ NOT the basis for the conclusion above.)
+
+==============================================================================
+INTERPRETATION
+==============================================================================
+Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
+Python reference's population-average GEE -- directions/magnitudes should agree,
+exact ratios and p-values will differ.
+
+Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
+ [count/level] Box-B2 = 1.18x Box-A2 (one-sided p=0.0364) -> SUPPORTED
+ [rate/level ] Box-B2 = 1.53x Box-A2 (one-sided p=0.0059) -> SUPPORTED
+
+Per-animal (Box-B2 n=3 vs Box-A2 n=3), pure stats (no GLME):
+ count (per-subject mean success): Welch two-sided p=0.0552, Mann-Whitney one-sided (B2>A2) p=0.0500
+ rate (per-subject pooled success/total): Welch two-sided p=0.0722, Mann-Whitney one-sided (B2>A2) p=0.0500
+
+Classification -- is each UNKNOWN condition A2-like or B2-like?
+(ratio >1 = above that anchor; p = differs from that anchor)
+
+ Electrode-Box-A:
+ [count/level] vs Box-A2: 1.00x p=0.996 vs Box-B2: 0.85x p=0.192
+ -> AMBIGUOUS (nearer Electrode-Box-A2)
+ [rate/level ] vs Box-A2: 1.17x p=0.501 vs Box-B2: 0.77x p=0.264
+ -> AMBIGUOUS (nearer Electrode-Box-A2)
+
+ Right-Electrode:
+ [count/level] vs Box-A2: 1.01x p=0.967 vs Box-B2: 0.85x p=0.204
+ -> AMBIGUOUS (nearer Electrode-Box-A2)
+ [rate/level ] vs Box-A2: 1.26x p=0.328 vs Box-B2: 0.82x p=0.411
+ -> AMBIGUOUS (nearer Electrode-Box-B2)
+
+ NOTE: each unknown has ONLY 1 subject. 'Matches' means 'not statistically
+ distinguishable', weak evidence at n=1, not proof of equivalence.
+
+==============================================================================
+CAVEATS
+==============================================================================
+ - Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
+ depending on merge), and -- in unmerged scenarios -- each unknown condition
+ (Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
+ comparison here as preliminary.
+ - Single-subject classification: for a 1-subject unknown, 'matches anchor X'
+ means 'not statistically distinguishable from X', NOT proof of equivalence;
+ inference with a single subject in a group is fragile.
+ - Count vs rate: 'success' alone is a raw count; the rate model
+ (success/attempts) is the fairer accuracy comparison when attempt counts differ
+ between groups.
diff --git a/analysis/matlab/tdcs_lme_report.m b/analysis/matlab/tdcs_lme_report.m
index 1a0e993..9b8a1bd 100644
--- a/analysis/matlab/tdcs_lme_report.m
+++ b/analysis/matlab/tdcs_lme_report.m
@@ -23,6 +23,8 @@ if abs(L.maxDayB - L.maxDayA) > 2
end
s = [s sprintf('\n')];
+s = [s tdcs_model_summary(L.lme, 'fitlme: success ~ day*tDCS + (1|subject)') sprintf('\n')];
+
s = [s sprintf('%-27s %-14s %-13s %s\n', 'effect', 't (df)', 'F (df1)', 'p')];
s = [s sprintf('%s\n', repmat('-', 1, 70))];
s = [s localRow('days x tDCS (interaction)', L.interaction)];
diff --git a/analysis/matlab/tdcs_model_summary.m b/analysis/matlab/tdcs_model_summary.m
new file mode 100644
index 0000000..3631860
--- /dev/null
+++ b/analysis/matlab/tdcs_model_summary.m
@@ -0,0 +1,28 @@
+function s = tdcs_model_summary(model, label)
+%TDCS_MODEL_SUMMARY Full native fitlme/fitglme model summary as plain text.
+% S = TDCS_MODEL_SUMMARY(MODEL) captures DISP(MODEL) -- the complete summary
+% MATLAB prints for a fitted LinearMixedModel / GeneralizedLinearMixedModel
+% (model information and fit statistics, the formula, the fixed-effects
+% coefficient table with 95% CIs, and the random-effects covariance) -- and
+% strips the Command-Window-only ... bold markup that EVALC
+% would otherwise emit as literal text, so the result is plain text suitable
+% for the console and the results/*.txt files.
+%
+% S = TDCS_MODEL_SUMMARY(MODEL, LABEL) prefixes a titled banner naming the
+% model (typically its formula), so each scenario's output carries a
+% self-describing copy of the raw GLM/LME summary.
+%
+% This is the single place that renders a fitted model verbatim; every report
+% (tdcs_report, tdcs_lme_report, tdcs_paper_lme, tdcs_phase_lme) routes
+% through it so that ALL scenarios print the full summary generated by the
+% MATLAB model-fitting functions.
+
+raw = evalc('disp(model)');
+s = regexprep(raw, '?strong>', '');
+
+if nargin > 1 && ~isempty(label)
+ bar = repmat('=', 1, 78);
+ s = sprintf('%s\nFULL MODEL SUMMARY -- %s\n%s\n%s', bar, label, bar, s);
+end
+
+end
diff --git a/analysis/matlab/tdcs_paper_lme.m b/analysis/matlab/tdcs_paper_lme.m
index da5bbd8..a697e99 100644
--- a/analysis/matlab/tdcs_paper_lme.m
+++ b/analysis/matlab/tdcs_paper_lme.m
@@ -67,6 +67,8 @@ if abs(L.maxDayStim - L.maxDayCtrl) > 2
' extrapolates the control group''s line and is CONFOUNDED here (the paper''s\n' ...
' groups had equal coverage). See the _d0_13 fair-window and phased analyses. **\n'])];
end
+s = [s sprintf('\n')];
+s = [s tdcs_model_summary(L.model, 'fitlme: behavior ~ stim + day + stim:day + (1|rat)') sprintf('\n')];
s = [s sprintf('\n%-26s %-13s %-13s %s\n', 'effect', 't (df)', 'F (df1)', 'p')];
s = [s sprintf('%s\n', repmat('-', 1, 66))];
s = [s localRow('stim x day (interaction)', L.interaction)];
diff --git a/analysis/matlab/tdcs_phase_lme.m b/analysis/matlab/tdcs_phase_lme.m
index 4e08910..3eb66f0 100644
--- a/analysis/matlab/tdcs_phase_lme.m
+++ b/analysis/matlab/tdcs_phase_lme.m
@@ -33,6 +33,7 @@ s = [s sprintf('model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day
s = [s sprintf('%-9s N A2slope B2slope day p tDCS(lvl) p interaction p slopeDiff [95%% CI]\n', 'phase')];
s = [s sprintf('%s\n', repmat('-', 1, 92))];
+rawSummaries = '';
for k = 1:numel(phases)
ph = phases{k};
Tp = T(T.day >= ph(1) & T.day <= ph(2), :);
@@ -59,12 +60,18 @@ for k = 1:numel(phases)
s = [s sprintf('%d-%-6d %d %6.2f %6.2f %-9.2g %-11.3f %-13.3f %+.2f [%+.2f, %+.2f]\n', ...
ph(1), ph(2), e.nSub, e.a2Slope, e.b2Slope, e.dayP, e.tDCSlevelP, ...
e.interP, e.interEst, e.interCI(1), e.interCI(2))]; %#ok
+
+ rawSummaries = [rawSummaries tdcs_model_summary(lme, ...
+ sprintf('phase %d-%d: success ~ dayp*tDCS + (1|subject)', ph(1), ph(2))) ...
+ sprintf('\n')]; %#ok
end
s = [s sprintf(['\nNote: the interaction p (and CI) use fitlme observation-level DF and are\n' ...
'ANTICONSERVATIVE at these small subject counts (see tdcs_power_sim). The early\n' ...
'phase carries the Box-B2 faster-acquisition signal; late phases converge.\n'])];
+s = [s rawSummaries];
+
fprintf('%s', s);
localWrite(['phase_' mergeKey], s);
diff --git a/analysis/matlab/tdcs_report.m b/analysis/matlab/tdcs_report.m
index 066864d..008dd77 100644
--- a/analysis/matlab/tdcs_report.m
+++ b/analysis/matlab/tdcs_report.m
@@ -87,7 +87,9 @@ s = [s localCleanDisp(R.countGLME) sprintf('\n')];
s = [s localHeader('(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)')];
s = [s localCleanDisp(R.rateGLME) sprintf('\n')];
-s = [s localHeader('(C) LEARNING RATE -- per-animal slope test (Box-B2 vs Box-A2)')];
+s = [s localHeader('(C) LEARNING RATE -- Poisson GLMM (group x day interaction)')];
+s = [s localCleanDisp(R.learnGLME) sprintf('\n')];
+s = [s sprintf('Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:\n')];
if R.learn.slopeMWUp < 0.05
verdict = 'DIFFERENT learning rates';
else
@@ -103,12 +105,11 @@ s = [s sprintf(['(Reference only: the GLMM group x day_c joint F-test gives p=%.
end
function s = localCleanDisp(model)
-%LOCALCLEANDISP disp(MODEL) captured to text, with the Command-Window-only
-% ... bold-markup tags (rendered by the interactive
-% MATLAB terminal, but emitted as literal text by EVALC) stripped so the
-% report/console/file output is plain text.
-raw = evalc('disp(model)');
-s = regexprep(raw, '?strong>', '');
+%LOCALCLEANDISP Full native model summary (disp(MODEL)) as plain text.
+% Thin wrapper over the shared TDCS_MODEL_SUMMARY so the count, rate, and
+% learning GLMMs here render the same verbatim summary used by the LME
+% reports.
+s = tdcs_model_summary(model);
end
% ------------------------------------------------------------ interpretation
diff --git a/analysis/matlab/tests/tLme.m b/analysis/matlab/tests/tLme.m
index cc2db21..d3e0d7a 100644
--- a/analysis/matlab/tests/tLme.m
+++ b/analysis/matlab/tests/tLme.m
@@ -59,6 +59,28 @@ classdef tLme < matlab.unittest.TestCase
testCase.verifyError(@() tdcs_glm('lme_nonsense'), 'tdcs_glm:badScenario');
end
+ function testReportsIncludeFullModelSummary(testCase)
+ % Every scenario prints the full native fitlme summary. The lme_*,
+ % paper_*, and phase_* reports each embed disp(model), whose
+ % 'Fixed effects coefficients' header is the marker (phase_* has
+ % one per phase -> 3). Markup must be stripped.
+ here = fileparts(fileparts(mfilename('fullpath'))); % analysis/matlab
+ resDir = fullfile(here, 'results');
+ cases = struct( ...
+ 'lme_mergeA2_full', 1, ...
+ 'paper_mergeA2', 1, ...
+ 'phase_mergeA2', 3);
+ for sc = fieldnames(cases)'
+ name = sc{1};
+ evalc(sprintf('tdcs_glm(''%s'')', name));
+ txt = fileread(fullfile(resDir, [name '.txt']));
+ testCase.verifyEqual(count(txt, 'Fixed effects coefficients (95% CIs):'), ...
+ cases.(name), sprintf('%s: missing full model summary', name));
+ testCase.verifyFalse(contains(txt, ''), ...
+ sprintf('%s: markup not stripped', name));
+ end
+ end
+
function testMergeNaiveGrouping(testCase)
% mergeNaive: control = Box-A2 + Naive (7), tDCS = Box-B2 + Right (4),
% Box-A unchanged (1); Naive is relabeled away.
diff --git a/analysis/matlab/tests/tReport.m b/analysis/matlab/tests/tReport.m
index 51ca31e..6daba27 100644
--- a/analysis/matlab/tests/tReport.m
+++ b/analysis/matlab/tests/tReport.m
@@ -28,6 +28,10 @@ classdef tReport < matlab.unittest.TestCase
testCase.verifyTrue(contains(txt, 'CAVEATS'));
% Command-Window-only markup must be stripped from the report.
testCase.verifyFalse(contains(txt, ''));
+ % Full native GLMM summary is present for all three models
+ % (count, rate, learning-rate): each disp() prints this header.
+ testCase.verifyEqual(count(txt, 'Fixed effects coefficients (95% CIs):'), 3, ...
+ 'Expected the full fitglme summary for count, rate, and learning GLMMs.');
end
function testUnmergedScenarioIncludesClassification(testCase)