[R] how to determine power in my analysis?
Kristi Glover
kristi.glover at hotmail.com
Sat Nov 8 12:49:14 CET 2014
Hi R Users,
I was trying to determine whether I have enough samples and power in my analysis. Would you mind to provide some hints?. I found a several packages for power analysis but did not find any example data. I have two sites and each site has 4 groups. I wanted to test whether there was an effect of restoration activities and sites on the observed value. I used a two way factorial ANOVA and now I wanted to test the power of the analysis (whether the sample sizes are enough for the analysis? what are the alpha and power in the analysis using this data set? if it is not enough, how much samples should be collected for alpha 0.05 and power=0.8 and 0.9 for the analysis (two way factorial analysis).
The example data:data<-structure(list(observedValue = c(0.08, 0.53, 0.14, 0.66, 0.37, 0.88, 0.84, 0.46, 0.3, 0.61, 0.75, 0.82, 0.67, 0.37, 0.95, 0.73, 0.74, 0.69, 0.06, 0.97, 0.97, 0.07, 0.75, 0.68, 0.53, 0.72, 0.34, 0.12, 0.49, 0.77, 0.45, 0.07, 0.97, 0.34, 0.68, 0.48, 0.65, 0.7, 0.57, 0.66, 0.4, 0.29, 0.88, 0.36, 0.68, 0.32, 0.8, 0, 0.11, 0.48, 0.85, 0.94, 0.12, 0.12, 0, 0.89, 0.66, 0.2, 0.57, 0.09, 0.27, 0.81, 0.53, 0.09, 0.5, 0.41, 0.89, 0.47, 0.39, 0.85, 0.71, 0.89, 0.01, 0.71, 0.42, 0.72, 0.62, 0.3, 0.56, 0.99, 0.97, 0.03, 0.09, 0.27, 0.27, 0.94, 0.23, 0.97, 0.81, 0.95), condition = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), .Label = c("good", "medium", "poor", "verygood"), class = "factor"), areas = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("Restored", "unrestored"), class = "factor")), .Names = c("observedValue", "condition", "areas"), class = "data.frame", row.names = c(NA, -90L))
test= aov(observedValue~condition*areas,data=data)summary(test)
power of the analysis?
thanks for your help.
Sincerely, KG
[[alternative HTML version deleted]]
More information about the R-help
mailing list