Learn R Programming

dosresmeta (version 1.1)

hamling: Hamling's method

Description

This function approximates the covariance matrix of log relative risks according to the method described by Hamling (2008).

Usage

hamling(cases, n, logrr, v, study, id, data)

Arguments

cases
The variable (or vector) reporting the number of cases, regardless of the type of study.
n
The variable(or vector) reporting the number of the size (for each exposure) of the study for case-control and cumulative incidence data, the Person-Times (for each exposure) for incidence rate data.
logrr
The variable (or vector) reporting the log relative risks for each exposure
v
The variable (or vector) reporting the variance of published log relative risks. If not already in the dataset, it needs to be calculated by the user.
study
the variable (or vector) or value reporting the type of study. The values for the variable must be "cc", "ir", "ci" for case-control, incidence-rate and cumulative-incidence data respectively.
id
an optional variable (or vector) reporting the id of the studies.
data
an optional dataframe containing the variables needed to approximate the covariance matrix.

Value

  • A matrix reporting the pseudo-counts originated from the pubblished data.

Details

No further details required

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.

Examples

Run this code
data(cc_ex)
cc_ex$v<-((cc_ex$logub-cc_ex$loglb)/(2*qnorm(.975)))^2
hamling(case,n,logrr,v,study="cc",data=cc_ex)

Run the code above in your browser using DataLab