STR: Studentized residuals by leave-one-out analysis

View source: R/STR.r

STRR Documentation

Studentized residuals by leave-one-out analysis

Description

Calculating the studentized residuals by leave-one-out analysis (studentized deleted residuals) and the percentiles of their bootstrap distributions.

Usage

STR(y, v, method="REML", data, B=2000, alpha=0.95, seed=123456)

Arguments

y

A vector of the outcome measure estimates (e.g., MD, SMD, log OR, log RR, RD)

v

A vector of the variance estimate of y

method

A logical value specifying the estimation method (default: REML). The same options as those available for the method argument of the rma function in the metafor package can be used (e.g., FE for the fixed-effect model, SJ for the Sidik–Jonkman method, and PM for the Paule–Mandel method).

data

An optional data frame containing the variables y and v.

B

The number of bootstrap resampling (default: 2000)

alpha

The bootstrap percentiles to be outputted; 0.5(1-alpha)th and (1-0.5(1-alpha))th pecentiles. Default is 0.95; 2.5th and 97.5th percentiles are calculated.

seed

A numeric value that determines the random seed for reproducibility (default: 123456).

Value

The studentized residuals by leave-one-out analysis. The outputs are ordered by the sizes of the studentized residuals.

  • id: ID of the study.

  • psi: The studentized residuals by leave-one-out analysis (studentized deleted residuals).

  • Q1: 0.5(1-alpha)th percentile for the bootstrap distribution of the studentized residual (default: 2.5th percentile).

  • Q2: 1-0.5(1-alpha)th percentile for the bootstrap distribution of the studentized residual (default: 97.5th percentile).

Examples

require(metafor)
data(PPI)

edat1 <- escalc(ai=d1,n1i=n1,ci=d2,n2i=n2,measure="OR",data=PPI)

STR(yi, vi, data=edat1, B=10)
# Random-effects model (REML estimation).
# This is an example command for illustration. B should be >= 1000.

STR(yi, vi, data=edat1, method="SJ",B=10)
# Random-effects model (Sidik–Jonkman method).
# This is an example command for illustration. B should be >= 1000.

STR(yi, vi, data=edat1, method="FE",B=10)
# Fixed-effects model.
# This is an example command for illustration. B should be >= 1000.

boutliers documentation built on Nov. 26, 2025, 9:06 a.m.