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

    Interface LmFormulaResult

    Result of lm with a formula: the fit of the model matrix, with the formula's terms.

    interface LmFormulaResult {
        adjRSquared: number;
        aov: boolean;
        assign: number[];
        coefficients: number[];
        coefNames: string[];
        coefTable: {
            estimate: number[];
            pValue: number[];
            stdError: number[];
            tValue: number[];
        };
        dfResidual: number;
        effects: number[];
        factors: number[][];
        fittedValues: number[];
        formula: string;
        fPValue?: number;
        fStatistic?: { dendf: number; numdf: number; value: number };
        intercept: boolean;
        nObs: number;
        order: number[];
        qr: QR;
        rank: number;
        residuals: number[];
        response: string;
        rows: number[];
        rSquared: number;
        rss: number;
        sigma: number;
        termLabels: string[];
        variables: string[];
        warnings: string[];
        weights?: number[];
        x: number[][];
        y: number[];
    }

    Hierarchy (View Summary)

    Index
    adjRSquared: number

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

    aov: boolean

    Whether this is an aov fit.

    assign: number[]

    The term of each coefficient (0 for the intercept).

    coefficients: number[]

    Coefficients (intercept first); NaN for aliased columns.

    coefNames: string[]

    Names of the coefficients (the model matrix's column names).

    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).

    effects: number[]

    The effects Q'y of the (weighted) fit, one per row of non-zero weight.

    factors: number[][]

    R's factors attribute of the terms (one array per variable, one code per term).

    fittedValues: number[]

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

    formula: string

    The formula.

    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.

    nObs: number

    Number of rows of non-zero weight.

    order: number[]

    Degree of each term.

    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).

    response: string

    The response's name.

    rows: number[]

    0-based indices of the rows of data used.

    rSquared: number

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

    rss: number

    The weighted residual sum of squares.

    sigma: number

    Residual standard error.

    termLabels: string[]

    Labels of the terms.

    variables: string[]

    The variables of the formula, the response first.

    warnings: string[]

    R's warnings (from the model matrix and from summary()).

    weights?: number[]

    The weights (rows used), if any.

    x: number[][]

    The model matrix (rows used).

    y: number[]

    The response (rows used).