p_logreg function

Poolwise Logistic Regression

Poolwise Logistic Regression

Fit homogeneous-pools logistic regression model described by Weinberg & Umbach (1999).

p_logreg(g, y, x, method = "glm", prev = NULL, samp_y1y0 = NULL, estimate_var = TRUE, start = 0.01, lower = -Inf, upper = Inf, nlminb_list = list(control = list(trace = 1, eval.max = 500, iter.max = 500)), hessian_list = list(method.args = list(r = 4)))

Arguments

  • g: Numeric vector with pool sizes, i.e. number of members in each pool.

  • y: Numeric vector with poolwise Y values, coded 0 if all members are controls and 1 if all members are cases.

  • x: Numeric matrix with poolwise ‘X’ values, with one row for each pool. Can be a vector if there is only 1 predictor.

  • method: Character string specifying method to use for estimation. Choices are "glm" for glm function and "ml" for maximum likelihood.

  • prev: Numeric value specifying disease prevalence, allowing for valid estimation of the intercept with case-control sampling. Can specify samp_y1y0 instead if sampling rates are known.

  • samp_y1y0: Numeric vector of length 2 specifying sampling probabilities for cases and controls, allowing for valid estimation of the intercept with case-control sampling. Can specify prev instead if it's easier.

  • estimate_var: Logical value for whether to return variance-covariance matrix for parameter estimates.

  • start: Numeric value specifying starting values for parameters. Only used if method = "ml".

  • lower: Numeric value specifying lower bounds for parameters. Only used if method = "ml".

  • upper: Numeric value specifying upper bounds for parameters. Only used if method = "ml".

  • nlminb_list: List of arguments to pass to nlminb

    for log-likelihood maximization.

  • hessian_list: List of arguments to pass to hessian for approximating the Hessian matrix. Only used if method = "ml" and estimate_var = TRUE.

Returns

List containing:

  1. Numeric vector of parameter estimates.
  2. Variance-covariance matrix (if estimate_var = TRUE).
  3. Fitted glm object (if method = "glm") or returned nlminb object (if method = "ml").
  4. Akaike information criterion (AIC).

Examples

# Load dataset containing (Y, Xtilde, C) values for pools of size 1, 2, and 3 data(pdat1) # Estimate log-OR for Xtilde and Y adjusted for C fit <- p_logreg(g = pdat1$g, y = pdat1$allcases, x = pdat1[, c("xtilde", "c")]) fit$theta.hat

References

Weinberg, C.R. and Umbach, D.M. (1999) "Using pooled exposure assessment to improve efficiency in case-control studies." Biometrics 55 : 718--726.

Weinberg, C.R. and Umbach, D.M. (2014) "Correction to 'Using pooled exposure assessment to improve efficiency in case-control studies' by Clarice R. Weinberg and David M. Umbach; 55, 718--726, September 1999." Biometrics 70 : 1061.

  • Maintainer: Dane R. Van Domelen
  • License: GPL-3
  • Last published: 2020-02-13

Useful links