Description Usage Arguments Examples
Given point estimates and their variances for one or multiple original studies and one or more replication studies, returns a vector stating whether each replication estimate is in its corresponding prediction interval. Assumes no heterogeneity.
1 |
yio |
Effect estimate in the original study. Can be a vector for multiple original studies. |
vio |
Estimated variance of effect estimate in the original study (i.e., its squared standard error). Can be a vector for multiple original studies. |
yir |
Effect estimate in the replication study. Can be a vector for multiple replication studies. Can be omitted, in which case function returns only the prediction interval. |
vir |
Estimated variance of effect estimate in the replication study (i.e., its squared standard error). Can be a vector for multiple replication studies. |
level |
Coverage level of prediction interval. Typically 0.95. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # calculate prediction interval for a single replication study
pred_int( yio = 1, vio = .5, yir = 0.6,
vir = .2 )
# calculate prediction intervals for a one-to-one design
pred_int( yio = c(1, 1.3), vio = c(.01, .6),
yir = c(.6, .7), vir = c(.01,.3) )
# no need to pass yir if you only want the intervals
pred_int( yio = c(1, 1.3), vio = c(.01, .6),
vir = c(.01,.3) )
# calculate prediction intervals for a many-to-one design
pred_int( yio = c(1), vio = c(.01), yir = c(.6, .7), vir = c(.01,.3) )
|
$int.lo
[1] -0.6398235
$int.hi
[1] 2.639824
$rep.inside
[1] TRUE
$int.lo
[1] 0.7228192 -0.5593851
$int.hi
[1] 1.277181 3.159385
$rep.inside
[1] FALSE TRUE
$int.lo
[1] 0.7228192 -0.5593851
$int.hi
[1] 1.277181 3.159385
$rep.inside
[1] NA
$int.lo
[1] 0.72281924 -0.09126176
$int.hi
[1] 1.277181 2.091262
$rep.inside
[1] FALSE TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.