RegressionResultsIfc

A useful resource for regression can be found at (https://online.stat.psu.edu/stat501/lesson/5/5.3)

Inheritors

Properties

Link copied to clipboard
abstract val adjustedRSquared: Double

This is the adjusted R-squared = 1 - ((1 - R-squared)*(n-1)/(n-p)) where n is the number of observations and p is the number of parameters estimated (including the intercept).

Link copied to clipboard

The Cook distance measures for diagnostic plotting

Link copied to clipboard
open val errorDoF: Double

The degrees of freedom for the error

Link copied to clipboard
abstract val errorVariance: Double

An estimate of the variance of the (residual) errors. This is MSE = SSE/(n-p)

Link copied to clipboard
open val fPValue: Double
Link copied to clipboard
open val fStatistic: Double

This is MSR/MSE

Link copied to clipboard
abstract val hasIntercept: Boolean

Indicates true if the regression model includes an intercept term.

Link copied to clipboard

The diagonal entries from the hat matrix

Link copied to clipboard
abstract val hatMatrix: Array<DoubleArray>

The hat matrix is defined in terms of the design matrix X by $X(X^{T}X)^{-1}X^{T}$

Link copied to clipboard

A pseudonym for error variance (MSE)

Link copied to clipboard

This is MSR = SSR/(p-1)

Link copied to clipboard
abstract val numObservations: Int

The total number of observations (y_1, y_2, ..., y_n), where n = the number of observations.

Link copied to clipboard
abstract val numParameters: Int

Number of parameters in the model (including the intercept, if estimated)

Link copied to clipboard
Link copied to clipboard
abstract val parameters: DoubleArray

An array containing the estimated parameters of the regression. The b_0, b_1_,..., b_k, where b_0 is the intercept term and k is the number of parameters estimated, so p = k + 1 is the total number of parameters (including the intercept term).

Link copied to clipboard

The standard error estimate for each regression coefficient.

Link copied to clipboard

Estimates for the variance of the regression parameters. The variance-covariance matrix of the regression parameters

Link copied to clipboard

The test statistics for testing if parameter j is significant. This is parametersi divided by parametersStdErrori.

Link copied to clipboard

This is the yHat_i. The predicted values for each observation.

Link copied to clipboard
abstract val predictorNames: List<String>

The names of the predictor variables

Link copied to clipboard

An estimate of the variance of Y. The sample variance of the dependent variable.

Link copied to clipboard

The degrees of freedom for the regression (numParameters - 1)

Link copied to clipboard

The average distance that the observed values fall from the regression line. It tells you how wrong the regression model is on average using the units of the response variable. Smaller values are better because it indicates that the observations are closer to the fitted line. The standard deviation of the errors in the regression model. Sometimes called the standard error of the estimate. This is the square root of MSE.

Link copied to clipboard

This is the sum of squares of the regression (SSR) SST = SSR + SSE. Thus, SSR = SST - SSE

Link copied to clipboard
abstract val residuals: DoubleArray

The array of residual errors, e_i = (y_i - yHat_i)

Link copied to clipboard

This is SSE (sum of squared residual error).

Link copied to clipboard
abstract val response: DoubleArray

The response values, the regressand values, the Y's

Link copied to clipboard
abstract var responseName: String

The name of the response variable

Link copied to clipboard
abstract val rSquared: Double

This is the coefficient of multiple determination. R-squared = SSR/SST = 1 - SSE/SST, where SSE is the sum of squared residuals, SST is the total sum of squares, and SSR is the sum of squares for the regression. Note that SST = SSR + SSE.

Link copied to clipboard

The array of standardize residuals

Link copied to clipboard

The studentized residuals for diagnostic plotting

Link copied to clipboard
open val totalDoF: Double

The degrees of freedom for the total error

Link copied to clipboard

The SST total sum of squares. Sum of squared deviations of Y from its mean.

Functions

Link copied to clipboard
open fun anovaResults(): String

ANOVA results for regression as a string

Link copied to clipboard
Link copied to clipboard
open fun htmlResults(level: Double = 0.95): String

The regression results in the form of a html string

Link copied to clipboard

This assumes that the errors are normally distributed with mean zero and constant variance. The level must be a valid probability. The default is 0.95.

Link copied to clipboard
open fun parameterResults(level: Double = 0.95): AnyFrame

A data frame holding the parameter results for the regression.

Link copied to clipboard
abstract fun predictorData(name: String): DoubleArray

The data associated with the named predictor. The name must exist as a predictor name.

Link copied to clipboard
open fun residualsAsDataFrame(): AnyFrame

All the residual data in a data frame (responseName, "Predicted", "Residuals", "StandardizedResiduals", "StudentizedResiduals", "h_ii", "CookDistances")

Link copied to clipboard

A plot of the residuals based on observation order.

Link copied to clipboard

A scatter plot of the residuals (on y-axis) and predicted (on x-axis).

Link copied to clipboard
open fun results(level: Double = 0.95): String

The regression results as a String.

Link copied to clipboard

Shows the diagnostic plots within a browser window.

Link copied to clipboard
open fun showResultsInBrowser(level: Double = 0.95)

Shows the diagnostic plots within a browser window.

Link copied to clipboard

A fit distribution plot of the standardized residuals for checking normality.