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

    Function confint

    • Confidence intervals for the coefficients of a linear model (NaN for aliased columns), for an lm fit. Equivalent to R's confint().

      Parameters

      Returns { lower: number[]; upper: number[] }

      • lower: number[]

        Lower limits, one per coefficient (R's first column, 2.5 % by default).

      • upper: number[]

        Upper limits, one per coefficient (R's second column, 97.5 % by default).

      const fit = lm([1, 2, 3, 4, 5], [2.1, 3.9, 6.2, 7.8, 10.1]);
      confint(fit); // { lower: [-0.58036, 1.79994], upper: [0.68036, 2.18006] }
      confint(fit, { level: 0.9 }).lower; // [-0.41614, 1.84945]