Class UserBasisRegressionEx2

java.lang.Object
com.imsl.test.example.stat.UserBasisRegressionEx2

public class UserBasisRegressionEx2 extends Object

Fits a regression to a polynomial with user defined basis functions.

In this example, we fit the polynomial \(y = c_0 + c_1 x + c_2 x^2 \cdots + c_4 x^4 + \varepsilon\). For this model, the user basis function is \(f_i (x) = x^{i + 1}\) with \(i = 0,1, \cdots ,nBasis = 4\) and hasIntercept=true.

Data are generated using the model \(y = 10 + 2x + 5x^3\) with \(x = 0,1, \cdots 9\).

See Also:
  • Constructor Details

    • UserBasisRegressionEx2

      public UserBasisRegressionEx2()
  • Method Details

    • main

      public static void main(String[] args)