scalaglm

package scalaglm

Members list

Concise view

Type members

Classlikes

object Basis

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Basis.type
case class Glm(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], fam: GlmFamily, addIntercept: Boolean, its: Int) extends Model

Generalised linear regression modelling

Generalised linear regression modelling

Attributes

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

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
object Glm

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Glm.type
sealed trait GlmFamily

Trait for simple one-parameter exponential family observation models.

Trait for simple one-parameter exponential family observation models.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object LogisticGlm.type
object PoissonGlm.type
object Irls

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Irls.type
case class Lm(y: DenseVector[Double], Xmat: DenseMatrix[Double], colNames: Seq[String], addIntercept: Boolean) extends Model

Linear regression modelling

Linear regression modelling

Attributes

Xmat

Covariate matrix

addIntercept

Add an intercept term to the covariate matrix?

colNames

List of covariate names

y

Vector of responses

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
object Lm

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Lm.type
case object LogisticGlm extends GlmFamily

GlmFamily object for logistic regression

GlmFamily object for logistic regression

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlmFamily
class Object
trait Matchable
class Any
Self type
trait Model

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Glm
class Lm
case class Pca(mat: DenseMatrix[Double], colNames: Seq[String])

Principal components analysis

Principal components analysis

Computed using SVD of the centred data matrix rather than from the spectral decomposition of the covariance matrix. eg. More like the R function "prcomp" than the R function "princomp".

NOTE: .loadings are transposed relative to the PCA function in Breeze

Attributes

colNames

Sequence of column names of mat

mat

Data matrix with rows corresponding to observations and columns corresponding to variables

Returns:

An object of type Pca with methods such as .loadings, .scores, .sdev and .summary

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object Pca

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Pca.type
case object PoissonGlm extends GlmFamily

GlmFamily object for Poisson regression

GlmFamily object for Poisson regression

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlmFamily
class Object
trait Matchable
class Any
Self type
trait Predict

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class PredictGlm(mod: Glm, newX: DenseMatrix[Double], response: Boolean) extends Predict

Prediction from a fitted linear (Glm) model

Prediction from a fitted linear (Glm) model

Attributes

mod

fitted generalised linear model

newX

covariate matrix for predictions

response

predictions on the response scale?

Returns:

An object of type PredictGlm with several useful attributes, including .fitted and .se

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Predict
class Object
trait Matchable
class Any
case class PredictLm(mod: Lm, newX: DenseMatrix[Double]) extends Predict

Prediction from a fitted linear (Lm) model

Prediction from a fitted linear (Lm) model

Attributes

mod

fitted linear model

newX

covariate matrix for predictions

Returns:

An object of type PredictLm with several useful attributes, including .fitted and .se

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Predict
class Object
trait Matchable
class Any
object Utils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Utils.type