power.anova.test package:stats R Documentation(latin1) _P_o_w_e_r _c_a_l_c_u_l_a_t_i_o_n_s _f_o_r _b_a_l_a_n_c_e_d _o_n_e-_w_a_y _a_n_a_l_y_s_i_s _o_f _v_a_r_i_a_n_c_e _t_e_s_t_s _D_e_s_c_r_i_p_t_i_o_n: Compute power of test or determine parameters to obtain target power. _U_s_a_g_e: power.anova.test(groups = NULL, n = NULL, between.var = NULL, within.var = NULL, sig.level = 0.05, power = NULL) _A_r_g_u_m_e_n_t_s: groups: Number of groups n: Number of observations (per group) between.var: Between group variance within.var: Within group variance sig.level: Significance level (Type I error probability) power: Power of test (1 minus Type II error probability) _D_e_t_a_i_l_s: Exactly one of the parameters 'groups', 'n', 'between.var', 'power', 'within.var', and 'sig.level' must be passed as NULL, and that parameter is determined from the others. Notice that 'sig.level' has non-NULL default so NULL must be explicitly passed if you want it computed. _V_a_l_u_e: Object of class '"power.htest"', a list of the arguments (including the computed one) augmented with 'method' and 'note' elements. _N_o_t_e: 'uniroot' is used to solve power equation for unknowns, so you may see errors from it, notably about inability to bracket the root when invalid arguments are given. _A_u_t_h_o_r(_s): Claus Ekstroem _S_e_e _A_l_s_o: 'anova', 'lm', 'uniroot' _E_x_a_m_p_l_e_s: power.anova.test(groups=4, n=5, between.var=1, within.var=3) # Power = 0.3535594 power.anova.test(groups=4, between.var=1, within.var=3, power=.80) # n = 11.92613 ## Assume we have prior knowledge of the group means: groupmeans <- c(120, 130, 140, 150) power.anova.test(groups = length(groupmeans), between.var=var(groupmeans), within.var=500, power=.90) # n = 15.18834