Packages

case class Lm(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], addIntercept: Boolean = true) extends Model with Product with Serializable

Linear regression modelling

y

Vector of responses

Xmat

Covariate matrix

colNames

List of covariate names

addIntercept

Add an intercept term to the covariate matrix?

returns

An object of type Lm with many useful attributes providing information about the regression fit

Linear Supertypes
Serializable, Serializable, Product, Equals, Model, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Lm
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Model
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Lm(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], addIntercept: Boolean = true)

    y

    Vector of responses

    Xmat

    Covariate matrix

    colNames

    List of covariate names

    addIntercept

    Add an intercept term to the covariate matrix?

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val QR: DenseQR

    Breeze QR object for the design matrix

  5. val X: DenseMatrix[Double]

    Design matrix (including intercept, if required)

    Design matrix (including intercept, if required)

    Definition Classes
    LmModel
  6. val Xmat: DenseMatrix[Double]
  7. val addIntercept: Boolean
  8. lazy val adjRs: Double

    The adjusted R^2 value for the regression

  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. val coefficients: DenseVector[Double]

    Fitted regression coefficients

    Fitted regression coefficients

    Definition Classes
    LmModel
  12. val colNames: Seq[String]
  13. lazy val df: Int

    Degrees of freedom

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. lazy val f: Double

    The f-statistic for the regression analysis

  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. lazy val fitted: DenseVector[Double]

    Fitted values

  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. lazy val h: Vector[Double]

    Vector containing the leverages (diagonal of the hat matrix)

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. lazy val k: Int

    Degrees of freedom for the F-statistic

  22. lazy val n: Int

    Number of observations

  23. val names: Seq[String]

    Column names (including intercept)

    Column names (including intercept)

    Definition Classes
    LmModel
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. lazy val p: DenseVector[Double]

    p-values for the regression coefficients

  28. lazy val pf: Double

    The p-value associated with the f-statistic

  29. def plots: Figure
  30. lazy val pp: Int

    Number of variables (including any intercept)

  31. def predict(newX: DenseMatrix[Double] = Xmat): PredictLm

    Predictions for a new matrix of covariates

    Predictions for a new matrix of covariates

    newX

    New matrix of covariates

    returns

    Prediction object

  32. val q: DenseMatrix[Double]

    n x p Q-matrix

  33. val qty: DenseVector[Double]

    Q'y

  34. val r: DenseMatrix[Double]

    p x p upper-triangular R-matrix

  35. lazy val rSquared: Double

    The R^2 value for the regression analysis

  36. lazy val residuals: DenseVector[Double]

    Residuals

  37. lazy val ri: DenseMatrix[Double]

    The inverse of the R-matrix

  38. lazy val rse: Double

    Residual squared error

  39. lazy val rss: Double

    Residual sum of squares

  40. lazy val se: DenseVector[Double]

    Standard errors for the regression coefficients

  41. lazy val sh: DenseVector[Double]

    Square root of the leverage vector

  42. lazy val ssy: Double

    The sum-of-squares of the centred observations

  43. lazy val studentised: DenseVector[Double]
  44. def summary: Unit

    Prints a human-readable regression summary to the console

  45. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  46. lazy val t: DenseVector[Double]

    t-statistics for the regression coefficients

  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  50. val y: DenseVector[Double]
  51. lazy val ybar: Double

    The mean of the observations

  52. lazy val ymyb: DenseVector[Double]

    The centred observations

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Model

Inherited from AnyRef

Inherited from Any

Ungrouped