Learn R Programming

PublicationBiasBenchmark (version 0.1.3)

method.WLS: WLS (Weighted Least Squares) Method

Description

Implements the Weighted Least Squares method for meta-analysis. WLS fits a weighted regression model with effect sizes as the outcome and weights based on the inverse of the squared standard errors. The intercept represents the weighted average effect size estimate.

Usage

# S3 method for WLS
method(method_name, data, settings = NULL)

Value

Data frame with WLS results

Arguments

method_name

Method name (automatically passed)

data

Data frame with yi (effect sizes) and sei (standard errors)

settings

List of method settings (no settings version are implemented)

References

Examples

Run this code
# Generate some example data
data <- data.frame(
  yi = c(0.2, 0.3, 0.1, 0.4, 0.25),
  sei = c(0.1, 0.15, 0.08, 0.12, 0.09)
)

# Apply WLS method
result <- run_method("WLS", data)
print(result)

Run the code above in your browser using DataLab