transph: Semiparametric regression models for infectious disease...

Description Usage Arguments Value Author(s)

View source: R/transph.R

Description

Fits semiparametric pairwise regression models for infectious disease transmission using right-censored and/or left-truncated data on contact intervals in ordered pairs of individuals and infectious contact from external sources with individuals. Uses the Cox relative risk function. External sources of infection are handled by stratifying on an external row indicator.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
transph(
  formula,
  sus,
  data,
  weights,
  subset,
  na.action,
  spline_df,
  itermax = 25,
  L1tol = 1e-04,
  ...
)

Arguments

formula

A formula of the form "response ~ terms". The response must be an object returned by Surv of type "right" or "counting". The formula can include offset terms for fixed coefficients, and an external row indicator can be included in a strata term.

sus

A string giving the name of the variable in data that contains the susceptible member of each pair.

data

A data frame containing the variables named in formula.

weights

A vector of infector probabilities for the data rows. If who-infected-whom is not completely observed, these will be updated in an EM algorithm. If missing, all possible infectors of each susceptible are given equal initial weights. If who-infected-whom is observed, the weights are passed to coxph, where they will be used as case weights. Normally, there would be no weights in this case.

subset

An expression indicating which rows of data should be included in the model fit.

na.action

A missing-data filter applied to data after subset. Defaults to options()$na.action.

itermax

The maximum number of EM algorithm iterations if who- infected-whom is not completely observed. Setting itermax = 1 will cause the model to to use only the initial weights (default or provided).

L1tol

The EM algorithm stops when the L1 distance between the old and new weights is below L1tol per transmission event.

...

Further arguments to be passed to coxph, such as init, ties, or control.

method

The method used to generate a monotonic cubic interpolating spline for the cumulative hazard. Options are monoH.FC and hyman. See documentation for splinefun.

Value

A list of class transph with the following components:

call

The call to transph with complete formal arguments.

coefficients

The estimated coefficients.

coxph

The coxph object returned by the final Cox regression.

data

The data used to fit the model.

df

The number of estimated coefficients.

formula

The model formula.

iter

The number of iterations. It is one for a model in which who-infects-whom is completely observed. Otherwise, it is the number of EM algorithm iterations (including the initial model).

L1tol

The L1 tolerance per transmission event used to halt the EM algorithm.

loglik

The loglik element in the coxph.object returned by the final Cox regression, which contains the log partial likelihood at the initial coefficient values and the fitted coefficient values. For a null model, only the first element is present. This is NA when who-infected-whom is not completely observed.

smooth_method

The method element in the coxph.object returned by the final Cox regression, which is the name of approximation used to handle ties.

spline_df

The degrees of freedom in the smoothing spline used to calculate the contact interval hazard function(s).

sus

The vector identifying the susceptible member of each #' pair in the data used to fit the model.

var

The covariance matrix for the coefficient estimates. #' The rows and columns are named for the corresponding covariates.

weights

The final vector of estimated infector probabilities.

ymat

The outcome matrix returned by Surv

.

Author(s)

Eben Kenah kenah.1@osu.edu


ekenah/transtat documentation built on Nov. 11, 2021, 3:12 p.m.