英文:
How to calculate sample size with R applying mixed model design
问题
我会进行神经影像研究(这可能是为了解决问题而进行的,也可能是帮助解决问题)。参与者需要填写一个问卷,该问卷将根据技术使用情况得出一个分数。这个分数有可能作为被试内变量使用,但这不是情况,因为我打算在模型中不进行分类使用。
我感兴趣的结果是每个被试在三种任务条件下的准确性。对于这三种任务条件中的每一种,都有两种不同种类的任务(因为它们本质上是相同的任务,只是需要关注不同类型的刺激)。因此,我假设我的被试内变量为:
- 被试内变量的数量(3个条件),对于每个变量,变量的水平数量(5/6种任务,因为其中一种是相同类型的任务的重复,意味着同一任务重复两次。因此,5对我来说是合适的选择)。
现在我的问题是,如果我将所有内容建模为:
准确性(因变量)在每个任务类型(5/6)/条件(3)~ 分数*任务条件(3)/任务类型(5/6)或分数+任务条件/任务类型(5/6)+性别
像下面这样的Manova研究的选择是否合适?如何基于以下参数进行计算:
效应大小 f = 0.314
功效 = 0.80
α = 0.05
并且没有进一步的参数?
您会推荐哪个包/函数?
谢谢
英文:
I would have a neuroimaging study (this possibly might be aside or help to figure out the problem). Participants are called to fill out a questionnaire, that turns a score in terms of technology usage. This would be used potentially as within-subjects variables, but this is not the case because I am to use it with no categorization in the model.
The outcome I am interested to use is the accuracy of each subject in a task where three task conditions are used. For each of these task conditions, two kinds of tasks exist (because they are essentially the same task with different kinds of stimuli to attend to). Thus, I assumed as my within-subjects variable with:
- Number of within-subjects variables (3 conditions) and for each variable, the number of levels of the variable (5/6 kinds of task because one of these is a repetition of the same task type, meaning the same task repeated twice. Thus, 5 should be the choice for me).
Now what I am asking is, in case I would model everything as
`Accuracy (dependent variable) in each Task Type(5/6)/ or Conditions (3) ~ score*Task Conditions(3)/Task Type (5/6) or score + Task Conditions)/Task Type (5/6) + Gender
Is the choice of a Manova study, like the following one, appropriate? How would you perform the calculation based on:
effect size f = 0.314
power = 0.80
alpha = 0.05
and no further parameters?
Which package/function would you recommend?
Thanks
答案1
得分: 1
你可能需要的是pwr
包,它可以进行样本大小和功效计算。
library(pwr)
pwr.anova.test(k=3, f=0.314, power=0.80, sig.level=0.05)
均衡单因素方差分析功效计算
k = 3
n = 33.59194
f = 0.314
sig.level = 0.05
power = 0.8
注意:n 是每组的样本数
英文:
What you need might be the pwr
package, which can do sample size and power calculations.
library(pwr)
pwr.anova.test(k=3,f = .314, power = 0.80, sig.level=0.05)
Balanced one-way analysis of variance power calculation
k = 3
n = 33.59194
f = 0.314
sig.level = 0.05
power = 0.8
NOTE: n is number in each group
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论