Packages

case class Glm(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], fam: GlmFamily, addIntercept: Boolean = true, its: Int = 50) extends Model with Product with Serializable

Generalised linear regression modelling

y

Vector of responses

Xmat

Covariate matrix

colNames

List of covariate names

fam

Observation model. eg. LogisticGlm or PoissonGlm

addIntercept

Add an intercept term to the covariate matrix?

its

Max iterations for the IRLS algorithm (default 50)

returns

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

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

Instance Constructors

  1. new Glm(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], fam: GlmFamily, addIntercept: Boolean = true, its: Int = 50)

    y

    Vector of responses

    Xmat

    Covariate matrix

    colNames

    List of covariate names

    fam

    Observation model. eg. LogisticGlm or PoissonGlm

    addIntercept

    Add an intercept term to the covariate matrix?

    its

    Max iterations for the IRLS algorithm (default 50)

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

    Design matrix (including the intercept column, if required)

    Design matrix (including the intercept column, if required)

    Definition Classes
    GlmModel
  5. val Xmat: DenseMatrix[Double]
  6. val addIntercept: Boolean
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. val coefficients: DenseVector[Double]

    Fitted regression coefficients

    Fitted regression coefficients

    Definition Classes
    GlmModel
  10. val colNames: Seq[String]
  11. lazy val df: Int

    Degrees of freedom

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. val fam: GlmFamily
  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. lazy val fitted: DenseVector[Double]
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. val irls: (DenseVector[Double], DenseMatrix[Double], DenseMatrix[Double])

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

  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. val its: Int
  20. lazy val n: Int

    Number of observations

  21. val names: Seq[String]

    Sequence of variable names (including the intercept)

    Sequence of variable names (including the intercept)

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

    p-values for the regression coefficients

  26. def plots: Figure
  27. lazy val pp: Int

    Number of variables (including the intercept)

  28. def predict(newX: DenseMatrix[Double] = Xmat, response: Boolean = false): PredictGlm

    Predictions for a new matrix of covariates

    Predictions for a new matrix of covariates

    newX

    New matrix of covariates

    response

    Fitted values on the scale of the response?

    returns

    Prediction object

  29. def productElementNames: Iterator[String]
    Definition Classes
    Product
  30. val q: DenseMatrix[Double]

    Final Q-matrix from the IRLS algorithm

  31. val r: DenseMatrix[Double]

    Final R-matrix from the IRLS algorithm

  32. lazy val ri: DenseMatrix[Double]

    Inverse of the final R-matrix

  33. lazy val se: DenseVector[Double]

    Standard errors for the regression coefficients

  34. def summary: Unit

    Prints a human-readable regression summary to the console

  35. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  39. val y: DenseVector[Double]
  40. lazy val z: DenseVector[Double]

    z-statistics for the regression coefficients

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Model

Inherited from AnyRef

Inherited from Any

Ungrouped