Port the unmerge_d0_5 fix (b6dc69c) into variation_plot.m: tight centred plot
box (Position [0.2 0.30 0.60 0.60]), TickDir out, and xticklabels('auto') --
which keeps x labels horizontal when they fit (<=~10 days) and auto-rotates
them when crowded (e.g. 14-day windows). Replaces the manual rotated-text hack.
Regenerated all learning-curve figures; removed the stray plotcurve.asv and
gitignored *.asv.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Refactor variation_{analyze,power,logpower,plot}.m to run both count and rate
metrics; plot x-axis labels vertical (xtickangle 90). SUMMARY.csv gains
interaction_p_rate / interaction_p_rs_rate.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
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>
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>