Class/Object

scalaglm

Glm

Related Docs: object Glm | package scalaglm

Permalink

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, Serializable, Product, Equals, Model, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Glm
  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 Glm(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], fam: GlmFamily, addIntercept: Boolean = true, its: Int = 50)

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val X: DenseMatrix[Double]

    Permalink

    Design matrix (including the intercept column, if required)

    Design matrix (including the intercept column, if required)

    Definition Classes
    GlmModel
  5. val Xmat: DenseMatrix[Double]

    Permalink

    Covariate matrix

  6. val addIntercept: Boolean

    Permalink

    Add an intercept term to the covariate matrix?

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val coefficients: DenseVector[Double]

    Permalink

    Fitted regression coefficients

    Fitted regression coefficients

    Definition Classes
    GlmModel
  10. val colNames: Seq[String]

    Permalink

    List of covariate names

  11. lazy val df: Int

    Permalink

    Degrees of freedom

  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. val fam: GlmFamily

    Permalink

    Observation model.

    Observation model. eg. LogisticGlm or PoissonGlm

  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. lazy val fitted: DenseVector[Double]

    Permalink
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. val irls: (DenseVector[Double], DenseMatrix[Double], DenseMatrix[Double])

    Permalink

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

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. val its: Int

    Permalink

    Max iterations for the IRLS algorithm (default 50)

  20. lazy val n: Int

    Permalink

    Number of observations

  21. val names: List[String]

    Permalink

    Sequence of variable names (including the intercept)

    Sequence of variable names (including the intercept)

    Definition Classes
    GlmModel
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. lazy val p: DenseVector[Double]

    Permalink

    p-values for the regression coefficients

  26. def plots: Figure

    Permalink
  27. lazy val pp: Int

    Permalink

    Number of variables (including the intercept)

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

    Permalink

    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. val q: DenseMatrix[Double]

    Permalink

    Final Q-matrix from the IRLS algorithm

  30. val r: DenseMatrix[Double]

    Permalink

    Final R-matrix from the IRLS algorithm

  31. lazy val ri: DenseMatrix[Double]

    Permalink

    Inverse of the final R-matrix

  32. lazy val se: DenseVector[Double]

    Permalink

    Standard errors for the regression coefficients

  33. def summary: Unit

    Permalink

    Prints a human-readable regression summary to the console

  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. val y: DenseVector[Double]

    Permalink

    Vector of responses

  39. lazy val z: DenseVector[Double]

    Permalink

    z-statistics for the regression coefficients

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Model

Inherited from AnyRef

Inherited from Any

Ungrouped