# NOT RUN {
set.seed(12345)
A = rlnorm(100)
# }
# NOT RUN {
hist(A)
# }
# NOT RUN {
### Convert data to normal scores by Elfving method
B = blom(A)
# }
# NOT RUN {
hist(B)
# }
# NOT RUN {
### Convert data to z scores
C = blom(A, method="zscore")
# }
# NOT RUN {
hist(C)
# }
# NOT RUN {
### Convert data to a scale of 1 to 10
D = blom(A, method="scale")
# }
# NOT RUN {
hist(D)
# }
# NOT RUN {
### 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)
# }
# NOT RUN {
hist(residuals(model))
plot(predict(model), residuals(model))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab