Type: | Package |
Title: | Cluster Robust Wild Bootstrap Meta Regression |
Version: | 1.0 |
Date: | 2023-10-18 |
Author: | Michail Tsagris [aut, cre] |
Maintainer: | Michail Tsagris <mtsagris@uoc.gr> |
Depends: | R (≥ 4.0) |
Imports: | lmtest, Rfast2, sandwich, stats, utils |
Suggests: | clusterSEs |
Description: | In meta regression sometimes the studies have multiple effects that are correlated. For this reason cluster robust standard errors must be computed. However, since the clusters are unbalanced the wild bootstrap is suggested. See Oczkowski E. and Doucouliagos H. (2015). "Wine prices and quality ratings: a meta-regression analysis". American Journal of Agricultural Economics, 97(1): 103–121. <doi:10.1093/ajae/aau057> and Cameron A. C., Gelbach J. B. and Miller D. L. (2008). "Bootstrap-based improvements for inference with clustered errors". The Review of Economics and Statistics, 90(3): 414–427. <doi:10.1162/rest.90.3.414>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
NeedsCompilation: | no |
Packaged: | 2023-10-18 20:10:02 UTC; mtsag |
Repository: | CRAN |
Date/Publication: | 2023-10-19 08:10:05 UTC |
Cluster Robust Wild Bootstrap Meta Regression.
Description
In meta regression sometimes the studies have multiple effects that are correlated. For this reason cluster robust standard errors must be computed. However, since the clusters are unbalanced the wild bootstrap is suggested.
Details
Package: | crwbmetareg |
Type: | Package |
Version: | 1.0 |
Date: | 2023-10-18 |
License: | GPL-2 |
Maintainers
Michail Tsagris mtsagris@uoc.gr.
Author(s)
Michail Tsagris mtsagris@uoc.gr.
References
Chatzimichael K., Daskalaki C., Emvalomatis G., Tsagris M. and Vangelis Tzouvelekas V. (2023). Factors Shaping Innovative Behavior: A Meta-Analysis of Technology Adoption Studies in Agriculture. https://economics.soc.uoc.gr/el/market/998/factors-shaping-farmers-innovative-behavior-a-meta-analysis-of-technology-adoption-studies-in-agriculture
Oczkowski, E. and Doucouliagos, H. (2015). Wine prices and quality ratings: a meta-regression analysis. American Journal of Agricultural Economics, 97(1): 103-121.
Cameron, A. C., Gelbach, J. B. and Miller, D. L. (2008). Bootstrap-based improvements for inference with clustered errors. The Review of Economics and Statistics, 90(3): 414-427.
Column-wise weighted least squares meta analysis
Description
Column-wise weighted least squares meta analysis.
Usage
colwlsmeta(yi, vi)
Arguments
yi |
A matrix with the observations. |
vi |
A matrix with the variances of the observations. |
Details
The weighted least squares (WLS) meta analysis is performed in a column-wise fashion. This function is suitable for simulation studies, where one can perform multiple WLS meta analyses at once. See references for this.
Value
A vector with many elements. The fixed effects mean estimate, the \bar{v}
estimate, the I^2
, the H^2
, the Q test statistic and it's p-value,
the \tau^2
estimate and the random effects mean estimate.
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Stanley T. D. and Doucouliagos H. (2015). Neither fixed nor random: weighted least squares meta-analysis. Statistics in Medicine, 34(13), 2116–2127.
Stanley, T. D. and Doucouliagos, H. (2017). Neither fixed nor random: Weighted least squares meta-regression. Research synthesis methods, 8(1): 19–42.
See Also
Examples
y <- matrix( rnorm(50* 5), ncol = 5)
vi <- matrix( rexp(50* 5), ncol = 5)
colwlsmeta(y, vi)
wlsmeta(y[, 1], vi[, 1])
FAT-PET test using cluster robust wild bootstrap
Description
FAT-PET test using cluster robust wild bootstrap.
Usage
fatpet(target, se, cluster, weights, boot.reps = 1000, prog.bar = FALSE, seed = NULL)
Arguments
target |
A vector with the effect sizes. |
se |
A vector with the standard errors, or the variances, of the effect sizes. |
cluster |
A vector indicating the clusters. |
weights |
A vector with the inverse of the the variances of the effect sizes. |
boot.reps |
The number of bootstrap re-samples to generate. |
prog.bar |
If you want the progress bar to appear set this equal to TRUE. |
seed |
IF you want the results to be rerpoducible set this equal to TRUE. |
Details
It implements the FAT-PET test using cluster robust wild bootstrap to compute the p-values. See references for this.
The function uses a modification of the function "cluster.wild.glm()" of the package "clusterSEs".
Value
A vector with two p-values. One for the constant and one for the cofficient of the "vse".
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Oczkowski, E. and Doucouliagos, H. (2015). Wine prices and quality ratings: a meta-regression analysis. American Journal of Agricultural Economics, 97(1): 103–121.
Cameron, A. C., Gelbach, J. B. and Miller, D. L. (2008). Bootstrap-based improvements for inference with clustered errors. The Review of Economics and Statistics, 90(3): 414–427.
See Also
Examples
y <- rnorm(50)
se <- rexp(50, 3)
cluster <- sample(1:20, 50, replace = TRUE)
fatpet(y, se, cluster, weights = se^2, boot.reps = 500)
Meta regression using cluster robust wild bootstrap
Description
Meta regression using cluster robust wild bootstrap.
Usage
crwbmetareg(target, se, dataset, cluster, weights, boot.reps = 1000,
prog.bar = FALSE, seed = NULL)
Arguments
target |
A vector with the effect sizes. |
se |
A vector with the standard errors, or the variances, of the effect sizes. |
dataset |
A matrix or data.frame with the independent variables. |
cluster |
A vector indicating the clusters. |
weights |
A vector with the inverse of the the variances of the effect sizes. |
boot.reps |
The number of bootstrap re-samples to generate. |
prog.bar |
If you want the progress bar to appear set this equal to TRUE. |
seed |
IF you want the results to be rerpoducible set this equal to TRUE. |
Details
It implements metaregression using cluster robust wild bootstrap to compute the p-values. See references for this.
The function uses a modification of the function "cluster.wild.glm()" of the package "clusterSEs".
Value
A vector with two p-values. One for the constant and one for the cofficient of the "se".
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Oczkowski, E. and Doucouliagos, H. (2015). Wine prices and quality ratings: a meta-regression analysis. American Journal of Agricultural Economics, 97(1): 103–121.
Cameron, A. C., Gelbach, J. B. and Miller, D. L. (2008). Bootstrap-based improvements for inference with clustered errors. The Review of Economics and Statistics, 90(3): 414–427.
See Also
Examples
y <- rnorm(50)
se <- rexp(50, 3)
cluster <- sample(1:20, 50, replace = TRUE)
dataset <- matrix( rnorm(50 * 2), ncol = 2 )
fatpet(y, se, dataset, cluster, weights = se^2, boot.reps = 100)
Weighted least squares meta analysis
Description
Weighted least squares meta analysis.
Usage
wlsmeta(yi, vi)
Arguments
yi |
The observations. |
vi |
The variances of the observations. |
Details
It implements weighted least squares (WLS) meta analysis. See references for this.
Value
A vector with many elements. The fixed effects mean estimate, the \bar{v}
estimate, the I^2
, the H^2
, the Q test statistic and it's p-value,
the \tau^2
estimate and the random effects mean estimate.
Author(s)
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
References
Stanley T. D. and Doucouliagos H. (2015). Neither fixed nor random: weighted least squares meta-analysis. Statistics in Medicine, 34(13): 2116–2127.
Stanley, T. D. and Doucouliagos, H. (2017). Neither fixed nor random: Weighted least squares meta-regression. Research synthesis methods, 8(1): 19–42.
See Also
Examples
y <- rnorm(30)
vi <- rexp(30, 3)
wlsmeta(y, vi)