Glm

scalaglm.Glm
See theGlm companion object
case class Glm(y: DVD, Xmat: DMD, colNames: Seq[String], fam: GlmFamily, addIntercept: Boolean, its: Int) extends Model

Generalised linear regression modelling

Value parameters

Xmat

Covariate matrix

addIntercept

Add an intercept term to the covariate matrix?

colNames

List of covariate names

fam

Observation model. eg. LogisticGlm or PoissonGlm

its

Max iterations for the IRLS algorithm (default 50)

y

Vector of responses

Attributes

Returns

An object of type Glm with many useful methods providing information about the regression fit, including .coefficients, .p and .summary

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, response: Boolean): PredictGlm

Predictions for a new matrix of covariates

Predictions for a new matrix of covariates

Value parameters

newX

New matrix of covariates

response

Fitted values on the scale of the response?

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 X: DenseMatrix[Double]

Design matrix (including the intercept column, if required)

Design matrix (including the intercept column, if required)

Attributes

val coefficients: DenseVector[Double]

Fitted regression coefficients

Fitted regression coefficients

Attributes

lazy val df: Int

Degrees of freedom

Degrees of freedom

Attributes

lazy val fitted: DenseVector[Double]
val irls: (DVD, DMD, DMD)

Tuple containing results of running the IRLS algorithm - not for general use

Tuple containing results of running the IRLS algorithm - not for general use

Attributes

lazy val n: Int

Number of observations

Number of observations

Attributes

val names: Seq[String]

Sequence of variable names (including the intercept)

Sequence of variable names (including the intercept)

Attributes

lazy val p: DenseVector[Double]

p-values for the regression coefficients

p-values for the regression coefficients

Attributes

lazy val pp: Int

Number of variables (including the intercept)

Number of variables (including the intercept)

Attributes

val q: DMD

Final Q-matrix from the IRLS algorithm

Final Q-matrix from the IRLS algorithm

Attributes

val r: DMD

Final R-matrix from the IRLS algorithm

Final R-matrix from the IRLS algorithm

Attributes

lazy val ri: DenseMatrix[Double]

Inverse of the final R-matrix

Inverse of the final R-matrix

Attributes

lazy val se: DenseVector[Double]

Standard errors for the regression coefficients

Standard errors for the regression coefficients

Attributes

lazy val z: DenseVector[Double]

z-statistics for the regression coefficients

z-statistics for the regression coefficients

Attributes