Title: | Multivariate Dose-Response Meta-Analysis |
---|---|
Description: | Estimates dose-response relations from summarized dose-response data and to combines them according to principles of (multivariate) random-effects models. |
Authors: | Alessio Crippa [aut, cre] |
Maintainer: | Alessio Crippa <[email protected]> |
License: | GPL-2 |
Version: | 2.1.1 |
Built: | 2025-02-07 03:57:31 UTC |
Source: | https://github.com/alecri/dosresmeta |
It consists of a collection of functions to estimate dose-response relations from summarized dose-response data for both continuous and binary outcomes, and to combine them according to principles of (multivariate) random-effects model.
Dose-response meta-analysis represents a specific type of meta-analysis. Aim of such analysis is to reconstruct and combine study-specific curves from summarized dose-response data. Greenland and Longnecker originally developed the methodology in 1992 for pooling associations from epidemiological studies of binary outcomes. Extensions are currently proposed for other types of outcomes (e.g. continuous) from others study design, such as clinical trials.
The summarized dose-response data are most often presented in a tabular way, reporting the levels of the exposure (doses) and the corresponding outcome variable.
The latter is usually expressed as contrast to the unexposed or baseline category (referent level). Examples are (log) relative risks, (log) odds ratios,
(log) incidence rate ratios, mean differences, and standardized mean differences. Thus the outcome cannot be regarded as independent and a (co)variance matrix needs
to be provided or approximated from the available data.See covar.smd
and covar.logrr
for more details.
The pooled dose-response association can be estimated using two different approaches. The former consists of a two-stage procedure, where the study-specific trend
are first estimated and then pooled across studies. Assuming is the vector of non-referent outcome values in each of
studies, and
the related matrix of
transformations of the exposure (typically
), the dose-response model can be written as
with = (co)variance of
known (available or
reconstructed from the available data).
The
are then combined according to principles of (multivariate) random-effects meta-analytical models
where and
indicate, respectively, the within study (co)variance (obtained in the first stage analysis) and the between study (co)variance.
The alternative approach, instead, consists of a one-stage (also known as pool-first) procedure. The data are pooled by concatenating the vector and
vectors (or matrices)
. The (multivariate) random effects-model can be written as
where represents the fixed-effects parameter,
the vector (or matrix) of unobserved random-effects for thei-th study, and
coincides with
.
The marginal model has a co(variance) matrix equal to
, where
is the block diagonal (co)variance with i-th diagonal block
.
The two approaches provide similar results, despite the two-stage procedure may be more stable and faster in terms of convergence. In both the procedures the
aim is to estimate the coefficients and, for random-effects models, the components of the between-study (co)variance matrix
.
Different estimators are implemented in the package. The estimation options available are
Fixed-effects
Maximum likelihood (ML)
Restricted maximum likelihood (REML)
Method of moments (currently available only for the two-stage procedure)
The fixed-effects model is fitted through generalized least squares (GLS), assuming the (co)variance structure, composed by the within-study error only, as completely known. Among random-effects models, ML and REML approaches provides fit criteria and inferential test derived from likelihood theory, such as AIC and likelihood ratio test, purticularly useful in a one-stage procedure. Further details on estimation methods are given in the related help pages.
The structure of the package and the internal functions resemble those of the mixmeta
package. See mixmeta-package
for a general overview.
The main function is dosresmeta
, which performs the various models illustrated above. The function returns a list object of class
"dosresmeta
" (see dosresmetaObject
).
The estimation is carried out internally through dosresmeta.fit
, a wrapper which prepares the data and calls specific estimation functions
for fitting the models, depending on the chosen procedure. For the two-stage procedure, the second part of the analysis is performed using the function mixmeta.fit
while estimators for random-effects models are implemented in the functions dosresmeta.ml
and dosresmeta.reml
for
(restricted) maximum likelihood. For likelihood-based methods, iterative optimizations algorithms are used for maximizing
the (restricted) likelihood. Fitting parameter options are set by dosresmeta.control
.
Method functions are available for objects of class "dosremeta
" (see dosresmetaObject
for a complete list). The method summary
produces a list of class "summary.dosremeta
" for summarizing the fit of the model and providing additional results. The method function predict
computes predicted values, optionally for a set of new values of the predictors. blup
gives the (empirical) best linear unbiased predictions for the unobserved random-effects.
Other default or specific method functions for regression can be used on objects of class "dosremeta
", such as logLik
, AIC
and BIC
, among others.
The method function qtest.dosresmeta
(producing an object with class of the same name) performs the Cochran Q test for (residual) heterogeneity currently appropriate only for the two-stage approach.
Printing functions for the objects of classes defined above are also provided. Other functions are used internally in the source code, and not exported in the namespace. For users interested in getting into details of the package structure, these functions can be displayed using the triple colon (':::') operator. For instance, dosresmeta:::glsfit displays the code of the function glsfit.
The package includes the datasets alcohol_crc
, alcohol_cvd
, ari
, and cc_ex
as data frames,
which are used in the examples.
Use citation("dosresmeta") to cite this package.
Alessio Crippa, [email protected]
Alessio Crippa, Nicola Orsini (2016). Multivariate Dose-Response Meta-Analysis: The dosresmeta R Package. Journal of Statistical Software, Code Snippets, 72(1), 1-15.doi:10.18637/jss.v072.c01
Greenland, S., Longnecker, M. P. (1992). Methods for trend estimation from summarized dose-response data, with applications to meta-analysis. American journal of epidemiology, 135(11), 1301-1309.
Orsini, N., Bellocco, R., Greenland, S. (2006). Generalized least squares for trend estimation of summarized dose-response data. Stata Journal, 6(1), 40.
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.
Gasparrini, A., Armstrong, B., Kenward, M. G. (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine, 31(29), 3821-3839.
The dataset reports the summarized dose-response results from eight prospective studies on the relation between alcohol intake and colorectal cancer risk.
A data frame with 48 observations on the following 7 variables:
id |
label for author's names (id variable). |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
peryears |
amount of person-time for each exposure level. |
logrr |
natural logarithm of the adjusted "relative risks". |
se |
standard error for the logarithm of the adjusted "relative risks". |
Alessio Crippa, <[email protected]>
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.
The dataset reports the summarized dose-response results from six observational studies on the relation between alcohol intake and vascular disease risk. Four are case-control studies, two prospective (cumulative-incidence data).
A data frame with 25 observations on the following 8 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author of the study. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects for each exposure level. |
logrr |
natural logarithm of the adjusted "relative risks". |
se |
standard error for the logarithm of the adjusted "relative risks". |
Alessio Crippa, <[email protected]>
Liu, Q., Cook, N. R., Bergstrom, A., Hsieh, C. C. (2009). A two-stage hierarchical regression model for meta-analysis of epidemiologic nonlinear dose-response data. Computational Statistics & Data Analysis, 53(12), 4157-4167.
The dataset reports the summarized dose-response results from fourteen case-control studies on the relation between alcohol consumption and esophageal squamous cell carcinoma.
A data frame with 63 observations on the following 8 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
type |
code for study design. |
cases |
number of cases for each exposure level. |
n |
total number of subjects for each exposure level. |
dose |
assigned dose levels. |
logrr |
natural logarithm of the adjusted odds ratio. |
se |
standard error for the logarithm of the adjusted odds ratio |
Alessio Crippa, <[email protected]>
Rota M, Bellocco R, Scotti L, Tramacere I, Jenab M, Corrao G, La Vecchia C, Boffetta P, Bagnardi V. Random-effects meta-regression models for studying nonlinear dose-response relationship, with an application to alcohol and esophageal squamous cell carcinoma. Statistics in medicine. 2010 Nov 20;29(26):2679-87.
The dataset reports the summarized dose-response results from four prospective studies on the relation between alcohol intake and lunger cancer.
A data frame with 20? observations on the following 7 variables:
id |
label for author's names (id variable). |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
peryears |
amount of person-time for each exposure level. |
logrr |
natural logarithm of the adjusted "relative risks". |
se |
standard error for the logarithm of the adjusted "relative risks". |
Alessio Crippa, <[email protected]>
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.
The dataset reports the summarized dose-response results from five clinical trials on the relation between different levels of aripiprazole and severety of schizophrenia measured usign the PANSS medical score.
A data frame with 18 observations on the following 6 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author of the studies. |
dose |
assigned dose level of aripiprazole (0 for placebo group). |
y |
outcome variable: change in PANNS score after and before treatment. |
sd |
standard deviation of y for each exposure level. |
n |
total number of subjects for each exposure level. |
Alessio Crippa, <[email protected]>
Crippa, A., Orsini, N. Dose-response meta-analysis of differences in means. BMC medical research methodology. 2016 Aug 2;16(1):91.
This method function computes (empirical) best linear unbiased predictions from fitted dose-response meta-analytical models represented in objects of class "dosresemta".
## S3 method for class 'dosresmeta' blup(object, ...)
## S3 method for class 'dosresmeta' blup(object, ...)
object |
objects of classe " |
... |
further arguments passed to or from other methods. |
The method function blup produces (empirical) best linear unbiased predictions from dosresmeta objects. Predictions are expressed in terms of study-specific deviations as random effects. Predicted random effects from blup are a shrunk version of study-specific realizations, where study-specific predictions borrow strength from the assumption of an underlying distribution in a (usually hypothetical) population of studies. Blup are not avaialable for fixed-effects models since the are meaningless in that context.
## Load data and run the linear and quadratic models data("alcohol_cvd") lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) quadr <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## blup prediction for the previous models blup(lin) blup(quadr)
## Load data and run the linear and quadratic models data("alcohol_cvd") lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) quadr <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## blup prediction for the previous models blup(lin) blup(quadr)
The dataset reports the summarized dose-response results from four cases-control studies on the relation Body Mass Index and renal cell cancer
A data frame with 33 observations on the following 13 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author and year of publication. |
type |
code for study design. |
interval |
intervals for the categories of bmi. |
bmi |
assigned bmi levels. |
case |
number of cases for each exposure level. |
control |
number of controls for each exposure level. |
n |
total number of subjects for each exposure level. |
or |
adjusted odds ratios for each exposure level. |
lb_or |
lower bound for the confidence limits of the adjusted odds ratios. |
ub_or |
upper bound for the confidence limits of the adjusted odds ratios. |
logor |
natural logarithm of the adjusted odds ratios. |
se_logor |
standard error for the logarithm of the adjusted odds ratios. |
Alessio Crippa, <[email protected]>
Liu, Q., Cook, N. R., Bergstrom, A., Hsieh, C. C. (2009). A two-stage hierarchical regression model for meta-analysis of epidemiologic nonlinear dose-response data. Computational Statistics & Data Analysis, 53(12), 4157-4167.
The dataset reports the summarized dose-response results from a case-control study on alcohol and breast cancer, first presented by Rohan and McMichael.
A data frame with 4 observations on the following 10 variables:
gday |
label for exposure levels. |
dose |
assigned dose levels. |
case |
number of cases for each exposure level. |
control |
number of controls for each exposure level. |
n |
total number of subjects for each exposure level. |
crudeor |
unadjusted odds ratios for each exposure level. |
adjrr |
adjusted odds ratios for each exposure level. |
lb |
lower bound for the confidence limits of the adjusted odds ratios. |
ub |
upper bound for the confidence limits of the adjusted odds ratios. |
logrr |
natural logarithm of the adjusted odds ratios. |
Alessio Crippa, <[email protected]>
Rohan, T. E., McMichael, A. J. (1988). Alcohol consumption and risk op breast cancer. International journal of cancer, 41(5), 695-699.
Greenland, S., Longnecker, M. P. (1992). Methods for trend estimation from summarized dose-response data, with applications to meta-analysis. American journal of epidemiology, 135(11), 1301-1309.
The dataset reports the summarized dose-response results from a cumlative-incidence study on high-fat dairy food intake and risk of colorectal cancer, first presented by Larsson, Bergkvist, and Wolk (2005).
A data frame with 5 observations on the following 8 variables:
dose |
assigned dose levels. |
case |
number of cases for each exposure level. |
n |
total number of subjects for each exposure level. |
adjrr |
adjusted risk ratios for each exposure level. |
lb |
lower bound for the confidence limits of the adjusted risk ratios. |
ub |
upper bound for the confidence limits of the adjusted risk ratios. |
logrr |
natural logarithm of adjusted risk ratios. |
se |
standard error for the logarithm of the adjusted risk ratios. |
Alessio Crippa, <[email protected]>
Larsson, S. C., L. Bergkvist, and A. Wolk. (2005). High-fat dairy food and conjugated linoleic acid intakes in relation to colorectal cancer incidence in the Swedish Mammography Cohort. American Journal of Clinical Nutrition 82: 894-900.
Greenland, S., Longnecker, M. P. (1992). Methods for trend estimation from summarized dose-response data, with applications to meta-analysis. American journal of epidemiology, 135(11), 1301-1309.
These method functions return the estimated fixed-effects coefficients and their (co)variance matrix for fitted
dose-response meta-analytical models represented in objects of class "dosresmeta
".
## S3 method for class 'dosresmeta' coef(object, format = c("vector", "matrix"), ...) ## S3 method for class 'dosresmeta' vcov(object, ...)
## S3 method for class 'dosresmeta' coef(object, format = c("vector", "matrix"), ...) ## S3 method for class 'dosresmeta' vcov(object, ...)
object |
an object of class " |
format |
format of the returned object. |
... |
further arguments passed to or from other methods. |
For coef
, a vector (default) or matrix with the estimated (fixed-effects) coefficients.
For vcov
, the (co)variance matrix of the estimated (fixed-effects) coefficients.
Alessio Crippa, [email protected]
dosresmeta
, coef
, vcov
, logLik.dosresmeta
## Load data and run the model data("alcohol_cvd") model <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Fixed-effect coefficients coef(model) ## Fixed-effect (co)variance matrix vcov(model)
## Load data and run the model data("alcohol_cvd") model <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Fixed-effect coefficients coef(model) ## Fixed-effect (co)variance matrix vcov(model)
The dataset reports the summarized dose-response results from eight prospective studies on the relation between coffee consumption and cancer mortality.
A data frame with 59 observations on the following 11 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci") or person-years (type = "ir") for each exposure level. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
gender |
factor variable for the gender of the partecipants. |
area |
factor variable for the study location. |
Alessio Crippa, <[email protected]>
Crippa A, Discacciati A, Larsson SC, Wolk A, Orsini N. Coffee Consumption and Mortality from All Causes, Cardiovascular Disease, and Cancer: A Dose-Response Meta-Analysis. Am J Epidemiol. 2014 Aug 24. pii: kwu194.
The dataset reports the summarized dose-response results from thirteen prospective studies on the relation between coffee consumption and cardiovascular mortality.
A data frame with 100 observations on the following 12 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci") or person-years (type = "ir") for each exposure level. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
gender |
character variable for the gender of the partecipants. |
area |
character variable for the study location. |
smoking |
character variable for the type of smoking adjustment. |
Alessio Crippa, <[email protected]>
Crippa A, Discacciati A, Larsson SC, Wolk A, Orsini N. Coffee Consumption and Mortality from All Causes, Cardiovascular Disease, and Cancer: A Dose-Response Meta-Analysis. Am J Epidemiol. 2014 Aug 24. pii: kwu194.
The dataset reports the summarized dose-response results from twenty-one prospective studies on the relation between coffee consumption and all-cause mortality.
A data frame with 109 observations on the following 11 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci") or person-years (type = "ir") for each exposure level. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
gender |
factor variable for the gender of the partecipants. |
area |
factor variable for the study location. |
Alessio Crippa, <[email protected]>
Crippa A, Discacciati A, Larsson SC, Wolk A, Orsini N. Coffee Consumption and Mortality from All Causes, Cardiovascular Disease, and Cancer: A Dose-Response Meta-Analysis. Am J Epidemiol. 2014 Aug 24. pii: kwu194.
The dataset reports the summarized dose-response results from two additional prospective studies on the relation between coffee consumption and all-cause mortality. The studies do not report information on the number of cases and participants/person-time.
A data frame with 109 observations on the following 11 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci") or person-years (type = "ir") for each exposure level. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
gender |
factor variable for the gender of the partecipants. |
area |
factor variable for the study location. |
Alessio Crippa, <[email protected]>
Crippa A, Discacciati A, Larsson SC, Wolk A, Orsini N. Coffee Consumption and Mortality from All Causes, Cardiovascular Disease, and Cancer: A Dose-Response Meta-Analysis. Am J Epidemiol. 2014 Aug 24. pii: kwu194.
The dataset reports the summarized dose-response results from eleven prospective studies on the relation between coffee consumption and risk of stroke.
A data frame with 68 observations on the following 12 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author of the studies. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci") or person-years (type = "ir") for each exposure level. |
rr |
adjusted risk estimates for each exposure level. |
lb |
lower bound for the confidence limits of the adjusted risk estimates. |
ub |
upper bound for the confidence limits of the adjusted risk estimates. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
nordic |
indicator variable for the study to be conducted in the nordic countries (1 = yes). |
Alessio Crippa, <[email protected]>
Larsson, S. C., Orsini, N. (2011). Coffee consumption and risk of stroke: a dose-response meta-analysis of prospective studies. American journal of epidemiology, 174(9), 993-1001.
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.
covar.logrr(cases, n, y, v, type, data, covariance = "gl")
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, [email protected]
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
## 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)))
## 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)))
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)
covar.smd(y, sd, n, measure = "md", method = "cohens", data)
y |
a vector defining the mean outcome for each treatment level. |
sd |
a vector defining the standard deviation of the outcome for each treatment level. |
n |
a vector defining the number of subjects for each treatment level. |
measure |
character string, indicating the measure to be calculated. Options are |
method |
character string indicating the method to be used. Options are |
data |
an optional data frame (or object coercible by |
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, [email protected]
Cooper, H., Hedges, L. V., & Valentine, J. C. (Eds.). (2009). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.
## Loading the data data("ari") ## 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 cov.md <- by(ari, ari$id, function(x) covar.smd(y, sd, n, "md", data = x)) ## Extracting mean differences unlist(lapply(cov.md, function(x) x$y)) ## Extracting variances for the mean differences unlist(lapply(cov.md, function(x) x$v)) ## List of the (co)variance matrices for the mean differences lapply(cov.md, function(x) x$S)
## Loading the data data("ari") ## 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 cov.md <- by(ari, ari$id, function(x) covar.smd(y, sd, n, "md", data = x)) ## Extracting mean differences unlist(lapply(cov.md, function(x) x$y)) ## Extracting variances for the mean differences unlist(lapply(cov.md, function(x) x$v)) ## List of the (co)variance matrices for the mean differences lapply(cov.md, function(x) x$S)
The function dosresmeta
estimates a dose-response curve from either single or multiple summarized dose-response data, taking into account
the correlation among observations and heterogeneity across studies. The function dosresmeta.fit
is a wrapper for actual fitting functions based on
different estimation methods, usually called internally. See dosresmeta-package
for an overview.
dosresmeta(formula, id, v, type, cases, n, sd, data, mod = ~1, intercept = F, center = T, se, lb, ub, covariance = "gl", method = "reml", proc = "2stage", Slist, method.smd = "cohen", control = list()) dosresmeta.fit(X, Z, y, Slist, id, method, control, proc, mod, v, data)
dosresmeta(formula, id, v, type, cases, n, sd, data, mod = ~1, intercept = F, center = T, se, lb, ub, covariance = "gl", method = "reml", proc = "2stage", Slist, method.smd = "cohen", control = list()) dosresmeta.fit(X, Z, y, Slist, id, method, control, proc, mod, v, data)
formula |
an object of class " |
id |
an vector to specify the id variable for the studies included in the analysis. Optional if estimating a dose-response model from a single study. |
v |
a vector to specify the variances of the reported outcome. Alternatively the user can provide the standard error in the |
type |
an optional vector (or a string) required when the outcome is log relative risks. It specifies the study-specific design.
The values for case-control, incidence-rate, and cumulative incidence data are |
cases |
a vector to specify the number of cases for each exposure level. Required to reconstruct the (co)variance matrix for log relative risks. |
n |
a vector to specify the total number of subjects for each exposure level. Required to reconstruct the (co)variance matrix for log relative risks.
For incidence-rate data |
sd |
a vector to specify the standard deviation. Required to reconstruct the (co)variance matrix for differences and standardized mean differences. |
data |
a data frame (or object coercible by |
mod |
an object of class " |
intercept |
a logical value to specify if an intercept term needs to be included in the model. See details. |
center |
a logical value to specify if the design matrix need to be center at the referent ones. See details. |
se |
an optional vector to specify the standard error of the reported log relative risks; needed if |
lb |
an optional vector to specify the lower bound of the confidence interval for the reported relative risks; needed if |
ub |
an optional vector to specify the upper bound of the confidence interval for the reported relative risks; needed if |
covariance |
method to approximate the (co)variance matrix of the outcome. Options are " |
method |
method used to estimate the (pooled) dose-response relation: " |
proc |
" |
Slist |
list of approximated or given (co)variance matrices. |
method.smd |
character string indicating the method to be used. Options are |
control |
list of parameters for controlling the fitting process. These are passed to |
X |
processed design matrix of fixed effects. |
Z |
processed design matrix of random effects. |
y |
processed outcome vector. |
The function defines all the elements required to estimate a dose-response association taking into account the correlation among the observations.
If the (co)variance matrix is not provided then it is approximated depending of the type of outcome specified through the covariance
argument.
The dose-response model is specified in the formula
. Typically the outcome is expressed as a contrast to a reference exposure level, so that the model
does not have an intercept and the values in the design matrix need to be centered at the referent values, as described by Qin Liu et al, 2009.
This is internally done, respectively, when intercept = FALSE
and center = TRUE
(default values).
The function calls the wrapper dosresmeta.fit
to perform the actual fitting. The latter prepares the data and calls specific fitting functions,
depending on the chosen procedure and method. For the two stages procedure, the second part of the analysis is performed using the function mixmeta.fit
from the mixmeta
package. Different estimator are implemented in the package. The estimation options available are
Fixed-effects
Maximum likelihood (ML)
Restricted maximum likelihood (REML)
Method of moments (currently available only for the two stage procedure)
The fitting procedure can be controlled through the additional terms specified in control, which are passed to the function dosresmeta.control
.
The dosresmeta
function typically returns a list of object of class dosresmeta
representing the meta-analytical model fit,
as described in dosresmetaObject
.
Alessio Crippa, [email protected]
Greenland, S., Longnecker, M. P. (1992). Methods for trend estimation from summarized dose-response data, with applications to meta-analysis. American journal of epidemiology, 135(11), 1301-1309.
Orsini, N., Bellocco, R., Greenland, S. (2006). Generalized least squares for trend estimation of summarized dose-response data. Stata Journal, 6(1), 40.
Liu, Q., Cook, N. R., Bergstrom, A., Hsieh, C. C. (2009). A two-stage hierarchical regression model for meta-analysis of epidemiologic nonlinear dose-response data. Computational Statistics & Data Analysis, 53(12), 4157-4167.
Gasparrini, A., Armstrong, B., Kenward, M. G. (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine, 31(29), 3821-3839.
dosresmeta-package
, mixmeta
, covar.logrr
, covar.smd
## First example: Single case-control study ## Linear trend estimation data("cc_ex") ## Fitting the model mod1 <- dosresmeta(formula = logrr ~ dose, type = "cc", cases = case, n = n, lb = lb, ub = ub, data= cc_ex) summary(mod1) ## Results predict(mod1, delta = 1, expo = TRUE) ## Second example: Multiple studies ## Linear and quadratic trend using random-effects meta-analysis data("alcohol_cvd") ## Linear trend lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) summary(lin) ## Predicted linear trend predict(lin, delta = 1, expo = TRUE) ## Non-linear (quadratic) trend quadr <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) summary(quadr) ## Graphical results with(predict(quadr, expo = TRUE, order = TRUE), { plot(dose, pred, log = "y", type = "l", xlim = c(0, 45), ylim = c(.4, 2)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) }) ## Third example: Continous outcome (smd) data("ari") mod3 <- dosresmeta(formula = y ~ dose + I(dose^2), id = id, sd = sd, n = n, covariance = "smd", data = ari) summary(mod3) ## Graphical results newdata <- data.frame(dose = seq(0, 30, 1)) with(predict(mod3, newdata, order = TRUE), { plot(dose, pred, type = "l", ylim = c(0, .6)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) })
## First example: Single case-control study ## Linear trend estimation data("cc_ex") ## Fitting the model mod1 <- dosresmeta(formula = logrr ~ dose, type = "cc", cases = case, n = n, lb = lb, ub = ub, data= cc_ex) summary(mod1) ## Results predict(mod1, delta = 1, expo = TRUE) ## Second example: Multiple studies ## Linear and quadratic trend using random-effects meta-analysis data("alcohol_cvd") ## Linear trend lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) summary(lin) ## Predicted linear trend predict(lin, delta = 1, expo = TRUE) ## Non-linear (quadratic) trend quadr <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) summary(quadr) ## Graphical results with(predict(quadr, expo = TRUE, order = TRUE), { plot(dose, pred, log = "y", type = "l", xlim = c(0, 45), ylim = c(.4, 2)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) }) ## Third example: Continous outcome (smd) data("ari") mod3 <- dosresmeta(formula = y ~ dose + I(dose^2), id = id, sd = sd, n = n, covariance = "smd", data = ari) summary(mod3) ## Graphical results newdata <- data.frame(dose = seq(0, 30, 1)) with(predict(mod3, newdata, order = TRUE), { plot(dose, pred, type = "l", ylim = c(0, .6)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) })
This internal function sets the parameter options used for fitting dose-response meta-analytical models,
commonly to pre-specified default values. It is usually internally called by dosresmeta.fit
.
The function has many more arguments than needed for dosresmeta. For more details see mixmeta.control
.
dosresmeta.control(optim = list(), showiter = FALSE, maxiter = 100, initPsi = NULL, Psifix = NULL, Scor = NULL, addSlist = NULL, inputna = FALSE, inputvar = 10^4, loglik.iter = "hybrid", igls.inititer = 10, gr = FALSE, hessian = FALSE, vc.adj = TRUE, reltol = sqrt(.Machine$double.eps), checkPD = NULL, set.negeigen = sqrt(.Machine$double.eps))
dosresmeta.control(optim = list(), showiter = FALSE, maxiter = 100, initPsi = NULL, Psifix = NULL, Scor = NULL, addSlist = NULL, inputna = FALSE, inputvar = 10^4, loglik.iter = "hybrid", igls.inititer = 10, gr = FALSE, hessian = FALSE, vc.adj = TRUE, reltol = sqrt(.Machine$double.eps), checkPD = NULL, set.negeigen = sqrt(.Machine$double.eps))
optim |
list of parameters passed to the control argument of the function optim, which performs the quasi-Newton optimization in likelihood-based
random-effects models. See |
showiter |
logical. If |
maxiter |
positive interger value. Maximum number of iterations in methods involving optimization procedures. |
initPsi |
either a matrix or a vector of its lower triangular elements (with diagonal, taken by column) from which starting
values of the parameters of the between-study (co)variance matrix are derived, used in the optimization procedure for likelihood-based random-effects models.
If |
Psifix |
either a matrix or a vector of its lower triangular elements (with diagonal, taken by column), or optionally a named list with one or more of such objects. Used to define fixed parts of the random-effects |
Scor |
either a scalar, vector or matrix representing the within-unit correlation(s) to be inputted when the covariances are not provided in multivariate models, and ignored if they are. |
addSlist |
a list of m matrices for the (outer-level) groups of units defining the (known) error (co)variance structure, when this cannot be passed through the argument S of mixmeta. |
inputna |
logical. If missing values must be internally inputted. To be used with caution. |
inputvar |
multiplier for inputting the missing variances, to be passed as an argument to inputna. |
loglik.iter |
iterative scheme used in in likelihood-based optimization routines. Options are "hybrid", "newton", and "igls" or "RIGLS". |
igls.inititer |
number of iteration of the iterative generalized least square algorithm to be run in the hybrid optimization procedure of linkelihood-based models to provide the starting value. |
gr |
indicates if the gradient of the (re)ml likelihood should be provided. FALSE by default. |
hessian |
logical. If TRUE, the Hessian matrix of the parameters estimated in the optimization process is computed and returned. Only applicable to likelihood-based estimation methods. |
vc.adj |
logical. If TRUE, an adjustement to the way the marginal variance part is computed in the (co)variance components estimator is applied in the variance components estimator. |
reltol |
relative convergence tolerance in methods involving optimization procedures. The algorithm stops if it is unable to
reduce the value by a factor of |
checkPD |
logical. Determines if the semi-positiveness of within-unit error or random-effects (co)variance matrices must be checked. |
set.negeigen |
positive value. Value to which negative eigenvalues are to be set in estimators where such method is used to force semi-positive definiteness of the estimated between-study (co)variance matrix. |
A list with components named as the arguments.
Alessio Crippa, [email protected]
Gasparrini, A., Armstrong, B., Kenward, M. G. (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine, 31(29), 3821-3839.
dosresmeta
, dosresmeta-package
, dosresmeta.control
## Loading data data("alcohol_cvd") ## print the iterations (see ?optim) and change the default for starting values dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd, proc = "1stage", control = list(showiter = TRUE, igls.inititer = 20))
## Loading data data("alcohol_cvd") ## print the iterations (see ?optim) and change the default for starting values dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd, proc = "1stage", control = list(showiter = TRUE, igls.inititer = 20))
This function implements a generalized least square estimator for fixed-effects dose-response meta-analysis. It is meant to be used internally and not directly run by the users.
dosresmeta.fixed(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...)
dosresmeta.fixed(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...)
Xlist |
a m-dimensional list of study-specific design matrices for the fixed-effects part of the model. |
Zlist |
a m-dimensional list of study-specific design matrices for the random-effects part of the model. |
ylist |
a m-dimensional list of study-specific of vectors of estimated outcomes. |
Slist |
a m-dimensional list of within-study (co)variance matrices of estimated outcomes. |
nalist |
a m-dimensional list of k-dimensional study-specific logical vectors, identifying missing outcomes. |
q , nall
|
numeric scalars: number of predictors, number of observations (excluding missing). |
control |
list of parameters for controlling the fitting process, usually internally set to default values by |
... |
further arguments passed to or from other methods. Currently not used. |
The estimation involves only the fixed-effects coefficients. The routine is based on a standard generalized least square (GLS) algorithm
implemented in the internal function glsfit. The between-study (co)variance matrix is set to zero, so the marginal (co)variance matrix, composed only by
elements of the within-study component, is assumed as completely known. Similarly to the likelihood-based estimators implemented in
dosresmeta.ml
and dosresmeta.reml
, the computation involves Cholesky and and QR decompositions for computational stability and efficiency.
This function returns an intermediate list object, whose components are then processed by dosresmeta.fit
. Other components are
added later through mixmeta to finalize an object of class "dosresmeta
".
Alessio Crippa, [email protected]
Gasparrini, A., Armstrong, B., Kenward, M. G. (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine, 31(29), 3821-3839.
dosresmeta
, dosresmeta-package
, dosresmeta.ml
data("alcohol_crc") ## Fixed-effect dose-response model assuming linearity dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = peryears, data = alcohol_crc, method = "fixed")
data("alcohol_crc") ## Fixed-effect dose-response model assuming linearity dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = peryears, data = alcohol_crc, method = "fixed")
These functions implement maximum likeliihood (ML) and restricted maximum likelihood (REML) estimators for random-effects dose-response meta-analysis. They are meant to be used internally and not directly run by the users.
dosresmeta.ml(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...) dosresmeta.reml(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...)
dosresmeta.ml(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...) dosresmeta.reml(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...)
Xlist |
a m-dimensional list of study-specific design matrices for the fixed-effects part of the model. |
Zlist |
a m-dimensional list of study-specific design matrices for the random-effects part of the model. |
ylist |
a m-dimensional list of study-specific of vectors of estimated outcomes. |
Slist |
a m-dimensional list of within-study (co)variance matrices of estimated outcomes. |
nalist |
a m-dimensional list of k-dimensional study-specific logical vectors, identifying missing outcomes. |
q |
numeric scalars: number of predictors, number of observations (excluding missing). |
nall |
numeric scalars: number of predictors, number of observations (excluding missing). |
control |
list of parameters for controlling the fitting process, usually internally set to default values by |
... |
further arguments passed to or from other methods. Currently not used. |
The estimation involves fixed-effects coefficients and the
random-effects parameters defining the between-study (co)variance matrix.
The hybrid estimation procedure is based first on few runs of iterative generalized least square algorithm and then quasi-Newton iterations,
using specific likelihood functions, until convergence. The estimation algorithm adopts a profiled (or concentrated) approach, that is expressed
only in terms of the random-effects parameters. Cholesky and and QR decompositions are used for computational stability and efficiency, and for assuring the
positive-definiteness of the estimated between-study (co)variance matrix. See the help page for the likelihood functions for further details.
These functions return an intermediate list object, whose components are then processed by dosresmeta.fit
. Other components are added later
through dosresmeta
to finalize an object of class "dosresmeta
".
Alessio Crippa, [email protected]
Gasparrini, A., Armstrong, B., Kenward, M. G. (2012). Multivariate meta-analysis for non-linear and other multi-parameter associations. Statistics in Medicine, 31(29), 3821-3839.
dosresmeta
, dosresmeta-package
, dosresmeta.ml
data("alcohol_cvd") ## Random-effect dose-response model assuming linearity, ML estimator lin.ml <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd, , method = "ml") summary(lin.ml) ## Random-effect dose-response model assuming linearity, REML estimator lin.reml <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd, , method = "reml") summary(lin.reml)
data("alcohol_cvd") ## Random-effect dose-response model assuming linearity, ML estimator lin.ml <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd, , method = "ml") summary(lin.ml) ## Random-effect dose-response model assuming linearity, REML estimator lin.reml <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd, , method = "reml") summary(lin.reml)
An object returned by dosresmeta
function, inheriting
from class "dosresmeta
", and representing a fitted dose-response
(meta-analytical) model.
Objects of class "dosresmeta
" are lists with defined
components. Dimensions of such components differs according to the choosen
procedure. For the one-stage analysis the dimensions refer to a one
dimensional outcome, predictors and
studies used for fitting
the model. For the two-stage analysis the dimensions refer to
outcome parameters, no predictor (only the intercept) and
studies.
The following components needs to be included in a legitimate dosresmeta object:
coefficients |
a -dimensional vector of the fixed-effects coefficients. |
vcov |
estimated (co)variance matrix of the fixed-effects coefficients. |
Psi |
for random-effects models, the estimated between-study (co)variance matrix. |
residuals |
a vector of residuals, that is observed minus fitted values. |
fitted.values |
a vector of of fitted mean values. |
df.residual |
the residual degrees of freedom. |
rank |
the numeric rank of the fitted model. |
logLik |
the (restricted) log-likelihood of the fitted model. |
converged,niter |
for models with iterative estimation methods, logical scalar indicating if the algorithm eventually converged, and number of iterations. |
control |
a list with the values of the control arguments used, as returned by dosresmeta.control . |
method |
the estimation method. |
dim |
list with the following scalar components: (number of studies included in estimation, (number of outcome parameters),
(number of predictors). |
df |
list with the following scalar components: nall (number of observations used for estimation, excluding missing values), nobs (equal to nall, minus the number of fixed-effects coefficients in REML models), fixed (number of estimated fixed-effects coefficients), random (number of estimated (co)variance terms). |
lab |
list with the following label vectors: for the p predictors (including intercept). |
model |
the model frame used for fitting. |
call |
the function call. |
formula |
the model supplied. |
terms |
the terms object representing the fitted model. |
proc |
the estimation procedure. |
center |
if the desing matrix had been centered. |
covariance |
how the (co)variance had been appproximated. |
Slist |
list of approximated (co)variance matrices. |
id |
identification vector of the studies. |
v |
variances of the outcome values |
A number of methods functions are available for dosresmeta
objects, most of them common to other regression functions.
Specifically-written method functions are defined for predict (standard predictions). The qtest method performs the Cochran Q test for heterogeneity only for a two-stage analysis.
Other methods have been produced for summary, logLik, coef, and vcov. Printing functions for the objects of classes defined above are also provided.
All the methods above are visible (exported from the namespace) and documented. In additions, several default method functions for regression are also
applicable to objects of class "mixmeta", such as fitted, residuals, AIC, BIC and update, among others.
Alessio Crippa, [email protected]
dosresmeta
, dosresmeta-package
, mixmetaObject
The dataset reports the summarized dose-response results from six studies on the relation between fish consumption and rheumatoid arthritis risk
A data frame with 22 observations on the following 12 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci") or person-years (type = "ir") for each exposure level. |
dose |
assigned dose levels. |
rr |
adjusted risk estimates. |
lrr |
lower bound for the confidence limits of the adjusted risk estimates. |
urr |
upper bound for the confidence limits of the adjusted risk estimates. |
logrr |
natural logarithm of the adjusted odds ratio. |
se |
standard error for the logarithm of the adjusted odds ratio |
Alessio Crippa, <[email protected]>
Di Giuseppe D, Crippa A, Orsini N, Wolk A. Fish consumption and risk of rheumatoid arthritis: a dose-response meta-analysis. Arthritis research & therapy. 2014 Sep 30;16(5):446.
Computes the different combinations of p usefull for evaluating two-order fractional polynomials.
fpgrid(p = c(-2, -1, -0.5, 0, 0.5, 1, 2, 3))
fpgrid(p = c(-2, -1, -0.5, 0, 0.5, 1, 2, 3))
p |
a numeric vector with the coefficient to be combined. |
A data.frame with the different combinations of p.
Alessio Crippa, [email protected]
Royston, Patrick, and Douglas G. Altman. "Regression using fractional polynomials of continuous covariates: parsimonious parametric modelling." Applied Statistics (1994): 429-467.
grd <- fpgrid() head(grd)
grd <- fpgrid() head(grd)
Two-order fractional polynomials transformation for continuous covariates.
fracpol(x, p = c(1, 1), shift, scale, scaling = TRUE)
fracpol(x, p = c(1, 1), shift, scale, scaling = TRUE)
x |
a numeric vector. |
p |
a vector of length 2 with the powers of x to be included. |
shift |
optional scalar representing the shift, if |
scale |
optional scalar representing the scale, if |
scaling |
a logical indicating if the measurements are scaled prior to model fitting. |
The fracpol
is based on the FP
function in the mboost
package.
See help(FP)
for more details.
A matrix including the trasformations corresponding to the input values.
Alessio Crippa, [email protected]
Royston, Patrick, and Douglas G. Altman. "Regression using fractional polynomials of continuous covariates: parsimonious parametric modelling." Applied Statistics (1994): 429-467.
mboost
, rcs.eval
## Load data and run the model data("alcohol_cvd") with(alcohol_cvd, fracpol(dose, p = c(.5, .5))) model <- dosresmeta(formula = logrr ~ fracpol(dose, p = c(.5, .5)), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Test for significance of the overall dose-response association waldtest(b = coef(model), Sigma = vcov(model), Terms = 1:nrow(vcov(model)))
## Load data and run the model data("alcohol_cvd") with(alcohol_cvd, fracpol(dose, p = c(.5, .5))) model <- dosresmeta(formula = logrr ~ fracpol(dose, p = c(.5, .5)), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Test for significance of the overall dose-response association waldtest(b = coef(model), Sigma = vcov(model), Terms = 1:nrow(vcov(model)))
This function computes statistics to evaluate the goodness-of-fit for dose-response meta-analysis. It implements the deviance test, the coefficient of determination, and a dataframe useful for a decorrelated residuals-versus-exposure plot. See reference for more details
gof(object, fixed = TRUE) ## S3 method for class 'gof.dosresmeta' print(x, digits = 3, ...)
gof(object, fixed = TRUE) ## S3 method for class 'gof.dosresmeta' print(x, digits = 3, ...)
object |
an object of class |
fixed |
logical for selecting fixed model. By default equal to |
x |
an object of class |
digits |
an integer specifying the number of digits to which printed results must be rounded. |
... |
further arguments passed to or from other methods. |
A list of class gof.dosresmeta
containing the following
tdata |
a dataframe with the decorrelated variables (y*, X*, e*). |
R2 |
Coefficient of determination R^2. |
deviance |
Deviance test. |
Alessio Crippa, [email protected]
Discacciati A, Crippa A, Orsini N. Goodness of fit tools for dose-response meta-analysis of binary outcomes. Research synthesis methods. 2015 Jan 1.
## Loading the data data("milk_ov") ## Linear dose-response model lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = case, n = n, data = milk_ov) ## Display goodness-of-fit statistics gof(lin) ## Meta-regression model lin_reg <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = case, n = n, data = milk_ov, mod = ~ type) ## Display goodness-of-fit statistics for meta-regression model gof(lin_reg)
## Loading the data data("milk_ov") ## Linear dose-response model lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = case, n = n, data = milk_ov) ## Display goodness-of-fit statistics gof(lin) ## Meta-regression model lin_reg <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = case, n = n, data = milk_ov, mod = ~ type) ## Display goodness-of-fit statistics for meta-regression model gof(lin_reg)
Reconstructs the set of pseudo-numbers (or 'effective' numbers) of cases and non-cases consistent with the input data (log relative risks). The method was first proposed in 1992 by Greenland and Longnecker.
grl(y, v, cases, n, type, data, tol = 1e-05)
grl(y, v, cases, n, type, data, tol = 1e-05)
y |
a vector, defining the (reported) log relative risks. |
v |
a vector, defining the variances of the reported log relative risks. |
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 |
type |
a vector (or a character string), specifying the design of the study. Options are
|
data |
an optional data frame (or object coercible by |
tol |
define the tolerance. |
The function reconstructs the effective counts corresponding to the multivariable adjusted log relative risks as well as their standard errors. A unique solution is guaranteed by keeping the margins of the table of pseudo-counts equal to the margins of the crude or unadjusted data (Greenland and Longnecker 1992). See the referenced article for a complete description of the algorithm implementation.
The results are returned structured in a matrix
A |
approximated number of effective cases. |
N |
approximated total number of effective subjects. |
Alessio Crippa, [email protected]
Greenland, S., Longnecker, M. P. (1992). Methods for trend estimation from summarized dose-response data, with applications to meta-analysis. American journal of epidemiology, 135(11), 1301-1309.
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.
## Loading data data("alcohol_cvd") ## Obtaining pseudo-counts for the first study (id = 1) grl(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = subset(alcohol_cvd, id == 1)) ## Obtaining pseudo-counts for all study by(alcohol_cvd, alcohol_cvd$id, function(x) grl(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)) ## Restructuring the previous results in a matrix do.call("rbind", by(alcohol_cvd, alcohol_cvd$id, function(x) grl(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)))
## Loading data data("alcohol_cvd") ## Obtaining pseudo-counts for the first study (id = 1) grl(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = subset(alcohol_cvd, id == 1)) ## Obtaining pseudo-counts for all study by(alcohol_cvd, alcohol_cvd$id, function(x) grl(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)) ## Restructuring the previous results in a matrix do.call("rbind", by(alcohol_cvd, alcohol_cvd$id, function(x) grl(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)))
Reconstructs the set of pseudo-numbers (or "effective" numbers) of cases and non-cases consistent with the input data (log relative risks). The method was first proposed in 2008 by Hamling.
hamling(y, v, cases, n, type, data)
hamling(y, v, cases, n, type, data)
y |
a vector, defining the (reported) log relative risks. |
v |
a vector, defining the variances of the reported log relative risks. |
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 |
type |
a vector (or a character string), specifying the design of the study. Options are
|
data |
an optional data frame (or object coercible by |
The function reconstructs the effective counts corresponding to the multivariable adjusted log relative risks as well as their standard errors. A unique solution is guaranteed by keeping the ratio non-cases to cases and the fraction of unexposed subjects equal to the unadjusted data (Hamling). See the referenced article for a complete description of the algorithm implementation.
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, [email protected]
Hamling, J., Lee, P., Weitkunat, R., Ambuhl, M. (2008). Facilitating meta-analyses by deriving relative effect and precision estimates for alternative comparisons from a set of estimates presented by exposure level or disease category. Statistics in medicine, 27(7), 954-970.
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.
## Loading data data("alcohol_cvd") ## Obtaining pseudo-counts for the first study (id = 1) hamling(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = subset(alcohol_cvd, id == 1)) ## Obtaining pseudo-counts for all study by(alcohol_cvd, alcohol_cvd$id, function(x) hamling(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)) ## Restructuring the previous results in a matrix do.call("rbind", by(alcohol_cvd, alcohol_cvd$id, function(x) hamling(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)))
## Loading data data("alcohol_cvd") ## Obtaining pseudo-counts for the first study (id = 1) hamling(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = subset(alcohol_cvd, id == 1)) ## Obtaining pseudo-counts for all study by(alcohol_cvd, alcohol_cvd$id, function(x) hamling(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)) ## Restructuring the previous results in a matrix do.call("rbind", by(alcohol_cvd, alcohol_cvd$id, function(x) hamling(y = logrr, v = I(se^2), cases = cases, n = n, type = type, data = x)))
The dataset reports the summarized dose-response results from incidence-rate data investigating the association between the long-term intake of dietary fiber and risk of coronary heart disease among women, first presented by Wolk et al. (1999)
A data frame with 5 observations on the following 8 variables:
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects for each exposure level. |
adjrr |
adjusted incidence rate ratios for each exposure level. |
lb |
lower bound for the confidence limits of the adjusted incidence rate ratios. |
ub |
upper bound for the confidence limits of the adjusted incidence rate ratios. |
logrr |
natural logarithm of adjusted incidence rate ratios. |
se |
standard error for the logarithm of the adjusted incidence rate ratios. |
Alessio Crippa, <[email protected]>
Wolk, A., J. E. Manson, M. J. Stampfer, G. A. Colditz, F. Hu, F. E. Speizer, C. H. Hennekens, and W. C. Willett. 1999. Long-term intake of dietary fiber and decreased risk of coronary heart disease among women. Journal of the American Medical Association 281: 1998-2004.
Greenland, S., Longnecker, M. P. (1992). Methods for trend estimation from summarized dose-response data, with applications to meta-analysis. American journal of epidemiology, 135(11), 1301-1309.
This method function returns the log-likelihood for fitted dose-response models represented in objects of class "dosresmeta
".
## S3 method for class 'dosresmeta' logLik(object, ...)
## S3 method for class 'dosresmeta' logLik(object, ...)
object |
an object of class " |
... |
further arguments passed to or from other methods. |
A numeric scalar of class "logLik"
.
Alessio Crippa, [email protected]
dosresmeta
, dosresmeta-package
, logLik
data("alcohol_crc") ## Dose-response model assuming linearity lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = peryears, data = alcohol_crc, proc = "1stage") ## Log-likelihood ll <- logLik(lin) ll attributes(ll) ## AIC and BIC AIC(ll) BIC(ll)
data("alcohol_crc") ## Dose-response model assuming linearity lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = peryears, data = alcohol_crc, proc = "1stage") ## Log-likelihood ll <- logLik(lin) ll attributes(ll) ## AIC and BIC AIC(ll) BIC(ll)
The dataset reports the summarized dose-response results from eleven prospective studies on the relation between milk consumption and all-cause mortality.
A data frame with 50 observations on the following 12 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci") or person-years (type = "ir") for each exposure level. |
rr |
adjusted risk estimates. |
lb |
lower bound for the confidence limits of the adjusted risk estimates. |
ub |
upper bound for the confidence limits of the adjusted risk estimates. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
Alessio Crippa, <[email protected]>
Larsson SC, Crippa A, Orsini N, Wolk A, Michaelsson K. Milk consumption and mortality from all causes, cardiovascular disease, and cancer: a systematic review and meta-analysis. Nutrients. 2015 Sep 11;7(9):7749-63.
The dataset reports the summarized dose-response results from nine studies on the relation between milk consumption and ovarian cancer.
A data frame with 37 observations on the following 12 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose |
assigned dose levels. |
case |
number of cases for each exposure level. |
n |
total number of subjects (type = "ir" or "cc") or person-years (type = "ir") for each exposure level. |
rr |
adjusted risk estimates. |
lb |
lower bound for the confidence limits of the adjusted risk estimates. |
ub |
upper bound for the confidence limits of the adjusted risk estimates. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
Alessio Crippa, <[email protected]>
Larsson, S. C., N. Orsini, and A. Wolk. 2005. Milk, milk products and lactose intake and ovarian cancer risk: A meta-analysis of epidemiological studies. International Journal of Cancer 118: 431-441.
Greenland, S., Longnecker, M. P. (1992). Methods for trend estimation from summarized dose-response data, with applications to meta-analysis. American journal of epidemiology, 135(11), 1301-1309.
These functions compute the value of the log-likelihood for random-effects dose-response meta-analysis, in terms of model parameters. They are meant to be used internally and not directly run by the users.
remlprof.fn(par, Xlist, Zlist, ylist, Slist, nalist, q, nall, ctrl) remlprof.gr(par, Xlist, ylist, Slist, nalist, p, nall, ctrl) mlprof.fn(par, Xlist, Zlist, ylist, Slist, nalist, q, nall, ctrl) mlprof.gr(par, Xlist, ylist, Slist, nalist, p, nall, ctrl) iter.igls(Psi, Xlist, Zlist, ylist, Slist, nalist, q)
remlprof.fn(par, Xlist, Zlist, ylist, Slist, nalist, q, nall, ctrl) remlprof.gr(par, Xlist, ylist, Slist, nalist, p, nall, ctrl) mlprof.fn(par, Xlist, Zlist, ylist, Slist, nalist, q, nall, ctrl) mlprof.gr(par, Xlist, ylist, Slist, nalist, p, nall, ctrl) iter.igls(Psi, Xlist, Zlist, ylist, Slist, nalist, q)
par |
a vector representing the random-effects parameters defining the between-study (co)variance matrix. |
Xlist |
a m-dimensional list of study-specific design matrices for the fixed-effects part of the model. |
Zlist |
a m-dimensional list of study-specific design matrices for the random-effects part of the model. |
ylist |
a m-dimensional list of study-specific of vectors of estimated outcomes. |
Slist |
a m-dimensional list of within-study (co)variance matrices of estimated outcomes. |
nalist |
a m-dimensional list of k-dimensional study-specific logical vectors, identifying missing outcomes. |
ctrl |
list of parameters for controlling the fitting process, usually internally set to default values by
|
p , q , nall
|
numeric scalars: number of predictors, number of observations (excluding missing). |
Psi |
a p x p matrix representing the current estimate of the between-study (co)variance matrix. |
These functions are called internally by the fitting functions dosresmeta.ml
and dosresmeta.reml
to
perform iterative optimization algorithms for estimating random effects meta-analytical models.
The maximization of the (restricted) likelihood starts with few runs of an iterative generalized least square algorithm implemented in iter.igls
.
This can be regarded as a fast and stable way to get starting values close to the maximum for the Quasi-Newton iterative algorithm, implemented in
optim
. Alternatively, starting values can be provided by the user in the control list (see mixmeta.control
).
These functions actually specify the profiled version of the (restricted) likelihood, expressed only in terms of random-effects parameters, while the
estimate of the fixed-effects coefficients is provided at each iteration by the internal function glsfit
, based on the current value of
the between-study (co)variance matrix. At convergence, the value of this profiled version is identical to the full (restricted) likelihood.
This approach is computationally efficient, as it reduces the number of parameters in the optimization routine.
The parameterization of the between-study (co)variance matrix ensures the positive-definiteness of the estimated matrix. A Cholesky decomposition is then performed on the marginal (co)variance matrix in order to re-express the problem as standard least square equations, an approach which speeds up the computation of matrix inverses and determinants. These equations are finally solved through a QR decomposition, which guarantees stability.
mlprof.fn
and remlprof.fn
return the value of the (restricted) log-likelihood for a given set of
parameters in par
. iter.igls
returns an updated estimate of Psi
given its initial value or the value at
the previous iteration.
Alessio Crippa, [email protected]
dosresmeta
, mixmeta.fit
, dosresmeta.control
, mlprof.fn
The dataset reports the summarized dose-response results from twenty-two case-control studies on the relation between oral contraceptives use and breast cancer
A data frame with 113 observations on the following 14 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
duration |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ir" or "cc") or person-years (type = "ir") for each exposure level. |
or |
adjusted odds ratios. |
lb |
lower bound for the confidence limits of the adjusted odds ratios. |
ub |
upper bound for the confidence limits of the adjusted odds ratios. |
logor |
natural logarithm of the adjusted odds ratios. |
se |
standard error for the logarithm of the adjusted odds ratios. |
menopause |
indicator variable for a study that included postmenopausal women (1 = yes). |
period |
final year of case accrual (surrogate for the changing formulations of oral contraceptives over time). |
Alessio Crippa, <[email protected]>
Berlin JA, Longnecker MP, Greenland S. Meta-analysis of epidemiologic dose-response data. Epidemiology. 1993 May 1:218-28.
This method function computes predictions from fitted dose-response models
represented in objects of class "dosresmeta
", optionally for a new set of exposure levels.
Predictions are optionally accompanied by confidence intervals and/or standard errors for the predictions.
## S3 method for class 'dosresmeta' predict(object, newdata, xref, expo = FALSE, xref_vec, ci.incl = TRUE, se.incl = FALSE, xref_pos = 1, delta, order = FALSE, ci.level = 0.95, ...)
## S3 method for class 'dosresmeta' predict(object, newdata, xref, expo = FALSE, xref_vec, ci.incl = TRUE, se.incl = FALSE, xref_pos = 1, delta, order = FALSE, ci.level = 0.95, ...)
object |
an object of class |
newdata |
an optional data frame or matrix in which to look for variables values with which to predict from dose-response models. |
xref |
an optional scalar to indicate which levels should serve as referent for the predicted relative risks. See details. |
expo |
logical switch indicating if the prediction should be on the exponential scale. |
xref_vec |
an optional numeric to indicate the referent (vector) for the predicted relative risks. See details. |
ci.incl |
logical switch indicating if confidence intervals need to be included. |
se.incl |
logical switch indicating if standard errors need to be included. |
xref_pos |
an optional scalar to indicate the position of the referent for the predicted relative risks. See details. |
delta |
an optional scalar to specify to predict the linear trend related to that increase. |
order |
logical to indicate if the predictions need to be sorted by exposure levels. |
ci.level |
a numerical value between 0 and 1, specifying the confidence level for the computation of confidence intervals. |
... |
further arguments passed to or from other methods. |
The method function predict
produces predicted values from dosresmeta
objects. When more than one study is included in the analysis,
estimated predictions are only based on the fixed part of the model.
If newdata
is omitted, the predictions are based on the data used for the fit. If xref
is provided, it must be equal to one of the modeled values.
If not
provided, the minimum modeled referent value will be used as referent for the predicted relative risks
If newdata
is specified, it should include all the variables used to model the dose-response relation. Again, if specified, xref
must be equal to one
of the value in the newdata. If omitted, the minimum value for the newdara will be used as referent.
Only for the linear trend it is possible to specify the predicted increase of risk correspongind to an increase equal to delta
argument.
By default (order = TRUE
), the predictions are sorted by exposure levels to facilitate understanding and possible graphical
presentation of the results.
The results are returned structured in a data frame.
Alessio Crippa, [email protected]
## Load data and run the linear and quadratic models data("alcohol_cvd") lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) quadr <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Predicted linear trend (on RR scale) predict(lin, delta = 12, expo = TRUE) ## Predicted modeled data from quadratic model (on RR scale) predict(quadr, expo = TRUE) ## Plot predicted dose-response relation with(predict(quadr, order = TRUE, expo = TRUE), { plot(dose, pred, log = "y", type = "l", xlim = c(0, 45), ylim = c(.4, 2)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) }) ## Prediction for new values from quadratic model (on RR scale) newdata <- data.frame(dose = seq(0, 50, 5)) predict(quadr, newdata, expo = TRUE) ## Loading data data("ari") mod <- dosresmeta(y ~ dose + I(dose^2), id = id, sd = sd, n = n, data = ari, covariance = "smd") ## Smoothed plot newdata <- data.frame(dose = seq(0, 30, 1)) with(predict(mod, newdata), { plot(dose, pred, type = "l", ylim = c(0, .6)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) })
## Load data and run the linear and quadratic models data("alcohol_cvd") lin <- dosresmeta(formula = logrr ~ dose, type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) quadr <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Predicted linear trend (on RR scale) predict(lin, delta = 12, expo = TRUE) ## Predicted modeled data from quadratic model (on RR scale) predict(quadr, expo = TRUE) ## Plot predicted dose-response relation with(predict(quadr, order = TRUE, expo = TRUE), { plot(dose, pred, log = "y", type = "l", xlim = c(0, 45), ylim = c(.4, 2)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) }) ## Prediction for new values from quadratic model (on RR scale) newdata <- data.frame(dose = seq(0, 50, 5)) predict(quadr, newdata, expo = TRUE) ## Loading data data("ari") mod <- dosresmeta(y ~ dose + I(dose^2), id = id, sd = sd, n = n, data = ari, covariance = "smd") ## Smoothed plot newdata <- data.frame(dose = seq(0, 30, 1)) with(predict(mod, newdata), { plot(dose, pred, type = "l", ylim = c(0, .6)) lines(dose, ci.lb, lty = 2) lines(dose, ci.ub, lty = 2) rug(dose, quiet = TRUE) })
Print and summary method functions for dose-response models represented in objects of class "dosresmeta
".
## S3 method for class 'dosresmeta' print(x, digits = 4, ...) ## S3 method for class 'dosresmeta' summary(object, ci.level = 0.95, ...) ## S3 method for class 'summary.dosresmeta' print(x, digits = max(3, getOption("digits") - 3), signif.stars = getOption("show.signif.stars"), ...)
## S3 method for class 'dosresmeta' print(x, digits = 4, ...) ## S3 method for class 'dosresmeta' summary(object, ci.level = 0.95, ...) ## S3 method for class 'summary.dosresmeta' print(x, digits = max(3, getOption("digits") - 3), signif.stars = getOption("show.signif.stars"), ...)
x |
an object of class |
digits |
an integer specifying the number of digits to which printed results must be rounded. |
... |
further arguments passed to or from other methods. |
object |
an object of class |
ci.level |
the confidence level used for defining the confidence intervals for the estimates of the (fixed-effects) coefficients. |
signif.stars |
logical. If TRUE, 'significance stars' are printed for each coefficient. |
the print
method for class dosresmeta
only returns basic information of the fitted model, namely the call,
estimated (fixed-effects) coefficients, dimensions, and fit statistics (log-likelihood, AIC, BIC).
The summary
method function computes additional statistics and tests, and produces a list object of class summary.dosresmeta
.
The print
method function for this class, depending on the number of studies included in the analysis, shows additional information,
such as tables reporting the estimates for the fixed and random-effects parts of the model, Chi-square test for model significance,
Cochran Q test for heterogeneity and I-square.
The summary
method function for dosresmeta
objects produces a list of class "summary.dosresmeta
".
The components of the lists are some of those stored in the related dosresmeta
object, plus the following:
AIC |
the value of the Akaike information criterion for the fitted dosresmeta model, obtained through a call to AIC . |
BIC |
the value of the Bayesian information criterion for the fitted dosresmeta model, obtained through a call to BIC |
corFixed |
the correlation matrix of the fixed-effects coefficients,
obtained from the (co)variance matrix vcov |
corRandom |
the correlation matrix of the random effects, obtained from the between-study (co)variance matrix |
qstat |
results from the Cochran Q test for heterogeneity. |
ci.level |
the confidence level used for defining the confidence intervals for the estimates of the fixed-effects coefficients. |
chisq |
overall test similar to anova. |
As usual, the print
method functions for classes "dosresmeta
" and "summary.dosresmeta
" do not return any value.
Alessio Crippa, [email protected]
## Load data and run the model data("alcohol_cvd") model <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Defult print model ## Specify digits print(model, digit = 2) ## summary with 90th confidence intervals summary(model, ci.level = .8)
## Load data and run the model data("alcohol_cvd") model <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Defult print model ## Specify digits print(model, digit = 2) ## summary with 90th confidence intervals summary(model, ci.level = .8)
The dataset reports the summarized dose-response results from ten studies on the relation between processed meat consumption and bladder cancer.
A data frame with 73 observations on the following 15 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose0 |
original assigned dose levels, with unit of measurement defined in the "unit" column. |
dose |
assigned dose levels (converted (if needed) in gm/day). |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci" or "cc") or person-years (type = "ir") for each exposure level. |
rr |
adjusted risk estimates. |
lb |
lower bound for the confidence limits of the adjusted risk estimates. |
ub |
upper bound for the confidence limits of the adjusted risk estimates. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
area |
geographical area of the published study. |
unit |
unit of measurement for red meat consumption (for dose0). |
Alessio Crippa, <[email protected]>
Crippa A, Larsson SC, Discacciati A, Wolk A, Orsini N. Red and processed meat consumption and risk of bladder cancer: a dose-response meta-analysis of epidemiological studies. European journal of nutrition. 2016 Dec 22:1-3.
This method function performs a Cochran Q test of (residual) heterogeneity on fitted dose-response meta-analytical models
represented in objects of class "doseremeta
". It is implemented only for a two-stage approach and will return NULL
otherwise.
## S3 method for class 'dosresmeta' qtest(object, ...) ## S3 method for class 'qtest.dosresmeta' print(x, digits = 3, ...)
## S3 method for class 'dosresmeta' qtest(object, ...) ## S3 method for class 'qtest.dosresmeta' print(x, digits = 3, ...)
object |
objects of classe " |
... |
further arguments passed to or from other methods. |
x |
an object of class " |
digits |
an integer specifying the number of digits to which printed results must be rounded. |
In (multivariate) dose-response meta-analytical models, the test assesses the null hypothesis that the variability in the
(multivariate) distribution of the outcomes is explained only in terms of estimation error in each study, measured by the within-study (co)variance matrices
stored in the component Slist
of dosresmeta
objects. This is equal to test the hypothesis that the between-study (co)variance matrix is
a zero matrix, and there is no random deviation in study-specific estimates.
The dataset reports the summarized dose-response results from twelve studies on the relation between red meat consumption and bladder cancer.
A data frame with 74 observations on the following 15 variables:
id |
id of the studies included in the analysis. |
author |
names of the first author. |
year |
year of publication. |
type |
code for study design. |
dose0 |
original assigned dose levels, with unit of measurement defined in the "unit" column. |
dose |
assigned dose levels (converted (if needed) in gm/day). |
cases |
number of cases for each exposure level. |
n |
total number of subjects (type = "ci" or "cc") or person-years (type = "ir") for each exposure level. |
rr |
adjusted risk estimates. |
lb |
lower bound for the confidence limits of the adjusted risk estimates. |
ub |
upper bound for the confidence limits of the adjusted risk estimates. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
area |
geographical area of the published study. |
unit |
unit of measurement for red meat consumption (for dose0). |
Alessio Crippa, <[email protected]>
Crippa A, Larsson SC, Discacciati A, Wolk A, Orsini N. Red and processed meat consumption and risk of bladder cancer: a dose-response meta-analysis of epidemiological studies. European journal of nutrition. 2016 Dec 22:1-3.
The dataset contains simulated data from 9 case-control studies.
A data frame with 27 observations on the following 11 variables:
xcati |
category limits for the continuous exposure. |
id |
id of the studies. |
type |
code for study design. |
dose |
assigned dose levels. |
cases |
number of cases for each exposure level. |
n |
total number of subjects for each exposure level. |
rr |
adjusted risk estimates for each exposure level. |
lrr |
lower bound for the confidence limits of the adjusted risk estimates. |
urr |
upper bound for the confidence limits of the adjusted risk estimates. |
logrr |
natural logarithm of the adjusted risk estimates. |
se |
standard error for the logarithm of the adjusted risk estimates. |
Alessio Crippa, <[email protected]>
Larsson, S. C., Orsini, N. (2011). Coffee consumption and risk of stroke: a dose-response meta-analysis of prospective studies. American journal of epidemiology, 174(9), 993-1001.
Computes the Variance Partition Components for dose-response meta-analysis.
vpc(object)
vpc(object)
object |
an object of class |
A vector containing the variance partition components for each non-referent observation.
Alessio Crippa, [email protected]
Goldstein H, Browne W, Rasbash J. Partitioning variation in multilevel models. Understanding Statistics: Statistical Issues in Psychology, Education, and the Social Sciences. 2002 Dec 2;1(4):223-31.
## loading data data("sim_os") ## Quadratic (one-stage) dose-response model quadr <- dosresmeta(logrr ~ dose + I(dose^2), id = id, se = se, type = type, cases = cases, n = n, data = sim_os, proc = "1stage") ## Plot of the estimated vpc plot(sim_os$dose[sim_os$se!=0], vpc(quadr), xlab = "dose") lines(lowess(sim_os$dose[sim_os$se!=0], vpc(quadr)))
## loading data data("sim_os") ## Quadratic (one-stage) dose-response model quadr <- dosresmeta(logrr ~ dose + I(dose^2), id = id, se = se, type = type, cases = cases, n = n, data = sim_os, proc = "1stage") ## Plot of the estimated vpc plot(sim_os$dose[sim_os$se!=0], vpc(quadr), xlab = "dose") lines(lowess(sim_os$dose[sim_os$se!=0], vpc(quadr)))
Computes a Wald chi-squared test for 1 or more coefficients, given their variance-covariance matrix.
waldtest(Sigma, b, Terms = NULL, L = NULL, H0 = NULL) ## S3 method for class 'waldtest' print(x, digits = 2, ...)
waldtest(Sigma, b, Terms = NULL, L = NULL, H0 = NULL) ## S3 method for class 'waldtest' print(x, digits = 2, ...)
Sigma |
a var-cov matrix, usually extracted from one of the fitting functions. |
b |
a vector of coefficients with var-cov matrix |
Terms |
an optional integer vector specifying which coefficients should be jointly tested, using a Wald
chi-squared or F test. Its elements correspond to the columns or rows of the var-cov matrix given in |
L |
an optional matrix conformable to |
H0 |
a numeric vector giving the null hypothesis for the test. It must be as long as |
x |
Object of class "waldtest". |
digits |
number of decimal places for displaying test results. Default to 2. |
... |
further arguments passed to or from other methods. |
The waldtest
and the method print.waldtest
are taken from the aod
package and
simplified for ease of use.
An object of class waldtest
, printed with print.waldtest
.
Alessio Crippa, [email protected]
aod
, summary.dosresmeta
## Load data and run the model data("alcohol_cvd") model <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Test for significance of the overall dose-response association waldtest(b = coef(model), Sigma = vcov(model), Terms = 1:nrow(vcov(model)))
## Load data and run the model data("alcohol_cvd") model <- dosresmeta(formula = logrr ~ dose + I(dose^2), type = type, id = id, se = se, cases = cases, n = n, data = alcohol_cvd) ## Test for significance of the overall dose-response association waldtest(b = coef(model), Sigma = vcov(model), Terms = 1:nrow(vcov(model)))