Besag & Kempton (1986); Schabenberger & Gotway (2005) eqs (6.12)-(6.13):
with first differences within a column homoscedastic and uncorrelated,
Delta Z = Delta X tau + Delta e is an OLS model. Differencing removes the
intercept, so treatment effects are contrasts with the first level, and
sigma2 is the residual sum of squares over n - rank(X).
Usage
fdiffm(z, treatment, column = NULL, row = NULL)
Arguments
- z
Numeric responses.
- treatment
Treatment label of each plot.
- column
Optional column of each plot; differences within a column.
- row
Optional row of each plot, the order within a column.
Value
Named list: levels, tau, se, sigma2, df, n_differences.
References
Besag, J. & Kempton, R. (1986). Biometrics 42, 231-251.
Schabenberger & Gotway (2005), eqs (6.12)-(6.13), p. 320.
Examples
fdiffm(c(1, 2.2, 2.9, 4.1, 5.3, 5.8), rep(c("a", "b"), 3))$tau
#> [1] 0.2