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
- Alphabetic
- By Inheritance
- Glm
- Serializable
- Serializable
- Product
- Equals
- Model
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
X: DenseMatrix[Double]
Design matrix (including the intercept column, if required)
- val Xmat: DenseMatrix[Double]
- val addIntercept: Boolean
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
coefficients: DenseVector[Double]
Fitted regression coefficients
- val colNames: Seq[String]
-
lazy val
df: Int
Degrees of freedom
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val fam: GlmFamily
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- lazy val fitted: DenseVector[Double]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
val
irls: (DenseVector[Double], DenseMatrix[Double], DenseMatrix[Double])
Tuple containing results of running the IRLS algorithm - not for general use
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val its: Int
-
lazy val
n: Int
Number of observations
-
val
names: Seq[String]
Sequence of variable names (including the intercept)
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
lazy val
p: DenseVector[Double]
p-values for the regression coefficients
- def plots: Figure
-
lazy val
pp: Int
Number of variables (including the intercept)
-
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
-
val
q: DenseMatrix[Double]
Final Q-matrix from the IRLS algorithm
-
val
r: DenseMatrix[Double]
Final R-matrix from the IRLS algorithm
-
lazy val
ri: DenseMatrix[Double]
Inverse of the final R-matrix
-
lazy val
se: DenseVector[Double]
Standard errors for the regression coefficients
-
def
summary: Unit
Prints a human-readable regression summary to the console
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val y: DenseVector[Double]
-
lazy val
z: DenseVector[Double]
z-statistics for the regression coefficients