Description Usage Arguments Examples
Calculates linear trend contrast coefficients according to 4.2.4.
1 | ltContrast(f)
|
f |
A factor. |
1 2 3 4 5 6 7 8 9 10 11 | # example 4.23
is.factor(heartlung.pump$RPM) # TRUE
ltc <- ltContrast(heartlung.pump$RPM)
afr <- with(heartlung.pump, tapply(Y,RPM, mean))
# least squares estimate of linear contrast:
crossprod(afr,ltc)
# get msE:
lmHL <- lm(Y ~ RPM, heartlung.pump)
msE <- summary(lmHL)$sigma^2
# estimated standard error of the linear trend estimator:
sqrt(msE * sum(ltc^2/table(heartlung.pump$RPM)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.