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

    Interface LmResult

    Result of lm: the fit and the quantities of R's summary(lm).

    interface LmResult {
        adjRSquared: number;
        coefficients: number[];
        coefTable: {
            estimate: number[];
            pValue: number[];
            stdError: number[];
            tValue: number[];
        };
        dfResidual: number;
        fittedValues: number[];
        fPValue?: number;
        fStatistic?: { dendf: number; numdf: number; value: number };
        intercept: boolean;
        qr: QR;
        rank: number;
        residuals: number[];
        rows: number[];
        rSquared: number;
        sigma: number;
        weights?: number[];
        x: number[][];
    }

    Hierarchy (View Summary)

    Index
    adjRSquared: number

    Adjusted R^2; 0 for a model with nothing beyond the intercept, as in R.

    coefficients: number[]

    Coefficients (intercept first); NaN for aliased columns.

    coefTable: {
        estimate: number[];
        pValue: number[];
        stdError: number[];
        tValue: number[];
    }

    The coefficient table of the columns that are not aliased, in their order.

    Type Declaration

    • estimate: number[]

      Estimates (R's Estimate).

    • pValue: number[]

      Two-sided p-values (R's Pr(>|t|)).

    • stdError: number[]

      Standard errors (R's Std. Error).

    • tValue: number[]

      t statistics (R's t value).

    dfResidual: number

    Residual degrees of freedom, n - rank (n counts the rows of non-zero weight).

    fittedValues: number[]

    Fitted values, one per residual (R's fitted.values).

    fPValue?: number

    p-value of the overall F test; absent with fStatistic.

    fStatistic?: { dendf: number; numdf: number; value: number }

    Overall F statistic with its degrees of freedom. Absent (as is fPValue) when the model has nothing beyond the intercept, where R's summary(lm) has no fstatistic.

    Type Declaration

    • dendf: number

      Denominator degrees of freedom (the residual degrees of freedom).

    • numdf: number

      Numerator degrees of freedom (rank minus the intercept).

    • value: number

      The F statistic.

    intercept: boolean

    Whether the model has an intercept.

    qr: QR

    The QR decomposition of the (weighted) model matrix.

    rank: number

    Numerical rank of the model matrix.

    residuals: number[]

    Residuals y - fitted (rows with a missing value dropped; rows of weight 0 included).

    rows: number[]

    0-based indices of the input rows used (the rows without a missing value; rows of weight 0 included).

    rSquared: number

    R^2; 0 for a model with nothing beyond the intercept, as in R.

    sigma: number

    Residual standard error.

    weights?: number[]

    The weights of the rows used, if any.

    x: number[][]

    The model matrix (with the column of ones when there is an intercept) of the rows used, unweighted.