Paf

download Paf

of 5

description

Package ‘paf’

Transcript of Paf

  • Package pafFebruary 20, 2015

    Title Attributable Fraction Function for Censored Survival DataVersion 1.0Depends R(>= 2.13.0), survivalDate 2014-01-23Author Li ChenMaintainer Li Chen NeedsCompilation noRepository CRANDescription Calculate unadjusted/adjusted attributable fraction function of a set of covari-

    ates for a censored survival outcome from a Cox model using the method pro-posed by Chen, Lin and Zeng (Biometrika 97, 713-726., 2010).

    License GPL-2Date/Publication 2014-02-05 16:55:54

    R topics documented:paf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1plot.paf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    Index 5

    paf Calculate attributable fraction function for censored survival data

    Description

    Fit a Cox model and calculate the unadjusted/adjusted attributable fraction function of a set ofcovariates based on the Cox model using the method proposed by Chen, Lin and Zeng (2010).

    Usage

    paf(formula, data, cov)

    1

  • 2 paf

    Arguments

    formula a formula object for the Cox model considered , which has the same format asthat in the coxph function of the survival package.

    data a data.frame in which to interpret the variables named in the formula.

    cov the set of covariates whose attributable fraction function is of interest.

    Details

    This function calculates the unadjusted/adjusted attributable fraction function for the set of covari-ates specified in cov which must also be included as covariates of the Cox model. The functioncalculates the unadjusted attributable fraction function if the Cox model does not include other co-variates; otherwise the function calculates the adjusted attributable fraction function adjusting forother covariates in the Cox model.

    Value

    time unique uncensored event times at which the attributable fraction function jumps.

    est the estimates of unadjusted/adjusted attributable fractions at unique uncensoredevent times.

    se the standard errors of the estimated attributable fractions.

    low the lower confidence limits of the atrtributable fractions.

    upp the upper confidence limits of the atrtributable fractions.

    fit.cox coxph object from the fitted Cox model.

    Note

    The Breslow method is used to handle ties. The function will do missing-data filter automatically.

    Author(s)

    Li Chen

    References

    Chen L, Lin DY, Zeng D. (2010). Attributable fraction functions for censored event times. Biometrika97, 713-726.

    See Also

    plot.paf.

  • plot.paf 3

    Examples

    # simulated data set from a Cox modeln = 1000x1 = as.numeric(runif(n)>0.5)x2 = x1 + rnorm(n)t = exp(-x1 - 0.5 * x2) * rexp(n, rate = 0.1)c = runif(n, 0, 3.4)y = pmin(t, c)delta = as.numeric(t

  • 4 plot.paf

    References

    Chen L, Lin DY, Zeng D. (2010). Attributable fraction functions for censored event times. Biometrika97, 713-726.

    See Also

    par, paf.

    Examples

    # simulated data set from a Cox modeln = 1000x1 = as.numeric(runif(n)>0.5)x2 = x1 + rnorm(n)t = exp(-x1 - 0.5 * x2) * rexp(n, rate = 0.1)c = runif(n, 0, 3.4)y = pmin(t, c)delta = as.numeric(t

  • Index

    Topic survivalpaf, 1plot.paf, 3

    paf, 1, 4par, 4plot.paf, 2, 3

    5

    pafplot.pafIndex