Click or drag to resize
UserBasisRegression Class
Generates summary statistics using user-supplied functions in a nonlinear regression model.
Inheritance Hierarchy
SystemObject
  Imsl.StatUserBasisRegression

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
[SerializableAttribute]
public class UserBasisRegression

The UserBasisRegression type exposes the following members.

Constructors
  NameDescription
Public methodUserBasisRegression
Constructs a UserBasisRegression object.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetCoefficients
Returns the regression coefficients.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Adds a new observation and associated weight to the IRegressionBasis object.
Top
Properties
  NameDescription
Public propertyANOVA
An analysis of variance table and related statistics.
Top
Remarks

Fits a linear function of the form

y = c_0  + c_1 f_1 (x) + c_2 f_2 (x) +  \cdots  + c_k f_k (x) + \varepsilon
, where f_1 (x),f_2 (x), \cdots ,f_k (x) are the user basis functions f_i (x) evaluated at index values i = 1,2, \ldots ,k,c_0 is the intercept, c_1 ,c_2 , \cdots ,c_k are the coefficients associated with the basis functions, and is the random error associated with y. The coefficients c_0 ,c_1 , \cdots ,c_k are determined by least squares.

Description

UserBasisRegression generalizes the concept of linear regression to user defined basis functions. The linear regression model is

y = c_0  + c_1 x_1  +  \cdots  + c_k x_k  + \varepsilon
, where are the k independent variables. UserBasisRegression generalizes this concept by setting x_i  = f_i (x), where f_i (x) is any user defined function of x.

This makes it easier for users to fit complex univariate models. For example, the LinearRegression class can be used to fit polynomials such as

y = c_0  + c_1 x + c_2 x^2  \cdots  + c_k x^k  + \varepsilon
, but this requires an input matrix where the ith column of that array contains the values of x^i.

With UserBasisRegression, these columns can be automatically generated. For this polynomial model, the user would define a user basis function f_i (x) = x^{i + 1}. The UserBasisRegression class automatically inserts the necessary values into the regression equation and then calculates the coefficients and analysis of variance statistics.

Since the user provides a method for calculating the basis function, other more complex user basis functions are possible such as

y = c_1 Sin(x) + c_2 Cos(x) + \varepsilon
. In this case, nBasis=2, f_0 (x) = Sin(x), and f_1 (x) = Cos(x).

See Also