Package 'condGEE'

Title: Parameter Estimation in Conditional GEE for Recurrent Event Gap Times
Description: Solves for the mean parameters, the variance parameter, and their asymptotic variance in a conditional GEE for recurrent event gap times, as described by Clement and Strawderman (2009) in the journal Biostatistics. Makes a parametric assumption for the length of the censored gap time.
Authors: David Clement
Maintainer: David Clement <[email protected]>
License: GPL (>= 2)
Version: 0.2.0
Built: 2024-12-14 06:32:00 UTC
Source: CRAN

Help Index


Asthma recurrence in children

Description

This data set gives the start and stop times of recurrent asthma events in children. It also provides a subject ID, treatment indicator, censoring indicator, number of events per subject and a first event indicator.

Format

A data frame with 1037 rows and 7 columns. See asthma.txt header for details.

Source

http://www.blackwellpublishing.com/rss/

References

Duchateau et al. JRSSC 2003. Volume 52, 355–363.


condGEE

Description

Solves for the mean parameters (thetatheta), the variance parameter (σ2\sigma^2), and their asymptotic variance in a conditional GEE for recurrent event gap times, as described by Clement, D. Y. and Strawderman, R. L. (2009)

Usage

condGEE(
  data,
  start,
  mu.fn = MU,
  mu.d = MU.d,
  var.fn = V,
  k1 = K1.norm,
  k2 = K2.norm,
  robust = TRUE,
  asymp.var = TRUE,
  maxiter = 100,
  rtol = 1e-06,
  atol = 1e-08,
  ctol = 1e-08,
  useFortran = TRUE
)

Arguments

data

matrix of data with one row for each gap time; the first column should be a subject ID, the second column the gap time, the third column a completeness indicator equal to 1 if the gap time is complete and 0 if the gap time is censored, and the remaining columns the covariates for use in the mean and variance functions

start

vector containing initial guesses for the unknown parameter vector

mu.fn

the specification for the mean of the gap time; the default is a linear combination of the covariates; the function should take two arguments (theta, and a matrix of covariates with each row corresponding to one gap time) and it should return a vector of means

mu.d

the derivative of mu.fn with respect to the parameter vector; the default corresponds to a linear mean function

var.fn

the specification for V2V^2, where the variance of the gap time is σ2V2\sigma^2 V^2; the default is a vector of ones; the function should take two arguments (thetatheta, and a matrix of covariates with each row corresponding to one gap time) and it should return a vector of variances

k1

the function to solve for the conditional mean length of the censored gap times; its sole argument should be the vector of standardized (i.e.\ (Yμ)/(σV)(Y-\mu)/(\sigma V)) censored gap times; the default assumes the standardized censored gap times follow a standard normal distribution, but K1.t3 and K1.exp are also provided in the package - they assume a standardized t with 3 degrees of freedom and an exponential with mean 0 and variance 1 respectively

k2

the function to solve for the conditional mean length of the square of the censored gap times; its sole argument should be the vector of standardized (i.e.\ (Yμ)/(σV)(Y-\mu)/(\sigma V)) censored gap times; the default assumes the standardized censored gap times follow a standard normal distribution, but K2.t3 and K2.exp are also provided in the package - they assume a standardized t with 3 degrees of freedom and an exponential with mean 0 and variance 1 respectively

robust

logical, if FALSE, the mean and variance parameters are solved for simultaneously, increasing efficiency, but decreasing the leeway to misguess start and still find the root of the GEE

asymp.var

logical, if FALSE, the function returns NULL for the asymptotic variance matrix

maxiter

see multiroot; maximal number of iterations allowed

rtol

see multiroot; relative error tolerance

atol

see multiroot; absolute error tolerance

ctol

see multiroot; if between two iterations, the maximal change in the variable values is less than this amount, then it is assumed that the root is found

useFortran

see multiroot; logical, if FALSE, then an R implementation of Newton-Raphson is used

Value

conditional expectation

Author(s)

David Clement


K1.exp

Description

E(Y|Y>w) where Y is exponential dist with mean 0 and variance 1

Usage

K1.exp(w)

Arguments

w

real value

Value

conditional expectation

Author(s)

David Clement


K1.norm

Description

E(Y|Y>w) where Y is normal

Usage

K1.norm(w)

Arguments

w

real value

Value

conditional expectation

Author(s)

David Clement


K1.t3

Description

E(Y|Y>w) where Y is t dist with 3 df

Usage

K1.t3(w)

Arguments

w

real value

Value

conditional expectation

Author(s)

David Clement


K2.exp

Description

E(Y^2|Y>w) where Y is exponential dist with mean 0 and variance 1

Usage

K2.exp(w)

Arguments

w

real value

Value

conditional expectation

Author(s)

David Clement


K2.norm

Description

E(Y^2|Y>w) where Y is normal

Usage

K2.norm(w)

Arguments

w

real value

Value

conditional expectation

Author(s)

David Clement


K2.t3

Description

E(Y^2|Y>w) where Y is t dist with 3 df

Usage

K2.t3(w)

Arguments

w

real value

Value

conditional expectation

Author(s)

David Clement