Learn R Programming

metafor (version 0.5-0)

fsn: Fail-Safe N

Description

Function to calculate Rosenthal's fail-safe N.

Usage

fsn(yi, vi, sei, data=NULL, subset=NULL, alpha=.05)

Arguments

yi
a vector with the observed effect sizes or outcomes.
vi
a vector with the corresponding sampling variances.
sei
a vector with the corresponding standard errors. (note: only one of the two, vi or sei, needs to be specified)
data
an optional data frame containing the variables given to the arguments above.
subset
an optional vector indicating the subset of studies that should be used for the calculation. This can be a logical vector of length $k$ or a numeric vector indicating the indices of the observations to include.
alpha
one-tailed alpha level (.05 by default).

Value

  • The fail-safe N value.

Details

The function calculates the number of studies averaging null results that would have to be added to the given set of observed outcomes to reduce the combined (one-sided) significance level to a desired alpha level (usually .05). The calculation is based on Stouffer's method to combine p-values and is described in Rosenthal (1979).

References

Rosenthal, R. (1979) The "file drawer problem" and tolerance for null results. Psychological Bulletin, 86, 638--641.

See Also

ranktest, trimfill

Examples

Run this code
### load BCG vaccine data
data(dat.bcg)

### calculate log risk rates and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
dat.bcg$yi <- dat$yi
dat.bcg$vi <- dat$vi

fsn(yi, vi, data=dat.bcg)

Run the code above in your browser using DataLab