Description Usage Arguments Details Value Author(s) References See Also Examples
Reconstructs the covariance matrix for a set of (reported) log relative risks, given the number of cases and the number of total persons or person-years for each treatment (dose) level.
1 | covar.logrr(cases, n, y, v, type, data, covariance = "gl")
|
cases |
a vector, defining the number of cases for each exposure level. |
n |
a vector, defining the total number of subjects for each exposure level. For incidence-rate data |
y |
a vector, defining the (reported) log relative risks. |
v |
a vector, defining the variances of the reported log relative risks. |
type |
a vector (or a character string), specifying the design of the study. Options are
|
data |
an optional data frame (or object coercible by |
covariance |
method to approximate the coviariance among set of reported log relative risks, " |
This is an internal function called by dosresmeta
to reconstruct the (co)variance matrix of the (adjusted) log relative risks. The function
calls, depending on the choosen method, grl
(default) or hamling
to reconstruct the effective counts corresponding to the (adjusted) log
relative risks as well as their standard errors. From these it computes the covariance matrix; analytical formulas can be found in the referenced article.
The (co)variance matrix of the log relative risks.
Alessio Crippa, alessio.crippa@ki.se
Orsini, N., Li, R., Wolk, A., Khudyakov, P., Spiegelman, D. (2012). Meta-analysis for linear and nonlinear dose-response relations: examples, an evaluation of approximations, and software. American journal of epidemiology, 175(1), 66-73.
grl
, hamling
, covar.smd
, dosresmeta
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Loading data
data("alcohol_cvd")
## Obtaining the (co)variance matrix of log RR for the first study (id = 1)
covar.logrr(y = logrr, v = I(se^2), cases = cases, n = n, type = type,
data = subset(alcohol_cvd, id == 1))
## Obtaining the (co)variance matrices of log RRfor all study
by(alcohol_cvd, alcohol_cvd$id, function(x)
covar.logrr(y = logrr, v = I(se^2), cases = cases, n = n,
type = type, data = x))
## Restructuring the previous results in a list of matrices
do.call("list", by(alcohol_cvd, alcohol_cvd$id, function(x)
covar.logrr(y = logrr, v = I(se^2), cases = cases, n = n, type = type,
data = x)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.