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
- Alphabetic
- By Inheritance
- Lm
- Serializable
- Product
- Equals
- Model
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val QR: DenseQR
Breeze QR object for the design matrix
- val X: DenseMatrix[Double]
Design matrix (including intercept, if required)
- val Xmat: DenseMatrix[Double]
- val addIntercept: Boolean
- lazy val adjRs: Double
The adjusted R^2 value for the regression
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val coefficients: DenseVector[Double]
Fitted regression coefficients
- val colNames: Seq[String]
- lazy val df: Int
Degrees of freedom
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- lazy val f: Double
The f-statistic for the regression analysis
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- lazy val fitted: DenseVector[Double]
Fitted values
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- lazy val h: Vector[Double]
Vector containing the leverages (diagonal of the hat matrix)
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- lazy val k: Int
Degrees of freedom for the F-statistic
- lazy val n: Int
Number of observations
- val names: Seq[String]
Column names (including intercept)
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- lazy val p: DenseVector[Double]
p-values for the regression coefficients
- lazy val pf: Double
The p-value associated with the f-statistic
- def plots: Figure
- lazy val pp: Int
Number of variables (including any intercept)
- 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
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val q: DenseMatrix[Double]
n x p Q-matrix
- val qty: DenseVector[Double]
Q'y
- val r: DenseMatrix[Double]
p x p upper-triangular R-matrix
- lazy val rSquared: Double
The R^2 value for the regression analysis
- lazy val residuals: DenseVector[Double]
Residuals
- lazy val ri: DenseMatrix[Double]
The inverse of the R-matrix
- lazy val rse: Double
Residual squared error
- lazy val rss: Double
Residual sum of squares
- lazy val se: DenseVector[Double]
Standard errors for the regression coefficients
- lazy val sh: DenseVector[Double]
Square root of the leverage vector
- lazy val ssy: Double
The sum-of-squares of the centred observations
- lazy val studentised: DenseVector[Double]
- def summary: Unit
Prints a human-readable regression summary to the console
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- lazy val t: DenseVector[Double]
t-statistics for the regression coefficients
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- val y: DenseVector[Double]
- lazy val ybar: Double
The mean of the observations
- lazy val ymyb: DenseVector[Double]
The centred observations