fsn {metafor} | R Documentation |
Function to calculate the fail-safe N.
fsn(yi, vi, sei, data=NULL, type="Rosenthal", alpha=.05, target=NULL, digits=4, subset=NULL)
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. |
type |
a vector indicating the method to use for the calculation of the fail-safe N. Possible options are "Rosenthal" , "Orwin" , or "Rosenberg" . See below for more details. |
alpha |
target alpha level to use for the Rosenthal and Rosenberg methods (.05 by default). |
target |
target average effect size to use for the Orwin method. If NULL , then the target average effect size will be equal to the observed average effect size divided by 2. |
digits |
an integer specifying the number of decimal places to which the printed results should be rounded (default is 4). |
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. |
The Rosenthal method 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 significance level (p-value) to a target alpha level (e.g., .05). The calculation is based on Stouffer's method to combine p-values and is described in Rosenthal (1979).
The Orwin method calculates the number of studies averaging null results that would have to be added to the given set of observed outcomes to reduce the (unweighted) average effect size to a target (unweighted) average effect size. The method is described in Orwin (1983).
The Rosenberg method calculates the number of studies averaging null results that would have to be added to the given set of observed outcomes to reduce significance level (p-value) of the (weighted) average effect size (based on a fixed-effects model) to a target alpha level (e.g., .05). The method is described in Rosenberg (2005).
An object of class "fsn"
. The object is a list containing the following components:
type |
the method used. |
fsnum |
the calculated fail-safe N. |
alpha |
the target alpha level. |
pval |
the p-value of the observed results. NA for the Orwin method. |
meanes |
the average effect size of the observed results. NA for the Rosenthal method. |
target |
the target effect size. NA for the Rosenthal and Rosenberg methods. |
The results are formated and printed with the print.fsn
function.
For the Rosenberg method, the p-value is calculated based on a standard normal distribution (instead of a t-distribution, as suggested by Rosenberg, 2005).
Wolfgang Viechtbauer; wvb@www.wvbauer.com; http://www.wvbauer.com/
Rosenthal, R. (1979) The "file drawer problem" and tolerance for null results. Psychological Bulletin, 86, 638–641.
Orwin, R. G. (1983) A fail-safe N for effect size in meta-analysis. Journal of Educational Statistics, 8, 157–159.
Rosenberg, M. S. (2005) The file-drawer problem revisited: A general weighted method for calculating fail-safe numbers in meta-analysis. Evolution, 59, 464–468.
### load BCG vaccine data data(dat.bcg) ### calculate log risk ratios and corresponding sampling variances dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) dat <- cbind(dat.bcg, dat) fsn(yi, vi, data=dat) fsn(yi, vi, data=dat, type="Orwin") fsn(yi, vi, data=dat, type="Rosenberg")