aStat manual Open aStat

Tutorials

Each tutorial uses a built-in example, so you can follow along and check that you see the same answer. The datasets are simulated.

1. Compare feed additives (one-way ANOVA)

Thirty pens were assigned at random to a control or one of four feed additives, and weight gain was recorded for each pen.

  1. Open aStat and wait for R is ready.
  2. Choose Try an example → Feed additives vs control.
  3. The top suggestion is One-way ANOVA. Read its reasons, then press Run analysis.
  4. The answer reads: Additive affected WeightGain_kg (F(4, 25) = 3.90, p = 0.013).
  5. Scroll to Full results: the Tukey table shows which pairs of additives differ.
  6. Open Show the script to see the R code, and press Download .R to keep it.

2. Use barns as blocks (RCBD)

Four diets were tested in each of several barns. Barns differ, so they are blocks.

  1. Choose Try an example → Pig ADG, pens blocked by barn.
  2. aStat suggests Randomized complete block design because every diet appears in every barn. Press Run analysis.
  3. The answer reads: Diet affected ADG_kg, after allowing for Barn (F(3, 9) = 19.74, p < 0.001).
  4. The next line reports the relative efficiency of blocking: how much more precise the study was than if the barns had been ignored.

3. Ration and aging time (split-plot)

Each steer received one ration; cuts from each steer were aged for different times. Ration is applied to whole steers, aging time within each steer.

  1. Choose Try an example → Steer tenderness, ration x aging time.
  2. aStat suggests Split-plot, and explains why a plain two-factor ANOVA would overstate the evidence for ration.
  3. Press Run analysis. The first mixed-model run downloads extra tools, which can take a minute.
  4. The answer ends with: Aging affected it (F(2, 18) = 62.74, p < 0.001). Ration is tested against the variation between steers; aging time against the smaller variation within them.

4. Body weight over time (repeated measures)

Mares on two treatments were weighed repeatedly. Weights from the same mare are correlated, and the analysis must allow for that.

  1. Choose Try an example → Mare body weight over 70 days.
  2. aStat suggests Repeated measures. Leave the covariance setting on Pick the best fit automatically and press Run analysis.
  3. The answer starts: The difference between treatments in BW_kg changed over Day, followed by the days on which the treatments differed.
  4. The table Covariance structures compared shows the four structures tried; Toeplitz fits best for these data (lowest AIC).

5. Pregnancy rates by protocol (logistic model)

Heifers in six herds were synchronized with one of three protocols, and pregnancy was recorded as Yes or No, with body condition score (BCS) at breeding.

  1. Choose Try an example → Heifer pregnancy by protocol, in herds.
  2. aStat recognizes Pregnant as a yes/no outcome and suggests a logistic model with Protocol as the treatment, BCS as a covariate, and Herd as a random block (as SAS GLIMMIX would).
  3. Press Run analysis. The answer reads: Protocol affected the chance of Pregnant = Yes (χ²(2) = 7.15, p = 0.028).
  4. The details give each protocol's estimated pregnancy rate, the odds ratios between protocols, and how each extra BCS point changes the odds.

6. How many animals do I need? (power)

You plan to compare two diets and want to detect a 10 kg difference in weaning weight, with a standard deviation of 15 kg.

  1. Press Plan a study in the toolbar.
  2. The settings start with exactly this example: two groups, difference 10, standard deviation 15, power 0.8.
  3. Press Run analysis. The answer reads: You need 37 animals per group for 80% power to detect a medium effect (Cohen's d = 0.667).
  4. The power curve shows how power grows with the number of animals. Plan for a few more to allow for animals that drop out.