set.seed(12345)
A = rlnorm(100)
if (FALSE) hist(A)
### Convert data to normal scores by Elfving method
B = blom(A)
if (FALSE) hist(B)
### Convert data to z scores
C = blom(A, method="zscore")
if (FALSE) hist(C)
### Convert data to a scale of 1 to 10
D = blom(A, method="scale")
if (FALSE) hist(D)
### Data from Sokal and Rohlf, 1995,
### Biometry: The Principles and Practice of Statistics
### in Biological Research
Value = c(709,679,699,657,594,677,592,538,476,508,505,539)
Sex = c(rep("Male",3), rep("Female",3), rep("Male",3), rep("Female",3))
Fat = c(rep("Fresh", 6), rep("Rancid", 6))
ValueBlom = blom(Value)
Sokal = data.frame(ValueBlom, Sex, Fat)
model = lm(ValueBlom ~ Sex * Fat, data=Sokal)
anova(model)
if (FALSE) {
hist(residuals(model))
plot(predict(model), residuals(model))
}
Run the code above in your browser using DataLab