# Method: Rotarod Test Analyzer (method version 1.0.0)

## Calculation

For each animal, from the latency to fall of every trial:

1. **Daily mean latency** = mean of the day's trial latencies.
2. **RPM at fall** (accelerating protocols). For each trial, the rod speed when the animal fell: start RPM + (end RPM − start RPM) × latency / ramp duration, and the end RPM for a fall after the ramp. The day's value is the mean over its trials.
3. **Area under the learning curve (AUC)** = trapezoid-rule integral of the daily mean latency against day, in s × days.
4. **Group statistics**: mean, standard deviation (n − 1 denominator) and SEM = SD / √n of daily mean latencies (per day, for the learning curve), of AUC, and of each animal's longest latency.

## Conventions

- Latencies are in seconds. A latency above the trial cutoff (maximum trial duration) is recorded as the cutoff when it is typed into the form or uploaded in a CSV; changing the cutoff later does not re-cap trials already entered.
- An animal tested on only one day has no AUC. The AUC table shows "—", the AUC CSV leaves it blank, and the animal is left out of the AUC group comparison.
- On a fixed-speed rod no RPM at fall is reported.

## Worked examples

Five cases in `cases.json`: RPM at fall on a ramp, a day's RPM from a trial within the ramp and one after it, a three-day AUC, one day of testing (edge case), and an uploaded latency above the cutoff (edge case).

## References

- Deacon RM. Measuring motor coordination in mice. Journal of Visualized Experiments. 2013;(75):e2609. https://doi.org/10.3791/2609 (accelerating rod: 4 rpm start, constant acceleration, 40 rpm maximum)

The AUC summary and the cutoff rule are this tool's conventions.

## Changes from the page before this record

- RPM at fall was computed from the day's mean latency. Once a trial runs past the ramp, that gives a speed the animal never fell at: trials of 150 s and 360 s on a 4-40 RPM, 300 s ramp gave 34.6 RPM, where the trials' own speeds average 31 RPM. It is now computed per trial and then averaged. When every latency is within the ramp the two methods agree.
- Latencies uploaded in a CSV were not capped at the trial cutoff, while typed latencies were. Both are capped now.
- An animal tested on one day got that day's latency as its AUC, which entered the AUC group mean. It now has no AUC and is left out.
