rStats.js v1.3.0
    Preparing search index...

    Interface CoxphResult

    Result of coxph.

    interface CoxphResult {
        coefficients: number[];
        iter: number;
        linearPredictors: number[];
        loglik: [number, number];
        logtest: CoxphTest;
        lower: number[];
        means: number[];
        n: number;
        naiveVar?: number[][];
        nevent: number;
        p: number[];
        pValue: number[];
        robscore?: CoxphTest;
        robustSe?: number[];
        rscore?: number;
        rsq: { maxrsq: number; rsq: number };
        score: number;
        sctest: CoxphTest;
        se: number[];
        stdError: number[];
        upper: number[];
        usedRobust: boolean;
        var: number[][];
        wald: number;
        waldtest: CoxphTest;
        warnings: string[];
        z: number[];
        zValue: number[];
    }
    Index
    coefficients: number[]

    Coefficients (NaN for R's NA: an aliased column or one whose information fell below the tolerance)

    iter: number

    Number of iterations (iterMax + 1 when they ran out)

    linearPredictors: number[]

    Linear predictors (centred by the means), one per observation used, in input order

    loglik: [number, number]

    Log partial likelihood at the starting values and at the end

    logtest: CoxphTest

    Likelihood ratio test

    lower: number[]

    Lower confidence limits of exp(coef) (from robustSe when usedRobust)

    means: number[]

    The means used to centre the covariates (0 for the columns not centred)

    n: number

    Number of observations used

    naiveVar?: number[][]

    The model-based variance (R's naive.var); only when usedRobust.

    nevent: number

    Number of events

    p: number[]

    Two-sided p-values Pr(>|z|)

    pValue: number[]

    Alias of p: the same array.

    robscore?: CoxphTest

    The robust score test (R's robscore: rscore, the number of non-NaN coefficients); only when usedRobust.

    robustSe?: number[]

    Robust standard errors, the square roots of the diagonal of var (R's robust se); only when usedRobust.

    rscore?: number

    The robust score test statistic at init (R's rscore); only when usedRobust.

    rsq: { maxrsq: number; rsq: number }

    R^2 (1 - exp(-logtest / n)) and its maximum (1 - exp(2 loglik[0] / n))

    Type Declaration

    • maxrsq: number

      Its maximum, 1 - exp(2 loglik[0] / n) (R's maxrsq).

    • rsq: number

      R^2, 1 - exp(-logtest / n) (R's rsq).

    score: number

    The score test statistic at the starting values

    sctest: CoxphTest

    Score (log-rank) test

    se: number[]

    Model-based (naive) standard errors of the coefficients, also when usedRobust (R's column se(coef); the robust ones are robustSe)

    stdError: number[]

    Alias of se: the same array.

    upper: number[]

    Upper confidence limits of exp(coef) (from robustSe when usedRobust)

    usedRobust: boolean

    Whether the robust variance was used (R's used.robust). False also when it was asked for but there is nothing to compute it from (no events, or every coefficient NaN), as R.

    var: number[][]

    Variance matrix of the coefficients (array of rows): the robust variance when usedRobust (R's var), else the model-based one

    wald: number

    The Wald statistic of the non-NA coefficients (against init when given)

    waldtest: CoxphTest

    Wald test (with the robust variance when usedRobust)

    warnings: string[]

    R's warnings, each once, in order of first appearance.

    z: number[]

    Wald z statistics (coefficient / robustSe when usedRobust, else / se)

    zValue: number[]

    Alias of z: the same array.