Represents a linear regression model.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Class LinearRegressionModel _ Inherits GeneralLinearModel |
| C# |
|---|
public class LinearRegressionModel : GeneralLinearModel |
| C++ |
|---|
public ref class LinearRegressionModel : public GeneralLinearModel |
Methods
| Icon | Type | Description |
|---|---|---|
| Compute() |
Computes the model.
| |
| ComputeModel() |
Fits the model to the data.
| |
| Contains(GeneralLinearModel) |
Returns a value that indicates whether another GeneralLinearModel is nested
within this instance.
| |
| Equals(Object) | ||
| Finalize() | ||
| GetCorrelationMatrix() |
Gets the correlation matrix for the independent variables in the model.
| |
| GetCovarianceMatrix() |
Gets the covariance matrix for the independent variables in the model.
| |
| GetDurbinWatsonStatistic() |
Gets the Durbin-Watson statistic for the residuals of the regression.
| |
| GetHashCode() | Serves as a hash function for a particular type. | |
| GetNormalityOfResidualsTest() |
Returns a test to verify that the residuals follow a normal distribution.
| |
| GetNormalityOfResidualsTest(TestOfNormality) |
Returns a test to verify that the residuals follow a normal distribution.
| |
| GetSumOfSquaresMatrix() |
Calculates the sum-of-squares matrix for the
VariableCollection.
| |
| GetType() | Gets the Type of the current instance. | |
| MemberwiseClone() | Creates a shallow copy of the current Object. | |
| Predict(Double[]()) |
Predicts the value of the dependent variable based on the specified values of the independent
variables.
| |
| Predict(Vector) |
Predicts the value of the dependent variable based on the specified values of the independent
variables.
| |
| Predict(Matrix) |
Predicts the values of the dependent variable for multiple collectionso of values
for the independent variables.
| |
| ResetComputation() |
Clears all computed model parameters.
| |
| SetAnovaModelRow(Int32, String, Double, Double) |
Sets the data of a row in the model's AnovaTable.
| |
| SetAnovaRow(AnovaRowType, String, Double, Double) |
Sets the data of a row in the model's AnovaTable.
| |
| ToString() |
Constructors
| Icon | Type | Description |
|---|---|---|
| LinearRegressionModelNew(VariableCollection, String, String[]()) |
Constructs a new LinearRegressionModel.
| |
| LinearRegressionModelNew(DataTable, String, String[]()) |
Constructs a new LinearRegressionModel.
| |
| LinearRegressionModelNew(Vector, Matrix) |
Constructs a new SimpleRegressionModel.
| |
| LinearRegressionModelNew(NumericalVariable, NumericalVariable[]()) |
Constructs a new LinearRegressionModel.
|
Properties
| Icon | Type | Description |
|---|---|---|
| AdjustedRSquared |
Gets the adjusted R Squared value for the regression.
| |
| AnovaTable |
Gets the AnovaTable that summarizes the results of this model.
| |
| BestFitParameters |
Gets a vector containing the values of the regression parameters.
| |
| CoefficientOfVariation |
Gets the coefficient of variation for the regression.
| |
| Computed |
Gets a value that indicates whether the regression model has been computed.
| |
| DegreesOfFreedom |
Gets the total degrees of freedom of the data.
| |
| DependentVariable |
Gets the dependent variable for the regression model.
| |
| DependentVariables |
Gets the collection of dependent variables associated with this model.
| |
| FStatistic |
Gets the F statistic for the regression.
| |
| IndependentVariables |
Gets the collection of independent variables associated with this model.
| |
| InterceptParameterName |
Gets or sets the name of the intercept parameter.
| |
| NoIntercept |
Gets or sets a value that indicates whether to include the intercept or constant term in the
regression model.
| |
| ObservationMatrix |
Gets or sets a Matrix whose rows contain
the observations.
| |
| Parameters |
Gets the collection of parameters associated with this model.
| |
| PredictedValues |
Gets a vector containing the model's predicted values for the dependent variable.
| |
| PValue |
Gets the probability corresponding to the F statistic for the regression.
| |
| Residuals |
Gets a vector containing the residuals of the model.
| |
| ResidualSumOfSquares |
Gets the sum of squares of the residuals of the model.
| |
| RSquared |
Gets the R Squared value for the regression.
| |
| StandardError |
Gets the standard error of the regression.
| |
| WeightVector |
Gets or sets the weights of the observations in this
model.
|
Remarks
Use the LinearRegressionModel class to analyze a linear relationship between
two or more numerical variables. A multiple linear regression model tries to express one variable, called the
dependent variable, as a linear combination of one or more other variables called independent variables
or predictors.
Two derived classes provide convenient interfaces for specific kinds of regression.
The SimpleRegressionModel class represents a linear regression model with one independent variable.The PolynomialRegressionModel class represents a polynomial regression model for polynomials in one independent variable.