power_estimate {InteractionPoweR} | R Documentation |
Power estimate
Description
Uses regression to estimate the value needed to attain the target power, given a set of simulation results.
Usage
power_estimate(power_data, x, power_target)
Arguments
power_data |
Output of power_interaction(). |
x |
The name of the target variable as a character string. |
power_target |
The desired power level. Must be between 0 and 1 (e.g., 0.8 for 80% power). |
Value
A data frame containing the value of x that achieves the target power for each combination of settings. Will return NA if target power is outside the simulation data.
Examples
simulation_results = power_interaction_r2(N=seq(100,300,by=10),
r.x1.y=0.2, r.x2.y=.2,r.x1x2.y=0.2,r.x1.x2=.2)
power_estimate(power_data = simulation_results, x = "N", power_target = .8)
[Package InteractionPoweR version 0.2.2 Index]