我正在尝试计算不平衡单向的功率分析(使用pwr包中R)ANOVA.我不确定如何适当地加权手段或解释不平衡的设计.我目前有:
groups = 4
Run Code Online (Sandbox Code Playgroud)
n = n 对于每个组(这里,组1的n1 = 12,组2的n2 = 8,组3的n3 = 9,n4 = 12)
between.var并within.var从ANOVA分析中得知:
(between.var=0.004363, within.var=0.003680)
Run Code Online (Sandbox Code Playgroud)
最后
平均值=(0.1513,0.1767,0.1676,0.1698).
任何帮助,将不胜感激.
使用加权平均值的说明如下:\n https://www.r-bloggers.com/r-tutorial-series-two-way-anova-with-unequal-sample-sizes/
\n\n#read the dataset into an R variable using the read.csv(file) function\n\ndataTwoWayUnequalSample <- read.csv(\xe2\x80\x9cdataset_ANOVA_TwoWayUnequalSample.csv\xe2\x80\x9d)\n\n#display the data\n\ndataTwoWayUnequalSample\nRun Code Online (Sandbox Code Playgroud)\n\n#使用 anova(object) 执行 I 型 SS 方差分析
\n\n#environment ANOVA\n\nanova(lm(math ~ environment * instruction, dataTwoWayUnequalSample))\n\n#instruction ANOVA\n\nanova(lm(math ~ instruction * environment, dataTwoWayUnequalSample))\nRun Code Online (Sandbox Code Playgroud)\n\n\n