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.
Fitted glm object (if method = "glm") or returned nlminb object (if method = "ml").
Akaike information criterion (AIC).
Examples
# Load dataset containing (Y, Xtilde, C) values for pools of size 1, 2, and 3data(pdat1)# Estimate log-OR for Xtilde and Y adjusted for Cfit <- 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.