Packages

trait GLM extends AnyRef

A General Linear Model 'GLM' can be developed using the GLM trait and object (see below). The implementation currently supports univariate models with multivariate models (where each response is a vector) planned for the future. It provides factory methods for the following special types of GLMs: SimpleRegression - simple linear regression, Regression - multiple linear regression using Ordinary Least Squares 'OLS' Regression_WLS - multiple linear regression using Weighted Least Squares 'WLS' RidgeRegression - robust multiple linear regression, TranRegression - transformed (e.g., log) multiple linear regression, PolyRegression - polynomial regression, TrigRegression - trigonometric regression ResponseSurface - response surface regression, ANOVA1 - GLM form of ANalysis Of VAriance, ANCOVA - GLM form of ANalysis of COVAriance.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GLM
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def apply(x_: MatriD, y: VectoD, t: VectoI, levels: Int): ANCOVA

    Build an ANalysis of COVAriance (ANCOVA) model.

    Build an ANalysis of COVAriance (ANCOVA) model.

    x_

    the data/design matrix of continuous variables

    y

    the response vector

    t

    the treatment/categorical variable vector

    levels

    the number of treatment levels (1, ... levels)

  2. def apply(t: VectoD, levels: Int, y: VectoD): ANOVA1

    Build an ANalysis Of VAriance (ANOVA) model.

    Build an ANalysis Of VAriance (ANOVA) model.

    t

    the treatment/categorical variable vector

    levels

    the number of treatment levels (1, ... levels)

    y

    the response vector

  3. def apply(x_: MatriD, y: VectoD, cubic: Boolean): ResponseSurface

    Build a Response Surface model.

    Build a Response Surface model.

    x_

    the input vectors/points

    y

    the response vector

    cubic

    the order of the surface (false for quadratic, true for cubic)

  4. def apply(ty: MatriD, k: Int, p: Int): TrigRegression

    Build a Trigonometric Regression model.

    Build a Trigonometric Regression model.

    ty

    the combined input vector and response vector

    k

    the maximum multiplier in the trig function 'kwt'

    p

    extra parameter to make apply methods unique (pass in 0)

  5. def apply(t: VectoD, y: VectoD, k: Int, p: Int): TrigRegression

    Build a Trigonometric Regression model.

    Build a Trigonometric Regression model.

    t

    the input vector: 't_i' expands to 'x_i'

    y

    the response vector

    k

    the maximum multiplier in the trig function 'kwt'

    p

    extra parameter to make apply methods unique (pass in 0)

  6. def apply(ty: MatriD, k: Int): PolyRegression

    Build a Polynomial Regression model.

    Build a Polynomial Regression model.

    ty

    the combined input vector and response vector

    k

    the order of the polynomial

  7. def apply(t: VectoD, y: VectoD, k: Int): PolyRegression

    Build a Polynomial Regression model.

    Build a Polynomial Regression model.

    t

    the input vector: t_i expands to x_i = [1, t_i, t_i2, ... t_ik]

    y

    the response vector

    k

    the order of the polynomial

  8. def apply(xy: MatriD, transform: FunctionS2S, tranInv: FunctionS2S): TranRegression

    Build a Transformed Multiple Linear Regression model.

    Build a Transformed Multiple Linear Regression model.

    xy

    the combined input/design m-by-n matrix and response m-vector

    transform

    the transformation function (e.g., log)

  9. def apply(x: MatriD, y: VectoD, transform: FunctionS2S, tranInv: FunctionS2S): TranRegression

    Build a Transformed Multiple Linear Regression model.

    Build a Transformed Multiple Linear Regression model.

    x

    the input/design m-by-n matrix

    y

    the response m-vector

    transform

    the transformation function (e.g., log)

  10. def apply(xy: MatriD, lambda: Double): RidgeRegression

    Build a Multiple Linear Robust Regression model.

    Build a Multiple Linear Robust Regression model.

    lambda

    the shrinkage parameter (0 => OLS) in the penalty term 'lambda * b dot b'

  11. def apply(x: MatriD, y: VectoD, lambda: Double): RidgeRegression

    Build a Multiple Linear Robust Regression model.

    Build a Multiple Linear Robust Regression model.

    x

    the centered input/design m-by-n matrix NOT augmented with a first column of ones

    y

    the centered response vector

    lambda

    the shrinkage parameter (0 => OLS) in the penalty term 'lambda * b dot b'

  12. def apply(x: MatriD, y: VectoD, w: VectoD): Regression_WLS

    Build a Multiple Linear Regression model using Weighted Least Squares 'WLS'.

    Build a Multiple Linear Regression model using Weighted Least Squares 'WLS'.

    x

    the input/design m-by-n matrix

    y

    the response m-vector

  13. def apply(xy: MatriD): Regression

    Build a Multiple Linear Regression model using Ordinary Least Squares 'OLS'.

    Build a Multiple Linear Regression model using Ordinary Least Squares 'OLS'.

    xy

    the combined input/design m-by-n matrix and response m-vector

  14. def apply(x: MatriD, y: VectoD): Regression

    Build a Multiple Linear Regression model using Ordinary Least Squares 'OLS'.

    Build a Multiple Linear Regression model using Ordinary Least Squares 'OLS'.

    x

    the input/design m-by-n matrix

    y

    the response m-vector

  15. def apply(x: VectoD, y: VectoD): SimpleRegression

    Build a Simple Linear Regression model, automatically prepending the column of ones (form matrix from two column vectors [ 1 x ]).

    Build a Simple Linear Regression model, automatically prepending the column of ones (form matrix from two column vectors [ 1 x ]).

    x

    the input/design m-by-1 vector

    y

    the response m-vector