Regression Analysis (SML)


SM1OPN, SM1EX, SM1CLS, SM1RV,
SM2OPN, SM2EX, SM2CLS, SM2RV,
SM3OPN, SM3EX, SM3CLS, SM3RV
NAME
    sm1opn / sm2opn / sm3opn - Initialize regression analysis
    sm1ex  / sm2ex  / sm3ex  - Indicate each data to apply regression analysis
    sm1cls / sm2cls / sm3cls - Calculate regression coefficients
    sm1rv  / sm2rv  / sm3rv  - Calculate the value(s) of regression formula

        sm1opn / sm1ex / sm1cls / sm1rv :
                          for N dimension linear regression (N <= 8)
        sm2opn / sm2ex / sm2cls / sm2rv :
                          for 2-dimensional N-th degree regression (N <= 8)
        sm3opn / sm3ex / sm3cls / sm3rv :
                          for 3-dimensional N-th degree regression (N <= 5)

    [Example of Sequence of Regression Coefficients]
    for 5 dimension (t1-t5) linear regression:
       c0 + c1*t1 + c2*t2 + c3*t3 + c4*t4 + c5*t5
    for 2 dimension (u,v) 4th degree regression:
       c0 + c10*u + c11*v + c20*u*u + c21*u*v + c22*v*v
          + c30*u*u*u + c31*u*u*v + c32*u*v*v + c33*v*v*v
          + c40*u*u*u*u + c41*u*u*u*v + c42*u*u*v*v + c43*u*v*v*v + c44*v*v*v*v
    for 3 dimension (x,y,z) cubic regression:
       c0 + c11*x + c12*y + c13*z
          + c211*x*x + c212*x*y + c213*y*z + c222*y*y + c223*y*z + c233*z*z
          + c3111*x*x*x + c3112*x*x*y + c3113*x*x*z + c3122*x*y*y + c3123*x*y*z
          + c3133*x*z*z + c3222*y*y*y + c3223*y*y*z + c3233*y*z*z + c3333*z*z*z

SYNOPSIS

      call sm1opn(nvar, nsrc)
      call sm2opn(ndg2, nsrc)
      call sm3opn(ndg3, nsrc)
  nvar    [int]  Number of dimension (1 <= nvar <= 8)
  ndg2    [int]  Number of degree for 2-dimensional regression
                   (1 <= ndg2 <= 8)
  ndg3    [int]  Number of degree for 3-dimensional regression
                   (1 <= ndg3 <= 5)
  nsrc    [int]  Number of variables to apply regression (1 <= nsrc <= 5)

      call sm1ex(var, src)
      call sm2ex(u, v, src)
      call sm3ex(x, y, z, src)
  var     [float] Array containing independent parameters (nvar elements)
  u, v    [float] 2 independent parameters of 2-dimensional regression
  x, y, z [float] 3 independent parameters of 3-dimensional regression
  src     [float] Array containing variables to apply regression
                   (nsrc elements)

      call sm1cls(coef, m, n)
      call sm2cls(coef, m, n)
      call sm3cls(coef, m, n)
  coef    [float] Array to return regression coefficients
  m, n    [int]   Adjustable size of coef [dimension coef(m,n)]
            Usually, m and n are set to the number of regression coefficients
        and the number of variables (nsrc).
            If m and/or n is less than those numbers, the excess part of
        coefficients are not returned.  So, m and/or n may be zero or minus.
        Even if m and/or n is greater than those numbers, only actual numbers
        of coefficients are returned, and further location of the array is not
        changed.
          Number of regression coefficients are:
            2, 3, 4, 5, 6, 7, 8, 9
               for N dimension linear regression (N=1,2,3,4,5,6,7,8) ,
            3, 6,10,15,21,28,36,45
               for 2-dimensional N-th degree regression (N=1,2,3,4,5,6,7,8) ,
            4,10,20,35,56  3-dimensional N-th degree regression (N=1,2,3,4,5) .

      call sm1rv(var, sml)
      call sm2rv(u, v, sml)
      call sm3rv(x, y, z, sml)
  var     [float] Array defining the independent parameters to calculate
                  regression formula value(s). (nvar elements)
  u, v    [float] 2 independent parameters to calculate 2-dimensional
                  regression formula value(s).
  x, y, z [float] 3 independent parameters to calculate 3-dimensional
                  regression formula value(s).
  sml     [float] Array to return regression formula value(s) (nsrc elements)