ep_Ftest: Determines the expected power in a future study with...

View source: R/ep_Ftest.R

ep_FtestR Documentation

Determines the expected power in a future study with specified df for the future study based on the uncertainty associated with an existing study. Uses the F-test of the previous study as input in the sample size planning process.

Description

Determines the expected power in a future study with specified df for the future study based on the uncertainty associated with an existing study. Uses the F-test of the previous study as input in the sample size planning process.

Usage

ep_Ftest(
  Ftest,
  df1,
  df2,
  df2new,
  alpha = 0.05,
  filter = 0,
  upper_null = 0,
  estimate_fixed = TRUE,
  future_fixed = TRUE
)

Arguments

Ftest

The F-test of the previous study.

df1

The numerator degrees of freedom of the previous study. This must be the same in the previous and new study.

df2

The denominator degrees of freedom of the previous study.

df2new

The denominator degrees of freedom for the new study.

alpha

The significance level. Default is α = .05.

filter

The filter value reflects the probability of nonsignificant results being filtered. filter = 0 means that there is no filtering and you would have observed nonsignificant results. filter = 1 means that only significant results are observed and you would never have seen nonsigificant results if they had occurred. Filtering is based on alpha = .05 and assumes that are have observed a significant result. Filtering is conducted by weighting (actually filtering) the posterior distribution. For instance, if filter = 1, then the posterior of the null (i.e., the noncentrality parameter is 0) is up to 20 times more likely than when the noncentrality parameter is very large. Setting filter > 0 slows estimation.

upper_null

Specifies the upper value of the composite null hypothesis in units of Cohen's f. The default value of upper_null = 0 keeps the point null hypothesis. A value of, for instance, upper_null = .05 would remove all posterior values between -.05 and .05 from consideration when calculating expected power.

estimate_fixed

Specifies whether the predictor in the regression model is either fixed or random. The default is FALSE for random predictors.

future_fixed

Specifies whether the future study will have fixed predictors.

Value

Returns expected power for the prospective study.

Examples

## Not run: 
ep_Ftest(Ftest = 5.0, df1=2, df2=50, df2new=100, alpha = .05)

## End(Not run)

jbiesanz/fabs documentation built on July 15, 2022, 11:02 p.m.