View source: R/pc_power_fast.r
pc_power_fast | R Documentation |
Estimate power for proportion conflict effect using monte-carlo simulation
pc_power_fast( subjects, mc_c_nmst, mc_nc_nmst, mnc_c_nmst, mnc_nc_nmst, num_sims = 1000, alpha = 0.05 )
subjects |
A number for the number of subjects in simulated experiment |
mc_c_nmst |
A vector for mostly conflict (mc), conflict trials (c) containing the parameters for an ex-gaussian distribution, c(n, mu, sigma, tau), where n is the number of trials. |
mc_nc_nmst |
A vector for mostly conflict (mc), conflict trials (c) containing the parameters for an ex-gaussian distribution, c(n, mu, sigma, tau), where n is the number of trials. |
mnc_c_nmst |
A vector for mostly no-conflict (mnc), conflict trials (c) containing the parameters for an ex-gaussian distribution, c(n, mu, sigma, tau), where n is the number of trials. |
mnc_nc_nmst |
A vector for mostly no-conflict (mnc), conflict trials (c) containing the parameters for an ex-gaussian distribution, c(n, mu, sigma, tau), where n is the number of trials. |
num_sims |
A number, simulations to run |
alpha |
A number, alpha criterion |
This function uses monte-carlo simulation to determine statistical power associated for detecting a proportion conflict effect, specifically a difference between two conflict effect, typically based on a manipulation of the proportion of conflict and no-conflict trials.
For every simulated experiment, a one sample t-test (two-tailed) is computed, and the p-value is saved. Power is the proportion of simulated experiments that return p-values less than the defined alpha criterion.
A number, power: the proportion of simulated experiments that returned a p-value less than the alpha criterion for the conflict effect
pc_power_fast(subjects=10, mc_c_nmst = c(80,550,100,100), mc_nc_nmst = c(20,500,100,100), mnc_c_nmst = c(20,570,100,100), mnc_nc_nmst = c(80,500,100,100), num_sims = 1000, alpha = .05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.