JMSLTM Numerical Library 4.0

com.imsl.stat
Class UserBasisRegression

java.lang.Object
  extended bycom.imsl.stat.UserBasisRegression

public class UserBasisRegression
extends Object

Generates summary statistics using user supplied functions in a nonlinear regression model

See Also:
Example

Constructor Summary
UserBasisRegression(RegressionBasis basis, int nBasis, boolean hasIntercept)
          Constructs a UserBasisRegression object
 
Method Summary
 ANOVA getANOVA()
          Get an analysis of variance table and related statistics.
 double[] getCoefficients()
          Returns the regression coefficients.
 void update(double x, double y, double w)
          Adds a new observation and associated weight to the RegressionBasis object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserBasisRegression

public UserBasisRegression(RegressionBasis basis,
                           int nBasis,
                           boolean hasIntercept)
Constructs a UserBasisRegression object

Parameters:
basis - a RegressionBasis basis function supplied by the user
nBasis - an int which specifies the number of basis functions
hasIntercept - a boolean which specifies whether or not the model has an intercept
Method Detail

getANOVA

public ANOVA getANOVA()
Get an analysis of variance table and related statistics.

Returns:
an ANOVA table and related statistics

getCoefficients

public double[] getCoefficients()
Returns the regression coefficients.

Returns:
A double array containing the regression coefficients. If hasIntercept is false its length is equal to the number of variables. If hasIntercept is true then its length is the number of variables plus one and the 0-th entry is the value of the intercept.
Throws:
SingularMatrixException - is thrown when the regression matrix is singular.

update

public void update(double x,
                   double y,
                   double w)
Adds a new observation and associated weight to the RegressionBasis object.

Parameters:
x - a double containing the independent (explanatory) variable.
y - a double containing the dependent (response) variable.
w - a double representing the weight

JMSLTM Numerical Library 4.0

Copyright 1970-2006 Visual Numerics, Inc.
Built June 1 2006.