Power calculation

#1
Hi,
I am in need of some help on clarifying a power calculation to determine sample size for a trial.
The attached image shows a calculation that someone else completed and I am wanting to change a few factors including the true_diff/ delta to 1.

In the calculation, I just want clarification on the p_traditional and p_machine and what that is in reference to (the 0.8 and 0.9)? Do they have to be changed accordingly if I am changing delta?
 

Attachments

hlsmith

Less is more. Stay pure. Stay poor.
#3
One seems to be for a one-sided ttest and the other for comparing proportions between two groups with the functions default settings. Please be more specific. With what you have and want to do.
 
#4
One seems to be for a one-sided ttest and the other for comparing proportions between two groups with the functions default settings. Please be more specific. With what you have and want to do.
paste code in code block so can read maybe
Apologies for the lack of specificity:

Here is the code

base_sd_guess<-1.4
true_diff<-1
power.t.test (n=60, delta=true_diff, sd=base_sd_guess,type = "one.sample",alternative = "one.sided")

power.t.test (power=.8, delta=true_diff, sd=base_sd_guess,type = "one.sample",alternative = "one.sided")

sd(sample(1:5,10000, replace=TRUE))

p_traditional<-0.9
p_machine <-0.8



The goal is to determine the sample size for a volunteer trial that will be rating something from 1 to 5. We need to gain a power of > 0.8, with a significant difference of 1.

Thanks for your help in advance!
 

hlsmith

Less is more. Stay pure. Stay poor.
#5
And you plan to treat these discrete data as continuous and use a ttest? Also, a one-sided test is always considered a very strong assumption.
 
#6
I am not sure about how we plan to treat it? I think it would be discrete as people would be choosing a whole number between 1 and 5?

How come a one-sided test is a strong assumption? What would you suggest otherwise?
 

hlsmith

Less is more. Stay pure. Stay poor.
#7
One-sided infers the one group will only be better - you are throwing out the possibility of the other group being better. Doing one-sided also puts all of alpha on one-side, making it easier to find a difference, and if the alpha isn't corrected a slight risk for type I errors may be possible.