Package 'geesibsor'

Title: Odds Ratio for Siblings by GEE
Description: Estimate the odds ratio for siblings for a binary phenotype, adjusting for covariates, using generalized estimating equations.
Authors: Karl W Broman [aut, cre]
Maintainer: Karl W Broman <[email protected]>
License: GPL-3
Version: 0.51-6
Built: 2026-05-09 20:42:07 UTC
Source: https://github.com/kbroman/geesibsor

Help Index


Fake data

Description

Fake data for illustrating and testing the R/geesibsor package.

Usage

fake.data

Format

A numeric matrix with 696 rows and 8 columns.

Details

There are data on 696 individuals in 270 sibships. The first column is the phenotype. The next is an indicator of family assignment. The last 6 columns are covariates.

Source

These are completely fake data. Email Karl W. Broman, [email protected], for further information.

See Also

gee.sibs.or()

Examples

data(fake.data)
y <- fake.data[,1]
id <- fake.data[,2]
x <- cbind(1, fake.data[,-(1:2)])
gee.output <- gee.sibs.or(y, x, id)

Estimate odds ratio for siblings adjusting for covariates

Description

Use GEE to estimate a common sib-sib odds ratio for a binary phenotype, adjusting for covariates with a logistic model.

Usage

gee.sibs.or(
  y,
  x,
  id,
  beta = NULL,
  gamma = 0.5,
  give.se = TRUE,
  return.intercept = FALSE,
  maxit = 1000,
  tol = 0.00001,
  eta.tol = 0.000000001,
  trace = FALSE,
  debug = FALSE,
  method = c("gee2", "gee1", "identity")
)

Arguments

y

A vector of binary phenotypes (coded 0/1).

x

A numeric matrix of covariates, including an intercept term.

id

A vector of integers indicating family/group assignment.

beta

Optional starting values for the covariate coefficients; if length(beta) = ncol(x)+1, the last value is assumed to be a starting value for gamma.

gamma

Optional starting value for the log odds ratio. If gamma=0, it is assumed to be 0 and is not estimated.

give.se

If true, calculate estimated standard errors.

return.intercept

If TRUE, the estimate for the intercept coefficient is included in the output.

maxit

Maximum number of iterations. If 0, some debugging information is returned.

tol

Tolerance value for determining convergence in Newton's method to solve the GEE.

eta.tol

Tolerance value for determining convergence in Newton's method to calculate the eta parameters.

trace

Indicates whether to display tracing information; large indicators result in more verbose output.

debug

Indicates whether to display special debugging-related information.

method

Indicates whether to use GEE2, GEE1, or the identity matrix as the working covariance matrix.

Details

We assume a set of randomly ascertained sibships with measurements on a binary phenotype and a set of covariates. We use a logistic model to contact the expected phenotype and the covariates and assume a constant log odds ratio for sibs' phenotypes. Parameters are estimated using generalized estimating equations (GEE).

The idea is described in Liange and Beaty (1991). All of the details appear in Liang et al. (1992) and Qaqish (1990).

Key bits are coded in C; but there's still a lot done directly in R. Eventually I'd like to move more of the code to C, for the sake of speed.

Value

If give.se=TRUE, the output is a matrix with four columns: the parameter estimates, estimated SEs, (est/SE)2(est/SE)^2, and P-values. If give.se=FALSE, a vector with only the parameter estimates is given.

The first item is the sib-sib log odds ratio; the rest are the covariates' coefficients; if return.intercept=FALSE, the intercept is excluded from the output.

Author(s)

Karl W Broman, [email protected]

References

Liang, K.-Y. and Beaty, T. H. (1991) Measuring familial aggregation by using odds-ratio regression models. Genetic Epidemiology, 8, 361–370.

Liang, K.-Y., Zeger, S. L. and Qaqish, B. (1992) Multivariate regression analyses for categorical data (with discussion). J. Roy. Statist. Soc. B, 1, 3–40.

Qaqish, B. F. (1990) Multivariate regression models using generalized estimating equations. Ph. D. Thesis, Department of Biostatistics, Johns Hopkins University, Baltimore, Maryland.

See Also

fake.data()

Examples

data(fake.data)
y <- fake.data[,1]
id <- fake.data[,2]
x <- cbind(1, fake.data[,-(1:2)])
gee.output <- gee.sibs.or(y, x, id, trace=TRUE)