hamling {dosresmeta}  R Documentation 
Reconstructs the set of pseudonumbers (or "effective" numbers) of cases and noncases consistent with the input data (log relative risks). The method was first proposed in 2008 by Hamling.
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 incidencerate 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 noncases 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 nonreferent mean or standardized mean differences. 
Alessio Crippa, alessio.crippa@ki.se
Hamling, J., Lee, P., Weitkunat, R., Ambuhl, M. (2008). Facilitating metaanalyses 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), 954970.
Orsini, N., Li, R., Wolk, A., Khudyakov, P., Spiegelman, D. (2012). Metaanalysis for linear and nonlinear doseresponse relations: examples, an evaluation of approximations, and software. American journal of epidemiology, 175(1), 6673.
## Loading data
data("alcohol_cvd")
## Obtaining pseudocounts 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 pseudocounts 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)))