Commit Graph

15 Commits

Author SHA1 Message Date
Experiments DB Dev a94ee28908 feat(matlab): y-tick labels count/rate, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:25:54 -04:00
Experiments DB Dev af12ba1652 feat(matlab): x-axis padding, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:18:56 -04:00
Experiments DB Dev 2e9ebd2fde fix(matlab): tighter y-label offset, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:12:11 -04:00
Experiments DB Dev c9fcd5e261 fix(matlab): halved y-label offset, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:08:59 -04:00
Experiments DB Dev fa16b6116f fix(matlab): horizontal x + padded y label, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:05:21 -04:00
Experiments DB Dev 8fac19e42f feat(matlab): y-tick-5 + grid plots, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:58:51 -04:00
Experiments DB Dev b3ebdf6f02 fix(matlab): compact plot layout, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:53:25 -04:00
Experiments DB Dev 0d57846b00 fix(matlab): vertical x-axis (manual text), batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:23:16 -04:00
Experiments DB Dev a4527fead3 fix(matlab): vertical x-axis plots, batch 1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:07:31 -04:00
Experiments DB Dev 6ba21a1a35 analysis(matlab): rate + count outputs, variation batch 2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 02:32:52 -04:00
Experiments DB Dev a2a812acc8 analysis(matlab): add paper-style learning-curve plot to every variation
Add variation_plot.m + make_variation_plot.m, dropping plotcurve.m +
learning_curve.png into all 28 variation folders. Each figure plots mean +/-
SEM successful reaches per training day for the anodal/treatment group (red)
vs control (blue), in the style of the paper ("Lines indicate mean (and SEM)
across animals in the anodal (red) and control (blue) groups"). Per-group N is
read from the data and shown in the legend; training day is 1-indexed (our day
0 = paper Day 1). Headless via exportgraphics. prev_f_full reproduces the
paper's own figure (anodal N=12 vs control N=12).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 01:28:44 -04:00
Experiments DB Dev 378ad6da05 analysis(matlab): add log(day) model + Cohen's f + power to every variation
Add variation_logpower.m (self-contained) + make_variation_logpower.m,
dropping logpowersim.m + logpower_result.txt into all 28 variation folders.
Matches the paper's power code: models behavior ~ stim + log(day) +
stim:log(day) + (1|rat) (log(day+1), since our day 0 = paper Day 1), reports
Cohen's f (partial eta^2 of the interaction) and the interaction under
residual/Satterthwaite/honest random-slope DF, then runs the Monte-Carlo power
sim on the log-day ground truth (per-animal cluster-honest + LME power).

Notable: under log(day) the accumulating divergence is captured more sharply,
so several full-window scenarios reach honest significance that were n.s. under
raw day (e.g. right_only_d0_13 honest p=0.003, unmerge_d0_13 0.021,
unmerge_d0_10 0.036); Cohen's f is small-medium (~0.10-0.34).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:37:50 -04:00
Experiments DB Dev bb5e2d88c0 analysis(matlab): add per-variation power simulation (powersim.m + power_result.txt)
Add variation_power.m (self-contained Monte-Carlo power for the paper's
stim x day interaction, using each folder's own data as ground truth; scores
per-animal cluster-honest power + LME power across N=[3..24] and effect
multipliers 1/0.5) and make_variation_power.m, which drops powersim.m into
every variations/<name>/ folder and runs it, writing power_result.txt beside
the existing data.csv/analyze.m/result.txt. Named powersim (not power) to
avoid shadowing the MATLAB builtin. All 28 folders processed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:57:25 -04:00
Experiments DB Dev 8a18c894dd feat(matlab): add Satterthwaite DF + honest random-slope test to LME reports
Every fitlme-based report (lme_*, paper_*, phase_*, and the variations'
analyze.m) now shows, per effect: residual-DF p, Satterthwaite-DF p, and --
for the interaction -- an HONEST test from a per-animal random-SLOPE model
(day|rat), whose Satterthwaite DF collapses toward the animal count.

New: tdcs_random_slope_interaction.m (shared helper). Wired into tdcs_lme,
tdcs_paper_lme, tdcs_phase_lme, variation_analyze; SUMMARY.csv gains
interaction_p_satt / interaction_p_rs. Regenerated all results/, variations/,
matched-effort outputs.

Key point this surfaces: Satterthwaite ~= residual on the random-INTERCEPT
model (the slope's error is at session level), so it does NOT fix
pseudoreplication; the random-slope model does. Effect: full-range mergeA2
interaction 0.009 -> 0.75 (collapses); unmerge_d0_5 0.015 -> 0.13 (n.s.);
the pooled-control early windows survive honestly (naive_a2_d0_5 0.001 ->
0.028; naive_boxa_d0_5 0.003 -> 0.036). Suite 42/42.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 15:45:19 -04:00
Experiments DB Dev 9af33e747e analysis(matlab): matched-effort comparison (prev _f full vs current 0-3)
Add make_matched_effort.m: pick the current-study day cutoff whose per-animal
cumulative attempts best match the previous (_f) study's full-span total
(~405 attempts/animal -> current days 0-3), then fit the paper LME on both.

Two variation folders (data.csv + analyze.m + result.txt):
  variations/prev_f_full/            b2_f vs a2_f, days 0-9  (24 rats)
  variations/matched_current_d0_3/   Box-B2 vs Box-A2, 0-3   (6 rats)

At matched cumulative effort both show a significant positive stim x day
interaction (prev p=0.008 +0.56/day; current-0-3 p=0.004 +10.2/day) -- the
tDCS acceleration replicates at equal practice, though the count slopes are
not directly comparable across datasets given differing attempts/session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 14:39:15 -04:00