Package 'dosresmeta'

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

Help Index


Multivariate dose-response meta-analysis

Description

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.

Modeling framework

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.

Estimation procedure

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 yjy_j is the vector of non-referent outcome values in each of i=1,,mi = 1, \dots, m studies, and XiX_i the related matrix of pp transformations of the exposure (typically p=1,2p = 1, 2), the dose-response model can be written as

yi=Xiβi+ϵiy_i = X_i\beta_i + \epsilon_i

with SiS_i = (co)variance of ϵi\epsilon_i known (available or reconstructed from the available data). The βi\beta_i are then combined according to principles of (multivariate) random-effects meta-analytical models

βi N(β,Vi+Ψ)\beta_i ~ N ( \beta, V_i + \Psi )

where ViV_i and Ψ\Psi 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 yiy_i and vectors (or matrices) XiX_i. The (multivariate) random effects-model can be written as

yi=Xiβ+Ziηi+ϵiy_i = X_i\beta + Z_i\eta_i + \epsilon_i

where β\beta represents the fixed-effects parameter, ηi\eta_i the vector (or matrix) of unobserved random-effects for thei-th study, and ZiZ_i coincides with XiX_i. The marginal model has a co(variance) matrix equal to Σ+ZiΨZitop\Sigma + Z_i\Psi Z_i^top, where Σ\Sigma is the block diagonal (co)variance with i-th diagonal block SiS_i.

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 β\beta and, for random-effects models, the components of the between-study (co)variance matrix PsiPsi. 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.

Functions and data included in the package

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.

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

dosresmeta mixmeta


Eight published studies on the relation between alcohol intake and colorectal cancer

Description

The dataset reports the summarized dose-response results from eight prospective studies on the relation between alcohol intake and colorectal cancer risk.

Format

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".

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Six published studies on the relation between alcohol intake and cardiovascular disease risk

Description

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).

Format

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".

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Fourteen case-control studies on the relation between alcohol consumption and esophageal cancer

Description

The dataset reports the summarized dose-response results from fourteen case-control studies on the relation between alcohol consumption and esophageal squamous cell carcinoma.

Format

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

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Four published studies on the relation between alcohol intake and lung cancer

Description

The dataset reports the summarized dose-response results from four prospective studies on the relation between alcohol intake and lunger cancer.

Format

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".

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Five clinical trials on the relation between aripiprazole and schizophrenia

Description

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.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

Crippa, A., Orsini, N. Dose-response meta-analysis of differences in means. BMC medical research methodology. 2016 Aug 2;16(1):91.


Best Linear Unbiased Predictions from dosresmeta Models

Description

This method function computes (empirical) best linear unbiased predictions from fitted dose-response meta-analytical models represented in objects of class "dosresemta".

Usage

## S3 method for class 'dosresmeta'
blup(object, ...)

Arguments

object

objects of classe "dosresmeta".

...

further arguments passed to or from other methods.

Details

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.

Examples

## 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)

Four case-control studies on the relation between Body Mass Index and renal cell cancer

Description

The dataset reports the summarized dose-response results from four cases-control studies on the relation Body Mass Index and renal cell cancer

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Case-control data on alcohol and breast cancer risk

Description

The dataset reports the summarized dose-response results from a case-control study on alcohol and breast cancer, first presented by Rohan and McMichael.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Cumulative incidence data on high-fat dairy food and colorectal cancer risk

Description

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).

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Extract Coefficients and (Co)Variance Matrix from dosresmeta Objects

Description

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".

Usage

## S3 method for class 'dosresmeta'
coef(object, format = c("vector", "matrix"), ...)

## S3 method for class 'dosresmeta'
vcov(object, ...)

Arguments

object

an object of class "dosresmeta".

format

format of the returned object.

...

further arguments passed to or from other methods.

Value

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.

Author(s)

Alessio Crippa, [email protected]

See Also

dosresmeta, coef, vcov, logLik.dosresmeta

Examples

## 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)

Eight prospective studies on the relation between coffee consumption and cancer mortality

Description

The dataset reports the summarized dose-response results from eight prospective studies on the relation between coffee consumption and cancer mortality.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Thirteen prospective studies on the relation between coffee consumption and cardiovascular mortality

Description

The dataset reports the summarized dose-response results from thirteen prospective studies on the relation between coffee consumption and cardiovascular mortality.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Twenty-one prospective studies on the relation between coffee consumption and all-cause mortality

Description

The dataset reports the summarized dose-response results from twenty-one prospective studies on the relation between coffee consumption and all-cause mortality.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Additional two prospective studies on the relation between coffee consumption and all-cause mortality

Description

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.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Eleven prospective studies on the relation between coffee consumption and stroke risk

Description

The dataset reports the summarized dose-response results from eleven prospective studies on the relation between coffee consumption and risk of stroke.

Format

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).

Author(s)

Alessio Crippa, <[email protected]>

References

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 covariance matrix for a set of log relative risks

Description

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.

Usage

covar.logrr(cases, n, y, v, type, data, covariance = "gl")

Arguments

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 n indicates the amount of person-time within each exposure level.

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 cc, ir, and ci, for case-control, incidence-rate, and cumulative incidence data, respectively.

data

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

covariance

method to approximate the coviariance among set of reported log relative risks, "gl" for the method proposed by Greenland and Longnecker (default), "h" for the method proposed by Hamling.

Details

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.

Value

The (co)variance matrix of the log relative risks.

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

grl, hamling, covar.smd, dosresmeta

Examples

## 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)))

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

Description

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.

Usage

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

Arguments

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 md and smd for mean difference and standardized mean difference, respectively.

method

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

data

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

Details

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

Value

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.

Author(s)

Alessio Crippa, [email protected]

References

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

Examples

## 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)

Multivariate Dose-Response Meta-Analysis

Description

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.

Usage

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)

Arguments

formula

an object of class "formula" offering a symbolic description of the dose-response functional relation. Terms in the formula can be provided in the data below.

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 se argument, or only for log relative risks, the confidence interval in the lb and ub arguments.

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 cc, ir, and ci, respectively.

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 n indicates the amount of person-time for each exposure level.

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 as.data.frame to a data frame) containing the variables in the previous arguments.

mod

an object of class "formula" offering a symbolic description of the meta-regression model (by default mod = ~ 1). Terms in the formula can be provided in the data below.

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 v is not provided.

lb

an optional vector to specify the lower bound of the confidence interval for the reported relative risks; needed if v and se are not provided.

ub

an optional vector to specify the upper bound of the confidence interval for the reported relative risks; needed if v and se are not provided.

covariance

method to approximate the (co)variance matrix of the outcome. Options are "gl" for the method proposed by Greenland and Longnecker (default) , "h" for the method proposed by Hamling, "md" for mean differences, "smd" for standardized mean differences, and "user" if provided by the user.

method

method used to estimate the (pooled) dose-response relation: "fixed" for fixed-effects models, "ml" or "reml" for random-effects models fitted through (restricted) maximum likelihood, and "mm" for random-effects models fitted through method of moments (currently available only for the two stages procedure).

proc

"2stage" (default) or "1stage" procedure. See dosresmeta-package for an overview.

Slist

list of approximated or given (co)variance matrices.

method.smd

character string indicating the method to be used. Options are cohens, hedges, and glass. Required only if covariance equal "smd".

control

list of parameters for controlling the fitting process. These are passed to dosresmeta.control by dosresmeta.fit to replace otherwise selected default values.

X

processed design matrix of fixed effects.

Z

processed design matrix of random effects.

y

processed outcome vector.

Details

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.

Value

The dosresmeta function typically returns a list of object of class dosresmeta representing the meta-analytical model fit, as described in dosresmetaObject.

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

dosresmeta-package, mixmeta, covar.logrr, covar.smd

Examples

## 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)
})

Ancillary Parameters for Controlling the Fit in dosresmeta Models

Description

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.

Usage

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))

Arguments

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 optim.

showiter

logical. If TRUE, the progress of iterative optimization is shown.

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 NULL (the default, and recommended), the starting value is created internally through an iterative generalized least square algorithm.

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 reltol(abs(val)+reltol)reltol * (abs(val) + reltol) at a step.

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.

Value

A list with components named as the arguments.

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

dosresmeta, dosresmeta-package, dosresmeta.control

Examples

## 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))

Fixed-Effects Estimator for dosresmeta Models

Description

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.

Usage

dosresmeta.fixed(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...)

Arguments

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 dosresmeta.control.

...

further arguments passed to or from other methods. Currently not used.

Details

The estimation involves only the pp 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.

Value

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".

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

dosresmeta, dosresmeta-package, dosresmeta.ml

Examples

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")

ML and REML Estimators for dosresmeta Models

Description

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.

Usage

dosresmeta.ml(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...)

dosresmeta.reml(Xlist, Zlist, ylist, Slist, nalist, q, nall, control, ...)

Arguments

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 dosresmeta.control.

...

further arguments passed to or from other methods. Currently not used.

Details

The estimation involves pp fixed-effects coefficients and the p(p+1)/2p(p+1)/2 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.

Value

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".

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

dosresmeta, dosresmeta-package, dosresmeta.ml

Examples

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)

dosresmeta Object

Description

An object returned by dosresmeta function, inheriting from class "dosresmeta", and representing a fitted dose-response (meta-analytical) model.

Value

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, pp predictors and mm studies used for fitting the model. For the two-stage analysis the dimensions refer to pp outcome parameters, no predictor (only the intercept) and mm studies. The following components needs to be included in a legitimate dosresmeta object:

coefficients a pp-dimensional vector of the fixed-effects coefficients.
vcov estimated p×pp \times p (co)variance matrix of the fixed-effects coefficients.
Psi for random-effects models, the estimated p×pp \times p 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: mm (number of studies included in estimation, kk (number of outcome parameters), pp (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: pp 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

Methods

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.

Author(s)

Alessio Crippa, [email protected]

See Also

dosresmeta, dosresmeta-package, mixmetaObject


Six studies on the relation between fish consumption and rheumatoid arthritis risk

Description

The dataset reports the summarized dose-response results from six studies on the relation between fish consumption and rheumatoid arthritis risk

Format

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

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Grid with combinations of p for two-order fractional polynomials

Description

Computes the different combinations of p usefull for evaluating two-order fractional polynomials.

Usage

fpgrid(p = c(-2, -1, -0.5, 0, 0.5, 1, 2, 3))

Arguments

p

a numeric vector with the coefficient to be combined.

Value

A data.frame with the different combinations of p.

Author(s)

Alessio Crippa, [email protected]

References

Royston, Patrick, and Douglas G. Altman. "Regression using fractional polynomials of continuous covariates: parsimonious parametric modelling." Applied Statistics (1994): 429-467.

Examples

grd <- fpgrid()
head(grd)

Fractional Polynomials

Description

Two-order fractional polynomials transformation for continuous covariates.

Usage

fracpol(x, p = c(1, 1), shift, scale, scaling = TRUE)

Arguments

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 scaling = TRUE. If not specified it is se internally equal to 0.

scale

optional scalar representing the scale, if scaling = TRUE. If not specified it is se internally equal to 1.

scaling

a logical indicating if the measurements are scaled prior to model fitting.

Details

The fracpol is based on the FP function in the mboost package. See help(FP) for more details.

Value

A matrix including the trasformations corresponding to the input values.

Author(s)

Alessio Crippa, [email protected]

References

Royston, Patrick, and Douglas G. Altman. "Regression using fractional polynomials of continuous covariates: parsimonious parametric modelling." Applied Statistics (1994): 429-467.

See Also

mboost, rcs.eval

Examples

## 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)))

Computes statistics to evaluate the goodness-of-fit from dosresmeta Objects

Description

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

Usage

gof(object, fixed = TRUE)

## S3 method for class 'gof.dosresmeta'
print(x, digits = 3, ...)

Arguments

object

an object of class dosresmeta produced by dosresmeta.

fixed

logical for selecting fixed model. By default equal to TRUE.

x

an object of class gof.dosresmeta produced by gof.

digits

an integer specifying the number of digits to which printed results must be rounded.

...

further arguments passed to or from other methods.

Value

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.

Author(s)

Alessio Crippa, [email protected]

References

Discacciati A, Crippa A, Orsini N. Goodness of fit tools for dose-response meta-analysis of binary outcomes. Research synthesis methods. 2015 Jan 1.

Examples

## 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)

Approximating effective-counts as proposed by Greenland & Longnecker

Description

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.

Usage

grl(y, v, cases, n, type, data, tol = 1e-05)

Arguments

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 n indicates the amount of person-time within each exposure level.

type

a vector (or a character string), specifying the design of the study. Options are cc, ir, and ci, for case-control, incidence-rate, and cumulative incidence data, respectively.

data

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

tol

define the tolerance.

Details

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.

Value

The results are returned structured in a matrix

A approximated number of effective cases.
N approximated total number of effective subjects.

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

covar.logrr, hamling

Examples

## 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)))

Approximating effective-counts as proposed by Hamling

Description

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.

Usage

hamling(y, v, cases, n, type, data)

Arguments

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 n indicates the amount of person-time within each exposure level.

type

a vector (or a character string), specifying the design of the study. Options are cc, ir, and ci, for case-control, incidence-rate, and cumulative incidence data, respectively.

data

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

Details

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.

Value

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.

Author(s)

Alessio Crippa, [email protected]

References

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.

See Also

covar.logrr, grl

Examples

## 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)))

Incidence-rate data on fiber intake and coronary heart disease risk

Description

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)

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Extract Log-Likelihood from dosresmeta Objects

Description

This method function returns the log-likelihood for fitted dose-response models represented in objects of class "dosresmeta".

Usage

## S3 method for class 'dosresmeta'
logLik(object, ...)

Arguments

object

an object of class "dosresmeta"

...

further arguments passed to or from other methods.

Value

A numeric scalar of class "logLik".

Author(s)

Alessio Crippa, [email protected]

See Also

dosresmeta, dosresmeta-package, logLik

Examples

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)

Eleven prospective studies on the relation between milk consumption and all-cause mortality

Description

The dataset reports the summarized dose-response results from eleven prospective studies on the relation between milk consumption and all-cause mortality.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Nine studies on the relation between milk consumption and ovarian cancer

Description

The dataset reports the summarized dose-response results from nine studies on the relation between milk consumption and ovarian cancer.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Likelihood Functions for dosresmeta Models

Description

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.

Usage

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)

Arguments

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 dosresmeta.control.

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.

Details

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.

Value

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.

Author(s)

Alessio Crippa, [email protected]

See Also

dosresmeta, mixmeta.fit, dosresmeta.control, mlprof.fn


Twenty-two case-control studies on the relation between oral contraceptives use and breast cancer

Description

The dataset reports the summarized dose-response results from twenty-two case-control studies on the relation between oral contraceptives use and breast cancer

Format

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).

Author(s)

Alessio Crippa, <[email protected]>

References

Berlin JA, Longnecker MP, Greenland S. Meta-analysis of epidemiologic dose-response data. Epidemiology. 1993 May 1:218-28.


Predicted Values from dosresmeta Models

Description

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.

Usage

## 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, ...)

Arguments

object

an object of class dosreseta.

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.

Details

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.

Value

The results are returned structured in a data frame.

Author(s)

Alessio Crippa, [email protected]

See Also

dosresmeta, predict

Examples

## 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)
})

Summarizing dosresmeta Models

Description

Print and summary method functions for dose-response models represented in objects of class "dosresmeta".

Usage

## 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"), ...)

Arguments

x

an object of class dosresmeta or summary.dosresmeta produced by dosresmeta or summary.dosresmeta, respectively.

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 dosresmeta produced by dosresmeta.

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.

Details

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.

Value

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 p×pp \times p correlation matrix of the fixed-effects coefficients, obtained from the (co)variance matrix vcov
corRandom the p×pp \times p correlation matrix of the random effects, obtained from the between-study (co)variance matrix Ψ\Psi
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.

Author(s)

Alessio Crippa, [email protected]

See Also

dosresmeta, summary

Examples

## 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)

Ten studies on the relation between processed meat and bladder cancer

Description

The dataset reports the summarized dose-response results from ten studies on the relation between processed meat consumption and bladder cancer.

Format

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).

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Cochran Q Test of Heterogeneity for dosresmeta Models

Description

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.

Usage

## S3 method for class 'dosresmeta'
qtest(object, ...)

## S3 method for class 'qtest.dosresmeta'
print(x, digits = 3, ...)

Arguments

object

objects of classe "dosresmeta".

...

further arguments passed to or from other methods.

x

an object of class "qtest.dosresmeta".

digits

an integer specifying the number of digits to which printed results must be rounded.

Details

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.


Twelve studies on the relation between red meat and bladder cancer

Description

The dataset reports the summarized dose-response results from twelve studies on the relation between red meat consumption and bladder cancer.

Format

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).

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Simulated data for one-stage dose-response meta-analysis

Description

The dataset contains simulated data from 9 case-control studies.

Format

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.

Author(s)

Alessio Crippa, <[email protected]>

References

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.


Variance Partition Components for dosresmeta Objects

Description

Computes the Variance Partition Components for dose-response meta-analysis.

Usage

vpc(object)

Arguments

object

an object of class dosresmeta produced by dosresmeta.

Value

A vector containing the variance partition components for each non-referent observation.

Author(s)

Alessio Crippa, [email protected]

References

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.

Examples

## 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)))

Wald Test for Model Coefficients

Description

Computes a Wald chi-squared test for 1 or more coefficients, given their variance-covariance matrix.

Usage

waldtest(Sigma, b, Terms = NULL, L = NULL, H0 = NULL)

## S3 method for class 'waldtest'
print(x, digits = 2, ...)

Arguments

Sigma

a var-cov matrix, usually extracted from one of the fitting functions.

b

a vector of coefficients with var-cov matrix Sigma. These coefficients are usually extracted from one of the fitting functions available in R.

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 Sigma. Default is NULL.

L

an optional matrix conformable to b, such as its product with b gives the linear combinations of the coefficients to be tested. Default is NULL.

H0

a numeric vector giving the null hypothesis for the test. It must be as long as Terms or must have the same number of columns as L. Default to 0 for all the coefficients to be tested.

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.

Details

The waldtest and the method print.waldtest are taken from the aod package and simplified for ease of use.

Value

An object of class waldtest, printed with print.waldtest.

Author(s)

Alessio Crippa, [email protected]

See Also

aod, summary.dosresmeta

Examples

## 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)))