Dear listserv,
Please consider the following dataset:
x <- matrix(nrow = 8, ncol = 2)
colnames(matrix) <- c("classification", "soluble_fiber")
x[1:4,1] <- "bagel"
x[5:8,1] <- "donut"
How would I simulate a dataset for a one-way fixed-effect ANOVA (where
"classification" is the treatment variable and "soluble_fiber" is the response
variable) such that the total sums of squares are equal to 1, and the treatment
sums of squares are equal to 0.1? In other words, I simply want to make up
"soluble_fiber" values for each observation (rows) such that an ANOVA of
"soluable_fiber" ~ "classification" yields total sums of squares = 1 and
treatment sums of squares = 0.1.
More generally, I'd like to develop some code that will let me simulate
datasets with different treatment sums of squares (ranging from 0.1 - 0.9)
while holding the total sums of squares constant (equal to 1).
Many thanks in advance for your suggestions. I recognize that this is as much a
statistical/mathematical question as an R programing question.
Sincerely,
-----------------------------------
Josh Banta, Ph.D
Assistant Professor
Department of Biology
The University of Texas at Tyler
Tyler, TX 75799
Tel: (903) 565-5655
http://plantevolutionaryecology.org
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.