covar.smd {dosresmeta}R Documentation

Computes mean and standardized mean differences for continuous outcome with corresponding co(variance) matrix


This internal function computes mean and standardized mean of a continuous outcome with the corresponding variances. It also reconstructs the covariance matrix from the available data.


covar.smd(y, sd, n, measure = "md", method = "cohens", data)



a vector defining the mean outcome for each treatment level.


a vector defining the standard deviation of the outcome for each treatment level.


a vector defining the number of subjects for each treatment level.


character string, indicating the measure to be calculated. Options are md and smd for mean difference and standardized mean difference, respectively.


character string indicating the method to be used. Options are cohens, hedges, and glass.


an optional data frame (or object coercible by to a data frame) containing the variables in the previous arguments.


This is an internal function called by dosresmeta to reconstruct the (co)variance matrix of the outcome variable. The function is expected to be extended and/or modified at every release of the package


A list containing the following

y mean or standardized mean differences for each treatment level, included the referent one (0 by calculation).
v variances corresponding to the mean or standardized mean differences for each treatment level, included the referent one (0 by calculation)
S co(variance) matrix for the non-referent mean or standardized mean differences.


Alessio Crippa,


Cooper, H., Hedges, L. V., & Valentine, J. C. (Eds.). (2009). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

See Also

covar.logrr, dosresmeta


## Loading the data

## Obtaining standardized mean differences, variances, and (co)varinace 
## matrix for the first study (id = 1)
covar.smd(y, sd, n, measure = "smd", data = subset(ari, id == 1))

## Obtaining mean differences, variances, and (co)varinace matrices for the all the studies <- by(ari, ari$id, function(x) covar.smd(y, sd, n, "md", data = x))

## Extracting mean differences
unlist(lapply(, function(x) x$y))
## Extracting variances for the mean differences
unlist(lapply(, function(x) x$v))
## List of the (co)variance matrices for the mean differences
lapply(, function(x) x$S)

[Package dosresmeta version 2.0.1 Index]