Lm

scalaglm.Lm
See theLm companion object
case class Lm(y: DVD, Xmat: DMD, colNames: Seq[String], addIntercept: Boolean) extends Model

Linear regression modelling

Value parameters

Xmat

Covariate matrix

addIntercept

Add an intercept term to the covariate matrix?

colNames

List of covariate names

y

Vector of responses

Attributes

Returns

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

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Model
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def plots: Figure
def predict(newX: DMD): PredictLm

Predictions for a new matrix of covariates

Predictions for a new matrix of covariates

Value parameters

newX

New matrix of covariates

Attributes

Returns

Prediction object

def summary: Unit

Prints a human-readable regression summary to the console

Prints a human-readable regression summary to the console

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val QR: QR[DenseMatrix[Double]]

Breeze QR object for the design matrix

Breeze QR object for the design matrix

Attributes

val X: DMD

Design matrix (including intercept, if required)

Design matrix (including intercept, if required)

Attributes

lazy val adjRs: Double

The adjusted R^2 value for the regression

The adjusted R^2 value for the regression

Attributes

Fitted regression coefficients

Fitted regression coefficients

Attributes

lazy val df: Int

Degrees of freedom

Degrees of freedom

Attributes

lazy val f: Double

The f-statistic for the regression analysis

The f-statistic for the regression analysis

Attributes

lazy val fitted: DenseVector[Double]

Fitted values

Fitted values

Attributes

lazy val h: Vector[Double]

Vector containing the leverages (diagonal of the hat matrix)

Vector containing the leverages (diagonal of the hat matrix)

Attributes

lazy val k: Int

Degrees of freedom for the F-statistic

Degrees of freedom for the F-statistic

Attributes

lazy val n: Int

Number of observations

Number of observations

Attributes

val names: Seq[String]

Column names (including intercept)

Column names (including intercept)

Attributes

lazy val p: DenseVector[Double]

p-values for the regression coefficients

p-values for the regression coefficients

Attributes

lazy val pf: Double

The p-value associated with the f-statistic

The p-value associated with the f-statistic

Attributes

lazy val pp: Int

Number of variables (including any intercept)

Number of variables (including any intercept)

Attributes

val q: DenseMatrix[Double]

n x p Q-matrix

n x p Q-matrix

Attributes

val qty: DenseVector[Double]

Q'y

Q'y

Attributes

val r: DenseMatrix[Double]

p x p upper-triangular R-matrix

p x p upper-triangular R-matrix

Attributes

lazy val rSquared: Double
The R^2 value for the regression analysis

Attributes

lazy val residuals: DenseVector[Double]

Residuals

Residuals

Attributes

lazy val ri: DenseMatrix[Double]

The inverse of the R-matrix

The inverse of the R-matrix

Attributes

lazy val rse: Double

Residual squared error

Residual squared error

Attributes

lazy val rss: Double

Residual sum of squares

Residual sum of squares

Attributes

lazy val se: DenseVector[Double]

Standard errors for the regression coefficients

Standard errors for the regression coefficients

Attributes

lazy val sh: DenseVector[Double]

Square root of the leverage vector

Square root of the leverage vector

Attributes

lazy val ssy: Double
The sum-of-squares of the centred observations

Attributes

lazy val studentised: DenseVector[Double]
lazy val t: DenseVector[Double]

t-statistics for the regression coefficients

t-statistics for the regression coefficients

Attributes

lazy val ybar: Double

The mean of the observations

The mean of the observations

Attributes

lazy val ymyb: DenseVector[Double]
The centred observations

Attributes