Learn R Programming

dosresmeta (version 2.2.0)

gof: 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 gof.dosresmeta print(x, digits = 3, ...)

Value

A list of class gof.dosresmeta containing the following

tdataa dataframe with the decorrelated variables (y*, X*, e*).
R2Coefficient of determination R^2.
devianceDeviance test.

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.

Author

Alessio Crippa, alessio.crippa@ki.se

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

Run this code
## 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)
 

Run the code above in your browser using DataLab