pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src/math/ts innovations.c ChangeLog


From: Jason H Stover
Subject: [Pspp-cvs] pspp/src/math/ts innovations.c ChangeLog
Date: Wed, 21 Jun 2006 09:20:52 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Jason H Stover <jstover>        06/06/21 09:20:52

Modified files:
        src/math/ts    : innovations.c ChangeLog 

Log message:
        save coefficients in innovations estimate structure

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/ts/innovations.c?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/ts/ChangeLog?cvsroot=pspp&r1=1.5&r2=1.6

Patches:
Index: innovations.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/ts/innovations.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- innovations.c       21 Jun 2006 08:54:46 -0000      1.5
+++ innovations.c       21 Jun 2006 09:20:52 -0000      1.6
@@ -239,6 +239,30 @@
            }
          innovations_update_scale (est[n], theta[i], i);
        }
+      /* Copy the final row of coefficients into EST->COEFF.*/
+      for (i = 0; i < max_lag; i++)
+       {
+         /*
+           The order of storage here means that the best predicted value
+           for the time series is computed as follows:
+
+           Let X[m], X[m-1],... denote the original series.
+           Let X_hat[0] denote the best predicted value of X[0],
+           X_hat[1] denote the projection of X[1] onto the subspace
+           spanned by {X[0] - X_hat[0]}. Let X_hat[m] denote the 
+           projection of X[m] onto the subspace spanned by {X[m-1] - 
X_hat[m-1],
+           X[m-2] - X_hat[m-2],...,X[0] - X_hat[0]}.
+
+           Then X_hat[m] = est->coeff[m-1] * (X[m-1] - X_hat[m-1])
+                         + est->coeff[m-1] * (X[m-2] - X_hat[m-2])
+                         ...
+                         + est->coeff[m-max_lag] * (X[m - max_lag] - X_hat[m - 
max_lag])
+
+           (That is what X_hat[m] SHOULD be, anyway. These routines need
+           to be tested.)
+          */
+         pspp_coeff_set_estimate (est[n]->coeff[i], theta[max_lag - 1][i]);
+       }
     }
   for (i = 0; i < max_lag; i++)
     {

Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/ts/ChangeLog,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- ChangeLog   21 Jun 2006 08:54:46 -0000      1.5
+++ ChangeLog   21 Jun 2006 09:20:52 -0000      1.6
@@ -1,6 +1,8 @@
 2006-06-21  Jason Stover  <address@hidden>
 
        * innovations.c (innovations_update_scale): New function.
+       * innovations.c (get_coef): Save computed coefficients in est->coeff.
+
        * innovations.c (get_coef): Initialize and free the innovations
        coefficients. Call innovations_update_scale ().
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]