Displaying 1 result from an estimated 1 matches for "cifcr0".
Did you mean:
cicrp
2013 Jan 10
2
Determining sample size from power function
...goal is to input a variety of values for theta and then for the power function to report the corresponding sample sizes. I haven't had much luck trying to create my own function, something along the lines of:
f <- function (x) {
power(N=z,a=6,f=6,pi=.5,alpha=.1,t0=10,theta=(1/x),CIFev0=.476,CIFcr0=0))=0.8
read(z)
}
In the above example, I am trying to fix the power at 0.80 and solve for z, which is the sample size. I would like x to be a random distribution of thetas. For instance:
x=rnorm(30,.5,.2)
and then receive the 30 corresponding sample sizes.
Thank you!
[[alternative HTML versi...