scalaglm

package scalaglm

Members list

Type members

Classlikes

object Basis

Attributes

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

Generalised linear regression modelling

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
Supertypes
trait Serializable
trait Product
trait Equals
trait Model
class Object
trait Matchable
class Any
Show all
object Glm

Attributes

Companion
class
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

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

Attributes

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

Linear regression modelling

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
Supertypes
trait Serializable
trait Product
trait Equals
trait Model
class Object
trait Matchable
class Any
Show all
object Lm

Attributes

Companion
class
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

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

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Glm
class Lm
case class Pca(mat: DMD, 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

Value parameters

colNames

Sequence of column names of mat

mat

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

Attributes

Returns

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

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

Attributes

Companion
class
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

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait GlmFamily
class Object
trait Matchable
class Any
Show all
Self type
PoissonGlm.type
trait Predict

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class PredictGlm
class PredictLm
case class PredictGlm(mod: Glm, newX: DMD, response: Boolean) extends Predict

Prediction from a fitted linear (Glm) model

Prediction from a fitted linear (Glm) model

Value parameters

mod

fitted generalised linear model

newX

covariate matrix for predictions

response

predictions on the response scale?

Attributes

Returns

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

Supertypes
trait Serializable
trait Product
trait Equals
trait Predict
class Object
trait Matchable
class Any
Show all
case class PredictLm(mod: Lm, newX: DMD) extends Predict

Prediction from a fitted linear (Lm) model

Prediction from a fitted linear (Lm) model

Value parameters

mod

fitted linear model

newX

covariate matrix for predictions

Attributes

Returns

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

Supertypes
trait Serializable
trait Product
trait Equals
trait Predict
class Object
trait Matchable
class Any
Show all
object TimeSeries

Utilities for multivariate time series

Utilities for multivariate time series

These utilities assume that the time series is stored in a Breeze DMD with variables/component series in columns, and observations in rows with the first row corresponding to the first observation and the last row to the last.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
TimeSeries.type
object Utils

Attributes

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

Types

type DMD = DenseMatrix[Double]
type DVD = DenseVector[Double]