diff --git a/CFiles/congradmin.c b/CFiles/congradmin.c deleted file mode 100644 index b09abf9801afb8fed4a674d970d0664ad7d0490d..0000000000000000000000000000000000000000 --- a/CFiles/congradmin.c +++ /dev/null @@ -1,580 +0,0 @@ -/************************************************************* - * Conjugate Gradient Minimization Methods. See Numerical Recipes in C by Press, Flannery, Teukolsky, and Vetterling. - * (I) frprmn(): Plolak-Ribiere method with the line minimization without using the derivative information. - * (II) dlinmin(): Fletcher-Reeves method with the line minimization using the derivative information. - * - * Modified by Tao Zha, September 2003. -*************************************************************/ - -#include "congradmin.h" - -static void linmin(double p[], double xi[], int n, double *fret, double tol_brent, int itmax_brent, double (*func)(double [], int)); -static double brent(double ax, double bx, double cx, double (*f)(double), double tol_brent, double itmax_brent, double *xmin); -// -static void dlinmin(double p[], double xi[], int n, double *fret, double tol_dbrent, double itmax_dbrent, double *grdh_p, double (*func)(double [], int), void (*dfunc)(double [], double [], int, double (*func)(double [], int), double *, double)); -static double dbrent(double ax, double bx, double cx, double (*f)(double), double (*df)(double, double *), double *grdh_p, double tol_dbrent, double itmax_dbrent, double *xmin); -static double df1dim(double x, double *grdh_p); -// -static void mnbrak(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc, double (*func)(double)); -static double f1dim(double x); -// -static double ftd_norm2(double *vnew_p, double *vold_p, int _n); -static double ftd_innerproduct(double *x, double *y, int _n); - - -#define ANGLE 0.001 //.0 implies 90.00 degress (acrcos(ANGLE)*180/pi). - //.005 implies 89.71 degrees (acrcos(ANGLE)*180/pi). - //.01 implies 89.43 degrees (acrcos(ANGLE)*180/pi). - //.05 implies 87.13 degrees (acrcos(ANGLE)*180/pi). - //.1 implies 84.26 degrees (acrcos(ANGLE)*180/pi). -#define STRLEN 192 -static FILE *fptr_interesults = (FILE *)NULL; //Printing intermediate results to a file. -static char filename_sp3vecs[STRLEN]; //Three vectors. 1st row: line search direction; 2nd row: numerical gradient; 3rd row: vectorized parameters. -//static FILE *fptr_interesults_db = (FILE *)NULL; //Printing intermediate results to a file for debugging (db). -#define PRINTON //Added by TZ, September 2003. -#define EPS 1.0e-10 //Small number to rectify special case of converging to exactly zero function value. -#ifdef PRINTON //Added by TZ, September 2003. - #define FREEALL {tzDestroy(xi); tzDestroy(h); tzDestroy(g); tzDestroy(pold); tzDestroy(numgrad)} -#else - #define FREEALL {tzDestroy(xi); tzDestroy(h); tzDestroy(g);} -#endif -void frprmn(double p[], int n, int *iter, double *fret, - double (*func)(double [], int), void (*dfunc)(double [], double [], int, double (*func)(double [], int), double *, double), - double *ftol_p, int *itmax_p, double *tol_brent_p, int *itmax_brent_p, double *grdh_p) { - //Outputs: - // p[0, ..., n-1]: the location of the minimum if it converges, which replaces the starting value. - // iter: pointer to the number of iterations that were performed. - // fret: pointer to the minimum value of the function. - //Inputs: - // p[0, ..., n-1]: a starting point for the minimization. - // n: the dimension of p. - // ftol_p: pointer to the convergence tolerance on the objective function value. Default: 1.0e-4 if NULL. - // itmax_p: pointer to the maximum number of iterations in the main minimization program frprmn(). Default: 2000 if NULL. - // tol_brent_p: pointer to the convergence tolerance for the line minimization in brent(). Default: 2.0e-4 if NULL. - // itmax_brent_p: pointer to the maximum number of iterations for the line minimization in brent(). Default: 100 if NULL. - // grdh: pointer to the user's specified step size for a numerical gradient. If NULL, dfunc() (i.e., gradcd_gen()) will select grdh automatically. - // func(): the objective function. - // dfunc(): the gradient function computing the numerical gradient. In the form of gradcd_gen() in cstz.c. - int j, its, itmax, itmax_brent; - double gg, gam, fp, dgg, ftol, tol_brent; - double *g=NULL, *h=NULL, *xi=NULL; - #ifdef PRINTON //Added by TZ, September 2003. - time_t begtime, currentime; - double normforp, *pold = NULL, *numgrad = NULL; - int cnt_wrong_dirs = -1; //Counts the number of times that a numerical direction in the line search has a wrong sign. - #endif - - //=== Memory allocation. - g=tzMalloc(n, double); - h=tzMalloc(n, double); - xi=tzMalloc(n, double); - // - numgrad = tzMalloc(n, double); //Added by TZ, September 2003. - #ifdef PRINTON //Added by TZ, September 2003. - pold = tzMalloc(n, double); - #endif - - //=== Default values. - if (!ftol_p) ftol = 1.0e-4; else ftol = *ftol_p; - if (!itmax_p) itmax = 200; else itmax = *itmax_p; - if (!tol_brent_p) tol_brent = 2.0e-4; else tol_brent = *tol_brent_p; - if (!itmax_brent_p) itmax_brent = 100; else itmax_brent = *itmax_brent_p; - - fp=(*func)(p, n); - (*dfunc)(xi, p, n, func, grdh_p, fp); - for (j=n-1;j>=0;j--) { - g[j] = -xi[j]; - xi[j]=h[j]=g[j]; - } - memcpy(numgrad, xi, n*sizeof(double)); //Added by TZ, September 2003. Save the numerical gradient to be printed out at the right place. - for (its=0;its<itmax;its++) { - #ifdef PRINTON - time(&begtime); //Added by TZ, September 2003. - memcpy(pold, p, n*sizeof(double)); //Added by TZ, September 2003. - #endif - //====== Added by TZ, September 2003 ====== - if ( !(fptr_interesults = fopen(filename_sp3vecs,"w")) ) { - printf("\n\nUnable to create the starting point data file %s in congradmin.c!\n", filename_sp3vecs); - getchar(); - exit(EXIT_FAILURE); - } - // rewind(fptr_interesults); //Must put the pointer at the beginning of the file. - //=== Prints out the line search direction. - fprintf(fptr_interesults, "--------Line search direction---------\n"); - for (j=0; j<n; j++) fprintf(fptr_interesults, " %0.16e ", xi[j]); - fprintf(fptr_interesults, "\n"); - // fflush( fptr_interesults ); - //=== Prints out the message about a wrong numerical direction in the line search for the miminziation. - if ( ftd_innerproduct(xi, numgrad, n)/(ftd_norm2(xi, xi, n)*ftd_norm2(numgrad, numgrad, n)) > - ANGLE ) { - #ifdef PRINTON - printf("\n----------------\n" - "Warning: wrong numerical direction in the line search for the miminziation (a total of %d times)!\n" - "----------------\n", ++cnt_wrong_dirs); - #endif - } - - - *iter=its; - #if defined (CGI_OPTIMIZATION) - linmin(p,xi,n,fret, tol_brent, itmax_brent, func); - #elif defined (CGII_OPTIMIZATION) - dlinmin(p, xi, n, fret, tol_brent, itmax_brent, grdh_p, func, dfunc); - #else - fn_DisplayError("The minimization routine frprmn() requires activating CGI_OPTIMIZATION or CGII_OPTIMIZATION in tzmatlab.h"); - #endif - #ifdef PRINTON - normforp = ftd_norm2(p, pold, n); - //=== Prints out intermediate results. - printf("\n========================================\n"); - printf("Intermediate results for the conjugate gradient algorithm."); - printf("\n (1) Number of iterations so far (maximum number): %d (%d)\n (2) New value of objective function (old value, improvement): %0.9f (%0.9f, %0.9f)\n" - " (3) Norm-2 of dx: %0.9f\n", - its, itmax, *fret, fp, fp-(*fret), normforp); - fflush(stdout); // Flush the buffer to get out this message without delay. - #endif - //====== The following statements print out intermediate results. Added by TZ, September 2003 ====== - //=== Prints out the gradient. - fprintf(fptr_interesults, "--------Numerical graident---------\n"); - for (j=0; j<n; j++) fprintf(fptr_interesults, " %0.16e ", numgrad[j]); - fprintf(fptr_interesults, "\n"); - // - fprintf(fptr_interesults, "--------Restarting point---------\n"); - for (j=0; j<n; j++) fprintf(fptr_interesults, " %0.16e ", p[j]); - fprintf(fptr_interesults, "\n\n"); -// fflush( fptr_interesults ); - tzFclose(fptr_interesults); - - - if (2.0*fabs(*fret-fp) <= ftol*(fabs(*fret)+fabs(fp)+EPS)) { - //This is a normal convergence. - printf("\n----- Normal convergence by the criterion of the objective function evaluation -----------\n"); - FREEALL - return; - } - fp=(*func)(p, n); - (*dfunc)(xi, p, n, func, grdh_p, fp); - memcpy(numgrad, xi, n*sizeof(double)); //Added by TZ, September 2003. Save the numerical gradient to be printed out at the right place. -// if (filename_sp3vecs) { -// //=== Prints out the gradient. -// fprintf(fptr_interesults, "--------Numerical graident---------\n"); -// for (j=0; j<n; j++) fprintf(fptr_interesults, " %0.16e ", xi[j]); -// fprintf(fptr_interesults, "\n\n"); -//// fflush( fptr_interesults ); - -// tzFclose(fptr_interesults); -// } - dgg=gg=0.0; - for (j=n-1;j>=0;j--) { - gg += g[j]*g[j]; - dgg += (xi[j]+g[j])*xi[j]; - } - if (gg == 0.0) { - FREEALL - return; - } - gam=dgg/gg; - for (j=n-1;j>=0;j--) { - g[j] = -xi[j]; - xi[j]=h[j]=g[j]+gam*h[j]; - } - - #ifdef PRINTON - time(¤time); - //=== Times the iterative progress. - printf(" (4) Seconds to complete one iteration: %0.4f\n (5) Current time of day: %s\n", difftime(currentime, begtime), ctime(¤time)); - fflush(stdout); // Flush the buffer to get out this message without delay. - #endif - } - fn_DisplayError("The maximum number of iterations in frprmn() is reached before convergence"); -} -#undef PRINTON -#undef EPS -#undef FREEALL - - -#if defined (CGI_OPTIMIZATION) - static int ncom; - static double *pcom=NULL, *xicom=NULL, (*nrfunc)(double [], int); //nrfunc(), pcom, ncom, and xicom will be used by f1dim(). - static void linmin(double p[], double xi[], int n, double *fret, double tol_brent, int itmax_brent, double (*func)(double [], int)) { - //Outputs: - // p[0, ..., n-1]: a returned and reset value. - // xi[0, ..., n-1]: a value repaced by the actual vector displacement that p was moved. - // fret: the value of func at the returned location p. - //Inputs: - // p[0, ..., n-1]: a given point. - // xi[0, ..., n-1]: a given multidimensional direction. - // n: the dimension of p and xi. - // func(): the objective function. - int j; - double xx,xmin,fx,fb,fa,bx,ax; - - ncom=n; - pcom = tzMalloc(n, double); - xicom = tzMalloc(n, double); - nrfunc=func; - for (j=n-1;j>=0;j--) { - pcom[j]=p[j]; - xicom[j]=xi[j]; - } - ax=0.0; - xx=1.0; - mnbrak(&ax,&xx,&bx,&fa,&fx,&fb,f1dim); - *fret=brent(ax,xx,bx,f1dim, tol_brent, itmax_brent, &xmin); - for (j=n-1;j>=0;j--) { - xi[j] *= xmin; - p[j] += xi[j]; - } - tzDestroy(xicom); - tzDestroy(pcom); - } - - - //=== Used by linmin() only; - #define CGOLD 0.3819660 - #define ZEPS 1.0e-10 - #define SHFT(a,b,c,d) {(a)=(b);(b)=(c);(c)=(d);} - #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) - static double brent(double ax, double bx, double cx, double (*f)(double), double tol_brent, double itmax_brent, double *xmin) { - int iter; - double a,b,d,etemp,fu,fv,fw,fx,p,q,r,tol1,tol2,u,v,w,x,xm; - double e=0.0; - - a=(ax < cx ? ax : cx); - b=(ax > cx ? ax : cx); - x=w=v=bx; - fw=fv=fx=(*f)(x); - for (iter=0;iter<itmax_brent;iter++) { - xm=0.5*(a+b); - tol2=2.0*(tol1=tol_brent*fabs(x)+ZEPS); - if (fabs(x-xm) <= (tol2-0.5*(b-a))) { - *xmin=x; - return fx; - } - if (fabs(e) > tol1) { - r=(x-w)*(fx-fv); - q=(x-v)*(fx-fw); - p=(x-v)*q-(x-w)*r; - q=2.0*(q-r); - if (q > 0.0) p = -p; - q=fabs(q); - etemp=e; - e=d; - if (fabs(p) >= fabs(0.5*q*etemp) || p <= q*(a-x) || p >= q*(b-x)) - d=CGOLD*(e=(x >= xm ? a-x : b-x)); - else { - d=p/q; - u=x+d; - if (u-a < tol2 || b-u < tol2) - d=SIGN(tol1,xm-x); - } - } else { - d=CGOLD*(e=(x >= xm ? a-x : b-x)); - } - u=(fabs(d) >= tol1 ? x+d : x+SIGN(tol1,d)); - fu=(*f)(u); - if (fu <= fx) { - if (u >= x) a=x; else b=x; - SHFT(v,w,x,u) - SHFT(fv,fw,fx,fu) - } else { - if (u < x) a=u; else b=u; - if (fu <= fw || w == x) { - v=w; - w=u; - fv=fw; - fw=fu; - } else if (fu <= fv || v == x || v == w) { - v=u; - fv=fu; - } - } - } - fn_DisplayError("The maximum number of iterations in brent() is reached before convergence"); - *xmin=x; - return fx; - } - #undef CGOLD - #undef ZEPS - #undef SHFT - #undef SIGN - -#else //Default to CGII_OPTIMIZATION - - static int ncom; - static double *pcom=NULL, *xicom=NULL, (*nrfunc)(double [], int); //nrfunc(), pcom, ncom, and xicom will be used by f1dim() and df1dim(). - static void (*nrdfun)(double [], double [], int, double (*func)(double [], int), double *, double); - static void dlinmin(double p[], double xi[], int n, double *fret, double tol_dbrent, double itmax_dbrent, double *grdh_p, double (*func)(double [], int), void (*dfunc)(double [], double [], int, double (*func)(double [], int), double *, double)) { - //Outputs: - // p[0, ..., n-1]: a returned and reset value. - // xi[0, ..., n-1]: a value repaced by the actual vector displacement that p was moved. - // fret: the value of func at the returned location p. - //Inputs: - // p[0, ..., n-1]: a given point. - // xi[0, ..., n-1]: a given multidimensional direction. - // n: the dimension of p and xi. - // func(): the objective function. - // dfunc(): the gradient function computing the numerical gradient. In the form of gradcd_gen() in cstz.c. - - int j; - double xx,xmin,fx,fb,fa,bx,ax; - - ncom=n; - pcom = tzMalloc(n, double); - xicom = tzMalloc(n, double); - nrfunc=func; - nrdfun=dfunc; - for (j=n-1;j>=0;j--) { - pcom[j]=p[j]; - xicom[j]=xi[j]; - } - ax=0.0; - xx=1.0; - mnbrak(&ax,&xx,&bx,&fa,&fx,&fb,f1dim); - *fret=dbrent(ax,xx,bx,f1dim, df1dim, grdh_p, tol_dbrent, itmax_dbrent, &xmin); - for (j=n-1;j>=0;j--) { - xi[j] *= xmin; - p[j] += xi[j]; - } - tzDestroy(xicom); - tzDestroy(pcom); - } - - - //=== Used by dlinmin() only; - #define ZEPS 1.0e-10 - #define MOV3(a,b,c, d,e,f) {(a)=(d);(b)=(e);(c)=(f);} - #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) - static double dbrent(double ax, double bx, double cx, double (*f)(double), double (*df)(double, double *), double *grdh_p, double tol_dbrent, double itmax_dbrent, double *xmin) { - int iter,ok1,ok2; - double a,b,d,d1,d2,du,dv,dw,dx,e=0.0; - double fu,fv,fw,fx,olde,tol1,tol2,u,u1,u2,v,w,x,xm; - - a=(ax < cx ? ax : cx); - b=(ax > cx ? ax : cx); - x=w=v=bx; - fw=fv=fx=(*f)(x); - dw=dv=dx=(*df)(x, grdh_p); - for (iter=1;iter<=itmax_dbrent;iter++) { - xm=0.5*(a+b); - tol1=tol_dbrent*fabs(x)+ZEPS; - tol2=2.0*tol1; - if (fabs(x-xm) <= (tol2-0.5*(b-a))) { - *xmin=x; - return fx; - } - if (fabs(e) > tol1) { - d1=2.0*(b-a); - d2=d1; - if (dw != dx) d1=(w-x)*dx/(dx-dw); - if (dv != dx) d2=(v-x)*dx/(dx-dv); - u1=x+d1; - u2=x+d2; - ok1 = (a-u1)*(u1-b) > 0.0 && dx*d1 <= 0.0; - ok2 = (a-u2)*(u2-b) > 0.0 && dx*d2 <= 0.0; - olde=e; - e=d; - if (ok1 || ok2) { - if (ok1 && ok2) - d=(fabs(d1) < fabs(d2) ? d1 : d2); - else if (ok1) - d=d1; - else - d=d2; - if (fabs(d) <= fabs(0.5*olde)) { - u=x+d; - if (u-a < tol2 || b-u < tol2) - d=SIGN(tol1,xm-x); - } else { - d=0.5*(e=(dx >= 0.0 ? a-x : b-x)); - } - } else { - d=0.5*(e=(dx >= 0.0 ? a-x : b-x)); - } - } else { - d=0.5*(e=(dx >= 0.0 ? a-x : b-x)); - } - if (fabs(d) >= tol1) { - u=x+d; - fu=(*f)(u); - } else { - u=x+SIGN(tol1,d); - fu=(*f)(u); - if (fu > fx) { - *xmin=x; - return fx; - } - } - du=(*df)(u, grdh_p); - if (fu <= fx) { - if (u >= x) a=x; else b=x; - MOV3(v,fv,dv, w,fw,dw) - MOV3(w,fw,dw, x,fx,dx) - MOV3(x,fx,dx, u,fu,du) - } else { - if (u < x) a=u; else b=u; - if (fu <= fw || w == x) { - MOV3(v,fv,dv, w,fw,dw) - MOV3(w,fw,dw, u,fu,du) - } else if (fu < fv || v == x || v == w) { - MOV3(v,fv,dv, u,fu,du) - } - } - } - fn_DisplayError("The maximum number of iterations in dbrent() is reached before convergence"); - return 0.0; - } - #undef ZEPS - #undef MOV3 - #undef SIGN - - //=== Used by dlinmin() and dbrent() only; - static double df1dim(double x, double *grdh_p) { - int j; - double df1=0.0; - double *xt,*df; - - xt = tzMalloc(ncom, double); - df = tzMalloc(ncom, double); - for (j=ncom-1;j>=0;j--) xt[j]=pcom[j]+x*xicom[j]; - (*nrdfun)(df, xt, ncom, nrfunc, grdh_p, nrfunc(xt, ncom)); - //=================== WARNING ====================== - //We use 0.0 because the current gradient function gradcd_gen() in cstz.c do not use this function value. A more - // sophisticated central gradient method would require this function value, and therefore we must pass - // nrfunc(xt, ncom) instead of 0.0. TZ, September 2003. - //=================== WARNING ====================== - for (j=ncom-1;j>=0;j--) df1 += df[j]*xicom[j]; - tzDestroy(df); - tzDestroy(xt); - return df1; - } - -#endif - - - -static double f1dim(double x) { - //Collapsing to one dimension line search, used by limin() or dlimin(). - int j; - double f,*xt=NULL; - - xt = tzMalloc(ncom, double); - for (j=ncom-1;j>=0;j--) xt[j]=pcom[j]+x*xicom[j]; - f=(*nrfunc)(xt, ncom); - tzDestroy(xt); - return f; -} - - -#define GOLD 1.618034 -#define GLIMIT 100.0 -#define TINY 1.0e-20 -#define SHFT(a,b,c,d) {(a)=(b);(b)=(c);(c)=(d);} -#define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) -static void mnbrak(double *ax, double *bx, double *cx, double *fa, double *fb, double *fc, double (*func)(double)) { - double ulim,u,r,q,fu,dum, tmpd; - - *fa=(*func)(*ax); - *fb=(*func)(*bx); - if (*fb > *fa) { - SHFT(dum,*ax,*bx,dum) - SHFT(dum,*fb,*fa,dum) - } - *cx=(*bx)+GOLD*(*bx-*ax); - *fc=(*func)(*cx); - while (*fb > *fc) { - r=(*bx-*ax)*(*fb-*fc); - q=(*bx-*cx)*(*fb-*fa); - u=(*bx)-((*bx-*cx)*q-(*bx-*ax)*r)/ - (2.0*SIGN((tmpd=fabs(q-r))>TINY ? tmpd : TINY,q-r)); //Original: (2.0*SIGN(FMAX(fabs(q-r),TINY),q-r)); - ulim=(*bx)+GLIMIT*(*cx-*bx); - if ((*bx-u)*(u-*cx) > 0.0) { - fu=(*func)(u); - if (fu < *fc) { - *ax=(*bx); - *bx=u; - *fa=(*fb); - *fb=fu; - return; - } else if (fu > *fb) { - *cx=u; - *fc=fu; - return; - } - u=(*cx)+GOLD*(*cx-*bx); - fu=(*func)(u); - } else if ((*cx-u)*(u-ulim) > 0.0) { - fu=(*func)(u); - if (fu < *fc) { - SHFT(*bx,*cx,u,*cx+GOLD*(*cx-*bx)) - SHFT(*fb,*fc,fu,(*func)(u)) - } - } else if ((u-ulim)*(ulim-*cx) >= 0.0) { - u=ulim; - fu=(*func)(u); - } else { - u=(*cx)+GOLD*(*cx-*bx); - fu=(*func)(u); - } - SHFT(*ax,*bx,*cx,u) - SHFT(*fa,*fb,*fc,fu) - } -} -#undef GOLD -#undef GLIMIT -#undef TINY -#undef SHFT -#undef SIGN - - - - - -//------------------- -// My own functions. -//------------------- -//=== Computing Norm2 of dv. -static double ftd_norm2(double *vnew_p, double *vold_p, int _n) { - int _i; - double dtheta=0.0, //Cumulative. - tmpd; - - for (_i=_n-1; _i>=0; _i--) { - tmpd = vnew_p[_i] - vold_p[_i]; - dtheta += square(tmpd); - } - - return ( sqrt(dtheta) ); -} - -//=== Computing the inner product of x and y. -static double ftd_innerproduct(double *x, double *y, int _n) { - int _i; - double a = 0.0; //Cumulative. - for (_i=_n-1; _i>=0; _i--) a += x[_i] * y[_i]; //a += (*x++) * (*y++); Be aware that this alternative maybe too fancy. - return (a); -} - - - - -//=== Extern function to be accessed by other C files. -void congradmin_SetPrintFile(char *filename) { - if (!filename) sprintf(filename_sp3vecs, "outdata5congradmin.prn"); //Default filename. - else { - strcpy(filename_sp3vecs, filename); - //filename_sp3vecs[STRLEN-1] = '\0'; //The end of the string is set to NUL to prevent it from be a non-string. - } -} - - - -//void congradmin_SetPrintFile(FILE *fptr_sp) { -// fptr_interesults = fptr_sp; -//} - -//void congradmin_SetPrintFile_db(FILE *fptr_sp) { -// fptr_interesults_db = fptr_sp; -//} - - -#undef STRLEN diff --git a/CFiles/congradmin.h b/CFiles/congradmin.h deleted file mode 100644 index cd412ee8328014eaa45ea30da581e32f46e0c6a9..0000000000000000000000000000000000000000 --- a/CFiles/congradmin.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __CONGRADMIN_H__ -#define __CONGRADMIN_H__ - #include "tzmatlab.h" - - #include <string.h> - - - - - void frprmn(double p[], int n, int *iter, double *fret, - double (*func)(double [], int), void (*dfunc)(double [], double [], int, double (*func)(double [], int), double *, double), - double *ftol_p, int *itmax_p, double *tol_brent_p, int *itmax_brent_p, double *grdh_p); - //Outputs: - // p[0, ..., n-1]: the location of the minimum if it converges, which replaces the starting value. - // iter: pointer to the number of iterations that were performed. - // fret: pointer to the minimum value of the function. - //Inputs: - // p[0, ..., n-1]: a starting point for the minimization. - // n: the dimension of p. - // ftol_p: pointer to the convergence tolerance on the objective function value. Default: 1.0e-4 if NULL. - // itmax_p: pointer to the maximum number of iterations in the main minimization program frprmn(). Default: 2000 if NULL. - // tol_brent_p: pointer to the convergence tolerance for the line minimization in brent(). Default: 2.0e-4 if NULL. - // itmax_brent_p: pointer to the maximum number of iterations for the line minimization in brent(). Default: 100 if NULL. - // grdh: pointer to the user's specified step size for a numerical gradient. If NULL, dfunc() (i.e., gradcd_gen()) will select grdh automatically. - // func(): the objective function. - // dfunc(): the gradient function computing the numerical gradient. In the form of gradcd_gen() in cstz.c. - - void congradmin_SetPrintFile(char *filename); - //If filename=NULL, no intermediate results will be printed out to a file. -// void congradmin_SetPrintFile(FILE *fptr_sp); - //If fptr_sp=NULL, no intermediate results will be printed out to a file. -// void congradmin_SetPrintFile_db(FILE *fptr_sp); -#endif diff --git a/CFiles/csminwel.c b/CFiles/csminwel.c deleted file mode 100755 index 1b3597d9936b2dacb27f10828c627f30ccbc9fc0..0000000000000000000000000000000000000000 --- a/CFiles/csminwel.c +++ /dev/null @@ -1,854 +0,0 @@ -//======= Revisions by T. Zha. -//======= Fixing bugs: convering all if-else loop. 02/24/05 -/*========================================================= - * csminwel.c - * - * Unconstrained minimization. Uses a quasi-Newton method with BFGS update of - * the estimated inverse hessian. It is robust against certain pathologies - * common on likelihood functions. It attempts to be robust against "cliffs", - * i.e. hyperplane discontinuities, though it is not really clear whether what - * it does in such cases succeeds reliably. - * - * function [fhat,xhat,ghat,Hhat,itct,fcount,retcodehat] = csminwelmex(fcn,x0,H0,grad,crit,nit,varargin) - * fcn: string naming the objective function to be minimized - * x0: initial value of the parameter vector - * H0: initial value for the inverse Hessian. Must be positive definite. - * grad: Either a string naming a function that calculates the gradient, or the null matrix. - * If it's null, the program calculates a numerical gradient. In this case fcn must - * be written so that it can take a matrix argument and produce a row vector of values. - * crit: Convergence criterion. Iteration will cease when it proves impossible to improve the - * function value by more than crit. - * nit: Maximum number of iterations. - * varargin: A list of optional length of additional parameters that get handed off to fcn each - * time it is called. - * Note that if the program ends abnormally, it is possible to retrieve the current x, - * f, and H from the files g1.mat and H.mat that are written at each iteration and at each - * hessian update, respectively. (When the routine hits certain kinds of difficulty, it - * write g2.mat and g3.mat as well. If all were written at about the same time, any of them - * may be a decent starting point. One can also start from the one with best function value.) - * - * retcodes: 0, normal step (converged). 1, zero gradient (converged). - * 4,2, back and forth adjustment of stepsize didn't finish. - * 3, smallest stepsize still improves too slow. 5, largest step still improves too fast. - * 6, no improvement found. - *--------------------- - * Fixed 7/17/93 to use inverse-hessian instead of hessian itself in bfgs update. - * Fixed 7/19/93 to flip eigenvalues of H to get better performance when it's not psd. - * - * Note: to set the level of display output, change preprocessor definitions at the beginning of this file. - * to display all output, uncomment both VERBOSE_WARNINGS and VERBOSE_DETOUTPUT - * to display only warnings without output, uncomment VERBOSE_WARNINGS - * to display no ouput, comment both VERBOSE_DETOUTPUT and VERBOSE_WARNINGS - * - * MATLAB algorithm by Christopher Sims - * C implementation by Iskander Karibzhanov - * Modified by Dan Waggoner and Tao Zha - * - * Copyright(c) 1996 Christopher Sims - * Copyright(c) 2003 Karibzhanov, Waggoner, and Zha - *======================================================= - * Revision history by T. Zha: - * - * 10/3/2002 - 1. corrected problem with memory corruption in C-MEX-file (csminwelmex.c) - * (needed to switch fcnRhs[0] back to x[0] before destroying it. - * If we don't do this, we will later clear previously destroyed array - * (one of x[1], x[2] or x[3]) which causes memory fault. - * The reason why fcnRhs[0] pointed to array other than x[0] is - * because we use mxSetPr in feval and gfeval. - * This was not a problem in C-file (csminwel.c). - * - * 10/11/2002 - 1. changed csminit function to avoid using fPeak without first initializing it - * 2. added two switches in csminit function to assign retcode to 7 for lambda>=4 - * 3. added one more verbose level to display only warnings or all output * - * - * 07/13/2005 - Change #define GRADSTPS_CSMINWEL to double GRADSTPS_CSMINWEL in the .h file so the user can change the value. - * - * 03/10/2006 - Iskander's use of randmax=1/RAND_MAX is incorrect. Changed to randmax=1.0/RAND_MAX. Note rand() is in stdlib.h and time() is in time.h. - * - Fatal BUG by Iskander to have eye(n) instead of eye(nn). Corrected by TZ. - * -========================================================*/ - -//#include "csminwel.h" -#include "optpackage.h" - -#define VERBOSE_WARNINGS //Display warnings. -#define VERBOSE_DETOUTPUT //Display detailed output. -#define STRLEN 192 -//#define INDXNUMGRAD_CSMINWEL 2 //Index for choosing the numerical gradient. 1, forward difference; 2, central difference. - -double GRADSTPS_CSMINWEL = 1.0e-04; //Default value. Will be overwritten by the data in the input file if it exists. - //1.0e-04 (for monthly TBVAR) - //Step size for numerical gradient only when the value of x is less than 1.0 in absolute value. - //If abs(x)>1.0, the step size is GRADSTPS_CSMINWEL*x. -static int RANDOMSEED_CSMINWEL = 0; //Default value: no fixed seed. Will be initialized somewhere else through csminwel_randomseedChanged(). - - -static double GLB_sclForHess; -static int numgrad(double *g, double *x, int n, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims); -static void csminit(double *fhat, double *xhat, int *fcount, int *retcode, - double *x0, double f0, double *g, int badg, double *H0, int n, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims); -static void bfgsi(double *H, double *dg, double *dx, int n, int nn); -static int peakwall(double *g, int retcode, double *x, int n, - int (*gfcn)(double *x, int n, double *g, double **args, int *dims), - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims); -static double times(double *x, double *y, int n); -static double *mtimes(double *x, double *y, int n, int nn); -static double *mminus(double *x, double *y, int n); - - -static FILE *fptr_interesults = (FILE *)NULL; //Printing intermediate results to a file. -static char filename_sp2vecs[STRLEN]; //Two vectors. 1st row: numerical gradient; 2nd row: vectorized parameters. - - - -#define MAX_NUM_POSSIBLE_BADCASES 250 //After this number, reset inverse hessian (especially dealing with the case for "Correct for low angle"). -#define EPS (1.0e-10) //Small number to rectify special case of converging to exactly zero function value. -#define TERMINATEVALUE (1.0e+300) //If the value of the objective function at the intial value is greater than this, terminates the program. -void csminwel(double (*fcn)(double *x, int n, double **args, int *dims), - double *xh, int n, double *H, double *gh, - int (*gfcn)(double *x, int n, double *g, double **args, int *dims), - double *fh, double crit, int *itct, int nit, - int *fcount, int *retcodeh, double **args, int *dims) -{ - //If gfcn is passed as NULL, numerical gradient is automatically computed. - //unsigned int randomseed = (unsigned int)time((time_t)RANDOMSEED_CSMINWEL); //793; - - unsigned int randomseed; - static int first_time = TZ_TRUE; //Added by T.Zha; 03/10/2006. - - int done=0, badg[4], badgh, nogh=1, stuck=0; - double *x[4], *g[4], f[4], *dg, *dx; - int retcode[3], fc=0, ih, nn, i; - int cnt_n_badcases = 0; //Must set to 0. Counts the number of bad cases before restarting with the initial diagonal (inverse of) Hessian. Added by TZ. - TSdmatrix *H_dm = tzMalloc(1, TSdmatrix); //H_dm wil point to the same location as H. - #ifdef VERBOSE_DETOUTPUT - time_t begtime, currentime; - #endif - - //=== Seed for random number generator in stdlib.h. Added by T.Zha; 03/10/2006. - if (!RANDOMSEED_CSMINWEL) - randomseed = (unsigned int)time((time_t *)NULL); - //Note that (unsigned int)time(0) uses the time of day for random seed. - //Added by T.Zha; 03/10/2006. time() is in time.h. - else - randomseed = (unsigned int)RANDOMSEED_CSMINWEL; - - if ( first_time ) - { - first_time = TZ_FALSE; - srand( randomseed ); - } - - - GLB_sclForHess = H[0]; //The scale factor for the initial (inverse of) Hessian, which was supposed to be **diagonal**. Added by TZ. - - nn = n*n; /* n: dimension size of x or xh */ - *itct = -1; /* itct: number of actual iterations */ - *fcount = -1; /* fcount: number of evaluations of the function */ - - for (i=0; i<4; i++) - x[i] = tzMalloc(n, double); //x[i] = calloc(n, sizeof(double)); Commented out by TZ. - memcpy(x[0],xh,n*sizeof(double)); - - for (i=0; i<4; i++) - g[i] = tzMalloc(n, double); //calloc(n, sizeof(double)); Commented out by TZ. - - f[0] = fcn(x[0],n,args,dims); - - if (f[0] > TERMINATEVALUE) { - printf("Bad initial parameter. Minimization is terminated without any returned value!\n"); - return; - } - - if (gfcn) - /* if grad is a string, compute it */ - badg[0] = gfcn(x[0],n,g[0],args,dims); - else - /* if grad is not string, compute it */ - badg[0] = numgrad(g[0],x[0],n,fcn,args,dims); - retcode[2] = 101; - /* iterate until done is false */ - while (!done) { - #ifdef VERBOSE_DETOUTPUT - time(&begtime); - #endif - - for (i=0; i<n; i++) - g[1][i] = g[2][i] = g[3][i] = 0; - -// #ifdef VERBOSE_DETOUTPUT -// printf("-----------------\n-----------------\n"); -// printf("f at the beginning of new iteration, %.10f\nx = ",f[0]); -// for (i=0; i<n; i++) { -// printf("%15.8g ",x[0][i]); -// if (i%4==3) printf("\n"); -// } -// if (i%4>0) printf("\n"); -// #endif - - (*itct)++; - csminit(&f[1],x[1],&fc,&retcode[0],x[0],f[0],g[0],badg[0],H,n,fcn,args,dims); - *fcount += fc; - /* if retcode1=1 gradient is zero and you are at the peak */ - if (retcode[0]!=1) { - badg[1] = peakwall(g[1],retcode[0],x[1],n,gfcn,fcn,args,dims); - /* Bad gradient or back and forth on step length. - Possibly at cliff edge. Try perturbing search direction. */ - if (badg[1]) { - double *Hcliff = tzMalloc(nn, double); //calloc(nn,sizeof(double)); Commented out by TZ. - double randmax=1.0/(double)RAND_MAX; //03/10/2006, changed from 1/ to 1.0/ to make randmax a legal double. - /* if stuck, give it another try by perturbing Hessian */ - memcpy(Hcliff,H,nn*sizeof(double)); - for (i=0; i<nn; i+=n+1) - Hcliff[i] *= 1+rand()*randmax; //Random search. DDDDebugging. Hcliff[i] *= 1+0.5; - - #ifdef VERBOSE_WARNINGS - printf("======= Random search takes place now. =======\n"); - printf("Cliff. Perturbing search direction.\n"); - #endif - - csminit(&f[2],x[2],&fc,&retcode[1],x[0],f[0],g[0],badg[0],Hcliff,n,fcn,args,dims); - *fcount += fc; - if (f[2] < f[0]) { - badg[2] = peakwall(g[2],retcode[1],x[2],n,gfcn,fcn,args,dims); - if (badg[2]) { - double *xx = tzMalloc(n, double), nx; //calloc(n,sizeof(double)), nx; Commented out by TZ. - - #ifdef VERBOSE_WARNINGS - printf("Cliff again. Try traversing.\n"); - #endif - - for (i=0; i<n; i++) - xx[i] = x[2][i]-x[1][i]; - nx = times(xx,xx,n); - if (sqrt(nx) < 1e-13) { - f[3] = f[0]; - memcpy(x[3],x[0],n*sizeof(double)); - badg[3] = 1; - retcode[2] = 101; - } else { - double *gcliff = tzMalloc(n, double), //calloc(n,sizeof(double)), Commented out by TZ. - *eye = tzMalloc(nn, double); //calloc(n,sizeof(double)); Bugs of Iskander. Changed from n to nn. 03/10/06. - double dfnx = (f[2]-f[1])/nx; - for (i=0; i<n; i++) { - gcliff[i] = dfnx*xx[i]; - eye[i*(n+1)] = 1; - } - csminit(&f[3],x[3],&fc,&retcode[2],x[0],f[0],gcliff,0,eye,n,fcn,args,dims); - *fcount += fc; - badg[3] = peakwall(g[3],retcode[2],x[3],n,gfcn,fcn,args,dims); - tzDestroy(eye); - tzDestroy(gcliff); - } - tzDestroy(xx); - } else { - f[3] = f[0]; - memcpy(x[3],x[0],n*sizeof(double)); - badg[3] = 1; - retcode[2] = 101; - } - } else { - f[3] = f[0]; - memcpy(x[3],x[0],n*sizeof(double)); - badg[3] = 1; - retcode[2] = 101; - } - tzDestroy(Hcliff); - } else { - /* normal iteration, no walls, or else we're finished here. */ - f[2] = f[0]; - f[3] = f[0]; - badg[2] = 1; - badg[3] = 1; - retcode[1] = 101; - retcode[2] = 101; - } - } - else //Bugs fixed by T. Zha -- 02/24/05. - { - f[1] = f[0]; - f[2] = f[0]; - f[3] = f[0]; - retcode[1] = retcode[0]; - retcode[2] = retcode[0]; - } -// % normal iteration, no walls, or else we're finished here. -// f2=f; f3=f; badg2=1; badg3=1; retcode2=101; retcode3=101; -// f1=f; f2=f; f3=f; retcode2=retcode1; retcode3=retcode1; - - /* how to pick gh and xh */ - if (f[3]<f[0] && badg[3]==0) { - /* if 3 (transversing) was needed, it improved and gradient is good, take that */ - ih = 3; - *fh = f[3]; - memcpy(xh,x[3],n*sizeof(double)); - memcpy(gh,g[3],n*sizeof(double)); - badgh = badg[3]; - *retcodeh = retcode[2]; - } - else if (f[2]<f[0] && badg[2]==0) { - /* if 2 (perturbig) was needed, it improved and gradient is good, take that */ - ih = 2; - *fh = f[2]; - memcpy(xh,x[2],n*sizeof(double)); - memcpy(gh,g[2],n*sizeof(double)); - badgh = badg[2]; - *retcodeh = retcode[1]; - } - else if (f[1]<f[0] && badg[1]==0) { - /* if first try went fine, take that */ - ih = 1; - *fh = f[1]; - memcpy(xh,x[1],n*sizeof(double)); - memcpy(gh,g[1],n*sizeof(double)); - badgh = badg[1]; - *retcodeh = retcode[0]; - } - else { - /* if nothing worked, just take the min of your attempts and compute the gradient */ - if (f[1] <= f[2]) - if (f[1] <= f[3]) ih = 1; - else ih = 3; - else - if (f[2] <= f[3]) ih = 2; - else ih = 3; - *fh = f[ih]; - memcpy(xh,x[ih],n*sizeof(double)); - *retcodeh = retcode[ih-1]; - if (nogh) { - nogh = 0; - if (gfcn) - badgh = gfcn(xh,n,gh,args,dims); - else - badgh = numgrad(gh,xh,n,fcn,args,dims); - } - badgh = 1; - } - /* end of picking */ - stuck = fabs(*fh-f[0]) < crit; // Used if fh>0. TZ, 9/03. - //stuck = (2.0*fabs(*fh-f[0]) <= crit*(fabs(*fh)+fabs(f[0])+EPS)); //Used if fh<0. Added by TZ, 9/03. - /* if nothing REALLY worked, too bad, you're stuck */ - if (!badg[0] && !badgh && !stuck) { - /* if you are not stuck, update H0 matrix */ - dg = mminus(gh,g[0],n); - dx = mminus(xh,x[0],n); - bfgsi(H,dg,dx,n,nn); - tzDestroy(dx); - tzDestroy(dg); - } - - #ifdef VERBOSE_DETOUTPUT - //=== Prints out intermediate results. - printf("========================================\n"); - printf(" (1) New value of the obj. func. on iteration %d: %.9f\n (2) Old value: %.9f\n (3) Downhill improvement: %.9f\n", - (int)*itct, *fh, f[0], f[0]-(*fh)); - - time(¤time); - //=== Times the iterative progress. - printf(" (4) Seconds to complete one iteration: %0.4f\n (5) Current time of day: %s\n\n", difftime(currentime, begtime), ctime(¤time)); - fflush(stdout); // Flush the buffer to get out this message without delay. - #endif - - //--------- Prints outputs to a file. --------- - if ( !(fptr_interesults = fopen(filename_sp2vecs,"w")) ) { - printf("\n\nUnable to create the starting point data file %s in csminwel.c!\n", filename_sp2vecs); - getchar(); - exit(EXIT_FAILURE); - } - fprintf(fptr_interesults, "========= Only one block at a time if more-than-one blocks are used. ========== \n"); - fprintf(fptr_interesults, "--------Numerical gradient---------\n"); - for (i=0; i<n; i++) fprintf(fptr_interesults, " %0.16e ", gh[i]); - fprintf(fptr_interesults, "\n"); - fprintf(fptr_interesults, "--------Restarting point---------\n"); - for (i=0; i<n; i++) fprintf(fptr_interesults, " %0.16e ", xh[i]); - fprintf(fptr_interesults, "\n\n"); - fflush(fptr_interesults); - tzFclose(fptr_interesults); - - if ((int)*itct > nit) { - #ifdef VERBOSE_WARNINGS - printf("\nWarning: Termination as the maximum number of iterations %d is reached with return code %d.\n", nit, *retcodeh); - fprintf(FPTR_DEBUG, "\nWarning: Termination as the maximum number of iterations %d is reached with return code %d.\n", nit, *retcodeh); - #endif - done = 1; - } - else if (stuck) //stuck = 1 means fabs(*fh-f[0]) < crit, which means converged. why do we use the word "stuck" is beyond me. - { - #ifdef VERBOSE_DETOUTPUT - printf("\nConvergence (improvement < crit %.4e) with return code %d.\n", crit, *retcodeh); - fprintf(FPTR_DEBUG, "\nConvergence (improvement < crit %.4e) with return code %d.\n", crit, *retcodeh); - #endif - - done = 1; - } - - - #ifdef VERBOSE_WARNINGS - switch (*retcodeh) { - case 1: - printf("\nConverged: Zero gradient.\n"); break; - case 2: - printf("\nWarning: Back adjustment of stepsize didn't finish.\n"); break; - case 3: - printf("\nWarning: Smallest stepsize still improving too slow.\n"); break; - case 4: - printf("\nWarning: Forth adjustment of stepsize didn't finish.\n"); break; - case 6: - printf("\nWarning: Smallest step still improving too slow, reversed gradient.\n"); break; - case 5: - printf("\nWarning: Largest stepsize still improving too fast.\n"); break; - case 7: - printf("\nWarning: Possible inaccuracy in Hessian matrix.\n"); break; - } - #endif - - //=== Restarts from the initial (inverse of) Hessian when stuck for a while in bad cases. This can happen even *retcodeh=0 while stuck=0. - //if (*retcodeh && *retcodeh != 1) - if (!done) - if (cnt_n_badcases++ >= MAX_NUM_POSSIBLE_BADCASES) - { - H_dm->M = H; - H_dm->nrows = H_dm->ncols = n; - InitializeDiagonalMatrix_lf(H_dm, GLB_sclForHess); - //H_dm->flag = M_GE | M_SU | M_SL; //Hessian is symmetric. - cnt_n_badcases = 0; //Reset after we restart wtih the initial Hessian. - #ifdef VERBOSE_WARNINGS - printf("Hessian is reset to the initial value because the maximum number of possibly bad cases, %d, is reached with return code %d!\n", MAX_NUM_POSSIBLE_BADCASES, *retcodeh); - fprintf(FPTR_DEBUG, "Hessian is reset to the initial value because the maximum number of possibly bad cases, %d, is reached with return code %d!\n", MAX_NUM_POSSIBLE_BADCASES, *retcodeh); - #endif - } - - f[0] = *fh; - memcpy(x[0],xh,n*sizeof(double)); - memcpy(g[0],gh,n*sizeof(double)); - badg[0] = badgh; - } - - - //--------- Prints outputs to a file. --------- - if ( !(fptr_interesults = fopen(filename_sp2vecs,"w")) ) { - printf("\n\nUnable to create the starting point data file %s in csminwel.c!\n", filename_sp2vecs); - getchar(); - exit(EXIT_FAILURE); - } - fprintf(fptr_interesults, "========= Only a block at a time if more-than-one blocks are used. ========== \n"); - fprintf(fptr_interesults, "--------Numerical gradient---------\n"); - for (i=0; i<n; i++) fprintf(fptr_interesults, " %0.16e ", g[0][i]); - fprintf(fptr_interesults, "\n"); - fprintf(fptr_interesults, "--------Restarting point---------\n"); - for (i=0; i<n; i++) fprintf(fptr_interesults, " %0.16e ", x[0][i]); - fprintf(fptr_interesults, "\n\n"); - fflush(fptr_interesults); - tzFclose(fptr_interesults); - - - //=== Frees memory. - for (i=0; i<4; i++) { - tzDestroy(g[i]); - tzDestroy(x[i]); - } - tzDestroy(H_dm); -} -#undef MAX_NUM_POSSIBLE_BADCASES -#undef EPS -#undef TERMINATEVALUE - - -#if INDXNUMGRAD_CSMINWEL == 1 - #define SCALE 1.0 - static int numgrad(double *g, double *x, int n, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - //Forward difference gradient method. - double delta, deltai; - double f0, g0, ff, tmp, *xp; - int i; - int badg; - f0 = fcn(x,n,args,dims); - badg = 0; - for (i=0, xp=x; i<n; i++, xp++, g++) { - delta=SCALE*GRADSTPS_CSMINWEL, deltai=1.0/delta; //e+5/SCALE; - - tmp = *xp; - *xp += delta; - delta = *xp - tmp; // This increases the precision slightly. Added by TZ. - if ( (ff=fcn(x,n,args,dims)) < NEARINFINITY ) g0 = (ff-f0)*deltai; //Not over the boundary. - else { - //Switches to the other side of the boundary. - *xp = tmp - delta; - g0 = (f0-fcn(x,n,args,dims))*deltai; - } - - *xp = tmp; //Puts back to the original place. TZ, 9/03. - if (fabs(g0)<1.0e+15) - *g = g0; - else { - #ifdef VERBOSE_WARNINGS - printf("Bad gradient.\n"); - #endif - - *g = 0; - badg = 1; - } - } - return badg; - } - //#elif INDXNUMGRAD_CSMINWEL == 2 -#else - //#define STPS 1.0e-04 // 6.0554544523933391e-6 step size = pow(DBL_EPSILON,1.0/3) - static int numgrad(double *g, double *x, int n, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - //Central difference gradient method. Added by TZ. - double dh; - double f0, fp, fm, tmp, *xp; - int i; - int badg; - - badg = 0; - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? GRADSTPS_CSMINWEL : GRADSTPS_CSMINWEL*(*xp); - - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x,n,args,dims); - *xp = tmp - dh; - fm = fcn(x,n,args,dims); - - //=== Checking the boundary condition for the minimization problem. - if (fp >= NEARINFINITY) { - *xp = tmp; //Puts back to the original place. TZ, 9/03. - f0 = fcn(x,n,args,dims); - *g = (f0-fm)/dh; - } - else if (fm >= NEARINFINITY) { - //Switches to the other side of the boundary. - *xp = tmp; //Puts back to the original place. TZ, 9/03. - f0 = fcn(x,n,args,dims); - *g = (fp-f0)/dh; - } - else { - *g = (fp-fm)/(2.0*dh); - *xp = tmp; //Puts back to the original place. TZ, 9/03. - } - - if (fabs(*g)>1.0e+15) { - #ifdef VERBOSE_WARNINGS - printf("Bad gradient.\n"); - #endif - *g = 0.0; - badg = 1; - } - } - return badg; - } -#endif -////#undef INDXNUMGRAD_CSMINWEL -////#undef GRADSTPS_CSMINWEL - - - - -#define ANGLE 0.01 //When output of this variable becomes negative, we have a wrong analytical graident. - //.005 works for identified VARs and OLS. - //.005 implies 89.71 degrees (acrcos(ANGLE)*180/pi). - //.01 implies 89.43 degrees (acrcos(ANGLE)*180/pi). - //.05 implies 87.13 degrees (acrcos(ANGLE)*180/pi). - //.1 implies 84.26 degrees (acrcos(ANGLE)*180/pi). -#define THETA .4 //(0<THETA<.5) THETA near .5 makes long line searches, possibly fewer iterations. - //.1 works for OLS or other nonlinear functions. - //.3 works for identified VARs. -#define FCHANGE 1000 -#define MINLAMB 1e-9 -#define MINDFAC .01 -static void csminit(double *fhat, double *xhat, int *fcount, int *retcode, - double *x0, double f0, double *g, int badg, double *H0, int n, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - double lambda=1, gnorm=0, dxnorm=0, factor=3, lambdaPeak=0; - double f, dfhat, a, tmp, fPeak=f0, lambdaMax=DBL_MAX; - double *dx, *dxtest; - int done=0, shrink=1, shrinkSignal, growSignal; - int i; - - memcpy(xhat, x0, n*sizeof(double)); //Iskander's original code does not have this line, which is a major bug. Corrected by TZ. - *fhat = f0; - *fcount = 0; - *retcode = 0; - gnorm = sqrt(times(g,g,n)); - if ((gnorm < 1.e-12) && !badg) - *retcode = 1; /* gradient convergence */ - else { - /* with badg 1, we don't try to match rate of improvement to directional - derivative. We're satisfied just to get some improvement in f. */ - dx = tzMalloc(n, double); //dx = calloc(n, sizeof(double)); Commented out by TZ. - //if (!dx) printf("Dynamic memory allocation error.\n"); Commnted out by TZ. - for (i=0; i<n; i++) - dx[i] = -times(&H0[i*n],g,n); - dxnorm = sqrt(times(dx,dx,n)); - if (dxnorm > 1e12) { - #ifdef VERBOSE_WARNINGS - printf("Near-singular H problem.\n"); - #endif - - for (i=0; i<n; i++) - dx[i] *= FCHANGE/dxnorm; - } - dfhat = times(dx,g,n); - if (!badg) { - /* If the gradient is good, test for alignment of dx with gradient and fix if necessary */ - - if ((a=-dfhat/(gnorm*dxnorm))<ANGLE) { - tmp = (ANGLE*dxnorm+dfhat/gnorm)/gnorm; - for (i=0; i<n; i++) - dx[i] -= tmp*g[i]; - dfhat = times(dx,g,n); - dxnorm = sqrt(times(dx,dx,n)); - - #ifdef VERBOSE_DETOUTPUT - printf("Correct for low angle: %g\n",a); - #endif - } - } - - #ifdef VERBOSE_DETOUTPUT - printf("Predicted improvement: %18.9f, Norm of gradient: %18.9f\n", -dfhat*0.5, gnorm); - #endif - - dxtest = tzMalloc(n, double); //calloc(n, sizeof(double)); Commented out by TZ. - while (!done) { - for (i=0; i<n; i++) - dxtest[i] = x0[i]+dx[i]*lambda; - f = fcn(dxtest,n,args,dims); - - #ifdef VERBOSE_DETOUTPUT - printf("lambda = %10.5g; f = %20.7e\n",lambda,f); - #endif - - if (f<*fhat) { - *fhat = f; - memcpy(xhat,dxtest,n*sizeof(double)); - } - (*fcount)++; - tmp = -THETA*dfhat*lambda; - - /* the optimal lambda should be such that f0-f > -THETA*dfhat*lambda (see Berndt et al.) - If that's not the case and grad is good, OR - if grad is bad and f is not going down, shrinkSignal = 1 */ - shrinkSignal = ( !badg && (f0-f <= (tmp>0?tmp:0)) ) || - ( badg && (f0-f < 0 ) ); - - /* the optimal lambda should also be such that f0-f<-(1-THETA)*dfhat*lambda - If that's not the case with lambda>0, AND grad is good, growthSignal = 1 */ - growSignal = !badg && ( (lambda > 0) && (f0-f >= -(1-THETA)*dfhat*lambda) ); - - /* If shrinkSignal=1 AND ( lambda>lambdaPeak or lambda negative ) - (note when lambdaPeak=0 the second part only excludes lambda=0) - try shrinking lambda */ - if ( shrinkSignal && ( (lambda>lambdaPeak) || (lambda<0) ) ) { - /* if shrink=0 OR lambda/factor is already smaller than lambdaPeak, increase factor */ - if ( (lambda>0) && ((!shrink) || (lambda/factor <= lambdaPeak)) ) { - shrink = 1; - factor = pow(factor,.6); - while (lambda/factor <= lambdaPeak) - factor = pow(factor,.6); - if (fabs(factor-1)<MINDFAC) { - if (fabs(lambda) < 4) - *retcode = 2; - else - *retcode = 7; - done = 1; - } - } - if ((lambda<lambdaMax) && (lambda>lambdaPeak)) - lambdaMax=lambda; - /* shrink lambda */ - lambda /= factor; - /* if lambda has already been shrunk as much as possible */ - if (fabs(lambda) < MINLAMB) - /* if lambda is positive AND you have not made any improvement - try going against gradient, which may be inaccurate */ - if ((lambda > 0) && (f0 <= *fhat)) - lambda = -lambda*pow(factor,6); - else { - /* if lambda is negative: let it be known and quit trying */ - if (lambda < 0) - *retcode = 6; - /* if you have not made any imporvement: - let it be known and quit trying */ - else - *retcode = 3; - done = 1; - } - } - /* If growSignal=1 and lambda positive OR ( lambda>lambdaPeak or lambda negative ) - (note when lambdaPeak=0 the second part only excludes lambda=0) - try increase lambda */ - else - if ( (growSignal && (lambda > 0) ) || - ( shrinkSignal && (lambda <= lambdaPeak) && (lambda > 0) ) ) { - if (shrink) { - shrink = 0; - factor = pow(factor,.6); - if (fabs(factor-1) < MINDFAC) { - if (fabs(lambda) < 4) - *retcode = 4; - else - *retcode = 7; - done = 1; - } - } - if ( (f<fPeak) && (lambda>0) ) { - fPeak = f; - lambdaPeak = lambda; - if (lambdaMax <= lambdaPeak) - lambdaMax = lambdaPeak*factor*factor; - } - /* increase lambda (up to 1e20) */ - lambda *= factor; - /* if lambda has been increased up to the limit and - you have not made any imporvement: - let it be known and quit trying */ - if (fabs(lambda) > 1e20) { - *retcode = 5; - done = 1; - } - } - /* If growthSignal=shrinkSignal=0 you found a good lambda, you are done */ - else { - done = 1; - *retcode = factor<1.2 ? 7 : 0; - } - } - tzDestroy(dxtest); - tzDestroy(dx); - } - #ifdef VERBOSE_DETOUTPUT - printf("Norm of dx %10.5g\n", dxnorm); - #endif -} -#undef ANGLE -#undef THETA -#undef FCHANGE -#undef MINLAMB -#undef MINDFAC - - -static double times(double *x, double *y, int n) { - double z = 0; - int i; - for (i=0; i<n; i++, x++, y++) - z += (*x)*(*y); - return z; -} - -static int peakwall(double *g, int retcode, double *x, int n, - int (*gfcn)(double *x, int n, double *g, double **args, int *dims), - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - /* if retcode=2 or 4 you have shrunk or increased lambda as much as you could: - exhausted search possibilities the csminit step has failed */ - if (retcode==2 || retcode==4) - return 1; - else - /* if you are not at the peak but the csminit has improved, - compute the gradient again to update H0 */ - if (gfcn) - return gfcn(x,n,g,args,dims); - else - return numgrad(g,x,n,fcn,args,dims); -} - -static void bfgsi(double *H, double *dg, double *dx, int n, int nn) { - double *Hdg, *dxdx, *dxHdg, *Hdgdx; - double dgdx, m; - int i; - TSdmatrix *H_dm = NULL; - - Hdg = tzMalloc(n, double); //calloc(n, sizeof(double)); Commented out by TZ. - //if (!Hdg) printf("Dynamic memory allocation error.\n"); Commented out by TZ. - - /* Hdg = H0*dg; */ - for (i=0; i<n; i++) - Hdg[i] = times(&H[i*n],dg,n); - /* dgdx = dg'*dx; */ - dgdx = 1/times(dg,dx,n); - if (fabs(dgdx)<1e12) { - dxdx = mtimes(dx,dx,n,nn); - dxHdg = mtimes(dx,Hdg,n,nn); - Hdgdx = mtimes(Hdg,dx,n,nn); - m = 1+times(dg,Hdg,n)*dgdx; - for (i=0; i<nn; i++, H++, dxdx++, dxHdg++, Hdgdx++) - *H += (m*(*dxdx)-(*dxHdg)-(*Hdgdx))*dgdx; - free(Hdgdx-nn); - Hdgdx=NULL; //DDDDDebugging. - free(dxHdg-nn); - dxHdg = NULL; - free(dxdx-nn); - dxdx = NULL; - } - else { - //=== Restarting the inverse of Hessian at its initial value. Added by TZ. - H_dm = tzMalloc(1, TSdmatrix); //H_dm wil point to the same location as H. - H_dm->M = H; - H_dm->nrows = H_dm->ncols = n; - InitializeDiagonalMatrix_lf(H_dm, GLB_sclForHess); - //H_dm->flag = M_GE | M_SU | M_SL; //Hessian is symmetric. - tzDestroy(H_dm); - - #ifdef VERBOSE_WARNINGS - printf("BFGS update failed.\n"); - printf("|dg| = %f |dx| = %f\n",sqrt(times(dg,dg,n)),sqrt(times(dx,dx,n))); - printf("dg\'*dx = %f\n",dgdx); - printf("|H*dg| = %f\n",sqrt(times(Hdg,Hdg,n))); - #endif - } - tzDestroy(Hdg); -} - -static double *mtimes(double *x, double *y, int n, int nn) { - double *x0; - double *z; - int i, j; - z = tzMalloc(nn, double); //calloc(nn, sizeof(double)); Commented out by TZ. - for (i=0, x0=x; i<n; i++, y++) - for (j=0, x=x0; j<n; j++, x++, z++) - *z = (*x)*(*y); - return z-nn; -} - -static double *mminus(double *x, double *y, int n) { - double *z; - int i; - z = tzMalloc(n, double); //calloc(n, sizeof(double)); Commented out by TZ. - for (i=0; i<n; i++, x++, y++, z++) - *z = (*x)-(*y); - return z-n; -} - - -//=== The following two extern functions to be accessed by other C files. -void csminwel_SetPrintFile(char *filename) { - if (!filename) sprintf(filename_sp2vecs, "outdata5csminwel.prn"); //Default filename. - else if (STRLEN-1 < strlen(filename)) fn_DisplayError(".../csminwel.c: the allocated length STRLEN for filename_sp2vecs is too short. Must increase the string length"); - else strcpy(filename_sp2vecs, filename); -} -int csminwel_randomseedChanged(int seednumber) -{ - int oldseednumber = RANDOMSEED_CSMINWEL; - RANDOMSEED_CSMINWEL = seednumber; - return (oldseednumber); -} - - - -#undef STRLEN - - - diff --git a/CFiles/csminwel.h b/CFiles/csminwel.h deleted file mode 100644 index 84915ad36cb579fa5fcbefc53cebe15599867317..0000000000000000000000000000000000000000 --- a/CFiles/csminwel.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CSMINWEL_H__ -#define __CSMINWEL_H__ - -#include "tzmatlab.h" - -#include <string.h> -#include <float.h> - -//--- This extern variable allows an input by the user from an input data file. -extern double GRADSTPS_CSMINWEL; - -void csminwel(double (*fcn)(double *x, int n, double **args, int *dims), - double *x, int n, double *H, double *gh, - int (*grad)(double *x, int n, double *g, double **args, int *dims), - double *fh, double crit, int *itct, int nit, - int *fcount, int *retcodeh, double **args, int *dims); -// Alternative but less clear way: ... (double (*fcn)(double *, int, double **, int *), ... - -void csminwel_SetPrintFile(char *filename); -int csminwel_randomseedChanged(int seednumber); - - -#endif diff --git a/CFiles/cstz.c b/CFiles/cstz.c deleted file mode 100644 index 553d6a5fc67a55961c0295bfa7c1875afb8f8da0..0000000000000000000000000000000000000000 --- a/CFiles/cstz.c +++ /dev/null @@ -1,2791 +0,0 @@ -#include "cstz.h" - -#include <float.h> -#include <string.h> //For memmove, etc. -#include "mathlib.h" - - -//???????? -//------- For computing inverse Hessian only. ------- -//static struct TStateModel_tag *SetModelGlobalForCovariance(struct TStateModel_tag *smodel_ps); -//static double ObjFuncForSmodel(double *x0_p, int d_x0); -//static double opt_logOverallPosteriorKernal(struct TStateModel_tag *smodel_ps, TSdvector *xchange_dv); - -static double logCondPostKernTimet(double *xchange_p, int t, struct TStateModel_tag *smodel_ps); -static double neglogPostKern_hess(double *xchange_pd, struct TStateModel_tag *smodel_ps); -static void hesscd_smodel(TSdmatrix *H_dm, TSdvector *x_dv, struct TStateModel_tag *smodel_ps, double (*fcn)(double *x, struct TStateModel_tag *), double grdh, double f0); - -TSdp2m5 *CreateP2m5(const double p, const double bound) -{ - TSdp2m5 *x_dp2m5 = tzMalloc(1, TSdp2m5); - - if (p<=0.0 && p>=1.0) fn_DisplayError(".../cstz.c/CreateP2m5(): Input probability p must be between 0.0 and 1.0"); - if ((x_dp2m5->bound=bound)<=0.0) fn_DisplayError(".../cstz.c/CreateP2m5(): Real bound must be positive"); - - x_dp2m5->cnt = 0; - x_dp2m5->ndeg = 0; - x_dp2m5->p = tzMalloc(5, double); - x_dp2m5->q = tzMalloc(5, double); - x_dp2m5->m = tzMalloc(5, int); - - //=== 5 markers. - x_dp2m5->p[0] = 0.00; - x_dp2m5->p[1] = 0.5*p; - x_dp2m5->p[2] = p; - x_dp2m5->p[3] = 0.5*(1.0+p); - x_dp2m5->p[4] = 1.00; - //=== Now 9 markers. - // x_dp2m5->p[0] = 0.00; - // x_dp2m5->p[1] = 0.25*p - // x_dp2m5->p[2] = 0.5*p; - // x_dp2m5->p[3] = 0.75*p; - // x_dp2m5->p[4] = p; - // x_dp2m5->p[5] = 0.25 + 0.75*p; - // x_dp2m5->p[6] = 0.5*(1.0+p); - // x_dp2m5->p[7] = 0.75 + 0.25*p; - // x_dp2m5->p[8] = 1.00; - - return (x_dp2m5); -} -TSdp2m5 *DestroyP2m5(TSdp2m5 *x_dp2m5) -{ - if (x_dp2m5) { - free(x_dp2m5->m); - free(x_dp2m5->q); - free(x_dp2m5->p); - - free(x_dp2m5); - return ((TSdp2m5 *)NULL); - } - else return (x_dp2m5); -} -TSdvectorp2m5 *CreateVectorP2m5(const int n, const double p, const double bound) -{ - int _i; - // - TSdvectorp2m5 *x_dvp2m5 = tzMalloc(1, TSdvectorp2m5); - - x_dvp2m5->n = n; - x_dvp2m5->v = tzMalloc(n, TSdp2m5 *); - for (_i=n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = CreateP2m5(p, bound); - - return (x_dvp2m5); -} -TSdvectorp2m5 *DestroyVectorP2m5(TSdvectorp2m5 *x_dvp2m5) -{ - int _i; - - if (x_dvp2m5) { - for (_i=x_dvp2m5->n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = DestroyP2m5(x_dvp2m5->v[_i]); - free(x_dvp2m5->v); - - free(x_dvp2m5); - return ((TSdvectorp2m5 *)NULL); - } - else return (x_dvp2m5); -} -TSdmatrixp2m5 *CreateMatrixP2m5(const int nrows, const int ncols, const double p, const double bound) -{ - int _i; - // - TSdmatrixp2m5 *X_dmp2m5 = tzMalloc(1, TSdmatrixp2m5); - - X_dmp2m5->nrows = nrows; - X_dmp2m5->ncols = ncols; - X_dmp2m5->M = tzMalloc(nrows*ncols, TSdp2m5 *); - for (_i=nrows*ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = CreateP2m5(p, bound); - - return (X_dmp2m5); -} -TSdmatrixp2m5 *DestroyMatrixP2m5(TSdmatrixp2m5 *X_dmp2m5) -{ - int _i; - - if (X_dmp2m5) { - for (_i=X_dmp2m5->nrows*X_dmp2m5->ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = DestroyP2m5(X_dmp2m5->M[_i]); - free(X_dmp2m5->M); - - free(X_dmp2m5); - return ((TSdmatrixp2m5 *)NULL); - } - else return (X_dmp2m5); -} -TSdcellp2m5 *CreateCellP2m5(const TSivector *rows_iv, const TSivector *cols_iv, const double p, const double bound) -{ - int _i; - int ncells; - // - TSdcellp2m5 *X_dcp2m5 = tzMalloc(1, TSdcellp2m5); - - - if (!rows_iv || !cols_iv || !rows_iv->flag || !cols_iv->flag) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Input row and column vectors must be (1) created and (2) assigned legal values"); - if ((ncells=rows_iv->n) != cols_iv->n) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Length of rows_iv must be the same as that of cols_iv"); - - - X_dcp2m5->ncells = ncells; - X_dcp2m5->C = tzMalloc(ncells, TSdmatrixp2m5 *); - for (_i=ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = CreateMatrixP2m5(rows_iv->v[_i], cols_iv->v[_i], p, bound); - - return (X_dcp2m5); -} -TSdcellp2m5 *DestroyCellP2m5(TSdcellp2m5 *X_dcp2m5) -{ - int _i; - - if (X_dcp2m5) { - for (_i=X_dcp2m5->ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = DestroyMatrixP2m5(X_dcp2m5->C[_i]); - free(X_dcp2m5->C); - - free(X_dcp2m5); - return ((TSdcellp2m5 *)NULL); - } - else return (X_dcp2m5); -} -TSdfourthp2m5 *CreateFourthP2m5(const int ndims, const TSivector *rows_iv, const TSivector *cols_iv, const double p, const double bound) -{ - int _i; - // - TSdfourthp2m5 *X_d4p2m5 = tzMalloc(1, TSdfourthp2m5); - - - if (!rows_iv || !cols_iv || !rows_iv->flag || !cols_iv->flag) fn_DisplayError(".../cstz.c/CreateFourthP2m5(): Input row and column vectors must be (1) created and (2) assigned legal values"); - if (rows_iv->n != cols_iv->n) fn_DisplayError(".../cstz.c/CreateFourthP2m5(): Length of rows_iv must be the same as that of cols_iv"); - - - X_d4p2m5->ndims = ndims; - X_d4p2m5->F = tzMalloc(ndims, TSdcellp2m5 *); - for (_i=ndims-1; _i>=0; _i--) - X_d4p2m5->F[_i] = CreateCellP2m5(rows_iv, cols_iv, p, bound); - - return (X_d4p2m5); -} -TSdfourthp2m5 *DestroyFourthP2m5(TSdfourthp2m5 *X_d4p2m5) -{ - int _i; - - if (X_d4p2m5) { - for (_i=X_d4p2m5->ndims-1; _i>=0; _i--) - X_d4p2m5->F[_i] = DestroyCellP2m5(X_d4p2m5->F[_i]); - free(X_d4p2m5->F); - - free(X_d4p2m5); - return ((TSdfourthp2m5 *)NULL); - } - else return (X_d4p2m5); -} - - - -int P2m5Update(TSdp2m5 *x_dp2m5, const double newval) -{ - //5-marker P2 algorithm. - //quantiles q[0] to q[4] correspond to 5-marker probabilities {0.0, p/5, p, (1+p)/5, 1.0}. - //Outputs: - // x_dp2m5->q, the markers x_dp2m5->m, is updated and only x_dp2m5->q[2] is used. - //Inputs: - // newval: new random number. - // - // January 2003. - int k, j; - double a; - double qm, dq; - int i, dm, dn; - - - if (!x_dp2m5) fn_DisplayError(".../cstz.c/P2m5Update(): x_dp2m5 must be created"); - - //if (isgreater(newval, -P2REALBOUND) && isless(newval, P2REALBOUND)) { - if (isfinite(newval) && newval > -x_dp2m5->bound && newval < x_dp2m5->bound) { - if (++x_dp2m5->cnt > 5) { - //Updating the quantiles and markers. - for (i=0; x_dp2m5->q[i]<=newval && i<5; i++) ; - if (i==0) { x_dp2m5->q[0]=newval; i++; } - if (i==5) { x_dp2m5->q[4]=newval; i--; } - for (; i<5; i++) x_dp2m5->m[i]++; - for (i=1; i<4; i++) { - dq = x_dp2m5->p[i]*x_dp2m5->m[4]; - if (x_dp2m5->m[i]+1<=dq && (dm=x_dp2m5->m[i+1]-x_dp2m5->m[i])>1) { - dn = x_dp2m5->m[i]-x_dp2m5->m[i-1]; - dq = ((dn+1)*(qm=x_dp2m5->q[i+1]-x_dp2m5->q[i])/dm+ - (dm-1)*(x_dp2m5->q[i]-x_dp2m5->q[i-1])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] += dq; - x_dp2m5->m[i]++; - } else - if (x_dp2m5->m[i]-1>=dq && (dm=x_dp2m5->m[i]-x_dp2m5->m[i-1])>1) { - dn = x_dp2m5->m[i+1]-x_dp2m5->m[i]; - dq = ((dn+1)*(qm=x_dp2m5->q[i]-x_dp2m5->q[i-1])/dm+ - (dm-1)*(x_dp2m5->q[i+1]-x_dp2m5->q[i])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] -= dq; - x_dp2m5->m[i]--; - } - } - } - else if (x_dp2m5->cnt < 5) { - //Fills the initial values. - x_dp2m5->q[x_dp2m5->cnt-1] = newval; - x_dp2m5->m[x_dp2m5->cnt-1] = x_dp2m5->cnt-1; - } - else { - //=== Last filling of initial values. - x_dp2m5->q[4] = newval; - x_dp2m5->m[4] = 4; - //=== P2 algorithm begins with reshuffling quantiles and makers. - for (j=1; j<5; j++) { - a = x_dp2m5->q[j]; - for (k=j-1; k>=0 && x_dp2m5->q[k]>a; k--) - x_dp2m5->q[k+1] = x_dp2m5->q[k]; - x_dp2m5->q[k+1]=a; - } - } - } - else ++x_dp2m5->ndeg; //Throwing away the draws to treat exceptions. - - return (x_dp2m5->cnt); -} - -void P2m5VectorUpdate(TSdvectorp2m5 *x_dvp2m5, const TSdvector *newval_dv) -{ - int _i, _n; - - if (!x_dvp2m5 || !newval_dv || !newval_dv->flag) fn_DisplayError(".../cstz.c/P2m5VectorUpdate(): (1) Vector struct x_dvp2m5 must be created and (2) input new value vector must be crated and given legal values"); - if ((_n=newval_dv->n) != x_dvp2m5->n) - fn_DisplayError(".../cstz.c/P2m5VectorUpdate(): dimension of x_dvp2m5 must match that of newval_dv"); - - for (_i=_n-1; _i>=0; _i--) - P2m5Update(x_dvp2m5->v[_i], newval_dv->v[_i]); -} - -void P2m5MatrixUpdate(TSdmatrixp2m5 *X_dmp2m5, const TSdmatrix *newval_dm) -{ - int _i; - int nrows, ncols; - - if (!X_dmp2m5 || !newval_dm || !newval_dm->flag) fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): (1) Matrix struct X_dmp2m5 must be created and (2) input new value matrix must be crated and given legal values"); - if ((nrows=newval_dm->nrows) != X_dmp2m5->nrows || (ncols=newval_dm->ncols) != X_dmp2m5->ncols) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of rows and colums in X_dmp2m5 must match those of newval_dm"); - - for (_i=nrows*ncols-1; _i>=0; _i--) - P2m5Update(X_dmp2m5->M[_i], newval_dm->M[_i]); -} - -void P2m5CellUpdate(TSdcellp2m5 *X_dcp2m5, const TSdcell *newval_dc) -{ - int _i; - int ncells; - - if (!X_dcp2m5 || !newval_dc) fn_DisplayError(".../cstz.c/P2m5CellUpdate(): (1) Cell struct X_dcp2m5 must be created and (2) input new value cell must be crated and given legal values"); - if ((ncells=newval_dc->ncells) != X_dcp2m5->ncells) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of cells in X_dcp2m5 must match that of newval_dc"); - - for (_i=ncells-1; _i>=0; _i--) - P2m5MatrixUpdate(X_dcp2m5->C[_i], newval_dc->C[_i]); -} - -void P2m5FourthUpdate(TSdfourthp2m5 *X_d4p2m5, const TSdfourth *newval_d4) -{ - int _i; - int ndims; - - if (!X_d4p2m5 || !newval_d4) fn_DisplayError(".../cstz.c/P2m5FourthUpdate(): (1) Fourth struct X_d4p2m5 must be created and (2) input new value fourth must be crated and given legal values"); - if ((ndims=newval_d4->ndims) != X_d4p2m5->ndims) - fn_DisplayError(".../cstz.c/P2m5FourthUpdate(): Number of fourths in X_d4p2m5 must match that of newval_d4"); - - for (_i=ndims-1; _i>=0; _i--) - P2m5CellUpdate(X_d4p2m5->F[_i], newval_d4->F[_i]); -} - - - - -//--------------------------------------------------------------------- -//--------------------------------------------------------------------- -#if defined( CSMINWEL_OPTIMIZATION ) - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_gradcd(double *g, double *x, int n, double grdh, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // grdh: step size. If ==0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // x: no change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - - double dh, fp, fm, tmp, *xp; - int i; - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = grdh?grdh:(fabs(*xp)<1?STPS:STPS*(*xp)); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x,n,args,dims); - *xp = tmp - dh; - fm = fcn(x,n,args,dims); - *g = (fp-fm)/(2*dh); - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } - #undef STPS - - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_hesscd(double *H, double *x, int n, double grdh, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - double dhi, dhj, f1, f2, f3, f4, tmpi, tmpj, *xpi, *xpj; - int i, j; - for (i=0, xpi=x; i<n; i++, xpi++) { - dhi = grdh?grdh:(fabs(*xpi)<1?STPS:STPS*(*xpi)); - tmpi = *xpi; - for (j=i, xpj=x+i; j<n; j++, xpj++) - if (i==j) { - /* f2 = f3 when i = j */ - f2 = fcn(x,n,args,dims); - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - - /* calculate f1 and f4 */ - *xpi = tmpi + 2*dhi; - f1 = fcn(x,n,args,dims); - *xpi = tmpi - 2*dhi; - f4 = fcn(x,n,args,dims); - - /* diagonal element */ - H[i*(n+1)] = (f1-2*f2+f4)/(4*dhi*dhi); - - /* reset to intial value */ - *xpi = tmpi; - } else { - dhj = grdh?grdh:(fabs(*xpj)<1?STPS:STPS*(*xpj)); - tmpj = *xpj; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - *xpj += dhj; - dhj = *xpj - tmpj; - - /* calculate f1, f2, f3 and f4 */ - *xpj = tmpj + dhj; - f1 = fcn(x,n,args,dims); - *xpi = tmpi - dhi; - f2 = fcn(x,n,args,dims); - *xpi = tmpi + dhi; - *xpj = tmpj - dhj; - f3 = fcn(x,n,args,dims); - *xpi = tmpi - dhi; - f4 = fcn(x,n,args,dims); - - /* symmetric elements */ - H[i+j*n] = H[j+i*n] = (f1-f2-f3+f4)/(4*dhi*dhj); - - /* reset to intial values */ - *xpi = tmpi; - *xpj = tmpj; - } - } - } - #undef STPS -#elif defined( IMSL_OPTIMIZATION ) - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_gradcd(double *g, double *x, int n, double grdh, - double fcn(int n, double *x) // IMSL - //void NAG_CALL fcn(Integer n,double x[],double *f,double g[],Nag_Comm *comm) - ) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // grdh: step size. If ==0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // x: no change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - - double dh, fp, fm, tmp, *xp; - int i; - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = grdh?grdh:(fabs(*xp)<1?STPS:STPS*(*xp)); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(n,x); // IMSL - //fcn(n,x,&fp,NULL,NULL); /* NAG */ - *xp = tmp - dh; - fm = fcn(n,x); // IMSL - //fcn(n,x,&fm,NULL,NULL); - *g = (fp-fm)/(2*dh); - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } - #undef STPS - - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_hesscd(double *H, double *x, int n, double grdh, - double fcn(int n, double *x) // IMSL - //void NAG_CALL fcn(Integer n,double x[],double *f,double g[],Nag_Comm *comm) - ) { - double dhi, dhj, f1, f2, f3, f4, tmpi, tmpj, *xpi, *xpj; - int i, j; - for (i=0, xpi=x; i<n; i++, xpi++) { - dhi = grdh?grdh:(fabs(*xpi)<1?STPS:STPS*(*xpi)); - tmpi = *xpi; - for (j=i, xpj=x+i; j<n; j++, xpj++) - if (i==j) { - /* f2 = f3 when i = j */ - f2 = fcn(n,x); // IMSL - //fcn(n,x,&f2,NULL,NULL); - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - - /* calculate f1 and f4 */ - *xpi = tmpi + 2*dhi; - f1 = fcn(n,x); // IMSL - //fcn(n,x,&f1,NULL,NULL); - *xpi = tmpi - 2*dhi; - f4 = fcn(n,x); /* IMSL */ - //fcn(n,x,&f4,NULL,NULL); - - /* diagonal element */ - H[i*(n+1)] = (f1-2*f2+f4)/(4*dhi*dhi); - - /* reset to intial value */ - *xpi = tmpi; - } else { - dhj = grdh?grdh:(fabs(*xpj)<1?STPS:STPS*(*xpj)); - tmpj = *xpj; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - *xpj += dhj; - dhj = *xpj - tmpj; - - /* calculate f1, f2, f3 and f4 */ - *xpj = tmpj + dhj; - f1 = fcn(n,x); // IMSL - //fcn(n,x,&f1,NULL,NULL); - *xpi = tmpi - dhi; - f2 = fcn(n,x); // IMSL - //fcn(n,x,&f2,NULL,NULL); - *xpi = tmpi + dhi; - *xpj = tmpj - dhj; - f3 = fcn(n,x); // IMSL - //fcn(n,x,&f3,NULL,NULL); - *xpi = tmpi - dhi; - f4 = fcn(n,x); // IMSL - //fcn(n,x,&f4,NULL,NULL); - - /* symmetric elements */ - H[i+j*n] = H[j+i*n] = (f1-f2-f3+f4)/(4*dhi*dhj); - - /* reset to intial values */ - *xpi = tmpi; - *xpj = tmpj; - } - } - } - #undef STPS -#endif - - - -//------------------------------- -//Modified from fn_gradcd() in cstz.c for the conjugate gradient method I or II -//------------------------------- -#define STPS 1.0e-04 // 6.0554544523933391e-6 step size = pow(DBL_EPSILON,1.0/3) -#define GRADMANUAL 1.0e+01 //Arbitrarily (manually) set gradient. -void gradcd_gen(double *g, double *x, int n, double (*fcn)(double *x, int n), double *grdh, double f0) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // n: the dimension of g or x. - // fcn(): the function for which the gradient is evaluated - // grdh: step size. If NULL, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dh, dhi, dh2i, fp, fm, tmp, *xp; - int i; - - if (grdh) { - //=== If f0 >= NEARINFINITY, we're in a bad region and so we assume it's flat in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 >= NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - dh2i = (dhi=1.0/(dh=*grdh))/2.0; - for (i=0, xp=x; i<n; i++, xp++, g++) { - tmp = *xp; - *xp += dh; - //The following statement is bad because dh does not get reset at the beginning of the loop and thus may get changed continually within the loop. - // dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fp = fcn(n,x); // IMSL - //fcn(n,x,&fp,NULL,NULL); /* NAG */ - *xp = tmp - dh; - fm = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fm = fcn(n,x); // IMSL - //fcn(n,x,&fm,NULL,NULL); - - //=== Checking the boundary condition for the minimization problem. - if ((fp < NEARINFINITY) && (fm < NEARINFINITY)) *g = (fp-fm)*dh2i; - else if (fp < NEARINFINITY) *g = (fp-f0)*dhi; - else if (fm < NEARINFINITY) *g = (f0-fm)*dhi; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - - } - else { - //=== If f0 >= NEARINFINITY, we're in a bad region and so we assume it's flat in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 >= NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fp = fcn(n,x); // IMSL - //fcn(n,x,&fp,NULL,NULL); /* NAG */ - *xp = tmp - dh; - fm = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fm = fcn(n,x); // IMSL - //fcn(n,x,&fm,NULL,NULL); - - //=== Checking the boundary condition for the minimization problem. - if ((fp < 0.5*NEARINFINITY) && (fm < 0.5*NEARINFINITY)) *g = (fp-fm)/(2.0*dh); - else if (fp < 0.5*NEARINFINITY) *g = (fp-f0)/dh; - else if (fm < 0.5*NEARINFINITY) *g = (f0-fm)/dh; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } -} -#undef STPS -#undef GRADMANUAL - - -//------------------------------- -//Forward difference gradient: much faster than gradcd_gen() when the objective function is very expensive to evaluate. -//------------------------------- -#define STPS 1.0e-04 // 6.0554544523933391e-6 step size = pow(DBL_EPSILON,1.0/3) -void gradfd_gen(double *g, double *x, int n, double (*fcn)(double *x, int n), double *grdh, double f0) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // n: the dimension of g or x. - // fcn(): the function for which the gradient is evaluated - // grdh: step size. If NULL, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dh, dhi, fp, tmp, *xp; - int i; - if (grdh) { - dhi = 1.0/(dh=*grdh); - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - if ( (fp=fcn(x, n)) < NEARINFINITY ) *g = (fp-f0)*dhi; //For frprmn() CGI_OPTIMIZATION - else { - //Switches to the other side of the boundary. - *xp = tmp - dh; - *g = (f0-fcn(x,n))*dhi; - } - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - - } - else { - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - if ( (fp=fcn(x, n)) < NEARINFINITY ) *g = (fp-f0)/dh; //For frprmn() CGI_OPTIMIZATION - else { - //Switches to the other side of the boundary. - *xp = tmp - dh; - *g = (f0-fcn(x,n))/dh; - } - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } -} -#undef STPS - - - -//==================================================================================================== -//= Central difference gradient for logLH at time t, using DW's smodel. -//==================================================================================================== -#define STPS 1.0e-04 // 6.0554544523933391e-6 step size = pow(DBL_EPSILON,1.0/3) -#define GRADMANUAL 1.0e+01 //Arbitrarily (manually) set gradient. -void gradcd_timet(TSdvector *g_dv, TSdvector *x_dv, int t, struct TStateModel_tag *smodel_ps, double (*fcn)(double *x, int t, struct TStateModel_tag *smodel_ps), double grdh, double f0) -{ - //Outputs: - // g_dv: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x_dv: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // fcn(): the log LH or posterior function for which the gradient is evaluated - // grdh: step size. If 0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dh, dhi, dh2i, fp, fm, tmp, *xp; - int i; - //--- Accessible variables. - int n; - double *g, *x; - - if (!g_dv) fn_DisplayError(".../cstz.c/gradcd_timet(): the input g_dv must be allocated memory"); - if (!x_dv) fn_DisplayError(".../cstz.c/gradcd_timet(): the input x_dv must be allocated memory"); - if (!x_dv->flag) fn_DisplayError(".../cstz.c/gradcd_timet(): the input x_dv must be given legal values"); - if ((n=g_dv->n) != x_dv->n) fn_DisplayError(".../cstz.c/gradcd_timet(): dimensions of g_dv and x_dv must be the same"); - - g = g_dv->v; - x = x_dv->v; - - if (grdh>0.0) - { - //=== If f0 <= -0.5*NEARINFINITY, we're in a bad region and so we assume it's GRADMANUAL in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 < -0.5*NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - dh2i = (dhi=1.0/(dh=grdh))/2.0; - for (i=0, xp=x; i<n; i++, xp++, g++) { - tmp = *xp; - *xp += dh; - //The following statement is bad because dh does not get reset at the beginning of the loop and thus may get changed continually within the loop. - // dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, t, smodel_ps); - *xp = tmp - dh; - fm = fcn(x, t, smodel_ps); - - //=== Checking the boundary condition for the minimization problem. - if ((fp > -0.5*NEARINFINITY) && (fm > -0.5*NEARINFINITY)) *g = (fp-fm)*dh2i; - else if (fp > -0.5*NEARINFINITY) *g = (fp-f0)*dhi; - else if (fm > -0.5*NEARINFINITY) *g = (f0-fm)*dhi; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - - } - else { - //=== If f0 <= -0.5*NEARINFINITY, we're in a bad region and so we assume it's GRADMANUAL in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 <= -0.5*NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, t, smodel_ps); - *xp = tmp - dh; - fm = fcn(x, t, smodel_ps); - - //=== Checking the boundary condition for the minimization problem. - if ((fp > -0.5*NEARINFINITY) && (fm > -0.5*NEARINFINITY)) *g = (fp-fm)/(2.0*dh); - else if (fp > -0.5*NEARINFINITY) *g = (fp-f0)/dh; - else if (fm > -0.5*NEARINFINITY) *g = (f0-fm)/dh; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } - g_dv->flag = V_DEF; -} -#undef STPS -#undef GRADMANUAL -//--- -#if defined (NEWVERSIONofDW_SWITCH) -static double logCondPostKernTimet(double *xchange_pd, int t, struct TStateModel_tag *smodel_ps) -{ - //Evaluating log conditional posterior kernel at time t -- p(y_t | Y_{t-1}, theta, q). - int fss = smodel_ps->nobs - smodel_ps->fobs + 1; - double *x1_pd, *x2_pd; - - - x1_pd = xchange_pd; - x2_pd = xchange_pd + NumberFreeParametersTheta(smodel_ps); - //Note that NumberFreeParametersTheta() is DW's function, which points to TZ's function. - //In the constant parameter model, this will point to an invalid place, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - //======= This is a must step to refresh the value at the new point. ======= - ConvertFreeParametersToTheta(smodel_ps, x1_pd); //Waggoner's function, which calls TZ's Convertphi2*(). - ConvertFreeParametersToQ(smodel_ps, x2_pd); //Waggoner's function, which automatically takes care of the constant-parameter situition - ThetaChanged(smodel_ps); //DW's function, which will also call my function to set a flag for refreshing everything under these new parameters. - - - if (1) //Posterior function. - return ( LogConditionalLikelihood_StatesIntegratedOut(t, smodel_ps) + LogPrior(smodel_ps)/((double)fss) ); //DW's function. - else //Likelihood (with no prior) - return ( LogConditionalLikelihood_StatesIntegratedOut(t, smodel_ps) ); //DW's function. -} -#endif - -//------------------------ -// Computing the Hessian at the log posterior or log likelihood peak, using the outer-product Hessian. -//------------------------ -#if defined (NEWVERSIONofDW_SWITCH) -TSdmatrix *ComputeHessianFromOuterProduct(TSdmatrix *Hessian_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv) -{ - //Output: - // Hessian_dm: its inverse equals to Omega (covariance matrix) produced by ComputeCovarianceFromOuterProduct(). - //Inputs: - // xhat_dv: Hessian at this point. - - int ti; - double f0; - int nData = smodel_ps->nobs; - //=== - TSdvector *grad_dv; - - - grad_dv = CreateVector_lf(xhat_dv->n); - if (!Hessian_dm) Hessian_dm = CreateConstantMatrix_lf(xhat_dv->n, xhat_dv->n, 0.0); - - //=== Computing the outer-product Hessian. - for (ti=smodel_ps->fobs; ti<=nData; ti++) //Base-1 set-up, thus <=nData, NOT <nData. - { - f0 = logCondPostKernTimet(xhat_dv->v, ti, smodel_ps); - gradcd_timet(grad_dv, xhat_dv, ti, smodel_ps, logCondPostKernTimet, 0.0, f0); - VectorTimesSelf(Hessian_dm, grad_dv, 1.0, 1.0, 'U'); - } - - - SUtoGE(Hessian_dm); //Making upper symmetric matarix to a full matrix. - Hessian_dm->flag = M_GE; //Reset this flag, so - ScalarTimesMatrixSquare(Hessian_dm, 0.5, Hessian_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Hessian_dm->flag |= M_SU | M_SL; - - - //=== - DestroyVector_lf(grad_dv); - - return (Hessian_dm); -} -//------------------------ -// Computing the covariance matrix for standard errors at the log posterior or likelihood peak, using the outer-product Hessian. -//------------------------ -TSdmatrix *ComputeCovarianceFromOuterProduct(TSdmatrix *Omega_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv) -{ - //Output: - // Omega_dm: covariance matrix, which equals to the inverse of the Hessian produced by ComputeHessianFromOuterProduct(). - //Inputs: - // xhat_dv: Hessian at this point. - - int ti; - double f0; - int nData = smodel_ps->nobs; - //=== - TSdvector *grad_dv; - - - grad_dv = CreateVector_lf(xhat_dv->n); - if (!Omega_dm) Omega_dm = CreateConstantMatrix_lf(xhat_dv->n, xhat_dv->n, 0.0); - - //=== Computing the outer-product Hessian. - for (ti=smodel_ps->fobs; ti<=nData; ti++) //Base-1 set-up, thus <=nData, NOT <nData. - { - f0 = logCondPostKernTimet(xhat_dv->v, ti, smodel_ps); - gradcd_timet(grad_dv, xhat_dv, ti, smodel_ps, logCondPostKernTimet, 0.0, f0); - VectorTimesSelf(Omega_dm, grad_dv, 1.0, 1.0, 'U'); - } - SUtoGE(Omega_dm); //Making upper symmetric matarix to a full matrix. - ScalarTimesMatrixSquare(Omega_dm, 0.5, Omega_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Omega_dm->flag |= M_SU | M_SL; - - - //--- Converting or inverting the Hessian to covariance. - if (invspd(Omega_dm, Omega_dm, 'U')) - fn_DisplayError(".../cstz.c/ComputeCovarianceFromOuterProduct(): Hessian must be invertible"); - - - //-- Doubly safe to force it to be symmetric. - SUtoGE(Omega_dm); //Making upper symmetric matarix to a full matrix. - ScalarTimesMatrixSquare(Omega_dm, 0.5, Omega_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Omega_dm->flag |= M_SU | M_SL; - - //--- Checking if it's symmetric, positive definite. - - - //=== - DestroyVector_lf(grad_dv); - - return (Omega_dm); -} - - - -//------------------------ -// Computing the Hessian at the log posterior or log likelihood peak, using second derivatives. -//------------------------ -TSdmatrix *ComputeHessianFrom2ndDerivative(TSdmatrix *Hessian_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv) -{ - //Output: - // Hessian_dm: its inverse equals to Omega (covariance matrix). - // The flag is set to M_GE | M_SU | M_SL by hesscd_smodel(). - //Inputs: - // xhat_dv: Hessian at this point. - - double f0; - int nData = smodel_ps->nobs; - - - if (!Hessian_dm) Hessian_dm = CreateConstantMatrix_lf(xhat_dv->n, xhat_dv->n, 0.0); - - //=== Computing the inner-product Hessian. - f0 = neglogPostKern_hess(xhat_dv->v, smodel_ps); - hesscd_smodel(Hessian_dm, xhat_dv, smodel_ps, neglogPostKern_hess, 0.0, f0); - - return (Hessian_dm); -} -//--- -#define STPS 1.0e-4 //6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ -static void hesscd_smodel(TSdmatrix *H_dm, TSdvector *x_dv, struct TStateModel_tag *smodel_ps, double (*fcn)(double *, struct TStateModel_tag *), double grdh, double f0) -{ - //Outputs: - // H_dm: the Hessian n-by-n (no need to be initialized). - //Inputs: - // x_dv: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // fcn(): the negative (-) log LH or posterior function for which the gradient is evaluated - // grdh: step size. If 0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dhi, dhj, f1, f2, f3, f4, tmpi, tmpj, *xpi, *xpj; - int i, j; - //--- Accessible variables. - int n; - double *H, *x; - - if (!x_dv) fn_DisplayError(".../cstz.c/hesscd_smodel(): the input x_dv must be allocated memory"); - if (!x_dv->flag) fn_DisplayError(".../cstz.c/hesscd_smodel(): the input x_dv must be given legal values"); - if (!H_dm) fn_DisplayError(".../cstz.c/hesscd_smodel(): H_dm must be allocated memory"); - if ( ((n=x_dv->n) != H_dm->nrows) || (n != H_dm->ncols) ) fn_DisplayError(".../cstz.c/hesscd_smodel(): Check the dimension of x_dv and H_dm"); - - H = H_dm->M; - x = x_dv->v; - - for (i=0, xpi=x; i<n; i++, xpi++) { - dhi = grdh?grdh:(fabs(*xpi)<1?STPS:STPS*(*xpi)); - tmpi = *xpi; - for (j=i, xpj=x+i; j<n; j++, xpj++) - if (i==j) - { - /* f2 = f3 when i = j */ - if ((f2 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f2 = f0; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - - /* calculate f1 and f4 */ - *xpi = tmpi + 2*dhi; - if ((f1 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f1 = f0; - - *xpi = tmpi - 2*dhi; - if ((f4 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f4 = f0; - - /* diagonal element */ - H[i*(n+1)] = (f1-2*f2+f4)/(4*dhi*dhi); - - /* reset to intial value */ - *xpi = tmpi; - } - else - { - dhj = grdh?grdh:(fabs(*xpj)<1?STPS:STPS*(*xpj)); - tmpj = *xpj; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - *xpj += dhj; - dhj = *xpj - tmpj; - - /* calculate f1, f2, f3 and f4 */ - *xpj = tmpj + dhj; - if ((f1 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f1 = f0; - *xpi = tmpi - dhi; - if ((f2 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f2 = f0; - *xpi = tmpi + dhi; - *xpj = tmpj - dhj; - if ((f3 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f3 = f0; - *xpi = tmpi - dhi; - if ((f4 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f4 = f0; - - /* symmetric elements */ - H[i+j*n] = H[j+i*n] = (f1-f2-f3+f4)/(4*dhi*dhj); - - /* reset to intial values */ - *xpi = tmpi; - *xpj = tmpj; - } - } - - //--- To be safe. - H_dm->flag = M_SU; - SUtoGE(H_dm); //Making upper symmetric matarix to a full matrix. - H_dm->flag = M_GE; //Reset this flag, so - - ScalarTimesMatrixSquare(H_dm, 0.5, H_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - H_dm->flag |= M_SU | M_SL; -} -#undef STPS -//--- -static double neglogPostKern_hess(double *xchange_pd, struct TStateModel_tag *smodel_ps) -{ - //Evaluating negative log posterior kernel p(y_T | theta, q). - int fss = smodel_ps->nobs - smodel_ps->fobs + 1; - double *x1_pd, *x2_pd; - - - x1_pd = xchange_pd; - x2_pd = xchange_pd + NumberFreeParametersTheta(smodel_ps); - //Note that NumberFreeParametersTheta() is DW's function, which points to TZ's function. - //In the constant parameter model, this will point to an invalid place, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - //======= This is a must step to refresh the value at the new point. ======= - ConvertFreeParametersToTheta(smodel_ps, x1_pd); //Waggoner's function, which calls TZ's Convertphi2*(). - ConvertFreeParametersToQ(smodel_ps, x2_pd); //Waggoner's function, which automatically takes care of the constant-parameter situition - ThetaChanged(smodel_ps); //DW's function, which will also call my function to set a flag for refreshing everything under these new parameters. - - - if (1) //Posterior function. - return ( -LogLikelihood_StatesIntegratedOut(smodel_ps) - LogPrior(smodel_ps) ); //DW's function. - else //Likelihood (with no prior) - return ( -LogLikelihood_StatesIntegratedOut(smodel_ps) ); //DW's function. -} -#endif - - - - - - - - - - -//???????????????? -/** -//=== -static struct TStateModel_tag *SMODEL_PS = NULL; //Minimization to find the MLE or posterior peak. -static struct TStateModel_tag *SetModelGlobalForCovariance(struct TStateModel_tag *smodel_ps) -{ - //Returns the old pointer in order to preserve the previous value. - struct TStateModel_tag *tmp_ps =SMODEL_PS; - SMODEL_PS = smodel_ps; - return (tmp_ps); -} -//--- Can be used for conjugate gradient minimization as well. -static double ObjFuncForSmodel(double *x0_p, int d_x0) -{ - TSdvector x0_sdv; - x0_sdv.v = x0_p; - x0_sdv.n = d_x0; - x0_sdv.flag = V_DEF; - - return ( -opt_logOverallPosteriorKernal(SMODEL_PS, &x0_sdv) ); -} -//--- -static double opt_logOverallPosteriorKernal(struct TStateModel_tag *smodel_ps, TSdvector *xchange_dv) -{ - double *x1_pd, *x2_pd; - - - x1_pd = xchange_dv->v; - x2_pd = xchange_dv->v + NumberFreeParametersTheta(smodel_ps); - //Note that NumberFreeParametersTheta() is DW's function, which points to TZ's function. - //In the constant parameter model, this will point to invalid, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - //======= This is a must step to refresh the value at the new point. ======= - ConvertFreeParametersToTheta(smodel_ps, x1_pd); //Waggoner's function, which calls TZ's Convertphi2*(). - ConvertFreeParametersToQ(smodel_ps, x2_pd); //Waggoner's function, which automatically takes care of the constant-parameter situition - ThetaChanged(smodel_ps); //DW's function, which will also call my function to set a flag for refreshing everything under these new parameters. - if (1) //Posterior function. - return ( LogPosterior_StatesIntegratedOut(smodel_ps) ); //DW's function. - else //Likelihood (with no prior) - return ( LogLikelihood_StatesIntegratedOut(smodel_ps) ); //DW's function. -} -/**/ - - - - - - - - -int next_permutation(int *first, int *last) -{ - // Given the permulation, say, [3 2 1 0], the ouput is the next permulation [0 1 2 3], and so on. - // Note that last is simply a pointer. Because it is not allocated to a memory, it cannot be accessed. - // So last is used for (1) gauging the dimension size of the array first; - // (2) being accssed but with --last (which points to a valid memory place), NOT last. - // - // first: n-by-1 vector of integers filled with 0, 1, 2, ..., n. - // last: simply a pointer to the address after the last element of first. Note that no memory is allocated. - - int *i = last, *ii, *j, tmp; - if (first == last || first == --i) - return 0; - - for(; ; ) { - ii = i; - if (*--i < *ii) { - j = last; - while (!(*i < *--j)); - tmp = *i; *i = *j; *j = tmp; - for (; ii != last && ii != --last; ++ii) { - tmp = *ii; *ii = *last; *last = tmp; - } - return 1; - } - if (i == first) { - for (; first != last && first != --last; ++first) { - tmp = *first; *first = *last; *last = tmp; - } - return 0; - } - } -} - - - -/** -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -void permute_matrix(double *a, int n, int *indx) { - double *b; - int nn=n*n; - register int i; - b = calloc(nn,sizeof(double)); - memcpy(b, a, nn*sizeof(double)); - for (i=0; i<nn; i++, a++) - *a = b[indx[i%n]+indx[i/n]*n]; -} - -int main() { - double a[9]={1,2,3,4,5,6,7,8,9}; - int indx[3]={1,2,0}; - permute_matrix(a,3,indx); - return 0; -} -/**/ - - -int fn_cumsum_int(int *x_v, const int d_x_v) { - //Outputs: - // x_v: an int vector of cumulative sums over an input int vector. - // return: the sum of an input int vector. - //Inputs: - // x_v: a vector of ints. - // d_x_v: dimension of x_v. - // - // Compute cumulative sums of a vector of ints. - int _i; - - if (x_v==NULL) fn_DisplayError(".../cstz/fn_cumsum_lf: x_v must be allocated with memory"); - - for (_i=1; _i<d_x_v; _i++) { - x_v[_i] = x_v[_i-1] + x_v[_i]; - } - - return (x_v[d_x_v-1]); -} - - -double fn_cumsum_lf(double *x_v, const int d_x_v) { - //Outputs: - // x_v: a double vector of cumulative sums over an input double vector. - // return: the sum of an input double vector. - //Inputs: - // x_v: a vector of doubles. - // d_x_v: dimension of x_v. - // - // Compute cumulative sums of a vector of doubles. - int _i; - - if (!x_v) fn_DisplayError(".../cstz/fn_cumsum_lf: x_v must be allocated with memory"); - - for (_i=1; _i<d_x_v; _i++) { - x_v[_i] = x_v[_i-1] + x_v[_i]; - } - - return (x_v[d_x_v-1]); -} - - -double fn_mean(const double *a_v, const int _n) { - int _i; - double x=0.0; - - for (_i=0; _i<_n; _i++) x += a_v[_i]; - x /= (double)_n; - - return x; -} - -//<<--------------- -static double *tz_BaseForComp; // This base variable is to be sorted and thus made global for this source file. -void fn_SetBaseArrayForComp(TSdvector *x_dv) -{ - if ( !x_dv->flag ) fn_DisplayError(".../cstz.c/ftd_SetBaseArrayForComp(): input vector used for comparison must be given legal values"); - else tz_BaseForComp = x_dv->v; -} -int fn_compare(const void *i1, const void *i2) -{ - // Ascending order according to tz_BaseForComp. - return ( (tz_BaseForComp[*((int*)i1)]<tz_BaseForComp[*((int*)i2)]) ? -1 : (tz_BaseForComp[*((int*)i1)]>tz_BaseForComp[*((int*)i2)]) ? 1 : 0 ); -} -int fn_compare2(const void *i1, const void *i2) -{ - // Descending order according to tz_BaseForComp. - return ( (tz_BaseForComp[*((int*)i1)]<tz_BaseForComp[*((int*)i2)]) ? 1 : (tz_BaseForComp[*((int*)i1)]>tz_BaseForComp[*((int*)i2)]) ? -1 : 0); -} -//======= Quick sort. ======= -static int ftd_CompareDouble(const void *a, const void *b) -{ - // Ascending order for the series that contains a and b. - return (*(double *)a < *(double *)b ? -1 : *(double *)a > *(double *)b ? 1 : 0); -} -static int ftd_CompareDouble2(const void *a, const void *b) -{ - // Dscending order for the series that contains a and b. - return (*(double *)a < *(double *)b ? 1 : *(double *)a > *(double *)b ? -1 : 0); -} -//--- -void tz_sort(TSdvector *x_dv, char ad) -{ - //x_dv will be replaced by the sorted value. - //Sort x_dv according to the descending or ascending order indicated by ad. - //ad == "A' or 'a': acending order. - //ad == 'D' or 'd': descending order. - if (!x_dv || !x_dv->flag) fn_DisplayError("cstz.c/tz_sort(): input vector x_dv must be (1) created and (2) assigned values"); - - qsort( (void *)x_dv->v, (size_t)x_dv->n, sizeof(double), ((ad=='A') || (ad=='a')) ? ftd_CompareDouble : ftd_CompareDouble2); -} -void tz_sortindex_lf(TSivector *x_iv, TSdvector *base_dv, char ad) -{ - //???????NOT fully tested yet. - //x_iv will be replaced by the sorted integer vector. - //base_dv will not be affected. - //Sort x_iv according to the descending or ascending order of base_dv. - //ad == "A' or 'a': acending order. - //ad == 'D' or 'd': descending order. - if (!x_iv || !base_dv || !x_iv->flag || !base_dv->flag) fn_DisplayError("cstz.c/tz_sortindex(): input vectors x_iv and base_dv must be (1) created and (2) assigned values"); - if (x_iv->n != base_dv->n) fn_DisplayError("cstz.c/tz_sortindex(): lengths of the two input vectors must be the same"); - - fn_SetBaseArrayForComp(base_dv); - qsort( (void *)x_iv->v, (size_t)x_iv->n, sizeof(int), ((ad=='A') || (ad=='a')) ? fn_compare : fn_compare2); -} -void tz_sortindex(TSivector *x_iv, TSvoidvector *base_voidv, char ad) -{ - //???????NOT fully tested yet. - //Allowing x_iv = base_voidv or sets base_voidv=NULL - //Sort x_iv according to the descending or ascending order of base_voidv. - //ad == "A' or 'a': acending order. - //ad == 'D' or 'd': descending order. - if (!x_iv || !base_voidv || !x_iv->flag || !base_voidv->flag) fn_DisplayError("cstz.c/tz_sort_int(): input vectors x_iv and base_voidv must be (1) created and (2) assigned values"); - if (x_iv->n != base_voidv->n) fn_DisplayError("cstz.c/tz_sort_int(): lengths of the two input vectors must be the same"); - - fn_SetBaseArrayForComp((TSdvector *)base_voidv); - qsort( (void *)x_iv->v, (size_t)x_iv->n, sizeof(int), ((ad=='A') || (ad=='a')) ? fn_compare : fn_compare2); -} -//--- -void tz_sort_matrix(TSdmatrix *X_dm, char ad, char rc) -{ - //Fast method: rc = 'C' (sort each column). - //Output: X_dm will be replaced by the sorted value. - // Sort X_dm (1) by columns or rows indicated by rc and (2) according to the descending or ascending order indicated by ad. - //Inputs: - // ad == 'A' or 'a': acending order. - // ad == 'D' or 'd': descending order. - // rc == 'C' or 'c': sort each column. - // rc == 'R' or 'r': sort each row. - int nrows, ncols, _j, begloc; - TSdvector x_sdv; - double *X; - //=== - TSdmatrix *Xtran_dm = NULL; - - if (!X_dm || !(X_dm->flag & M_GE)) fn_DisplayError("cstz.c/tz_sort_matrix(): input matrix X_dm must be (1) created and (2) assigned values and (3) regular (M_GE)"); - x_sdv.flag = V_DEF; - - if (rc=='C' || rc=='c') - { - X = X_dm->M; - nrows = X_dm->nrows; - ncols = X_dm->ncols; - } - else - { - Xtran_dm = tz_TransposeRegular((TSdmatrix *)NULL, X_dm); - X = Xtran_dm->M; - nrows = Xtran_dm->nrows; - ncols = Xtran_dm->ncols; - } - x_sdv.n = nrows; - for (begloc=nrows*(ncols-1), _j=ncols-1; _j>=0; begloc-=nrows, _j--) - { - x_sdv.v = X + begloc; - tz_sort(&x_sdv, ad); - } - - if (rc=='R' || rc=='r') - { - tz_TransposeRegular(X_dm, Xtran_dm); - //=== - DestroyMatrix_lf(Xtran_dm); - } -} -//--- -TSdvector *tz_prctile_matrix(TSdvector *z_dv, const double prc, TSdmatrix *Z_dm, const char rc) -{ - //Fast method: rc = 'C' (sort each column). - //Output: %prc percentile (i.e., containing 0% to %prc). - // z_dv: an n-by-1 vector if rc=='C' or an m-by-1 vector if rc=='R'. - // If z_dv==NULL, it will be created and has to be destroyed outside this function. - //Inputs: - // prc: percent (must be between 0.0 and 1.0 inclusive). - // X_dm: an m-by-n general matrix. - // rc == 'C' or 'c': sort each column. - // rc == 'R' or 'r': sort each row. - int nrows, ncols, _j, begloc; - TSdvector x_sdv; - double *X; - //=== - TSdmatrix *X_dm = NULL; - TSdmatrix *Xtran_dm = NULL; - - if (!Z_dm || !Z_dm->flag) fn_DisplayError("cstz.c/tz_prctile_matrix(): input matrix Z_dm must be (1) created and (2) assigned values"); - if (prc<0.0 || prc>1.0) fn_DisplayError("cstz.c/tz_prctile_matrix(): percentile mark prc must be between 0.0 and 1.0 inclusive"); - x_sdv.flag = V_DEF; - - nrows = Z_dm->nrows; - ncols = Z_dm->ncols; - if (!z_dv) - { - if (rc=='C' || rc=='c') z_dv = CreateVector_lf(ncols); - else z_dv = CreateVector_lf(nrows); - } - else - { - if ((rc=='C' || rc=='c')) - { - if (ncols != z_dv->n) fn_DisplayError("cstz.c/tz_prctile_matrix(): z_dv->n must be the same as ncols of X_dm when sorting each column"); - } - else - { - if (nrows != z_dv->n) fn_DisplayError("cstz.c/tz_prctile_matrix(): z_dv->n must be the same as nrows of X_dm when sorting each row"); - } - } - X_dm = CreateMatrix_lf(nrows, ncols); - CopyMatrix0(X_dm, Z_dm); - - if (rc=='C' || rc=='c') - { - X = X_dm->M; - nrows = X_dm->nrows; - ncols = X_dm->ncols; - } - else - { - Xtran_dm = tz_TransposeRegular((TSdmatrix *)NULL, X_dm); - X = Xtran_dm->M; - nrows = Xtran_dm->nrows; - ncols = Xtran_dm->ncols; - } - x_sdv.n = nrows; - for (begloc=nrows*(ncols-1), _j=ncols-1; _j>=0; begloc-=nrows, _j--) - { - x_sdv.v = X + begloc; - tz_sort(&x_sdv, 'A'); - z_dv->v[_j] = x_sdv.v[(int)floor(prc*(double)nrows)]; - } - z_dv->flag = V_DEF; - if (rc=='R' || rc=='r') DestroyMatrix_lf(Xtran_dm); - - //=== - DestroyMatrix_lf(X_dm); - - return (z_dv); -} -//--- -TSdvector *tz_mean_matrix(TSdvector *z_dv, TSdmatrix *Z_dm, const char rc) -{ - //Fast method: rc = 'C' (mean for each column). - //Output: %prc percentile (i.e., containing 0% to %prc). - // z_dv: an n-by-1 vector if rc=='C' or an m-by-1 vector if rc=='R'. - // If z_dv==NULL, it will be created and has to be destroyed outside this function. - //Inputs: - // X_dm: an m-by-n general matrix. - // rc == 'C' or 'c': mean for each column. - // rc == 'R' or 'r': mean for each row. - int nrows, ncols, _j, begloc; - TSdvector x_sdv; - double *X; - //=== - TSdmatrix *X_dm = NULL; - TSdmatrix *Xtran_dm = NULL; - - if (!Z_dm || !Z_dm->flag) fn_DisplayError("cstz.c/tz_mean_matrix(): input matrix Z_dm must be (1) created and (2) assigned values"); - x_sdv.flag = V_DEF; - - nrows = Z_dm->nrows; - ncols = Z_dm->ncols; - if (!z_dv) - { - if (rc=='C' || rc=='c') z_dv = CreateVector_lf(ncols); - else z_dv = CreateVector_lf(nrows); - } - else - { - if ((rc=='C' || rc=='c')) - { - if (ncols != z_dv->n) fn_DisplayError("cstz.c/tz_mean_matrix(): z_dv->n must be the same as ncols of X_dm when computing mean for each column"); - } - else - { - if (nrows != z_dv->n) fn_DisplayError("cstz.c/tz_mean_matrix(): z_dv->n must be the same as nrows of X_dm when computing mean for each row"); - } - } - X_dm = CreateMatrix_lf(nrows, ncols); - CopyMatrix0(X_dm, Z_dm); - - if (rc=='C' || rc=='c') - { - X = X_dm->M; - nrows = X_dm->nrows; - ncols = X_dm->ncols; - } - else - { - Xtran_dm = tz_TransposeRegular((TSdmatrix *)NULL, X_dm); - X = Xtran_dm->M; - nrows = Xtran_dm->nrows; - ncols = Xtran_dm->ncols; - } - x_sdv.n = nrows; - for (begloc=nrows*(ncols-1), _j=ncols-1; _j>=0; begloc-=nrows, _j--) - { - x_sdv.v = X + begloc; - z_dv->v[_j] = fn_mean(x_sdv.v, x_sdv.n); - } - z_dv->flag = V_DEF; - if (rc=='R' || rc=='r') DestroyMatrix_lf(Xtran_dm); - - //=== - DestroyMatrix_lf(X_dm); - - return (z_dv); -} -//--------------->> - - - -//<<--------------- -// WZ normalization on VARs. -//--------------->> -void fn_wznormalization(TSdvector *wznmlz_dv, TSdmatrix *A0draw_dm, TSdmatrix *A0peak_dm) -{ - //Outputs: - // wznmlz_dv (n-by-1): If negative, the sign of the equation must switch; if positive: no action needs be taken. - // If NULL as an input, remains NULL. - // A0draw_dm (n-by-n): replaced by wz-normalized draw. - //Inputs: - // wznmlz_dv (n-by-1): if NULL, no output for wznmlz_dv; otherwise, a memory allocated vector. - // A0draw_dm (n-by-n): a draw of A0. - // A0peak_dm (n-by-n): reference point to which normalized A0draw_dm is closest. - int _j, _n, - errflag = -2; - double *v; - TSdmatrix *X_dm = NULL; - TSdvector *diagX_dv = NULL; - - if ( !A0peak_dm ) fn_DisplayError(".../cstz.c/fn_wznormalization(): input matrix for ML estimates must be created (memory allocated) and have legal values"); - //This is a minimum check to prevent crash without error messages. More robust checks are done in BdivA_rgens(). - - _n = A0peak_dm->nrows; - X_dm = CreateMatrix_lf(_n, _n); - - if ( errflag=BdivA_rgens(X_dm, A0peak_dm, '\\', A0draw_dm) ) { - printf(".../cstz.c/fn_wznormalization(): errors when calling BdivA_rgens() with error flag %d", errflag); - exit(EXIT_FAILURE); - } - - if (wznmlz_dv) { - diagdv(wznmlz_dv, X_dm); - v = wznmlz_dv->v; - } - else { - diagX_dv = CreateVector_lf(_n); - diagdv(diagX_dv, X_dm); - v = diagX_dv->v; - } - - - for (_j=_n-1; _j>=0; _j--) - if (v[_j]<0) ScalarTimesColofMatrix((TSdvector *)NULL, -1.0, A0draw_dm, _j); - - //=== Destroys memory allocated for this function only. - DestroyMatrix_lf(X_dm); - DestroyVector_lf(diagX_dv); -} - - - - -//---------------<< -// Handling under or over flows with log values. -//--------------->> -struct TSveclogsum_tag *CreateVeclogsum(int n) -{ - struct TSveclogsum_tag *veclogsum_ps = tzMalloc(1, struct TSveclogsum_tag); - - //=== Memory allocation and initialization. - veclogsum_ps->n = n; //Number of sums or the dimension of logofsum. - veclogsum_ps->N_iv = CreateConstantVector_int(n, 0); //Cumulative. (N_1, ..., N_n). - veclogsum_ps->logsum_dv = CreateConstantVector_lf(n, -MACHINEINFINITY); //Cumulative. (logofsum_1, ..., logofsum_n). - veclogsum_ps->logmax_dv = CreateConstantVector_lf(n, -MACHINEINFINITY); //(logmax_1, ..., logmax_n). - - return (veclogsum_ps); -} -//--- -struct TSveclogsum_tag *DestroyVeclogsum(struct TSveclogsum_tag *veclogsum_ps) -{ - - if (veclogsum_ps) { - DestroyVector_int(veclogsum_ps->N_iv); - DestroyVector_lf(veclogsum_ps->logsum_dv); - DestroyVector_lf(veclogsum_ps->logmax_dv); - - //=== - free(veclogsum_ps); - return ((struct TSveclogsum_tag *)NULL); - } - else return (veclogsum_ps); -} -//=== -//------------------ -//Updating the sum (not divided by n) for the mean and the second moment. -//------------------ -void UpdateSumFor1st2ndMoments(TSdvector *x1stsum_dv, TSdmatrix *X2ndsum_dm, const TSdvector *xdraw_dv) -{ - static int ini_indicator = 0; - - if (!ini_indicator) { - //Pass this loop once and no more. - CopyVector0(x1stsum_dv, xdraw_dv); - VectorTimesSelf(X2ndsum_dm, xdraw_dv, 1.0, 0.0, 'U'); - ini_indicator = 1; - } - else { - VectorPlusVectorUpdate(x1stsum_dv, xdraw_dv); - VectorTimesSelf(X2ndsum_dm, xdraw_dv, 1.0, 1.0, 'U'); - } -} -//--- -int tz_update_logofsum(double *Y_N_dp, double *y_Nmax_dp, double ynew, int N) -{ - //Recursive algorithm to update Y_N (=log(sum of x_i)) for i=1, ..., N with the new value ynew = log(x_{N+1}). - //Returns (1) the updated value Y_{N+1} = log(sum of x_i)) for i=1, ..., N+1; - // (2) the updated value y_(N+1)max_dp; - // (3) the integer N+1. - //See TVBVAR Notes p.81a. - - if (*y_Nmax_dp>=ynew) *Y_N_dp = log( exp(*Y_N_dp - *y_Nmax_dp) + exp(ynew - *y_Nmax_dp) ) + *y_Nmax_dp; - else { - *y_Nmax_dp = ynew; - *Y_N_dp = log( exp(*Y_N_dp - ynew) + 1.0 ) + ynew; - } - - return (N+1); -} -int fn_update_logofsum(int N, double ynew, double *Y_N_dp, double *y_Nmax_dp) -{ - //Recursive algorithm to update Y_N (=log(sum of x_i)) for i=1, ..., N with the new value ynew = log(x_{N+1}). - //Returns (1) the updated value Y_{N+1} = log(sum of x_i)) for i=1, ..., N+1; - // (2) the updated value y_(N+1)max_dp; - // (3) the integer N+1. - //See TVBVAR Notes p.81a. - //If N=0, then ynew = -infty (no value yet) and thus no value is added to *Y_N_dp. - -// if (N>0) -// { - if (*y_Nmax_dp>=ynew) *Y_N_dp = log( exp(*Y_N_dp - *y_Nmax_dp) + exp(ynew - *y_Nmax_dp) ) + *y_Nmax_dp; - else { - *y_Nmax_dp = ynew; - *Y_N_dp = log( exp(*Y_N_dp - ynew) + 1.0 ) + ynew; - } -// } - - return (N+1); -} -double fn_replace_logofsumsbt(double *yold, double _a, double ynew, double _b) -{ - //Outputs: - // *yold is replaced by log abs(a*xold + b*xnew). - // 1.0 or -1.0: sign of a*xold + b*xnew. - // - //Given yold=log(xold) and ynew=log(xnew), it updates and returns yold = log abs(a*xold + b*xnew). - //sbt: subtraction or subtract. - //See TVBVAR Notes p.81a. - double tmpd; - //*yold = (*yold > ynew) ? (log( _a + _b*exp(ynew - *yold)) + *yold) : (log( _a*exp(*yold - ynew) + _b) + ynew); - - if (*yold > ynew) { - if ((tmpd=_a + _b*exp(ynew - *yold) ) < 0.0) { - // printf("WARNING! .../cstz.c/fn_replace_logofsumsbt(): Expression inside log is negative and the function returns the negative sign!\n"); - *yold += log(fabs(tmpd)); - return (-1.0); - } - else { - *yold += log(tmpd); - return (1.0); - } - } - else { - if ((tmpd=_a*exp(*yold - ynew) + _b) < 0.0 ) { - // printf("WARNING! .../cstz.c/fn_replace_logofsumsbt(): Expression inside log is negative and the function returns the negative sign!\n"); - *yold = log(fabs(tmpd)) + ynew; - return (-1.0); - } - else { - *yold = log(tmpd) + ynew; - return (1.0); - } - } -} - - -//<<--------------- -// Evaluating the inverse of the chi-square cumulative distribution function. -//--------------->> -double fn_chi2inv(double p, double df) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - //Returns x where p = int_{0}^{x} chi2pdf(t, df) dt - if (df<=0.0) fn_DisplayError("cstz.c/fn_chi2inv(): degrees of freedom df must be greater than 0.0"); - - if (p<=0.0) return (0.0); - else if (p>=1.0) return (MACHINEINFINITY); - else return (imsls_d_chi_squared_inverse_cdf(p, df)); -#elif defined( USE_GSL_LIBRARY ) - if (df<=0.0) fn_DisplayError("cstz.c/fn_chi2inv(): degrees of freedom df must be greater than 0.0"); - - if (p<=0.0) return (0.0); - else if (p>=1.0) return (MACHINEINFINITY); - else - return gsl_cdf_chisq_Pinv(p,df); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Evaluating the standard normal cumulative distribution function. -//--------------->> -double fn_normalcdf(double x) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsls_d_normal_cdf(x)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_cdf_ugaussian_P(x); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Evaluating the inverse of the standard normal cumulative distribution function. -//--------------->> -double fn_normalinv(double p) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsls_d_normal_inverse_cdf(p)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_cdf_ugaussian_Pinv(p); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Evaluating the inverse of the beta cumulative distribution function. -//--------------->> -double fn_betainv(double p, double _alpha, double _beta) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - //p = int_{0}^{\infty} betapdf(t, _alpha, _beta) dt where betapdf(t,_alpha,_beta) \propt t^{_alpha-1}*(1-t)^(_beta-1}. - return (imsls_d_beta_inverse_cdf(p, _alpha, _beta)); -#elif defined( USE_GSL_LIBRARY) - return gsl_cdf_beta_Pinv(p,_alpha,_beta); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Computes log gamma (x) where gamma(n+1) = n! and gamma(x) = int_0^{\infty} e^{-t} t^{x-1} dt. -//--------------->> -double fn_gammalog(double x) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsl_d_log_gamma(x)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_sf_lngamma(x); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Computes log beta(x, y) where beta(x, y) = gamma(x)*gamm(y)/gamma(x+y). -//--------------->> -double fn_betalog(double x, double y) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsl_d_log_beta(x, y)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_sf_lnbeta(x,y); -#else - ***No default routine yet; -#endif -} - - - -//<<--------------- -// Computes log gamma (x) where gamma(n+1) = n! and gamma(x) = int_0^{\infty} e^{-t} t^{x-1} dt. -//--------------->> -double gammalog(double x) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsl_d_log_gamma(x)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_sf_lngamma(x); -#else - ***No default routine yet; -#endif -} - - -//----------------------------------------------------------------------------------- -//------------------------------ Normal distribution ------------------------------// -//--- p(x) = (1.0/sqrt(2*pi)*sigma) exp( -(1.0/(2.0*sigma^2.0)) (x-mu)^2.0 ) -//--- for sigma>0. -//----------------------------------------------------------------------------------- -#define LOGSQRTOF2PI 9.189385332046727e-001 -double tz_lognormalpdf(double _x, double _m, double _s) -{ - double xmm = _x-_m; - if (_s <= 0.0) return (-NEARINFINITY); - //fn_DisplayError("cstz.c/tz_lognormalpdf(): standard deviation must be positive"); - - return ( -LOGSQRTOF2PI - log(_s) - (1.0/(2.0*square(_s))) * square(xmm) ); -} -#undef LOGSQRTOF2PI - -//----------------------------------------------------------------------------------- -//----------------------------- Beta density function -----------------------------// -//--- p(x) = ( Gamma(a+b)/(Gamma(a)*Gamma(b)) ) x^(a-1) (1-x)^(b-1) for a>0 and b>0. -//--- E(x) = a/(a+b); var(x) = a*b/( (a+b)^2*(a+b+1) ); -//--- The density is finite if a,b>=1. -//--- Noninformative density: (1) a=b=1; (2) a=b=0.5; or (3) a=b=0. -//----------------------------------------------------------------------------------- -double tz_logbetapdf(double _x, double _a, double _b) -{ - if ((_x < 0.0) || (_x > 1.0) || (_a <=0.0) || (_b <= 0.0)) return (-NEARINFINITY); - if ((_x <= 0.0) && (_a != 1.0)) return (-NEARINFINITY); - //Note that it should be +infinity for a < 1.0. We return -infinity anyway for the purpose of giving zero LH. - if ((_x >= 1.0) && (_b != 1.0)) return (-NEARINFINITY); - //Note that it should be +infinity for b < 1.0. We return -infinity anyway for the purpose of giving zero LH. - //fn_DisplayError("cstz.c/tz_logbetapdf(): x must be (0,1) and a, b must be positive"); - - if ((_x == 0.0 && _a == 1.0) || (_x == 1.0 && _b == 1.0)) return (-fn_betalog(_a, _b)); - else return ( -fn_betalog(_a, _b) + (_a-1.0)*log(_x) + (_b-1.0)*log(1.0-_x) ); -} -//----------------------------------------------------------------------------------- -//---------------------------- Gamma distribution ----------------------------------// -//--- p(x) = ( b^a/Gamma(a) ) x^(a-1) exp(-bx) for a>0 and b>0. -//--- where a is shape and b is inverse scale (rate) parameter. -//--- E(x) = a/b; var(x) = a/b^2; -//--- Noninformative distribution: a,b -> 0. -//--- The density function is finite if a >= 1. -//----------------------------------------------------------------------------------- -double tz_loggammapdf(double _x, double _a, double _b) -{ - if (_x < 0.0 || _a <= 0.0 || _b <= 0.0) return (-NEARINFINITY); - if (_x <= 0.0 && _a != 1.0) return (-NEARINFINITY); - //Note that it should be +infinity for a < 1.0. We return -infinity anyway for the purpose of giving zero LH. - //fn_DisplayError("cstz.c/tz_loggammapdf(): x, a, and b must be positive"); - - if (_x == 0.0 && _a == 1.0) return ( _a*log(_b) - fn_gammalog(_a) ); - else return ( _a*log(_b) - fn_gammalog(_a) + (_a-1.0)*log(_x) - _b*_x ); -} -//----------------------------------------------------------------------------------- -//------------------------ Inverse-Gamma distribution ------------------------------// -//--- p(x) = ( b^a/Gamma(a) ) x^(-a-1) exp(-b/x) for a>0 and b>0. -//--- where a is shape and b is scale parameter. -//--- E(x) = b/(a-1) for a>1; var(x) = b^2/( (a-1)^2*(a-2) ) for a>2; -//--- Noninformative distribution: a,b -> 0. -//--- How to draw: (1) draw z from Gamma(a,b); (2) let x=1/z. -//----------------------------------------------------------------------------------- -double tz_loginversegammapdf(double _x, double _a, double _b) -{ - //This denisity is always finite. - //If a < 1.0, 1st moment does not exist, - // a < 2.0, 2nd moment does not exist, - // a < 3.0, 3rd moment does not exist, - // a < 4.0, 4th moment does not exist. - - if (_x < 0.0 || _a <= 0.0 || _b <= 0.0) return (-NEARINFINITY); - //fn_DisplayError("cstz.c/tz_loginversegammapdf(): x, a, and b must be positive"); - - return ( _a*log(_b) - fn_gammalog(_a) - (_a+1.0)*log(_x) - _b /_x ); -} - - - - - - - -//<<--------------- -// P2 algorithm ??????? -//--------------->> -void psqr(double *q, int *m, double x, const double *p, int n) -{ - //Outputs: - // q: n-by-1 vector of - // m: n-by-1 vector of - // x: a random draw. - //------ - //Inputs: - // p: n-by-1 vector of cumulative cut-off probabilties for the error bands. - static double qm, dq; - static int i, dm, dn; - - for (i=0; q[i]<=x && i<n; i++) ; - if (i==0) { q[0]=x; i++; } - if (i==n) { q[n-1]=x; i--; } - for (; i<n; i++) m[i]++; - for (i=1; i<n-1; i++) { - dq = p[i]*m[n-1]; - if (m[i]+1<=dq && (dm=m[i+1]-m[i])>1) { - dn = m[i]-m[i-1]; - dq = ((dn+1)*(qm=q[i+1]-q[i])/dm+ - (dm-1)*(q[i]-q[i-1])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - q[i] += dq; - m[i]++; - } else - if (m[i]-1>=dq && (dm=m[i]-m[i-1])>1) { - dn = m[i+1]-m[i]; - dq = ((dn+1)*(qm=q[i]-q[i-1])/dm+ - (dm-1)*(q[i+1]-q[i])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - q[i] -= dq; - m[i]--; - } - } -} -void piksrt(double *arr, int n) -{ - //Outputs: - // arr: replaced by new values. - //Inputs: - // arr: n-by-1 vector ?????? - int i, j; - double a; - - for (j=1; j<n; j++) { - a = arr[j]; - for (i=j-1; i>=0 && arr[i]>a; i--) - arr[i+1] = arr[i]; - arr[i+1]=a; - } -} - - - -//---------------------------- Some high-level VAR functions --------------------- -void fn_lev2growthanual(TSdmatrix *levgro_dm, const TSdmatrix *levgrominus1_dm, const TSivector *indxlogper_iv) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: - // levgro_dm: nfores-by-nvar matrix of annual growth rates (percent) except interest rates and unemployment rate in level. - //Inputs: - // levgro_dm: nfores-by-nvar matrix of log levels and, say, interest rates already divided by 100. - // levgrominus1_dm: qm-by-nvar matrix in the previous year (not necessarily a calendar year). - // indxlogper_iv: nvar-by-1 array of 1, 2, or 4 for the list of endogenous variables. 1: decimal point with annual rate like the interest rate; 2: decimal point (NOT at annual rate) like the unemployment rate; 4: log level value. - int ti, vj, qm, nvar, nfores, totrows; - TSdmatrix *tf_levgroplus_dm = NULL; - - if ((qm=levgrominus1_dm->nrows) != 12 && qm != 4) fn_DisplayError("fn_lev2growthanual(): the second input must have 12 or 4 rows for monthly or quarterly data"); - if ((nvar=levgrominus1_dm->ncols) != indxlogper_iv->n || nvar != levgro_dm->ncols) fn_DisplayError("fn_lev2growthanual(): column dimensions and vector dimension of all inputs must be same"); - - //=== Memory allocation for this function. - tf_levgroplus_dm = CreateMatrix_lf(qm+(nfores=levgro_dm->nrows), nvar=levgrominus1_dm->ncols); - - - CopySubmatrix0(tf_levgroplus_dm, (TSdmatrix *)levgrominus1_dm, 0, 0, qm, nvar); - CopySubmatrix(tf_levgroplus_dm, qm, 0, levgro_dm, 0, 0, nfores, nvar); - totrows = qm + nfores; - for (vj=nvar-1; vj>=0; vj--) { - switch (indxlogper_iv->v[vj]) { - case 4: - for (ti=nfores-1; ti>=0; ti--) - levgro_dm->M[mos(ti, vj, nfores)] = 100.0*( exp(tf_levgroplus_dm->M[mos(ti+qm, vj, totrows)] - tf_levgroplus_dm->M[mos(ti, vj, totrows)]) - 1.0 ); - break; - case 2: - case 1: - for (ti=nfores-1; ti>=0; ti--) - levgro_dm->M[mos(ti, vj, nfores)] *= 100.0; - break; - default: - fn_DisplayError("fn_lev2growthanual(): the input vector, indxlogper_iv, must have the integer values 4, 2, and 1"); - } - } - - - - //=== Destroys memory allocated for this function. - tf_levgroplus_dm = DestroyMatrix_lf(tf_levgroplus_dm); -} - - - -//------------------- -// Generating a counterfactual paths conditional on S_T and specified shocks_t(s_t) for _sm (a switching model). -//------------------- -void fn_ctfals_givenshocks_sm(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, - const TSivector *S_Tdraw_iv, const TSdcell *Bsdraw_dc, const TSdcell *A0sdrawinv_dc, const TSivector *noshocks_iv) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: ctflasdrawtran = xprimeminus1*Bsdraw{s} + shocks'*A0sdrawinv{s}. - // ctfalstran_dm: nvar-by-nfores where nfores (=eloc-bloc+1) is the forecast horizon. Conterfactual paths of nvar variables. - // xprimeminus1_dv: updated 1-by-ncoef right-hand-side variables at the end of the forecast horizon, ready for the forecasts at the step nfores+1. - // In the order of [nvar for 1st lag, ..., nvar for last lag, other exogenous terms, const term]. - //Inputs: - // xprimeminus1_dv: 1-by-ncoef vector of right-hand-side variables at the beginning of the forecast horizon. - // bloc: beginning location for the forecast horizon. - // eloc: end location for the forecast horizon. - // strshockstran_dm: nvar-by-T. Matrix transpose of unit-variance (time-invariant) structural shocks. - // S_Tdraw_iv: fss-by-1 or SampleSize-by-1 vector of (s_t|I_T,theta). - // Bsdraw_dc: nStates cells. For each cell, ncoef-by-nvar reduced-form coefficient matrix. - // A0sdrawinv_dc: nStates cells. For each cell, nvar-by-nvar inverse of contemporaneous coefficient matrix. - // noshocks_iv: a (no greater than nvar) vector of base-0 integers indicating the corresponding equations whose shocks are set - // to zero. Each element of this integer vector must be less than nvar. - int ti, si, vi; - int nfores = eloc - bloc + 1, - nvar = ctfalstran_dm->nrows, - ncoefminusnvar7const = Bsdraw_dc->C[0]->nrows - nvar - 1; - TSdvector ctfals_sdv, strshocks_sdv; - TSivector STnfores_siv; //nfores-by-1 vector of s_t's. - - if (nfores < 1) fn_DisplayError("cstz.c/fn_ctfals_givenshocks_sm(): Number of forecast steps must be greater than 0"); - if (eloc > strshockstran_dm->ncols-1) fn_DisplayError("cstz.c/fn_ctfals_givenshocks_sm(): End location in the forecast horizon must be no greater than the sample size"); - if (nvar != strshockstran_dm->nrows) fn_DisplayError("cstz.c/fn_ctfals_givenshocks_sm(): the number of rows of strshockstran_dm must be equal to nvar"); - - - //******* WARNING: The operation involves ctfals_sdv.v, strshocks_sdv.v, STnfores_siv.v ******* - //******* throughout this function is dangerous because of pointer movements. ******* - //******* But it gives us efficiency. ******* - ctfals_sdv.n = nvar; - ctfals_sdv.v = ctfalstran_dm->M; //Points to the beginning of the 1st column of ctfalstran_dm. - //+ - strshocks_sdv.n = nvar; - strshocks_sdv.flag = V_DEF; - strshocks_sdv.v = strshockstran_dm->M + strshockstran_dm->nrows*bloc; //Points to the beginning of the bloc_th column of strshockstran_dm. - for (vi=noshocks_iv->n-1; vi>=0; vi--) - strshocks_sdv.v[noshocks_iv->v[vi]] = 0.0; //Set shocks in those equations to be zero. - //+ - STnfores_siv.n = nfores; - STnfores_siv.flag = V_DEF; - STnfores_siv.v = S_Tdraw_iv->v + bloc; //Points to the bloc_th position of S_Tdraw_iv. - - - for (ti=0; ti<nfores; ti++) { - //Must have a forward recursion. - VectorTimesMatrix(&ctfals_sdv, xprimeminus1_dv, Bsdraw_dc->C[si=STnfores_siv.v[ti]], 1.0, 0.0, 'N'); - VectorTimesMatrix(&ctfals_sdv, &strshocks_sdv, A0sdrawinv_dc->C[si], 1.0, 1.0, 'N'); - //=== Updates the recursion. The order matters. - memmove(xprimeminus1_dv->v+nvar, xprimeminus1_dv->v, ncoefminusnvar7const*sizeof(double)); - memcpy(xprimeminus1_dv->v, ctfals_sdv.v, nvar*sizeof(double)); - //+ - if (ti < nfores-1) //This is needed to prevent memory leak at the end when we have strshocks_sdv.v[noshocks_iv->v[vi]] = 0.0. - { - ctfals_sdv.v += nvar; //Points to the beginning of the next column of ctfalstran_dm. - strshocks_sdv.v += nvar; //Points to the beginning of the next column of strshockstran_dm. - for (vi=noshocks_iv->n-1; vi>=0; vi--) - strshocks_sdv.v[noshocks_iv->v[vi]] = 0.0; //Set shocks in those equations to be zero. - } - } - - ctfalstran_dm->flag = M_GE; -} - - -//------------------- -// Generating a random sequence of counterfactual (ctfal) paths for _sm (a switching model). -//------------------- -void fn_ctfals_sm(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, const TSivector *Snfores_iv, const TSdcell *Bsdraw_dc, const TSdcell *A0sdrawinv_dc) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: ctflasdrawtran = xprimeminus1*Bsdraw{s} + shocks'*A0sdrawinv{s}. - // ctfalstran_dm: nvar-by-nfores where nfores (=eloc-bloc+1) is the forecast horizon. Conterfactual paths of nvar variables. - // xprimeminus1_dv: updated 1-by-ncoef right-hand-side variables at the end of the forecast horizon, ready for the forecasts at the step nfores+1. - // In the order of [nvar for 1st lag, ..., nvar for last lag, other exogenous terms, const term]. - //Inputs: - // xprimeminus1_dv: 1-by-ncoef vector of right-hand-side variables at the beginning of the forecast horizon. - // bloc: beginning location for the forecast horizon. - // eloc: end location for the forecast horizon. - // strshockstran_dm: nvar-by-T. Matrix transpose of unit-variance (time-invariant) structural shocks. - // Snfores_iv: nfores-by-1 vector of states where each element is less than nStates. - // Bsdraw_dc: nStates cells. For each cell, ncoef-by-nvar reduced-form coefficient matrix. - // A0sdrawinv_dc: nStates cells. For each cell, nvar-by-nvar inverse of contemporaneous coefficient matrix. - int ti, si; - int nfores = eloc - bloc + 1, - nvar = ctfalstran_dm->nrows, - ncoefminusnvar7const = Bsdraw_dc->C[0]->nrows - nvar - 1; - TSdvector ctfals_sdv, strshocks_sdv; - - if (nfores < 1) fn_DisplayError("cstz.c/fn_ctfals_sm(): Number of forecast steps must be greater than 0"); - if (eloc > strshockstran_dm->ncols-1) fn_DisplayError("cstz.c/fn_ctfals_sm(): End location in the forecast horizon must be no greater than the sample size"); - if (nvar != strshockstran_dm->nrows) fn_DisplayError("cstz.c/fn_ctfals_sm(): the number of rows of strshockstran_dm must be equal to nvar"); - - - //******* WARNING: The operation involves ctfals_sdv.v and strshocks_sdv.v throughout this function ******* - //******* is dangerous because of pointer movements. But it gives us efficiency. ******* - ctfals_sdv.n = nvar; - ctfals_sdv.v = ctfalstran_dm->M; //Points to the beginning of the 1st column of ctfalstran_dm. - strshocks_sdv.n = nvar; - strshocks_sdv.flag = V_DEF; - strshocks_sdv.v = strshockstran_dm->M + strshockstran_dm->nrows*bloc; //Points to the beginning of the bloc_th column of strshockstran_dm. - - - for (ti=0; ti<nfores; ti++) { - //Must have a forward recursion. - VectorTimesMatrix(&ctfals_sdv, xprimeminus1_dv, Bsdraw_dc->C[si=Snfores_iv->v[ti]], 1.0, 0.0, 'N'); - VectorTimesMatrix(&ctfals_sdv, &strshocks_sdv, A0sdrawinv_dc->C[si], 1.0, 1.0, 'N'); - //=== Updates the recursion. The order matters. - memmove(xprimeminus1_dv->v+nvar, xprimeminus1_dv->v, ncoefminusnvar7const*sizeof(double)); - memcpy(xprimeminus1_dv->v, ctfals_sdv.v, nvar*sizeof(double)); - //+ - ctfals_sdv.v += nvar; //Points to the beginning of the next column of ctfalstran_dm. - strshocks_sdv.v += nvar; //Points to the beginning of the next column of strshockstran_dm. - } - - ctfalstran_dm->flag = M_GE; -} - -//------------------- -// Generating a random sequence of counterfactual (ctfal) paths with only monetary policy equation changing to a specified regime while holding other equations' regimes the same as historical ones. -//------------------- -void fn_ctfals_policyonly(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, const TSivector *S_Tdraw_iv, const int statecon, const int selej, const TSdcell *A0sdraw_dc, const TSdcell *Apsdraw_dc) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: ctflasdrawtran = xprimeminus1*Bsdraw{s} + shocks'*A0sdrawinv{s}. - // ctfalstran_dm: nvar-by-nfores where nfores (=eloc-bloc+1) is the forecast horizon. Conterfactual paths of nvar variables. - // xprimeminus1_dv: updated 1-by-ncoef right-hand-side variables at the end of the forecast horizon, ready for the forecasts at the step nfores+1. - // In the order of [nvar for 1st lag, ..., nvar for last lag, other exogenous terms, const term]. - //Inputs: - // xprimeminus1_dv: 1-by-ncoef vector of right-hand-side variables at the beginning of the forecast horizon. - // bloc: beginning location for the forecast horizon. - // eloc: end location for the forecast horizon. - // strshockstran_dm: nvar-by-T. Matrix transpose of unit-variance (time-invariant) structural shocks. - // S_Tdraw_iv; fss-by-1 or SampleSize-by-1. Stores (s_t|I_T,theta). - // statecon: the ith state conditioned for counterfactuals (base 0). Must be < nStates. - // selej: location (base 0) of the selected structural equation (e.g., the monetary policy equation). Only for (1) long-run and short-run responses and (2) counterfactuals with only policy equation at specific state imposed. - // A0sdraw_dc: nStates cells. For each cell, nvar-by-nvar contemporaneous coefficient matrix. - // Apsdraw_dc: nStates cells. For each cell, ncoef-by-nvar lagged structural coefficient matrix. - int ti, si; - int errflag = -2, //Initialized to be unsuccessful. When 0, successful. - nfores = eloc - bloc + 1, - nvar = ctfalstran_dm->nrows, - ncoef = Apsdraw_dc->C[0]->nrows, - nStates = Apsdraw_dc->ncells, - ncoefminusnvar7const = ncoef - nvar - 1; - TSdvector ctfals_sdv, strshocks_sdv; - TSivector sact_nfores_siv; - // - TSivector *tf_rnstates_iv = CreateConstantVector_int(nStates, nvar), //nStates-by-1: ncoef for each element for *p*_dc or nvar for each elment for *0*_dc. - *tf_cnstates_iv = CreateConstantVector_int(nStates, nvar); //nStates-by-1: nvar for each element for both *p*_dc and *0*_dc. - TSdcell *tf_A0sinv_dc = NULL; - TSdcell *tf_Aps_dc = NULL, - *tf_Bs_dc = NULL; - - - - if (nfores < 1) fn_DisplayError("cstz.c/fn_ctfals_policyonly(): Number of forecast steps must be greater than 0"); - if (eloc > strshockstran_dm->ncols-1) fn_DisplayError("cstz.c/fn_ctfals_policyonly(): End location in the forecast horizon must be no greater than the sample size"); - if (nvar != strshockstran_dm->nrows) fn_DisplayError("cstz.c/fn_ctfals_policyonly(): the number of rows of strshockstran_dm must be equal to nvar"); - - - //=== Memory allocation. - tf_A0sinv_dc = CreateCell_lf(tf_rnstates_iv, tf_cnstates_iv); //Note rnstates_iv and cnstates_iv are already assigned right values. - //+ - for (si=nStates-1; si>=0; si--) tf_rnstates_iv->v[si] = ncoef; //Note rnstates_iv is already assigned right values. - tf_Aps_dc = CreateCell_lf(tf_rnstates_iv, tf_cnstates_iv); - tf_Bs_dc = CreateCell_lf(tf_rnstates_iv, tf_cnstates_iv); - - - //******* WARNING: The operation involves ctfals_sdv.v and strshocks_sdv.v throughout this function ******* - //******* is dangerous because of pointer movements. But it gives us efficiency. ******* - ctfals_sdv.n = nvar; - ctfals_sdv.v = ctfalstran_dm->M; //Points to the beginning of the 1st column of ctfalstran_dm. - strshocks_sdv.n = nvar; - strshocks_sdv.flag = V_DEF; - strshocks_sdv.v = strshockstran_dm->M + strshockstran_dm->nrows*bloc; //Points to the beginning of the bloc_th column of strshockstran_dm. - //+ - sact_nfores_siv.n = nfores; - sact_nfores_siv.flag = V_DEF; - sact_nfores_siv.v = S_Tdraw_iv->v + bloc; //Points to the beginning of the bloc_th element of S_Tdraw_iv. - - //=== Sticks the policy equation at the statecon_th state to A0s and A0p. - for (si=nStates-1; si>=0; si--) { - CopyMatrix0(tf_A0sinv_dc->C[si], A0sdraw_dc->C[si]); //tf_A0sinv_dc is A0s for a moment. - CopyMatrix0(tf_Aps_dc->C[si], Apsdraw_dc->C[si]); - //=== Sticks the specified regime statecon in the counterfactual period. - CopySubmatrix(tf_A0sinv_dc->C[si], 0, selej, A0sdraw_dc->C[statecon], 0, selej, nvar, 1); - CopySubmatrix(tf_Aps_dc->C[si], 0, selej, Apsdraw_dc->C[statecon], 0, selej, ncoef, 1); - - if ( errflag=BdivA_rgens(tf_Bs_dc->C[si], tf_Aps_dc->C[si], '/', tf_A0sinv_dc->C[si]) ) { - //tf_A0sinv_dc is at this moment tf_A0s_dc. - printf(".../cstz.c/fn_ctfals_policyonly(): tf_Bs_dc->C[si] -- errors when calling BdivA_rgens() with error flag %d", errflag); - exit(EXIT_FAILURE); - } - if ( errflag=invrgen(tf_A0sinv_dc->C[si], tf_A0sinv_dc->C[si]) ) { - printf(".../cstz.c/fn_ctfals_policyonly(): tf_A0sinv_dc->C -- errors when calling invrgen() with error flag %d", errflag); - exit(EXIT_FAILURE); - } - } - - for (ti=0; ti<nfores; ti++) { - //Must have a forward recursion. - VectorTimesMatrix(&ctfals_sdv, xprimeminus1_dv, tf_Bs_dc->C[si=sact_nfores_siv.v[ti]], 1.0, 0.0, 'N'); - VectorTimesMatrix(&ctfals_sdv, &strshocks_sdv, tf_A0sinv_dc->C[si], 1.0, 1.0, 'N'); - //=== Updates the recursion. The order matters. - memmove(xprimeminus1_dv->v+nvar, xprimeminus1_dv->v, ncoefminusnvar7const*sizeof(double)); - memcpy(xprimeminus1_dv->v, ctfals_sdv.v, nvar*sizeof(double)); - //+ - ctfals_sdv.v += nvar; //Points to the beginning of the next column of ctfalstran_dm. - strshocks_sdv.v += nvar; //Points to the beginning of the next column of strshockstran_dm. - } - - ctfalstran_dm->flag = M_GE; - - //=== Destroys memory allocated for this function. - tf_rnstates_iv = DestroyVector_int(tf_rnstates_iv); - tf_cnstates_iv = DestroyVector_int(tf_cnstates_iv); - tf_A0sinv_dc = DestroyCell_lf(tf_A0sinv_dc); - tf_Aps_dc = DestroyCell_lf(tf_Aps_dc); - tf_Bs_dc = DestroyCell_lf(tf_Bs_dc); -} - - -#if defined (INTELCMATHLIBRARY) -void fn_impulse(TSdmatrix *imftran_dm, const TSdmatrix *Bh_dm, const TSdmatrix *swishtran_dm, const int nlags, const int imsteps) -{ - //Outputs (memory allocated already): - // imftran_dm: nvar^2-by-imsteps where imf_dm (imsteps-by-nvar^2) is in the same format as in RATS. - // Rows: nvar responses to the 1st shock, ..., nvar responses to the last shock. - // Columns: steps of impulse responses. - //Inputs: - // Bh_dm: ldbh-by-nvar reduced-form coefficient matrix (where ldbh is the leading dimension of Bh_dm and must be at least nvar*nlags) of the form: - // Y(T*nvar) = X*Bh_dm + U, X: T*ldbh(ldbh may include all exogenous terms). Note that columns corresponding equations. - // Columns of Bh_dm: nvar variables for the 1st lag, ..., nvariables for the last lag + (possible exogenous terms) + const = ldbh. - // swishtran_dm: transponse of nvar-by-nvar inv(A0) in the structural model y(t)A0 = e(t). - // nlags: lag length (number of lags); - // imsteps: steps for impulse responses. - - int i, j, - nvar, nvar2, ldbh, jmax; - double *Bh, *imftran; - - if (!imftran_dm) fn_DisplayError(".../fn_impulse(): the output impulse matrix imftran_dm must be created (memory-allocated)"); - else if (!Bh_dm || !swishtran_dm) fn_DisplayError(".../fn_impulse(): the input matrices Bh_dm and swich_dm must be created (memory-allocated)"); - else if (!Bh_dm->flag || !swishtran_dm->flag) fn_DisplayError(".../fn_impulse(): the input matrices Bh_dm and swich_dm must be given legal values"); - else if (nlags < 1) fn_DisplayError(".../fn_impulse(): the lag length, nlags, must be equal to or greater than 1"); - else if (imsteps <1) fn_DisplayError(".../fn_impulse(): the number of steps for impulse responses, imsteps, must be must be equal to or greater than 1"); - else if ((nvar = swishtran_dm->nrows) != swishtran_dm->ncols ) fn_DisplayError(".../fn_impulse(): the input matrix, swishtran_dm, must be square"); - else if (nvar != Bh_dm->ncols) fn_DisplayError(".../fn_impulse(): the number of columns in Bh_dm must equal to the number of equations or endogenous variables"); - else if (square(nvar) != imftran_dm->nrows || imsteps != imftran_dm->ncols) fn_DisplayError(".../fn_impulse(): Dimension of impulse matrix input matrix imftran_dm is incompatible with other input matrices or with the number of steps"); - - //if ( !(imftran_dm->flag & M_CN) && imftran_dm[0] !=0.0 ) InitializeConstantMatrix_lf(imftran_dm, 0.0); - InitializeConstantMatrix_lf(imftran_dm, 0.0); //Cumulative. Always initialize it to zero. - - - nvar2 = square(nvar); - Bh = Bh_dm->M; - imftran = imftran_dm->M; - - - if ((ldbh=Bh_dm->nrows) < nvar*nlags) fn_DisplayError("Input matrix Bh_dm must have at least nvar*nlags rows"); - cblas_dcopy(nvar2, swishtran_dm->M, 1, imftran, 1); - for (i=1; i<imsteps; i++) { - jmax = i<nlags?i:nlags; - for (j=0; j<jmax; j++) { - cblas_dgemm(CblasColMajor, CblasTrans, CblasNoTrans, nvar, nvar, nvar, - 1.0, &Bh[j*nvar], ldbh, &imftran[(i-j-1)*nvar2], nvar, - 1.0, &imftran[i*nvar2], nvar); - } - } - - - imftran_dm->flag = M_GE; -} -#else -//No default routine yet. 7 Oct 2003 -#endif - - -TSdmatrix *tz_impulse2levels(TSdmatrix *imflev_dm, TSdmatrix *imf_dm, TSivector *vlist2levels_iv) -{ - //Converting imf_dm to the level impulse responses imflev_dm according to vlist2levels_iv. - //If imflev_dm = imf_dm, then the value of imf_dm will be replaced by the new value. - // - //imf_dm; nsteps-by-nvar^2 where - // rows: steps of impulse responses; - // columns: nvar responses to the 1st shock, ..., nvar responses to the last shock. - //vlist2levels_iv; must be in ascending order. A list of base-0 variables to be converted to levels. Example: [0 1 3] - int _i, _j, _t; - int largestvar; //last variable corresponding to the largest number. - int _n, nsq, imsteps; - TSdvector imf_sdv; - TSdvector imflev_sdv; - - if (!imf_dm || !imf_dm->flag) - fn_DisplayError(".../cstz.c/tz_impulse2levels(): the input matrix imf_dm must be (1) allocated memory and (2) given legal values"); - - if (!imflev_dm) { - imflev_dm = CreateMatrix_lf(imf_dm->nrows, imf_dm->ncols); - imflev_dm->flag = M_GE; //Legal values will be given below. - } - else if (imflev_dm != imf_dm ) - if ( (imflev_dm->nrows != imf_dm->nrows) || (imflev_dm->ncols != imf_dm->ncols)) - fn_DisplayError(".../cstz.c/tz_impulse2levels(): dimensions of the input matrix imf_dm and the output matrix imflev_dm must match exactly"); - else imflev_dm->flag = M_GE; //Legal values will be given below. - - largestvar = vlist2levels_iv->v[vlist2levels_iv->n-1]+1; - _n = (int)floor(sqrt(imf_dm->ncols)+0.5); - nsq = imf_dm->ncols; - if ( square(largestvar) > nsq) - fn_DisplayError(".../cstz.c/tz_impulse2levels(): the last specified variable in vlist2levels_iv is out of the range of impulse responses"); - - - imflev_sdv.n = imf_sdv.n = imf_dm->nrows; - imflev_sdv.flag = imf_sdv.flag = V_DEF; //Legal values will be given below. - imsteps = imf_dm->nrows; - for (_i=vlist2levels_iv->n-1; _i>=0; _i--) - for (_j=vlist2levels_iv->v[_i]; _j<nsq; _j += _n) { - imflev_sdv.v = imflev_dm->M + _j*imsteps; - imf_sdv.v = imf_dm->M + _j*imsteps; - imflev_sdv.v[0] = imf_sdv.v[0]; - for (_t=1; _t<imsteps; _t++) - imflev_sdv.v[_t] = imflev_sdv.v[_t-1] + imf_sdv.v[_t]; - } - - return (imflev_dm); -} - - -void DynamicResponsesForStructuralEquation(TSdmatrix *Resps_dm, const int loclv, const int nlags, const TSdvector *a0p_dv) -{ - //Outputs: - // Resps_dm: k-by-nvar where k responses of the loclv_th variable to the _ith variable for _i=1:nvar. - // The loclv_th column of Resps_dm is meaningless but as a debug check should be close to -1 for the kth responses as k->\infty. - //Inputs: - // loclv: loction of the left-hand variable either in difference (growth) or level. - // nlags: number of lags. - // a0p_dv: m-by-1 vector of [a0 a+] either in difference (growth) or level for the strctural equation considered where m>= (nlags+1)*nvar because m may - // include the constant term. Note a0 is on the left hand side of the equation and a+ is on the right hand side of the equation. - int vi, li; - int nvar, K; - double tmpdsum, c0, a0inv; - TSdvector resps_sdv; //k-by-1. - //---- - TSdvector *a1_dv = NULL; //nlags-by-1. - - if (!Resps_dm || !a0p_dv || !a0p_dv->flag) fn_DisplayError(".../cstz/DynamicResponsesForStructuralEquation(): (1) both input vector and output matrix must be allocated memory; (2) the input vector must have legal values"); - if (a0p_dv->n < (nlags+1)*(nvar=Resps_dm->ncols)) fn_DisplayError(".../cstz/DynamicResponsesForStructuralEquation(): the length of the input vector must be at least (nvar+1)*nlags"); - if (loclv >= nvar || loclv < 0) fn_DisplayError(".../cstz/DynamicResponsesForStructuralEquation(): the location for the left-hand-side variable must be between 0 and number of variables-1, inclusive"); - a1_dv = CreateVector_lf(nlags); - a1_dv->flag = V_DEF; //which will be given legal values below. - - resps_sdv.n = K = Resps_dm->nrows; - resps_sdv.flag = V_UNDEF; - - a0inv = 1.0/a0p_dv->v[loclv]; - for (li=nlags; li>=1; li--) //Note li=1; li<=nlags, NOT li=0; li<nlags. - a1_dv->v[li-1] = a0p_dv->v[loclv+nvar*li]*a0inv; - //Constructing the lagged coefficients for the loclv_th variable. - for (vi=nvar-1; vi>=0; vi--) { - //=== Constructing the constant term. - tmpdsum = - a0p_dv->v[vi]; //Assigned to -a_0. - for (li=nlags; li>=1; li--) //Note li=1; li<=nlags, NOT li=0; li<nlags. - tmpdsum += a0p_dv->v[vi+nvar*li]; - c0 = tmpdsum*a0inv; - //Done with t* array. - - //=== Getting dynamic responses to the vi_th variable. - resps_sdv.v = Resps_dm->M + vi*K; - DynamicResponsesAR(&resps_sdv, c0, a1_dv); - } - Resps_dm->flag = M_GE; - - - //=== Destroys memory allocated for this function only. - a1_dv = DestroyVector_lf(a1_dv); -} - - - -void DynamicResponsesAR(TSdvector *resps_dv, const double c0, const TSdvector *a1_dv) -{ - //Outputs: - // resps_dv: k-by-1 where k responses r_{t+1} to r_{t+k} are computed from r_{t+1} = c0 + a1'*[r_t; ...; r_{t-nlags+1}]. - //Inputs: - // c0: constant term. - // a1_dv: nlags-by-1 vector of coefficients in the AR process. - int ti; - int k, nlags; - double *rv; - TSdvector *rlags_dv = NULL; - - if (!resps_dv || !a1_dv || !a1_dv->flag) fn_DisplayError(".../cstz/DynamicResponsesAR(): (1) both input and output vectors must be allocated memory; (2) the input vector must have legal values"); - rlags_dv = CreateConstantVector_lf(nlags=a1_dv->n, 0.0); - - rv = resps_dv->v; - k = resps_dv->n; - - *(rlags_dv->v) = *rv = c0; - - - for (ti=1; ti<k; ti++) { - //Note ti=1, NOT ti=0. - rv[ti] = c0 + VectorDotVector((TSdvector *)a1_dv, rlags_dv); - //=== Updating rlags_dv. - memmove(rlags_dv->v+1, rlags_dv->v, (nlags-1)*sizeof(double)); - *(rlags_dv->v) = rv[ti]; - } - resps_dv->flag = V_DEF; - - //=== Destroys memory allocated for this function only. - rlags_dv = DestroyVector_lf(rlags_dv); -} - - - - - -//---------------------------- Some regular vector or matrix operations --------------------- -double MinVector_lf(TSdvector *x_dv) { - //Input: no change for x_dv in this function. - int _i, n; - double minvalue; - double *v; - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/MinVector_lf(): Input vector x_dv must be (1) allocated memory and (2) assigned legal values"); - n = x_dv->n; - v = x_dv->v; - - minvalue = v[0]; - for (_i=n-1; _i>0; _i--) - if (v[_i]<minvalue) minvalue = v[_i]; - - return( minvalue ); -} - -TSdvector *ConvertVector2exp(TSdvector *y_dv, TSdvector *x_dv) -{ - //y=exp(x): output vector. If NULL, y will be created and memory-allocated. - //x: input vector. - TSdvector *z_dv=NULL; - #if !defined (INTELCMATHLIBRARY) - int _i; - #endif - - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/ConvertVector2exp(): input vector must be (1) created and (2) given legal values"); - - #if defined (INTELCMATHLIBRARY) - - if (!y_dv) - { - z_dv = CreateVector_lf(x_dv->n); - vdExp(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - return (z_dv); - } - else if (x_dv!=y_dv) - { - vdExp(x_dv->n, x_dv->v, y_dv->v); - y_dv->flag = V_DEF; - return (y_dv); - } - else - { - z_dv = CreateVector_lf(x_dv->n); - vdExp(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - CopyVector0(x_dv, z_dv); - DestroyVector_lf(z_dv); - return (x_dv); - } - - #else - - if (!y_dv) z_dv = CreateVector_lf(x_dv->n); - else z_dv = y_dv; - for (_i=x_dv->n-1; _i>=0; _i--) z_dv->v[_i] = exp(x_dv->v[_i]); - z_dv->flag = V_DEF; - return (z_dv); - - #endif -} -//--- -TSdvector *ConvertVector2log(TSdvector *y_dv, TSdvector *x_dv) -{ - //y=log(x): output vector. If NULL, y will be created and memory-allocated. - //x: input vector. - TSdvector *z_dv=NULL; - #if !defined (INTELCMATHLIBRARY) - int _i; - #endif - - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/ConvertVector2exp(): input vector must be (1) created and (2) given legal values"); - - #if defined (INTELCMATHLIBRARY) - - if (!y_dv) - { - z_dv = CreateVector_lf(x_dv->n); - vdLn(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - return (z_dv); - } - else if (x_dv!=y_dv) - { - vdLn(x_dv->n, x_dv->v, y_dv->v); - y_dv->flag = V_DEF; - return (y_dv); - } - else - { - z_dv = CreateVector_lf(x_dv->n); - vdLn(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - CopyVector0(x_dv, z_dv); - DestroyVector_lf(z_dv); - return (x_dv); - } - - #else - - if (!y_dv) z_dv = CreateVector_lf(x_dv->n); - else z_dv = y_dv; - for (_i=x_dv->n-1; _i>=0; _i--) z_dv->v[_i] = log(x_dv->v[_i]); - z_dv->flag = V_DEF; - return (z_dv); - - #endif -} - -double tz_normofvector(TSdvector *x_dv, double p) -{ - double norm = 0.0; - int ki, _n; - double *v; - - if ( !x_dv || !x_dv->flag ) fn_DisplayError("/cstz.c/tz_normofvector(): Input x_dv must have (1) memory and (2) legal values"); - if (p<1.0) fn_DisplayError("/cstz.c/tz_normofvector(): The input p must be no less than 1.0"); - _n = x_dv->n; - v = x_dv->v; - - if (p==2.0) - { - for (ki=_n-1; ki>=0; ki--) norm += v[ki]*v[ki]; - norm = sqrt(norm); - } - else - { - printf("\n/cstz.c/tz_normofvector(): HELLO I TRICK YOU and YOU MUST DO fabs(p-2.0)<MICHINEZERO!!!!!!\n"); //???? - if (p==1.0) - for (ki=_n-1; ki>=0; ki--) norm += fabs(v[ki]); - else - { - for (ki=_n-1; ki>=0; ki--) norm += pow(fabs(v[ki]), p); - norm = pow(norm, 1.0/p); - } - } - - return (norm); -} - - - -//---------------------------- Not used often --------------------- -void fn_cumsum(double **aos_v, int *aods_v, double *v, int d_v) { - // Compute a cumulative sum of a vector. - // - // v: an n-by-1 vector. - // d_v: n -- size of the vector v to be used for a cumulative sum. - // aos_v: address of the pointer to the n-by-1 vector s_v. - // aods_v: address of the size of the dimension of s_v. - //---------- - // *aos_v: An n-by-1 vector of cumulative sum s_v. - // *aods_v: n -- size of the dimension for s_v. - - int ki; - - *aos_v = tzMalloc(d_v, double); - (*aods_v) = d_v; // n for the n-by-1 vector s_v. - *(*aos_v) = *v; - if (d_v>1) { - for (ki=1; ki<d_v; ki++) (*aos_v)[ki] = (*aos_v)[ki-1] + v[ki]; - } -} - - - -/** -void fn_ergodp(double **aop, int *aod, mxArray *cp) { - // Compute the ergodic probabilities. See Hamilton p.681. - // - // cp: n-by-n Markovian transition matrix. - // aop: address of the pointer to the n-by-1 vector p. - // aod: address of the size of the dimension of p. - //---------- - // *aop: n-by-1 vector of ergodic probabilities p. @@Must be freed outside this function.@@ - // *aod: n -- size of the dimension for p (automatically supplied within this function). - - mxArray *gpim=NULL, *gpid=NULL; // m: n-by-n eigvector matrix; d: n-by-n eigvalue diagonal. - double *gpim_p, *gpid_p; // _p: a pointer to the corresponding mxArray whose name occurs before _p. - //------- Note the following two lines will cause Matlab or C to crash because gpim has not been initialized so it points to garbage. - // double *gpim_p = mxGetPr(gpim); - // double *gpid_p = mxGetPr(gpid); - int eigmaxindx, // Index of the column corresponding to the max eigenvalue. - n, ki; - double gpisum=0.0, - eigmax, tmpd0; - - n=mxGetM(cp); // Get n for the n-by-n mxArray cp. - (*aod)=n; - - *aop = tzMalloc(n, double); - - gpim = mlfEig(&gpid,cp,NULL,NULL); - gpim_p = mxGetPr(gpim); - gpid_p = mxGetPr(gpid); - - eigmax = *gpid_p; - eigmaxindx = 0; - if (n>1) { - for (ki=1;ki<n;ki++) { - if (gpid_p[n*ki+ki] > eigmax) { - eigmax=gpid_p[n*ki+ki]; - eigmaxindx=ki; - } // Note that n*ki+ki refers to a diagonal location in the n-by-n matrix. - } - } - for (ki=0;ki<n;ki++) { - gpisum += gpim_p[n*eigmaxindx+ki]; // Sum over the eigmaxindx_th column. - } - tmpd0 = 1.0/gpisum; - for (ki=0;ki<n;ki++) { - (*aop)[ki] = gpim_p[n*eigmaxindx+ki]*tmpd0; // Normalized eigmaxindx_th column as ergodic probabilities. - } - - mxDestroyArray(gpim); // ????? free(gpim_p) - mxDestroyArray(gpid); -} -/**/ - - - -//---------- Must keep the following code forever. --------------- -/** -TSdp2m5 *CreateP2m5(const double p) -{ - TSdp2m5 *x_dp2m5 = tzMalloc(1, TSdp2m5); - - if (p<=0.0 && p>=1.0) fn_DisplayError(".../cstz.c/CreateP2m5_lf(): input probability p must be between 0.0 and 1.0"); - - x_dp2m5->cnt = 0; - x_dp2m5->ndeg = 0; - x_dp2m5->p = tzMalloc(5, double); - x_dp2m5->q = tzMalloc(5, double); - x_dp2m5->m = tzMalloc(5, int); - - x_dp2m5->p[0] = 0.00; - x_dp2m5->p[1] = 0.5*p; - x_dp2m5->p[2] = p; - x_dp2m5->p[3] = 0.5*(1.0+p); - x_dp2m5->p[4] = 1.00; - - return (x_dp2m5); -} -TSdp2m5 *DestroyP2m5(TSdp2m5 *x_dp2m5) -{ - if (x_dp2m5) { - free(x_dp2m5->m); - free(x_dp2m5->q); - free(x_dp2m5->p); - - free(x_dp2m5); - return ((TSdp2m5 *)NULL); - } - else return (x_dp2m5); -} -TSdvectorp2m5 *CreateVectorP2m5(const int n, const double p) -{ - int _i; - // - TSdvectorp2m5 *x_dvp2m5 = tzMalloc(1, TSdvectorp2m5); - - x_dvp2m5->n = n; - x_dvp2m5->v = tzMalloc(n, TSdp2m5 *); - for (_i=n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = CreateP2m5(p); - - return (x_dvp2m5); -} -TSdvectorp2m5 *DestroyVectorP2m5(TSdvectorp2m5 *x_dvp2m5) -{ - int _i; - - if (x_dvp2m5) { - for (_i=x_dvp2m5->n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = DestroyP2m5(x_dvp2m5->v[_i]); - free(x_dvp2m5->v); - - free(x_dvp2m5); - return ((TSdvectorp2m5 *)NULL); - } - return (x_dvp2m5); -} -TSdmatrixp2m5 *CreateMatrixP2m5(const int nrows, const int ncols, const double p) -{ - int _i; - // - TSdmatrixp2m5 *X_dmp2m5 = tzMalloc(1, TSdmatrixp2m5); - - X_dmp2m5->nrows = nrows; - X_dmp2m5->ncols = ncols; - X_dmp2m5->M = tzMalloc(nrows*ncols, TSdp2m5 *); - for (_i=nrows*ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = CreateP2m5(p); - - return (X_dmp2m5); -} -TSdmatrixp2m5 *DestroyMatrixP2m5(TSdmatrixp2m5 *X_dmp2m5) -{ - int _i; - - if (X_dmp2m5) { - for (_i=X_dmp2m5->nrows*X_dmp2m5->ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = DestroyP2m5(X_dmp2m5->M[_i]); - free(X_dmp2m5->M); - - free(X_dmp2m5); - return ((TSdmatrixp2m5 *)NULL); - } - else return (X_dmp2m5); -} -TSdcellp2m5 *CreateCellP2m5(const TSivector *rows_iv, const TSivector *cols_iv, const double p) -{ - int _i; - int ncells; - // - TSdcellp2m5 *X_dcp2m5 = tzMalloc(1, TSdcellp2m5); - - - if (!rows_iv || !cols_iv || !rows_iv->flag || !cols_iv->flag) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Input row and column vectors must be (1) created and (2) assigned legal values"); - if ((ncells=rows_iv->n) != cols_iv->n) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Length of rows_iv must be the same as that of cols_iv"); - - - X_dcp2m5->ncells = ncells; - X_dcp2m5->C = tzMalloc(ncells, TSdmatrixp2m5 *); - for (_i=ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = CreateMatrixP2m5(rows_iv->v[_i], cols_iv->v[_i], p); - - return (X_dcp2m5); -} -TSdcellp2m5 *DestroyCellP2m5(TSdcellp2m5 *X_dcp2m5) -{ - int _i; - - if (X_dcp2m5) { - for (_i=X_dcp2m5->ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = DestroyMatrixP2m5(X_dcp2m5->C[_i]); - free(X_dcp2m5->C); - - free(X_dcp2m5); - return ((TSdcellp2m5 *)NULL); - } - else return (X_dcp2m5); -} - - -#define P2REALBOUND DBL_MAX -int P2m5Update(TSdp2m5 *x_dp2m5, const double newval) -{ - //5-marker P2 algorithm. - //quantiles q[0] to q[4] correspond to 5-marker probabilities {0.0, p/5, p, (1+p)/5, 1.0}. - //Outputs: - // x_dp2m5->q, the markers x_dp2m5->m, is updated and only x_dp2m5->q[2] is used. - //Inputs: - // newval: new random number. - // - // January 2003. - int k, j; - double a; - double qm, dq; - int i, dm, dn; - - - if (!x_dp2m5) fn_DisplayError(".../cstz.c/P2m5Update(): x_dp2m5 must be created"); - - //if (isgreater(newval, -P2REALBOUND) && isless(newval, P2REALBOUND)) { - if (isfinite(newval) && newval > -P2REALBOUND && newval < P2REALBOUND) { - if (++x_dp2m5->cnt > 5) { - //Updating the quantiles and markers. - for (i=0; x_dp2m5->q[i]<=newval && i<5; i++) ; - if (i==0) { x_dp2m5->q[0]=newval; i++; } - if (i==5) { x_dp2m5->q[4]=newval; i--; } - for (; i<5; i++) x_dp2m5->m[i]++; - for (i=1; i<4; i++) { - dq = x_dp2m5->p[i]*x_dp2m5->m[4]; - if (x_dp2m5->m[i]+1<=dq && (dm=x_dp2m5->m[i+1]-x_dp2m5->m[i])>1) { - dn = x_dp2m5->m[i]-x_dp2m5->m[i-1]; - dq = ((dn+1)*(qm=x_dp2m5->q[i+1]-x_dp2m5->q[i])/dm+ - (dm-1)*(x_dp2m5->q[i]-x_dp2m5->q[i-1])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] += dq; - x_dp2m5->m[i]++; - } else - if (x_dp2m5->m[i]-1>=dq && (dm=x_dp2m5->m[i]-x_dp2m5->m[i-1])>1) { - dn = x_dp2m5->m[i+1]-x_dp2m5->m[i]; - dq = ((dn+1)*(qm=x_dp2m5->q[i]-x_dp2m5->q[i-1])/dm+ - (dm-1)*(x_dp2m5->q[i+1]-x_dp2m5->q[i])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] -= dq; - x_dp2m5->m[i]--; - } - } - } - else if (x_dp2m5->cnt < 5) { - //Fills the initial values. - x_dp2m5->q[x_dp2m5->cnt-1] = newval; - x_dp2m5->m[x_dp2m5->cnt-1] = x_dp2m5->cnt-1; - } - else { - //=== Last filling of initial values. - x_dp2m5->q[4] = newval; - x_dp2m5->m[4] = 4; - //=== P2 algorithm begins with reshuffling quantiles and makers. - for (j=1; j<5; j++) { - a = x_dp2m5->q[j]; - for (k=j-1; k>=0 && x_dp2m5->q[k]>a; k--) - x_dp2m5->q[k+1] = x_dp2m5->q[k]; - x_dp2m5->q[k+1]=a; - } - } - } - else ++x_dp2m5->ndeg; //Throwing away the draws to treat exceptions. - - return (x_dp2m5->cnt); -} -#undef P2REALBOUND - -void P2m5MatrixUpdate(TSdmatrixp2m5 *X_dmp2m5, const TSdmatrix *newval_dm) -{ - int _i; - int nrows, ncols; - - if (!X_dmp2m5 || !newval_dm || !newval_dm->flag) fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): (1) Matrix struct X_dmp2m5 must be created and (2) input new value matrix must be crated and given legal values"); - if ((nrows=newval_dm->nrows) != X_dmp2m5->nrows || (ncols=newval_dm->ncols) != X_dmp2m5->ncols) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of rows and colums in X_dmp2m5 must match those of newval_dm"); - - for (_i=nrows*ncols-1; _i>=0; _i--) - P2m5Update(X_dmp2m5->M[_i], newval_dm->M[_i]); -} - -void P2m5CellUpdate(TSdcellp2m5 *X_dcp2m5, const TSdcell *newval_dc) -{ - int _i; - int ncells; - - if (!X_dcp2m5 || !newval_dc) fn_DisplayError(".../cstz.c/P2m5CellUpdate(): (1) Cell struct X_dcp2m5 must be created and (2) input new value cell must be crated and given legal values"); - if ((ncells=newval_dc->ncells) != X_dcp2m5->ncells) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of cells in X_dcp2m5 must match that of newval_dc"); - - for (_i=ncells-1-1; _i>=0; _i--) - P2m5MatrixUpdate(X_dcp2m5->C[_i], newval_dc->C[_i]); -} -/**/ diff --git a/CFiles/cstz.h b/CFiles/cstz.h deleted file mode 100644 index c99c29ede23a04b3e343c113e0663566582c17b3..0000000000000000000000000000000000000000 --- a/CFiles/cstz.h +++ /dev/null @@ -1,199 +0,0 @@ -#ifndef __CSTZ_H__ -#define __CSTZ_H__ - #include "tzmatlab.h" - #include "dw_switch_opt.h" //DW's Markov-switching routines, only used by gradcd_timet() and ComputeCovarianceFromOuterProduct(). - - - typedef struct { - double bound; //Real bounds to avoid extreme values that may make the P2 algorithm fail. - double *p; //5-by-1 probabilities as {0.0, p/2, p, (1+p)/2, 1.0}. - double *q; //5-by-1 quantiles. Only q[2] is used as an estimate of p[2]-quantile or p-quantile. - int *m; //5-by-1 markers. - int cnt; - int ndeg; //Number of exceptions such as degenerate numbers like inf. - } TSdp2m5; - typedef struct { - TSdp2m5 **v; - int n; - } TSdvectorp2m5; - typedef struct { - TSdp2m5 **M; - int nrows; - int ncols; - } TSdmatrixp2m5; - typedef struct { - TSdmatrixp2m5 **C; - int ncells; - } TSdcellp2m5; - typedef struct { - TSdcellp2m5 **F; - int ndims; - } TSdfourthp2m5; - TSdp2m5 *CreateP2m5(const double p, const double bound); - TSdp2m5 *DestroyP2m5(TSdp2m5 *x_dp2m5); - TSdvectorp2m5 *CreateVectorP2m5(const int n, const double p, const double bound); - TSdvectorp2m5 *DestroyVectorP2m5(TSdvectorp2m5 *x_dvp2m5); - TSdmatrixp2m5 *CreateMatrixP2m5(const int nrows, const int ncols, const double p, const double bound); - TSdmatrixp2m5 *DestroyMatrixP2m5(TSdmatrixp2m5 *X_dmp2m5); - TSdcellp2m5 *CreateCellP2m5(const TSivector *rows_iv, const TSivector *cols_iv, const double p, const double bound); - TSdcellp2m5 *DestroyCellP2m5(TSdcellp2m5 *X_dcp2m5); - TSdfourthp2m5 *CreateFourthP2m5(const int ndims, const TSivector *rows_iv, const TSivector *cols_iv, const double p, const double bound); - TSdfourthp2m5 *DestroyFourthP2m5(TSdfourthp2m5 *X_d4p2m5); - // - int P2m5Update(TSdp2m5 *x_dp2m5, const double newval); - void P2m5VectorUpdate(TSdvectorp2m5 *x_dvp2m5, const TSdvector *newval_dv); - void P2m5MatrixUpdate(TSdmatrixp2m5 *X_dmp2m5, const TSdmatrix *newval_dm); - void P2m5CellUpdate(TSdcellp2m5 *X_dcp2m5, const TSdcell *newval_dc); - void P2m5FourthUpdate(TSdfourthp2m5 *X_d4p2m5, const TSdfourth *newval_d4); - - - #if defined ( CSMINWEL_OPTIMIZATION ) - void fn_gradcd(double *g, double *x, int n, double grdh, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims); - - void fn_hesscd(double *H, double *x, int n, double grdh, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims); - #elif defined ( IMSL_OPTIMIZATION ) - void fn_gradcd(double *g, double *x, int n, double grdh, - double fcn(int n, double *x)); - void fn_hesscd(double *H, double *x, int n, double grdh, - double fcn(int n, double *x)); - #endif - - //=== For the conjugate gradient method I or II - void gradcd_gen(double *g, double *x, int n, double (*fcn)(double *x, int n), double *grdh, double f0); - void gradfd_gen(double *g, double *x, int n, double (*fcn)(double *x, int n), double *grdh, double f0); - - //=== For computing inverse Hessian. - void gradcd_timet(TSdvector *g_dv, TSdvector *x_dv, int t, struct TStateModel_tag *smodel_ps, double (*fcn)(double *x, int t, struct TStateModel_tag *smodel_ps), double grdh, double f0); - TSdmatrix *ComputeHessianFromOuterProduct(TSdmatrix *Hessian_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv); - TSdmatrix *ComputeCovarianceFromOuterProduct(TSdmatrix *Omega_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv); - - - - - int next_permutation(int *first, int *last); - - //void fn_ergodp(double **aop, int *aod, mxArray *cp); - void fn_cumsum(double **aos_v, int *aods_v, double *v, int d_v); - int fn_cumsum_int(int *x_v, const int d_x_v); - double fn_cumsum_lf(double *x_v, const int d_x_v); - double fn_mean(const double *a_v, const int _n); - - - //=== For sorting according to x_dv. - void tz_sort(TSdvector *x_dv, char ad); - void tz_sortindex_lf(TSivector *x_iv, TSdvector *base_dv, char ad); - void tz_sortindex(TSivector *x_iv, TSvoidvector *base_voidv, char ad); //??????Not fully tested yet. - //+ - void tz_sort_matrix(TSdmatrix *X_dm, char ad, char rc); - TSdvector *tz_prctile_matrix(TSdvector *z_dv, const double prc, TSdmatrix *Z_dm, const char rc); - TSdvector *tz_mean_matrix(TSdvector *z_dv, TSdmatrix *Z_dm, const char rc); - //--- The following 3 functions should be hided (static) but are made visible to accomodate the old code that uses these functions. - void fn_SetBaseArrayForComp(TSdvector *x_dv); - int fn_compare(const void *i1, const void *i2); - int fn_compare2(const void *i1, const void *i2); - - - //=== Normalization for VARs. - void fn_wznormalization(TSdvector *wznmlz_dv, TSdmatrix *A0draw_dm, TSdmatrix *A0peak_dm); - - //=== Handling under or over flows with log values. - typedef struct TSveclogsum_tag { - //For a recurisve algorithm to compute the log of sum (and therefore log of mean). See p.81a and p.105 in TVBAR Notes. - int n; //Number of sums, which is the dimension for N_iv, Ysum_dv, and ymax_dv. - TSivector *N_iv; //(N_1, ..., N_n). - TSdvector *logsum_dv, //(logofsum_1, ..., logofsum_n). - *logmax_dv; //(logmax_1, ..., logmax_n). - } TSveclogsum; - struct TSveclogsum_tag *CreateVeclogsum(int n); - struct TSveclogsum_tag *DestroyVeclogsum(struct TSveclogsum_tag *); - // - void UpdateSumFor1st2ndMoments(TSdvector *x1stsum_dv, TSdmatrix *X2ndsum_dm, const TSdvector *xdraw_dv); - int tz_update_logofsum(double *Y_N_dp, double *y_Nmax_dp, double ynew, int N); - int fn_update_logofsum(int N, double ynew, double *Y_N_dp, double *y_Nmax_dp); - double fn_replace_logofsumsbt(double *yold, double _a, double ynew, double _b); - - - - //---------------------------- Special functions and densities. --------------------- - double fn_normalcdf(double x); - double fn_normalinv(double p); //Inverse of normal cdf. - double fn_chi2inv(double p, double df); - //p = int_{0}^{\infty} chi2pdf(t, df) dt - double fn_betainv(double p, double _alpha, double _beta); - //p = int_{0}^{\infty} betapdf(t, _alpha, _beta) dt where betapdf(t,_alpha,_beta) \propt t^{_alpha-1}*(1-t)^(_beta-1}. - double fn_gammalog(double x); - //log gamma (x) where gamma(n+1) = n! and gamma(x) = int_0^{\infty} e^{-t} t^{x-1} dt. - double fn_betalog(double x, double y); - //log beta(x, y) where beta(x, y) = gamma(x)*gamm(y)/gamma(x+y). - //+ Density functions - double tz_lognormalpdf(double _x, double _m, double _s); - double tz_logbetapdf(double _x, double _a, double _b); - double tz_loggammapdf(double _x, double _a, double _b); - double tz_loginversegammapdf(double _x, double _a, double _b); - - - //---------------------------- Some high-level VAR functions --------------------- - void fn_lev2growthanual(TSdmatrix *levgro_dm, const TSdmatrix *levgrominus1_dm, const TSivector *indxlogper_iv); - void fn_ctfals_givenshocks_sm(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, - const TSivector *S_Tdraw_iv, const TSdcell *Bsdraw_dc, const TSdcell *A0sdrawinv_dc, const TSivector *noshocks_iv); - void fn_ctfals_sm(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, const TSivector *Snfores_iv, const TSdcell *Bsdraw_dc, const TSdcell *A0sdrawinv_dc); - void fn_ctfals_policyonly(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, const TSivector *S_Tdraw_iv, const int statecon, const int selej, const TSdcell *A0sdraw_dc, const TSdcell *Apsdraw_dc); - void fn_impulse(TSdmatrix *imftran_dm, const TSdmatrix *Bh_dm, const TSdmatrix *swishtran_dm, const int nlags, const int imsteps); - TSdmatrix *tz_impulse2levels(TSdmatrix *imflev_dm, TSdmatrix *imf_dm, TSivector *vlist2levels_iv); - // - void DynamicResponsesAR(TSdvector *resps_dv, const double c0, const TSdvector *a1_dv); - void DynamicResponsesForStructuralEquation(TSdmatrix *Resps_dm, const int loclv, const int nlags, const TSdvector *a0p_dv); - - - - //---------------------------- Some regular vector or matrix operations --------------------- - double MinVector_lf(TSdvector *x_dv); - TSdvector *ConvertVector2exp(TSdvector *y_dv, TSdvector *x_dv); //y=exp(x): output; x: input. - TSdvector *ConvertVector2log(TSdvector *y_dv, TSdvector *x_dv); //y=log(x): output; x: input. - double tz_normofvector(TSdvector *x_dv, double p); - - - //---------------------------- Old Interface --------------------- - double gammalog(double x); - //log gamma (x) where gamma(n+1) = n! and gamma(x) = int_0^{\infty} e^{-t} t^{x-1} dt. - - - - - //----------- Must keep the following forever. ------------- - /** - typedef struct { - double *p; //5-by-1 probabilities as {0.0, p/2, p, (1+p)/2, 1.0}. - double *q; //5-by-1 quantiles. Only q[2] is used as an estimate of p[2]-quantile or p-quantile. - int *m; //5-by-1 markers. - int cnt; - int ndeg; //Number of exceptions such as degenerate numbers like inf. - } TSdp2m5; - typedef struct { - TSdp2m5 **v; - int n; - } TSdvectorp2m5; - typedef struct { - TSdp2m5 **M; - int nrows; - int ncols; - } TSdmatrixp2m5; - typedef struct { - TSdmatrixp2m5 **C; - int ncells; - } TSdcellp2m5; - - TSdp2m5 *CreateP2m5(const double p); - TSdp2m5 *DestroyP2m5(TSdp2m5 *x_dp2m5); - TSdvectorp2m5 *CreateVectorP2m5(const int n, const double p); - TSdvectorp2m5 *DestroyVectorP2m5(TSdvectorp2m5 *x_dvp2m5); - TSdmatrixp2m5 *CreateMatrixP2m5(const int nrows, const int ncols, const double p); - TSdmatrixp2m5 *DestroyMatrixP2m5(TSdmatrixp2m5 *X_dmp2m5); - TSdcellp2m5 *CreateCellP2m5(const TSivector *rows_iv, const TSivector *cols_iv, const double p); - TSdcellp2m5 *DestroyCellP2m5(TSdcellp2m5 *X_dcp2m5); - /**/ -#endif diff --git a/CFiles/cstz_dw.c b/CFiles/cstz_dw.c deleted file mode 100644 index 9bbb758847edbabc7ea124e60be14d899a9bc25e..0000000000000000000000000000000000000000 --- a/CFiles/cstz_dw.c +++ /dev/null @@ -1,2791 +0,0 @@ -#include "cstz.h" - -#include <float.h> -#include <string.h> //For memmove, etc. -#include "mathlib.h" - - -//???????? -//------- For computing inverse Hessian only. ------- -//static struct TStateModel_tag *SetModelGlobalForCovariance(struct TStateModel_tag *smodel_ps); -//static double ObjFuncForSmodel(double *x0_p, int d_x0); -//static double opt_logOverallPosteriorKernal(struct TStateModel_tag *smodel_ps, TSdvector *xchange_dv); - -static double logCondPostKernTimet(double *xchange_p, int t, struct TStateModel_tag *smodel_ps); -static double neglogPostKern_hess(double *xchange_pd, struct TStateModel_tag *smodel_ps); -static void hesscd_smodel(TSdmatrix *H_dm, TSdvector *x_dv, struct TStateModel_tag *smodel_ps, double (*fcn)(double *x, struct TStateModel_tag *), double grdh, double f0); - -TSdp2m5 *CreateP2m5(const double p, const double bound) -{ - TSdp2m5 *x_dp2m5 = tzMalloc(1, TSdp2m5); - - if (p<=0.0 && p>=1.0) fn_DisplayError(".../cstz.c/CreateP2m5(): Input probability p must be between 0.0 and 1.0"); - if ((x_dp2m5->bound=bound)<=0.0) fn_DisplayError(".../cstz.c/CreateP2m5(): Real bound must be positive"); - - x_dp2m5->cnt = 0; - x_dp2m5->ndeg = 0; - x_dp2m5->p = tzMalloc(5, double); - x_dp2m5->q = tzMalloc(5, double); - x_dp2m5->m = tzMalloc(5, int); - - //=== 5 markers. - x_dp2m5->p[0] = 0.00; - x_dp2m5->p[1] = 0.5*p; - x_dp2m5->p[2] = p; - x_dp2m5->p[3] = 0.5*(1.0+p); - x_dp2m5->p[4] = 1.00; - //=== Now 9 markers. - // x_dp2m5->p[0] = 0.00; - // x_dp2m5->p[1] = 0.25*p - // x_dp2m5->p[2] = 0.5*p; - // x_dp2m5->p[3] = 0.75*p; - // x_dp2m5->p[4] = p; - // x_dp2m5->p[5] = 0.25 + 0.75*p; - // x_dp2m5->p[6] = 0.5*(1.0+p); - // x_dp2m5->p[7] = 0.75 + 0.25*p; - // x_dp2m5->p[8] = 1.00; - - return (x_dp2m5); -} -TSdp2m5 *DestroyP2m5(TSdp2m5 *x_dp2m5) -{ - if (x_dp2m5) { - free(x_dp2m5->m); - free(x_dp2m5->q); - free(x_dp2m5->p); - - free(x_dp2m5); - return ((TSdp2m5 *)NULL); - } - else return (x_dp2m5); -} -TSdvectorp2m5 *CreateVectorP2m5(const int n, const double p, const double bound) -{ - int _i; - // - TSdvectorp2m5 *x_dvp2m5 = tzMalloc(1, TSdvectorp2m5); - - x_dvp2m5->n = n; - x_dvp2m5->v = tzMalloc(n, TSdp2m5 *); - for (_i=n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = CreateP2m5(p, bound); - - return (x_dvp2m5); -} -TSdvectorp2m5 *DestroyVectorP2m5(TSdvectorp2m5 *x_dvp2m5) -{ - int _i; - - if (x_dvp2m5) { - for (_i=x_dvp2m5->n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = DestroyP2m5(x_dvp2m5->v[_i]); - free(x_dvp2m5->v); - - free(x_dvp2m5); - return ((TSdvectorp2m5 *)NULL); - } - else return (x_dvp2m5); -} -TSdmatrixp2m5 *CreateMatrixP2m5(const int nrows, const int ncols, const double p, const double bound) -{ - int _i; - // - TSdmatrixp2m5 *X_dmp2m5 = tzMalloc(1, TSdmatrixp2m5); - - X_dmp2m5->nrows = nrows; - X_dmp2m5->ncols = ncols; - X_dmp2m5->M = tzMalloc(nrows*ncols, TSdp2m5 *); - for (_i=nrows*ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = CreateP2m5(p, bound); - - return (X_dmp2m5); -} -TSdmatrixp2m5 *DestroyMatrixP2m5(TSdmatrixp2m5 *X_dmp2m5) -{ - int _i; - - if (X_dmp2m5) { - for (_i=X_dmp2m5->nrows*X_dmp2m5->ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = DestroyP2m5(X_dmp2m5->M[_i]); - free(X_dmp2m5->M); - - free(X_dmp2m5); - return ((TSdmatrixp2m5 *)NULL); - } - else return (X_dmp2m5); -} -TSdcellp2m5 *CreateCellP2m5(const TSivector *rows_iv, const TSivector *cols_iv, const double p, const double bound) -{ - int _i; - int ncells; - // - TSdcellp2m5 *X_dcp2m5 = tzMalloc(1, TSdcellp2m5); - - - if (!rows_iv || !cols_iv || !rows_iv->flag || !cols_iv->flag) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Input row and column vectors must be (1) created and (2) assigned legal values"); - if ((ncells=rows_iv->n) != cols_iv->n) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Length of rows_iv must be the same as that of cols_iv"); - - - X_dcp2m5->ncells = ncells; - X_dcp2m5->C = tzMalloc(ncells, TSdmatrixp2m5 *); - for (_i=ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = CreateMatrixP2m5(rows_iv->v[_i], cols_iv->v[_i], p, bound); - - return (X_dcp2m5); -} -TSdcellp2m5 *DestroyCellP2m5(TSdcellp2m5 *X_dcp2m5) -{ - int _i; - - if (X_dcp2m5) { - for (_i=X_dcp2m5->ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = DestroyMatrixP2m5(X_dcp2m5->C[_i]); - free(X_dcp2m5->C); - - free(X_dcp2m5); - return ((TSdcellp2m5 *)NULL); - } - else return (X_dcp2m5); -} -TSdfourthp2m5 *CreateFourthP2m5(const int ndims, const TSivector *rows_iv, const TSivector *cols_iv, const double p, const double bound) -{ - int _i; - // - TSdfourthp2m5 *X_d4p2m5 = tzMalloc(1, TSdfourthp2m5); - - - if (!rows_iv || !cols_iv || !rows_iv->flag || !cols_iv->flag) fn_DisplayError(".../cstz.c/CreateFourthP2m5(): Input row and column vectors must be (1) created and (2) assigned legal values"); - if (rows_iv->n != cols_iv->n) fn_DisplayError(".../cstz.c/CreateFourthP2m5(): Length of rows_iv must be the same as that of cols_iv"); - - - X_d4p2m5->ndims = ndims; - X_d4p2m5->F = tzMalloc(ndims, TSdcellp2m5 *); - for (_i=ndims-1; _i>=0; _i--) - X_d4p2m5->F[_i] = CreateCellP2m5(rows_iv, cols_iv, p, bound); - - return (X_d4p2m5); -} -TSdfourthp2m5 *DestroyFourthP2m5(TSdfourthp2m5 *X_d4p2m5) -{ - int _i; - - if (X_d4p2m5) { - for (_i=X_d4p2m5->ndims-1; _i>=0; _i--) - X_d4p2m5->F[_i] = DestroyCellP2m5(X_d4p2m5->F[_i]); - free(X_d4p2m5->F); - - free(X_d4p2m5); - return ((TSdfourthp2m5 *)NULL); - } - else return (X_d4p2m5); -} - - - -int P2m5Update(TSdp2m5 *x_dp2m5, const double newval) -{ - //5-marker P2 algorithm. - //quantiles q[0] to q[4] correspond to 5-marker probabilities {0.0, p/5, p, (1+p)/5, 1.0}. - //Outputs: - // x_dp2m5->q, the markers x_dp2m5->m, is updated and only x_dp2m5->q[2] is used. - //Inputs: - // newval: new random number. - // - // January 2003. - int k, j; - double a; - double qm, dq; - int i, dm, dn; - - - if (!x_dp2m5) fn_DisplayError(".../cstz.c/P2m5Update(): x_dp2m5 must be created"); - - //if (isgreater(newval, -P2REALBOUND) && isless(newval, P2REALBOUND)) { - if (isfinite(newval) && newval > -x_dp2m5->bound && newval < x_dp2m5->bound) { - if (++x_dp2m5->cnt > 5) { - //Updating the quantiles and markers. - for (i=0; x_dp2m5->q[i]<=newval && i<5; i++) ; - if (i==0) { x_dp2m5->q[0]=newval; i++; } - if (i==5) { x_dp2m5->q[4]=newval; i--; } - for (; i<5; i++) x_dp2m5->m[i]++; - for (i=1; i<4; i++) { - dq = x_dp2m5->p[i]*x_dp2m5->m[4]; - if (x_dp2m5->m[i]+1<=dq && (dm=x_dp2m5->m[i+1]-x_dp2m5->m[i])>1) { - dn = x_dp2m5->m[i]-x_dp2m5->m[i-1]; - dq = ((dn+1)*(qm=x_dp2m5->q[i+1]-x_dp2m5->q[i])/dm+ - (dm-1)*(x_dp2m5->q[i]-x_dp2m5->q[i-1])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] += dq; - x_dp2m5->m[i]++; - } else - if (x_dp2m5->m[i]-1>=dq && (dm=x_dp2m5->m[i]-x_dp2m5->m[i-1])>1) { - dn = x_dp2m5->m[i+1]-x_dp2m5->m[i]; - dq = ((dn+1)*(qm=x_dp2m5->q[i]-x_dp2m5->q[i-1])/dm+ - (dm-1)*(x_dp2m5->q[i+1]-x_dp2m5->q[i])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] -= dq; - x_dp2m5->m[i]--; - } - } - } - else if (x_dp2m5->cnt < 5) { - //Fills the initial values. - x_dp2m5->q[x_dp2m5->cnt-1] = newval; - x_dp2m5->m[x_dp2m5->cnt-1] = x_dp2m5->cnt-1; - } - else { - //=== Last filling of initial values. - x_dp2m5->q[4] = newval; - x_dp2m5->m[4] = 4; - //=== P2 algorithm begins with reshuffling quantiles and makers. - for (j=1; j<5; j++) { - a = x_dp2m5->q[j]; - for (k=j-1; k>=0 && x_dp2m5->q[k]>a; k--) - x_dp2m5->q[k+1] = x_dp2m5->q[k]; - x_dp2m5->q[k+1]=a; - } - } - } - else ++x_dp2m5->ndeg; //Throwing away the draws to treat exceptions. - - return (x_dp2m5->cnt); -} - -void P2m5VectorUpdate(TSdvectorp2m5 *x_dvp2m5, const TSdvector *newval_dv) -{ - int _i, _n; - - if (!x_dvp2m5 || !newval_dv || !newval_dv->flag) fn_DisplayError(".../cstz.c/P2m5VectorUpdate(): (1) Vector struct x_dvp2m5 must be created and (2) input new value vector must be crated and given legal values"); - if ((_n=newval_dv->n) != x_dvp2m5->n) - fn_DisplayError(".../cstz.c/P2m5VectorUpdate(): dimension of x_dvp2m5 must match that of newval_dv"); - - for (_i=_n-1; _i>=0; _i--) - P2m5Update(x_dvp2m5->v[_i], newval_dv->v[_i]); -} - -void P2m5MatrixUpdate(TSdmatrixp2m5 *X_dmp2m5, const TSdmatrix *newval_dm) -{ - int _i; - int nrows, ncols; - - if (!X_dmp2m5 || !newval_dm || !newval_dm->flag) fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): (1) Matrix struct X_dmp2m5 must be created and (2) input new value matrix must be crated and given legal values"); - if ((nrows=newval_dm->nrows) != X_dmp2m5->nrows || (ncols=newval_dm->ncols) != X_dmp2m5->ncols) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of rows and colums in X_dmp2m5 must match those of newval_dm"); - - for (_i=nrows*ncols-1; _i>=0; _i--) - P2m5Update(X_dmp2m5->M[_i], newval_dm->M[_i]); -} - -void P2m5CellUpdate(TSdcellp2m5 *X_dcp2m5, const TSdcell *newval_dc) -{ - int _i; - int ncells; - - if (!X_dcp2m5 || !newval_dc) fn_DisplayError(".../cstz.c/P2m5CellUpdate(): (1) Cell struct X_dcp2m5 must be created and (2) input new value cell must be crated and given legal values"); - if ((ncells=newval_dc->ncells) != X_dcp2m5->ncells) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of cells in X_dcp2m5 must match that of newval_dc"); - - for (_i=ncells-1; _i>=0; _i--) - P2m5MatrixUpdate(X_dcp2m5->C[_i], newval_dc->C[_i]); -} - -void P2m5FourthUpdate(TSdfourthp2m5 *X_d4p2m5, const TSdfourth *newval_d4) -{ - int _i; - int ndims; - - if (!X_d4p2m5 || !newval_d4) fn_DisplayError(".../cstz.c/P2m5FourthUpdate(): (1) Fourth struct X_d4p2m5 must be created and (2) input new value fourth must be crated and given legal values"); - if ((ndims=newval_d4->ndims) != X_d4p2m5->ndims) - fn_DisplayError(".../cstz.c/P2m5FourthUpdate(): Number of fourths in X_d4p2m5 must match that of newval_d4"); - - for (_i=ndims-1; _i>=0; _i--) - P2m5CellUpdate(X_d4p2m5->F[_i], newval_d4->F[_i]); -} - - - - -//--------------------------------------------------------------------- -//--------------------------------------------------------------------- -#if defined( CSMINWEL_OPTIMIZATION ) - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_gradcd(double *g, double *x, int n, double grdh, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // grdh: step size. If ==0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // x: no change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - - double dh, fp, fm, tmp, *xp; - int i; - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = grdh?grdh:(fabs(*xp)<1?STPS:STPS*(*xp)); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x,n,args,dims); - *xp = tmp - dh; - fm = fcn(x,n,args,dims); - *g = (fp-fm)/(2*dh); - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } - #undef STPS - - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_hesscd(double *H, double *x, int n, double grdh, - double (*fcn)(double *x, int n, double **args, int *dims), - double **args, int *dims) { - double dhi, dhj, f1, f2, f3, f4, tmpi, tmpj, *xpi, *xpj; - int i, j; - for (i=0, xpi=x; i<n; i++, xpi++) { - dhi = grdh?grdh:(fabs(*xpi)<1?STPS:STPS*(*xpi)); - tmpi = *xpi; - for (j=i, xpj=x+i; j<n; j++, xpj++) - if (i==j) { - /* f2 = f3 when i = j */ - f2 = fcn(x,n,args,dims); - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - - /* calculate f1 and f4 */ - *xpi = tmpi + 2*dhi; - f1 = fcn(x,n,args,dims); - *xpi = tmpi - 2*dhi; - f4 = fcn(x,n,args,dims); - - /* diagonal element */ - H[i*(n+1)] = (f1-2*f2+f4)/(4*dhi*dhi); - - /* reset to intial value */ - *xpi = tmpi; - } else { - dhj = grdh?grdh:(fabs(*xpj)<1?STPS:STPS*(*xpj)); - tmpj = *xpj; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - *xpj += dhj; - dhj = *xpj - tmpj; - - /* calculate f1, f2, f3 and f4 */ - *xpj = tmpj + dhj; - f1 = fcn(x,n,args,dims); - *xpi = tmpi - dhi; - f2 = fcn(x,n,args,dims); - *xpi = tmpi + dhi; - *xpj = tmpj - dhj; - f3 = fcn(x,n,args,dims); - *xpi = tmpi - dhi; - f4 = fcn(x,n,args,dims); - - /* symmetric elements */ - H[i+j*n] = H[j+i*n] = (f1-f2-f3+f4)/(4*dhi*dhj); - - /* reset to intial values */ - *xpi = tmpi; - *xpj = tmpj; - } - } - } - #undef STPS -#elif defined( IMSL_OPTIMIZATION ) - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_gradcd(double *g, double *x, int n, double grdh, - double fcn(int n, double *x) // IMSL - //void NAG_CALL fcn(Integer n,double x[],double *f,double g[],Nag_Comm *comm) - ) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // grdh: step size. If ==0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // x: no change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - - double dh, fp, fm, tmp, *xp; - int i; - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = grdh?grdh:(fabs(*xp)<1?STPS:STPS*(*xp)); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(n,x); // IMSL - //fcn(n,x,&fp,NULL,NULL); /* NAG */ - *xp = tmp - dh; - fm = fcn(n,x); // IMSL - //fcn(n,x,&fm,NULL,NULL); - *g = (fp-fm)/(2*dh); - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } - #undef STPS - - #define STPS 6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ - void fn_hesscd(double *H, double *x, int n, double grdh, - double fcn(int n, double *x) // IMSL - //void NAG_CALL fcn(Integer n,double x[],double *f,double g[],Nag_Comm *comm) - ) { - double dhi, dhj, f1, f2, f3, f4, tmpi, tmpj, *xpi, *xpj; - int i, j; - for (i=0, xpi=x; i<n; i++, xpi++) { - dhi = grdh?grdh:(fabs(*xpi)<1?STPS:STPS*(*xpi)); - tmpi = *xpi; - for (j=i, xpj=x+i; j<n; j++, xpj++) - if (i==j) { - /* f2 = f3 when i = j */ - f2 = fcn(n,x); // IMSL - //fcn(n,x,&f2,NULL,NULL); - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - - /* calculate f1 and f4 */ - *xpi = tmpi + 2*dhi; - f1 = fcn(n,x); // IMSL - //fcn(n,x,&f1,NULL,NULL); - *xpi = tmpi - 2*dhi; - f4 = fcn(n,x); /* IMSL */ - //fcn(n,x,&f4,NULL,NULL); - - /* diagonal element */ - H[i*(n+1)] = (f1-2*f2+f4)/(4*dhi*dhi); - - /* reset to intial value */ - *xpi = tmpi; - } else { - dhj = grdh?grdh:(fabs(*xpj)<1?STPS:STPS*(*xpj)); - tmpj = *xpj; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - *xpj += dhj; - dhj = *xpj - tmpj; - - /* calculate f1, f2, f3 and f4 */ - *xpj = tmpj + dhj; - f1 = fcn(n,x); // IMSL - //fcn(n,x,&f1,NULL,NULL); - *xpi = tmpi - dhi; - f2 = fcn(n,x); // IMSL - //fcn(n,x,&f2,NULL,NULL); - *xpi = tmpi + dhi; - *xpj = tmpj - dhj; - f3 = fcn(n,x); // IMSL - //fcn(n,x,&f3,NULL,NULL); - *xpi = tmpi - dhi; - f4 = fcn(n,x); // IMSL - //fcn(n,x,&f4,NULL,NULL); - - /* symmetric elements */ - H[i+j*n] = H[j+i*n] = (f1-f2-f3+f4)/(4*dhi*dhj); - - /* reset to intial values */ - *xpi = tmpi; - *xpj = tmpj; - } - } - } - #undef STPS -#endif - - - -//------------------------------- -//Modified from fn_gradcd() in cstz.c for the conjugate gradient method I or II -//------------------------------- -#define STPS 1.0e-04 // 6.0554544523933391e-6 step size = pow(DBL_EPSILON,1.0/3) -#define GRADMANUAL 1.0e+01 //Arbitrarily (manually) set gradient. -void gradcd_gen(double *g, double *x, int n, double (*fcn)(double *x, int n), double *grdh, double f0) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // n: the dimension of g or x. - // fcn(): the function for which the gradient is evaluated - // grdh: step size. If NULL, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dh, dhi, dh2i, fp, fm, tmp, *xp; - int i; - - if (grdh) { - //=== If f0 >= NEARINFINITY, we're in a bad region and so we assume it's flat in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 >= NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - dh2i = (dhi=1.0/(dh=*grdh))/2.0; - for (i=0, xp=x; i<n; i++, xp++, g++) { - tmp = *xp; - *xp += dh; - //The following statement is bad because dh does not get reset at the beginning of the loop and thus may get changed continually within the loop. - // dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fp = fcn(n,x); // IMSL - //fcn(n,x,&fp,NULL,NULL); /* NAG */ - *xp = tmp - dh; - fm = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fm = fcn(n,x); // IMSL - //fcn(n,x,&fm,NULL,NULL); - - //=== Checking the boundary condition for the minimization problem. - if ((fp < NEARINFINITY) && (fm < NEARINFINITY)) *g = (fp-fm)*dh2i; - else if (fp < NEARINFINITY) *g = (fp-f0)*dhi; - else if (fm < NEARINFINITY) *g = (f0-fm)*dhi; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - - } - else { - //=== If f0 >= NEARINFINITY, we're in a bad region and so we assume it's flat in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 >= NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fp = fcn(n,x); // IMSL - //fcn(n,x,&fp,NULL,NULL); /* NAG */ - *xp = tmp - dh; - fm = fcn(x, n); //For frprmn() CGI_OPTIMIZATION - //fm = fcn(n,x); // IMSL - //fcn(n,x,&fm,NULL,NULL); - - //=== Checking the boundary condition for the minimization problem. - if ((fp < 0.5*NEARINFINITY) && (fm < 0.5*NEARINFINITY)) *g = (fp-fm)/(2.0*dh); - else if (fp < 0.5*NEARINFINITY) *g = (fp-f0)/dh; - else if (fm < 0.5*NEARINFINITY) *g = (f0-fm)/dh; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } -} -#undef STPS -#undef GRADMANUAL - - -//------------------------------- -//Forward difference gradient: much faster than gradcd_gen() when the objective function is very expensive to evaluate. -//------------------------------- -#define STPS 1.0e-04 // 6.0554544523933391e-6 step size = pow(DBL_EPSILON,1.0/3) -void gradfd_gen(double *g, double *x, int n, double (*fcn)(double *x, int n), double *grdh, double f0) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // n: the dimension of g or x. - // fcn(): the function for which the gradient is evaluated - // grdh: step size. If NULL, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dh, dhi, fp, tmp, *xp; - int i; - if (grdh) { - dhi = 1.0/(dh=*grdh); - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - if ( (fp=fcn(x, n)) < NEARINFINITY ) *g = (fp-f0)*dhi; //For frprmn() CGI_OPTIMIZATION - else { - //Switches to the other side of the boundary. - *xp = tmp - dh; - *g = (f0-fcn(x,n))*dhi; - } - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - - } - else { - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - if ( (fp=fcn(x, n)) < NEARINFINITY ) *g = (fp-f0)/dh; //For frprmn() CGI_OPTIMIZATION - else { - //Switches to the other side of the boundary. - *xp = tmp - dh; - *g = (f0-fcn(x,n))/dh; - } - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } -} -#undef STPS - - - -//==================================================================================================== -//= Central difference gradient for logLH at time t, using DW's smodel. -//==================================================================================================== -#define STPS 1.0e-04 // 6.0554544523933391e-6 step size = pow(DBL_EPSILON,1.0/3) -#define GRADMANUAL 1.0e+01 //Arbitrarily (manually) set gradient. -void gradcd_timet(TSdvector *g_dv, TSdvector *x_dv, int t, struct TStateModel_tag *smodel_ps, double (*fcn)(double *x, int t, struct TStateModel_tag *smodel_ps), double grdh, double f0) -{ - //Outputs: - // g_dv: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x_dv: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // fcn(): the log LH or posterior function for which the gradient is evaluated - // grdh: step size. If 0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dh, dhi, dh2i, fp, fm, tmp, *xp; - int i; - //--- Accessible variables. - int n; - double *g, *x; - - if (!g_dv) fn_DisplayError(".../cstz.c/gradcd_timet(): the input g_dv must be allocated memory"); - if (!x_dv) fn_DisplayError(".../cstz.c/gradcd_timet(): the input x_dv must be allocated memory"); - if (!x_dv->flag) fn_DisplayError(".../cstz.c/gradcd_timet(): the input x_dv must be given legal values"); - if ((n=g_dv->n) != x_dv->n) fn_DisplayError(".../cstz.c/gradcd_timet(): dimensions of g_dv and x_dv must be the same"); - - g = g_dv->v; - x = x_dv->v; - - if (grdh>0.0) - { - //=== If f0 <= -0.5*NEARINFINITY, we're in a bad region and so we assume it's GRADMANUAL in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 < -0.5*NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - dh2i = (dhi=1.0/(dh=grdh))/2.0; - for (i=0, xp=x; i<n; i++, xp++, g++) { - tmp = *xp; - *xp += dh; - //The following statement is bad because dh does not get reset at the beginning of the loop and thus may get changed continually within the loop. - // dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, t, smodel_ps); - *xp = tmp - dh; - fm = fcn(x, t, smodel_ps); - - //=== Checking the boundary condition for the minimization problem. - if ((fp > -0.5*NEARINFINITY) && (fm > -0.5*NEARINFINITY)) *g = (fp-fm)*dh2i; - else if (fp > -0.5*NEARINFINITY) *g = (fp-f0)*dhi; - else if (fm > -0.5*NEARINFINITY) *g = (f0-fm)*dhi; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - - } - else { - //=== If f0 <= -0.5*NEARINFINITY, we're in a bad region and so we assume it's GRADMANUAL in this bad region. This assumption may or may not work for a third-party optimimization routine. - if (f0 <= -0.5*NEARINFINITY) - { - for (i=n-1; i>=0; i--) - g[i] = GRADMANUAL; - return;; //Early exit. - } - - for (i=0, xp=x; i<n; i++, xp++, g++) { - dh = fabs(*xp)<=1 ? STPS : STPS*(*xp); - tmp = *xp; - *xp += dh; - dh = *xp - tmp; // This increases the precision slightly. - fp = fcn(x, t, smodel_ps); - *xp = tmp - dh; - fm = fcn(x, t, smodel_ps); - - //=== Checking the boundary condition for the minimization problem. - if ((fp > -0.5*NEARINFINITY) && (fm > -0.5*NEARINFINITY)) *g = (fp-fm)/(2.0*dh); - else if (fp > -0.5*NEARINFINITY) *g = (fp-f0)/dh; - else if (fm > -0.5*NEARINFINITY) *g = (f0-fm)/dh; - else *g = GRADMANUAL; - - *xp = tmp; // Put the original value of x[i] back to x[i] so that the content x[i] is still unaltered. - } - } - g_dv->flag = V_DEF; -} -#undef STPS -#undef GRADMANUAL -//--- -#if defined (__SWITCHING_VER_200__) -static double logCondPostKernTimet(double *xchange_pd, int t, struct TStateModel_tag *smodel_ps) -{ - //Evaluating log conditional posterior kernel at time t -- p(y_t | Y_{t-1}, theta, q). - int fss = smodel_ps->nobs - smodel_ps->fobs + 1; - double *x1_pd, *x2_pd; - - - x1_pd = xchange_pd; - x2_pd = xchange_pd + NumberFreeParametersTheta(smodel_ps); - //Note that NumberFreeParametersTheta() is DW's function, which points to TZ's function. - //In the constant parameter model, this will point to an invalid place, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - //======= This is a must step to refresh the value at the new point. ======= - ConvertFreeParametersToTheta(smodel_ps, x1_pd); //Waggoner's function, which calls TZ's Convertphi2*(). - ConvertFreeParametersToQ(smodel_ps, x2_pd); //Waggoner's function, which automatically takes care of the constant-parameter situition - ThetaChanged(smodel_ps); //DW's function, which will also call my function to set a flag for refreshing everything under these new parameters. - - - if (1) //Posterior function. - return ( LogConditionalLikelihood_StatesIntegratedOut(t, smodel_ps) + LogPrior(smodel_ps)/((double)fss) ); //DW's function. - else //Likelihood (with no prior) - return ( LogConditionalLikelihood_StatesIntegratedOut(t, smodel_ps) ); //DW's function. -} -#endif - -//------------------------ -// Computing the Hessian at the log posterior or log likelihood peak, using the outer-product Hessian. -//------------------------ -#if defined (__SWITCHING_VER_200__) -TSdmatrix *ComputeHessianFromOuterProduct(TSdmatrix *Hessian_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv) -{ - //Output: - // Hessian_dm: its inverse equals to Omega (covariance matrix) produced by ComputeCovarianceFromOuterProduct(). - //Inputs: - // xhat_dv: Hessian at this point. - - int ti; - double f0; - int nData = smodel_ps->nobs; - //=== - TSdvector *grad_dv; - - - grad_dv = CreateVector_lf(xhat_dv->n); - if (!Hessian_dm) Hessian_dm = CreateConstantMatrix_lf(xhat_dv->n, xhat_dv->n, 0.0); - - //=== Computing the outer-product Hessian. - for (ti=smodel_ps->fobs; ti<=nData; ti++) //Base-1 set-up, thus <=nData, NOT <nData. - { - f0 = logCondPostKernTimet(xhat_dv->v, ti, smodel_ps); - gradcd_timet(grad_dv, xhat_dv, ti, smodel_ps, logCondPostKernTimet, 0.0, f0); - VectorTimesSelf(Hessian_dm, grad_dv, 1.0, 1.0, 'U'); - } - - - SUtoGE(Hessian_dm); //Making upper symmetric matarix to a full matrix. - Hessian_dm->flag = M_GE; //Reset this flag, so - ScalarTimesMatrixSquare(Hessian_dm, 0.5, Hessian_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Hessian_dm->flag |= M_SU | M_SL; - - - //=== - DestroyVector_lf(grad_dv); - - return (Hessian_dm); -} -//------------------------ -// Computing the covariance matrix for standard errors at the log posterior or likelihood peak, using the outer-product Hessian. -//------------------------ -TSdmatrix *ComputeCovarianceFromOuterProduct(TSdmatrix *Omega_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv) -{ - //Output: - // Omega_dm: covariance matrix, which equals to the inverse of the Hessian produced by ComputeHessianFromOuterProduct(). - //Inputs: - // xhat_dv: Hessian at this point. - - int ti; - double f0; - int nData = smodel_ps->nobs; - //=== - TSdvector *grad_dv; - - - grad_dv = CreateVector_lf(xhat_dv->n); - if (!Omega_dm) Omega_dm = CreateConstantMatrix_lf(xhat_dv->n, xhat_dv->n, 0.0); - - //=== Computing the outer-product Hessian. - for (ti=smodel_ps->fobs; ti<=nData; ti++) //Base-1 set-up, thus <=nData, NOT <nData. - { - f0 = logCondPostKernTimet(xhat_dv->v, ti, smodel_ps); - gradcd_timet(grad_dv, xhat_dv, ti, smodel_ps, logCondPostKernTimet, 0.0, f0); - VectorTimesSelf(Omega_dm, grad_dv, 1.0, 1.0, 'U'); - } - SUtoGE(Omega_dm); //Making upper symmetric matarix to a full matrix. - ScalarTimesMatrixSquare(Omega_dm, 0.5, Omega_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Omega_dm->flag |= M_SU | M_SL; - - - //--- Converting or inverting the Hessian to covariance. - if (invspd(Omega_dm, Omega_dm, 'U')) - fn_DisplayError(".../cstz.c/ComputeCovarianceFromOuterProduct(): Hessian must be invertible"); - - - //-- Doubly safe to force it to be symmetric. - SUtoGE(Omega_dm); //Making upper symmetric matarix to a full matrix. - ScalarTimesMatrixSquare(Omega_dm, 0.5, Omega_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Omega_dm->flag |= M_SU | M_SL; - - //--- Checking if it's symmetric, positive definite. - - - //=== - DestroyVector_lf(grad_dv); - - return (Omega_dm); -} - - - -//------------------------ -// Computing the Hessian at the log posterior or log likelihood peak, using second derivatives. -//------------------------ -TSdmatrix *ComputeHessianFrom2ndDerivative(TSdmatrix *Hessian_dm, struct TStateModel_tag *smodel_ps, TSdvector *xhat_dv) -{ - //Output: - // Hessian_dm: its inverse equals to Omega (covariance matrix). - // The flag is set to M_GE | M_SU | M_SL by hesscd_smodel(). - //Inputs: - // xhat_dv: Hessian at this point. - - double f0; - int nData = smodel_ps->nobs; - - - if (!Hessian_dm) Hessian_dm = CreateConstantMatrix_lf(xhat_dv->n, xhat_dv->n, 0.0); - - //=== Computing the inner-product Hessian. - f0 = neglogPostKern_hess(xhat_dv->v, smodel_ps); - hesscd_smodel(Hessian_dm, xhat_dv, smodel_ps, neglogPostKern_hess, 0.0, f0); - - return (Hessian_dm); -} -//--- -#define STPS 1.0e-4 //6.0554544523933391e-6 /* step size = pow(DBL_EPSILON,1.0/3) */ -static void hesscd_smodel(TSdmatrix *H_dm, TSdvector *x_dv, struct TStateModel_tag *smodel_ps, double (*fcn)(double *, struct TStateModel_tag *), double grdh, double f0) -{ - //Outputs: - // H_dm: the Hessian n-by-n (no need to be initialized). - //Inputs: - // x_dv: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // fcn(): the negative (-) log LH or posterior function for which the gradient is evaluated - // grdh: step size. If 0.0, then dh is set automatically; otherwise, grdh is taken as a step size, often set as 1.0e-004. - // f0: the value of (*fcn)(x). NOT used in this function except dealing with the boundary (NEARINFINITY) for the - // minimization problem, but to be compatible with a genral function call where, say, gradfw_gen() and cubic - // interpolation of central difference method will use f0. - - double dhi, dhj, f1, f2, f3, f4, tmpi, tmpj, *xpi, *xpj; - int i, j; - //--- Accessible variables. - int n; - double *H, *x; - - if (!x_dv) fn_DisplayError(".../cstz.c/hesscd_smodel(): the input x_dv must be allocated memory"); - if (!x_dv->flag) fn_DisplayError(".../cstz.c/hesscd_smodel(): the input x_dv must be given legal values"); - if (!H_dm) fn_DisplayError(".../cstz.c/hesscd_smodel(): H_dm must be allocated memory"); - if ( ((n=x_dv->n) != H_dm->nrows) || (n != H_dm->ncols) ) fn_DisplayError(".../cstz.c/hesscd_smodel(): Check the dimension of x_dv and H_dm"); - - H = H_dm->M; - x = x_dv->v; - - for (i=0, xpi=x; i<n; i++, xpi++) { - dhi = grdh?grdh:(fabs(*xpi)<1?STPS:STPS*(*xpi)); - tmpi = *xpi; - for (j=i, xpj=x+i; j<n; j++, xpj++) - if (i==j) - { - /* f2 = f3 when i = j */ - if ((f2 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f2 = f0; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - - /* calculate f1 and f4 */ - *xpi = tmpi + 2*dhi; - if ((f1 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f1 = f0; - - *xpi = tmpi - 2*dhi; - if ((f4 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f4 = f0; - - /* diagonal element */ - H[i*(n+1)] = (f1-2*f2+f4)/(4*dhi*dhi); - - /* reset to intial value */ - *xpi = tmpi; - } - else - { - dhj = grdh?grdh:(fabs(*xpj)<1?STPS:STPS*(*xpj)); - tmpj = *xpj; - - /* this increases precision slightly */ - *xpi += dhi; - dhi = *xpi - tmpi; - *xpj += dhj; - dhj = *xpj - tmpj; - - /* calculate f1, f2, f3 and f4 */ - *xpj = tmpj + dhj; - if ((f1 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f1 = f0; - *xpi = tmpi - dhi; - if ((f2 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f2 = f0; - *xpi = tmpi + dhi; - *xpj = tmpj - dhj; - if ((f3 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f3 = f0; - *xpi = tmpi - dhi; - if ((f4 = fcn(x, smodel_ps)) > 0.5*NEARINFINITY) f4 = f0; - - /* symmetric elements */ - H[i+j*n] = H[j+i*n] = (f1-f2-f3+f4)/(4*dhi*dhj); - - /* reset to intial values */ - *xpi = tmpi; - *xpj = tmpj; - } - } - - //--- To be safe. - H_dm->flag = M_SU; - SUtoGE(H_dm); //Making upper symmetric matarix to a full matrix. - H_dm->flag = M_GE; //Reset this flag, so - - ScalarTimesMatrixSquare(H_dm, 0.5, H_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - H_dm->flag |= M_SU | M_SL; -} -#undef STPS -//--- -static double neglogPostKern_hess(double *xchange_pd, struct TStateModel_tag *smodel_ps) -{ - //Evaluating negative log posterior kernel p(y_T | theta, q). - int fss = smodel_ps->nobs - smodel_ps->fobs + 1; - double *x1_pd, *x2_pd; - - - x1_pd = xchange_pd; - x2_pd = xchange_pd + NumberFreeParametersTheta(smodel_ps); - //Note that NumberFreeParametersTheta() is DW's function, which points to TZ's function. - //In the constant parameter model, this will point to an invalid place, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - //======= This is a must step to refresh the value at the new point. ======= - ConvertFreeParametersToTheta(smodel_ps, x1_pd); //Waggoner's function, which calls TZ's Convertphi2*(). - ConvertFreeParametersToQ(smodel_ps, x2_pd); //Waggoner's function, which automatically takes care of the constant-parameter situition - ThetaChanged(smodel_ps); //DW's function, which will also call my function to set a flag for refreshing everything under these new parameters. - - - if (1) //Posterior function. - return ( -LogLikelihood_StatesIntegratedOut(smodel_ps) - LogPrior(smodel_ps) ); //DW's function. - else //Likelihood (with no prior) - return ( -LogLikelihood_StatesIntegratedOut(smodel_ps) ); //DW's function. -} -#endif - - - - - - - - - - -//???????????????? -/** -//=== -static struct TStateModel_tag *SMODEL_PS = NULL; //Minimization to find the MLE or posterior peak. -static struct TStateModel_tag *SetModelGlobalForCovariance(struct TStateModel_tag *smodel_ps) -{ - //Returns the old pointer in order to preserve the previous value. - struct TStateModel_tag *tmp_ps =SMODEL_PS; - SMODEL_PS = smodel_ps; - return (tmp_ps); -} -//--- Can be used for conjugate gradient minimization as well. -static double ObjFuncForSmodel(double *x0_p, int d_x0) -{ - TSdvector x0_sdv; - x0_sdv.v = x0_p; - x0_sdv.n = d_x0; - x0_sdv.flag = V_DEF; - - return ( -opt_logOverallPosteriorKernal(SMODEL_PS, &x0_sdv) ); -} -//--- -static double opt_logOverallPosteriorKernal(struct TStateModel_tag *smodel_ps, TSdvector *xchange_dv) -{ - double *x1_pd, *x2_pd; - - - x1_pd = xchange_dv->v; - x2_pd = xchange_dv->v + NumberFreeParametersTheta(smodel_ps); - //Note that NumberFreeParametersTheta() is DW's function, which points to TZ's function. - //In the constant parameter model, this will point to invalid, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - //======= This is a must step to refresh the value at the new point. ======= - ConvertFreeParametersToTheta(smodel_ps, x1_pd); //Waggoner's function, which calls TZ's Convertphi2*(). - ConvertFreeParametersToQ(smodel_ps, x2_pd); //Waggoner's function, which automatically takes care of the constant-parameter situition - ThetaChanged(smodel_ps); //DW's function, which will also call my function to set a flag for refreshing everything under these new parameters. - if (1) //Posterior function. - return ( LogPosterior_StatesIntegratedOut(smodel_ps) ); //DW's function. - else //Likelihood (with no prior) - return ( LogLikelihood_StatesIntegratedOut(smodel_ps) ); //DW's function. -} -/**/ - - - - - - - - -int next_permutation(int *first, int *last) -{ - // Given the permulation, say, [3 2 1 0], the ouput is the next permulation [0 1 2 3], and so on. - // Note that last is simply a pointer. Because it is not allocated to a memory, it cannot be accessed. - // So last is used for (1) gauging the dimension size of the array first; - // (2) being accssed but with --last (which points to a valid memory place), NOT last. - // - // first: n-by-1 vector of integers filled with 0, 1, 2, ..., n. - // last: simply a pointer to the address after the last element of first. Note that no memory is allocated. - - int *i = last, *ii, *j, tmp; - if (first == last || first == --i) - return 0; - - for(; ; ) { - ii = i; - if (*--i < *ii) { - j = last; - while (!(*i < *--j)); - tmp = *i; *i = *j; *j = tmp; - for (; ii != last && ii != --last; ++ii) { - tmp = *ii; *ii = *last; *last = tmp; - } - return 1; - } - if (i == first) { - for (; first != last && first != --last; ++first) { - tmp = *first; *first = *last; *last = tmp; - } - return 0; - } - } -} - - - -/** -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -void permute_matrix(double *a, int n, int *indx) { - double *b; - int nn=n*n; - register int i; - b = calloc(nn,sizeof(double)); - memcpy(b, a, nn*sizeof(double)); - for (i=0; i<nn; i++, a++) - *a = b[indx[i%n]+indx[i/n]*n]; -} - -int main() { - double a[9]={1,2,3,4,5,6,7,8,9}; - int indx[3]={1,2,0}; - permute_matrix(a,3,indx); - return 0; -} -/**/ - - -int fn_cumsum_int(int *x_v, const int d_x_v) { - //Outputs: - // x_v: an int vector of cumulative sums over an input int vector. - // return: the sum of an input int vector. - //Inputs: - // x_v: a vector of ints. - // d_x_v: dimension of x_v. - // - // Compute cumulative sums of a vector of ints. - int _i; - - if (x_v==NULL) fn_DisplayError(".../cstz/fn_cumsum_lf: x_v must be allocated with memory"); - - for (_i=1; _i<d_x_v; _i++) { - x_v[_i] = x_v[_i-1] + x_v[_i]; - } - - return (x_v[d_x_v-1]); -} - - -double fn_cumsum_lf(double *x_v, const int d_x_v) { - //Outputs: - // x_v: a double vector of cumulative sums over an input double vector. - // return: the sum of an input double vector. - //Inputs: - // x_v: a vector of doubles. - // d_x_v: dimension of x_v. - // - // Compute cumulative sums of a vector of doubles. - int _i; - - if (!x_v) fn_DisplayError(".../cstz/fn_cumsum_lf: x_v must be allocated with memory"); - - for (_i=1; _i<d_x_v; _i++) { - x_v[_i] = x_v[_i-1] + x_v[_i]; - } - - return (x_v[d_x_v-1]); -} - - -double fn_mean(const double *a_v, const int _n) { - int _i; - double x=0.0; - - for (_i=0; _i<_n; _i++) x += a_v[_i]; - x /= (double)_n; - - return x; -} - -//<<--------------- -static double *tz_BaseForComp; // This base variable is to be sorted and thus made global for this source file. -void fn_SetBaseArrayForComp(TSdvector *x_dv) -{ - if ( !x_dv->flag ) fn_DisplayError(".../cstz.c/ftd_SetBaseArrayForComp(): input vector used for comparison must be given legal values"); - else tz_BaseForComp = x_dv->v; -} -int fn_compare(const void *i1, const void *i2) -{ - // Ascending order according to tz_BaseForComp. - return ( (tz_BaseForComp[*((int*)i1)]<tz_BaseForComp[*((int*)i2)]) ? -1 : (tz_BaseForComp[*((int*)i1)]>tz_BaseForComp[*((int*)i2)]) ? 1 : 0 ); -} -int fn_compare2(const void *i1, const void *i2) -{ - // Descending order according to tz_BaseForComp. - return ( (tz_BaseForComp[*((int*)i1)]<tz_BaseForComp[*((int*)i2)]) ? 1 : (tz_BaseForComp[*((int*)i1)]>tz_BaseForComp[*((int*)i2)]) ? -1 : 0); -} -//======= Quick sort. ======= -static int ftd_CompareDouble(const void *a, const void *b) -{ - // Ascending order for the series that contains a and b. - return (*(double *)a < *(double *)b ? -1 : *(double *)a > *(double *)b ? 1 : 0); -} -static int ftd_CompareDouble2(const void *a, const void *b) -{ - // Dscending order for the series that contains a and b. - return (*(double *)a < *(double *)b ? 1 : *(double *)a > *(double *)b ? -1 : 0); -} -//--- -void tz_sort(TSdvector *x_dv, char ad) -{ - //x_dv will be replaced by the sorted value. - //Sort x_dv according to the descending or ascending order indicated by ad. - //ad == "A' or 'a': acending order. - //ad == 'D' or 'd': descending order. - if (!x_dv || !x_dv->flag) fn_DisplayError("cstz.c/tz_sort(): input vector x_dv must be (1) created and (2) assigned values"); - - qsort( (void *)x_dv->v, (size_t)x_dv->n, sizeof(double), ((ad=='A') || (ad=='a')) ? ftd_CompareDouble : ftd_CompareDouble2); -} -void tz_sortindex_lf(TSivector *x_iv, TSdvector *base_dv, char ad) -{ - //???????NOT fully tested yet. - //x_iv will be replaced by the sorted integer vector. - //base_dv will not be affected. - //Sort x_iv according to the descending or ascending order of base_dv. - //ad == "A' or 'a': acending order. - //ad == 'D' or 'd': descending order. - if (!x_iv || !base_dv || !x_iv->flag || !base_dv->flag) fn_DisplayError("cstz.c/tz_sortindex(): input vectors x_iv and base_dv must be (1) created and (2) assigned values"); - if (x_iv->n != base_dv->n) fn_DisplayError("cstz.c/tz_sortindex(): lengths of the two input vectors must be the same"); - - fn_SetBaseArrayForComp(base_dv); - qsort( (void *)x_iv->v, (size_t)x_iv->n, sizeof(int), ((ad=='A') || (ad=='a')) ? fn_compare : fn_compare2); -} -void tz_sortindex(TSivector *x_iv, TSvoidvector *base_voidv, char ad) -{ - //???????NOT fully tested yet. - //Allowing x_iv = base_voidv or sets base_voidv=NULL - //Sort x_iv according to the descending or ascending order of base_voidv. - //ad == "A' or 'a': acending order. - //ad == 'D' or 'd': descending order. - if (!x_iv || !base_voidv || !x_iv->flag || !base_voidv->flag) fn_DisplayError("cstz.c/tz_sort_int(): input vectors x_iv and base_voidv must be (1) created and (2) assigned values"); - if (x_iv->n != base_voidv->n) fn_DisplayError("cstz.c/tz_sort_int(): lengths of the two input vectors must be the same"); - - fn_SetBaseArrayForComp((TSdvector *)base_voidv); - qsort( (void *)x_iv->v, (size_t)x_iv->n, sizeof(int), ((ad=='A') || (ad=='a')) ? fn_compare : fn_compare2); -} -//--- -void tz_sort_matrix(TSdmatrix *X_dm, char ad, char rc) -{ - //Fast method: rc = 'C' (sort each column). - //Output: X_dm will be replaced by the sorted value. - // Sort X_dm (1) by columns or rows indicated by rc and (2) according to the descending or ascending order indicated by ad. - //Inputs: - // ad == 'A' or 'a': acending order. - // ad == 'D' or 'd': descending order. - // rc == 'C' or 'c': sort each column. - // rc == 'R' or 'r': sort each row. - int nrows, ncols, _j, begloc; - TSdvector x_sdv; - double *X; - //=== - TSdmatrix *Xtran_dm = NULL; - - if (!X_dm || !(X_dm->flag & M_GE)) fn_DisplayError("cstz.c/tz_sort_matrix(): input matrix X_dm must be (1) created and (2) assigned values and (3) regular (M_GE)"); - x_sdv.flag = V_DEF; - - if (rc=='C' || rc=='c') - { - X = X_dm->M; - nrows = X_dm->nrows; - ncols = X_dm->ncols; - } - else - { - Xtran_dm = tz_TransposeRegular((TSdmatrix *)NULL, X_dm); - X = Xtran_dm->M; - nrows = Xtran_dm->nrows; - ncols = Xtran_dm->ncols; - } - x_sdv.n = nrows; - for (begloc=nrows*(ncols-1), _j=ncols-1; _j>=0; begloc-=nrows, _j--) - { - x_sdv.v = X + begloc; - tz_sort(&x_sdv, ad); - } - - if (rc=='R' || rc=='r') - { - tz_TransposeRegular(X_dm, Xtran_dm); - //=== - DestroyMatrix_lf(Xtran_dm); - } -} -//--- -TSdvector *tz_prctile_matrix(TSdvector *z_dv, const double prc, TSdmatrix *Z_dm, const char rc) -{ - //Fast method: rc = 'C' (sort each column). - //Output: %prc percentile (i.e., containing 0% to %prc). - // z_dv: an n-by-1 vector if rc=='C' or an m-by-1 vector if rc=='R'. - // If z_dv==NULL, it will be created and has to be destroyed outside this function. - //Inputs: - // prc: percent (must be between 0.0 and 1.0 inclusive). - // X_dm: an m-by-n general matrix. - // rc == 'C' or 'c': sort each column. - // rc == 'R' or 'r': sort each row. - int nrows, ncols, _j, begloc; - TSdvector x_sdv; - double *X; - //=== - TSdmatrix *X_dm = NULL; - TSdmatrix *Xtran_dm = NULL; - - if (!Z_dm || !Z_dm->flag) fn_DisplayError("cstz.c/tz_prctile_matrix(): input matrix Z_dm must be (1) created and (2) assigned values"); - if (prc<0.0 || prc>1.0) fn_DisplayError("cstz.c/tz_prctile_matrix(): percentile mark prc must be between 0.0 and 1.0 inclusive"); - x_sdv.flag = V_DEF; - - nrows = Z_dm->nrows; - ncols = Z_dm->ncols; - if (!z_dv) - { - if (rc=='C' || rc=='c') z_dv = CreateVector_lf(ncols); - else z_dv = CreateVector_lf(nrows); - } - else - { - if ((rc=='C' || rc=='c')) - { - if (ncols != z_dv->n) fn_DisplayError("cstz.c/tz_prctile_matrix(): z_dv->n must be the same as ncols of X_dm when sorting each column"); - } - else - { - if (nrows != z_dv->n) fn_DisplayError("cstz.c/tz_prctile_matrix(): z_dv->n must be the same as nrows of X_dm when sorting each row"); - } - } - X_dm = CreateMatrix_lf(nrows, ncols); - CopyMatrix0(X_dm, Z_dm); - - if (rc=='C' || rc=='c') - { - X = X_dm->M; - nrows = X_dm->nrows; - ncols = X_dm->ncols; - } - else - { - Xtran_dm = tz_TransposeRegular((TSdmatrix *)NULL, X_dm); - X = Xtran_dm->M; - nrows = Xtran_dm->nrows; - ncols = Xtran_dm->ncols; - } - x_sdv.n = nrows; - for (begloc=nrows*(ncols-1), _j=ncols-1; _j>=0; begloc-=nrows, _j--) - { - x_sdv.v = X + begloc; - tz_sort(&x_sdv, 'A'); - z_dv->v[_j] = x_sdv.v[(int)floor(prc*(double)nrows)]; - } - z_dv->flag = V_DEF; - if (rc=='R' || rc=='r') DestroyMatrix_lf(Xtran_dm); - - //=== - DestroyMatrix_lf(X_dm); - - return (z_dv); -} -//--- -TSdvector *tz_mean_matrix(TSdvector *z_dv, TSdmatrix *Z_dm, const char rc) -{ - //Fast method: rc = 'C' (mean for each column). - //Output: %prc percentile (i.e., containing 0% to %prc). - // z_dv: an n-by-1 vector if rc=='C' or an m-by-1 vector if rc=='R'. - // If z_dv==NULL, it will be created and has to be destroyed outside this function. - //Inputs: - // X_dm: an m-by-n general matrix. - // rc == 'C' or 'c': mean for each column. - // rc == 'R' or 'r': mean for each row. - int nrows, ncols, _j, begloc; - TSdvector x_sdv; - double *X; - //=== - TSdmatrix *X_dm = NULL; - TSdmatrix *Xtran_dm = NULL; - - if (!Z_dm || !Z_dm->flag) fn_DisplayError("cstz.c/tz_mean_matrix(): input matrix Z_dm must be (1) created and (2) assigned values"); - x_sdv.flag = V_DEF; - - nrows = Z_dm->nrows; - ncols = Z_dm->ncols; - if (!z_dv) - { - if (rc=='C' || rc=='c') z_dv = CreateVector_lf(ncols); - else z_dv = CreateVector_lf(nrows); - } - else - { - if ((rc=='C' || rc=='c')) - { - if (ncols != z_dv->n) fn_DisplayError("cstz.c/tz_mean_matrix(): z_dv->n must be the same as ncols of X_dm when computing mean for each column"); - } - else - { - if (nrows != z_dv->n) fn_DisplayError("cstz.c/tz_mean_matrix(): z_dv->n must be the same as nrows of X_dm when computing mean for each row"); - } - } - X_dm = CreateMatrix_lf(nrows, ncols); - CopyMatrix0(X_dm, Z_dm); - - if (rc=='C' || rc=='c') - { - X = X_dm->M; - nrows = X_dm->nrows; - ncols = X_dm->ncols; - } - else - { - Xtran_dm = tz_TransposeRegular((TSdmatrix *)NULL, X_dm); - X = Xtran_dm->M; - nrows = Xtran_dm->nrows; - ncols = Xtran_dm->ncols; - } - x_sdv.n = nrows; - for (begloc=nrows*(ncols-1), _j=ncols-1; _j>=0; begloc-=nrows, _j--) - { - x_sdv.v = X + begloc; - z_dv->v[_j] = fn_mean(x_sdv.v, x_sdv.n); - } - z_dv->flag = V_DEF; - if (rc=='R' || rc=='r') DestroyMatrix_lf(Xtran_dm); - - //=== - DestroyMatrix_lf(X_dm); - - return (z_dv); -} -//--------------->> - - - -//<<--------------- -// WZ normalization on VARs. -//--------------->> -void fn_wznormalization(TSdvector *wznmlz_dv, TSdmatrix *A0draw_dm, TSdmatrix *A0peak_dm) -{ - //Outputs: - // wznmlz_dv (n-by-1): If negative, the sign of the equation must switch; if positive: no action needs be taken. - // If NULL as an input, remains NULL. - // A0draw_dm (n-by-n): replaced by wz-normalized draw. - //Inputs: - // wznmlz_dv (n-by-1): if NULL, no output for wznmlz_dv; otherwise, a memory allocated vector. - // A0draw_dm (n-by-n): a draw of A0. - // A0peak_dm (n-by-n): reference point to which normalized A0draw_dm is closest. - int _j, _n, - errflag = -2; - double *v; - TSdmatrix *X_dm = NULL; - TSdvector *diagX_dv = NULL; - - if ( !A0peak_dm ) fn_DisplayError(".../cstz.c/fn_wznormalization(): input matrix for ML estimates must be created (memory allocated) and have legal values"); - //This is a minimum check to prevent crash without error messages. More robust checks are done in BdivA_rgens(). - - _n = A0peak_dm->nrows; - X_dm = CreateMatrix_lf(_n, _n); - - if ( errflag=BdivA_rgens(X_dm, A0peak_dm, '\\', A0draw_dm) ) { - printf(".../cstz.c/fn_wznormalization(): errors when calling BdivA_rgens() with error flag %d", errflag); - exit(EXIT_FAILURE); - } - - if (wznmlz_dv) { - diagdv(wznmlz_dv, X_dm); - v = wznmlz_dv->v; - } - else { - diagX_dv = CreateVector_lf(_n); - diagdv(diagX_dv, X_dm); - v = diagX_dv->v; - } - - - for (_j=_n-1; _j>=0; _j--) - if (v[_j]<0) ScalarTimesColofMatrix((TSdvector *)NULL, -1.0, A0draw_dm, _j); - - //=== Destroys memory allocated for this function only. - DestroyMatrix_lf(X_dm); - DestroyVector_lf(diagX_dv); -} - - - - -//---------------<< -// Handling under or over flows with log values. -//--------------->> -struct TSveclogsum_tag *CreateVeclogsum(int n) -{ - struct TSveclogsum_tag *veclogsum_ps = tzMalloc(1, struct TSveclogsum_tag); - - //=== Memory allocation and initialization. - veclogsum_ps->n = n; //Number of sums or the dimension of logofsum. - veclogsum_ps->N_iv = CreateConstantVector_int(n, 0); //Cumulative. (N_1, ..., N_n). - veclogsum_ps->logsum_dv = CreateConstantVector_lf(n, -MACHINEINFINITY); //Cumulative. (logofsum_1, ..., logofsum_n). - veclogsum_ps->logmax_dv = CreateConstantVector_lf(n, -MACHINEINFINITY); //(logmax_1, ..., logmax_n). - - return (veclogsum_ps); -} -//--- -struct TSveclogsum_tag *DestroyVeclogsum(struct TSveclogsum_tag *veclogsum_ps) -{ - - if (veclogsum_ps) { - DestroyVector_int(veclogsum_ps->N_iv); - DestroyVector_lf(veclogsum_ps->logsum_dv); - DestroyVector_lf(veclogsum_ps->logmax_dv); - - //=== - free(veclogsum_ps); - return ((struct TSveclogsum_tag *)NULL); - } - else return (veclogsum_ps); -} -//=== -//------------------ -//Updating the sum (not divided by n) for the mean and the second moment. -//------------------ -void UpdateSumFor1st2ndMoments(TSdvector *x1stsum_dv, TSdmatrix *X2ndsum_dm, const TSdvector *xdraw_dv) -{ - static int ini_indicator = 0; - - if (!ini_indicator) { - //Pass this loop once and no more. - CopyVector0(x1stsum_dv, xdraw_dv); - VectorTimesSelf(X2ndsum_dm, xdraw_dv, 1.0, 0.0, 'U'); - ini_indicator = 1; - } - else { - VectorPlusVectorUpdate(x1stsum_dv, xdraw_dv); - VectorTimesSelf(X2ndsum_dm, xdraw_dv, 1.0, 1.0, 'U'); - } -} -//--- -int tz_update_logofsum(double *Y_N_dp, double *y_Nmax_dp, double ynew, int N) -{ - //Recursive algorithm to update Y_N (=log(sum of x_i)) for i=1, ..., N with the new value ynew = log(x_{N+1}). - //Returns (1) the updated value Y_{N+1} = log(sum of x_i)) for i=1, ..., N+1; - // (2) the updated value y_(N+1)max_dp; - // (3) the integer N+1. - //See TVBVAR Notes p.81a. - - if (*y_Nmax_dp>=ynew) *Y_N_dp = log( exp(*Y_N_dp - *y_Nmax_dp) + exp(ynew - *y_Nmax_dp) ) + *y_Nmax_dp; - else { - *y_Nmax_dp = ynew; - *Y_N_dp = log( exp(*Y_N_dp - ynew) + 1.0 ) + ynew; - } - - return (N+1); -} -int fn_update_logofsum(int N, double ynew, double *Y_N_dp, double *y_Nmax_dp) -{ - //Recursive algorithm to update Y_N (=log(sum of x_i)) for i=1, ..., N with the new value ynew = log(x_{N+1}). - //Returns (1) the updated value Y_{N+1} = log(sum of x_i)) for i=1, ..., N+1; - // (2) the updated value y_(N+1)max_dp; - // (3) the integer N+1. - //See TVBVAR Notes p.81a. - //If N=0, then ynew = -infty (no value yet) and thus no value is added to *Y_N_dp. - -// if (N>0) -// { - if (*y_Nmax_dp>=ynew) *Y_N_dp = log( exp(*Y_N_dp - *y_Nmax_dp) + exp(ynew - *y_Nmax_dp) ) + *y_Nmax_dp; - else { - *y_Nmax_dp = ynew; - *Y_N_dp = log( exp(*Y_N_dp - ynew) + 1.0 ) + ynew; - } -// } - - return (N+1); -} -double fn_replace_logofsumsbt(double *yold, double _a, double ynew, double _b) -{ - //Outputs: - // *yold is replaced by log abs(a*xold + b*xnew). - // 1.0 or -1.0: sign of a*xold + b*xnew. - // - //Given yold=log(xold) and ynew=log(xnew), it updates and returns yold = log abs(a*xold + b*xnew). - //sbt: subtraction or subtract. - //See TVBVAR Notes p.81a. - double tmpd; - //*yold = (*yold > ynew) ? (log( _a + _b*exp(ynew - *yold)) + *yold) : (log( _a*exp(*yold - ynew) + _b) + ynew); - - if (*yold > ynew) { - if ((tmpd=_a + _b*exp(ynew - *yold) ) < 0.0) { - // printf("WARNING! .../cstz.c/fn_replace_logofsumsbt(): Expression inside log is negative and the function returns the negative sign!\n"); - *yold += log(fabs(tmpd)); - return (-1.0); - } - else { - *yold += log(tmpd); - return (1.0); - } - } - else { - if ((tmpd=_a*exp(*yold - ynew) + _b) < 0.0 ) { - // printf("WARNING! .../cstz.c/fn_replace_logofsumsbt(): Expression inside log is negative and the function returns the negative sign!\n"); - *yold = log(fabs(tmpd)) + ynew; - return (-1.0); - } - else { - *yold = log(tmpd) + ynew; - return (1.0); - } - } -} - - -//<<--------------- -// Evaluating the inverse of the chi-square cumulative distribution function. -//--------------->> -double fn_chi2inv(double p, double df) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - //Returns x where p = int_{0}^{x} chi2pdf(t, df) dt - if (df<=0.0) fn_DisplayError("cstz.c/fn_chi2inv(): degrees of freedom df must be greater than 0.0"); - - if (p<=0.0) return (0.0); - else if (p>=1.0) return (MACHINEINFINITY); - else return (imsls_d_chi_squared_inverse_cdf(p, df)); -#elif defined( USE_GSL_LIBRARY ) - if (df<=0.0) fn_DisplayError("cstz.c/fn_chi2inv(): degrees of freedom df must be greater than 0.0"); - - if (p<=0.0) return (0.0); - else if (p>=1.0) return (MACHINEINFINITY); - else - return gsl_cdf_chisq_Pinv(p,df); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Evaluating the standard normal cumulative distribution function. -//--------------->> -double fn_normalcdf(double x) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsls_d_normal_cdf(x)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_cdf_ugaussian_P(x); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Evaluating the inverse of the standard normal cumulative distribution function. -//--------------->> -double fn_normalinv(double p) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsls_d_normal_inverse_cdf(p)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_cdf_ugaussian_Pinv(p); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Evaluating the inverse of the beta cumulative distribution function. -//--------------->> -double fn_betainv(double p, double _alpha, double _beta) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - //p = int_{0}^{\infty} betapdf(t, _alpha, _beta) dt where betapdf(t,_alpha,_beta) \propt t^{_alpha-1}*(1-t)^(_beta-1}. - return (imsls_d_beta_inverse_cdf(p, _alpha, _beta)); -#elif defined( USE_GSL_LIBRARY) - return gsl_cdf_beta_Pinv(p,_alpha,_beta); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Computes log gamma (x) where gamma(n+1) = n! and gamma(x) = int_0^{\infty} e^{-t} t^{x-1} dt. -//--------------->> -double fn_gammalog(double x) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsl_d_log_gamma(x)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_sf_lngamma(x); -#else - ***No default routine yet; -#endif -} - - -//<<--------------- -// Computes log beta(x, y) where beta(x, y) = gamma(x)*gamm(y)/gamma(x+y). -//--------------->> -double fn_betalog(double x, double y) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsl_d_log_beta(x, y)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_sf_lnbeta(x,y); -#else - ***No default routine yet; -#endif -} - - - -//<<--------------- -// Computes log gamma (x) where gamma(n+1) = n! and gamma(x) = int_0^{\infty} e^{-t} t^{x-1} dt. -//--------------->> -double gammalog(double x) -{ -#if defined( IMSL_STATISTICSTOOLBOX ) - return (imsl_d_log_gamma(x)); -#elif defined( USE_GSL_LIBRARY ) - return gsl_sf_lngamma(x); -#else - ***No default routine yet; -#endif -} - - -//----------------------------------------------------------------------------------- -//------------------------------ Normal distribution ------------------------------// -//--- p(x) = (1.0/sqrt(2*pi)*sigma) exp( -(1.0/(2.0*sigma^2.0)) (x-mu)^2.0 ) -//--- for sigma>0. -//----------------------------------------------------------------------------------- -#define LOGSQRTOF2PI 9.189385332046727e-001 -double tz_lognormalpdf(double _x, double _m, double _s) -{ - double xmm = _x-_m; - if (_s <= 0.0) return (-NEARINFINITY); - //fn_DisplayError("cstz.c/tz_lognormalpdf(): standard deviation must be positive"); - - return ( -LOGSQRTOF2PI - log(_s) - (1.0/(2.0*square(_s))) * square(xmm) ); -} -#undef LOGSQRTOF2PI - -//----------------------------------------------------------------------------------- -//----------------------------- Beta density function -----------------------------// -//--- p(x) = ( Gamma(a+b)/(Gamma(a)*Gamma(b)) ) x^(a-1) (1-x)^(b-1) for a>0 and b>0. -//--- E(x) = a/(a+b); var(x) = a*b/( (a+b)^2*(a+b+1) ); -//--- The density is finite if a,b>=1. -//--- Noninformative density: (1) a=b=1; (2) a=b=0.5; or (3) a=b=0. -//----------------------------------------------------------------------------------- -double tz_logbetapdf(double _x, double _a, double _b) -{ - if ((_x < 0.0) || (_x > 1.0) || (_a <=0.0) || (_b <= 0.0)) return (-NEARINFINITY); - if ((_x <= 0.0) && (_a != 1.0)) return (-NEARINFINITY); - //Note that it should be +infinity for a < 1.0. We return -infinity anyway for the purpose of giving zero LH. - if ((_x >= 1.0) && (_b != 1.0)) return (-NEARINFINITY); - //Note that it should be +infinity for b < 1.0. We return -infinity anyway for the purpose of giving zero LH. - //fn_DisplayError("cstz.c/tz_logbetapdf(): x must be (0,1) and a, b must be positive"); - - if ((_x == 0.0 && _a == 1.0) || (_x == 1.0 && _b == 1.0)) return (-fn_betalog(_a, _b)); - else return ( -fn_betalog(_a, _b) + (_a-1.0)*log(_x) + (_b-1.0)*log(1.0-_x) ); -} -//----------------------------------------------------------------------------------- -//---------------------------- Gamma distribution ----------------------------------// -//--- p(x) = ( b^a/Gamma(a) ) x^(a-1) exp(-bx) for a>0 and b>0. -//--- where a is shape and b is inverse scale (rate) parameter. -//--- E(x) = a/b; var(x) = a/b^2; -//--- Noninformative distribution: a,b -> 0. -//--- The density function is finite if a >= 1. -//----------------------------------------------------------------------------------- -double tz_loggammapdf(double _x, double _a, double _b) -{ - if (_x < 0.0 || _a <= 0.0 || _b <= 0.0) return (-NEARINFINITY); - if (_x <= 0.0 && _a != 1.0) return (-NEARINFINITY); - //Note that it should be +infinity for a < 1.0. We return -infinity anyway for the purpose of giving zero LH. - //fn_DisplayError("cstz.c/tz_loggammapdf(): x, a, and b must be positive"); - - if (_x == 0.0 && _a == 1.0) return ( _a*log(_b) - fn_gammalog(_a) ); - else return ( _a*log(_b) - fn_gammalog(_a) + (_a-1.0)*log(_x) - _b*_x ); -} -//----------------------------------------------------------------------------------- -//------------------------ Inverse-Gamma distribution ------------------------------// -//--- p(x) = ( b^a/Gamma(a) ) x^(-a-1) exp(-b/x) for a>0 and b>0. -//--- where a is shape and b is scale parameter. -//--- E(x) = b/(a-1) for a>1; var(x) = b^2/( (a-1)^2*(a-2) ) for a>2; -//--- Noninformative distribution: a,b -> 0. -//--- How to draw: (1) draw z from Gamma(a,b); (2) let x=1/z. -//----------------------------------------------------------------------------------- -double tz_loginversegammapdf(double _x, double _a, double _b) -{ - //This denisity is always finite. - //If a < 1.0, 1st moment does not exist, - // a < 2.0, 2nd moment does not exist, - // a < 3.0, 3rd moment does not exist, - // a < 4.0, 4th moment does not exist. - - if (_x < 0.0 || _a <= 0.0 || _b <= 0.0) return (-NEARINFINITY); - //fn_DisplayError("cstz.c/tz_loginversegammapdf(): x, a, and b must be positive"); - - return ( _a*log(_b) - fn_gammalog(_a) - (_a+1.0)*log(_x) - _b /_x ); -} - - - - - - - -//<<--------------- -// P2 algorithm ??????? -//--------------->> -void psqr(double *q, int *m, double x, const double *p, int n) -{ - //Outputs: - // q: n-by-1 vector of - // m: n-by-1 vector of - // x: a random draw. - //------ - //Inputs: - // p: n-by-1 vector of cumulative cut-off probabilties for the error bands. - static double qm, dq; - static int i, dm, dn; - - for (i=0; q[i]<=x && i<n; i++) ; - if (i==0) { q[0]=x; i++; } - if (i==n) { q[n-1]=x; i--; } - for (; i<n; i++) m[i]++; - for (i=1; i<n-1; i++) { - dq = p[i]*m[n-1]; - if (m[i]+1<=dq && (dm=m[i+1]-m[i])>1) { - dn = m[i]-m[i-1]; - dq = ((dn+1)*(qm=q[i+1]-q[i])/dm+ - (dm-1)*(q[i]-q[i-1])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - q[i] += dq; - m[i]++; - } else - if (m[i]-1>=dq && (dm=m[i]-m[i-1])>1) { - dn = m[i+1]-m[i]; - dq = ((dn+1)*(qm=q[i]-q[i-1])/dm+ - (dm-1)*(q[i+1]-q[i])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - q[i] -= dq; - m[i]--; - } - } -} -void piksrt(double *arr, int n) -{ - //Outputs: - // arr: replaced by new values. - //Inputs: - // arr: n-by-1 vector ?????? - int i, j; - double a; - - for (j=1; j<n; j++) { - a = arr[j]; - for (i=j-1; i>=0 && arr[i]>a; i--) - arr[i+1] = arr[i]; - arr[i+1]=a; - } -} - - - -//---------------------------- Some high-level VAR functions --------------------- -void fn_lev2growthanual(TSdmatrix *levgro_dm, const TSdmatrix *levgrominus1_dm, const TSivector *indxlogper_iv) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: - // levgro_dm: nfores-by-nvar matrix of annual growth rates (percent) except interest rates and unemployment rate in level. - //Inputs: - // levgro_dm: nfores-by-nvar matrix of log levels and, say, interest rates already divided by 100. - // levgrominus1_dm: qm-by-nvar matrix in the previous year (not necessarily a calendar year). - // indxlogper_iv: nvar-by-1 array of 1, 2, or 4 for the list of endogenous variables. 1: decimal point with annual rate like the interest rate; 2: decimal point (NOT at annual rate) like the unemployment rate; 4: log level value. - int ti, vj, qm, nvar, nfores, totrows; - TSdmatrix *tf_levgroplus_dm = NULL; - - if ((qm=levgrominus1_dm->nrows) != 12 && qm != 4) fn_DisplayError("fn_lev2growthanual(): the second input must have 12 or 4 rows for monthly or quarterly data"); - if ((nvar=levgrominus1_dm->ncols) != indxlogper_iv->n || nvar != levgro_dm->ncols) fn_DisplayError("fn_lev2growthanual(): column dimensions and vector dimension of all inputs must be same"); - - //=== Memory allocation for this function. - tf_levgroplus_dm = CreateMatrix_lf(qm+(nfores=levgro_dm->nrows), nvar=levgrominus1_dm->ncols); - - - CopySubmatrix0(tf_levgroplus_dm, (TSdmatrix *)levgrominus1_dm, 0, 0, qm, nvar); - CopySubmatrix(tf_levgroplus_dm, qm, 0, levgro_dm, 0, 0, nfores, nvar); - totrows = qm + nfores; - for (vj=nvar-1; vj>=0; vj--) { - switch (indxlogper_iv->v[vj]) { - case 4: - for (ti=nfores-1; ti>=0; ti--) - levgro_dm->M[mos(ti, vj, nfores)] = 100.0*( exp(tf_levgroplus_dm->M[mos(ti+qm, vj, totrows)] - tf_levgroplus_dm->M[mos(ti, vj, totrows)]) - 1.0 ); - break; - case 2: - case 1: - for (ti=nfores-1; ti>=0; ti--) - levgro_dm->M[mos(ti, vj, nfores)] *= 100.0; - break; - default: - fn_DisplayError("fn_lev2growthanual(): the input vector, indxlogper_iv, must have the integer values 4, 2, and 1"); - } - } - - - - //=== Destroys memory allocated for this function. - tf_levgroplus_dm = DestroyMatrix_lf(tf_levgroplus_dm); -} - - - -//------------------- -// Generating a counterfactual paths conditional on S_T and specified shocks_t(s_t) for _sm (a switching model). -//------------------- -void fn_ctfals_givenshocks_sm(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, - const TSivector *S_Tdraw_iv, const TSdcell *Bsdraw_dc, const TSdcell *A0sdrawinv_dc, const TSivector *noshocks_iv) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: ctflasdrawtran = xprimeminus1*Bsdraw{s} + shocks'*A0sdrawinv{s}. - // ctfalstran_dm: nvar-by-nfores where nfores (=eloc-bloc+1) is the forecast horizon. Conterfactual paths of nvar variables. - // xprimeminus1_dv: updated 1-by-ncoef right-hand-side variables at the end of the forecast horizon, ready for the forecasts at the step nfores+1. - // In the order of [nvar for 1st lag, ..., nvar for last lag, other exogenous terms, const term]. - //Inputs: - // xprimeminus1_dv: 1-by-ncoef vector of right-hand-side variables at the beginning of the forecast horizon. - // bloc: beginning location for the forecast horizon. - // eloc: end location for the forecast horizon. - // strshockstran_dm: nvar-by-T. Matrix transpose of unit-variance (time-invariant) structural shocks. - // S_Tdraw_iv: fss-by-1 or SampleSize-by-1 vector of (s_t|I_T,theta). - // Bsdraw_dc: nStates cells. For each cell, ncoef-by-nvar reduced-form coefficient matrix. - // A0sdrawinv_dc: nStates cells. For each cell, nvar-by-nvar inverse of contemporaneous coefficient matrix. - // noshocks_iv: a (no greater than nvar) vector of base-0 integers indicating the corresponding equations whose shocks are set - // to zero. Each element of this integer vector must be less than nvar. - int ti, si, vi; - int nfores = eloc - bloc + 1, - nvar = ctfalstran_dm->nrows, - ncoefminusnvar7const = Bsdraw_dc->C[0]->nrows - nvar - 1; - TSdvector ctfals_sdv, strshocks_sdv; - TSivector STnfores_siv; //nfores-by-1 vector of s_t's. - - if (nfores < 1) fn_DisplayError("cstz.c/fn_ctfals_givenshocks_sm(): Number of forecast steps must be greater than 0"); - if (eloc > strshockstran_dm->ncols-1) fn_DisplayError("cstz.c/fn_ctfals_givenshocks_sm(): End location in the forecast horizon must be no greater than the sample size"); - if (nvar != strshockstran_dm->nrows) fn_DisplayError("cstz.c/fn_ctfals_givenshocks_sm(): the number of rows of strshockstran_dm must be equal to nvar"); - - - //******* WARNING: The operation involves ctfals_sdv.v, strshocks_sdv.v, STnfores_siv.v ******* - //******* throughout this function is dangerous because of pointer movements. ******* - //******* But it gives us efficiency. ******* - ctfals_sdv.n = nvar; - ctfals_sdv.v = ctfalstran_dm->M; //Points to the beginning of the 1st column of ctfalstran_dm. - //+ - strshocks_sdv.n = nvar; - strshocks_sdv.flag = V_DEF; - strshocks_sdv.v = strshockstran_dm->M + strshockstran_dm->nrows*bloc; //Points to the beginning of the bloc_th column of strshockstran_dm. - for (vi=noshocks_iv->n-1; vi>=0; vi--) - strshocks_sdv.v[noshocks_iv->v[vi]] = 0.0; //Set shocks in those equations to be zero. - //+ - STnfores_siv.n = nfores; - STnfores_siv.flag = V_DEF; - STnfores_siv.v = S_Tdraw_iv->v + bloc; //Points to the bloc_th position of S_Tdraw_iv. - - - for (ti=0; ti<nfores; ti++) { - //Must have a forward recursion. - VectorTimesMatrix(&ctfals_sdv, xprimeminus1_dv, Bsdraw_dc->C[si=STnfores_siv.v[ti]], 1.0, 0.0, 'N'); - VectorTimesMatrix(&ctfals_sdv, &strshocks_sdv, A0sdrawinv_dc->C[si], 1.0, 1.0, 'N'); - //=== Updates the recursion. The order matters. - memmove(xprimeminus1_dv->v+nvar, xprimeminus1_dv->v, ncoefminusnvar7const*sizeof(double)); - memcpy(xprimeminus1_dv->v, ctfals_sdv.v, nvar*sizeof(double)); - //+ - if (ti < nfores-1) //This is needed to prevent memory leak at the end when we have strshocks_sdv.v[noshocks_iv->v[vi]] = 0.0. - { - ctfals_sdv.v += nvar; //Points to the beginning of the next column of ctfalstran_dm. - strshocks_sdv.v += nvar; //Points to the beginning of the next column of strshockstran_dm. - for (vi=noshocks_iv->n-1; vi>=0; vi--) - strshocks_sdv.v[noshocks_iv->v[vi]] = 0.0; //Set shocks in those equations to be zero. - } - } - - ctfalstran_dm->flag = M_GE; -} - - -//------------------- -// Generating a random sequence of counterfactual (ctfal) paths for _sm (a switching model). -//------------------- -void fn_ctfals_sm(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, const TSivector *Snfores_iv, const TSdcell *Bsdraw_dc, const TSdcell *A0sdrawinv_dc) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: ctflasdrawtran = xprimeminus1*Bsdraw{s} + shocks'*A0sdrawinv{s}. - // ctfalstran_dm: nvar-by-nfores where nfores (=eloc-bloc+1) is the forecast horizon. Conterfactual paths of nvar variables. - // xprimeminus1_dv: updated 1-by-ncoef right-hand-side variables at the end of the forecast horizon, ready for the forecasts at the step nfores+1. - // In the order of [nvar for 1st lag, ..., nvar for last lag, other exogenous terms, const term]. - //Inputs: - // xprimeminus1_dv: 1-by-ncoef vector of right-hand-side variables at the beginning of the forecast horizon. - // bloc: beginning location for the forecast horizon. - // eloc: end location for the forecast horizon. - // strshockstran_dm: nvar-by-T. Matrix transpose of unit-variance (time-invariant) structural shocks. - // Snfores_iv: nfores-by-1 vector of states where each element is less than nStates. - // Bsdraw_dc: nStates cells. For each cell, ncoef-by-nvar reduced-form coefficient matrix. - // A0sdrawinv_dc: nStates cells. For each cell, nvar-by-nvar inverse of contemporaneous coefficient matrix. - int ti, si; - int nfores = eloc - bloc + 1, - nvar = ctfalstran_dm->nrows, - ncoefminusnvar7const = Bsdraw_dc->C[0]->nrows - nvar - 1; - TSdvector ctfals_sdv, strshocks_sdv; - - if (nfores < 1) fn_DisplayError("cstz.c/fn_ctfals_sm(): Number of forecast steps must be greater than 0"); - if (eloc > strshockstran_dm->ncols-1) fn_DisplayError("cstz.c/fn_ctfals_sm(): End location in the forecast horizon must be no greater than the sample size"); - if (nvar != strshockstran_dm->nrows) fn_DisplayError("cstz.c/fn_ctfals_sm(): the number of rows of strshockstran_dm must be equal to nvar"); - - - //******* WARNING: The operation involves ctfals_sdv.v and strshocks_sdv.v throughout this function ******* - //******* is dangerous because of pointer movements. But it gives us efficiency. ******* - ctfals_sdv.n = nvar; - ctfals_sdv.v = ctfalstran_dm->M; //Points to the beginning of the 1st column of ctfalstran_dm. - strshocks_sdv.n = nvar; - strshocks_sdv.flag = V_DEF; - strshocks_sdv.v = strshockstran_dm->M + strshockstran_dm->nrows*bloc; //Points to the beginning of the bloc_th column of strshockstran_dm. - - - for (ti=0; ti<nfores; ti++) { - //Must have a forward recursion. - VectorTimesMatrix(&ctfals_sdv, xprimeminus1_dv, Bsdraw_dc->C[si=Snfores_iv->v[ti]], 1.0, 0.0, 'N'); - VectorTimesMatrix(&ctfals_sdv, &strshocks_sdv, A0sdrawinv_dc->C[si], 1.0, 1.0, 'N'); - //=== Updates the recursion. The order matters. - memmove(xprimeminus1_dv->v+nvar, xprimeminus1_dv->v, ncoefminusnvar7const*sizeof(double)); - memcpy(xprimeminus1_dv->v, ctfals_sdv.v, nvar*sizeof(double)); - //+ - ctfals_sdv.v += nvar; //Points to the beginning of the next column of ctfalstran_dm. - strshocks_sdv.v += nvar; //Points to the beginning of the next column of strshockstran_dm. - } - - ctfalstran_dm->flag = M_GE; -} - -//------------------- -// Generating a random sequence of counterfactual (ctfal) paths with only monetary policy equation changing to a specified regime while holding other equations' regimes the same as historical ones. -//------------------- -void fn_ctfals_policyonly(TSdmatrix *ctfalstran_dm, TSdvector *xprimeminus1_dv, const int bloc, const int eloc, const TSdmatrix *strshockstran_dm, const TSivector *S_Tdraw_iv, const int statecon, const int selej, const TSdcell *A0sdraw_dc, const TSdcell *Apsdraw_dc) -{ - //******* It is the user's responsibility to check memory allocations and dimensions of inputs. ******* - //Outputs: ctflasdrawtran = xprimeminus1*Bsdraw{s} + shocks'*A0sdrawinv{s}. - // ctfalstran_dm: nvar-by-nfores where nfores (=eloc-bloc+1) is the forecast horizon. Conterfactual paths of nvar variables. - // xprimeminus1_dv: updated 1-by-ncoef right-hand-side variables at the end of the forecast horizon, ready for the forecasts at the step nfores+1. - // In the order of [nvar for 1st lag, ..., nvar for last lag, other exogenous terms, const term]. - //Inputs: - // xprimeminus1_dv: 1-by-ncoef vector of right-hand-side variables at the beginning of the forecast horizon. - // bloc: beginning location for the forecast horizon. - // eloc: end location for the forecast horizon. - // strshockstran_dm: nvar-by-T. Matrix transpose of unit-variance (time-invariant) structural shocks. - // S_Tdraw_iv; fss-by-1 or SampleSize-by-1. Stores (s_t|I_T,theta). - // statecon: the ith state conditioned for counterfactuals (base 0). Must be < nStates. - // selej: location (base 0) of the selected structural equation (e.g., the monetary policy equation). Only for (1) long-run and short-run responses and (2) counterfactuals with only policy equation at specific state imposed. - // A0sdraw_dc: nStates cells. For each cell, nvar-by-nvar contemporaneous coefficient matrix. - // Apsdraw_dc: nStates cells. For each cell, ncoef-by-nvar lagged structural coefficient matrix. - int ti, si; - int errflag = -2, //Initialized to be unsuccessful. When 0, successful. - nfores = eloc - bloc + 1, - nvar = ctfalstran_dm->nrows, - ncoef = Apsdraw_dc->C[0]->nrows, - nStates = Apsdraw_dc->ncells, - ncoefminusnvar7const = ncoef - nvar - 1; - TSdvector ctfals_sdv, strshocks_sdv; - TSivector sact_nfores_siv; - // - TSivector *tf_rnstates_iv = CreateConstantVector_int(nStates, nvar), //nStates-by-1: ncoef for each element for *p*_dc or nvar for each elment for *0*_dc. - *tf_cnstates_iv = CreateConstantVector_int(nStates, nvar); //nStates-by-1: nvar for each element for both *p*_dc and *0*_dc. - TSdcell *tf_A0sinv_dc = NULL; - TSdcell *tf_Aps_dc = NULL, - *tf_Bs_dc = NULL; - - - - if (nfores < 1) fn_DisplayError("cstz.c/fn_ctfals_policyonly(): Number of forecast steps must be greater than 0"); - if (eloc > strshockstran_dm->ncols-1) fn_DisplayError("cstz.c/fn_ctfals_policyonly(): End location in the forecast horizon must be no greater than the sample size"); - if (nvar != strshockstran_dm->nrows) fn_DisplayError("cstz.c/fn_ctfals_policyonly(): the number of rows of strshockstran_dm must be equal to nvar"); - - - //=== Memory allocation. - tf_A0sinv_dc = CreateCell_lf(tf_rnstates_iv, tf_cnstates_iv); //Note rnstates_iv and cnstates_iv are already assigned right values. - //+ - for (si=nStates-1; si>=0; si--) tf_rnstates_iv->v[si] = ncoef; //Note rnstates_iv is already assigned right values. - tf_Aps_dc = CreateCell_lf(tf_rnstates_iv, tf_cnstates_iv); - tf_Bs_dc = CreateCell_lf(tf_rnstates_iv, tf_cnstates_iv); - - - //******* WARNING: The operation involves ctfals_sdv.v and strshocks_sdv.v throughout this function ******* - //******* is dangerous because of pointer movements. But it gives us efficiency. ******* - ctfals_sdv.n = nvar; - ctfals_sdv.v = ctfalstran_dm->M; //Points to the beginning of the 1st column of ctfalstran_dm. - strshocks_sdv.n = nvar; - strshocks_sdv.flag = V_DEF; - strshocks_sdv.v = strshockstran_dm->M + strshockstran_dm->nrows*bloc; //Points to the beginning of the bloc_th column of strshockstran_dm. - //+ - sact_nfores_siv.n = nfores; - sact_nfores_siv.flag = V_DEF; - sact_nfores_siv.v = S_Tdraw_iv->v + bloc; //Points to the beginning of the bloc_th element of S_Tdraw_iv. - - //=== Sticks the policy equation at the statecon_th state to A0s and A0p. - for (si=nStates-1; si>=0; si--) { - CopyMatrix0(tf_A0sinv_dc->C[si], A0sdraw_dc->C[si]); //tf_A0sinv_dc is A0s for a moment. - CopyMatrix0(tf_Aps_dc->C[si], Apsdraw_dc->C[si]); - //=== Sticks the specified regime statecon in the counterfactual period. - CopySubmatrix(tf_A0sinv_dc->C[si], 0, selej, A0sdraw_dc->C[statecon], 0, selej, nvar, 1); - CopySubmatrix(tf_Aps_dc->C[si], 0, selej, Apsdraw_dc->C[statecon], 0, selej, ncoef, 1); - - if ( errflag=BdivA_rgens(tf_Bs_dc->C[si], tf_Aps_dc->C[si], '/', tf_A0sinv_dc->C[si]) ) { - //tf_A0sinv_dc is at this moment tf_A0s_dc. - printf(".../cstz.c/fn_ctfals_policyonly(): tf_Bs_dc->C[si] -- errors when calling BdivA_rgens() with error flag %d", errflag); - exit(EXIT_FAILURE); - } - if ( errflag=invrgen(tf_A0sinv_dc->C[si], tf_A0sinv_dc->C[si]) ) { - printf(".../cstz.c/fn_ctfals_policyonly(): tf_A0sinv_dc->C -- errors when calling invrgen() with error flag %d", errflag); - exit(EXIT_FAILURE); - } - } - - for (ti=0; ti<nfores; ti++) { - //Must have a forward recursion. - VectorTimesMatrix(&ctfals_sdv, xprimeminus1_dv, tf_Bs_dc->C[si=sact_nfores_siv.v[ti]], 1.0, 0.0, 'N'); - VectorTimesMatrix(&ctfals_sdv, &strshocks_sdv, tf_A0sinv_dc->C[si], 1.0, 1.0, 'N'); - //=== Updates the recursion. The order matters. - memmove(xprimeminus1_dv->v+nvar, xprimeminus1_dv->v, ncoefminusnvar7const*sizeof(double)); - memcpy(xprimeminus1_dv->v, ctfals_sdv.v, nvar*sizeof(double)); - //+ - ctfals_sdv.v += nvar; //Points to the beginning of the next column of ctfalstran_dm. - strshocks_sdv.v += nvar; //Points to the beginning of the next column of strshockstran_dm. - } - - ctfalstran_dm->flag = M_GE; - - //=== Destroys memory allocated for this function. - tf_rnstates_iv = DestroyVector_int(tf_rnstates_iv); - tf_cnstates_iv = DestroyVector_int(tf_cnstates_iv); - tf_A0sinv_dc = DestroyCell_lf(tf_A0sinv_dc); - tf_Aps_dc = DestroyCell_lf(tf_Aps_dc); - tf_Bs_dc = DestroyCell_lf(tf_Bs_dc); -} - - -#if defined (INTELCMATHLIBRARY) -void fn_impulse(TSdmatrix *imftran_dm, const TSdmatrix *Bh_dm, const TSdmatrix *swishtran_dm, const int nlags, const int imsteps) -{ - //Outputs (memory allocated already): - // imftran_dm: nvar^2-by-imsteps where imf_dm (imsteps-by-nvar^2) is in the same format as in RATS. - // Rows: nvar responses to the 1st shock, ..., nvar responses to the last shock. - // Columns: steps of impulse responses. - //Inputs: - // Bh_dm: ldbh-by-nvar reduced-form coefficient matrix (where ldbh is the leading dimension of Bh_dm and must be at least nvar*nlags) of the form: - // Y(T*nvar) = X*Bh_dm + U, X: T*ldbh(ldbh may include all exogenous terms). Note that columns corresponding equations. - // Columns of Bh_dm: nvar variables for the 1st lag, ..., nvariables for the last lag + (possible exogenous terms) + const = ldbh. - // swishtran_dm: transponse of nvar-by-nvar inv(A0) in the structural model y(t)A0 = e(t). - // nlags: lag length (number of lags); - // imsteps: steps for impulse responses. - - int i, j, - nvar, nvar2, ldbh, jmax; - double *Bh, *imftran; - - if (!imftran_dm) fn_DisplayError(".../fn_impulse(): the output impulse matrix imftran_dm must be created (memory-allocated)"); - else if (!Bh_dm || !swishtran_dm) fn_DisplayError(".../fn_impulse(): the input matrices Bh_dm and swich_dm must be created (memory-allocated)"); - else if (!Bh_dm->flag || !swishtran_dm->flag) fn_DisplayError(".../fn_impulse(): the input matrices Bh_dm and swich_dm must be given legal values"); - else if (nlags < 1) fn_DisplayError(".../fn_impulse(): the lag length, nlags, must be equal to or greater than 1"); - else if (imsteps <1) fn_DisplayError(".../fn_impulse(): the number of steps for impulse responses, imsteps, must be must be equal to or greater than 1"); - else if ((nvar = swishtran_dm->nrows) != swishtran_dm->ncols ) fn_DisplayError(".../fn_impulse(): the input matrix, swishtran_dm, must be square"); - else if (nvar != Bh_dm->ncols) fn_DisplayError(".../fn_impulse(): the number of columns in Bh_dm must equal to the number of equations or endogenous variables"); - else if (square(nvar) != imftran_dm->nrows || imsteps != imftran_dm->ncols) fn_DisplayError(".../fn_impulse(): Dimension of impulse matrix input matrix imftran_dm is incompatible with other input matrices or with the number of steps"); - - //if ( !(imftran_dm->flag & M_CN) && imftran_dm[0] !=0.0 ) InitializeConstantMatrix_lf(imftran_dm, 0.0); - InitializeConstantMatrix_lf(imftran_dm, 0.0); //Cumulative. Always initialize it to zero. - - - nvar2 = square(nvar); - Bh = Bh_dm->M; - imftran = imftran_dm->M; - - - if ((ldbh=Bh_dm->nrows) < nvar*nlags) fn_DisplayError("Input matrix Bh_dm must have at least nvar*nlags rows"); - cblas_dcopy(nvar2, swishtran_dm->M, 1, imftran, 1); - for (i=1; i<imsteps; i++) { - jmax = i<nlags?i:nlags; - for (j=0; j<jmax; j++) { - cblas_dgemm(CblasColMajor, CblasTrans, CblasNoTrans, nvar, nvar, nvar, - 1.0, &Bh[j*nvar], ldbh, &imftran[(i-j-1)*nvar2], nvar, - 1.0, &imftran[i*nvar2], nvar); - } - } - - - imftran_dm->flag = M_GE; -} -#else -//No default routine yet. 7 Oct 2003 -#endif - - -TSdmatrix *tz_impulse2levels(TSdmatrix *imflev_dm, TSdmatrix *imf_dm, TSivector *vlist2levels_iv) -{ - //Converting imf_dm to the level impulse responses imflev_dm according to vlist2levels_iv. - //If imflev_dm = imf_dm, then the value of imf_dm will be replaced by the new value. - // - //imf_dm; nsteps-by-nvar^2 where - // rows: steps of impulse responses; - // columns: nvar responses to the 1st shock, ..., nvar responses to the last shock. - //vlist2levels_iv; must be in ascending order. A list of base-0 variables to be converted to levels. Example: [0 1 3] - int _i, _j, _t; - int largestvar; //last variable corresponding to the largest number. - int _n, nsq, imsteps; - TSdvector imf_sdv; - TSdvector imflev_sdv; - - if (!imf_dm || !imf_dm->flag) - fn_DisplayError(".../cstz.c/tz_impulse2levels(): the input matrix imf_dm must be (1) allocated memory and (2) given legal values"); - - if (!imflev_dm) { - imflev_dm = CreateMatrix_lf(imf_dm->nrows, imf_dm->ncols); - imflev_dm->flag = M_GE; //Legal values will be given below. - } - else if (imflev_dm != imf_dm ) - if ( (imflev_dm->nrows != imf_dm->nrows) || (imflev_dm->ncols != imf_dm->ncols)) - fn_DisplayError(".../cstz.c/tz_impulse2levels(): dimensions of the input matrix imf_dm and the output matrix imflev_dm must match exactly"); - else imflev_dm->flag = M_GE; //Legal values will be given below. - - largestvar = vlist2levels_iv->v[vlist2levels_iv->n-1]+1; - _n = (int)floor(sqrt(imf_dm->ncols)+0.5); - nsq = imf_dm->ncols; - if ( square(largestvar) > nsq) - fn_DisplayError(".../cstz.c/tz_impulse2levels(): the last specified variable in vlist2levels_iv is out of the range of impulse responses"); - - - imflev_sdv.n = imf_sdv.n = imf_dm->nrows; - imflev_sdv.flag = imf_sdv.flag = V_DEF; //Legal values will be given below. - imsteps = imf_dm->nrows; - for (_i=vlist2levels_iv->n-1; _i>=0; _i--) - for (_j=vlist2levels_iv->v[_i]; _j<nsq; _j += _n) { - imflev_sdv.v = imflev_dm->M + _j*imsteps; - imf_sdv.v = imf_dm->M + _j*imsteps; - imflev_sdv.v[0] = imf_sdv.v[0]; - for (_t=1; _t<imsteps; _t++) - imflev_sdv.v[_t] = imflev_sdv.v[_t-1] + imf_sdv.v[_t]; - } - - return (imflev_dm); -} - - -void DynamicResponsesForStructuralEquation(TSdmatrix *Resps_dm, const int loclv, const int nlags, const TSdvector *a0p_dv) -{ - //Outputs: - // Resps_dm: k-by-nvar where k responses of the loclv_th variable to the _ith variable for _i=1:nvar. - // The loclv_th column of Resps_dm is meaningless but as a debug check should be close to -1 for the kth responses as k->\infty. - //Inputs: - // loclv: loction of the left-hand variable either in difference (growth) or level. - // nlags: number of lags. - // a0p_dv: m-by-1 vector of [a0 a+] either in difference (growth) or level for the strctural equation considered where m>= (nlags+1)*nvar because m may - // include the constant term. Note a0 is on the left hand side of the equation and a+ is on the right hand side of the equation. - int vi, li; - int nvar, K; - double tmpdsum, c0, a0inv; - TSdvector resps_sdv; //k-by-1. - //---- - TSdvector *a1_dv = NULL; //nlags-by-1. - - if (!Resps_dm || !a0p_dv || !a0p_dv->flag) fn_DisplayError(".../cstz/DynamicResponsesForStructuralEquation(): (1) both input vector and output matrix must be allocated memory; (2) the input vector must have legal values"); - if (a0p_dv->n < (nlags+1)*(nvar=Resps_dm->ncols)) fn_DisplayError(".../cstz/DynamicResponsesForStructuralEquation(): the length of the input vector must be at least (nvar+1)*nlags"); - if (loclv >= nvar || loclv < 0) fn_DisplayError(".../cstz/DynamicResponsesForStructuralEquation(): the location for the left-hand-side variable must be between 0 and number of variables-1, inclusive"); - a1_dv = CreateVector_lf(nlags); - a1_dv->flag = V_DEF; //which will be given legal values below. - - resps_sdv.n = K = Resps_dm->nrows; - resps_sdv.flag = V_UNDEF; - - a0inv = 1.0/a0p_dv->v[loclv]; - for (li=nlags; li>=1; li--) //Note li=1; li<=nlags, NOT li=0; li<nlags. - a1_dv->v[li-1] = a0p_dv->v[loclv+nvar*li]*a0inv; - //Constructing the lagged coefficients for the loclv_th variable. - for (vi=nvar-1; vi>=0; vi--) { - //=== Constructing the constant term. - tmpdsum = - a0p_dv->v[vi]; //Assigned to -a_0. - for (li=nlags; li>=1; li--) //Note li=1; li<=nlags, NOT li=0; li<nlags. - tmpdsum += a0p_dv->v[vi+nvar*li]; - c0 = tmpdsum*a0inv; - //Done with t* array. - - //=== Getting dynamic responses to the vi_th variable. - resps_sdv.v = Resps_dm->M + vi*K; - DynamicResponsesAR(&resps_sdv, c0, a1_dv); - } - Resps_dm->flag = M_GE; - - - //=== Destroys memory allocated for this function only. - a1_dv = DestroyVector_lf(a1_dv); -} - - - -void DynamicResponsesAR(TSdvector *resps_dv, const double c0, const TSdvector *a1_dv) -{ - //Outputs: - // resps_dv: k-by-1 where k responses r_{t+1} to r_{t+k} are computed from r_{t+1} = c0 + a1'*[r_t; ...; r_{t-nlags+1}]. - //Inputs: - // c0: constant term. - // a1_dv: nlags-by-1 vector of coefficients in the AR process. - int ti; - int k, nlags; - double *rv; - TSdvector *rlags_dv = NULL; - - if (!resps_dv || !a1_dv || !a1_dv->flag) fn_DisplayError(".../cstz/DynamicResponsesAR(): (1) both input and output vectors must be allocated memory; (2) the input vector must have legal values"); - rlags_dv = CreateConstantVector_lf(nlags=a1_dv->n, 0.0); - - rv = resps_dv->v; - k = resps_dv->n; - - *(rlags_dv->v) = *rv = c0; - - - for (ti=1; ti<k; ti++) { - //Note ti=1, NOT ti=0. - rv[ti] = c0 + VectorDotVector((TSdvector *)a1_dv, rlags_dv); - //=== Updating rlags_dv. - memmove(rlags_dv->v+1, rlags_dv->v, (nlags-1)*sizeof(double)); - *(rlags_dv->v) = rv[ti]; - } - resps_dv->flag = V_DEF; - - //=== Destroys memory allocated for this function only. - rlags_dv = DestroyVector_lf(rlags_dv); -} - - - - - -//---------------------------- Some regular vector or matrix operations --------------------- -double MinVector_lf(TSdvector *x_dv) { - //Input: no change for x_dv in this function. - int _i, n; - double minvalue; - double *v; - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/MinVector_lf(): Input vector x_dv must be (1) allocated memory and (2) assigned legal values"); - n = x_dv->n; - v = x_dv->v; - - minvalue = v[0]; - for (_i=n-1; _i>0; _i--) - if (v[_i]<minvalue) minvalue = v[_i]; - - return( minvalue ); -} - -TSdvector *ConvertVector2exp(TSdvector *y_dv, TSdvector *x_dv) -{ - //y=exp(x): output vector. If NULL, y will be created and memory-allocated. - //x: input vector. - TSdvector *z_dv=NULL; - #if !defined (INTELCMATHLIBRARY) - int _i; - #endif - - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/ConvertVector2exp(): input vector must be (1) created and (2) given legal values"); - - #if defined (INTELCMATHLIBRARY) - - if (!y_dv) - { - z_dv = CreateVector_lf(x_dv->n); - vdExp(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - return (z_dv); - } - else if (x_dv!=y_dv) - { - vdExp(x_dv->n, x_dv->v, y_dv->v); - y_dv->flag = V_DEF; - return (y_dv); - } - else - { - z_dv = CreateVector_lf(x_dv->n); - vdExp(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - CopyVector0(x_dv, z_dv); - DestroyVector_lf(z_dv); - return (x_dv); - } - - #else - - if (!y_dv) z_dv = CreateVector_lf(x_dv->n); - else z_dv = y_dv; - for (_i=x_dv->n-1; _i>=0; _i--) z_dv->v[_i] = exp(x_dv->v[_i]); - z_dv->flag = V_DEF; - return (z_dv); - - #endif -} -//--- -TSdvector *ConvertVector2log(TSdvector *y_dv, TSdvector *x_dv) -{ - //y=log(x): output vector. If NULL, y will be created and memory-allocated. - //x: input vector. - TSdvector *z_dv=NULL; - #if !defined (INTELCMATHLIBRARY) - int _i; - #endif - - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/ConvertVector2exp(): input vector must be (1) created and (2) given legal values"); - - #if defined (INTELCMATHLIBRARY) - - if (!y_dv) - { - z_dv = CreateVector_lf(x_dv->n); - vdLn(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - return (z_dv); - } - else if (x_dv!=y_dv) - { - vdLn(x_dv->n, x_dv->v, y_dv->v); - y_dv->flag = V_DEF; - return (y_dv); - } - else - { - z_dv = CreateVector_lf(x_dv->n); - vdLn(x_dv->n, x_dv->v, z_dv->v); - z_dv->flag = V_DEF; - CopyVector0(x_dv, z_dv); - DestroyVector_lf(z_dv); - return (x_dv); - } - - #else - - if (!y_dv) z_dv = CreateVector_lf(x_dv->n); - else z_dv = y_dv; - for (_i=x_dv->n-1; _i>=0; _i--) z_dv->v[_i] = log(x_dv->v[_i]); - z_dv->flag = V_DEF; - return (z_dv); - - #endif -} - -double tz_normofvector(TSdvector *x_dv, double p) -{ - double norm = 0.0; - int ki, _n; - double *v; - - if ( !x_dv || !x_dv->flag ) fn_DisplayError("/cstz.c/tz_normofvector(): Input x_dv must have (1) memory and (2) legal values"); - if (p<1.0) fn_DisplayError("/cstz.c/tz_normofvector(): The input p must be no less than 1.0"); - _n = x_dv->n; - v = x_dv->v; - - if (p==2.0) - { - for (ki=_n-1; ki>=0; ki--) norm += v[ki]*v[ki]; - norm = sqrt(norm); - } - else - { - printf("\n/cstz.c/tz_normofvector(): HELLO I TRICK YOU and YOU MUST DO fabs(p-2.0)<MICHINEZERO!!!!!!\n"); //???? - if (p==1.0) - for (ki=_n-1; ki>=0; ki--) norm += fabs(v[ki]); - else - { - for (ki=_n-1; ki>=0; ki--) norm += pow(fabs(v[ki]), p); - norm = pow(norm, 1.0/p); - } - } - - return (norm); -} - - - -//---------------------------- Not used often --------------------- -void fn_cumsum(double **aos_v, int *aods_v, double *v, int d_v) { - // Compute a cumulative sum of a vector. - // - // v: an n-by-1 vector. - // d_v: n -- size of the vector v to be used for a cumulative sum. - // aos_v: address of the pointer to the n-by-1 vector s_v. - // aods_v: address of the size of the dimension of s_v. - //---------- - // *aos_v: An n-by-1 vector of cumulative sum s_v. - // *aods_v: n -- size of the dimension for s_v. - - int ki; - - *aos_v = tzMalloc(d_v, double); - (*aods_v) = d_v; // n for the n-by-1 vector s_v. - *(*aos_v) = *v; - if (d_v>1) { - for (ki=1; ki<d_v; ki++) (*aos_v)[ki] = (*aos_v)[ki-1] + v[ki]; - } -} - - - -/** -void fn_ergodp(double **aop, int *aod, mxArray *cp) { - // Compute the ergodic probabilities. See Hamilton p.681. - // - // cp: n-by-n Markovian transition matrix. - // aop: address of the pointer to the n-by-1 vector p. - // aod: address of the size of the dimension of p. - //---------- - // *aop: n-by-1 vector of ergodic probabilities p. @@Must be freed outside this function.@@ - // *aod: n -- size of the dimension for p (automatically supplied within this function). - - mxArray *gpim=NULL, *gpid=NULL; // m: n-by-n eigvector matrix; d: n-by-n eigvalue diagonal. - double *gpim_p, *gpid_p; // _p: a pointer to the corresponding mxArray whose name occurs before _p. - //------- Note the following two lines will cause Matlab or C to crash because gpim has not been initialized so it points to garbage. - // double *gpim_p = mxGetPr(gpim); - // double *gpid_p = mxGetPr(gpid); - int eigmaxindx, // Index of the column corresponding to the max eigenvalue. - n, ki; - double gpisum=0.0, - eigmax, tmpd0; - - n=mxGetM(cp); // Get n for the n-by-n mxArray cp. - (*aod)=n; - - *aop = tzMalloc(n, double); - - gpim = mlfEig(&gpid,cp,NULL,NULL); - gpim_p = mxGetPr(gpim); - gpid_p = mxGetPr(gpid); - - eigmax = *gpid_p; - eigmaxindx = 0; - if (n>1) { - for (ki=1;ki<n;ki++) { - if (gpid_p[n*ki+ki] > eigmax) { - eigmax=gpid_p[n*ki+ki]; - eigmaxindx=ki; - } // Note that n*ki+ki refers to a diagonal location in the n-by-n matrix. - } - } - for (ki=0;ki<n;ki++) { - gpisum += gpim_p[n*eigmaxindx+ki]; // Sum over the eigmaxindx_th column. - } - tmpd0 = 1.0/gpisum; - for (ki=0;ki<n;ki++) { - (*aop)[ki] = gpim_p[n*eigmaxindx+ki]*tmpd0; // Normalized eigmaxindx_th column as ergodic probabilities. - } - - mxDestroyArray(gpim); // ????? free(gpim_p) - mxDestroyArray(gpid); -} -/**/ - - - -//---------- Must keep the following code forever. --------------- -/** -TSdp2m5 *CreateP2m5(const double p) -{ - TSdp2m5 *x_dp2m5 = tzMalloc(1, TSdp2m5); - - if (p<=0.0 && p>=1.0) fn_DisplayError(".../cstz.c/CreateP2m5_lf(): input probability p must be between 0.0 and 1.0"); - - x_dp2m5->cnt = 0; - x_dp2m5->ndeg = 0; - x_dp2m5->p = tzMalloc(5, double); - x_dp2m5->q = tzMalloc(5, double); - x_dp2m5->m = tzMalloc(5, int); - - x_dp2m5->p[0] = 0.00; - x_dp2m5->p[1] = 0.5*p; - x_dp2m5->p[2] = p; - x_dp2m5->p[3] = 0.5*(1.0+p); - x_dp2m5->p[4] = 1.00; - - return (x_dp2m5); -} -TSdp2m5 *DestroyP2m5(TSdp2m5 *x_dp2m5) -{ - if (x_dp2m5) { - free(x_dp2m5->m); - free(x_dp2m5->q); - free(x_dp2m5->p); - - free(x_dp2m5); - return ((TSdp2m5 *)NULL); - } - else return (x_dp2m5); -} -TSdvectorp2m5 *CreateVectorP2m5(const int n, const double p) -{ - int _i; - // - TSdvectorp2m5 *x_dvp2m5 = tzMalloc(1, TSdvectorp2m5); - - x_dvp2m5->n = n; - x_dvp2m5->v = tzMalloc(n, TSdp2m5 *); - for (_i=n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = CreateP2m5(p); - - return (x_dvp2m5); -} -TSdvectorp2m5 *DestroyVectorP2m5(TSdvectorp2m5 *x_dvp2m5) -{ - int _i; - - if (x_dvp2m5) { - for (_i=x_dvp2m5->n-1; _i>=0; _i--) - x_dvp2m5->v[_i] = DestroyP2m5(x_dvp2m5->v[_i]); - free(x_dvp2m5->v); - - free(x_dvp2m5); - return ((TSdvectorp2m5 *)NULL); - } - return (x_dvp2m5); -} -TSdmatrixp2m5 *CreateMatrixP2m5(const int nrows, const int ncols, const double p) -{ - int _i; - // - TSdmatrixp2m5 *X_dmp2m5 = tzMalloc(1, TSdmatrixp2m5); - - X_dmp2m5->nrows = nrows; - X_dmp2m5->ncols = ncols; - X_dmp2m5->M = tzMalloc(nrows*ncols, TSdp2m5 *); - for (_i=nrows*ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = CreateP2m5(p); - - return (X_dmp2m5); -} -TSdmatrixp2m5 *DestroyMatrixP2m5(TSdmatrixp2m5 *X_dmp2m5) -{ - int _i; - - if (X_dmp2m5) { - for (_i=X_dmp2m5->nrows*X_dmp2m5->ncols-1; _i>=0; _i--) - X_dmp2m5->M[_i] = DestroyP2m5(X_dmp2m5->M[_i]); - free(X_dmp2m5->M); - - free(X_dmp2m5); - return ((TSdmatrixp2m5 *)NULL); - } - else return (X_dmp2m5); -} -TSdcellp2m5 *CreateCellP2m5(const TSivector *rows_iv, const TSivector *cols_iv, const double p) -{ - int _i; - int ncells; - // - TSdcellp2m5 *X_dcp2m5 = tzMalloc(1, TSdcellp2m5); - - - if (!rows_iv || !cols_iv || !rows_iv->flag || !cols_iv->flag) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Input row and column vectors must be (1) created and (2) assigned legal values"); - if ((ncells=rows_iv->n) != cols_iv->n) fn_DisplayError(".../cstz.c/CreateCellP2m5(): Length of rows_iv must be the same as that of cols_iv"); - - - X_dcp2m5->ncells = ncells; - X_dcp2m5->C = tzMalloc(ncells, TSdmatrixp2m5 *); - for (_i=ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = CreateMatrixP2m5(rows_iv->v[_i], cols_iv->v[_i], p); - - return (X_dcp2m5); -} -TSdcellp2m5 *DestroyCellP2m5(TSdcellp2m5 *X_dcp2m5) -{ - int _i; - - if (X_dcp2m5) { - for (_i=X_dcp2m5->ncells-1; _i>=0; _i--) - X_dcp2m5->C[_i] = DestroyMatrixP2m5(X_dcp2m5->C[_i]); - free(X_dcp2m5->C); - - free(X_dcp2m5); - return ((TSdcellp2m5 *)NULL); - } - else return (X_dcp2m5); -} - - -#define P2REALBOUND DBL_MAX -int P2m5Update(TSdp2m5 *x_dp2m5, const double newval) -{ - //5-marker P2 algorithm. - //quantiles q[0] to q[4] correspond to 5-marker probabilities {0.0, p/5, p, (1+p)/5, 1.0}. - //Outputs: - // x_dp2m5->q, the markers x_dp2m5->m, is updated and only x_dp2m5->q[2] is used. - //Inputs: - // newval: new random number. - // - // January 2003. - int k, j; - double a; - double qm, dq; - int i, dm, dn; - - - if (!x_dp2m5) fn_DisplayError(".../cstz.c/P2m5Update(): x_dp2m5 must be created"); - - //if (isgreater(newval, -P2REALBOUND) && isless(newval, P2REALBOUND)) { - if (isfinite(newval) && newval > -P2REALBOUND && newval < P2REALBOUND) { - if (++x_dp2m5->cnt > 5) { - //Updating the quantiles and markers. - for (i=0; x_dp2m5->q[i]<=newval && i<5; i++) ; - if (i==0) { x_dp2m5->q[0]=newval; i++; } - if (i==5) { x_dp2m5->q[4]=newval; i--; } - for (; i<5; i++) x_dp2m5->m[i]++; - for (i=1; i<4; i++) { - dq = x_dp2m5->p[i]*x_dp2m5->m[4]; - if (x_dp2m5->m[i]+1<=dq && (dm=x_dp2m5->m[i+1]-x_dp2m5->m[i])>1) { - dn = x_dp2m5->m[i]-x_dp2m5->m[i-1]; - dq = ((dn+1)*(qm=x_dp2m5->q[i+1]-x_dp2m5->q[i])/dm+ - (dm-1)*(x_dp2m5->q[i]-x_dp2m5->q[i-1])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] += dq; - x_dp2m5->m[i]++; - } else - if (x_dp2m5->m[i]-1>=dq && (dm=x_dp2m5->m[i]-x_dp2m5->m[i-1])>1) { - dn = x_dp2m5->m[i+1]-x_dp2m5->m[i]; - dq = ((dn+1)*(qm=x_dp2m5->q[i]-x_dp2m5->q[i-1])/dm+ - (dm-1)*(x_dp2m5->q[i+1]-x_dp2m5->q[i])/dn)/(dm+dn); - if (qm<dq) dq = qm/dm; - x_dp2m5->q[i] -= dq; - x_dp2m5->m[i]--; - } - } - } - else if (x_dp2m5->cnt < 5) { - //Fills the initial values. - x_dp2m5->q[x_dp2m5->cnt-1] = newval; - x_dp2m5->m[x_dp2m5->cnt-1] = x_dp2m5->cnt-1; - } - else { - //=== Last filling of initial values. - x_dp2m5->q[4] = newval; - x_dp2m5->m[4] = 4; - //=== P2 algorithm begins with reshuffling quantiles and makers. - for (j=1; j<5; j++) { - a = x_dp2m5->q[j]; - for (k=j-1; k>=0 && x_dp2m5->q[k]>a; k--) - x_dp2m5->q[k+1] = x_dp2m5->q[k]; - x_dp2m5->q[k+1]=a; - } - } - } - else ++x_dp2m5->ndeg; //Throwing away the draws to treat exceptions. - - return (x_dp2m5->cnt); -} -#undef P2REALBOUND - -void P2m5MatrixUpdate(TSdmatrixp2m5 *X_dmp2m5, const TSdmatrix *newval_dm) -{ - int _i; - int nrows, ncols; - - if (!X_dmp2m5 || !newval_dm || !newval_dm->flag) fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): (1) Matrix struct X_dmp2m5 must be created and (2) input new value matrix must be crated and given legal values"); - if ((nrows=newval_dm->nrows) != X_dmp2m5->nrows || (ncols=newval_dm->ncols) != X_dmp2m5->ncols) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of rows and colums in X_dmp2m5 must match those of newval_dm"); - - for (_i=nrows*ncols-1; _i>=0; _i--) - P2m5Update(X_dmp2m5->M[_i], newval_dm->M[_i]); -} - -void P2m5CellUpdate(TSdcellp2m5 *X_dcp2m5, const TSdcell *newval_dc) -{ - int _i; - int ncells; - - if (!X_dcp2m5 || !newval_dc) fn_DisplayError(".../cstz.c/P2m5CellUpdate(): (1) Cell struct X_dcp2m5 must be created and (2) input new value cell must be crated and given legal values"); - if ((ncells=newval_dc->ncells) != X_dcp2m5->ncells) - fn_DisplayError(".../cstz.c/P2m5MatrixUpdate(): Number of cells in X_dcp2m5 must match that of newval_dc"); - - for (_i=ncells-1-1; _i>=0; _i--) - P2m5MatrixUpdate(X_dcp2m5->C[_i], newval_dc->C[_i]); -} -/**/ diff --git a/CFiles/fn_filesetup.c b/CFiles/fn_filesetup.c deleted file mode 100644 index f75c865663be4beee65409b85ed646116a7fb90f..0000000000000000000000000000000000000000 --- a/CFiles/fn_filesetup.c +++ /dev/null @@ -1,849 +0,0 @@ -/*********** - * Reads the input file name and output file names specified by the user from the command line with automatic default to - * both input an output files. -***********/ - -#include "fn_filesetup.h" - - -//----------------- -// For command line. -// Finds /ch in the command line. If found, returns the args location -// indexed by int and zero otherwise. -//----------------- -int fn_ParseCommandLine(int n_arg, char **args, char ch) { - int i; - for (i=1; i<n_arg; i++) - if ((args[i][0] == '/') && (args[i][1] == ch)) return i; - return 0; -} - - -//----------------- -// For command line. -// Finds /ch in the command line. If found returns a pointer -// to the string trailing /ch. If /ch is not found or there is -// no trailing string or the trailing string is another argument, -// then default_return is returned. No memory is allocated and -// the calling routine should not free the returned pointer. -//----------------- -char *fn_ParseCommandLine_String(int n_arg, char **args, char ch, char *default_return) { - int i=fn_ParseCommandLine(n_arg,args,ch); - if (i > 0) - if (strlen(args[i]) > 2) return args[i]+2; - // In case the user forgot typing a space between /ch and string following it, still returns a pointer to the string folloing /ch. - else if ((i+1 < n_arg) && (args[i+1][0] != '/')) return args[i+1]; - // Returns a pointer to the string that does NOT begin with / and there is a whitespace between /ch and the string. - return default_return; -} - - -//----------------- -// For command line. -// Finds /ch in the command line. If found returns the integer -// value of the string trailing /ch (e.g, the integer value is -// sample size or normalization index. If /ch is not found or there -// is no trailing string or the trailing string is another argument, -// then the default_return value is returned. -//----------------- -int fn_ParseCommandLine_Integer(int n_arg, char **args, char ch, int default_return) { - char *str=fn_ParseCommandLine_String(n_arg,args,ch,(char*)NULL); - return str ? atoi(str) : default_return; -} - - -//----------------- -// Finds proper location in the input data file. -// Returns 1 if the NUL-terminated string id is found -// in the file and 0 otherwise. The file pointer is set -// to the line immediately after the line containing id. -// If the string id has a length (including the new line -// character \n) more than 1023, it will be cut off at 1023. -//----------------- -int fn_SetFilePosition(FILE *f, const char *id) { - // As an output, the file pointer f will be reset to the beginning of the line next to the line headed by the string id. - char buffer[1024]; - size_t n=strlen(id); - int ch; - - if ( !f ) fn_DisplayError(".../fn_filesetup.c/fn_SetFilePosition(): the file, *f, must be created (opened)"); - if (n>1023) n=1023; - rewind(f); // Reset a file poiniter to the beginning of the file. There may be more efficient ways but this is good enough as long as the file is not too long. - while (fgets(buffer,1024,f)) { // Reads a line at a time in the file f (including \n and a NUL byte) until it matches id. fgets returns the pointer to the buffer and is often only used to check for EOF. - if (buffer[strlen(buffer)-1] != '\n') // -1 because the first element of the buffer is indexed by buffer[0]. - // If the end of the buffer (excluding the NUL byte) encounters no new line, f points to the next character after - // the end of the buffer on the SAME line (i.e., f does not point to the begining of the new line at this point). - // The following do loop will take f to point to the beginning of the new line. - do ch=fgetc(f); // Gets one character at a time until it reachs the end of the current '\n' or the end of the file EOF. - while ( (ch != '\n') && (ch != EOF) ); - if (!memcmp(buffer,id,n)) return 1; // The match is found. - } - return 0; // No match is found. -} - - -//----------------- -// Reads a string from the input data file with the NULL-terminated -// character but without the new line character. -// Returns 1 if the vector of characters is all read without -// errors and 0 otherwise. The file pointer is then moved -// to point to the next non-whitespace character after these -// characters. -//----------------- -int ReadNullTerminatedString(FILE *fptr, TScvector *x_cv) -{ - //x_cv will have a string without the new line character and with the NULL character. - //It is the user's responsiblity to ensure the string x_cv has an enough length to use fgets(). - // If not, it stops after x_cv->n-1 characters have been stored in x_cv->v and a NULL byte is appended to make it a string. - // If yet, reading stops after a newline character is read and stored in x_cv->v and a NULL byte is then appended. - int _n; - char *cv; - if (!fptr || !x_cv) fn_DisplayError(".../fn_filesetup.c/ReadNullTerminatedString(): File or input string must be created (memory-allocated)"); - _n = x_cv->n; - cv = x_cv->v; - if ( !fgets(cv, _n, fptr) ) return 0; - cv[strlen(cv)-1] = '\0'; //Removes the new line character and replaces it with the NULL character. - //The string length (size_t type) strlen(cv) does NOT count the NULL byte at the end, but it counts the new line character. - return 1; -} - - -//----------------- -// Reads a vector of integers from the input data file. -// Returns 1 if the vector of integers is all read without -// errors and 0 otherwise. The file pointer is then moved -// to point to the next non-whitespace character after these -// integers. -//----------------- -int fn_ReadVector_int(FILE *fptr, int *x_v, const int d_x_v) { - int ki; - for (ki=0; ki<d_x_v; ki++) - if ( fscanf(fptr, " %d ", &x_v[ki]) !=1 ) return 0; - return 1; -} -int ReadVector_int(FILE *fptr, TSivector *x_iv) { - int ki, _n, - *v; - if (!fptr || !x_iv) fn_DisplayError(".../fn_filesetup.c/ReadVector_int(): File or input matrix must be created (memory-allocated)"); - _n = x_iv->n; - v = x_iv->v; - for (ki=0; ki<_n; ki++) - if ( fscanf(fptr, " %d ", &v[ki]) != 1 ) return 0; - return 1; -} - - -//----------------- -// Reads a vector of doubles from the input data file. -// Returns 1 if the vector of doubles is all read without -// errors and 0 otherwise. The file pointer is then moved -// to point to the next non-whitespace character after these -// doubles. -//----------------- -int fn_ReadVector_lf(FILE *fptr, double *x_v, const int d_x_v) { - int ki; - for (ki=0; ki<d_x_v; ki++) - if ( fscanf(fptr, " %lf ", &x_v[ki]) !=1 ) return 0; - return 1; -} -int ReadVector_lf(FILE *fptr, TSdvector *x_dv) { - int ki, _n; - double *v; - if (!fptr || !x_dv) fn_DisplayError(".../fn_filesetup.c/ReadVector_lf(): File or input matrix must be created (memory-allocated)"); - _n = x_dv->n; - v = x_dv->v; - for (ki=0; ki<_n; ki++) - if ( fscanf(fptr, " %lf ", &v[ki]) != 1 ) return 0; - - x_dv->flag = V_DEF; - return 1; -} - - -//----------------- -// Reads a column-major matrix of integers from the input data file. -// Returns 1 if the matrix of integers is all read without -// errors and 0 otherwise. The file pointer is then moved -// to point to the next non-whitespace character after these -// integers. -//----------------- -int fn_ReadMatrix_int(FILE *fptr, int *x_m, const int r_x_m, const int c_x_m) { - int ki, kj; - - for (ki=0; ki<r_x_m; ki++) - for (kj=0; kj<c_x_m; kj++) - if ( fscanf(fptr, " %d ", &x_m[kj*r_x_m+ki]) !=1 ) return 0; - return 1; -} -int ReadMatrix_int(FILE *fptr, TSimatrix *X_im) -{ - int ki, kj; - int nrows, ncols; - if (!fptr || !X_im) fn_DisplayError(".../fn_filesetup.c/ReadMatrix_int(): File or input matrix must be created (memory-allocated)"); - - nrows = X_im->nrows; - ncols = X_im->ncols; - for (ki=0; ki<nrows; ki++) - for (kj=0; kj<ncols; kj++) - if ( fscanf(fptr, " %d ", (X_im->M+mos(ki,kj,nrows))) !=1 ) return 0; - return 1; -} - - -//----------------- -// Reads a column-major matrix of doubles from the input data file. -// Returns 1 if the matrix of doubles is all read without -// errors and 0 otherwise. The file pointer is then moved -// to point to the next non-whitespace character after these -// doubles. -//----------------- -int fn_ReadMatrix_lf(FILE *fptr, double *x_m, const int r_x_m, const int c_x_m) { - int ki, kj; - for (ki=0; ki<r_x_m; ki++) - for (kj=0; kj<c_x_m; kj++) - if ( fscanf(fptr, " %lf ", &x_m[kj*r_x_m+ki]) !=1 ) return 0; - return 1; -} -int ReadMatrix_lf(FILE *fptr, TSdmatrix *x_dm) { - //Outputs: - // x_dm (whose memory is already allocated): To be filled with the numbers from the file fptr. - int ki, kj, nrows, ncols; - double *M; - if (!fptr || !x_dm) fn_DisplayError(".../fn_filesetup.c/ReadMatrix_lf(): File or input matrix must be created (memory-allocated)"); - nrows = x_dm->nrows; - ncols = x_dm->ncols; - M = x_dm->M; - for (ki=0; ki<nrows; ki++) - for (kj=0; kj<ncols; kj++) - if ( fscanf(fptr, " %lf ", &M[mos(ki,kj,nrows)]) !=1 ) return 0; - - x_dm->flag = M_GE; - return 1; -} - - - -//----------------- -// Reads a column-major cell of double vectors from the input data file. -// Returns 1 if all data are read without errors and 0 otherwise. -// The file pointer is then moved to point to the next non-whitespace character -// after these doubles. -//----------------- -int ReadCellvec_lf(FILE *fptr, TSdcellvec *x_dcv) { - //Outputs: - // x_dcv (whose memory is already allocated): To be filled with the numbers from the file fptr. - int ci, kj, _n, ncells; - double *v; - if (!fptr || !x_dcv) fn_DisplayError(".../fn_filesetup.c/ReadCellvec_lf(): File or input cell must be created (memory-allocated)"); - ncells = x_dcv->ncells; - for (ci=0; ci<ncells; ci++) { - _n = x_dcv->C[ci]->n; - v = x_dcv->C[ci]->v; - for (kj=0; kj<_n; kj++) - if ( fscanf(fptr, " %lf ", &v[kj]) != 1 ) return 0; - } - return 1; -} - - - - -//----------------- -// Reads a column-major cell of double matrices from the input data file. -// Returns 1 if all data are read without errors and 0 otherwise. -// The file pointer is then moved to point to the next non-whitespace character -// after these doubles. -//----------------- -int ReadCell_lf(FILE *fptr, TSdcell *x_dc) { - //Outputs: - // x_dc (whose memory is already allocated): To be filled with the numbers from the file fptr. - int ci, ki, kj, nrows, ncols, ncells; - double *M; - if (!fptr || !x_dc) fn_DisplayError(".../fn_filesetup.c/ReadCell_lf(): File or input cell must be created (memory-allocated)"); - ncells = x_dc->ncells; - for (ci=0; ci<ncells; ci++) { - nrows = x_dc->C[ci]->nrows; - ncols = x_dc->C[ci]->ncols; - M = x_dc->C[ci]->M; - for (ki=0; ki<nrows; ki++) - for (kj=0; kj<ncols; kj++) - if ( fscanf(fptr, " %lf ", &M[mos(ki,kj,nrows)]) != 1 ) return 0; - } - return 1; -} - - - -//----------------- -// Write a column-major matrix of floats to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void fn_WriteMatrix_f(FILE *fptr_debug, const double *x_m, const int r_x_m, const int c_x_m) { - int _i, _j; - - for (_i=0; _i<r_x_m; _i++) { - for (_j=0; _j<c_x_m; _j++) { - fprintf(fptr_debug, " %f ", x_m[_j*r_x_m + _i]); - if (_j==c_x_m-1) fprintf(fptr_debug, "\n"); - } - if (_i==r_x_m-1) fprintf(fptr_debug, "\n\n"); - } -} -void WriteMatrix_f(FILE *fptr_debug, const TSdmatrix *x_dm) { - int _i, _j; - if (!fptr_debug || !x_dm) fn_DisplayError(".../fn_filesetup.c/WriteMatrix_f(): File or input matrix cannot be NULL (must be created)"); - for (_i=0; _i<x_dm->nrows; _i++) { - for (_j=0; _j<x_dm->ncols; _j++) { - fprintf(fptr_debug, " %10.5f ", x_dm->M[_j*x_dm->nrows + _i]); - if (_j==x_dm->ncols-1) fprintf(fptr_debug, "\n"); - } - if (_i==x_dm->nrows-1) fprintf(fptr_debug, "\n\n"); - } -} - - -//----------------- -// Write a column-major matrix of doubles to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void fn_WriteMatrix_lf(FILE *fptr_debug, const double *x_m, const int r_x_m, const int c_x_m) { - int _i, _j; - for (_i=0; _i<r_x_m; _i++) { - for (_j=0; _j<c_x_m; _j++) { - fprintf(fptr_debug, " %.16e ", x_m[_j*r_x_m + _i]); - if (_j==c_x_m-1) fprintf(fptr_debug, "\n"); - } - if (_i==r_x_m-1) fprintf(fptr_debug, "\n\n"); - } -} -void WriteMatrix_lf(FILE *fptr_debug, const TSdmatrix *x_dm) { - int _i, _j; - if (!fptr_debug || !x_dm) fn_DisplayError(".../fn_filesetup.c/WriteMatrix_lf(): File or input matrix cannot be NULL (must be created)"); - for (_i=0; _i<x_dm->nrows; _i++) { - for (_j=0; _j<x_dm->ncols; _j++) { - fprintf(fptr_debug, " %.16e ", x_dm->M[_j*x_dm->nrows + _i]); - if (_j==x_dm->ncols-1) fprintf(fptr_debug, "\n"); - } - if (_i==x_dm->nrows-1) fprintf(fptr_debug, "\n\n"); - } -} -void WriteMatrix(FILE *fptr_debug, const TSdmatrix *x_dm, const char *format) { - int _i, _j, nrows, ncols; - double *M; - if (!fptr_debug || !x_dm) fn_DisplayError(".../fn_filesetup.c/WriteMatrix(): File or input matrix cannot be NULL (must be created)"); - nrows = x_dm->nrows; - ncols = x_dm->ncols; - M = x_dm->M; - if (!format) format=" %10.5f "; //Default format. - for (_i=0; _i<nrows; _i++) - for (_j=0; _j<ncols; _j++) { - fprintf(fptr_debug, format, M[_j*x_dm->nrows + _i]); - if (_j==ncols-1) fprintf(fptr_debug, "\n"); - } - //fprintf(fptr_debug, "\n"); -} -//+ -void WriteMatrixTranspose(FILE *fptr_debug, const TSdmatrix *x_dm, const char *format) -{ - int _i, _j, nrows, ncols; - double *M; - //=== - TSdmatrix *Xtran_dm = NULL; - - if (!fptr_debug || !x_dm) fn_DisplayError(".../fn_filesetup.c/WriteMatrixTranspose(): File or input matrix cannot be NULL (must be created)"); - - Xtran_dm = tz_TransposeRegular((TSdmatrix *)NULL, x_dm); - - nrows = Xtran_dm->nrows; - ncols = Xtran_dm->ncols; - M = Xtran_dm->M; - if (!format) format=" %10.5f "; //Default format. - for (_i=0; _i<nrows; _i++) - for (_j=0; _j<ncols; _j++) { - fprintf(fptr_debug, format, M[_j*Xtran_dm->nrows + _i]); - if (_j==ncols-1) fprintf(fptr_debug, "\n"); - } - //fprintf(fptr_debug, "\n"); - - //=== - DestroyMatrix_lf(Xtran_dm); -} - - -//----------------- -// Write cells of column-major double matrices to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void WriteCell_lf(FILE *fptr_debug, const TSdcell *x_dc) { - int _i, _n; - if (!fptr_debug || !x_dc) fn_DisplayError(".../fn_filesetup.c/WriteCell_lf(): File or input cell cannot be NULL (must be created)"); - _n = x_dc->ncells; - for (_i=0; _i<_n; _i++) { - fprintf(fptr_debug, "Cell %d\n", _i); - WriteMatrix_lf(fptr_debug, x_dc->C[_i]); - } -} -void WriteCell_f(FILE *fptr_debug, const TSdcell *x_dc) { - int _i, _n; - if (!fptr_debug || !x_dc) fn_DisplayError(".../fn_filesetup.c/WriteCell_f(): File or input cell cannot be NULL (must be created)"); - _n = x_dc->ncells; - for (_i=0; _i<_n; _i++) { - fprintf(fptr_debug, "Cell %d\n", _i); - WriteMatrix_f(fptr_debug, x_dc->C[_i]); - } -} -void WriteCell(FILE *fptr_debug, const TSdcell *x_dc, const char *format) { - int _i, _n; - if (!fptr_debug || !x_dc) fn_DisplayError(".../fn_filesetup.c/WriteCell(): File or input cell cannot be NULL (must be created)"); - _n = x_dc->ncells; - for (_i=0; _i<_n; _i++) - { - WriteMatrix(fptr_debug, x_dc->C[_i], format); - fprintf(fptr_debug, "\n"); - } -} -//+ -void WriteCellTranspose(FILE *fptr_debug, const TSdcell *x_dc, const char *format) -{ - int _i, _n; - if (!fptr_debug || !x_dc) fn_DisplayError(".../fn_filesetup.c/WriteCell(): File or input cell cannot be NULL (must be created)"); - _n = x_dc->ncells; - for (_i=0; _i<_n; _i++) - { - WriteMatrixTranspose(fptr_debug, x_dc->C[_i], format); - fprintf(fptr_debug, "\n"); - } -} - - -//----------------- -// Write cells of vectors to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void WriteCellvec_lf(FILE *fptr_debug, const TSdcellvec *x_dcv) { - int _i; - if (!fptr_debug || !x_dcv) fn_DisplayError(".../fn_filesetup.c/WriteCellvec_lf(): File or input cell cannot be NULL (must be created)"); - for (_i=0; _i<x_dcv->ncells; _i++) { - fprintf(fptr_debug, "Cell %d\n", _i); - WriteVector_lf(fptr_debug, x_dcv->C[_i]); - } -} -void WriteCellvec_f(FILE *fptr_debug, const TSdcellvec *x_dcv) { - int _i; - if (!fptr_debug || !x_dcv) fn_DisplayError(".../fn_filesetup.c/WriteCellvec_lf(): File or input cell cannot be NULL (must be created)"); - for (_i=0; _i<x_dcv->ncells; _i++) { - fprintf(fptr_debug, "Cell %d\n", _i); - WriteVector_f(fptr_debug, x_dcv->C[_i]); - } -} -void WriteCellvec(FILE *fptr_debug, const TSdcellvec *x_dcv, const char *format) { - int _i, _n; - if (!fptr_debug || !x_dcv) fn_DisplayError(".../fn_filesetup.c/WriteCellvec(): File or input cell cannot be NULL (must be created)"); - _n = x_dcv->ncells; - for (_i=0; _i<_n; _i++) WriteVector(fptr_debug, x_dcv->C[_i], format); -} -void WriteCellvec_int(FILE *fptr_debug, const TSicellvec *x_icv) -{ - int _i, _n; - if (!fptr_debug || !x_icv) fn_DisplayError(".../fn_filesetup.c/WriteCellvec_int(): File or input cell cannot be NULL (must be created)"); - _n = x_icv->ncells; - for (_i=0; _i<_n; _i++) WriteVector_int(fptr_debug, x_icv->C[_i]); -} - - - -//----------------- -// Write fourths of column-major double matrices to an output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void WriteFourth_f(FILE *fptr_debug, const TSdfourth *x_d4) { - int _j, _i, _m, _n; - if (!fptr_debug || !x_d4) fn_DisplayError(".../fn_filesetup.c/WriteFourth_f(): File or input fourth cannot be NULL (must be created)"); - _m = x_d4->ndims; - for (_j=0; _j<_m; _j++) { - _n = x_d4->F[_j]->ncells; - fprintf(fptr_debug, "Fourth %d\n", _j); - for (_i=0; _i<_n; _i++) { - fprintf(fptr_debug, "Cell %d\n", _i); - WriteMatrix_f(fptr_debug, x_d4->F[_j]->C[_i]); - } - } -} -void WriteFourth(FILE *fptr_debug, const TSdfourth *x_d4, const char *format) { - int _j, _i, _m, _n; - if (!fptr_debug || !x_d4) fn_DisplayError(".../fn_filesetup.c/WriteFourth_f(): File or input fourth cannot be NULL (must be created)"); - _m = x_d4->ndims; - for (_j=0; _j<_m; _j++) { - _n = x_d4->F[_j]->ncells; - for (_i=0; _i<_n; _i++) { - WriteMatrix(fptr_debug, x_d4->F[_j]->C[_i], format); - } - } -} - - -//----------------- -// Write a column-major matrix of ints to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void fn_WriteMatrix_int(FILE *fptr_debug, const int *x_m, const int r_x_m, const int c_x_m) { - int _i, _j; - for (_i=0; _i<r_x_m; _i++) { - for (_j=0; _j<c_x_m; _j++) { - fprintf(fptr_debug, " %d ", x_m[_j*r_x_m + _i]); - if (_j==c_x_m-1) fprintf(fptr_debug, "\n"); - } - if (_i==r_x_m-1) fprintf(fptr_debug, "\n\n"); - } -} -void WriteMatrix_int(FILE *fptr_debug, const TSimatrix *x_im) { - int _i, _j; - if (!fptr_debug || !x_im) fn_DisplayError(".../fn_filesetup.c/WriteMatrix_int(): File or input matrix cannot be NULL (must be created)"); - for (_i=0; _i<x_im->nrows; _i++) { - for (_j=0; _j<x_im->ncols; _j++) { - fprintf(fptr_debug, " %d ", x_im->M[_j*x_im->nrows + _i]); - if (_j==x_im->ncols-1) fprintf(fptr_debug, "\n"); - } - if (_i==x_im->nrows-1) fprintf(fptr_debug, "\n\n"); - } -} - - -//----------------- -// Write a vector of doubles to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void fn_WriteVector_lf(FILE *fptr_debug, const double *x_v, const int d_x_v) { - int _i; - for (_i=0; _i<d_x_v; _i++) { - fprintf(fptr_debug, " %20.16f ", x_v[_i]); - if (_i==d_x_v-1) fprintf(fptr_debug, "\n\n"); - } -} -void WriteVector_lf(FILE *fptr_debug, const TSdvector *x_dv) { - int _i; - for (_i=0; _i<x_dv->n; _i++) { - fprintf(fptr_debug, " %20.16f ", x_dv->v[_i]); - if (_i==x_dv->n-1) fprintf(fptr_debug, "\n\n"); - } -} -void WriteVector(FILE *fptr_debug, const TSdvector *x_dv, const char *format) { - int _i, _n; - double *v; - if ( !fptr_debug || !x_dv ) fn_DisplayError(".../fn_filesetup.c/WriteVector(): File or input vector cannot be NULL (must be created)"); - _n = x_dv->n; - v = x_dv->v; - if (!format) format=" %10.5f "; //Default format. - for (_i=0; _i<_n; _i++) fprintf(fptr_debug, format, v[_i]); - fprintf(fptr_debug, "\n"); -} -void WriteVector_column(FILE *fptr_debug, const TSdvector *x_dv, const char *format) -{ - int _i, _n; - double *v; - if ( !fptr_debug || !x_dv ) fn_DisplayError(".../fn_filesetup.c/WriteVector_column(): File or input vector cannot be NULL (must be created)"); - _n = x_dv->n; - v = x_dv->v; - if (!format) format=" %10.5f "; //Default format. - for (_i=0; _i<_n; _i++) - { - fprintf(fptr_debug, format, v[_i]); - fprintf(fptr_debug, "\n"); - } -} - - -//----------------- -// Write a vector of floats to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void fn_WriteVector_f(FILE *fptr_debug, const double *x_v, const int d_x_v) { - int _i; - for (_i=0; _i<d_x_v; _i++) fprintf(fptr_debug, " %f ", x_v[_i]); - fprintf(fptr_debug, "\n"); -} -void WriteVector_f(FILE *fptr_debug, const TSdvector *x_dv) { - int _i; - if (!fptr_debug || !x_dv) fn_DisplayError(".../fn_filesetup.c/WriteVector_f(): File or input vector cannot be NULL (must be created)"); - for (_i=0; _i<x_dv->n; _i++) fprintf(fptr_debug, " %10.5f ", x_dv->v[_i]); - fprintf(fptr_debug, "\n"); -} - - - -//----------------- -// Write a vector of integers to the output file. -// The file pointer is then moved to point to the next -// non-whitespace character after these doubles. -//----------------- -void WriteVector_int(FILE *fptr_debug, const TSivector *x_iv) -{ - int _i; - if (!fptr_debug || !x_iv) fn_DisplayError(".../fn_filesetup.c/WriteVector_int(): File or input vector cannot be NULL (must be created)"); - for (_i=0; _i<x_iv->n; _i++) { - fprintf(fptr_debug, " %d ", x_iv->v[_i]); - if (_i==x_iv->n-1) fprintf(fptr_debug, "\n\n"); - } -} - - - -void PrintVector_int(const TSivector *x_iv) -{ - int _i, _n; - - if (!x_iv) fn_DisplayError(".../fn_filesetup.c/PrintVector_int(): Input vector must be created (memory-allocated)"); - _n = x_iv->n; - // printf("\nVector:\n"); - for (_i=0; _i<_n; _i++) { - printf("v[%d]=%d\n", _i, x_iv->v[_i]); - } -} - -//----------------- -// Print a vector of doubles to the screen. -//----------------- -void PrintVector(const TSdvector *x_dv, const char *format) -{ - int _i, _n; - - if (!x_dv) fn_DisplayError(".../fn_filesetup.c/PrintVector(): Input vector must be created (memory-allocated)"); - _n = x_dv->n; - // printf("\n\nVector:\n"); - for (_i=0; _i<_n; _i++) { - printf(format, x_dv->v[_i]); - } -} -//+ -void PrintVector_f(const TSdvector *x_dv) -{ - int _i, _n; - - if (!x_dv) fn_DisplayError(".../fn_filesetup.c/PrintVector_f(): Input vector must be created (memory-allocated)"); - _n = x_dv->n; - // printf("\n\nVector:\n"); - for (_i=0; _i<_n; _i++) { - printf("v[%d]=%6.4f\n", _i, x_dv->v[_i]); - } -} - -void PrintVector_dz(const TSdzvector *x_dzv) -{ - int _i; - - if (!x_dzv) fn_DisplayError(".../fn_filesetup.c/PrintVector_dz(): Input complex vector must be created (memory-allocated)"); - - printf("\n\nComplex vector:\n"); - for (_i=0; _i<x_dzv->real->n; _i++) { - printf("vreal[%d]=%6.4f; vimag[%d]=%6.4f\n", _i, x_dzv->real->v[_i], _i, x_dzv->imag->v[_i]); - } -} - - -void PrintMatrix_int(const TSimatrix *X_im) -{ - int _i, _j, nrows, ncols; - int *M=X_im->M; - - if (!X_im) fn_DisplayError(".../fn_filesetup.c/PrintMatrix_int(): Input matrix must be created (memory-allocated)"); - else { - nrows = X_im->nrows; - ncols = X_im->ncols; - M = X_im->M; - } - - printf("\n\nMatrix:\n"); - for (_i=0; _i<nrows; _i++) { - for (_j=0; _j<ncols; _j++) { - printf(" %d ", M[_j*nrows + _i]); - if (_j==ncols-1) printf("\n"); - } - if (_i==nrows-1) printf("\n"); - } -} - -void PrintMatrix_f(const TSdmatrix *x_dm) -{ - int _i, _j, nrows, ncols; - double *M=x_dm->M; - - if (!x_dm) fn_DisplayError(".../fn_filesetup.c/PrintMatrix_f(): Input matrix must be created (memory-allocated)"); - else { - nrows = x_dm->nrows; - ncols = x_dm->ncols; - M = x_dm->M; - } - - printf("\n\nMatrix:\n"); - for (_i=0; _i<nrows; _i++) { - for (_j=0; _j<ncols; _j++) { - printf(" %6.4f ", M[_j*nrows + _i]); - if (_j==ncols-1) printf("\n"); - } - if (_i==nrows-1) printf("\n"); - } -} - -void PrintMatrix(const TSdmatrix *x_dm, const char *format) -{ - int _i, _j, nrows, ncols; - double *M=x_dm->M; - - if (!x_dm) fn_DisplayError(".../fn_filesetup.c/PrintMatrix_f(): Input matrix must be created (memory-allocated)"); - else { - nrows = x_dm->nrows; - ncols = x_dm->ncols; - M = x_dm->M; - } - - printf("\n\nMatrix:\n"); - if (!format) format=" %10.5f "; //Default format. - for (_i=0; _i<nrows; _i++) { - for (_j=0; _j<ncols; _j++) { - printf(format, M[_j*nrows + _i]); - if (_j==ncols-1) printf("\n"); - } - if (_i==nrows-1) printf("\n"); - } -} - -void PrintMatrix_dz(const TSdzmatrix *x_dzm) { - int _i, _j, nrows, ncols; - double *Mr=NULL, - *Mi=NULL; - - if (!x_dzm) fn_DisplayError(".../fn_filesetup.c/PrintMatrix_dz(): Input complex matrix must be created (memory-allocated)"); - else { - nrows = x_dzm->real->nrows; - ncols = x_dzm->real->ncols; - Mr = x_dzm->real->M, - Mi = x_dzm->imag->M; - } - - printf("\n\nReal part of the matrix:\n"); - for (_i=0; _i<nrows; _i++) { - for (_j=0; _j<ncols; _j++) { - printf(" %6.4f ", Mr[_j*nrows + _i]); - if (_j==ncols-1) printf("\n"); - } - if (_i==nrows-1) printf("\n"); - } - - printf("\n\nImaginary part of the matrix:\n"); - for (_i=0; _i<nrows; _i++) { - for (_j=0; _j<ncols; _j++) { - printf(" %6.4f ", Mi[_j*nrows + _i]); - if (_j==ncols-1) printf("\n"); - } - if (_i==nrows-1) printf("\n"); - } -} - -void PrintCellvec_f(const TSdcellvec *x_dcv) { - int _i, ci, _n; - double *v; - - if (!x_dcv) fn_DisplayError(".../fn_filesetup.c/PrintCellvec_f(): Input cell must be created (memory-allocated)"); - for (ci=0; ci<x_dcv->ncells; ci++ ) { - _n = x_dcv->C[ci]->n; - v = x_dcv->C[ci]->v; - printf("\nCellvec %d:\n", ci); - for (_i=0; _i<_n; _i++) { - printf("v[%d]=%6.4f\n", _i, v[_i]); - } - } -} -void PrintCell_f(const TSdcell *x_dc) { - int _i, _j, ci, nrows, ncols; - double *M; - - if (!x_dc) fn_DisplayError(".../fn_filesetup.c/PrintCell_f(): Input cell must be created (memory-allocated)"); - for (ci=0; ci<x_dc->ncells; ci++ ) { - nrows = x_dc->C[ci]->nrows; - ncols = x_dc->C[ci]->ncols; - M = x_dc->C[ci]->M; - - printf("\nCell %d:\n", ci); - for (_i=0; _i<nrows; _i++) { - for (_j=0; _j<ncols; _j++) { - printf(" %6.4f ", M[_j*nrows + _i]); - if (_j==ncols-1) printf("\n"); - } - if (_i==nrows-1) printf("\n"); - } - } -} - - -void PrintCell(const TSdcell *x_dc, const char *format) -{ - int _i, _j, ci, nrows, ncols; - double *M; - - if (!x_dc) fn_DisplayError(".../fn_filesetup.c/PrintCell_f(): Input cell must be created (memory-allocated)"); - for (ci=0; ci<x_dc->ncells; ci++ ) { - nrows = x_dc->C[ci]->nrows; - ncols = x_dc->C[ci]->ncols; - M = x_dc->C[ci]->M; - - printf("\nCell %d:\n", ci); - if (!format) format=" %10.5f "; //Default format. - for (_i=0; _i<nrows; _i++) { - for (_j=0; _j<ncols; _j++) { - printf(format, M[_j*nrows + _i]); - if (_j==ncols-1) printf("\n"); - } - if (_i==nrows-1) printf("\n"); - } - } -} - - -void PrintFourthvec_f(TSdfourthvec *x_d4v) { - int _j, _i, _k, _m, _n, _o; - if (!x_d4v) fn_DisplayError(".../fn_filesetup.c/PrintFourthvec_f(): Input fourthvec cannot be NULL (must be created)"); - _m = x_d4v->ndims; - for (_j=0; _j<_m; _j++) { - _n = x_d4v->F[_j]->ncells; - for (_i=0; _i<_n; _i++) { - printf("\nFourthvec %d and Cell %d:\n", _j, _i); - _o = x_d4v->F[_j]->C[_i]->n; - for (_k=0; _k<_o; _k++) { - printf("v[%d]=%6.4f\n", _k, x_d4v->F[_j]->C[_i]->v[_k]); - } - } - } -} - - - - -//------------------- -// Prints entire input data (fptr_in) to the output file (fptr_out) -// for the user to know what has produced the output. -// The maximum number of characters in each line of the input file -// is 4095 (excluding the NUL byte), but the rest of the line will -// continue to be printed in new lines in the output file. -//------------------- -#define BUFFERLEN 4096 -void ReprintInputData(FILE *fptr_in, FILE *fptr_out) -{ - char *inpbuffer; - - inpbuffer = tzMalloc(BUFFERLEN, char); //@ Allocate memory to the string (including the NUL byte). - rewind(fptr_in); - while (fgets(inpbuffer,BUFFERLEN,fptr_in)) - fprintf(fptr_out, "%s", inpbuffer); - fprintf(fptr_out, "\n\n\n\n\n//------------------------------- Output Data Begin Here -------------------------------\n"); - free(inpbuffer); -} -#undef BUFFERLEN - diff --git a/CFiles/fn_filesetup.h b/CFiles/fn_filesetup.h deleted file mode 100644 index 0859f390ed006347abaf765987c5383e020eda42..0000000000000000000000000000000000000000 --- a/CFiles/fn_filesetup.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef __FN_FILESETUP_H__ -#define __FN_FILESETUP_H__ - #include <string.h> - //#include <malloc.h> // For malloc, calloc, etc. - - #include "tzmatlab.h" - #include "mathlib.h" //Used for tz_TransposeRegular(). - - int fn_ParseCommandLine(int n_arg, char **args, char ch); - char *fn_ParseCommandLine_String(int n_arg, char **args, char ch, char *default_return); - int fn_ParseCommandLine_Integer(int n_arg, char **args, char ch, int default_return); - int fn_SetFilePosition(FILE *f, const char *id); - - int fn_ReadVector_int(FILE *fptr, int *x_v, const int d_x_v); - int fn_ReadVector_lf(FILE *fptr, double *x_v, const int d_x_v); - int fn_ReadMatrix_int(FILE *fptr, int *x_m, const int r_x_m, const int c_x_m); - int fn_ReadMatrix_lf(FILE *fptr, double *x_m, const int r_x_m, const int c_x_m); - - int ReadNullTerminatedString(FILE *fptr, TScvector *x_cv); - int ReadVector_int(FILE *fptr, TSivector *x_iv); - int ReadVector_lf(FILE *fptr, TSdvector *x_dv); - int ReadMatrix_int(FILE *fptr, TSimatrix *X_im); - int ReadMatrix_lf(FILE *fptr, TSdmatrix *x_dm); - int ReadCell_lf(FILE *fptr, TSdcell *x_dc); - int ReadCellvec_lf(FILE *fptr, TSdcellvec *x_dcv); - - void fn_WriteMatrix_f(FILE *fprt_debug, const double *x_m, const int r_x_m, const int c_x_m); - void fn_WriteMatrix_lf(FILE *fprt_debug, const double *x_m, const int r_x_m, const int c_x_m); - void fn_WriteMatrix_int(FILE *fprt_debug, const int *x_m, const int r_x_m, const int c_x_m); - void fn_WriteVector_f(FILE *fprt_debug, const double *x_v, const int d_x_v); - - void WriteMatrix_f(FILE *fprt_debug, const TSdmatrix *x_dm); - void WriteMatrix_lf(FILE *fprt_debug, const TSdmatrix *x_dm); - void WriteMatrix(FILE *fprt_debug, const TSdmatrix *x_dm, const char *format); - void WriteMatrixTranspose(FILE *fptr_debug, const TSdmatrix *x_dm, const char *format); - void WriteCell_lf(FILE *fprt_debug, const TSdcell *x_dc); - void WriteCell_f(FILE *fprt_debug, const TSdcell *x_dc); - void WriteCell(FILE *fprt_debug, const TSdcell *x_dc, const char *format); - void WriteCellTranspose(FILE *fptr_debug, const TSdcell *x_dc, const char *format); - void WriteCellvec_lf(FILE *fprt_debug, const TSdcellvec *x_dcv); - void WriteCellvec_f(FILE *fprt_debug, const TSdcellvec *x_dcv); - void WriteCellvec(FILE *fptr_debug, const TSdcellvec *x_dcv, const char *format); - void WriteFourth_f(FILE *fptr_debug, const TSdfourth *x_d4); - void WriteFourth(FILE *fptr_debug, const TSdfourth *x_d4, const char *format); - void WriteVector_f(FILE *fprt_debug, const TSdvector *x_dv); - void WriteVector_lf(FILE *fprt_debug, const TSdvector *x_dv); - void WriteVector(FILE *fprt_debug, const TSdvector *x_dv, const char *format); - void WriteVector_column(FILE *fptr_debug, const TSdvector *x_dv, const char *format); - void WriteCellvec_int(FILE *fptr_debug, const TSicellvec *x_icv); - void WriteMatrix_int(FILE *fprt_debug, const TSimatrix *x_im); - void WriteVector_int(FILE *fprt_debug, const TSivector *x_iv); - - - void PrintVector_int(const TSivector *x_iv); - void PrintVector(const TSdvector *x_dv, const char *format); - void PrintVector_f(const TSdvector *x_dv); - void PrintVector_dz(const TSdzvector *x_dzv); - void PrintMatrix_int(const TSimatrix *X_im); - void PrintMatrix_f(const TSdmatrix *x_dm); - void PrintMatrix(const TSdmatrix *x_dm, const char *format); - void PrintMatrix_dz(const TSdzmatrix *x_dzm); - void PrintCellvec_f(const TSdcellvec *x_dcv); - void PrintCell_f(const TSdcell *x_dc); - void PrintCell(const TSdcell *x_dc, const char *format); - void PrintFourthvec_f(TSdfourthvec *x_d4v); - - - void ReprintInputData(FILE *fptr_in, FILE *fptr_out); -#endif diff --git a/CFiles/gensys.c b/CFiles/gensys.c deleted file mode 100644 index 998b51c093af5f01a072e732ee2db7a5aa63aaf9..0000000000000000000000000000000000000000 --- a/CFiles/gensys.c +++ /dev/null @@ -1,1272 +0,0 @@ -/******************************************************************* - * [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div) - * - * System given as - * g0*y(t)=g1*y(t-1)+c+psi*z(t)+pi*eta(t), - * with z an exogenous variable process and eta being endogenously determined - * one-step-ahead expectational errors. Returned system is - * y(t)=G1*y(t-1)+C+impact*z(t)+ywt*inv(I-fmat*inv(L))*fwt*z(t+1) . - * If z(t) is i.i.d., the last term drops out. - * If div or stake is omitted from argument list, a div>1 or stake>1 is calculated. - * eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for - * existence only with not-serially correlated z(t); eu=[-2,-2] for coincident zeros. - * - * g0, g1: n-by-n matrices. - * c: n-by-1 constant terms. - * z(t): m-by-1 vector of exogenous residuals where m < n. - * psi: n-by-m matrix. - * eta(t): h-by-1 vector of expectational (endogenous) errors. - * pi: n-by-h matrix. - * div: a real number dividing stable and unstable roots.. If < 1.0, a div>1.0 is calculated mechanically. - *------- - * G1 or Theta_dm: n-by-n matrices. - * C: n-by-1 vector of constant terms. - * impact: n-by-m matrix. - * gev: n-by-2 z vector of stacked generalized eigenvalues where gev(;,2) ./ gev(:,1) = eig(g0, g1). - * ywt: n-by-nunstab z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - * fmat: nunstab-by-nunstab z matrix where nunstab is the number of non-stable roots. - * fwt: nunstab-by-m z matrix. - * - * 1996 MATLAB algorithm by Christopher Sims - * 2002 Mex implementation by Iskander Karibzhanov - * 2004 Modified to C function by Tao Zha (April), correcting a few bugs of Iskander. - * 03/01/06 Another modification by Tao Zha, to be consistent with the CAS 3/10/04 correction. - * - * Note: Iskander is transforming g0 and g1 to complex matrices and uses zgges() as a qz decomposition. - * This is really wasting efficiency. One should keep g0 and g1 as real matrices and use - * dgges() as a qz decomposition. I don't have time to overhaul this at this point. 04/20/04, T. Zha. - * Note: 02/22/06. I take the above note back. According to DW, it is easy to *order* the - * the generalized eigenvalues by using the complex g0 and g1. In principle, one could - * order the roots using the real qz decomposition on real matrices g0 and g1. But so far - * Dan has found it a pain to do it. Perhaps we should read the MKL Lapack manual more - * carefully at a later point. -********************************************************************/ -#include "gensys.h" - - -//----- NOTE: We can't replace MKL_Complex16 with a different name because the Intel Lapack uses MKL_Complex16. -//----- The only way to do this is to overhaul the code and put a wrapper function on each Intel Lapack function. -static int selctg(MKL_Complex16 *alpha, MKL_Complex16 *beta); -static int qz(MKL_Complex16 *a, MKL_Complex16 *b, MKL_Complex16 *q, MKL_Complex16 *z, int n); -static MKL_Complex16* CreateComplexMatrix5RealMatrix(TSdmatrix *X_dm); -static MKL_Complex16* CreateComplexMatrix5RealVector(TSdvector *x_dv); -static void ComplexMatrix2RealMatrix(TSdmatrix *Y_dm, MKL_Complex16 *Z); -static void ComplexMatrix2RealVector(TSdvector *y_dv, MKL_Complex16 *Z); -static TSdzmatrix *SubComplexMatrix2Zmatrix(TSdzmatrix *X_dzm, MKL_Complex16 *Z, const int nrowsforZ, const int _m, const int _n); -static void copy_eigenvalues(TSdzmatrix *Gev_dzm, MKL_Complex16 *a, MKL_Complex16 *b); -static int compute_svd(MKL_Complex16 *a, MKL_Complex16 **u, double **d, MKL_Complex16 **v, int m, int n); -static int compute_norm(MKL_Complex16 *a, double **d, int m, int n); -//--- 03/01/06 TZ. Commented out to be consistent with the CAS 3/10/04 correction. -// static int compute_normx(MKL_Complex16 *a, MKL_Complex16 *b, MKL_Complex16 *zwt, MKL_Complex16 *ueta, double **normx, int nunstab, int psin, int n, int bigev); -static void cblas_zdupe(int m, int n, MKL_Complex16 *a, int lda, MKL_Complex16 *b, int ldb); -static void cblas_zdscali(int n, double *a, int lda, MKL_Complex16 *b, int ldb); -static void cblas_zdscale(int n, double *a, int lda, MKL_Complex16 *b, int ldb); -static void cblas_zdpsb(int m, int n, MKL_Complex16 *a, int lda, MKL_Complex16 *b, int ldb, MKL_Complex16 *c, int ldc); -// -static void InitializeConstantMLK_Complex16(MKL_Complex16 *x_clx, const int _n, const double c); -static void InitializeConstantDouble(double *x_p, const int _n, const double c); -static void ConverteZeroSquareMatrix2RealDiagonalMLK_Complex16(MKL_Complex16 *x_pc, const int _n, const double c); - - -TSgensys *CreateTSgensys(TFlinratexp *func, const int _n, const int _m, const int _k, const double div) -{ - //_n is the number of stacked variables (endogenous, Lagurangian multiplier, expected multiplier, etc.). - //_m is the number of exogenous shocks. - //_k is the number of expectational errors. - //div is the dividing number to determine what constitutes an unstable root. If div<1.0, a div>1.0 is calculated mechanically. - TSgensys *gensys_ps = tzMalloc(1, TSgensys); - - //=== Output arguments. - gensys_ps->Theta_dm = CreateMatrix_lf(_n, _n); //n-by-n. - gensys_ps->c_dv = CreateVector_lf(_n); //n-by-1. - gensys_ps->Impact_dm = CreateMatrix_lf(_n, _m); //n-by-m. - gensys_ps->Fmat_dzm = (TSdzmatrix *)NULL; //nunstab-by-nunstab z matrix. Initialized to NULL and will be dynamically allocated whenever gensys() is called. - gensys_ps->Fwt_dzm = (TSdzmatrix *)NULL; //nunstab-by-m z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - gensys_ps->Ywt_dzm = (TSdzmatrix *)NULL; //n-by-nunstab z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - gensys_ps->Gev_dzm = CreateMatrix_dz(_n, 2); //n-by-2 z matrix of possible complex numbers. - gensys_ps->eu_iv = CreateConstantVector_int(2, 0); //2-by-1. - - //=== Function itself. - gensys_ps->gensys = func; - - //=== Input arguments. - gensys_ps->G0_dm = CreateConstantMatrix_lf(_n, _n, 0.0); //n-by-n. - gensys_ps->G0_dm->flag = M_GE; - gensys_ps->G1_dm = CreateConstantMatrix_lf(_n, _n, 0.0); //n-by-n. - gensys_ps->G1_dm->flag = M_GE; - gensys_ps->c0_dv = CreateConstantVector_lf(_n, 0.0); //n-by-1. - gensys_ps->Psi_dm = CreateConstantMatrix_lf(_n, _m, 0.0); //n-by-m. - gensys_ps->Psi_dm->flag = M_GE; - gensys_ps->Pi_dm = CreateConstantMatrix_lf(_n, _k, 0.0); //n-by-k where k is the number of expectational errors. - gensys_ps->Pi_dm->flag = M_GE; - gensys_ps->div = div; - - return (gensys_ps); -} -//------- -TSgensys *DestroyTSgensys(TSgensys *gensys_ps) -{ - if (gensys_ps) { - //=== Output arguments. - DestroyMatrix_lf(gensys_ps->Theta_dm); //n-by-n. - DestroyVector_lf(gensys_ps->c_dv); //n-by-1. - DestroyMatrix_lf(gensys_ps->Impact_dm); //n-by-m. - DestroyMatrix_dz(gensys_ps->Fmat_dzm); //nunstab-by-nunstab z matrix. Initialized to NULL and will be dynamically allocated whenever gensys() is called. - DestroyMatrix_dz(gensys_ps->Fwt_dzm); //nunstab-by-m z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - DestroyMatrix_dz(gensys_ps->Ywt_dzm); //n-by-nunstab z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - DestroyMatrix_dz(gensys_ps->Gev_dzm); //n-by-2 z matrix of possible complex numbers. - DestroyVector_int(gensys_ps->eu_iv); //2-by-1. - - //=== Input arguments. - DestroyMatrix_lf(gensys_ps->G0_dm); //n-by-n. - DestroyMatrix_lf(gensys_ps->G1_dm); //n-by-n. - DestroyVector_lf(gensys_ps->c0_dv); //n-by-1. - DestroyMatrix_lf(gensys_ps->Psi_dm); //n-by-m. - DestroyMatrix_lf(gensys_ps->Pi_dm); //n-by-k where k is the number of expectational errors. - - free(gensys_ps); - - return ((TSgensys *)NULL); - } - else return (gensys_ps); -} - - -//--------------------------- For the function gensys_sims() ------------------------------------ -static int fixdiv = 1, zxz = 0; -static double stake = 1.01; -static int nunstab = 0; -static MKL_Complex16 one, minusone, zero; - -/* [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensysmkl(g0,g1,c,psi,pi,stake) */ -//void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { -int gensys_sims(TSgensys *gensys_ps, void *dummy_ps) -{ - //Returns 1 if successful and 0 for fatal errors (such as qz or svd fails or all roots are explosive). Added DW and TZ, 03/08/06. - int tmpi; - int n, psin, pin, nsquare, md, md1, i, bigev, bigev1; //mds, bigevs, //03/01/06 TZ. Commented out to be consistent with the CAS 3/10/04 correction. - int *eu; - int exist = 0, existx = 0, unique = 0; - //=== Memory will be allocated to the following. - double *deta = NULL, *deta1 = NULL, *norm = NULL; //*normx = NULL, *dz = NULL, //03/01/06 TZ. Commented out to be consistent with the CAS 3/10/04 correction. - MKL_Complex16 *a = NULL, *b = NULL, *q = NULL, *z = NULL, *pi = NULL, *psi = NULL; - MKL_Complex16 *tmat = NULL, *g0 = NULL, *g1 = NULL, *dummy = NULL, *tmatq = NULL, *c = NULL, *impact = NULL, *ab = NULL; - MKL_Complex16 *fmat = NULL, *fwt = NULL, *ywt = NULL; - MKL_Complex16 *etawt = NULL, *ueta = NULL, *veta = NULL, *etawt1 = NULL, *ueta1 = NULL, *veta1 = NULL; - // *uz = NULL, *vz = NULL, *zwt = NULL, //03/01/06 TZ. Commented out to be consistent with the CAS 3/10/04 correction. - //--- Dimensions. - n = gensys_ps->G0_dm->nrows; - psin = gensys_ps->Psi_dm->ncols; - pin = gensys_ps->Pi_dm->ncols; - //--- Pointer. - eu = gensys_ps->eu_iv->v; - - eu[0]=eu[1]=0; //Must be initialized because gensys_ps->eu_iv->v may have values in repeated loops. - - //=== [a b q z]=qz(g0,g1); - a = CreateComplexMatrix5RealMatrix(gensys_ps->G0_dm); - b = CreateComplexMatrix5RealMatrix(gensys_ps->G1_dm); - q = tzMalloc(nsquare=square(n), MKL_Complex16); - z = tzMalloc(nsquare, MKL_Complex16); - InitializeConstantMLK_Complex16(q, nsquare, 0.0); - InitializeConstantMLK_Complex16(z, nsquare, 0.0); - - fixdiv = (gensys_ps->div < 1.0); - stake = fixdiv ? 1.01 : gensys_ps->div; - nunstab = 0; - zxz = 0; - - if (qz(a, b, q, z, n)) { - printf("WARNING: QZ factorization failed.\n"); - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - eu[0] = 0; - return 0; - } - - nunstab /= 2; - - if (zxz) { - printf("WARNING: Coincident zeros. Indeterminacy and/or nonexistence.\n"); - eu[0] = eu[1] = -2; - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - return 1; - } - copy_eigenvalues(gensys_ps->Gev_dzm, a, b); - - one.real = 1.0; - one.imag = 0.0; - - minusone.real = -1.0; - minusone.imag = 0.0; - - zero.real = 0.0; - zero.imag = 0.0; - - pi = CreateComplexMatrix5RealMatrix(gensys_ps->Pi_dm); - //============================================= - // Modified by DW and TZ to deal with the case where nunstab=0 (no explosive roots). 03/08/06. - //============================================= - if (nunstab) //This branch belongs to original CAS code. - { - etawt = tzMalloc(tmpi=nunstab*pin, MKL_Complex16); - InitializeConstantMLK_Complex16(etawt, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasConjTrans, CblasNoTrans, nunstab, pin, n, - &one, q+n*(n-nunstab), n, pi, n, &zero, etawt, nunstab); - if (compute_svd(etawt, &ueta, &deta, &veta, nunstab, pin)) { - //Memory is now allocated to ueta, deta, and veta. - printf("WARNING: SVD failed.\n"); - tzDestroy(pi); - tzDestroy(ueta); - tzDestroy(deta); - tzDestroy(veta); - tzDestroy(etawt); - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - eu[0] = 0; - return 0; - } - tzDestroy(etawt); - md = nunstab<pin?nunstab:pin; - bigev = md; - for (i=0; i<md; i++) - if (deta[i]<=REALSMALL) { - bigev=i; - break; - } - //------ 03/01/06 TZ: corrected code by CAS, 3/10/04. - if ((eu[0]=(bigev >= nunstab))==0) //DW & TZ, 03/08/06 - { - tzDestroy(pi); - tzDestroy(ueta); - tzDestroy(deta); - tzDestroy(veta); - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - return 1; - } - } - else //DW & TZ. 03/08/06. This is where we deal with the case when nunstab=0. - { - eu[0] = 1; //Existence. - } - - - //--------------------------------- - // ueta = nunstab x bigev - // deta = bigev x 1 - // veta = bigev x pin, ldveta = md - // uz = nunstab x bigevs - // dz = bigevs x 1 - // vz = bigevs x psin, ldvz = mds - //--------------------------------- - - //====== 03/01/06 TZ: the following note is added by CAS 3/10/04. - //------ Code below allowed "existence" in cases where the initial lagged state was free to take on values - //------ inconsistent with existence, so long as the state could w.p.1 remain consistent with a stable solution - //------ if its initial lagged value was consistent with a stable solution. This is a mistake, though perhaps there - //------ are situations where we would like to know that this "existence for restricted initial state" situation holds. - // psi = CreateComplexMatrix5RealMatrix(gensys_ps->Psi_dm); - // zwt = tzMalloc(tmpi=nunstab*psin, MKL_Complex16); - // InitializeConstantMLK_Complex16(zwt, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - // cblas_zgemm(CblasColMajor, CblasConjTrans, CblasNoTrans, nunstab, psin, n, - // &one, q+n*(n-nunstab), n, psi, n, &zero, zwt, nunstab); - // if (compute_svd(zwt, &uz, &dz, &vz, nunstab, psin)) { - // //Memory is now allocated to uz, dz, and vz. - // printf("WARNING: SV decomposition failed.\n"); - // tzDestroy(ueta); - // tzDestroy(deta); - // tzDestroy(veta); - // tzDestroy(uz); - // tzDestroy(dz); - // tzDestroy(vz); - // tzDestroy(zwt); - // tzDestroy(a); - // tzDestroy(b); - // tzDestroy(q); - // tzDestroy(z); - // return; - // } - // tzDestroy(vz); - // mds = nunstab<psin?nunstab:psin; - // bigevs = mds; - // for (i=0; i<mds; i++) - // if (dz[i]<=REALSMALL) { - // bigevs=i; - // break; - // } - // tzDestroy(dz); - // - // if (!bigevs) { - // exist = 1; - // existx = 1; - // } else { - // /* uz-ueta*ueta'*uz */ - // MKL_Complex16 *tmp = tzMalloc(tmpi=nunstab*nunstab, MKL_Complex16); - // InitializeConstantMLK_Complex16(tmp, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - // cblas_zgemm(CblasColMajor, CblasNoTrans, CblasConjTrans, nunstab, nunstab, - // bigev, &one, ueta, nunstab, ueta, nunstab, &zero, tmp, nunstab); - // cblas_zhemm(CblasColMajor, CblasLeft, CblasUpper, nunstab, - // bigevs, &minusone, tmp, nunstab, uz, nunstab, &one, uz, nunstab); - // tzDestroy(tmp); - // if (compute_norm(uz, &norm, nunstab, bigevs)) { - // //Memory is now allocated to norm. - // printf("WARNING: SVD failed.\n"); - // tzDestroy(norm); - // tzDestroy(ueta); - // tzDestroy(deta); - // tzDestroy(veta); - // tzDestroy(uz); - // tzDestroy(zwt); - // tzDestroy(a); - // tzDestroy(b); - // tzDestroy(q); - // tzDestroy(z); - // return; - // } - // exist = *norm < REALSMALL*n; - // tzDestroy(norm); - // if (compute_normx(a, b, zwt, ueta, &normx, nunstab, psin, n, bigev)) { - // //If 0, memory is now allocated to normx; otherwise, normx is destroyed within the function compute_normx(). - // tzDestroy(ueta); - // tzDestroy(deta); - // tzDestroy(veta); - // tzDestroy(uz); - // tzDestroy(zwt); - // tzDestroy(a); - // tzDestroy(b); - // tzDestroy(q); - // tzDestroy(z); - // return; - // } - // existx = *normx < REALSMALL*n; - // tzDestroy(normx); - // } - // - // tzDestroy(uz); - // tzDestroy(zwt); - - //--------------------------------------------------------------------------- - // Note that existence and uniqueness are not just matters of comparing - // numbers of roots and numbers of endogenous errors. These counts are - // reported below because usually they point to the source of the problem. - //--------------------------------------------------------------------------- - //============================================= - // Modified by DW and TZ to deal with the case - // where nunstab=n (all explosive roots). 03/08/06. - //============================================= - if (nunstab == n) - { - tzDestroy(pi); - tzDestroy(ueta); - tzDestroy(deta); - tzDestroy(veta); - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - - printf("\n******** Fatal error: All roots are explosive while we have a solution. But this should NOT happen.***********\n"); - eu[0] = 0; - return 0; - } - - //======= Otherwise, returns to CAS's original code. 03/08/06. =======// - etawt1 = tzMalloc(tmpi=(n-nunstab)*pin, MKL_Complex16); - InitializeConstantMLK_Complex16(etawt1, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasConjTrans, CblasNoTrans, n-nunstab, pin, n, - &one, q, n, pi, n, &zero, etawt1, n-nunstab); - tzDestroy(pi); - if (compute_svd(etawt1, &ueta1, &deta1, &veta1, n-nunstab, pin)) { - //Memory is now allocated to ueta1, deta1, and veta1. - printf("WARNING: SVD failed for compute_svd().\n"); - tzDestroy(ueta1); - tzDestroy(deta1); - tzDestroy(veta1); - tzDestroy(etawt1); - tzDestroy(ueta); - tzDestroy(deta); - tzDestroy(veta); - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - eu[0] = 0; - return 0; - } - tzDestroy(etawt1); - md1 = n-nunstab<pin?n-nunstab:pin; - bigev1 = md1; - for (i=0; i<md1; i++) - if (deta1[i]<=REALSMALL) { - bigev1=i; - break; - } - - //====== 03/01/06 TZ: the following is commented out by CAS 3/10/04. - // if (existx || !nunstab) { - // //=== Solution exists. - // eu[0] = 1; - // } else { - // if (exist) { - // printf("WARNING: Solution exists for unforecastable z only\n"); - // eu[0] = -1; - // } /* else - // mexPrintf("No solution. %d unstable roots. %d endog errors.\n",nunstab,bigev1); */ - // /* mexPrintf("Generalized eigenvalues\n"); - // mexCallMATLAB(0,NULL,1, &plhs[6], "disp"); */ - // } - - - //------------------------------- - // ueta1 = n-nunstab x bigev1 - // deta1 = bigev1 x 1 - // veta1 = bigev1 x pin, ldveta1 = md1 - //------------------------------- - if (!bigev1) - unique = 1; - else { - // veta1-veta1*veta*veta' - // veta = bigev x pin, ldveta1 = md - // veta1 = bigev1 x pin, ldveta1 = md1 - MKL_Complex16 *tmp = tzMalloc(pin*pin, MKL_Complex16); - MKL_Complex16 *veta1_copy = tzMalloc(pin*bigev1, MKL_Complex16); - InitializeConstantMLK_Complex16(tmp, pin*pin, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - InitializeConstantMLK_Complex16(veta1_copy, pin*bigev1, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - if (nunstab) - { - cblas_zgemm(CblasColMajor, CblasConjTrans, CblasNoTrans, pin, pin, - bigev, &one, veta, md, veta, md, &zero, tmp, pin); //tmp=veta'*veta; - cblas_zdupe(bigev1,pin,veta1,md1,veta1_copy,bigev1); - cblas_zhemm(CblasColMajor, CblasRight, CblasUpper, bigev1, pin, - &minusone, tmp, pin, veta1_copy, bigev1, &one, veta1_copy, bigev1); - } - else //Added by DW & TZ, 03/08/06. - { - cblas_zdupe(bigev1,pin,veta1,md1,veta1_copy,bigev1); - } - tzDestroy(tmp); - if (compute_norm(veta1_copy, &norm, bigev1, pin)) { - //Memory is now allocated to norm. - printf("WARNING: SVD failed.\n"); - tzDestroy(norm); - tzDestroy(ueta1); - tzDestroy(deta1); - tzDestroy(veta1); - tzDestroy(ueta); - tzDestroy(deta); - tzDestroy(veta); - tzDestroy(veta1_copy); - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - eu[0] = 0; - return 0; - } - tzDestroy(veta1_copy); - unique = *norm < REALSMALL*n; - tzDestroy(norm); - } - if (unique) { - //=== Unique solution. - eu[1] = 1; - } else { - eu[1] = 0; - #if defined (PRINTWARNINGofSUNSPOT) - if (nunstab) - printf("WARNING: Indeterminacy. %d loose endog errors with eu being [%d, %d].\n",bigev1-bigev, eu[0], eu[1]); - else - printf("WARNING: Indeterminacy. %d loose endog errors with eu being [%d, %d].\n",pin, eu[0], eu[1]); - //printf("WARNING: Indeterminacy. %d loose endog errors with eu being [%g, %g].\n",bigev1-bigev, gensys_ps->eu_dv->v[0], gensys_ps->eu_dv->v[1]); - //printf("WARNING: Indeterminacy. %d loose endog errors.\n",bigev1-bigev); - #endif - } - - //---------------------------------------------------------// - //------------------ Obtaining the outputs. ---------------// - //---------------------------------------------------------// - if (nunstab) - { - //=== All the following lines are used to compute only ONE object tmat, which is used subsequently. ===// - cblas_zdscali(pin,deta,bigev,veta,md); /* veta' = deta\veta' */ - tzDestroy(deta); - cblas_zdscale(pin,deta1,bigev1,veta1,md1); /* veta1' = deta1*veta1' */ - tzDestroy(deta1); - etawt = tzMalloc(tmpi=nunstab*pin, MKL_Complex16); /* etawt = ueta*veta' */ - InitializeConstantMLK_Complex16(etawt, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, nunstab, pin, bigev, - &one, ueta, nunstab, veta, md, &zero, etawt, nunstab); - tzDestroy(ueta); - tzDestroy(veta); - etawt1 = tzMalloc(tmpi=(n-nunstab)*pin, MKL_Complex16); /* etawt1 = ueta1*veta1' */ - InitializeConstantMLK_Complex16(etawt1, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n-nunstab, pin, bigev1, - &one, ueta1, n-nunstab, veta1, md1, &zero, etawt1, n-nunstab); - tzDestroy(ueta1); - tzDestroy(veta1); - tmat = tzMalloc(tmpi=(n-nunstab)*nunstab, MKL_Complex16); /* tmat = etawt1*etawt' */ - InitializeConstantMLK_Complex16(tmat, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasConjTrans, n-nunstab, nunstab, pin, - &one, etawt1, n-nunstab, etawt, nunstab, &zero, tmat, n-nunstab); - tzDestroy(etawt1); - tzDestroy(etawt); - - //=== Getting the solution Theta ===// - g0 = tzMalloc(tmpi=n*n, MKL_Complex16); - InitializeConstantMLK_Complex16(g0, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zdupe(n-nunstab, n, a, n, g0, n); - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n-nunstab, nunstab, nunstab, - &minusone, tmat, n-nunstab, a+(n-nunstab)*(n+1), n, &one, g0+(n-nunstab)*n, n); - cblas_zcopy(nunstab, &one, 0, g0+(n-nunstab)*(n+1), n+1); - - g1 = tzMalloc(tmpi=n*n, MKL_Complex16); - InitializeConstantMLK_Complex16(g1, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zdupe(n-nunstab, n, b, n, g1, n); - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n-nunstab, nunstab, nunstab, - &minusone, tmat, n-nunstab, b+(n-nunstab)*(n+1), n, &one, g1+(n-nunstab)*n, n); - cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, - n, n, &one, g0, n, g1, n); - dummy = tzMalloc(tmpi=n*n, MKL_Complex16); - InitializeConstantMLK_Complex16(dummy, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n, n, n, &one, z, n, g1, n, &zero, dummy, n); - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasConjTrans, n, n, n, &one, dummy, n, z, n, &zero, g1, n); - tzDestroy(dummy); - ComplexMatrix2RealMatrix(gensys_ps->Theta_dm, g1); //Output. - tzDestroy(g1); - - //=== Getting the constant term c ===// - tmatq = tzMalloc(tmpi=n*n, MKL_Complex16); - InitializeConstantMLK_Complex16(tmatq, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zcopy(n*n, q, 1, tmatq, 1); - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasConjTrans, n, n-nunstab, nunstab, - &minusone, tmatq+(n-nunstab)*n, n, tmat, n-nunstab, &one, tmatq, n); - tzDestroy(tmat); - - ab = tzMalloc(tmpi=nunstab*nunstab, MKL_Complex16); - InitializeConstantMLK_Complex16(ab, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zdpsb(nunstab, nunstab, a+(n-nunstab)*(n+1), n, b+(n-nunstab)*(n+1), n, ab, nunstab); - cblas_ztrsm(CblasColMajor, CblasRight, CblasUpper, CblasConjTrans, CblasNonUnit, - n, nunstab, &one, ab, nunstab, tmatq+(n-nunstab)*n, n); - tzDestroy(ab); - - c = CreateComplexMatrix5RealVector(gensys_ps->c0_dv); - dummy = tzMalloc(gensys_ps->c0_dv->n, MKL_Complex16); - //$$$$$$$ The following is Iskander's fatal code error. One cannot use c in the two different places; otherwise, it makes c be zero completely! - // cblas_zgemv(CblasColMajor, CblasConjTrans, n, n, &one, tmatq, n, c, 1, &zero, c, 1); - // cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, n, g0, n, c, 1); - // cblas_zgemv(CblasColMajor, CblasNoTrans, n, n, &one, z, n, c, 1, &zero, c, 1); - cblas_zgemv(CblasColMajor, CblasConjTrans, n, n, &one, tmatq, n, c, 1, &zero, dummy, 1); - cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, n, g0, n, dummy, 1); - cblas_zgemv(CblasColMajor, CblasNoTrans, n, n, &one, z, n, dummy, 1, &zero, c, 1); - ComplexMatrix2RealVector(gensys_ps->c_dv, c); //Output. - tzDestroy(c); - tzDestroy(dummy); - - //=== Getting the term Impact ===// - impact = tzMalloc(tmpi=n*psin, MKL_Complex16); - InitializeConstantMLK_Complex16(impact, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - psi = CreateComplexMatrix5RealMatrix(gensys_ps->Psi_dm); //03/01/06 TZ. Added to be consistent with the CAS 3/10/04 correction. - cblas_zgemm(CblasColMajor, CblasConjTrans, CblasNoTrans, n-nunstab, psin, n, - &one, tmatq, n, psi, n, &zero, impact, n); - tzDestroy(tmatq); - cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, - n, psin, &one, g0, n, impact, n); - dummy = tzMalloc(tmpi=n*psin, MKL_Complex16); - InitializeConstantMLK_Complex16(dummy, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n, psin, n, - &one, z, n, impact, n, &zero, dummy, n); - tzDestroy(impact); - ComplexMatrix2RealMatrix(gensys_ps->Impact_dm, dummy); //Output. - tzDestroy(dummy); - - //=== Finishing up the other terms such as Fmat, Fwt, and Ywt. ===// - fmat = a+(n-nunstab)*(n+1); - cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, - nunstab, nunstab, &one, b+(n-nunstab)*(n+1), n, fmat, n); - gensys_ps->Fmat_dzm = SubComplexMatrix2Zmatrix(gensys_ps->Fmat_dzm, fmat, n, nunstab, nunstab); - tzDestroy(a); - - fwt = tzMalloc(tmpi=nunstab*psin, MKL_Complex16); - InitializeConstantMLK_Complex16(fwt, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_ztrsm(CblasColMajor, CblasRight, CblasUpper, CblasConjTrans, CblasNonUnit, - n, nunstab, &one, b+(n-nunstab)*(n+1), n, q+(n-nunstab)*n, n); - tzDestroy(b); - cblas_zgemm(CblasColMajor, CblasConjTrans, CblasNoTrans, nunstab, psin, n, - &minusone, q+(n-nunstab)*n, n, psi, n, &zero, fwt, nunstab); - tzDestroy(q); - tzDestroy(psi); - gensys_ps->Fwt_dzm = SubComplexMatrix2Zmatrix(gensys_ps->Fwt_dzm, fwt, nunstab, nunstab, psin); - tzDestroy(fwt); - - ywt = tzMalloc(tmpi=n*nunstab, MKL_Complex16); - InitializeConstantMLK_Complex16(ywt, tmpi, 0.0); - cblas_zcopy(nunstab, &one, 0, ywt+n-nunstab, n+1); - cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, - n, nunstab, &one, g0, n, ywt, n); - tzDestroy(g0); - dummy = tzMalloc(tmpi=n*nunstab, MKL_Complex16); - InitializeConstantMLK_Complex16(dummy, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n, nunstab, n, - &one, z, n, ywt, n, &zero, dummy, n); - tzDestroy(z); - tzDestroy(ywt); - gensys_ps->Ywt_dzm = SubComplexMatrix2Zmatrix(gensys_ps->Ywt_dzm, dummy, n, n, nunstab); - tzDestroy(dummy); - } - else //This part is added by DW and TZ, 03/08/06. - { - //======= Getting Theta = real(z*(G0\G1)*z') =======// - cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, - n, n, &one, a, n, b, n); //Note that a is triangular and b = a\b (overwritten). - dummy = tzMalloc(tmpi=n*n, MKL_Complex16); - InitializeConstantMLK_Complex16(dummy, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - //--- Getting Theta = real(z*b*z'); - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n, n, n, &one, z, n, b, n, &zero, dummy, n); //dummy=z*b; - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasConjTrans, n, n, n, &one, dummy, n, z, n, &zero, b, n); //dummy=dummy*z'; - ComplexMatrix2RealMatrix(gensys_ps->Theta_dm, b); //Output. - tzDestroy(dummy); - - //======= Getting c = real(z*G0\q*c0) =======// - c = CreateComplexMatrix5RealVector(gensys_ps->c0_dv); - dummy = tzMalloc(gensys_ps->c0_dv->n, MKL_Complex16); - cblas_zgemv(CblasColMajor, CblasConjTrans, n, n, &one, q, n, c, 1, &zero, dummy, 1); //dummy = q*c; - cblas_ztrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, n, a, n, dummy, 1); //dummy=a\dummy where a is triangular. - cblas_zgemv(CblasColMajor, CblasNoTrans, n, n, &one, z, n, dummy, 1, &zero, c, 1); //dummy=z*dummy; - ComplexMatrix2RealVector(gensys_ps->c_dv, c); //Output. - tzDestroy(dummy); - - //======= Getting Impact = real(z*G0\q*psi) =======// - impact = tzMalloc(tmpi=n*psin, MKL_Complex16); - InitializeConstantMLK_Complex16(impact, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - psi = CreateComplexMatrix5RealMatrix(gensys_ps->Psi_dm); //03/01/06 TZ. Added to be consistent with the CAS 3/10/04 correction. - dummy = tzMalloc(tmpi=n*psin, MKL_Complex16); - cblas_zgemm(CblasColMajor, CblasConjTrans, CblasNoTrans, n, psin, n, - &one, q, n, psi, n, &zero, impact, n); //impact = q*psi; - cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, - n, psin, &one, a, n, impact, n); //impact = a\impact; - InitializeConstantMLK_Complex16(dummy, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. - cblas_zgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, n, psin, n, - &one, z, n, impact, n, &zero, dummy, n); //dummy = z*impact; - ComplexMatrix2RealMatrix(gensys_ps->Impact_dm, dummy); //Output. - tzDestroy(dummy); - - - //=== Some of destructions may have been done, but it is better to be safe. - tzDestroy(ueta1); - tzDestroy(deta1); - tzDestroy(veta1); - tzDestroy(etawt); - tzDestroy(etawt1); - //+ - tzDestroy(a); - tzDestroy(b); - tzDestroy(q); - tzDestroy(z); - //+ - tzDestroy(c); - tzDestroy(impact); - tzDestroy(psi); - } - - //=== Save this debugging format -- DDDDDebugging. - // if (!nunstab) - // { - // fprintf(FPTR_DEBUG, "Aind=[\n"); - // WriteMatrix(FPTR_DEBUG, gensys_ps->G0_dm, " %.16e "); - // fprintf(FPTR_DEBUG, "];\n"); - // fprintf(FPTR_DEBUG, "Bind=[\n"); - // WriteMatrix(FPTR_DEBUG, gensys_ps->G1_dm, " %.16e "); - // fprintf(FPTR_DEBUG, "];\n"); - // fprintf(FPTR_DEBUG, "Consterm=[\n"); - // WriteVector(FPTR_DEBUG, gensys_ps->c0_dv, " %.16e "); - // fprintf(FPTR_DEBUG, "]';\n"); - // fprintf(FPTR_DEBUG, "gUpsiloneind=[\n"); - // WriteMatrix(FPTR_DEBUG, gensys_ps->Psi_dm, " %.16e "); - // fprintf(FPTR_DEBUG, "];\n"); - // fprintf(FPTR_DEBUG, "gUpsilonxind=[\n"); - // WriteMatrix(FPTR_DEBUG, gensys_ps->Pi_dm, " %.16e "); - // fprintf(FPTR_DEBUG, "];\n"); - // fflush(FPTR_DEBUG); - // - // fprintf(FPTR_DEBUG, "\n********** Output ******************\n"); - // fprintf(FPTR_DEBUG, "Theta=[\n"); - // WriteMatrix(FPTR_DEBUG, gensys_ps->Theta_dm, " %.16e "); - // fprintf(FPTR_DEBUG, "];\n"); - // fprintf(FPTR_DEBUG, "Impact=[\n"); - // WriteMatrix(FPTR_DEBUG, gensys_ps->Impact_dm, " %.16e "); - // fprintf(FPTR_DEBUG, "];\n"); - // fprintf(FPTR_DEBUG, "Consterm=[\n"); - // WriteVector(FPTR_DEBUG, gensys_ps->c_dv, " %.16e "); - // fprintf(FPTR_DEBUG, "]';\n"); - // fprintf(FPTR_DEBUG, "eu=[\n"); - // WriteVector_int(FPTR_DEBUG, gensys_ps->eu_iv); - // fprintf(FPTR_DEBUG, "]';\n"); - // fflush(FPTR_DEBUG); - // } - - return 1; -} - - -/****************************************************************************** - * function selctg orders the eigenvalues so that a selected cluster of * - * eigenvalues appears in the leading diagonal blocks of the upper * - * quasi-triangular matrix S and the upper triangular matrix T. * - ******************************************************************************/ - -static int selctg(MKL_Complex16 *alpha, MKL_Complex16 *beta) -{ - double absA = sqrt(alpha->real*alpha->real+alpha->imag*alpha->imag), - absB = fabs(beta->real); - if (absA) { - double divhat = absB/absA; - //bug detected by Vasco Curdia and Daria Finocchiaro, 2/25/2004 CAS. A root of - //exactly 1.01 and no root between 1 and 1.02, led to div being stuck at 1.01 - //and the 1.01 root being misclassified as stable. Changing < to <= below fixes this. - if (fixdiv && 1+REALSMALL<divhat && divhat<=stake) - stake = (1+divhat)/2; - } - if (absA<REALSMALL && absB<REALSMALL) - zxz = 1; - if (absB>stake*absA) { - nunstab++; - return(0); - } else - return(1); -} - -/****************************************************************************** - * compute for a pair of N-by-N complex nonsymmetric matrices (A,B), * - * the generalized eigenvalues, the generalized complex Schur form (S, T), * - * and optionally left and/or right Schur vectors (VSL and VSR) * - ******************************************************************************/ - -static int qz(MKL_Complex16 *a, MKL_Complex16 *b, MKL_Complex16 *q, MKL_Complex16 *z, int n) -{ -// unsigned char msg[101]; - int sdim, lwork = -1, info = 0; - MKL_Complex16 *alpha = tzMalloc(n,MKL_Complex16), - *beta = tzMalloc(n,MKL_Complex16), - *work, work1; - double *rwork = tzMalloc(8*n, double); - int *bwork = tzMalloc(4*n, int); - - /* Query zgges on the value of lwork */ - zgges("V", "V", "S", &selctg, &n, a, &n, b, &n, &sdim, alpha, beta, q, - &n, z, &n, &work1, &lwork, rwork, bwork, &info); - - if (info < 0) { - printf("WARNING: Input %d to the Intel MKL function zgges() has an illegal value",-info); - tzDestroy(bwork); - tzDestroy(rwork); - tzDestroy(alpha); - tzDestroy(beta); - return(info); - } - - lwork = (int)(work1.real); - work = tzMalloc(lwork, MKL_Complex16); - zgges("V", "V", "S", &selctg, &n, a, &n, b, &n, &sdim, alpha, beta, q, - &n, z, &n, work, &lwork, rwork, bwork, &info); - - tzDestroy(work); - tzDestroy(bwork); - tzDestroy(rwork); - tzDestroy(alpha); - tzDestroy(beta); - - if (info < 0) { - printf("WARNING: Input %d to the Intel MKL function zgges() has an illegal value",-info); - return(info); - } - - if (info > 0) - if (info < n) - printf("WARNING: The QZ iteration failed. (A,B) are not in Schur form,\n" - "but ALPHA(j) and BETA(j) should be correct for j=%d,...,N.",info+1); - else { - switch (info-n) { - case 1: - printf("WARNING: LAPACK problem: error return from ZGGBAL"); - break; - case 2: - printf("WARNING: LAPACK problem: error return from ZGEQRF"); - break; - case 3: - printf("WARNING: LAPACK problem: error return from ZUNMQR"); - break; - case 4: - printf("WARNING: LAPACK problem: error return from ZUNGQR"); - break; - case 5: - printf("WARNING: LAPACK problem: error return from ZGGHRD"); - break; - case 6: - printf("WARNING: LAPACK problem: error return from ZHGEQZ (other than failed iteration)"); - break; - case 7: - printf("WARNING: LAPACK problem: error return from ZGGBAK (computing VSL)"); - break; - case 8: - printf("WARNING: LAPACK problem: error return from ZGGBAK (computing VSR)"); - break; - case 9: - printf("WARNING: LAPACK problem: error return from ZLASCL (various places)"); - break; - default: - printf("WARNING: LAPACK problem: unknown error."); - break; - } - } - return(info); -} - -/* - * Convert MATLAB complex matrix to MKL complex storage. - * - * Z = mat2mkl(X,ldz,ndz) - * - * converts MATLAB's mxArray X to MKL_Complex16 Z(ldz,ndz). - * The parameters ldz and ndz determine the storage allocated for Z, - * while mxGetM(X) and mxGetN(X) determine the amount of data copied. - */ - -//MKL_Complex16* mat2mkl(const mxArray *X, int ldz, int ndz) { -// MKL_Complex16 *Z, *zp; -// int m, n, incz, cmplxflag; -// register int i, j; -// double *xr, *xi; - -// Z = mxCalloc(ldz*ndz, sizeof(MKL_Complex16)); -// xr = mxGetPr(X); -// xi = mxGetPi(X); -// m = mxGetM(X); -// n = mxGetN(X); -// zp = Z; -// incz = ldz-m; -// cmplxflag = (xi != NULL); -// for (j = 0; j < n; j++) { -// if (cmplxflag) { -// for (i = 0; i < m; i++) { -// zp->real = *xr++; -// zp->imag = *xi++; -// zp++; -// } -// } else { -// for (i = 0; i < m; i++) { -// zp->real = *xr++; -// zp++; -// } -// } -// zp += incz; -// } -// return(Z); -//} - - -/* - * Convert MKL complex storage to MATLAB real and imaginary parts. - * - * X = mkl2mat(Z,ldz,m,n) - * - * copies MKL_Complex16 Z to X, producing a complex mxArray - * with mxGetM(X) = m and mxGetN(X) = n. - */ - -//mxArray* mkl2mat(MKL_Complex16 *Z, int ldz, int m, int n) { -// int i, j, incz; -// double *xr, *xi; -// MKL_Complex16 *zp; -// mxArray *X; - -// X = mxCreateDoubleMatrix(m,n,mxCOMPLEX); -// xr = mxGetPr(X); -// xi = mxGetPi(X); -// zp = Z; -// incz = ldz-m; -// for (j = 0; j < n; j++) { -// for (i = 0; i < m; i++) { -// *xr++ = zp->real; -// *xi++ = zp->imag; -// zp++; -// } -// zp += incz; -// } -// return(X); -//} - -//plhs[3] = mkl2mat(fmat, n, nunstab, nunstab) - -/* - * Convert MKL complex storage to MATLAB real matrix ignoring imaginary part. - * - * X = mkl2mat(Z,ldz,m,n) - * - * copies MKL_Complex16 Z to X, producing a real mxArray - * with mxGetM(X) = m and mxGetN(X) = n. - */ - -//mxArray* mkl2mat_real(MKL_Complex16 *Z, int ldz, int m, int n) { -// int i, j, incz; -// double *xr; -// MKL_Complex16 *zp; -// mxArray *X; - -// X = mxCreateDoubleMatrix(m,n,mxREAL); -// xr = mxGetPr(X); -// zp = Z; -// incz = ldz-m; -// for (j = 0; j < n; j++) { -// for (i = 0; i < m; i++) { -// *xr++ = zp->real; -// zp++; -// } -// zp += incz; -// } -// return(X); -//} - -//void copy_eigenvalues(mxArray *gev, MKL_Complex16 *a, MKL_Complex16 *b, int n) { -// double *gevr = mxGetPr(gev), -// *gevi = mxGetPi(gev); -// int i; - -// for (i=0; i<n; i++, gevr++, gevi++, a+=n+1) { -// *gevr = a->real; -// *gevi = a->imag; -// } - -// for (i=0; i<n; i++, gevr++, gevi++, b+=n+1) { -// *gevr = b->real; -// *gevi = b->imag; -// } -//} - -static void copy_eigenvalues(TSdzmatrix *Gev_dzm, MKL_Complex16 *a, MKL_Complex16 *b) -{ - int n = Gev_dzm->real->nrows; - double *gevr = Gev_dzm->real->M, - *gevi = Gev_dzm->imag->M; - int i; - - for (i=0; i<n; i++, gevr++, gevi++, a+=n+1) { - *gevr = a->real; - *gevi = a->imag; - } - - for (i=0; i<n; i++, gevr++, gevi++, b+=n+1) { - *gevr = b->real; - *gevi = b->imag; - } -} - - -static int compute_svd(MKL_Complex16 *x, MKL_Complex16 **u, double **d, MKL_Complex16 **v, int m, int n) -{ - //$$$Memory allocated to u, d, and v will be destroyed outside this function.$$$ - int tmpi; - int md = m<n?m:n, lwork = -1, info = 0; - MKL_Complex16 *a, *work, work1; - double *rwork = tzMalloc(5*md>1?5*md:1, double); - - a = tzMalloc(m*n, MKL_Complex16); - cblas_zcopy(m*n, x, 1, a, 1); - - *u = tzMalloc(tmpi=m*md,MKL_Complex16); - InitializeConstantMLK_Complex16(*u, tmpi, 0.0); - *v = tzMalloc(tmpi=md*n, MKL_Complex16); - InitializeConstantMLK_Complex16(*v, tmpi, 0.0); - *d = tzMalloc(md, double); - InitializeConstantDouble(*d, md, 0.0); - - /* Query zgges on the value of lwork */ - zgesvd("S", "S", &m, &n, a, &m, *d, *u, &m, *v, &md, &work1, &lwork, rwork, &info); - - if (info < 0) { - printf("WARNING: Input %d to zgesvd had an illegal value",-info); - tzDestroy(rwork); - return(info); - } - - lwork = (int)(work1.real); - work = tzMalloc(lwork, MKL_Complex16); - zgesvd("S", "S", &m, &n, a, &m, *d, *u, &m, *v, &md, work, &lwork, rwork, &info); - - tzDestroy(work); - tzDestroy(rwork); - tzDestroy(a); - - if (info < 0) - printf("WARNING: Input %d to zgesvd had an illegal value",-info); - - if (info > 0) - printf("WARNING: ZBDSQR did not converge.\n%d superdiagonals of an intermediate " - "bidiagonal form B did not converge to zero.",info); - return(info); -} - -static int compute_norm(MKL_Complex16 *a, double **d, int m, int n) -{ - //Memory will be allocated to d, which will be destroyed outside this function. - int md = m<n?m:n, lwork = -1, info = 0; - MKL_Complex16 *work = NULL, work1; - double *rwork = tzMalloc(5*md>1?5*md:1, double); - - *d = tzMalloc(md, double); - - /* Query zgges on the value of lwork */ - zgesvd("N", "N", &m, &n, a, &m, *d, NULL, &m, NULL, &md, &work1, &lwork, rwork, &info); - - if (info < 0) { - printf("WARNING: Input %d to zgesvd had an illegal value",-info); - tzDestroy(rwork); - return(info); - } - - lwork = (int)(work1.real); - work = tzMalloc(lwork, MKL_Complex16); - zgesvd("N", "N", &m, &n, a, &m, *d, NULL, &m, NULL, &md, work, &lwork, rwork, &info); - - tzDestroy(work); - tzDestroy(rwork); - - if (info < 0) - printf("WARNING: Input %d to zgesvd had an illegal value",-info); - - if (info > 0) - printf("WARNING: ZBDSQR() in Intel MKL did not converge.\n%d superdiagonals of an intermediate " - "bidiagonal form B did not converge to zero.",info); - - return(info); -} - - -//======= 03/01/06 TZ. Commented out to be consistent with the CAS 3/10/04 correction. =======// -//static int compute_normx(MKL_Complex16 *a, MKL_Complex16 *b, MKL_Complex16 *zwt, MKL_Complex16 *ueta, double **normx, int nunstab, int psin, int n, int bigev) -//{ -// //Memory is allocated to normx, which will be freed outside this function. -// int tmpi; -// int info = 0, i, bigevs; -// // -// MKL_Complex16 *M = NULL, *zwtx = NULL, *ux = NULL, *vx = NULL, *tmp = NULL; -// double *dx = NULL; - - -// a += (n+1)*(n-nunstab); -// b += (n+1)*(n-nunstab); -// cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, -// nunstab, psin, &one, b, n, zwt, nunstab); -// M = tzMalloc(nunstab*nunstab, MKL_Complex16); -// cblas_zdupe(nunstab, nunstab, a, n, M, nunstab); -// cblas_ztrsm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, -// nunstab, nunstab, &one, b, n, M, nunstab); - -// zwtx = tzMalloc(nunstab*nunstab*psin, MKL_Complex16); -// cblas_zcopy(nunstab*psin, zwt, 1, zwtx, 1); -// for (i=1; i<nunstab; i++) { -// cblas_ztrmm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, nunstab, psin*i, &one, M, nunstab, zwtx, nunstab); -// cblas_zcopy(nunstab*psin, zwt, 1, zwtx+nunstab*psin*i, 1); -// } -// tzDestroy(M); -// cblas_ztrmm(CblasColMajor, CblasLeft, CblasUpper, CblasNoTrans, CblasNonUnit, nunstab, nunstab*psin, &one, b, n, zwtx, nunstab); -// info = compute_svd(zwtx, &ux, &dx, &vx, nunstab, nunstab*psin); //Memory is allocated to ux, dx, and vx. -// tzDestroy(vx); -// tzDestroy(zwtx); -// if (info) { -// printf("WARNING: SVD failed.\n"); -// tzDestroy(ux); -// tzDestroy(dx); -// return(info); -// } -// bigevs = nunstab; -// for (i=0; i<nunstab; i++) -// if (dx[i]<=REALSMALL) { -// bigevs = i; -// break; -// } -// tzDestroy(dx); -// /* ux-ueta*ueta'*ux */ -// tmp = tzMalloc(tmpi=nunstab*nunstab, MKL_Complex16); -// InitializeConstantMLK_Complex16(tmp, tmpi, 0.0); //Must be initialized to 0.0 in order to have legal values of this pointer. -// cblas_zgemm(CblasColMajor, CblasNoTrans, CblasConjTrans, nunstab, nunstab, -// bigev, &one, ueta, nunstab, ueta, nunstab, &zero, tmp, nunstab); -// cblas_zhemm(CblasColMajor, CblasLeft, CblasUpper, nunstab, -// bigevs, &minusone, tmp, nunstab, ux, nunstab, &one, ux, nunstab); -// tzDestroy(tmp); -// info = compute_norm(ux, normx, nunstab, bigevs); //Memory is allocated to normx. -// if (info) { -// printf("WARNING: SVD failed.\n"); -// tzDestroy(normx); -// tzDestroy(ux); -// return(info); -// } -// tzDestroy(ux); -// return(info); -//} - -static void cblas_zdupe(int m, int n, MKL_Complex16 *a, int lda, MKL_Complex16 *b, int ldb) -{ - //Copying from a to b. - int i; - for (i=0; i<m; i++, a++, b++) - cblas_zcopy(n, a, lda, b, ldb); -} - -static void cblas_zdscali(int n, double *a, int lda, MKL_Complex16 *b, int ldb) -{ - int i; - for (i=0; i<lda; i++, a++, b++) - cblas_zdscal(n, 1.0/(*a), b, ldb); -} - -static void cblas_zdscale(int n, double *a, int lda, MKL_Complex16 *b, int ldb) -{ - int i; - for (i=0; i<lda; i++, a++, b++) - cblas_zdscal(n, *a, b, ldb); -} - -static void cblas_zdpsb(int m, int n, MKL_Complex16 *a, int lda, MKL_Complex16 *b, int ldb, MKL_Complex16 *c, int ldc) -{ - int i; - cblas_zdupe(m, n, a, lda, c, ldc); - for (i=0; i<m; i++, b++, c++) - cblas_zaxpy(n, &minusone, b, ldb, c, ldc); -} - - -static MKL_Complex16* CreateComplexMatrix5RealMatrix(TSdmatrix *X_dm) -{ - int mn, k; - double *M; - // - MKL_Complex16 *Z = NULL; - - if (!X_dm) fn_DisplayError("CreateComplexMatrix5RealMatrix(): Input matrix X_dm must be allocated memory"); - M = X_dm->M; - - Z = tzMalloc(mn=X_dm->nrows*X_dm->ncols, MKL_Complex16); - for (k=mn-1; k>=0; k--) { - Z[k].real = M[k]; - Z[k].imag = 0.0; - } - return(Z); -} - -static MKL_Complex16* CreateComplexMatrix5RealVector(TSdvector *x_dv) -{ - int n, k; - double *v; - // - MKL_Complex16 *Z = NULL; - - if (!x_dv) fn_DisplayError("CreateComplexMatrix5RealVector(): Input vector x_dv must be allocated memory"); - v = x_dv->v; - - Z = tzMalloc(n=x_dv->n, MKL_Complex16); - for (k=n-1; k>=0; k--) { - Z[k].real = v[k]; - Z[k].imag = 0.0; - } - return(Z); -} - - -static void ComplexMatrix2RealMatrix(TSdmatrix *Y_dm, MKL_Complex16 *Z) -{ - int _k; - double *M; - - if (!Y_dm) fn_DisplayError("ComplexMatrix2RealMatrix(): Output matrix Y_dm must be allocated memory"); - M = Y_dm->M; - - for (_k=Y_dm->nrows*Y_dm->ncols-1; _k>=0; _k--) M[_k] = Z[_k].real; - Y_dm->flag = M_GE; -} - - -static void ComplexMatrix2RealVector(TSdvector *y_dv, MKL_Complex16 *Z) -{ - int _k; - double *v; - - if (!y_dv) fn_DisplayError("ComplexMatrix2RealVector(): Output matrix y_dv must be allocated memory"); - v = y_dv->v; - - for (_k=y_dv->n-1; _k>=0; _k--) v[_k] = Z[_k].real; - y_dv->flag = V_DEF; -} - - -static TSdzmatrix *SubComplexMatrix2Zmatrix(TSdzmatrix *X_dzm, MKL_Complex16 *Z, const int nrowsforZ, const int _m, const int _n) -{ - //X_dzm is _m-by_n comlex types where nrowsforZ <= _m and Z is nrowsforZ-by-_n. - int _i, _j, incz; - double *Mreal, *Mimag; - MKL_Complex16 *zp; - // - TSdzmatrix *Y_dzm = NULL; - - if (!X_dzm || X_dzm->real->nrows != _m || X_dzm->real->ncols != _n) { - DestroyMatrix_dz(X_dzm); //Destroys Y_dzm if already allocated memory to accommodate a possbible change of its dimension. - Y_dzm = CreateMatrix_dz(_m, _n); - } - else Y_dzm = X_dzm; - - Mreal = Y_dzm->real->M; - Mimag = Y_dzm->imag->M; - zp = Z; - if ((incz=nrowsforZ-_m)<0) fn_DisplayError("SubComplexMatrix2ZMatrix(): Number of rows for the input complex matrix Z must be greater that of the output Z matrix Y_dzm"); - - for (_j=0; _j<_n; _j++) { - for (_i=0; _i<_m; _i++) { - *Mreal++ = zp->real; - *Mimag++ = zp->imag; - zp++; - } - zp += incz; - } - return (Y_dzm); -} - - -static void InitializeConstantMLK_Complex16(MKL_Complex16 *x_clx, const int _n, const double c) -{ - int _i; - - for (_i=_n-1; _i>=0; _i--) - x_clx[_i].real = x_clx[_i].imag = c; -} - -static void InitializeConstantDouble(double *x_p, const int _n, const double c) -{ - int _i; - - for (_i=_n-1; _i>=0; _i--) x_p[_i] = c; -} - -static void ConverteZeroSquareMatrix2RealDiagonalMLK_Complex16(MKL_Complex16 *x_pc, const int _n, const double c) -{ - //Written by TZ, 03/08/06. - //Output: - // x_pc: _n-by-_n, with the diagonal - //Inputs: - // _n: dimension of x_pc so that x_pc is _n-by-_n. - // x_pc: _n-by-_n, all initialized to zeros. - int _i; - int np1 = _n+1; - - for (_i=_n*_n-1; _i>=0; _i -= np1) - x_pc[_i].real = x_pc[_i].imag = c; -} - diff --git a/CFiles/gensys.h b/CFiles/gensys.h deleted file mode 100644 index 9b6d3516d0522f1af9280517a4687130055d32ad..0000000000000000000000000000000000000000 --- a/CFiles/gensys.h +++ /dev/null @@ -1,67 +0,0 @@ -/******************************************************************* - * [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div) - * - * System given as - * g0*y(t)=g1*y(t-1)+c+psi*z(t)+pi*eta(t), - * with z an exogenous variable process and eta being endogenously determined - * one-step-ahead expectational errors. Returned system is - * y(t)=G1*y(t-1)+C+impact*z(t)+ywt*inv(I-fmat*inv(L))*fwt*z(t+1) . - * If z(t) is i.i.d., the last term drops out. - * If div or stake is omitted from argument list, a div>1 or stake>1 is calculated. - * eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for - * existence only with not-serially correlated z(t); eu=[-2,-2] for coincident zeros. - * - * g0, g1: n-by-n matrices. - * c: n-by-1 constant terms. - * z(t): m-by-1 vector of exogenous residuals where m < n. - * psi: n-by-m matrix. - * eta(t): h-by-1 vector of expectational (endogenous) errors. - * pi: n-by-h matrix. - * div: a real number dividing stable and unstable roots.. If < 1.0, a div>1.0 is calculated mechanically. - *------- - * G1 or Theta_dm: n-by-n matrices. - * C: n-by-1 vector of constant terms. - * impact: n-by-m matrix. - * gev: n-by-2 z vector of stacked generalized eigenvalues where gev(;,2) ./ gev(:,1) = eig(g0, g1). - * ywt: n-by-nunstab z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - * fmat: nunstab-by-nunstab z matrix where nunstab is the number of non-stable roots. - * fwt: nunstab-by-m z matrix. -********************************************************************/ - -#ifndef __GENSYS_H__ - #define __GENSYS_H__ - - #include "tzmatlab.h" - //#include "fn_filesetup.h" //For DDDDebugging purpose. - - #define REALSMALL 1e-7 - //#define PRINTWARNINGofSUNSPOT - - typedef struct TSgensys_tag { - //=== Output arguments. - TSdmatrix *Theta_dm; //n-by-n. - TSdvector *c_dv; //n-by-1. - TSdmatrix *Impact_dm; //n-by-m. - TSdzmatrix *Fmat_dzm; //nunstab-by-nunstab z matrix. Initialized to NULL and will be dynamically allocated whenever gensys() is called. - TSdzmatrix *Fwt_dzm; //nunstab-by-m z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - TSdzmatrix *Ywt_dzm; //n-by-nunstab z matrix of possible complex numbers. Initialized to NULL and dynamically allocated. - TSdzmatrix *Gev_dzm; //n-by-2 z matrix of possible complex numbers. - TSivector *eu_iv; //2-by-1. - //=== Function itself. - int (*gensys)(struct TSgensys_tag *, void *); - //=== Input arguments, which are all intialized to 0.0 and whose flags are set to M_GE. - TSdmatrix *G0_dm; //n-by-n. - TSdmatrix *G1_dm; //n-by-n. - TSdvector *c0_dv; //n-by-1. - TSdmatrix *Psi_dm; //n-by-m. - TSdmatrix *Pi_dm; //n-by-k whtere k is the number of expectational errors. - double div; //Real number dividing stable and unstable roots.. If < 1.0, a div>1.0 is calculated mechanically. - } TSgensys; - // - typedef int TFlinratexp(struct TSgensys_tag *, void *); //For linear rational expectations models. - - struct TSgensys_tag *CreateTSgensys(TFlinratexp *func, const int _n, const int _m, const int _k, const double div); - struct TSgensys_tag *DestroyTSgensys(struct TSgensys_tag *gensys_ps); - int gensys_sims(struct TSgensys_tag *gensys_ps, void *dummy_ps); -#endif - diff --git a/CFiles/kalman.c b/CFiles/kalman.c deleted file mode 100644 index dbeff14b363bd11f089876a8672873eb2d0903aa..0000000000000000000000000000000000000000 --- a/CFiles/kalman.c +++ /dev/null @@ -1,2909 +0,0 @@ -/*=============================================================================================================== - * Check $$$ for important notes. - * Check <<>> for updating DW's new switch code or questions for DW. - * - * kalcvf_urw(): the Kalman filter forward prediction specialized for only a univariate random walk (urw) process. - * - * State space model is defined as follows: - * z(t+1) = z(t)+eta(t) (state or transition equation) - * y(t) = x(t)'*z(t)+eps(t) (observation or measurement equation) - * where for this function, eta and eps must be uncorrelated; y(t) must be 1-by-1. Note that - * x(t): k-by-1; - * z(t): k-by-1; - * eps(t): 1-by-1 and ~ N(0, sigma^2); - * eta(t): ~ N(0, V) where V is a k-by-k covariance matrix. - * - * - * Written by Tao Zha, May 2004. - * Revised, May 2008; -=================================================================================================================*/ - -/** -//=== For debugging purpose. -if (1) -{ - double t_loglht; - - t_loglht = -(0.5*ny)*LOG2PI - 0.5*logdeterminant(Dtdata_dm) - 0.5*VectorDotVector(wny_dv, etdata_dv); - fprintf(FPTR_DEBUG, " %10.5f\n", t_loglht); - - fprintf(FPTR_DEBUG, "%%st=%d, inpt=%d, and sti=%d\n", st, inpt, sti); - - fprintf(FPTR_DEBUG, "\n wP0_dv:\n"); - WriteVector(FPTR_DEBUG, wP0_dv, " %10.5f "); - fprintf(FPTR_DEBUG, "\n Vt_dc->C[sti_v=%d]:\n", sti_v); - WriteMatrix(FPTR_DEBUG, Vt_dc->C[sti_v], " %10.5f "); - - fflush(FPTR_DEBUG); -} -/**/ - - -#include "kalman.h" - - -static int Update_et_Dt_1stapp(int t_1, struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps); -int Updatekalfilms_1stapp(int inpt, struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps, struct TStateModel_tag *smodel_ps); - - -TSkalcvfurw *CreateTSkalcvfurw(TFlearninguni *func, int T, int k, int tv) //, int storeZ, int storeV) -{ - int _i; - //=== - TSivector *rows_iv = NULL; - TSivector *cols_iv = NULL; - //--- - TSkalcvfurw *kalcvfurw_ps = tzMalloc(1, TSkalcvfurw); - - - kalcvfurw_ps->indx_tvsigmasq = tv; - kalcvfurw_ps->fss = T; - kalcvfurw_ps->kx = k; - - //=== - kalcvfurw_ps->V_dm = CreateMatrix_lf(k, k); - kalcvfurw_ps->ylhtran_dv = CreateVector_lf(T); - kalcvfurw_ps->Xrhtran_dm = CreateMatrix_lf(k, T); - kalcvfurw_ps->z10_dv = CreateVector_lf(k); - kalcvfurw_ps->P10_dm = CreateMatrix_lf(k, k); - - kalcvfurw_ps->zupdate_dv = CreateVector_lf(k); - kalcvfurw_ps->Zpredtran_dm = CreateMatrix_lf(k, T); - kalcvfurw_ps->ylhtranpred_dv = CreateVector_lf(T); - // - rows_iv = CreateVector_int(T); - cols_iv = CreateVector_int(T); - for (_i=T-1; _i>=0; _i--) rows_iv->v[_i] = cols_iv->v[_i] = k; - kalcvfurw_ps->Ppred_dc = CreateCell_lf(rows_iv, cols_iv); - // if (!storeZ) kalcvfurw_ps->Zpredtran_dm = (TSdmatrix *)NULL; - // else kalcvfurw_ps->Zpredtran_dm = CreateMatrix_lf(k, T); - // if (!storeV) kalcvfurw_ps->Ppred_dc = (TSdcell *)NULL; - // else { - // rows_iv = CreateVector_int(T); - // cols_iv = CreateVector_int(T); - // for (_i=T; _i>=0; _i--) rows_iv->v[_i] = cols_iv->v[_i] = k; - // kalcvfurw_ps->Ppred_dc = CreateCell_lf(rows_iv, cols_iv); - // } - - DestroyVector_int(rows_iv); - DestroyVector_int(cols_iv); - return (kalcvfurw_ps); -} - -TSkalcvfurw *DestroyTSkalcvfurw(TSkalcvfurw *kalcvfurw_ps) -{ - if (kalcvfurw_ps) { - DestroyMatrix_lf(kalcvfurw_ps->V_dm); - DestroyVector_lf(kalcvfurw_ps->ylhtran_dv); - DestroyMatrix_lf(kalcvfurw_ps->Xrhtran_dm); - DestroyVector_lf(kalcvfurw_ps->z10_dv); - DestroyMatrix_lf(kalcvfurw_ps->P10_dm); - - DestroyVector_lf(kalcvfurw_ps->zupdate_dv); - DestroyMatrix_lf(kalcvfurw_ps->Zpredtran_dm); - DestroyCell_lf(kalcvfurw_ps->Ppred_dc); - DestroyVector_lf(kalcvfurw_ps->ylhtranpred_dv); - - free(kalcvfurw_ps); - return ((TSkalcvfurw *)NULL); - } - else return (kalcvfurw_ps); -} - - -void kalcvf_urw(TSkalcvfurw *kalcvfurw_ps, void *dummy_ps) -{ - //See the notes of SWZ regarding the government's updating of the parameters in their Phillips-curve equation. - //NOTE: make sure that the value of kalcvfurw_ps->sigmasq and other input values are given. - int ti; - double workd, workdenominv; - //--- - int fss, kx; - double sigmasq_fix = kalcvfurw_ps->sigmasq; -// double sigmasq; - TSdmatrix *V_dm; - TSdmatrix *Zpredtran_dm; - TSdcell *Ppred_dc; - TSdvector *ylhtran_dv; - TSdmatrix *Xrhtran_dm; - //=== - TSdvector *workkxby1_dv = NULL; //kx-by-1. -// TSdvector *work1kxby1_dv = NULL; //kx-by-1. - TSdmatrix *workkxbykx_dm = NULL; //kx-by-kx symmetric and positive positive. -// //=== -// TSdvector *zbefore_dv = CreateVector_lf(kalcvfurw_ps->kx); -// TSdmatrix *Vbefore_dm = CreateMatrix_lf(kalcvfurw_ps->kx, kalcvfurw_ps->kx); -// TSdvector *zafter_dv = CreateVector_lf(kalcvfurw_ps->kx); -// TSdmatrix *Vafter_dm = CreateMatrix_lf(kalcvfurw_ps->kx, kalcvfurw_ps->kx); - //******* WARNING: Some dangerous pointer movement to gain efficiency ******* -// double *yt_p; -// double *Vbefore_p; -// double *Vafter_p; - TSdvector xt_sdv; - TSdvector zbefore_sdv; - //TSdmatrix Vbefore_sdm; - TSdvector zafter_sdv; - //TSdmatrix Vafter_sdm; - - - if (!kalcvfurw_ps) fn_DisplayError(".../kalcvf_urw(): the input argument kalcvfurw_ps must be created"); - if (!kalcvfurw_ps->V_dm || !kalcvfurw_ps->ylhtran_dv || !kalcvfurw_ps->Xrhtran_dm || !kalcvfurw_ps->z10_dv || !kalcvfurw_ps->P10_dm) - fn_DisplayError(".../kalcvf_urw(): input arguments kalcvfurw_ps->V_dm, kalcvfurw_ps->ylhtran_dv, kalcvfurw_ps->Xrhtran_dm, kalcvfurw_ps->z10_dv, kalcvfurw_ps->P10_dm must be given legal values"); - if (!(kalcvfurw_ps->P10_dm->flag & (M_SU | M_SL))) fn_DisplayError(".../kalcvf_urw(): the input argument kalcvfurw_ps->P10_dm must be symmetric"); - fss = kalcvfurw_ps->fss; - kx = kalcvfurw_ps->kx; - V_dm = kalcvfurw_ps->V_dm; - Zpredtran_dm = kalcvfurw_ps->Zpredtran_dm; - Ppred_dc = kalcvfurw_ps->Ppred_dc; - ylhtran_dv = kalcvfurw_ps->ylhtran_dv; - Xrhtran_dm = kalcvfurw_ps->Xrhtran_dm; - //--- - xt_sdv.n = kx; - xt_sdv.flag = V_DEF; - zbefore_sdv.n = kx; - zbefore_sdv.flag = V_DEF; - zafter_sdv.n = kx; - zafter_sdv.flag = V_DEF; - - //=== Memory allocation. - workkxby1_dv = CreateVector_lf(kx); - workkxbykx_dm = CreateMatrix_lf(kx, kx); - - - //------- The first period (ti=0). ------- - zbefore_sdv.v = kalcvfurw_ps->z10_dv->v; - zafter_sdv.v = Zpredtran_dm->M; - xt_sdv.v = Xrhtran_dm->M; - //--- - - workd = ylhtran_dv->v[0] - (kalcvfurw_ps->ylhtranpred_dv->v[0]=VectorDotVector(&xt_sdv, &zbefore_sdv)); //y_t - x_t'*z_{t-1}. - SymmatrixTimesVector(workkxby1_dv, kalcvfurw_ps->P10_dm, &xt_sdv, 1.0, 0.0); //P_{t|t-1} x_t; - - if (!kalcvfurw_ps->indx_tvsigmasq) - workdenominv = 1.0/(sigmasq_fix + VectorDotVector(&xt_sdv, workkxby1_dv)); //1/[sigma^2 + x_t' P_{t|t-1} x_t] - else if (kalcvfurw_ps->indx_tvsigmasq == 1) //See pp.37 and 37a in SWZ Learning NOTES. - workdenominv = 1.0/(sigmasq_fix*square(kalcvfurw_ps->z10_dv->v[0]) + VectorDotVector(&xt_sdv, workkxby1_dv)); //1/[sigma^2 + x_t' P_{t|t-1} x_t]; - else { - printf(".../kalman.c/kalcvf_urw(): Have not got time to deal with kalcvfurw_ps->indx_tvsigmasq defined in kalman.h other than 0 or 1"); - exit(EXIT_FAILURE); - } - - - //--- Updating z_{t+1|t}. - CopyVector0(&zafter_sdv, &zbefore_sdv); - VectorPlusMinusVectorUpdate(&zafter_sdv, workkxby1_dv, workd*workdenominv); //z_{t+1|t} = z_{t|t-1} + P_{t|t-1} x_t [y_t - x_t'*z_{t-1}] / [sigma^2 + x_t' P_{t|t-1} x_t]; - //--- Updating P_{t+1|t}. - CopyMatrix0(workkxbykx_dm, V_dm); - VectorTimesSelf(workkxbykx_dm, workkxby1_dv, -workdenominv, 1.0, (V_dm->flag & M_SU) ? 'U' : 'L'); - // - P_{t|t-1}*x_t * xt'*P_{t|t-1} / [sigma^2 + x_t' P_{t|t-1} x_t] + V; - MatrixPlusMatrix(Ppred_dc->C[0], kalcvfurw_ps->P10_dm, workkxbykx_dm); - //P_{t|t-1} - P_{t|t-1}*x_t * xt'*P_{t|t-1} / [sigma^2 + x_t' P_{t|t-1} x_t] + V; - Ppred_dc->C[0]->flag = M_GE | M_SU | M_SL; //This is necessary because if P10_dm is initialized as diagonal, it will have M_GE | M_SU | M_SL | M_UT | M_LT, - // which is no longer true for workkxbykx_dm and therefore gives Ppred_dc->C[0] with M_GE only as a result of MatrixPlusMatrix(). - //Done with all work* arrays. - - //------- The rest of the periods (ti=1:T-1). ------- - for (ti=1; ti<fss; ti++) { - //NOTE: ti=0 has been taken care of outside of this loop. - zbefore_sdv.v = Zpredtran_dm->M + (ti-1)*kx; - zafter_sdv.v = Zpredtran_dm->M + ti*kx; - xt_sdv.v = Xrhtran_dm->M + ti*kx; - //--- - workd = ylhtran_dv->v[ti] - (kalcvfurw_ps->ylhtranpred_dv->v[ti]=VectorDotVector(&xt_sdv, &zbefore_sdv)); //y_t - x_t'*z_{t-1}. - SymmatrixTimesVector(workkxby1_dv, Ppred_dc->C[ti-1], &xt_sdv, 1.0, 0.0); //P_{t|t-1} x_t; - if (!kalcvfurw_ps->indx_tvsigmasq) - workdenominv = 1.0/(sigmasq_fix + VectorDotVector(&xt_sdv, workkxby1_dv)); //1/[sigma^2 + x_t' P_{t|t-1} x_t] - else if (kalcvfurw_ps->indx_tvsigmasq == 1) //See pp.37 and 37a in SWZ Learning NOTES. - workdenominv = 1.0/(sigmasq_fix*square(zbefore_sdv.v[0]) + VectorDotVector(&xt_sdv, workkxby1_dv)); //1/[sigma^2 + x_t' P_{t|t-1} x_t] - else { - printf(".../kalman.c/kalcvf_urw(): Have not got time to deal with kalcvfurw_ps->indx_tvsigmasq defined in kalman.h other than 0 or 1"); - exit(EXIT_FAILURE); - } - //--- Updating z_{t+1|t}. - CopyVector0(&zafter_sdv, &zbefore_sdv); - VectorPlusMinusVectorUpdate(&zafter_sdv, workkxby1_dv, workd*workdenominv); //z_{t+1|t} = z_{t|t-1} + P_{t|t-1} x_t [y_t - x_t'*z_{t-1}] / [sigma^2 + x_t' P_{t|t-1} x_t]; - //--- Updating P_{t+1|t}. - CopyMatrix0(workkxbykx_dm, V_dm); - VectorTimesSelf(workkxbykx_dm, workkxby1_dv, -workdenominv, 1.0, (V_dm->flag & M_SU) ? 'U' : 'L'); - // - P_{t|t-1}*x_t * xt'*P_{t|t-1} / [sigma^2 + x_t' P_{t|t-1} x_t] + V; - MatrixPlusMatrix(Ppred_dc->C[ti], Ppred_dc->C[ti-1], workkxbykx_dm); - //P_{t|t-1} - P_{t|t-1}*x_t * xt'*P_{t|t-1} / [sigma^2 + x_t' P_{t|t-1} x_t] + V; - Ppred_dc->C[ti]->flag = M_GE | M_SU | M_SL; //This is necessary because if P10_dm is initialized as diagonal, it will have M_GE | M_SU | M_SL | M_UT | M_LT, - // which is no longer true for workkxbykx_dm and therefore gives Ppred_dc->C[0] with M_GE only as a result of MatrixPlusMatrix(). - //Done with all work* arrays. - } - CopyVector0(kalcvfurw_ps->zupdate_dv, &zafter_sdv); - Zpredtran_dm->flag = M_GE; - kalcvfurw_ps->ylhtranpred_dv->flag = V_DEF; - -// DestroyVector_lf(zbefore_dv); -// DestroyMatrix_lf(Vbefore_dm); -// DestroyVector_lf(zafter_dv); -// DestroyMatrix_lf(Vafter_dm); - - DestroyVector_lf(workkxby1_dv); -// DestroyVector_lf(work1kxby1_dv); - DestroyMatrix_lf(workkxbykx_dm); -} - - - -//----------------------------------------------------------------------------------------------------------------------- -//-- General constant (known-time-varying) Kalman filter for DSGE models. -//----------------------------------------------------------------------------------------------------------------------- -struct TSkalfiltv_tag *CreateTSkalfiltv(int ny, int nz, int T) -{ - int _i; - //=== - TSivector *rows_iv = CreateVector_int(T); - TSivector *cols_iv = CreateVector_int(T); - //~~~ Creating the structure and initializing the NULL pointers. - struct TSkalfiltv_tag *kalfiltv_ps = tzMalloc(1, struct TSkalfiltv_tag); - - - //--- Default value. - kalfiltv_ps->indxIni = 0; //1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - //0: using the unconditional mean for any given regime at time 0. - //--- Other assignments. - kalfiltv_ps->ny = ny; - kalfiltv_ps->nz = nz; - kalfiltv_ps->T = T; - - - - //--------- Creates memory and assigns values. The order matters. - kalfiltv_ps->yt_dm = CreateMatrix_lf(ny, T); - kalfiltv_ps->at_dm = CreateMatrix_lf(ny, T); - // - for (_i=T-1; _i>=0; _i--) - { - rows_iv->v[_i] = ny; - cols_iv->v[_i] = nz; - } - rows_iv->flag = cols_iv->flag = V_DEF; - kalfiltv_ps->Ht_dc = CreateCell_lf(rows_iv, cols_iv); - // - for (_i=T-1; _i>=0; _i--) - { - rows_iv->v[_i] = ny; - cols_iv->v[_i] = ny; - } - kalfiltv_ps->Rt_dc = CreateCell_lf(rows_iv, cols_iv); - // - for (_i=T-1; _i>=0; _i--) - { - rows_iv->v[_i] = nz; - cols_iv->v[_i] = ny; - } - kalfiltv_ps->Gt_dc = CreateCell_lf(rows_iv, cols_iv); - // - kalfiltv_ps->bt_dm = CreateMatrix_lf(nz, T); - // - for (_i=T-1; _i>=0; _i--) - { - rows_iv->v[_i] = nz; - cols_iv->v[_i] = nz; - } - kalfiltv_ps->Ft_dc = CreateCell_lf(rows_iv, cols_iv); - kalfiltv_ps->Vt_dc = CreateCell_lf(rows_iv, cols_iv); - // - kalfiltv_ps->z0_dv = CreateVector_lf(nz); - kalfiltv_ps->P0_dm = CreateMatrix_lf(nz, nz); - - - //--- - kalfiltv_ps->zt_tm1_dm = CreateMatrix_lf(nz, T); - for (_i=T-1; _i>=0; _i--) - { - rows_iv->v[_i] = nz; - cols_iv->v[_i] = nz; - } - kalfiltv_ps->Pt_tm1_dc = CreateCell_lf(rows_iv, cols_iv); - - - //=== - DestroyVector_int(rows_iv); - DestroyVector_int(cols_iv); - - return (kalfiltv_ps); - -} -//--- -struct TSkalfiltv_tag *DestroyTSkalfiltv(struct TSkalfiltv_tag *kalfiltv_ps) -{ - if (kalfiltv_ps) - { - //=== The order matters! - DestroyMatrix_lf(kalfiltv_ps->yt_dm); - DestroyMatrix_lf(kalfiltv_ps->at_dm); - DestroyCell_lf(kalfiltv_ps->Ht_dc); - DestroyCell_lf(kalfiltv_ps->Rt_dc); - DestroyCell_lf(kalfiltv_ps->Gt_dc); - //--- - DestroyMatrix_lf(kalfiltv_ps->bt_dm); - DestroyCell_lf(kalfiltv_ps->Ft_dc); - DestroyCell_lf(kalfiltv_ps->Vt_dc); - //--- - DestroyVector_lf(kalfiltv_ps->z0_dv); - DestroyMatrix_lf(kalfiltv_ps->P0_dm); - //--- - DestroyMatrix_lf(kalfiltv_ps->zt_tm1_dm); - DestroyCell_lf(kalfiltv_ps->Pt_tm1_dc); - - - //--- - tzDestroy(kalfiltv_ps); //Must be freed last! - - return ((struct TSkalfiltv_tag *)NULL); - } - else return (kalfiltv_ps); -}; - - -//----------------------------------------------------------------------------------------------------------------------- -//-- New code: Inputs for filter for Markov-switching DSGE models at any time t. -//----------------------------------------------------------------------------------------------------------------------- -struct TSkalfilmsinputs_1stapp_tag *CreateTSkalfilmsinputs_1stapp2(int ny, int nz, int nu, int ne, int nst, int T) -{ - //~~~ Creating the structure and initializing the NULL pointers. - struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps = tzMalloc(1, struct TSkalfilmsinputs_1stapp_tag); - - //=== - TSivector *rows_iv = NULL; - TSivector *cols_iv = NULL; - - //=== Default value. - kalfilmsinputs_1stapp_ps->indxIni = 0; //1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - //0: using the unconditional mean for any given regime at time 0. - kalfilmsinputs_1stapp_ps->indxDiffuse = 1; //1: using the diffuse condition for z_{1|0} and P_{1|0} (default option), according to Koopman and Durbin, "Filtering and Smoothing of State Vector for Diffuse State-Space Models," J. of Time Series Analysis, Vol 24(1), pp.85-99. - //0: using the unconditional moments. - kalfilmsinputs_1stapp_ps->DiffuseScale = 100.0; - kalfilmsinputs_1stapp_ps->ztm1_track = -1; - kalfilmsinputs_1stapp_ps->dtm1_track = -1; - - //--- Other key assignments. - kalfilmsinputs_1stapp_ps->ny = ny; - kalfilmsinputs_1stapp_ps->nz = nz; - kalfilmsinputs_1stapp_ps->nu = nu; - kalfilmsinputs_1stapp_ps->ne = ne; - kalfilmsinputs_1stapp_ps->nst = nst; - kalfilmsinputs_1stapp_ps->T = T; - - //--------- Creates memory and assigns values. The order matters. - kalfilmsinputs_1stapp_ps->yt_dm = CreateMatrix_lf(ny, T); - kalfilmsinputs_1stapp_ps->at_dm = CreateMatrix_lf(ny, nst); - // - rows_iv = CreateConstantVector_int(nst, ny); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Ht_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - if (nu) - { - rows_iv = CreateConstantVector_int(nst, ny); - cols_iv = CreateConstantVector_int(nst, nu); - kalfilmsinputs_1stapp_ps->Psiut_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - } - else - kalfilmsinputs_1stapp_ps->Psiut_dc = NULL; - // - rows_iv = CreateConstantVector_int(nst, ny); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->Rt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->Gt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - kalfilmsinputs_1stapp_ps->bt_dm = CreateMatrix_lf(nz, nst); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Ft_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, ne); - kalfilmsinputs_1stapp_ps->Psiet_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Vt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - kalfilmsinputs_1stapp_ps->z0_dm = CreateMatrix_lf(nz, nst); //nz-by-nst. - kalfilmsinputs_1stapp_ps->z0_0_dm = CreateMatrix_lf(nz, nst); //nz-by-nst. - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->P0_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nz-by-nst. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - - //--- For output arguments. - rows_iv = CreateConstantVector_int(T+1, nz); - cols_iv = CreateConstantVector_int(T+1, nst); - kalfilmsinputs_1stapp_ps->zt_tm1_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nst-by-(T+1). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Pt_tm1_d4 = CreateFourth_lf(T+1, rows_iv, cols_iv); //nz-by-nz-by-nst-by-(T+1). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->PHtran_tdata_d4 = CreateFourth_lf(T, rows_iv, cols_iv); //nz-by-ny-by-nst-T, saved only for updating Kalman filter Updatekalfilms_1stapp(). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(T, ny); - cols_iv = CreateConstantVector_int(T, nst); - kalfilmsinputs_1stapp_ps->etdata_dc = CreateCell_lf(rows_iv, cols_iv); //ny-by-nst-by-T, used for updating Kalman filter Updatekalfilms_1stapp(). - rows_iv = CreateConstantVector_int(T, ny); - cols_iv = CreateConstantVector_int(T, nst); - // - rows_iv = CreateConstantVector_int(nst, ny); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->Dtdata_d4 = CreateFourth_lf(T, rows_iv, cols_iv); //ny-by-ny-nst-by-T, used for updating Kalman filter Updatekalfilms_1stapp(). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - - return (kalfilmsinputs_1stapp_ps); -} -//--- -struct TSkalfilmsinputs_1stapp_tag *DestroyTSkalfilmsinputs_1stapp2(struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps) -{ - if (kalfilmsinputs_1stapp_ps) - { - //=== The order matters! - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->yt_dm); - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->at_dm); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Ht_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Psiut_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Rt_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Gt_dc); - //--- - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->bt_dm); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Ft_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Psiet_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Vt_dc); - //--- - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->z0_dm); - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->z0_0_dm); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->P0_dc); - //--- - DestroyCell_lf(kalfilmsinputs_1stapp_ps->zt_tm1_dc); - DestroyFourth_lf(kalfilmsinputs_1stapp_ps->Pt_tm1_d4); - DestroyFourth_lf(kalfilmsinputs_1stapp_ps->PHtran_tdata_d4); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->etdata_dc); - DestroyFourth_lf(kalfilmsinputs_1stapp_ps->Dtdata_d4); - //--- - tzDestroy(kalfilmsinputs_1stapp_ps); //Must be freed last! - - return ((struct TSkalfilmsinputs_1stapp_tag *)NULL); - } - else return (kalfilmsinputs_1stapp_ps); -}; - -struct TSkalfilmsinputs_1stapp_tag *CreateTSkalfilmsinputs_1stapp(int ny, int nz, int nst, int T) -{ - //~~~ Creating the structure and initializing the NULL pointers. - struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps = tzMalloc(1, struct TSkalfilmsinputs_1stapp_tag); - - //=== - TSivector *rows_iv = NULL; - TSivector *cols_iv = NULL; - - //=== Default value. - kalfilmsinputs_1stapp_ps->indxIni = 0; //1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - //0: using the unconditional mean for any given regime at time 0. - kalfilmsinputs_1stapp_ps->indxDiffuse = 1; //1: using the diffuse condition for z_{1|0} and P_{1|0} (default option), according to Koopman and Durbin, "Filtering and Smoothing of State Vector for Diffuse State-Space Models," J. of Time Series Analysis, Vol 24(1), pp.85-99. - //0: using the unconditional moments. - kalfilmsinputs_1stapp_ps->DiffuseScale = 100.0; - kalfilmsinputs_1stapp_ps->ztm1_track = -1; - kalfilmsinputs_1stapp_ps->dtm1_track = -1; - - //--- Other key assignments. - kalfilmsinputs_1stapp_ps->ny = ny; - kalfilmsinputs_1stapp_ps->nz = nz; - kalfilmsinputs_1stapp_ps->nst = nst; - kalfilmsinputs_1stapp_ps->T = T; - - //--------- Creates memory and assigns values. The order matters. - kalfilmsinputs_1stapp_ps->yt_dm = CreateMatrix_lf(ny, T); - kalfilmsinputs_1stapp_ps->at_dm = CreateMatrix_lf(ny, nst); - // - rows_iv = CreateConstantVector_int(nst, ny); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Ht_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, ny); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->Rt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->Gt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - kalfilmsinputs_1stapp_ps->bt_dm = CreateMatrix_lf(nz, nst); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Ft_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Vt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - kalfilmsinputs_1stapp_ps->z0_dm = CreateMatrix_lf(nz, nst); //nz-by-nst. - kalfilmsinputs_1stapp_ps->z0_0_dm = CreateMatrix_lf(nz, nst); //nz-by-nst. - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->P0_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nz-by-nst. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - - //--- For output arguments. - rows_iv = CreateConstantVector_int(T+1, nz); - cols_iv = CreateConstantVector_int(T+1, nst); - kalfilmsinputs_1stapp_ps->zt_tm1_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nst-by-(T+1). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, nz); - kalfilmsinputs_1stapp_ps->Pt_tm1_d4 = CreateFourth_lf(T+1, rows_iv, cols_iv); //nz-by-nz-by-nst-by-(T+1). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nst, nz); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->PHtran_tdata_d4 = CreateFourth_lf(T, rows_iv, cols_iv); //nz-by-ny-by-nst-T, saved only for updating Kalman filter Updatekalfilms_1stapp(). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(T, ny); - cols_iv = CreateConstantVector_int(T, nst); - kalfilmsinputs_1stapp_ps->etdata_dc = CreateCell_lf(rows_iv, cols_iv); //ny-by-nst-by-T, used for updating Kalman filter Updatekalfilms_1stapp(). - rows_iv = CreateConstantVector_int(T, ny); - cols_iv = CreateConstantVector_int(T, nst); - // - rows_iv = CreateConstantVector_int(nst, ny); - cols_iv = CreateConstantVector_int(nst, ny); - kalfilmsinputs_1stapp_ps->Dtdata_d4 = CreateFourth_lf(T, rows_iv, cols_iv); //ny-by-ny-nst-by-T, used for updating Kalman filter Updatekalfilms_1stapp(). - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - - return (kalfilmsinputs_1stapp_ps); -} -//--- -struct TSkalfilmsinputs_1stapp_tag *DestroyTSkalfilmsinputs_1stapp(struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps) -{ - if (kalfilmsinputs_1stapp_ps) - { - //=== The order matters! - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->yt_dm); - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->at_dm); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Ht_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Rt_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Gt_dc); - //--- - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->bt_dm); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Ft_dc); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->Vt_dc); - //--- - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->z0_dm); - DestroyMatrix_lf(kalfilmsinputs_1stapp_ps->z0_0_dm); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->P0_dc); - //--- - DestroyCell_lf(kalfilmsinputs_1stapp_ps->zt_tm1_dc); - DestroyFourth_lf(kalfilmsinputs_1stapp_ps->Pt_tm1_d4); - DestroyFourth_lf(kalfilmsinputs_1stapp_ps->PHtran_tdata_d4); - DestroyCell_lf(kalfilmsinputs_1stapp_ps->etdata_dc); - DestroyFourth_lf(kalfilmsinputs_1stapp_ps->Dtdata_d4); - //--- - tzDestroy(kalfilmsinputs_1stapp_ps); //Must be freed last! - - return ((struct TSkalfilmsinputs_1stapp_tag *)NULL); - } - else return (kalfilmsinputs_1stapp_ps); -}; - - -//----------------------------------------------------------------------------------------------------------------------- -//-- OLD Code: Inputs for filter for Markov-switching DSGE models at any time t. -//----------------------------------------------------------------------------------------------------------------------- -struct TSkalfilmsinputs_tag *CreateTSkalfilmsinputs(int ny, int nz, int nRc, int nRstc, int nRv, int indxIndRegimes, int T) -{ - //~~~ Creating the structure and initializing the NULL pointers. - struct TSkalfilmsinputs_tag *kalfilmsinputs_ps = tzMalloc(1, struct TSkalfilmsinputs_tag); - - //=== - TSivector *rows_iv = NULL; - TSivector *cols_iv = NULL; - - //--- Default value. - kalfilmsinputs_ps->indxIni = 0; //1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - //0: using the unconditional mean for any given regime at time 0. - //--- Other assignments. - kalfilmsinputs_ps->ny = ny; - kalfilmsinputs_ps->nz = nz; - kalfilmsinputs_ps->nRc = nRc; - kalfilmsinputs_ps->nRstc = nRstc; - kalfilmsinputs_ps->nRv = nRv; - kalfilmsinputs_ps->indxIndRegimes = indxIndRegimes; - kalfilmsinputs_ps->T = T; - - - //--------- Creates memory and assigns values. The order matters. - kalfilmsinputs_ps->yt_dm = CreateMatrix_lf(ny, T); - kalfilmsinputs_ps->at_dm = CreateMatrix_lf(ny, nRc); - // - rows_iv = CreateConstantVector_int(nRc, ny); - cols_iv = CreateConstantVector_int(nRc, nz); - kalfilmsinputs_ps->Ht_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nRv, ny); - cols_iv = CreateConstantVector_int(nRv, ny); - kalfilmsinputs_ps->Rt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nRv, nz); - cols_iv = CreateConstantVector_int(nRv, ny); - kalfilmsinputs_ps->Gt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - kalfilmsinputs_ps->bt_dm = CreateMatrix_lf(nz, nRc); - // - rows_iv = CreateConstantVector_int(nRc, nz); - cols_iv = CreateConstantVector_int(nRc, nz); - kalfilmsinputs_ps->Ft_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nRv, nz); - cols_iv = CreateConstantVector_int(nRv, nz); - kalfilmsinputs_ps->Vt_dc = CreateCell_lf(rows_iv, cols_iv); - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - if (indxIndRegimes) - { - kalfilmsinputs_ps->z0_dm = CreateMatrix_lf(nz, nRc*nRv); //nz-by-nRc*nRv if indxIndRegimes == 1 or nz-by-nRv if indxIndRegimes == 0. - // - rows_iv = CreateConstantVector_int(nRc*nRv, nz); - cols_iv = CreateConstantVector_int(nRc*nRv, nz); - kalfilmsinputs_ps->P0_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nz-by-nRc*nRv if indxIndRegimes == 1 or nz-by-nz-by-nRv if indxIndRegimes == 0. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - } - else - { - if (nRstc != nRv) fn_DisplayError("kalman.c/CreateTSkalfilmsinputs(): nRstc must equal to nRv when indxIndRegimes==0"); - kalfilmsinputs_ps->z0_dm = CreateMatrix_lf(nz, nRv); //nz-by-nRc*nRv if indxIndRegimes == 1 or nz-by-nRv if indxIndRegimes == 0. - // - rows_iv = CreateConstantVector_int(nRv, nz); - cols_iv = CreateConstantVector_int(nRv, nz); - kalfilmsinputs_ps->P0_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nz-by-nRc*nRv if indxIndRegimes == 1 or nz-by-nz-by-nRv if indxIndRegimes == 0. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - } - //--- For output arguments. - if (indxIndRegimes) - { - rows_iv = CreateConstantVector_int(T, nz); - cols_iv = CreateConstantVector_int(T, nRc*nRv); - kalfilmsinputs_ps->zt_tm1_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nRc*nRv-by-T if indxIndRegimes==1, nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nRc*nRv, nz); - cols_iv = CreateConstantVector_int(nRc*nRv, nz); - kalfilmsinputs_ps->Pt_tm1_d4 = CreateFourth_lf(T, rows_iv, cols_iv); //nz-by-nz-by-nRc*nRv-T if indxIndRegimes==1, nz-by-nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - } - else - { - if (nRstc != nRv) fn_DisplayError("kalman.c/CreateTSkalfilmsinputs(): nRstc must equal to nRv when indxIndRegimes==0"); - rows_iv = CreateConstantVector_int(T, nz); - cols_iv = CreateConstantVector_int(T, nRv); - kalfilmsinputs_ps->zt_tm1_dc = CreateCell_lf(rows_iv, cols_iv); //nz-by-nRc*nRv-by-T if indxIndRegimes==1, nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - // - rows_iv = CreateConstantVector_int(nRv, nz); - cols_iv = CreateConstantVector_int(nRv, nz); - kalfilmsinputs_ps->Pt_tm1_d4 = CreateFourth_lf(T, rows_iv, cols_iv); //nz-by-nz-by-nRc*nRv-T if indxIndRegimes==1, nz-by-nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - rows_iv = DestroyVector_int(rows_iv); - cols_iv = DestroyVector_int(cols_iv); - } - - - //=== - DestroyVector_int(rows_iv); - DestroyVector_int(cols_iv); - - return (kalfilmsinputs_ps); - -} -//--- -struct TSkalfilmsinputs_tag *DestroyTSkalfilmsinputs(struct TSkalfilmsinputs_tag *kalfilmsinputs_ps) -{ - if (kalfilmsinputs_ps) - { - //=== The order matters! - DestroyMatrix_lf(kalfilmsinputs_ps->yt_dm); - DestroyMatrix_lf(kalfilmsinputs_ps->at_dm); - DestroyCell_lf(kalfilmsinputs_ps->Ht_dc); - DestroyCell_lf(kalfilmsinputs_ps->Rt_dc); - DestroyCell_lf(kalfilmsinputs_ps->Gt_dc); - //--- - DestroyMatrix_lf(kalfilmsinputs_ps->bt_dm); - DestroyCell_lf(kalfilmsinputs_ps->Ft_dc); - DestroyCell_lf(kalfilmsinputs_ps->Vt_dc); - //--- - DestroyMatrix_lf(kalfilmsinputs_ps->z0_dm); - DestroyCell_lf(kalfilmsinputs_ps->P0_dc); - //--- - DestroyCell_lf(kalfilmsinputs_ps->zt_tm1_dc); - DestroyFourth_lf(kalfilmsinputs_ps->Pt_tm1_d4); - //--- - tzDestroy(kalfilmsinputs_ps); //Must be freed last! - - return ((struct TSkalfilmsinputs_tag *)NULL); - } - else return (kalfilmsinputs_ps); -}; - - -#define LOG2PI (1.837877066409345e+000) //log(2*pi) -//----------------------------------------------------- -//-- Constant-parameters (known-time-varying) Kalman filter -//----------------------------------------------------- -double tz_kalfiltv(struct TSkalfiltv_tag *kalfiltv_ps) -{ - //General constant (known-time-varying) Kalman filter for DSGE models (conditional on all the parameters). - // It computes a sequence of one-step predictions and their covariance matrices, and the log likelihood. - // The function uses a forward recursion algorithm. See also the Matlab function fn_kalfil_tv.m - // - // State space model is defined as follows: - // y(t) = a(t) + H(t)*z(t) + eps(t) (observation or measurement equation) - // z(t) = b(t) + F(t)*z(t) + eta(t) (state or transition equation) - // where a(t), H(t), b(t), and F(t) depend on s_t that follows a Markov-chain process and are taken as given. - // - // Inputs are as follows: - // Y_T is a n_y-by-T matrix containing data [y(1), ... , y(T)]. - // a is an n_y-by-T matrix of time-varying input vectors in the measurement equation. - // H is an n_y-by-n_z-by-T 3-D of time-varying matrices in the measurement equation. - // R is an n_y-by-n_y-by-T 3-D of time-varying covariance matrices for the error in the measurement equation. - // G is an n_z-by-n_y-by-T 3-D of time-varying E(eta_t * eps_t'). - // ------ - // b is an n_z-by-T matrix of time-varying input vectors in the state equation with b(:,1) as an initial condition. - // F is an n_z-by-n_z-by-T 3-D of time-varying transition matrices in the state equation with F(:,:,1) as an initial condition. - // V is an n_z-by-n_z-by-T 3-D of time-varying covariance matrices for the error in the state equation with V(:,:,1) as an initial condition. - // ------ - // indxIni: 1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - // 0: using the unconditional mean for any given regime at time 0. - // z0 is an n_z-by-1 vector of initial condition when indxIni=1. (Do not enter if indxIni=0.) - // P0 is an n_z-by-n_z matrix of initial condition when indxIni=1. (Do not enter if indxIni=0.) - // - // Outputs are as follows: - // loglh is a value of the log likelihood function of the state-space model - // under the assumption that errors are multivariate Gaussian. - // zt_tm1 is an n_z-by-T matrices of one-step predicted state vectors with z0_0m1 as an initial condition (base-0 first element) - // and with z_{T|T-1} as the last element. Thus, we can use it as a base-1 vector. - // Pt_tm1 is an n_z-by-n_z-by-T 3-D of covariance matrices of zt_tm1 with P0_0m1 as though it were a initial condition - // and with P_{T|T-1} as the last element. Thus, we can use it as though it were a base-1 cell. - // - // The initial state vector and its covariance matrix are computed under the bounded (stationary) condition: - // z0_0m1 = (I-F(:,:,1))\b(:,1) - // vec(P0_0m1) = (I-kron(F(:,:,1),F(:,:,1)))\vec(V(:,:,1)) - // Note that all eigenvalues of the matrix F(:,:,1) are inside the unit circle when the state-space model is bounded (stationary). - // - // March 2007, written by Tao Zha - // See Hamilton's book ([13.2.13] -- [13.2.22]), Harvey (pp.100-106), and LiuWZ Model I NOTES pp.001-003. - - int T = kalfiltv_ps->T; - int Tp1 = T + 1; - int ny = kalfiltv_ps->ny; - int nz = kalfiltv_ps->nz; - int indx_badlh = 0; //1: bad likelihood with, say, -infinity of the LH value. - int tdata, ti; - //--- Work arguments. - int nz2 = square(nz); - TSdmatrix *Wnzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *Wnz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdmatrix *W2nz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdvector *wP0_dv = CreateVector_lf(nz2); - //+ - TSdvector yt_sdv, at_sdv, zt_tm1_sdv, ztp1_t_sdv, btp1_sdv; //double loglh_tdata; //logdetDtdata. - TSdvector *wny_dv = CreateVector_lf(ny); - TSdmatrix *Wnzbyny_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *W2nzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *PHtran_tdata_dm = CreateMatrix_lf(nz,ny); - TSdvector *etdata_dv = CreateVector_lf(ny); - TSdmatrix *Dtdata_dm = CreateMatrix_lf(ny,ny); - TSdmatrix *Kt_tdata0_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *Kt_tdata_dm = CreateMatrix_lf(nz,ny); - //--- For eigenvalue decompositions - int ki; - int errflag; - double eigmax, logdet_Dtdata; - TSdzvector *evals_dzv = NULL; - TSdvector *evals_abs_dv = NULL; //Absolute eigenvalues. - //--- Input arguments. - TSdmatrix *yt_dm = kalfiltv_ps->yt_dm; //ny-by-T. - TSdmatrix *at_dm = kalfiltv_ps->at_dm; //ny-by-T. - TSdcell *Ht_dc = kalfiltv_ps->Ht_dc; //ny-by-nz-by-T. - TSdcell *Rt_dc = kalfiltv_ps->Rt_dc; //ny-by-ny-by-T. Covariance matrix for the measurement equation. - TSdcell *Gt_dc = kalfiltv_ps->Gt_dc; //nz-by-ny-by-T. Cross-covariance. - // - TSdmatrix *bt_dm = kalfiltv_ps->bt_dm; //nz-by-T. - TSdcell *Ft_dc = kalfiltv_ps->Ft_dc; //nz-by-nz-by-T. - TSdcell *Vt_dc = kalfiltv_ps->Vt_dc; //nz-by-nz-by-T. Covariance matrix for the state equation. - // - TSdvector *z0_dv = kalfiltv_ps->z0_dv; //nz-by-1; - TSdmatrix *P0_dm = kalfiltv_ps->P0_dm; //nz-by-nz. - //--- Output arguments. - double loglh; //log likelihood. - TSdmatrix *zt_tm1_dm = kalfiltv_ps->zt_tm1_dm; //nz-by-T. - TSdcell *Pt_tm1_dc = kalfiltv_ps->Pt_tm1_dc; //nz-by-nz-T. - - - - //=== Initializing. - if (!kalfiltv_ps->indxIni) - { - InitializeDiagonalMatrix_lf(Wnzbynz_dm, 1.0); //To be used for I(nz) - - InitializeDiagonalMatrix_lf(Wnz2bynz2_dm, 1.0); //To be used for I(nz2) - - - //=== Eigenanalysis to determine the roots to ensure boundedness. - evals_dzv = CreateVector_dz(nz); - evals_abs_dv = CreateVector_lf(nz); - errflag = eigrgen(evals_dzv, (TSdzmatrix *)NULL, (TSdzmatrix *)NULL, Ft_dc->C[0]); - if (errflag) fn_DisplayError("tz_kalfiltv() in kalman.c: eigen decomposition failed"); - for (ki=nz-1; ki>=0; ki--) evals_abs_dv->v[ki] = sqrt(square(evals_dzv->real->v[ki]) + square(evals_dzv->imag->v[ki])); - evals_abs_dv->flag = V_DEF; - eigmax = MaxVector(evals_abs_dv); - if (eigmax < (1.0+1.0e-14)) - { - //--- Getting z0_dv: zt_tm1(:,1) = (eye(n_z)-F(:,:,1))\b(:,1); - MatrixMinusMatrix(Wnzbynz_dm, Wnzbynz_dm, Ft_dc->C[0]); - CopySubmatrix2vector(z0_dv, 0, bt_dm, 0, 0, bt_dm->nrows); - bdivA_rgens(z0_dv, z0_dv, '\\', Wnzbynz_dm); - //Done with Wnzbynz_dm. - //--- Getting P0_dm: Pt_tm1(:,:,1) = reshape((eye(n_z^2)-kron(F(:,:,1),F(:,:,1)))\V1(:),n_z,n_z); - tz_kron(W2nz2bynz2_dm, Ft_dc->C[0], Ft_dc->C[0]); - MatrixMinusMatrix(Wnz2bynz2_dm, Wnz2bynz2_dm, W2nz2bynz2_dm); - CopySubmatrix2vector(wP0_dv, 0, Vt_dc->C[0], 0, 0, nz2); - bdivA_rgens(wP0_dv, wP0_dv, '\\', Wnz2bynz2_dm); - CopySubvector2matrix_unr(P0_dm, 0, 0, wP0_dv, 0, nz2); - //Done with all w*_dv and W*_dm. - } - else - { - fprintf(stdout, "Fatal error: tz_kalfiltv() in kalman.c: the system is non-stationary solutions\n" - " and the initial conditions must be supplied by, say, input arguments"); - fflush(stdout); - exit( EXIT_FAILURE ); - } - } - CopySubvector2matrix(zt_tm1_dm, 0, 0, z0_dv, 0, z0_dv->n); - CopyMatrix0(Pt_tm1_dc->C[0], P0_dm); - - //====== See p.002 in LiuWZ. ====== - at_sdv.n = yt_sdv.n = yt_dm->nrows; - at_sdv.flag = yt_sdv.flag = V_DEF; - zt_tm1_sdv.n = ztp1_t_sdv.n = zt_tm1_dm->nrows; - zt_tm1_sdv.flag = ztp1_t_sdv.flag = V_DEF; - btp1_sdv.n = bt_dm->nrows; - btp1_sdv.flag = V_DEF; - loglh = 0.0; - for (tdata=0; tdata<T; tdata++ ) - { - //Base-0 timing. - ti = tdata + 1; //Next period. - - //--- Setup. - MatrixTimesMatrix(PHtran_tdata_dm, Pt_tm1_dc->C[tdata], Ht_dc->C[tdata], 1.0, 0.0, 'N', 'T'); - - //--- Data. - //- etdata = Y_T(:,tdata) - a(:,tdata) - Htdata*ztdata; - yt_sdv.v = yt_dm->M + tdata*yt_dm->nrows; - at_sdv.v = at_dm->M + tdata*at_dm->nrows; - zt_tm1_sdv.v = zt_tm1_dm->M + tdata*zt_tm1_dm->nrows; - VectorMinusVector(etdata_dv, &yt_sdv, &at_sdv); - MatrixTimesVector(etdata_dv, Ht_dc->C[tdata], &zt_tm1_sdv, -1.0, 1.0, 'N'); - //+ Dtdata = Htdata*PHtran_tdata + R(:,:,tdata); - CopyMatrix0(Dtdata_dm, Rt_dc->C[tdata]); - MatrixTimesMatrix(Dtdata_dm, Ht_dc->C[tdata], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - ScalarTimesMatrixSquare(Dtdata_dm, 0.5, Dtdata_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Dtdata_dm->flag = Dtdata_dm->flag | M_SU | M_SL; - - //--- Forming the log likelihood. - if (!isfinite(logdet_Dtdata=logdetspd(Dtdata_dm))) return (kalfiltv_ps->loglh = -NEARINFINITY); - bdivA_rgens(wny_dv, etdata_dv, '/', Dtdata_dm); - loglh += -(0.5*ny)*LOG2PI - 0.5*logdet_Dtdata - 0.5*VectorDotVector(wny_dv, etdata_dv); - //loglh += -(0.5*ny)*LOG2PI - 0.5*logdeterminant(Dtdata_dm) - 0.5*VectorDotVector(wny_dv, etdata_dv); - //Done with all w*_dv. - - - //--- Updating zt_tm1_dm and Pt_tm1_dc by ztp1_t_sdv and Pt_tm1_dc->C[ti]. - if (ti<T) - { - //Updating only up to tdata=T-2. The values at ti=T or tdata=T-1 will not be used in the likelihood function. - - //- Kt_tdata = (Ft*PHtran_tdata+G(:,:,tdata))/Dtdata; - CopyMatrix0(Kt_tdata0_dm, Gt_dc->C[tdata]); - MatrixTimesMatrix(Kt_tdata0_dm, Ft_dc->C[ti], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - BdivA_rrect(Kt_tdata_dm, Kt_tdata0_dm, '/', Dtdata_dm); - //+ zt_tm1(:,t) = b(:,t) + Ft*zt_tm1(:,tdata) + Kt_tdata*etdata; - ztp1_t_sdv.v = zt_tm1_dm->M + ti*zt_tm1_dm->nrows; - MatrixTimesVector(&ztp1_t_sdv, Ft_dc->C[ti], &zt_tm1_sdv, 1.0, 0.0, 'N'); - MatrixTimesVector(&ztp1_t_sdv, Kt_tdata_dm, etdata_dv, 1.0, 1.0, 'N'); - btp1_sdv.v = bt_dm->M + ti*btp1_sdv.n; - VectorPlusMinusVectorUpdate(&ztp1_t_sdv, &btp1_sdv, 1.0); - //+ Pt_tm1(:,:,t) = Ft*Ptdata*Fttran - Kt_tdata*Dtdata*Kt_tdatatran + V(:,:,t); - CopyMatrix0(Pt_tm1_dc->C[ti], Vt_dc->C[ti]); - MatrixTimesMatrix(Wnzbyny_dm, Kt_tdata_dm, Dtdata_dm, 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(Wnzbynz_dm, Wnzbyny_dm, Kt_tdata_dm, 1.0, 0.0, 'N', 'T'); - MatrixPlusMinusMatrixUpdate(Pt_tm1_dc->C[ti], Wnzbynz_dm, -1.0); - //Done with all W*_dm. - MatrixTimesMatrix(Wnzbynz_dm, Ft_dc->C[ti], Pt_tm1_dc->C[tdata], 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(W2nzbynz_dm, Wnzbynz_dm, Ft_dc->C[ti], 1.0, 0.0, 'N', 'T'); - MatrixPlusMatrixUpdate(Pt_tm1_dc->C[ti], W2nzbynz_dm); - //Done with all W*_dm. - } - } - zt_tm1_dm->flag = M_GE; - - //=== - DestroyVector_dz(evals_dzv); - DestroyVector_lf(evals_abs_dv); - DestroyMatrix_lf(Wnzbynz_dm); - DestroyMatrix_lf(Wnz2bynz2_dm); - DestroyMatrix_lf(W2nz2bynz2_dm); - DestroyVector_lf(wP0_dv); - // - DestroyVector_lf(wny_dv); - DestroyMatrix_lf(Wnzbyny_dm); - DestroyMatrix_lf(W2nzbynz_dm); - DestroyMatrix_lf(PHtran_tdata_dm); - DestroyVector_lf(etdata_dv); - DestroyMatrix_lf(Dtdata_dm); - DestroyMatrix_lf(Kt_tdata0_dm); - DestroyMatrix_lf(Kt_tdata_dm); - - return (kalfiltv_ps->loglh = loglh); -} -/** -double tz_kalfiltv(struct TSkalfiltv_tag *kalfiltv_ps) -{ - //This function is used to test tz_logTimetCondLH_kalfiltv(). - int T = kalfiltv_ps->T; - int tdata; - double loglh; - - loglh = 0.0; - for (tdata=0; tdata<T; tdata++) loglh += tz_logTimetCondLH_kalfiltv(0, tdata+1, kalfiltv_ps); - - return (loglh); -} -/**/ -//----------------------------------------------------- -//-- Updating Kalman filter at time t for constant-parameters (or known-time-varying) Kalman filter. -//----------------------------------------------------- -double tz_logTimetCondLH_kalfiltv(int st, int inpt, struct TSkalfiltv_tag *kalfiltv_ps) -{ - //st: base-0 grand regime at time t, which is just a dummy for this constant-parameter function in order to use - // Waggoner's automatic functions. - //inpt: base-1 in the sense that inpt>=1 to deal with the time series situation where S_T is (T+1)-by-1 and Y_T is T+nlags_max-by-1. - // The 1st element for S_T is S_T[1] while S_T[0] is s_0 (initial condition). - // The 1st element for Y_T, however, is Y_T[nlags_max+1-1]. - //See (42.3) on p.42 in the SWZII NOTES. - // - //log LH at time t for constant (known-time-varying) Kalman-filter DSGE models (conditional on all the parameters). - // It computes a sequence of one-step predictions and their covariance matrices, and the log likelihood at time t. - // The function uses a forward recursion algorithm. See also the Matlab function fn_kalfil_tv.m - // - // State space model is defined as follows: - // y(t) = a(t) + H(t)*z(t) + eps(t) (observation or measurement equation) - // z(t) = b(t) + F(t)*z(t) + eta(t) (state or transition equation) - // where a(t), H(t), b(t), and F(t) depend on s_t that follows a Markov-chain process and are taken as given. - // - // Inputs are as follows: - // Y_T is a n_y-by-T matrix containing data [y(1), ... , y(T)]. - // a is an n_y-by-T matrix of time-varying input vectors in the measurement equation. - // H is an n_y-by-n_z-by-T 3-D of time-varying matrices in the measurement equation. - // R is an n_y-by-n_y-by-T 3-D of time-varying covariance matrices for the error in the measurement equation. - // G is an n_z-by-n_y-by-T 3-D of time-varying E(eta_t * eps_t'). - // ------ - // b is an n_z-by-T matrix of time-varying input vectors in the state equation with b(:,1) as an initial condition. - // F is an n_z-by-n_z-by-T 3-D of time-varying transition matrices in the state equation with F(:,:,1) as an initial condition. - // V is an n_z-by-n_z-by-T 3-D of time-varying covariance matrices for the error in the state equation with V(:,:,1) as an initial condition. - // ------ - // indxIni: 1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - // 0: using the unconditional mean for any given regime at time 0. - // z0 is an n_z-by-1 vector of initial condition when indxIni=1. (Value to be assigned if indxIni=0.) - // P0 is an n_z-by-n_z matrix of initial condition when indxIni=1. (Value to be assigned if indxIni=0.) - // - // Outputs are as follows: - // loglh is a value of the log likelihood function of the state-space model - // under the assumption that errors are multivariate Gaussian. - // zt_tm1 is an n_z-by-T matrices of one-step predicted state vectors with z0_0m1 as an initial condition (base-0 first element) - // and with z_{T|T-1} as the last element. Thus, we can use it as a base-1 vector. - // Pt_tm1 is an n_z-by-n_z-by-T 3-D of covariance matrices of zt_tm1 with P0_0m1 as though it were a initial condition - // and with P_{T|T-1} as the last element. Thus, we can use it as though it were a base-1 cell. - // - // The initial state vector and its covariance matrix are computed under the bounded (stationary) condition: - // z0_0m1 = (I-F(:,:,1))\b(:,1) - // vec(P0_0m1) = (I-kron(F(:,:,1),F(:,:,1)))\vec(V(:,:,1)) - // Note that all eigenvalues of the matrix F(:,:,1) are inside the unit circle when the state-space model is bounded (stationary). - // - // April 2008, written by Tao Zha - // See Hamilton's book ([13.2.13] -- [13.2.22]), Harvey (pp.100-106), and LiuWZ Model I NOTES pp.001-003. - - //--- Output arguments. - double loglh_timet; //log likelihood at time t. - TSdmatrix *zt_tm1_dm = kalfiltv_ps->zt_tm1_dm; //nz-by-T. - TSdcell *Pt_tm1_dc = kalfiltv_ps->Pt_tm1_dc; //nz-by-nz-T. - //--- Input arguments. - int tdata, tp1; - TSdvector *z0_dv = kalfiltv_ps->z0_dv; //nz-by-1; - TSdmatrix *P0_dm = kalfiltv_ps->P0_dm; //nz-by-nz. - int T = kalfiltv_ps->T; - int ny = kalfiltv_ps->ny; - int nz = kalfiltv_ps->nz; - //--- Work arguments. - int nz2 = square(nz); - TSdmatrix *Wnzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *Wnz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdmatrix *W2nz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdvector *wP0_dv = CreateVector_lf(nz2); - //+ - TSdvector yt_sdv, at_sdv, zt_tm1_sdv, ztp1_t_sdv, btp1_sdv; - TSdvector *wny_dv = CreateVector_lf(ny); - TSdmatrix *Wnzbyny_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *W2nzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *PHtran_tdata_dm = CreateMatrix_lf(nz,ny); - TSdvector *etdata_dv = CreateVector_lf(ny); - TSdmatrix *Dtdata_dm = CreateMatrix_lf(ny,ny); - TSdmatrix *Kt_tdata0_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *Kt_tdata_dm = CreateMatrix_lf(nz,ny); - //--- For eigenvalue decompositions - int ki; - int errflag; - double eigmax, logdet_Dtdata; - TSdzvector *evals_dzv = NULL; - TSdvector *evals_abs_dv = NULL; //Absolute eigenvalues. - //--- Input arguments. - TSdmatrix *yt_dm = kalfiltv_ps->yt_dm; //ny-by-T. - TSdmatrix *at_dm = kalfiltv_ps->at_dm; //ny-by-T. - TSdcell *Ht_dc = kalfiltv_ps->Ht_dc; //ny-by-nz-by-T. - TSdcell *Rt_dc = kalfiltv_ps->Rt_dc; //ny-by-ny-by-T. Covariance matrix for the measurement equation. - TSdcell *Gt_dc = kalfiltv_ps->Gt_dc; //nz-by-ny-by-T. Cross-covariance. - // - TSdmatrix *bt_dm = kalfiltv_ps->bt_dm; //nz-by-T. - TSdcell *Ft_dc = kalfiltv_ps->Ft_dc; //nz-by-nz-by-T. - TSdcell *Vt_dc = kalfiltv_ps->Vt_dc; //nz-by-nz-by-T. Covariance matrix for the state equation. - // - - - tdata = (tp1=inpt) - 1; //Base-0 time. - - //======= Initial condition. ======= - if (tdata==0) - { - //=== Initializing. - if (!kalfiltv_ps->indxIni) - { - InitializeDiagonalMatrix_lf(Wnzbynz_dm, 1.0); //To be used for I(nz) - - InitializeDiagonalMatrix_lf(Wnz2bynz2_dm, 1.0); //To be used for I(nz2) - - - //=== Eigenanalysis to determine the roots to ensure boundedness. - evals_dzv = CreateVector_dz(nz); - evals_abs_dv = CreateVector_lf(nz); - errflag = eigrgen(evals_dzv, (TSdzmatrix *)NULL, (TSdzmatrix *)NULL, Ft_dc->C[0]); - if (errflag) fn_DisplayError("tz_logTimetCondLH_kalfiltv() in kalman.c: eigen decomposition failed"); - for (ki=nz-1; ki>=0; ki--) evals_abs_dv->v[ki] = sqrt(square(evals_dzv->real->v[ki]) + square(evals_dzv->imag->v[ki])); - evals_abs_dv->flag = V_DEF; - eigmax = MaxVector(evals_abs_dv); - if (eigmax < (1.0+1.0e-14)) - { - //--- Getting z0_dv: zt_tm1(:,1) = (eye(n_z)-F(:,:,1))\b(:,1); - MatrixMinusMatrix(Wnzbynz_dm, Wnzbynz_dm, Ft_dc->C[0]); - CopySubmatrix2vector(z0_dv, 0, bt_dm, 0, 0, bt_dm->nrows); - bdivA_rgens(z0_dv, z0_dv, '\\', Wnzbynz_dm); - //Done with Wnzbynz_dm. - //--- Getting P0_dm: Pt_tm1(:,:,1) = reshape((eye(n_z^2)-kron(F(:,:,1),F(:,:,1)))\V1(:),n_z,n_z); - tz_kron(W2nz2bynz2_dm, Ft_dc->C[0], Ft_dc->C[0]); - MatrixMinusMatrix(Wnz2bynz2_dm, Wnz2bynz2_dm, W2nz2bynz2_dm); - CopySubmatrix2vector(wP0_dv, 0, Vt_dc->C[0], 0, 0, nz2); - bdivA_rgens(wP0_dv, wP0_dv, '\\', Wnz2bynz2_dm); - CopySubvector2matrix_unr(P0_dm, 0, 0, wP0_dv, 0, nz2); - //Done with all w*_dv and W*_dm. - } - else - { - fprintf(FPTR_DEBUG, "Fatal error: tz_logTimetCondLH_kalfiltv() in kalman.c: the system is non-stationary solutions\n" - " and thus the initial conditions must be supplied by, say, input arguments"); - fflush(FPTR_DEBUG); - exit( EXIT_FAILURE ); - } - } - CopySubvector2matrix(zt_tm1_dm, 0, 0, z0_dv, 0, z0_dv->n); - CopyMatrix0(Pt_tm1_dc->C[tdata], P0_dm); - } - - - //======= Liklihood at time t (see p.002 in LiuWZ). ======= - at_sdv.n = yt_sdv.n = yt_dm->nrows; - at_sdv.flag = yt_sdv.flag = V_DEF; - zt_tm1_sdv.n = ztp1_t_sdv.n = zt_tm1_dm->nrows; - zt_tm1_sdv.flag = ztp1_t_sdv.flag = V_DEF; - btp1_sdv.n = bt_dm->nrows; - btp1_sdv.flag = V_DEF; - - //--- Setup. - MatrixTimesMatrix(PHtran_tdata_dm, Pt_tm1_dc->C[tdata], Ht_dc->C[tdata], 1.0, 0.0, 'N', 'T'); - - //--- Data. - //- etdata = Y_T(:,tdata) - a(:,tdata) - Htdata*ztdata; - yt_sdv.v = yt_dm->M + tdata*yt_dm->nrows; - at_sdv.v = at_dm->M + tdata*at_dm->nrows; - zt_tm1_sdv.v = zt_tm1_dm->M + tdata*zt_tm1_dm->nrows; - VectorMinusVector(etdata_dv, &yt_sdv, &at_sdv); - MatrixTimesVector(etdata_dv, Ht_dc->C[tdata], &zt_tm1_sdv, -1.0, 1.0, 'N'); - //+ Dtdata = Htdata*PHtran_tdata + R(:,:,tdata); - CopyMatrix0(Dtdata_dm, Rt_dc->C[tdata]); - MatrixTimesMatrix(Dtdata_dm, Ht_dc->C[tdata], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - ScalarTimesMatrixSquare(Dtdata_dm, 0.5, Dtdata_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Dtdata_dm->flag = Dtdata_dm->flag | M_SU | M_SL; - - //--- Forming the log likelihood. - if (!isfinite(logdet_Dtdata=logdetspd(Dtdata_dm))) return (loglh_timet = -NEARINFINITY); - bdivA_rgens(wny_dv, etdata_dv, '/', Dtdata_dm); - loglh_timet = -(0.5*ny)*LOG2PI - 0.5*logdet_Dtdata - 0.5*VectorDotVector(wny_dv, etdata_dv); - //Done with all w*_dv. - - - //======= Updating for the next period. ======= - //--- Updating zt_tm1_dm and Pt_tm1_dc by ztp1_t_sdv and Pt_tm1_dc->C[ti]. - if (tp1<T) - { - //Updating only up to tdata=T-2, because the values at tp1=T or tdata=T-1 will NOT be used in the likelihood function. - - //- Kt_tdata = (Ft*PHtran_tdata+G(:,:,tdata))/Dtdata; - CopyMatrix0(Kt_tdata0_dm, Gt_dc->C[tdata]); - MatrixTimesMatrix(Kt_tdata0_dm, Ft_dc->C[tp1], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - BdivA_rrect(Kt_tdata_dm, Kt_tdata0_dm, '/', Dtdata_dm); - //+ zt_tm1(:,t) = b(:,t) + Ft*zt_tm1(:,tdata) + Kt_tdata*etdata; - ztp1_t_sdv.v = zt_tm1_dm->M + tp1*zt_tm1_dm->nrows; - MatrixTimesVector(&ztp1_t_sdv, Ft_dc->C[tp1], &zt_tm1_sdv, 1.0, 0.0, 'N'); - MatrixTimesVector(&ztp1_t_sdv, Kt_tdata_dm, etdata_dv, 1.0, 1.0, 'N'); - btp1_sdv.v = bt_dm->M + tp1*btp1_sdv.n; - VectorPlusMinusVectorUpdate(&ztp1_t_sdv, &btp1_sdv, 1.0); - //+ Pt_tm1(:,:,t) = Ft*Ptdata*Fttran - Kt_tdata*Dtdata*Kt_tdatatran + V(:,:,t); - CopyMatrix0(Pt_tm1_dc->C[tp1], Vt_dc->C[tp1]); - MatrixTimesMatrix(Wnzbyny_dm, Kt_tdata_dm, Dtdata_dm, 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(Wnzbynz_dm, Wnzbyny_dm, Kt_tdata_dm, 1.0, 0.0, 'N', 'T'); - MatrixPlusMinusMatrixUpdate(Pt_tm1_dc->C[tp1], Wnzbynz_dm, -1.0); - //Done with all W*_dm. - MatrixTimesMatrix(Wnzbynz_dm, Ft_dc->C[tp1], Pt_tm1_dc->C[tdata], 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(W2nzbynz_dm, Wnzbynz_dm, Ft_dc->C[tp1], 1.0, 0.0, 'N', 'T'); - MatrixPlusMatrixUpdate(Pt_tm1_dc->C[tp1], W2nzbynz_dm); - //Done with all W*_dm. - } - zt_tm1_dm->flag = M_GE; - - //=== - DestroyVector_dz(evals_dzv); - DestroyVector_lf(evals_abs_dv); - DestroyMatrix_lf(Wnzbynz_dm); - DestroyMatrix_lf(Wnz2bynz2_dm); - DestroyMatrix_lf(W2nz2bynz2_dm); - DestroyVector_lf(wP0_dv); - // - DestroyVector_lf(wny_dv); - DestroyMatrix_lf(Wnzbyny_dm); - DestroyMatrix_lf(W2nzbynz_dm); - DestroyMatrix_lf(PHtran_tdata_dm); - DestroyVector_lf(etdata_dv); - DestroyMatrix_lf(Dtdata_dm); - DestroyMatrix_lf(Kt_tdata0_dm); - DestroyMatrix_lf(Kt_tdata_dm); - - return (loglh_timet); -} - - - - -//----------------------------------------------------- -//- WARNING: bedore using this function, make sure to call the following functions -// Only once in creating lwzmodel_ps: Refresh_kalfilms_*(lwzmodel_ps); -// Everytime when parameters are changed: RefreshEverything(); RefreRunningGensys_allcases(lwzmodel_ps) in particular. -//----------------------------------------------------- -double logTimetCondLH_kalfilms_1stapp(int st, int inpt, struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps, struct TStateModel_tag *smodel_ps) -{ - //st: base-0 grand regime -- deals with the cross-section values at time t. - //inpt: base-1 in the sense that inpt>=1 to deal with the time series situation where S_T is (T+1)-by-1 and Y_T is T+nlags_max-by-1. - // The 1st element for S_T is S_T[1] while S_T[0] is s_0 (initial condition). - // The 1st element for Y_T, however, is Y_T[nlags_max+1-1]. - //See (42.3) on p.42 in the SWZII NOTES. - - //-- Output arguments - double loglh_timet; - //--- Input arguments - TSdcell *etdata_dc = kalfilmsinputs_1stapp_ps->etdata_dc; //ny-by-nst-by-T, save for computing the likelihood. - TSdfourth *Dtdata_d4 = kalfilmsinputs_1stapp_ps->Dtdata_d4; //ny-by-ny-nst-by-T, save for computing the likelihood and updating Kalman filter Updatekalfilms_1stapp(). - //--- Local variables - int tbase0; - double logdet_Dtdata; - //--- Accessible variables - int ny = kalfilmsinputs_1stapp_ps->ny; - TSdvector etdata_sdv; - //=== Work arguments. - TSdvector *wny_dv = CreateVector_lf(ny); - - - - //--- Critical checking. - if (inpt > kalfilmsinputs_1stapp_ps->T) - fn_DisplayError(".../kalman.c/logTimetCondLH_kalfilms_1stapp(): The time exceeds the\n" - " data sample size allocated the structure TSkalfilmsinputs_1stapp_tag"); - - //--- The following is for safe guard. InitializeKalman_z10_P10() should be called in, say, RefreshEverything(). - if (kalfilmsinputs_1stapp_ps->ztm1_track < 0) - if (!InitializeKalman_z10_P10(kalfilmsinputs_1stapp_ps, (TSdmatrix *)NULL, (TSdcell *)NULL)) - fn_DisplayError(".../kalman.c/logTimetCondLH_kalfilms_1stapp(): the system is non-stationary when calling" - " InitializeKalman_z10_P10(). Please call this function in RefreshEverthing() and" - " set the likehood to be -infty for early exit"); - - tbase0=inpt-1; - - //------------------- The order matters. Updatekalfilms_1stapp() must be called before Update_et_Dt_1stapp(). ----------------- - //--- $$$ Critical updating where we MUSt have inpt-1. If inpt, Updatekalfilms_1stapp() will call this function again - //--- $$$ because DW function ProbabilityStateConditionalCurrent() need to access this function at time inpt, - //--- $$$ which has not computed before Updatekalfilms_1stapp(). Thus, we'll have an infinite loop. - Updatekalfilms_1stapp(tbase0, kalfilmsinputs_1stapp_ps, smodel_ps); -// //--- $$$ Critical updating. -// Update_et_Dt_1stapp(tbase0, kalfilmsinputs_1stapp_ps); -// //This function will give Dtdata_d4->F[tbase0], etdata_dc->C[tbase0], and PHtran_tdata_d4->F[tbase0]. - - - - //====================================================== - //= Getting the logLH at time tbase0 or time inpt. - //====================================================== - //--- Forming the log conditional likelihood at t. - etdata_sdv.n = ny; - etdata_sdv.v = etdata_dc->C[tbase0]->M + ny*st; - etdata_sdv.flag = V_DEF; - if (!isfinite(logdet_Dtdata=logdetspd(Dtdata_d4->F[tbase0]->C[st]))) return (loglh_timet = -NEARINFINITY); - bdivA_rgens(wny_dv, &etdata_sdv, '/', Dtdata_d4->F[tbase0]->C[st]); - loglh_timet = -(0.5*ny)*LOG2PI - 0.5*logdet_Dtdata - 0.5*VectorDotVector(wny_dv, &etdata_sdv); - //Done with all w*_dv. - - //=== - DestroyVector_lf(wny_dv); - - return (loglh_timet); -} -//====================================================== -//= Computing z_{1|0} and P_{1|0} for each new parameter values. -//====================================================== -int InitializeKalman_z10_P10(struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps, TSdmatrix *z10_dm, TSdcell *P10_dc) -{ - //See p.001 and p.004 in LWZ Model II. - //Outputs: - // return 1: success in initializing; 0: initializing fails, so the likelihood must be set to -infty outside this function. - // ztm1_track to track the time up to which Kalman filter have been updated. - // z0_dm, zt_tm1_dc->C[0] - // P0_dc, Pt_tm1_d4->F[0] - - //--- Output arguments - TSdmatrix *z0_0_dm = kalfilmsinputs_1stapp_ps->z0_dm; //nz-by-nst. - TSdmatrix *z0_dm = kalfilmsinputs_1stapp_ps->z0_dm; //nz-by-nst. - TSdcell *P0_dc = kalfilmsinputs_1stapp_ps->P0_dc; //nz-by-nz-by-nst. - //+ Used to get zt_tm1_dc->C[0] and Pt_tm1_d4->F[0] only. - TSdcell *zt_tm1_dc = kalfilmsinputs_1stapp_ps->zt_tm1_dc; //nz-by-nst-by-(T+1). - TSdfourth *Pt_tm1_d4 = kalfilmsinputs_1stapp_ps->Pt_tm1_d4; //nz-by-nz-by-nst-by-(T+1). - //--- Input arguments - TSdmatrix *yt_dm = kalfilmsinputs_1stapp_ps->yt_dm; //ny-by-T. - TSdmatrix *at_dm = kalfilmsinputs_1stapp_ps->at_dm; //ny-by-nst. - TSdcell *Ht_dc = kalfilmsinputs_1stapp_ps->Ht_dc; //ny-by-nz-by-nst. - TSdcell *Rt_dc = kalfilmsinputs_1stapp_ps->Rt_dc; //ny-by-ny-by-nst. Covariance matrix for the measurement equation. - //+ - TSdmatrix *bt_dm = kalfilmsinputs_1stapp_ps->bt_dm; //nz-by-nst. - TSdcell *Ft_dc = kalfilmsinputs_1stapp_ps->Ft_dc; //nz-by-nz-by-nst. - TSdcell *Vt_dc = kalfilmsinputs_1stapp_ps->Vt_dc; //nz-by-nz-by-nst. Covariance matrix for the state equation. - //--- Local variables - int sti; - //--- Accessible variables - int ny = kalfilmsinputs_1stapp_ps->ny; - int nz = kalfilmsinputs_1stapp_ps->nz; - int nst = kalfilmsinputs_1stapp_ps->nst; - TSdvector z0_sdv, z0_0_sdv, bt_sdv; - TSdvector yt_sdv, at_sdv; - //--- For the initial conditions: eigenvalue decompositions - int ki; - int errflag; - double eigmax; - //=== - int nz2 = square(nz); - TSdmatrix *Wnzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *Wnz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdmatrix *W2nz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdvector *wP0_dv = CreateVector_lf(nz2); - // - TSdzvector *evals_dzv = evals_dzv = CreateVector_dz(nz); - TSdvector *evals_abs_dv = CreateVector_lf(nz); //Absolute eigenvalues. - - - if (kalfilmsinputs_1stapp_ps->ztm1_track < 0) - { - z0_sdv.n = z0_0_sdv.n = bt_sdv.n = nz; - z0_sdv.flag = z0_0_sdv.flag = bt_sdv.flag = V_DEF; - at_sdv.n = yt_sdv.n = ny; - at_sdv.flag = yt_sdv.flag = V_DEF; - - - //======= Initial condition. ======= - if (!kalfilmsinputs_1stapp_ps->indxIni) - { - z0_0_dm->flag = z0_dm->flag = M_GE; - for (sti=nst-1; sti>=0; sti--) - { - if (kalfilmsinputs_1stapp_ps->DiffuseScale) //Diffuse initial conditions are used. - { - //--- Diffuse condition for z0_dv. - z0_sdv.v = z0_dm->M + z0_sdv.n*sti; - z0_0_sdv.v = z0_0_dm->M + z0_0_sdv.n*sti; - bt_sdv.v = bt_dm->M + bt_sdv.n*sti; - InitializeConstantVector_lf(&z0_0_sdv, 0.0); - MatrixTimesVector(&z0_sdv, Ft_dc->C[sti], &z0_0_sdv, 1.0, 0.0, 'N'); - VectorPlusVector(&z0_sdv, &z0_sdv, &bt_sdv); - //--- Diffuse condition for P0_dm. - InitializeDiagonalMatrix_lf(Wnzbynz_dm, kalfilmsinputs_1stapp_ps->DiffuseScale); //To be used for DiffuseScale*I(nz) - CopyMatrix0(P0_dc->C[sti], Wnzbynz_dm); - //Done with W*_dm. - } - else //Unconditional moments for initial conditions are used. - { - InitializeDiagonalMatrix_lf(Wnzbynz_dm, 1.0); //To be used for I(nz) - - InitializeDiagonalMatrix_lf(Wnz2bynz2_dm, 1.0); //To be used for I(nz2) - - - //=== Eigenanalysis to determine the roots to ensure boundedness. - errflag = eigrgen(evals_dzv, (TSdzmatrix *)NULL, (TSdzmatrix *)NULL, Ft_dc->C[sti]); - if (errflag) fn_DisplayError("kalman.c/InitializeKalman_z10_P10(): eigen decomposition failed"); - for (ki=nz-1; ki>=0; ki--) evals_abs_dv->v[ki] = sqrt(square(evals_dzv->real->v[ki]) + square(evals_dzv->imag->v[ki])); - evals_abs_dv->flag = V_DEF; - eigmax = MaxVector(evals_abs_dv); - if (eigmax < (1.0-SQRTEPSILON)) //(1.0+EPSILON)) - { - //--- Getting z0_dv: zt_tm1(:,1) = (eye(n_z)-F(:,:,sti))\b(:,sti); - z0_0_sdv.v = z0_0_dm->M + z0_0_sdv.n*sti; - z0_sdv.v = z0_dm->M + z0_sdv.n*sti; - MatrixMinusMatrix(Wnzbynz_dm, Wnzbynz_dm, Ft_dc->C[sti]); - CopySubmatrix2vector(&z0_0_sdv, 0, bt_dm, 0, sti, bt_dm->nrows); - bdivA_rgens(&z0_0_sdv, &z0_0_sdv, '\\', Wnzbynz_dm); - //- Under the assumption s_0 = s_1 (this is a short-cut). - MatrixTimesVector(&z0_sdv, Ft_dc->C[sti], &z0_0_sdv, 1.0, 0.0, 'N'); - VectorPlusVector(&z0_sdv, &z0_sdv, &bt_sdv); - //Done with Wnzbynz_dm. - //--- Getting P0_dm: Pt_tm1(:,:,1) = reshape((eye(n_z^2)-kron(F(:,:,sti),F(:,:,sti)))\V1(:),n_z,n_z); - tz_kron(W2nz2bynz2_dm, Ft_dc->C[sti], Ft_dc->C[sti]); - MatrixMinusMatrix(Wnz2bynz2_dm, Wnz2bynz2_dm, W2nz2bynz2_dm); - CopySubmatrix2vector(wP0_dv, 0, Vt_dc->C[sti], 0, 0, nz2); - bdivA_rgens(wP0_dv, wP0_dv, '\\', Wnz2bynz2_dm); - CopySubvector2matrix_unr(P0_dc->C[sti], 0, 0, wP0_dv, 0, nz2); - //Done with all w*_dv and W*_dm. - } - else - { - if (0) //0: no printing. - { - #if defined (USE_DEBUG_FILE) - fprintf(FPTR_DEBUG, "\n-------WARNING: ----------\n"); - fprintf(FPTR_DEBUG, "\nIn grand regime sti=%d\n", sti); - fprintf(FPTR_DEBUG, ".../kalman.c/InitializeKalman_z10_P10(): the system is non-stationary solutions\n" - " and see p.003 in LWZ Model II"); - #else - fprintf(stdout, "\n-----------------\n"); - fprintf(stdout, "\nIn grand regime sti=%d\n", sti); - fprintf(stdout, ".../kalman.c/InitializeKalman_z10_P10(): the system is non-stationary solutions\n" - " and see p.003 in LWZ Model II"); - #endif - } - //=== See p.000.3 in LWZ Model II. - //=== Do NOT use the following option. It turns out that this will often generate explosive conditional liklihood - //=== at the end of the sample, because Pt_tm1 shrinks to zero overtime due to the sigularity of - //=== the initila condition P_{1|0}. - //--- Letting z0_dv = 0.0 - // z0_sdv.v = z0_dm->M + z0_sdv.n*sti; - // InitializeConstantVector_lf(&z0_sdv, 0.0); - // //--- Letting P0_dm = V - // CopyMatrix0(P0_dc->C[sti], Vt_dc->C[sti]); - - //=== - DestroyVector_dz(evals_dzv); - DestroyVector_lf(evals_abs_dv); - DestroyMatrix_lf(Wnzbynz_dm); - DestroyMatrix_lf(Wnz2bynz2_dm); - DestroyMatrix_lf(W2nz2bynz2_dm); - DestroyVector_lf(wP0_dv); - - return (0); //Early exit with kalfilmsinputs_1stapp_ps->ztm1_track continues to be -1. - } - } - } - } - else - { - if (!z10_dm) fn_DisplayError(".../kalman.c/InitializeKalman_z10_P10(): The initial condition z_{1|0}\n" - " must be supplied as valid input arguments for when indxIni == 1"); - else - CopyMatrix0(z0_dm, z10_dm); - - if (!P10_dc) fn_DisplayError(".../kalman.c/InitializeKalman_z10_P10(): The initial condition P_{1|0}\n" - " must be supplied as valid input arguments for when indxIni == 1"); - else - CopyCell0(P0_dc, P10_dc); - } - CopyMatrix0(zt_tm1_dc->C[0], z0_dm); //At time t-1 = 1. - CopyCell0(Pt_tm1_d4->F[0], P0_dc); //At time t-1 = 1. - - - kalfilmsinputs_1stapp_ps->ztm1_track = 0; //Must reset to 0, meaning initial setting is done and ready for computing LH at t = 1. - - Update_et_Dt_1stapp(0, kalfilmsinputs_1stapp_ps); - - //=== - DestroyVector_dz(evals_dzv); - DestroyVector_lf(evals_abs_dv); - DestroyMatrix_lf(Wnzbynz_dm); - DestroyMatrix_lf(Wnz2bynz2_dm); - DestroyMatrix_lf(W2nz2bynz2_dm); - DestroyVector_lf(wP0_dv); - - return (1); - } - else - { - fn_DisplayError(".../kalman.c/InitializeKalman_z10_P10(): calling this function makes sense only if" - " kalfilmsinputs_1stapp_ps->ztm1_track is -1. Please check this value."); - - //=== - DestroyVector_dz(evals_dzv); - DestroyVector_lf(evals_abs_dv); - DestroyMatrix_lf(Wnzbynz_dm); - DestroyMatrix_lf(Wnz2bynz2_dm); - DestroyMatrix_lf(W2nz2bynz2_dm); - DestroyVector_lf(wP0_dv); - - return (0); - } -} -//====================================================== -//= Integrating out the lagged regimes in order to -//= updating zt_tm1 and Pt_tm1 for next perid tp1 through Kim-Nelson filter. -//= tdata representing base-0 t timing, while inpt represents base-1 t timing. -// -//= Purpose: for each inpt, we integrate out grand regimes st -//= only ONCE to prevent the dimension of updated zt_tm1 and Pt_tm1 through Kim-Nelson filter. -//====================================================== -int Updatekalfilms_1stapp(int t_1, struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps, struct TStateModel_tag *smodel_ps) -{ - //Output: - // tm1update - // z_{t_1+1|t_1} - // P_{t_1+1|t_1} - //Input: - // t-1: base-1 t timing. Thus t-1=inpt-1. - - //--- Local variables - int stp1i, sti, t_2, t_2p1; - double prob_previous_regimes; - //-- Output arguments - TSdcell *zt_tm1_dc = kalfilmsinputs_1stapp_ps->zt_tm1_dc; //nz-by-nst-by-(T+1). - TSdfourth *Pt_tm1_d4 = kalfilmsinputs_1stapp_ps->Pt_tm1_d4; //nz-by-nz-by-nst-by-(T+1). - //--- Input arguments - TSdcell *Gt_dc = kalfilmsinputs_1stapp_ps->Gt_dc; //nz-by-ny-by-nst. Cross-covariance. - //+ - TSdmatrix *bt_dm = kalfilmsinputs_1stapp_ps->bt_dm; //nz-by-nst. - TSdcell *Ft_dc = kalfilmsinputs_1stapp_ps->Ft_dc; //nz-by-nz-by-nst. - TSdcell *Vt_dc = kalfilmsinputs_1stapp_ps->Vt_dc; //nz-by-nz-by-nst. Covariance matrix for the state equation. - //+ - TSdfourth *PHtran_tdata_d4 = kalfilmsinputs_1stapp_ps->PHtran_tdata_d4; //nz-by-ny-by-nst-T, saved only for updating Kalman filter Updatekalfilms_1stapp(). - TSdcell *etdata_dc = kalfilmsinputs_1stapp_ps->etdata_dc; //ny-by-nst-by-T, save for computing the likelihood. - TSdfourth *Dtdata_d4 = kalfilmsinputs_1stapp_ps->Dtdata_d4; //ny-by-ny-nst-by-T, save for computing the likelihood and updating Kalman filter Updatekalfilms_1stapp(). - //--- Accessible variables - int ny = kalfilmsinputs_1stapp_ps->ny; - int nz = kalfilmsinputs_1stapp_ps->nz; - int nst = kalfilmsinputs_1stapp_ps->nst; - int T = kalfilmsinputs_1stapp_ps->T; - TSdvector z0_sdv; - TSdvector btp1_sdv; - TSdvector etdata_sdv; - //=== Work arguments. - TSdmatrix *Wnzbynz_dm = CreateMatrix_lf(nz,nz); - //+ - TSdmatrix *Wnzbyny_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *W2nzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *Kt_tdata0_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *Kt_tdata_dm = CreateMatrix_lf(nz,ny); - //=== For updating zt_tm1_dm and Pt_tm1. - TSdvector *ztp1_t_dv = CreateVector_lf(nz); - TSdmatrix *Ptp1_t_dm = CreateMatrix_lf(nz, nz); - TSdvector *ztp1_dv = CreateVector_lf(nz); - TSdmatrix *Ptp1_dm = CreateMatrix_lf(nz, nz); - - - //--- Critical checking. - if (kalfilmsinputs_1stapp_ps->ztm1_track < 0) - fn_DisplayError(".../kalman.c/Updatekalfilms_1stapp(): Make sure InitializeKalman_z10_P10() is called in the function RefreshEverthing()"); - - - z0_sdv.n = nz; - z0_sdv.flag = V_DEF; - btp1_sdv.n = nz; - btp1_sdv.flag = V_DEF; - //+ - etdata_sdv.n = ny; - etdata_sdv.flag = V_DEF; - - for (t_2=kalfilmsinputs_1stapp_ps->ztm1_track; t_2<t_1; t_2++) - { - //If t_1 <= ztm1_track, no updating. - //If t_1 > ztm1_track, updating z_{t|t-1} and P_{t|t-1} up to t-1 = t_1. - - zt_tm1_dc->C[t_2p1=t_2+1]->flag = M_GE; - for (stp1i=nst-1; stp1i>=0; stp1i--) - { - InitializeConstantVector_lf(ztp1_dv, 0.0); //To be summed over sti. - InitializeConstantMatrix_lf(Ptp1_dm, 0.0); //To be summed over sti. - - for (sti=nst-1; sti>=0; sti--) - { - //=== Updating for next period by integrating out sti.. - //--- Ktp1_t = (F_tp1*PHtran_t+G(:,:,t))/Dt; - //--- Kt_tdata = (Ft*PHtran_tdata+G(:,:,tdata))/Dtdata where t=tp1 and tdata=t. - CopyMatrix0(Kt_tdata0_dm, Gt_dc->C[sti]); - MatrixTimesMatrix(Kt_tdata0_dm, Ft_dc->C[stp1i], PHtran_tdata_d4->F[t_2]->C[sti], 1.0, 1.0, 'N', 'N'); - BdivA_rrect(Kt_tdata_dm, Kt_tdata0_dm, '/', Dtdata_d4->F[t_2]->C[sti]); - //+ zt_tm1(:,t) = b(:,t) + Ft*zt_tm1(:,tdata) + Kt_tdata*etdata where t=tp1 and tm1=t. - etdata_sdv.v = etdata_dc->C[t_2]->M + ny*sti; - z0_sdv.v = zt_tm1_dc->C[t_2]->M + nz*sti; //sti: regime at time t_2. - MatrixTimesVector(ztp1_t_dv, Ft_dc->C[stp1i], &z0_sdv, 1.0, 0.0, 'N'); - MatrixTimesVector(ztp1_t_dv, Kt_tdata_dm, &etdata_sdv, 1.0, 1.0, 'N'); - btp1_sdv.v = bt_dm->M + stp1i*btp1_sdv.n; - VectorPlusMinusVectorUpdate(ztp1_t_dv, &btp1_sdv, 1.0); - //+ Pt_tm1(:,:,t) = Ft*Ptdata*Fttran - Kt_tdata*Dtdata*Kt_tdatatran + V(:,:,t); - CopyMatrix0(Ptp1_t_dm, Vt_dc->C[stp1i]); - MatrixTimesMatrix(Wnzbyny_dm, Kt_tdata_dm, Dtdata_d4->F[t_2]->C[sti], 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(Wnzbynz_dm, Wnzbyny_dm, Kt_tdata_dm, 1.0, 0.0, 'N', 'T'); - MatrixPlusMinusMatrixUpdate(Ptp1_t_dm, Wnzbynz_dm, -1.0); - //Done with all W*_dm. - MatrixTimesMatrix(Wnzbynz_dm, Ft_dc->C[stp1i], Pt_tm1_d4->F[t_2]->C[sti], 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(W2nzbynz_dm, Wnzbynz_dm, Ft_dc->C[stp1i], 1.0, 0.0, 'N', 'T'); - MatrixPlusMatrixUpdate(Ptp1_t_dm, W2nzbynz_dm); - //Done with all W*_dm. - - - //--- Integrating out the state at t_2 using - //--- P(s_t_2|Y_{t_2}, theta) = ProbabilityStateConditionalCurrent(sti, t_2, smodel_ps); - //--- One can also access to P(s_t_2|Y_{t_2}, theta) by using ElementV(smodel_ps->V[t_2],s_{t_2}i), - //--- but this access will not call my function logTimetCondLH(), thus no updating for - //--- P(s_t_2|Y_{t_2}, and thus leading to incorrect results. - //--- ProbabilityStateConditionalCurrent() assumes first data starts at time 1, not 0. Thus - //--- we must pass t_2+1 as opposed to t_2. - prob_previous_regimes = ProbabilityStateConditionalCurrent(sti, t_2+1, smodel_ps); - ScalarTimesVectorUpdate(ztp1_dv, prob_previous_regimes, ztp1_t_dv); - ScalarTimesMatrix(Ptp1_dm, prob_previous_regimes, Ptp1_t_dm, 1.0); - Ptp1_dm->flag = M_GE | M_SU | M_SL; - //Done with ztp1_t_dv and Ptp1_t_dm. - } - //--- Filling zt_tm1 and Pt_tm1 for next period. - z0_sdv.v = zt_tm1_dc->C[t_2p1]->M + z0_sdv.n*stp1i; //stp1i: regime at time tp1. - CopyVector0(&z0_sdv, ztp1_dv); - CopyMatrix0(Pt_tm1_d4->F[t_2p1]->C[stp1i], Ptp1_dm); //stp1i: regime at time tp1. - //Done with ztp1_dv, z0_sdv, Ptp1_dm. - } - //--- $$$ The following is important because it tells ProbabilityStateConditionalCurrent(), which calls - //--- $$$ logTimetCondLH_kalfilms_1stapp(), which calls recursively this function again, that there is no - //--- $$$ need to update Kalman filter for the period before kalfilmsinputs_1stapp_ps->ztm1_track. - kalfilmsinputs_1stapp_ps->ztm1_track = t_2p1; //Means that z_{t_2p1+1|t_2p1} and P_{t_2p1+1|t_2p1} are done. - - //--- $$$ This function must be called after all the above computations are done. - Update_et_Dt_1stapp(t_2p1, kalfilmsinputs_1stapp_ps); - } - - - //=== - DestroyMatrix_lf(Wnzbynz_dm); - // - DestroyMatrix_lf(Wnzbyny_dm); - DestroyMatrix_lf(W2nzbynz_dm); - DestroyMatrix_lf(Kt_tdata0_dm); - DestroyMatrix_lf(Kt_tdata_dm); - // - DestroyVector_lf(ztp1_t_dv); - DestroyMatrix_lf(Ptp1_t_dm); - DestroyVector_lf(ztp1_dv); - DestroyMatrix_lf(Ptp1_dm); - - return (kalfilmsinputs_1stapp_ps->ztm1_track); -} -//====================================================== -//= Computes etdata and Dtdata for all grand regimes st at tbase0=inpt-1 or dtm1_track -//= to prevent recomputing this object for different st at given tbase0. -//====================================================== -static int Update_et_Dt_1stapp(int t_1, struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps) -{ - //Output: - // dtm1_track is updated in this function. - // PHtran_tdata_d4->F[t-1] - // etdata_dc->C[t-1] - // Dtdata_d4->F[t-1] - //Input: - // t_1=inpt-1: base-0 timing for et and Dt before the likelihood at time inpt is computed. - - //--- Local variables - int sti, tbase0; - //-- Output arguments - TSdfourth *PHtran_tdata_d4 = kalfilmsinputs_1stapp_ps->PHtran_tdata_d4; //nz-by-ny-by-nst-T, saved only for updating Kalman filter Updatekalfilms_1stapp(). - TSdcell *etdata_dc = kalfilmsinputs_1stapp_ps->etdata_dc; //ny-by-nst-by-T, save for computing the likelihood. - TSdcell *yt_tm1_dc = kalfilmsinputs_1stapp_ps->yt_tm1_dc; //ny-by-nst-by-T, one-step forecast y_{t|t-1} for t=0 to T-1 (base-0). - TSdfourth *Dtdata_d4 = kalfilmsinputs_1stapp_ps->Dtdata_d4; //ny-by-ny-nst-by-T, save for computing the likelihood and updating Kalman filter Updatekalfilms_1stapp(). - //--- input arguments - TSdcell *zt_tm1_dc = kalfilmsinputs_1stapp_ps->zt_tm1_dc; //nz-by-nst-by-T. - TSdfourth *Pt_tm1_d4 = kalfilmsinputs_1stapp_ps->Pt_tm1_d4; //nz-by-nz-by-nst-by-T. - //+ - TSdmatrix *yt_dm = kalfilmsinputs_1stapp_ps->yt_dm; //ny-by-T. - TSdmatrix *at_dm = kalfilmsinputs_1stapp_ps->at_dm; //ny-by-nst. - TSdcell *Ht_dc = kalfilmsinputs_1stapp_ps->Ht_dc; //ny-by-nz-by-nst. - TSdcell *Rt_dc = kalfilmsinputs_1stapp_ps->Rt_dc; //ny-by-ny-by-nst. Covariance matrix for the measurement equation. - //--- Accessible variables - int ny = kalfilmsinputs_1stapp_ps->ny; - int nz = kalfilmsinputs_1stapp_ps->nz; - int nst = kalfilmsinputs_1stapp_ps->nst; - TSdvector z0_sdv; - TSdvector yt_sdv, at_sdv; - TSdvector etdata_sdv, yt_tm1_sdv; - //=== Work arguments. - TSdmatrix *PHtran_tdata_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *Dtdata_dm = CreateMatrix_lf(ny,ny); - - - z0_sdv.n = nz; - z0_sdv.flag = V_DEF; - at_sdv.n = yt_sdv.n = ny; - at_sdv.flag = yt_sdv.flag = V_DEF; - etdata_sdv.n = yt_tm1_sdv.n = ny; - etdata_sdv.flag = yt_tm1_sdv.flag = V_DEF; - - for (tbase0=(kalfilmsinputs_1stapp_ps->dtm1_track+1); tbase0<=t_1; tbase0++) - { - //Note tbase0<=t_1, NOT tbase0<t_1. - //If t_1 < (dtm1_track+1), no updating. - //If t_1 >= (dtm1_track+1), updating etdata_dc->C[t-1] and Dtdata_d4->F[t-1] up to t-1=t_1. - - for (sti=nst-1; sti>=0; sti--) - { - //--- Setup. - MatrixTimesMatrix(PHtran_tdata_dm, Pt_tm1_d4->F[tbase0]->C[sti], Ht_dc->C[sti], 1.0, 0.0, 'N', 'T'); - CopyMatrix0(kalfilmsinputs_1stapp_ps->PHtran_tdata_d4->F[tbase0]->C[sti], PHtran_tdata_dm); - - - //--- Data. - //- etdata = Y_T(:,tdata) - a(:,tdata) - Htdata*ztdata where tdata = tbase0 = inpt-1. - yt_sdv.v = yt_dm->M + tbase0*yt_dm->nrows; - at_sdv.v = at_dm->M + sti*at_dm->nrows; //grand regime at time tbase0. - z0_sdv.v = zt_tm1_dc->C[tbase0]->M + z0_sdv.n*sti; //sti: regime at time tbase0. - etdata_sdv.v = etdata_dc->C[tbase0]->M + etdata_sdv.n*sti; - yt_tm1_sdv.v = etdata_dc->C[tbase0]->M + yt_tm1_sdv.n*sti; - CopyVector0(&yt_tm1_sdv, &at_sdv); - MatrixTimesVector(&yt_tm1_sdv, Ht_dc->C[sti], &z0_sdv, 1.0, 1.0, 'N'); //a + H*z_{t|t-1}. - VectorMinusVector(&etdata_sdv, &yt_sdv, &yt_tm1_sdv); //y_t - a - H*z_{t|t-1}. - //+ Dtdata = Htdata*PHtran_tdata + R(:,:,tbase0); - CopyMatrix0(Dtdata_dm, Rt_dc->C[sti]); - MatrixTimesMatrix(Dtdata_dm, Ht_dc->C[sti], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - //Done with z0_sdv.v. - ScalarTimesMatrixSquare(Dtdata_dm, 0.5, Dtdata_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Dtdata_dm->flag = Dtdata_dm->flag | M_SU | M_SL; - CopyMatrix0(Dtdata_d4->F[tbase0]->C[sti], Dtdata_dm); //Saved to be used for logTimetCondLH_kalfilms_1stapp(). - } - - //--- $$$ This tracker functions the same way as kalfilmsinputs_1stapp_ps->ztm1_track. - kalfilmsinputs_1stapp_ps->dtm1_track = tbase0; - } - - //=== - DestroyMatrix_lf(PHtran_tdata_dm); - DestroyMatrix_lf(Dtdata_dm); - - return (kalfilmsinputs_1stapp_ps->dtm1_track); -} - - - - - - -//----------------------------------------------------- -//------------ OLD Code -------------------------- -//- Updating or refreshing all Kalman filter at time t for Markov-switching DSGE model. -//- WARNING: make sure to call the following functions -// RunningGensys_const7varionly(lwzmodel_ps); -// Refresh_kalfilms_*(lwzmodel_ps); //Creates or refreshes kalfilmsinputs_ps at new parameter values. -//- before using tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(). -// -//- IMPORTANT NOTE: in the Markov-switching input file datainp_markov*.prn, it MUST be that -//- the coefficient regime is the 1st state variable, and -//- the volatility regime is the 2nd state variable. -//----------------------------------------------------- -#if defined (NEWVERSIONofDW_SWITCH) -double tz_logTimetCondLH_kalfilms_1st_approx(int st, int inpt, struct TSkalfilmsinputs_tag *kalfilmsinputs_ps, struct TStateModel_tag *smodel_ps) -{ - //st, st_c, and st_v: base-0: deals with the cross-section values at time t where - // st is a grand regime, st_c is an encoded coefficient regime, and st_c is an encoded volatility regime. - //inpt: base-1 in the sense that inpt>=1 to deal with the time series situation where S_T is (T+1)-by-1 and Y_T is T+nlags_max-by-1. - // The 1st element for S_T is S_T[1] while S_T[0] is s_0 (initial condition). - // The 1st element for Y_T, however, is Y_T[nlags_max+1-1]. - //See (42.3) on p.42 in the SWZII NOTES. - - - //--- Local variables - int comst_c; //composite (s_tc, s_{t-1}c) - int st_c, stm1_c, st_v; - int comsti_c; //composite (s_tc, s_{t-1}c) - int sti, sti_c, stm1i_c, sti_v; - int comstp1i_c; //composite (s_{t+1}c, s_tc) - int stp1i, stp1i_c, stp1i_v; - int tbase0, tp1; - double logdet_Dtdata, loglh_timet; - static int record_tbase1_or_inpt_or_tp1 = 0; - static int passonce; - double prob_previous_regimes; - //=== Accessible variables - int ny = kalfilmsinputs_ps->ny; - int nz = kalfilmsinputs_ps->nz; - int nRc = kalfilmsinputs_ps->nRc; - int nRstc = kalfilmsinputs_ps->nRstc; - int nRv = kalfilmsinputs_ps->nRv; - int T = kalfilmsinputs_ps->T; - int indxIndRegimes = kalfilmsinputs_ps->indxIndRegimes; - int **Index = smodel_ps->sv->index; //Regime-switching states. - //smodel_ps->sv->index is for our new code. - // For old code (before 9 April 08 and before dsge_switch is created), use smodel_ps->sv->Index; - TSdvector z0_sdv; - //+ input arguments. - TSdmatrix *yt_dm = kalfilmsinputs_ps->yt_dm; //ny-by-T. - TSdmatrix *at_dm = kalfilmsinputs_ps->at_dm; //ny-by-nRc. - TSdcell *Ht_dc = kalfilmsinputs_ps->Ht_dc; //ny-by-nz-by-nRc. - TSdcell *Rt_dc = kalfilmsinputs_ps->Rt_dc; //ny-by-ny-by-nRv. Covariance matrix for the measurement equation. - TSdcell *Gt_dc = kalfilmsinputs_ps->Gt_dc; //nz-by-ny-by-nRv. Cross-covariance. - // - TSdmatrix *bt_dm = kalfilmsinputs_ps->bt_dm; //nz-by-nRc. - TSdcell *Ft_dc = kalfilmsinputs_ps->Ft_dc; //nz-by-nz-by-nRc. - TSdcell *Vt_dc = kalfilmsinputs_ps->Vt_dc; //nz-by-nz-by-nRv. Covariance matrix for the state equation. - // - TSdmatrix *z0_dm = kalfilmsinputs_ps->z0_dm; //nz-by-nRc*nRv or nz-by-nRv, depending on indxIndRegimes. - TSdcell *P0_dc = kalfilmsinputs_ps->P0_dc; //nz-by-nz-by-nRc*nRv or nz-by-nRv, depending on indxIndRegimes. - //+ Output arguments. - TSdcell *zt_tm1_dc = kalfilmsinputs_ps->zt_tm1_dc; //nz-by-nRc*nRv-by-T if indxIndRegimes==1, nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - TSdfourth *Pt_tm1_d4 = kalfilmsinputs_ps->Pt_tm1_d4; //nz-by-nz-by-nRc*nRv-T if indxIndRegimes==1, nz-by-nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - //=== Work arguments. - int nz2 = square(nz); - TSdmatrix *Wnzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *Wnz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdmatrix *W2nz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdvector *wP0_dv = CreateVector_lf(nz2); - //+ - TSdvector yt_sdv, at_sdv, btp1_sdv; //zt_tm1_sdv, ztp1_t_sdv, - TSdvector *wny_dv = CreateVector_lf(ny); - TSdmatrix *Wnzbyny_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *W2nzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *PHtran_tdata_dm = CreateMatrix_lf(nz,ny); - TSdvector *etdata_dv = CreateVector_lf(ny); - TSdmatrix *Dtdata_dm = CreateMatrix_lf(ny,ny); - TSdmatrix *Kt_tdata0_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *Kt_tdata_dm = CreateMatrix_lf(nz,ny); - //--- For eigenvalue decompositions - int ki; - int errflag; - double eigmax; - TSdzvector *evals_dzv = evals_dzv = CreateVector_dz(nz); - TSdvector *evals_abs_dv = CreateVector_lf(nz); //Absolute eigenvalues. - //--- For updating zt_tm1_dm and Pt_tm1. - TSdvector *ztp1_t_dv = CreateVector_lf(z0_dm->nrows); - TSdmatrix *Ptp1_t_dm = CreateMatrix_lf(nz, nz); - TSdvector *ztp1_dv = CreateVector_lf(z0_dm->nrows); - TSdmatrix *Ptp1_dm = CreateMatrix_lf(nz, nz); - - - - if (smodel_ps->sv->nstates != z0_dm->ncols) fn_DisplayError("kalman.c/tz_logTimetLH_kalfilms_1st_approx():\n" - " Make sure that the column dimension of z0_dm is the same as smodel_ps->sv->nstates"); - if (indxIndRegimes && (nRc>1) && (nRv>1)) - if (smodel_ps->sv->n_state_variables != 2) fn_DisplayError("kalman.c/tz_Refresh_z_T7P_T_in_kalfilms_1st_approx():\n" - " Number of state variables must be coincide with indxIndRegimes"); - - tbase0 = (tp1=inpt) - 1; - - z0_sdv.n = z0_dm->nrows; - z0_sdv.flag = V_DEF; - // - at_sdv.n = yt_sdv.n = yt_dm->nrows; - at_sdv.flag = yt_sdv.flag = V_DEF; - btp1_sdv.n = bt_dm->nrows; - btp1_sdv.flag = V_DEF; - - - //======= Initial condition. ======= - if (tbase0==0) - { - for (sti=smodel_ps->sv->nstates-1; sti>=0; sti--) - { - if (indxIndRegimes) - { - if (nRc==1) //Volatility. - { - comsti_c = sti_c = 0; - sti_v = sti; - } - else if ((nRv>1) && (nRc>nRstc)) //Trend inflation, both sc_t and sc_{t-1} enters coefficient regime. - { - comsti_c = Index[sti][0]; //composite (s_tc, s_{t-1}c) - sti_v = Index[sti][1]; //volatility state s_tv - sti_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][0]; //coefficient regime at t. - stm1i_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][1]; //coefficient regime at t-1: tm1: t-1; - } - else if ((nRv==1) && (nRc>nRstc)) - { - comsti_c = Index[sti][0]; //composite (s_tc, s_{t-1}c) - sti_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][0]; //coefficient regime at t. - stm1i_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][1]; //coefficient regime at t-1: tm1: t-1; - sti_v = 0; - } - else if ((nRv==1) && (nRc==nRstc)) - { - comsti_c = sti_c = sti; - sti_v = 0; - } - else if ((nRv>1) && (nRc==nRstc)) //only sc_t enters coefficient regime. - { - comsti_c = sti_c = Index[sti][0]; - sti_v = Index[sti][1]; - } - } - else //Syncronized regimes. - { - if (nRc>nRstc) - { - comsti_c = Index[sti][0]; //composite (s_tc, s_{t-1}c) - sti_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][0]; //coefficient regime at t. - stm1i_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][1]; //coefficient regime at t-1: tm1: t-1; - sti_v = sti_c; - } - else - comsti_c = sti_c = sti_v = sti; - } - - - if (!kalfilmsinputs_ps->indxIni) - { - InitializeDiagonalMatrix_lf(Wnzbynz_dm, 1.0); //To be used for I(nz) - - InitializeDiagonalMatrix_lf(Wnz2bynz2_dm, 1.0); //To be used for I(nz2) - - - //=== Eigenanalysis to determine the roots to ensure boundedness. - errflag = eigrgen(evals_dzv, (TSdzmatrix *)NULL, (TSdzmatrix *)NULL, Ft_dc->C[comsti_c]); - if (errflag) fn_DisplayError("kalman.c/tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(): eigen decomposition failed"); - for (ki=nz-1; ki>=0; ki--) evals_abs_dv->v[ki] = sqrt(square(evals_dzv->real->v[ki]) + square(evals_dzv->imag->v[ki])); - evals_abs_dv->flag = V_DEF; - eigmax = MaxVector(evals_abs_dv); - if (eigmax < (1.0+1.0e-14)) - { - //--- Getting z0_dv: zt_tm1(:,1) = (eye(n_z)-F(:,:,1))\b(:,1); - MatrixMinusMatrix(Wnzbynz_dm, Wnzbynz_dm, Ft_dc->C[comsti_c]); - z0_sdv.v = z0_dm->M + z0_sdv.n*sti; - CopySubmatrix2vector(&z0_sdv, 0, bt_dm, 0, comsti_c, bt_dm->nrows); - bdivA_rgens(&z0_sdv, &z0_sdv, '\\', Wnzbynz_dm); - //Done with Wnzbynz_dm. - //--- Getting P0_dm: Pt_tm1(:,:,1) = reshape((eye(n_z^2)-kron(F(:,:,1),F(:,:,1)))\V1(:),n_z,n_z); - tz_kron(W2nz2bynz2_dm, Ft_dc->C[comsti_c], Ft_dc->C[comsti_c]); - MatrixMinusMatrix(Wnz2bynz2_dm, Wnz2bynz2_dm, W2nz2bynz2_dm); - CopySubmatrix2vector(wP0_dv, 0, Vt_dc->C[sti_v], 0, 0, nz2); -//=== ???????? For debugging purpose. -//if ((inpt<2) && (st==0)) -//{ -// fprintf(FPTR_DEBUG, "%%st=%d, inpt=%d, and sti=%d\n", st, inpt, sti); - -// fprintf(FPTR_DEBUG, "wP0_dv:\n"); -// WriteVector(FPTR_DEBUG, wP0_dv, " %10.5f "); -// fprintf(FPTR_DEBUG, "Vt_dc->C[sti_v=%d]:\n", sti_v); -// WriteMatrix(FPTR_DEBUG, Vt_dc->C[sti_v], " %10.5f "); - -// fflush(FPTR_DEBUG); - -//} - bdivA_rgens(wP0_dv, wP0_dv, '\\', Wnz2bynz2_dm); - CopySubvector2matrix_unr(P0_dc->C[sti], 0, 0, wP0_dv, 0, nz2); - //Done with all w*_dv and W*_dm. - } - else - { - fprintf(stdout, "\n-----------------\n"); - fprintf(stdout, "\nIn regime comsti_c=%d and sti_v=%d and at time=%d\n", comsti_c, sti_v, 0); - fn_DisplayError("kalman.c/tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(): the system is non-stationary solutions\n" - " and the initial conditions must be supplied by, say, input arguments"); - fflush(stdout); - } - } - } - z0_dm->flag = M_GE; - CopyMatrix0(zt_tm1_dc->C[0], z0_dm); //At time t=0. - CopyCell0(Pt_tm1_d4->F[0], P0_dc); //At time t=0. - } - - - //====================================================== - //= Getting the logLH at time tbase0 or time inpt. - //====================================================== - if (indxIndRegimes ) - { - if (nRc==1) //Volatility. - { - comst_c = st_c = 0; - st_v = st; - } - else if ((nRv>1) && (nRc>nRstc)) //Trend inflation, both sc_t and sc_{t-1} enters coefficient regime. - { - if (smodel_ps->sv->n_state_variables != 2) fn_DisplayError("kalman.c/kalfilms_timet_1st_approx():\n" - " Number of state variables must be coincide with indxIndRegimes"); - - comst_c = Index[st][0]; //composite (s_tc, s_{t-1}c) - st_v = Index[st][1]; //volatility state s_tv - st_c = smodel_ps->sv->state_variable[0]->lag_index[comst_c][0]; //coefficient regime at t. - stm1_c = smodel_ps->sv->state_variable[0]->lag_index[comst_c][1]; //coefficient regime at t-1: tm1: t-1; - } - else if ((nRv==1) && (nRc>nRstc)) - { - comst_c = Index[st][0]; //composite (s_tc, s_{t-1}c) - st_c = smodel_ps->sv->state_variable[0]->lag_index[comst_c][0]; //coefficient regime at t. - stm1_c = smodel_ps->sv->state_variable[0]->lag_index[comst_c][1]; //coefficient regime at t-1: tm1: t-1; - st_v = 0; - } - else if ((nRv==1) && (nRc==nRstc)) - { - comst_c = st_c = st; - st_v = 0; - } - else if ((nRv>1) && (nRc==nRstc)) //only sc_t enters coefficient regime. - { - if (smodel_ps->sv->n_state_variables != 2) fn_DisplayError("kalman.c/kalfilms_timet_1st_approx():\n" - " Number of state variables must be coincide with indxIndRegimes"); - - comst_c = st_c = Index[st][0]; - st_v = Index[st][1]; - } - } - else //Syncronized regimes - { - if (nRc>nRstc) - { - comst_c = Index[st][0]; //composite (s_tc, s_{t-1}c) - st_c = smodel_ps->sv->state_variable[0]->lag_index[comst_c][0]; //coefficient regime at t. - stm1_c = smodel_ps->sv->state_variable[0]->lag_index[comst_c][1]; //coefficient regime at t-1: tm1: t-1; - st_v = st_c; - } - else - comst_c = st_c = st_v = st; - } - - - z0_sdv.n = zt_tm1_dc->C[0]->nrows; - z0_sdv.flag = V_DEF; - // - at_sdv.n = yt_sdv.n = yt_dm->nrows; - at_sdv.flag = yt_sdv.flag = V_DEF; - - //====== Computing the conditional LH at time t. ====== - //--- Setup. - MatrixTimesMatrix(PHtran_tdata_dm, Pt_tm1_d4->F[tbase0]->C[st], Ht_dc->C[comst_c], 1.0, 0.0, 'N', 'T'); - - //--- Data. - //- etdata = Y_T(:,tdata) - a(:,tdata) - Htdata*ztdata where tdata = tbase0 = inpt-1. - yt_sdv.v = yt_dm->M + tbase0*yt_dm->nrows; - at_sdv.v = at_dm->M + comst_c*at_dm->nrows; //comst_c: coefficient regime at time tbase0. - z0_sdv.v = zt_tm1_dc->C[tbase0]->M + z0_sdv.n*st; //st: regime at time tbase0 for zt_tm1. - VectorMinusVector(etdata_dv, &yt_sdv, &at_sdv); - MatrixTimesVector(etdata_dv, Ht_dc->C[comst_c], &z0_sdv, -1.0, 1.0, 'N'); - //+ Dtdata = Htdata*PHtran_tdata + R(:,:,tbase0); - CopyMatrix0(Dtdata_dm, Rt_dc->C[st_v]); - MatrixTimesMatrix(Dtdata_dm, Ht_dc->C[comst_c], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - ScalarTimesMatrixSquare(Dtdata_dm, 0.5, Dtdata_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Dtdata_dm->flag = Dtdata_dm->flag | M_SU | M_SL; - - - //--- Forming the log conditional likelihood at t. - if (!isfinite(logdet_Dtdata=logdetspd(Dtdata_dm))) return (loglh_timet = -NEARINFINITY); - bdivA_rgens(wny_dv, etdata_dv, '/', Dtdata_dm); -//if ((inpt>82) && (inpt<86) ) -//{ -// //Must be declared at the top of this "if" block. -// int kip1; -// double tmp_Dtdata; -// double tmp_expterm; - -// fprintf(FPTR_DEBUG, "%%------------------------\n"); -// fprintf(FPTR_DEBUG, "%%st=%d and inpt=%d\n", st, inpt); -// fprintf(FPTR_DEBUG, "loglh_timet = %10.5f;\n", loglh_timet); - - -// fprintf(FPTR_DEBUG, "wny_dv:\n"); -// WriteVector(FPTR_DEBUG, wny_dv, " %10.5f "); -// fprintf(FPTR_DEBUG, "etdata_dv:\n"); -// WriteVector(FPTR_DEBUG, etdata_dv, " %10.5f "); -// fprintf(FPTR_DEBUG, "Dtdata_dm:\n"); -// WriteMatrix(FPTR_DEBUG, Dtdata_dm, " %.16e "); - -// fflush(FPTR_DEBUG); -//} - loglh_timet = -(0.5*ny)*LOG2PI - 0.5*logdet_Dtdata - 0.5*VectorDotVector(wny_dv, etdata_dv); - //Done with all w*_dv. - - - - -//=== ???????? For debugging purpose. -if (inpt==1) -{ - double wk1, wk2; - - wk1 = logdet_Dtdata; - wk2 = VectorDotVector(wny_dv, etdata_dv); - fprintf(FPTR_DEBUG, "logdet_Dtdata = %10.5f\n", wk1); - fprintf(FPTR_DEBUG, "VectorDotVector(wny_dv, etdata_dv) = %10.5f\n", wk2); - fprintf(FPTR_DEBUG, "----- etdata_dv: \n"); - WriteVector(FPTR_DEBUG, etdata_dv, " %10.5f "); - fprintf(FPTR_DEBUG, "----- yt_dv: \n"); - WriteVector(FPTR_DEBUG, &yt_sdv, " %10.5f "); - fprintf(FPTR_DEBUG, "----- at_dv: \n"); - WriteVector(FPTR_DEBUG, &at_sdv, " %10.5f "); - fprintf(FPTR_DEBUG, "----- z0_dv: \n"); - WriteVector(FPTR_DEBUG, &z0_sdv, " %10.5f "); - fprintf(FPTR_DEBUG, "----- Ht_dc->C[comst_c=%d]:\n", comst_c); - WriteMatrix(FPTR_DEBUG, Ht_dc->C[comst_c], " %10.5f "); - - fprintf(FPTR_DEBUG, "\n\n"); - -} -// -fprintf(FPTR_DEBUG, " %10.5f\n", loglh_timet); -fflush(FPTR_DEBUG); - - -//=== ???????? For debugging purpose. -//fprintf(FPTR_DEBUG, "------------------------\n"); -//fprintf(FPTR_DEBUG, "st=%d and inpt=%d\n", st, inpt); -//fprintf(FPTR_DEBUG, "loglh_timet = %10.5f\n", loglh_timet); -//fprintf(FPTR_DEBUG, "&yt_sdv:\n"); -//WriteVector(FPTR_DEBUG, &yt_sdv, " %10.5f "); -////WriteVector(FPTR_DEBUG, etdata_dv, " %10.5f "); -////fprintf(FPTR_DEBUG, "\n"); -////WriteMatrix(FPTR_DEBUG, Dtdata_dm, " %10.5f "); -//fflush(FPTR_DEBUG); - - -//=== ???????? For debugging purpose. -//if ((inpt>82) && (inpt<86) ) -//if (inpt<2) -//{ -// //Must be declared at the top of this "if" block. -// int kip1; -// double tmp_Dtdata; -// double tmp_expterm; - -// fprintf(FPTR_DEBUG, "%%------------------------\n"); -// fprintf(FPTR_DEBUG, "%%st=%d and inpt=%d\n", st, inpt); -// fprintf(FPTR_DEBUG, "loglh_timet = %10.5f;\n", loglh_timet); - - -// tmp_Dtdata = logdeterminant(Dtdata_dm); -// tmp_expterm = VectorDotVector(wny_dv, etdata_dv); -// fprintf(FPTR_DEBUG, "logdeterminant(Dtdata_dm) = %10.5f;\n", tmp_Dtdata); -// fprintf(FPTR_DEBUG, "VectorDotVector(wny_dv, etdata_dv) = %10.5f;\n", tmp_expterm); -// fprintf(FPTR_DEBUG, "wny_dv:\n"); -// WriteVector(FPTR_DEBUG, wny_dv, " %10.5f "); -// fprintf(FPTR_DEBUG, "etdata_dv:\n"); -// WriteVector(FPTR_DEBUG, etdata_dv, " %10.5f "); -// fprintf(FPTR_DEBUG, "&yt_sdv:\n"); -// WriteVector(FPTR_DEBUG, &yt_sdv, " %10.5f "); -// fprintf(FPTR_DEBUG, "&at_sdv:\n"); -// WriteVector(FPTR_DEBUG, &at_sdv, " %10.5f "); -// fprintf(FPTR_DEBUG, "&z0_sdv:\n"); -// WriteVector(FPTR_DEBUG, &z0_sdv, " %10.5f "); -// fprintf(FPTR_DEBUG, "Ht_dc->C[comst_c=%d]:\n",comst_c); -// WriteMatrix(FPTR_DEBUG, Ht_dc->C[comst_c], " %10.5f "); -// fprintf(FPTR_DEBUG, "Rt_dc->C[st_v=%d]:\n", st_v); -// WriteMatrix(FPTR_DEBUG, Rt_dc->C[st_v], " %10.5f "); -// fprintf(FPTR_DEBUG, "Pt_tm1_d4->F[tbase0]->C[st = %d]:\n",st); -// WriteMatrix(FPTR_DEBUG, Pt_tm1_d4->F[tbase0]->C[st], " %10.5f "); -// fprintf(FPTR_DEBUG, "Dtdata_dm:\n"); -// WriteMatrix(FPTR_DEBUG, Dtdata_dm, " %10.5f "); - - - - -//// WriteMatrix(FPTR_DEBUG, Dtdata_dm, " %10.5f "); -//// fprintf(FPTR_DEBUG, "zt_tm1_dc->C[tbase0]:\n"); -//// WriteMatrix(FPTR_DEBUG, zt_tm1_dc->C[tbase0], " %10.5f "); -//// //WriteVector(FPTR_DEBUG, &z0_sdv, " %10.5f "); -//// //fprintf(FPTR_DEBUG, "\n"); -//// fprintf(FPTR_DEBUG, "bt_dm = [\n"); -//// WriteMatrix(FPTR_DEBUG, bt_dm, " %10.5f "); -//// fprintf(FPTR_DEBUG, "];\n"); - -//// fprintf(FPTR_DEBUG, "et:\n"); -//// WriteVector(FPTR_DEBUG, etdata_dv, " %10.5f "); -//// fprintf(FPTR_DEBUG, "yt_dv=[\n"); -//// WriteVector(FPTR_DEBUG, &yt_sdv, " %10.5f "); -//// fprintf(FPTR_DEBUG, "]';\n"); - -//// fprintf(FPTR_DEBUG, "at_dv=[\n"); -//// WriteVector(FPTR_DEBUG, &at_sdv, " %10.5f "); -//// fprintf(FPTR_DEBUG, "]';\n"); - - -//// for (ki=0; ki<Ht_dc->ncells; ki++) -//// { -//// kip1 = ki+1; -//// fprintf(FPTR_DEBUG, "Ht_dc(:,:,%d)=[\n", kip1); -//// WriteMatrix(FPTR_DEBUG, Ht_dc->C[ki], " %10.5f "); -//// fprintf(FPTR_DEBUG, "];\n"); -//// } -//// for (ki=0; ki<Ft_dc->ncells; ki++) -//// { -//// kip1 = ki+1; -//// fprintf(FPTR_DEBUG, "Ft_dc(:,:,%d)=[\n", kip1); -//// WriteMatrix(FPTR_DEBUG, Ft_dc->C[ki], " %10.5f "); -//// fprintf(FPTR_DEBUG, "];\n"); -//// } -//// for (ki=0; ki<Vt_dc->ncells; ki++) -//// { -//// kip1 = ki+1; -//// fprintf(FPTR_DEBUG, "Vt_dc(:,:,%d)=[\n", kip1); -//// WriteMatrix(FPTR_DEBUG, Vt_dc->C[ki], " %10.5f "); -//// fprintf(FPTR_DEBUG, "];\n"); -//// } -// fflush(FPTR_DEBUG); -//} - - - //====================================================== - //= Updating zt_tm1 and Pt_tm1 for next perid tp1. - //= tdata = tbase0 is base-0 timing. - //====================================================== - if (inpt > record_tbase1_or_inpt_or_tp1) //This condition always satisfies at the 1st period (which is inpt=1). - { - passonce = 0; - record_tbase1_or_inpt_or_tp1 = inpt; - } - if (!passonce) - { - for (stp1i=smodel_ps->sv->nstates-1; stp1i>=0; stp1i--) - { - if (indxIndRegimes) - { - if (nRc==1) //Volatility. - { - comstp1i_c = stp1i_c = 0; - stp1i_v = stp1i; - } - else if ((nRv>1) && (nRc>nRstc)) //Trend inflation, both sc_t and sc_{t-1} enters coefficient regime. - { - comstp1i_c = Index[stp1i][0]; //composite (s_tc, s_{t-1}c) - stp1i_v = Index[stp1i][1]; //volatility state s_tv - stp1i_c = smodel_ps->sv->state_variable[0]->lag_index[comstp1i_c][0]; //coefficient regime at t. - //sti_c = smodel_ps->sv->state_variable[0]->lag_index[comstp1i_c][1]; //coefficient regime at t-1: tm1: t-1; - } - else if ((nRv==1) && (nRc>nRstc)) - { - comstp1i_c = Index[stp1i][0]; //composite (s_tc, s_{t-1}c) - stp1i_c = smodel_ps->sv->state_variable[0]->lag_index[comstp1i_c][0]; //coefficient regime at t. - //sti_c = smodel_ps->sv->state_variable[0]->lag_index[comstp1i_c][1]; //coefficient regime at t-1: tm1: t-1; - stp1i_v = 0; - } - else if ((nRv==1) && (nRc==nRstc)) - { - comstp1i_c = stp1i_c = stp1i; - stp1i_v = 0; - } - else if ((nRv>1) && (nRc==nRstc)) //only sc_t enters coefficient regime. - { - comstp1i_c = stp1i_c = Index[stp1i][0]; - stp1i_v = Index[stp1i][1]; - } - } - else //Syncronized regimes. - { - if (nRc>nRstc) - { - comstp1i_c = Index[stp1i][0]; //composite (s_tc, s_{t-1}c) - stp1i_c = smodel_ps->sv->state_variable[0]->lag_index[comstp1i_c][0]; //coefficient regime at t. - //sti_c = smodel_ps->sv->state_variable[0]->lag_index[comstp1i_c][1]; //coefficient regime at t-1: tm1: t-1; - stp1i_v = stp1i_c; - } - else - comstp1i_c = stp1i_c = stp1i_v = stp1i; - } - - - InitializeConstantVector_lf(ztp1_dv, 0.0); //To be summed over sti. - InitializeConstantMatrix_lf(Ptp1_dm, 0.0); //To be summed over sti. - - for (sti=smodel_ps->sv->nstates-1; sti>=0; sti--) - { - if (indxIndRegimes) - { - if (nRc==1) //Volatility. - { - comsti_c = sti_c = 0; - sti_v = sti; - } - else if ((nRv>1) && (nRc>nRstc)) //Trend inflation, both sc_t and sc_{t-1} enters coefficient regime. - { - comsti_c = Index[sti][0]; //composite (s_tc, s_{t-1}c) - sti_v = Index[sti][1]; //volatility state s_tv - sti_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][0]; //coefficient regime at t. - stm1i_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][1]; //coefficient regime at t-1: tm1: t-1; - } - else if ((nRv==1) && (nRc>nRstc)) - { - comsti_c = Index[sti][0]; //composite (s_tc, s_{t-1}c) - sti_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][0]; //coefficient regime at t. - stm1i_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][1]; //coefficient regime at t-1: tm1: t-1; - sti_v = 0; - } - else if ((nRv==1) && (nRc==nRstc)) - { - comsti_c = sti_c = sti; - sti_v = 0; - } - else if ((nRv>1) && (nRc==nRstc)) //only sc_t enters coefficient regime. - { - comsti_c = sti_c = Index[sti][0]; - sti_v = Index[sti][1]; - } - } - else //Syncronized regimes. - { - if (nRc>nRstc) - { - comsti_c = Index[sti][0]; //composite (s_tc, s_{t-1}c) - sti_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][0]; //coefficient regime at t. - stm1i_c = smodel_ps->sv->state_variable[0]->lag_index[comsti_c][1]; //coefficient regime at t-1: tm1: t-1; - sti_v = sti_c; - } - else - comsti_c = sti_c = sti_v = sti; - } - - - //--- Setup. - MatrixTimesMatrix(PHtran_tdata_dm, Pt_tm1_d4->F[tbase0]->C[sti], Ht_dc->C[comsti_c], 1.0, 0.0, 'N', 'T'); - - //--- Data. - //- etdata = Y_T(:,tdata) - a(:,tdata) - Htdata*ztdata where tdata = tbase0 = inpt-1. - yt_sdv.v = yt_dm->M + tbase0*yt_dm->nrows; - at_sdv.v = at_dm->M + comsti_c*at_dm->nrows; //comsti_c: coefficient regime at time tbase0. - z0_sdv.v = zt_tm1_dc->C[tbase0]->M + z0_sdv.n*sti; //sti: regime at time tbase0. - VectorMinusVector(etdata_dv, &yt_sdv, &at_sdv); - MatrixTimesVector(etdata_dv, Ht_dc->C[comsti_c], &z0_sdv, -1.0, 1.0, 'N'); - //+ Dtdata = Htdata*PHtran_tdata + R(:,:,tbase0); - CopyMatrix0(Dtdata_dm, Rt_dc->C[sti_v]); - MatrixTimesMatrix(Dtdata_dm, Ht_dc->C[comsti_c], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - //Done with z0_sdv.v. - ScalarTimesMatrixSquare(Dtdata_dm, 0.5, Dtdata_dm, 'T', 0.5); //Making it symmetric against some rounding errors. - //This making-symmetric is very IMPORTANT; otherwise, we will get the matrix being singular message - // and eigenvalues being negative for the SPD matrix, etc. Then the likelihood becomes either - // a bad number or a complex number. - Dtdata_dm->flag = Dtdata_dm->flag | M_SU | M_SL; - - - //=== Updating for next period by integrating out sti.. - if (tp1<T) - { - //Updating only up to tbase0=T-2. The values at tp1=T or tbase0=T-1 will not be used in the likelihood function. - - //--- Ktp1_t = (F_tp1*PHtran_t+G(:,:,t))/Dt; - //--- Kt_tdata = (Ft*PHtran_tdata+G(:,:,tdata))/Dtdata where t=tp1 and tdata=t. - CopyMatrix0(Kt_tdata0_dm, Gt_dc->C[sti_v]); - MatrixTimesMatrix(Kt_tdata0_dm, Ft_dc->C[stp1i_c], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - BdivA_rrect(Kt_tdata_dm, Kt_tdata0_dm, '/', Dtdata_dm); - //+ zt_tm1(:,t) = b(:,t) + Ft*zt_tm1(:,tdata) + Kt_tdata*etdata where t=tp1 and tm1=t. - MatrixTimesVector(ztp1_t_dv, Ft_dc->C[stp1i_c], &z0_sdv, 1.0, 0.0, 'N'); - MatrixTimesVector(ztp1_t_dv, Kt_tdata_dm, etdata_dv, 1.0, 1.0, 'N'); - btp1_sdv.v = bt_dm->M + stp1i_c*btp1_sdv.n; - VectorPlusMinusVectorUpdate(ztp1_t_dv, &btp1_sdv, 1.0); - //+ Pt_tm1(:,:,t) = Ft*Ptdata*Fttran - Kt_tdata*Dtdata*Kt_tdatatran + V(:,:,t); - CopyMatrix0(Ptp1_t_dm, Vt_dc->C[stp1i_v]); - MatrixTimesMatrix(Wnzbyny_dm, Kt_tdata_dm, Dtdata_dm, 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(Wnzbynz_dm, Wnzbyny_dm, Kt_tdata_dm, 1.0, 0.0, 'N', 'T'); - MatrixPlusMinusMatrixUpdate(Ptp1_t_dm, Wnzbynz_dm, -1.0); - //Done with all W*_dm. - MatrixTimesMatrix(Wnzbynz_dm, Ft_dc->C[stp1i_c], Pt_tm1_d4->F[tbase0]->C[sti], 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(W2nzbynz_dm, Wnzbynz_dm, Ft_dc->C[stp1i_c], 1.0, 0.0, 'N', 'T'); - MatrixPlusMatrixUpdate(Ptp1_t_dm, W2nzbynz_dm); - //Done with all W*_dm. - - //--- Integrating out the state at tbase0 using P(s_t|Y_{t-1}, theta) = ElementV(smodel_ps->Z[inpt],s_{inpt}_i). - //--- Note tbase0 = inpt-1 because the data in DW code (ElementV) is base-1. - //--- Note at this point, we cannot access to P(s_t|Y_t, theta) = ElementV(smodel_ps->V[inpt],s_{inpt}_i) - //--- through DW's code. But we can modify my own code to do this later. - prob_previous_regimes = ElementV(smodel_ps->Z[inpt],sti); - ScalarTimesVectorUpdate(ztp1_dv, prob_previous_regimes, ztp1_t_dv); - ScalarTimesMatrix(Ptp1_dm, prob_previous_regimes, Ptp1_t_dm, 1.0); - Ptp1_dm->flag = M_GE | M_SU | M_SL; - //Done with ztp1_t_dv and Ptp1_t_dm. - } - } - //--- Filling zt_tm1 and Pt_tm1 for next period - if (tp1<T) - { - z0_sdv.v = zt_tm1_dc->C[tp1]->M + z0_sdv.n*stp1i; //stp1i: regime at time tp1. - CopyVector0(&z0_sdv, ztp1_dv); - CopyMatrix0(Pt_tm1_d4->F[tp1]->C[stp1i], Ptp1_dm); //stp1i: regime at time tp1. - //Done with ztp1_dv, z0_sdv, Ptp1_dm. - } - } - if (tp1<T) - zt_tm1_dc->C[tp1]->flag = M_GE; - } - - -//=== ???????? For debugging purpose. -//if ((inpt>60) && (inpt<65) ) //if (inpt<5) -//{ -// int kip1; //Must be declared at the top of this "if" block. - -// fprintf(FPTR_DEBUG, "zt_tm1t=[\n"); -// WriteMatrix(FPTR_DEBUG, zt_tm1_dc->C[tbase0], " %10.5f "); -// fprintf(FPTR_DEBUG, "];\n"); - -// for (ki=0; ki<Pt_tm1_d4->F[tbase0]->ncells; ki++) -// { -// kip1 = ki+1; -// fprintf(FPTR_DEBUG, "Pt_tm1_d4t(:,:,%d)=[\n", kip1); -// WriteMatrix(FPTR_DEBUG, Pt_tm1_d4->F[tbase0]->C[ki], " %10.5f "); -// fprintf(FPTR_DEBUG, "];\n"); -// } - -// fflush(FPTR_DEBUG); -//} - - -//=== ???????? For debugging purpose. -fprintf(FPTR_DEBUG, " loglh_timet = %10.5f\n", loglh_timet); -fflush(FPTR_DEBUG); - - - //=== - DestroyVector_dz(evals_dzv); - DestroyVector_lf(evals_abs_dv); - DestroyMatrix_lf(Wnzbynz_dm); - DestroyMatrix_lf(Wnz2bynz2_dm); - DestroyMatrix_lf(W2nz2bynz2_dm); - DestroyVector_lf(wP0_dv); - // - DestroyVector_lf(wny_dv); - DestroyMatrix_lf(Wnzbyny_dm); - DestroyMatrix_lf(W2nzbynz_dm); - DestroyMatrix_lf(PHtran_tdata_dm); - DestroyVector_lf(etdata_dv); - DestroyMatrix_lf(Dtdata_dm); - DestroyMatrix_lf(Kt_tdata0_dm); - DestroyMatrix_lf(Kt_tdata_dm); - // - DestroyVector_lf(ztp1_t_dv); - DestroyMatrix_lf(Ptp1_t_dm); - DestroyVector_lf(ztp1_dv); - DestroyMatrix_lf(Ptp1_dm); - - return (loglh_timet); -} -#undef LOG2PI -#endif - - -/** -//---------------------------------------------------------------- -//-- Tested OK, but has not use because tz_Refresh_z_T7P_T_in_kalfilms_1st_approx() -//-- cannot access to ElementV(smodel_ps->V[tp1],sti) or ElementV(smodel_ps->V[tbase0],sti) -//-- because no likelihood has been formed at all before this function is called. -//---------------------------------------------------------------- -#define LOG2PI (1.837877066409345e+000) //log(2*pi) -//----------------------------------------------------- -//- Updating or refreshing all Kalman filter at time t for Markov-switching DSGE model. -//- WARNING: make sure to call the following functions -// RunningGensys_const7varionly(lwzmodel_ps); -// Refresh_kalfilms_*(lwzmodel_ps); //Creates or refreshes kalfilmsinputs_ps at new parameter values. -//- before using tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(). -//----------------------------------------------------- -void tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(struct TSkalfilmsinputs_tag *kalfilmsinputs_ps, struct TStateModel_tag *smodel_ps) -{ - double debug1; - //--- Local variables - int stp1i, stp1i_c, stp1i_v, sti, sti_c, sti_v, tbase0, tp1; - //=== Accessible variables - int ny = kalfilmsinputs_ps->ny; - int nz = kalfilmsinputs_ps->nz; - int nRc = kalfilmsinputs_ps->nRc; - int nRv = kalfilmsinputs_ps->nRv; - int T = kalfilmsinputs_ps->T; - int indxIndRegimes = kalfilmsinputs_ps->indxIndRegimes; - TSdvector z0_sdv; - //+ input arguments. - TSdmatrix *yt_dm = kalfilmsinputs_ps->yt_dm; //ny-by-T. - TSdmatrix *at_dm = kalfilmsinputs_ps->at_dm; //ny-by-nRc. - TSdcell *Ht_dc = kalfilmsinputs_ps->Ht_dc; //ny-by-nz-by-nRc. - TSdcell *Rt_dc = kalfilmsinputs_ps->Rt_dc; //ny-by-ny-by-nRv. Covariance matrix for the measurement equation. - TSdcell *Gt_dc = kalfilmsinputs_ps->Gt_dc; //nz-by-ny-by-nRv. Cross-covariance. - // - TSdmatrix *bt_dm = kalfilmsinputs_ps->bt_dm; //nz-by-nRc. - TSdcell *Ft_dc = kalfilmsinputs_ps->Ft_dc; //nz-by-nz-by-nRc. - TSdcell *Vt_dc = kalfilmsinputs_ps->Vt_dc; //nz-by-nz-by-nRv. Covariance matrix for the state equation. - // - TSdmatrix *z0_dm = kalfilmsinputs_ps->z0_dm; //nz-by-nRc*nRv or nz-by-nRv, depending on indxIndRegimes. - TSdcell *P0_dc = kalfilmsinputs_ps->P0_dc; //nz-by-nz-by-nRc*nRv or nz-by-nRv, depending on indxIndRegimes. - //+ Output arguments. - TSdcell *zt_tm1_dc = kalfilmsinputs_ps->zt_tm1_dc; //nz-by-nRc*nRv-by-T if indxIndRegimes==1, nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - TSdfourth *Pt_tm1_d4 = kalfilmsinputs_ps->Pt_tm1_d4; //nz-by-nz-by-nRc*nRv-T if indxIndRegimes==1, nz-by-nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - //=== Work arguments. - int nz2 = square(nz); - TSdmatrix *Wnzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *Wnz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdmatrix *W2nz2bynz2_dm = CreateMatrix_lf(nz2,nz2); - TSdvector *wP0_dv = CreateVector_lf(nz2); - //+ - TSdvector yt_sdv, at_sdv, btp1_sdv; //zt_tm1_sdv, ztp1_t_sdv, - TSdvector *wny_dv = CreateVector_lf(ny); - TSdmatrix *Wnzbyny_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *W2nzbynz_dm = CreateMatrix_lf(nz,nz); - TSdmatrix *PHtran_tdata_dm = CreateMatrix_lf(nz,ny); - TSdvector *etdata_dv = CreateVector_lf(ny); - TSdmatrix *Dtdata_dm = CreateMatrix_lf(ny,ny); - TSdmatrix *Kt_tdata0_dm = CreateMatrix_lf(nz,ny); - TSdmatrix *Kt_tdata_dm = CreateMatrix_lf(nz,ny); - //--- For eigenvalue decompositions - int ki; - int errflag; - double eigmax; - TSdzvector *evals_dzv = evals_dzv = CreateVector_dz(nz); - TSdvector *evals_abs_dv = CreateVector_lf(nz); //Absolute eigenvalues. - //--- For updating zt_tm1_dm and Pt_tm1. - TSdvector *ztp1_t_dv = CreateVector_lf(z0_dm->nrows); - TSdmatrix *Ptp1_t_dm = CreateMatrix_lf(nz, nz); - TSdvector *ztp1_dv = CreateVector_lf(z0_dm->nrows); - TSdmatrix *Ptp1_dm = CreateMatrix_lf(nz, nz); - - - if (smodel_ps->sv->nstates != z0_dm->ncols) fn_DisplayError("kalman.c/tz_Refresh_z_T7P_T_in_kalfilms_1st_approx():\n" - " Make sure that the column dimension of z0_dm is the same as smodel_ps->sv->nstates"); - if (indxIndRegimes && (nRc>1) && (nRv>1)) - if (smodel_ps->sv->n_state_variables != 2) fn_DisplayError("kalman.c/tz_Refresh_z_T7P_T_in_kalfilms_1st_approx():\n" - " Number of state variables must be coincide with indxIndRegimes"); - - - z0_sdv.n = z0_dm->nrows; - z0_sdv.flag = V_DEF; - // - at_sdv.n = yt_sdv.n = yt_dm->nrows; - at_sdv.flag = yt_sdv.flag = V_DEF; - btp1_sdv.n = bt_dm->nrows; - btp1_sdv.flag = V_DEF; - - - //======= Initial condition. ======= - for (sti=smodel_ps->sv->nstates-1; sti>=0; sti--) - { - if (indxIndRegimes && (nRc==1)) - { - sti_c = 0; - sti_v = sti; - } - else if (indxIndRegimes && (nRv==1)) - { - sti_c = sti; - sti_v = 0; - } - else if (indxIndRegimes) - { - sti_c = smodel_ps->sv->Index[sti][0]; - sti_v = smodel_ps->sv->Index[sti][1]; - } - else - { - sti_c = sti_v = sti; - } - - - if (!kalfilmsinputs_ps->indxIni) - { - InitializeDiagonalMatrix_lf(Wnzbynz_dm, 1.0); //To be used for I(nz) - - InitializeDiagonalMatrix_lf(Wnz2bynz2_dm, 1.0); //To be used for I(nz2) - - - //=== Eigenanalysis to determine the roots to ensure boundedness. - errflag = eigrgen(evals_dzv, (TSdzmatrix *)NULL, (TSdzmatrix *)NULL, Ft_dc->C[sti_c]); - if (errflag) fn_DisplayError("kalman.c/tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(): eigen decomposition failed"); - for (ki=nz-1; ki>=0; ki--) evals_abs_dv->v[ki] = sqrt(square(evals_dzv->real->v[ki]) + square(evals_dzv->imag->v[ki])); - evals_abs_dv->flag = V_DEF; - eigmax = MaxVector(evals_abs_dv); - if (eigmax < (1.0+1.0e-14)) - { - //--- Getting z0_dv: zt_tm1(:,1) = (eye(n_z)-F(:,:,1))\b(:,1); - MatrixMinusMatrix(Wnzbynz_dm, Wnzbynz_dm, Ft_dc->C[sti_c]); - z0_sdv.v = z0_dm->M + z0_sdv.n*sti; - CopySubmatrix2vector(&z0_sdv, 0, bt_dm, 0, sti_c, bt_dm->nrows); - bdivA_rgens(&z0_sdv, &z0_sdv, '\\', Wnzbynz_dm); - //Done with Wnzbynz_dm. - //--- Getting P0_dm: Pt_tm1(:,:,1) = reshape((eye(n_z^2)-kron(F(:,:,1),F(:,:,1)))\V1(:),n_z,n_z); - tz_kron(W2nz2bynz2_dm, Ft_dc->C[sti_c], Ft_dc->C[sti_c]); - MatrixMinusMatrix(Wnz2bynz2_dm, Wnz2bynz2_dm, W2nz2bynz2_dm); - CopySubmatrix2vector(wP0_dv, 0, Vt_dc->C[sti_v], 0, 0, nz2); - bdivA_rgens(wP0_dv, wP0_dv, '\\', Wnz2bynz2_dm); - CopySubvector2matrix_unr(P0_dc->C[sti], 0, 0, wP0_dv, 0, nz2); - //Done with all w*_dv and W*_dm. - } - else - { - fprintf(stdout, "\n-----------------\n"); - fprintf(stdout, "\nIn regime sti_c=%d and sti_v=%d and at time=%d\n", sti_c, sti_v, 0); - fn_DisplayError("kalman.c/tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(): the system is non-stationary solutions\n" - " and the initial conditions must be supplied by, say, input arguments"); - fflush(stdout); - } - } - } - z0_dm->flag = M_GE; - CopyMatrix0(zt_tm1_dc->C[0], z0_dm); //At time t=0. - CopyCell0(Pt_tm1_d4->F[0], P0_dc); //At time t=0. - - -// fprintf(FPTR_DEBUG, "\n zt_tm1_dc->C[0]:\n"); -// WriteMatrix(FPTR_DEBUG, zt_tm1_dc->C[0], " %.16e "); -// fprintf(FPTR_DEBUG, "\n"); -// fprintf(FPTR_DEBUG, "\n Pt_tm1_d4->F[0]->C[0]:\n"); -// WriteMatrix(FPTR_DEBUG, Pt_tm1_d4->F[0]->C[0], " %.16e "); - - - //============== Updating zt_tm1 and Pt_tm1. ================== - for (tbase0=0; tbase0<T; tbase0++ ) - { - //tdata = tbase0 is base-0 timing. - tp1 = tbase0 + 1; //Next period. - - for (stp1i=smodel_ps->sv->nstates-1; stp1i>=0; stp1i--) - { - if (indxIndRegimes && (nRc==1)) - { - stp1i_c = 0; - stp1i_v = stp1i; - } - else if (indxIndRegimes && (nRv==1)) - { - stp1i_c = stp1i; - stp1i_v = 0; - } - else if (indxIndRegimes) - { - stp1i_c = smodel_ps->sv->Index[stp1i][0]; - stp1i_v = smodel_ps->sv->Index[stp1i][1]; - } - else - { - stp1i_c = stp1i_v = stp1i; - } - - - InitializeConstantVector_lf(ztp1_dv, 0.0); //To be summed over sti. - InitializeConstantMatrix_lf(Ptp1_dm, 0.0); //To be summed over sti. - for (sti=smodel_ps->sv->nstates-1; sti>=0; sti--) - { - if (indxIndRegimes && (nRc==1)) - { - sti_c = 0; - sti_v = sti; - } - else if (indxIndRegimes && (nRv==1)) - { - sti_c = sti; - sti_v = 0; - } - else if (indxIndRegimes) - { - sti_c = smodel_ps->sv->Index[sti][0]; - sti_v = smodel_ps->sv->Index[sti][1]; - } - else - { - sti_c = sti_v = sti; - } - - //--- Setup. - MatrixTimesMatrix(PHtran_tdata_dm, Pt_tm1_d4->F[tbase0]->C[sti], Ht_dc->C[sti_c], 1.0, 0.0, 'N', 'T'); - - //--- Data. - //- etdata = Y_T(:,tdata) - a(:,tdata) - Htdata*ztdata where tdata = tbase0 = inpt-1. - yt_sdv.v = yt_dm->M + tbase0*yt_dm->nrows; - at_sdv.v = at_dm->M + sti_c*at_dm->nrows; //sti_c: coefficient regime at time tbase0. - z0_sdv.v = zt_tm1_dc->C[tbase0]->M + z0_sdv.n*sti; //sti: regime at time tbase0. - VectorMinusVector(etdata_dv, &yt_sdv, &at_sdv); - MatrixTimesVector(etdata_dv, Ht_dc->C[sti_c], &z0_sdv, -1.0, 1.0, 'N'); - //+ Dtdata = Htdata*PHtran_tdata + R(:,:,tbase0); - CopyMatrix0(Dtdata_dm, Rt_dc->C[sti_v]); - MatrixTimesMatrix(Dtdata_dm, Ht_dc->C[sti_c], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - //Done with z0_sdv.v. - - - //=== Updating for next period by integrating out sti.. - if (tp1<T) - { - //Updating only up to tbase0=T-2. The values at tp1=T or tbase0=T-1 will not be used in the likelihood function. - - //--- Ktp1_t = (F_tp1*PHtran_t+G(:,:,t))/Dt; - //--- Kt_tdata = (Ft*PHtran_tdata+G(:,:,tdata))/Dtdata where t=tp1 and tdata=t. - CopyMatrix0(Kt_tdata0_dm, Gt_dc->C[sti_v]); - MatrixTimesMatrix(Kt_tdata0_dm, Ft_dc->C[stp1i_c], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - BdivA_rrect(Kt_tdata_dm, Kt_tdata0_dm, '/', Dtdata_dm); - //+ zt_tm1(:,t) = b(:,t) + Ft*zt_tm1(:,tdata) + Kt_tdata*etdata where t=tp1 and tm1=t. - MatrixTimesVector(ztp1_t_dv, Ft_dc->C[stp1i_c], &z0_sdv, 1.0, 0.0, 'N'); - MatrixTimesVector(ztp1_t_dv, Kt_tdata_dm, etdata_dv, 1.0, 1.0, 'N'); - btp1_sdv.v = bt_dm->M + stp1i_c*btp1_sdv.n; - VectorPlusMinusVectorUpdate(ztp1_t_dv, &btp1_sdv, 1.0); - //+ Pt_tm1(:,:,t) = Ft*Ptdata*Fttran - Kt_tdata*Dtdata*Kt_tdatatran + V(:,:,t); - CopyMatrix0(Ptp1_t_dm, Vt_dc->C[stp1i]); - MatrixTimesMatrix(Wnzbyny_dm, Kt_tdata_dm, Dtdata_dm, 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(Wnzbynz_dm, Wnzbyny_dm, Kt_tdata_dm, 1.0, 0.0, 'N', 'T'); - MatrixPlusMinusMatrixUpdate(Ptp1_t_dm, Wnzbynz_dm, -1.0); - //Done with all W*_dm. - MatrixTimesMatrix(Wnzbynz_dm, Ft_dc->C[stp1i_c], Pt_tm1_d4->F[tbase0]->C[sti], 1.0, 0.0, 'N', 'N'); - MatrixTimesMatrix(W2nzbynz_dm, Wnzbynz_dm, Ft_dc->C[stp1i_c], 1.0, 0.0, 'N', 'T'); - MatrixPlusMatrixUpdate(Ptp1_t_dm, W2nzbynz_dm); - //Done with all W*_dm. - - //--- Integrating out the state at tbase0 using P(s_t|Y_t, theta) = ElementV(smodel_ps->V[t+1],s_{t+1}_i). - //--- Note because the data in DW code (ElementV) is base-1, t+1 is actually tbase0. - debug1 = ElementV(smodel_ps->V[tp1],sti); //?????? Debug. - //ScalarTimesVectorUpdate(ztp1_dv, ElementV(smodel_ps->V[tp1],sti), ztp1_t_dv); - //ScalarTimesMatrix(Ptp1_dm, ElementV(smodel_ps->V[tp1],sti), Ptp1_t_dm, 1.0); - ScalarTimesVectorUpdate(ztp1_dv, 0.5, ztp1_t_dv); - ScalarTimesMatrix(Ptp1_dm, 0.5, Ptp1_t_dm, 1.0); - Ptp1_dm->flag = M_GE | M_SU | M_SL; - //Done with ztp1_t_dv and Ptp1_t_dm. - } - } - //--- Filling zt_tm1 and Pt_tm1 for next period - if (tp1<T) - { - z0_sdv.v = zt_tm1_dc->C[tp1]->M + z0_sdv.n*stp1i; //stp1i: regime at time tp1. - CopyVector0(&z0_sdv, ztp1_dv); - CopyMatrix0(Pt_tm1_d4->F[tp1]->C[stp1i], Ptp1_dm); //stp1i: regime at time tp1. - //Done with ztp1_dv, z0_sdv, Ptp1_dm. - } - } - if (tp1<T) - zt_tm1_dc->C[tp1]->flag = M_GE; - -// fprintf(FPTR_DEBUG, "\n &yt_sdv:\n"); -// WriteMatrix(FPTR_DEBUG, &yt_sdv, " %.16e "); -// fprintf(FPTR_DEBUG, "\n zt_tm1_dc->C[tp1]:\n"); -// WriteMatrix(FPTR_DEBUG, zt_tm1_dc->C[tp1], " %.16e "); -// fprintf(FPTR_DEBUG, "\n"); -// fprintf(FPTR_DEBUG, "\n Pt_tm1_d4->F[tp1]->C[0]:\n"); -// WriteMatrix(FPTR_DEBUG, Pt_tm1_d4->F[tp1]->C[0], " %.16e "); -// fprintf(FPTR_DEBUG, "\n"); -// fflush(FPTR_DEBUG); - - - } - - //=== - DestroyVector_dz(evals_dzv); - DestroyVector_lf(evals_abs_dv); - DestroyMatrix_lf(Wnzbynz_dm); - DestroyMatrix_lf(Wnz2bynz2_dm); - DestroyMatrix_lf(W2nz2bynz2_dm); - DestroyVector_lf(wP0_dv); - // - DestroyVector_lf(wny_dv); - DestroyMatrix_lf(Wnzbyny_dm); - DestroyMatrix_lf(W2nzbynz_dm); - DestroyMatrix_lf(PHtran_tdata_dm); - DestroyVector_lf(etdata_dv); - DestroyMatrix_lf(Dtdata_dm); - DestroyMatrix_lf(Kt_tdata0_dm); - DestroyMatrix_lf(Kt_tdata_dm); - // - DestroyVector_lf(ztp1_t_dv); - DestroyMatrix_lf(Ptp1_t_dm); - DestroyVector_lf(ztp1_dv); - DestroyMatrix_lf(Ptp1_dm); -} -//----------------------------------------------------- -//- Kalman filter at time t for Markov-switching DSGE model. -//- WARNING: make sure to call the following functions -// (1) RunningGensys_const7varionly(lwzmodel_ps); -// (2) Refresh_kalfilms_*(lwzmodel_ps); //Creates or refreshes kalfilmsinputs_ps at new parameter values. -// (3) tz_Refresh_z_T7P_T_in_kalfilms_1st_approx(); -//- before using kalfilms_timet_1st_approx(). -//----------------------------------------------------- -double tz_kalfilms_timet_1st_approx(int st, int inpt, struct TSkalfilmsinputs_tag *kalfilmsinputs_ps, struct TStateModel_tag *smodel_ps) -{ - //st, st_c, and st_v: base-0: deals with the cross-section values at time t where - // st is a grand regime, st_c is an encoded coefficient regime, and st_c is an encoded volatility regime. - //inpt: base-1 in the sense that inpt>=1 to deal with the time series situation where S_T is (T+1)-by-1 and Y_T is T+nlags_max-by-1. - // The 1st element for S_T is S_T[1] while S_T[0] is s_0. The same for (T+1)-by-1 gbeta_dv and nlcoefs-by-(T+1) galpha_dm. - // The 1st element for Y_T, however, is Y_T[nlags_max+1-1]. - //See (42.3) on p.42 in the SWZII NOTES. - - - //--- Local variables - int st_c, st_v, tbase0; - double loglh_timet; - //--- Accessible variables - int ny = kalfilmsinputs_ps->ny; - int nz = kalfilmsinputs_ps->nz; - int nRc = kalfilmsinputs_ps->nRc; - int nRv = kalfilmsinputs_ps->nRv; - int indxIndRegimes = kalfilmsinputs_ps->indxIndRegimes; - TSdvector z0_sdv; - //+ input arguments. - TSdmatrix *yt_dm = kalfilmsinputs_ps->yt_dm; //ny-by-T. - TSdmatrix *at_dm = kalfilmsinputs_ps->at_dm; //ny-by-nRc. - TSdcell *Ht_dc = kalfilmsinputs_ps->Ht_dc; //ny-by-nz-by-nRc. - TSdcell *Rt_dc = kalfilmsinputs_ps->Rt_dc; //ny-by-ny-by-nRv. Covariance matrix for the measurement equation. - //+ Output arguments. - TSdcell *zt_tm1_dc = kalfilmsinputs_ps->zt_tm1_dc; //nz-by-nRc*nRv-by-T if indxIndRegimes==1, nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - TSdfourth *Pt_tm1_d4 = kalfilmsinputs_ps->Pt_tm1_d4; //nz-by-nz-by-nRc*nRv-T if indxIndRegimes==1, nz-by-nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - //=== Work arguments. - TSdvector yt_sdv, at_sdv; - TSdvector *wny_dv = CreateVector_lf(ny); - TSdmatrix *PHtran_tdata_dm = CreateMatrix_lf(nz,ny); - TSdvector *etdata_dv = CreateVector_lf(ny); - TSdmatrix *Dtdata_dm = CreateMatrix_lf(ny,ny); - - - if (smodel_ps->sv->nstates != zt_tm1_dc->C[0]->ncols) fn_DisplayError("kalman.c/kalfilms_timet_1st_approx():\n" - " Make sure that the column dimension of zt_tm1_dc->C is the same as smodel_ps->sv->nstates"); - - tbase0 = inpt - 1; //base-0 time t. - - if (indxIndRegimes && (nRc==1)) - { - st_c = 0; - st_v = st; - } - else if (indxIndRegimes && (nRv==1)) - { - st_c = st; - st_v = 0; - } - else if (indxIndRegimes) - { - if (smodel_ps->sv->n_state_variables != 2) fn_DisplayError("kalman.c/kalfilms_timet_1st_approx():\n" - " Number of state variables must be coincide with indxIndRegimes"); - st_c = smodel_ps->sv->Index[st][0]; - st_v = smodel_ps->sv->Index[st][1]; - } - else - { - st_c = st_v = st; - } - - - z0_sdv.n = zt_tm1_dc->C[0]->nrows; - z0_sdv.flag = V_DEF; - // - at_sdv.n = yt_sdv.n = yt_dm->nrows; - at_sdv.flag = yt_sdv.flag = V_DEF; - - //====== Computing the conditional LH at time t. ====== - //--- Setup. - MatrixTimesMatrix(PHtran_tdata_dm, Pt_tm1_d4->F[tbase0]->C[st], Ht_dc->C[st_c], 1.0, 0.0, 'N', 'T'); - - //--- Data. - //- etdata = Y_T(:,tdata) - a(:,tdata) - Htdata*ztdata where tdata = tbase0 = inpt-1. - yt_sdv.v = yt_dm->M + tbase0*yt_dm->nrows; - at_sdv.v = at_dm->M + st_c*at_dm->nrows; //st_c: coefficient regime at time tbase0. - z0_sdv.v = zt_tm1_dc->C[tbase0]->M + z0_sdv.n*st; //st: regime at time tbase0 for zt_tm1. - VectorMinusVector(etdata_dv, &yt_sdv, &at_sdv); - MatrixTimesVector(etdata_dv, Ht_dc->C[st_c], &z0_sdv, -1.0, 1.0, 'N'); - //+ Dtdata = Htdata*PHtran_tdata + R(:,:,tbase0); - CopyMatrix0(Dtdata_dm, Rt_dc->C[st_v]); - MatrixTimesMatrix(Dtdata_dm, Ht_dc->C[st_c], PHtran_tdata_dm, 1.0, 1.0, 'N', 'N'); - - //--- Forming the log conditional likelihood at t. - bdivA_rgens(wny_dv, etdata_dv, '/', Dtdata_dm); - loglh_timet = -(0.5*ny)*LOG2PI - 0.5*logdeterminant(Dtdata_dm) - 0.5*VectorDotVector(wny_dv, etdata_dv); - //Done with all w*_dv. - - - //=== - DestroyVector_lf(wny_dv); - DestroyMatrix_lf(PHtran_tdata_dm); - DestroyVector_lf(etdata_dv); - DestroyMatrix_lf(Dtdata_dm); - - return (loglh_timet); -} -#undef LOG2PI -/**/ - - - - diff --git a/CFiles/kalman.h b/CFiles/kalman.h deleted file mode 100644 index 3733a3007fb5262e0973c974f3d4b22a0e48ee9a..0000000000000000000000000000000000000000 --- a/CFiles/kalman.h +++ /dev/null @@ -1,314 +0,0 @@ -#ifndef __KALMAN_H__ - #define __KALMAN_H__ - - #include "tzmatlab.h" - #include "mathlib.h" - #include "dw_switch.h" - #include "fn_filesetup.h" //Used to call WriteMatrix(FPTR_DEBUG,....). - - - typedef struct TSkalcvfurw_tag { - //urw: univariate random walk kalman filter. Desigend specially for the 2006 AER SWZ paper. - - //=== Input arguments. - int indx_tvsigmasq; //0: constant siqmasq in Kalman updating (default); - //1: Keyensian (project-specific) type of time-varying sigmasq in Kalman updating; See pp.37 and 37a in SWZ Learning NOTES; - //2: project-specific type; - //3: another project-specific type. - double sigmasq; //Variance for the residual eps(t) of the measurement equation. - int fss; //T: effective sample size (excluding lags). - int kx; //dimension for x(t). - TSdmatrix *V_dm; //kx-by-kx. Covariance (symmetric and positive definite) matrix for the residual eta(t) of the transition equation. - TSdvector *ylhtran_dv; //1-by-T of y(t). The term lh means lelf hand side and tran means transpose. - TSdmatrix *Xrhtran_dm; //kx-by-T of x(t). The term rh means right hand side and tran means transpose. - TSdvector *z10_dv; //kx-by-1. Initial condition for prediction: z_{1|0}. - TSdmatrix *P10_dm; //kx-by-kx symmetric matrix. Initial condition for the variance of the prediction: P_{1|0}. - - //=== Output arguments. - TSdvector *zupdate_dv; //kx-by-1. z_{T+1|T}. - TSdmatrix *Zpredtran_dm; //kx-by-T matrix of one-step predicted values of z(t). [z_{2|1}, ..., z_{t+1|t}, ..., z_{T+1|T}]. - //Set to NULL (no output) if storeZ = 0; - TSdcell *Ppred_dc; //T cells and kx-by-kx symmetric and positive definite matrix for each cell. Mean square errors of predicted state variables. - //{P_{2|1}, ..., P{t+1|t}, ..., P{T+1|T}. Set to NULL (no output if storeV = 0). - TSdvector *ylhtranpred_dv; //1-by-T one-step prediction of y(t) or ylhtran_dv. Added 03/17/05. - - //=== Function itself. - void (*learning_fnc)(struct TSkalcvfurw_tag *, void *); - } TSkalcvfurw; //urw: univariate random walk. - // - typedef void TFlearninguni(struct TSkalcvfurw_tag *, void *); //For linear rational expectations models. - - - //=== Better version is TSkalfilmsinputs_1stapp_tag. Kalman filter for constant or known-time-varying DSGE models. - typedef struct TSkalfiltv_tag - { - //General (known-time-varying) Kalman filter for DSGE models. - // It computes a sequence of one-step predictions and their covariance matrices, and the log likelihood. - // The function uses a forward recursion algorithm. See also the Matlab function fn_kalfil_tv.m - // - // State space model is defined as follows: - // y(t) = a(t) + H(t)*z(t) + eps(t) (observation or measurement equation) - // z(t) = b(t) + F(t)*z(t) + eta(t) (state or transition equation) - // where a(t), H(t), b(t), and F(t) depend on s_t that follows a Markov-chain process and are taken as given. - // - // Inputs are as follows: - // Y_T is a n_y-by-T matrix containing data [y(1), ... , y(T)]. - // a is an n_y-by-T matrix of time-varying input vectors in the measurement equation. - // H is an n_y-by-n_z-by-T 3-D of time-varying matrices in the measurement equation. - // R is an n_y-by-n_y-by-T 3-D of time-varying covariance matrices for the error in the measurement equation. - // G is an n_z-by-n_y-by-T 3-D of time-varying E(eta_t * eps_t'). - // ------ - // b is an n_z-by-T matrix of time-varying input vectors in the state equation with b(:,1) as an initial condition. - // F is an n_z-by-n_z-by-T 3-D of time-varying transition matrices in the state equation with F(:,:,1) as an initial condition. - // V is an n_z-by-n_z-by-T 3-D of time-varying covariance matrices for the error in the state equation with V(:,:,1) as an initial condition. - // ------ - // indxIni: 1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - // 0: using the unconditional mean for any given regime at time 0. - // z0 is an n_z-by-1 vector of initial condition when indxIni=1. (Not used if indxIni=0.) - // P0 is an n_z-by-n_z matrix of initial condition when indxIni=1. (Not used if indxIni=0.) - // - // Outputs are as follows: - // loglh is a value of the log likelihood function of the state-space model - // under the assumption that errors are multivariate Gaussian. - // zt_tm1 is an n_z-by-T matrices of one-step predicted state vectors with z0_0m1 as a initial condition - // and with z_{t+1|t} as the last element. Thus, we can use it as a base-1 vector. - // Pt_tm1 is an n_z-by-n_z-by-T 3-D of covariance matrices of zt_tm1 with P0_0m1 as a initial condition - // and with P_{t+1|t} as the last element. Thus, we can use it as a base-1 cell. - // - // The initial state vector and its covariance matrix are computed under the bounded (stationary) condition: - // z0_0m1 = (I-F(:,:,1))\b(:,1) - // vec(P0_0m1) = (I-kron(F(:,:,1),F(:,:,1)))\vec(V(:,:,1)) - // Note that all eigenvalues of the matrix F(:,:,1) are inside the unit circle when the state-space model is bounded (stationary). - // - // March 2007, written by Tao Zha - // See Hamilton's book ([13.2.13] -- [13.2.22]), Harvey (pp.100-106), and LiuWZ Model I NOTES pp.001-003. - - //=== Input arguments. - int ny; //number of observables. - int nz; //number of state variables. - int T; //sample size. - int indxIni; //1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - //0: using the unconditional mean for any given regime at time 0. (Default value) - TSdmatrix *yt_dm; //ny-by-T. - TSdmatrix *at_dm; //ny-by-T. - TSdcell *Ht_dc; //ny-by-nz-by-T. - TSdcell *Rt_dc; //ny-by-ny-by-T. Covariance matrix for the measurement equation. - TSdcell *Gt_dc; //nz-by-ny-by-T. Cross-covariance. - // - TSdmatrix *bt_dm; //nz-by-T. - TSdcell *Ft_dc; //nz-by-nz-by-T. - TSdcell *Vt_dc; //nz-by-nz-by-T. Covariance matrix for the state equation. - // - TSdvector *z0_dv; //nz-by-1; - TSdmatrix *P0_dm; //nz-by-nz. - - //=== Output arguments. - double loglh; //log likelihood. - TSdmatrix *zt_tm1_dm; //nz-by-T. - TSdcell *Pt_tm1_dc; //nz-by-nz-T. - } TSkalfiltv; - - - - //=== Inputs for filter for Markov-switching DSGE models at any time t. - typedef struct TSkalfilmsinputs_1stapp_tag - { - //Inputs Markov-switching Kalman filter for DSGE models (conditional on all the regimes at time t). - // It computes a sequence of one-step predictions and their covariance matrices, and the log likelihood. - // The function uses a forward recursion algorithm. See also the Matlab function fn_kalfil_tv.m - // - // State space model is defined as follows: - // y(t) = a(t) + H(t)*z(t) + eps(t) (observation or measurement equation) - // z(t) = b(t) + F(t)*z(t) + eta(t) (state or transition equation) - // where a(t), H(t), b(t), and F(t) depend on the grand regime s_t that follows a Markov-chain process - // and is taken as given, and - // eps(t) = Psi_u(t)*u(t), where Psi_u(t) is n_y-by-n_u and u(t) is n_u-by-1; - // eta(t) = Psi_e(t)*e(t), where Psi_e(t) is n_z-by-n_e and e(t) is n_e-by-1. - // - // Inputs at time t are as follows where nst is number of grand regimes (including lagged regime - // and coefficients and shock variances): - // Y_T is a n_y-by-T matrix containing data [y(1), ... , y(T)]. - // a is an n_y-by-nst matrix of Markov-switching input vectors in the measurement equation. - // H is an n_y-by-n_z-by-nst 3-D of Markov-switching matrices in the measurement equation. - // Psi_u is an n_y-by-n_u-by-nst 3-D Markov-switching matrices. - // R is an n_y-by-n_y-by-nst 3-D of Markov-switching covariance matrices, - // E(eps(t) * eps(t)') = Psi_u(t)*Psi_u(t)', for the error in the measurement equation. - // G is an n_z-by-n_y-by-nst 3-D of Markov-switching E(eta_t * eps_t') = Psi_e(t)*Psi_u(t)'. - // ------ - // b is an n_z-by-nst matrix of Markov-switching input vectors in the state equation with b(:,st) as an initial condition. - // (alternatively, with the ergodic weighted b(:,st) as an initial condition). - // F is an n_z-by-n_z-by-nst 3-D of Markov-switching transition matrices in the state equation with F(:,:,st) - // as an initial condition (alternatively, with the ergodic weighted F(:,:,st) as an initial condition). - // Psi_e is an n_z-by-n_e-by-nst 3-D Markov-switching matrices. - // V is an n_z-by-n_z-by-nRv 3-D of Markov-switching covariance matrices, - // E(eta(t)*eta(t)') = Psi_e(t)*Psi_e(t)', for the error in the state equation - // with V(:,:,st) as an initial condition (alternatively, with the ergodic weighted V(:,:,st) as an initial condition). - // ------ - // indxIni: 1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - // 0: using the unconditional mean for any given regime at time 0. - // z0 is an n_z-by-nst matrix of initial condition (Not used if indxIni=0). - // P0 is an n_z-by-n_z-by-nst 3-D of initial condition (Not used if indxIni=0). - // - // The initial state vector and its covariance matrix are computed under the bounded (stationary) condition: - // z0_0m1 = (I-F(:,:,st))\b(:,st) - // vec(P0_0m1) = (I-kron(F(:,:,st),F(:,:,st)))\vec(V(:,:,st)) - // Note that all eigenvalues of the matrix F(:,:,st) are inside the unit circle when the state-space model is bounded (stationary). - // - // November 2007, written by Tao Zha. Revised, April 2008. - // See Hamilton's book ([13.2.13] -- [13.2.22]), Harvey (pp.100-106), and LiuWZ Model I NOTES pp.001-003. - - //=== Input arguments. - int ny; //number of observables. - int nz; //number of state variables. - int nu; //number of measurement errors. - int ne; //number of fundamental errors. - int nst; //number of grand composite regimes (current and past regimes, coefficient and volatility regimes). - int T; //sample size. - int indxIni; //1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0, - //0: using the unconditional momnets for any given regime at time 0 (default when indxDiffuse = 0). - int indxDiffuse; //1: using the diffuse condition for z_{1|0} and P_{1|0} (default option), according to Koopman and Durbin, "Filtering and Smoothing of State Vector for Diffuse State-Space Models," J. of Time Series Analysis, Vol 24(1), pp.85-99. - //0: using the unconditional moments. - double DiffuseScale; //A large (infinity) number when indxDiffuse = 1. - int ztm1_track; //t-1 = -1: no initial conditions z_{1|0} and P_{1|0} has been computed yet, but will be using InitializeKalman_z10_P10(), - //t-1 >= 0:T-1: z_{t|t-1} and P_{t|t-1} are updated up to t-1. - int dtm1_track; //t-1 = -1: no etdata_dc->C[0] or Dtdata_d4->F[0] has been computed yet. - //t-1 >= 0:T-1: etdata_dc->C[t-1] and Dtdata_d4->F[t-1] are updated up to t-1. - - TSdmatrix *yt_dm; //ny-by-T. - TSdmatrix *at_dm; //ny-by-nst. - TSdcell *Ht_dc; //ny-by-nz-by-nst. - TSdcell *Psiut_dc; //ny-by-nu-by-nst. Measurement error coefficient matrix. - TSdcell *Rt_dc; //ny-by-ny-by-nst. Covariance matrix for the measurement equation. - TSdcell *Gt_dc; //nz-by-ny-by-nst. Cross-covariance. - // - TSdmatrix *bt_dm; //nz-by-nst. - TSdcell *Ft_dc; //nz-by-nz-by-nst. - TSdcell *Psiet_dc; //nz-by-ne-by-nst. Impact matrix in the state equation. - TSdcell *Vt_dc; //nz-by-nz-by-nst. Covariance matrix for the state equation. - // - TSdmatrix *z0_0_dm; //nz-by-nst. z_{0|0}. - TSdmatrix *z0_dm; //nz-by-nst. z_{1|0}. - TSdcell *P0_dc; //nz-by-nz-by-nst. P_{1|0} - - - //=== Output arguments only used for 1st order approximation to zt and Pt depending on infinite past regimes. - TSdcell *zt_tm1_dc; //nz-by-nst-by-(T+1), where z_{1|0} is an initial condition (1st element with t-1=0 or t=1 for base-1) and - // the terminal condition z_{T+1|T} using Updatekalfilms_1stapp(T, ...) is not computed - // when the likelihood logTimetCondLH_kalfilms_1stapp() is computed. Thus, z_{T+1|T} - // has not legal value computed in most applications unless in out-of-sample forecasting problems. - TSdfourth *Pt_tm1_d4; //nz-by-nz-by-nst-by-(T+1), where P_{1|0} is an initial condition (1st element with t-1=0) and - // the terminal condition P_{T+1|T} using Updatekalfilms_1stapp(T, ...) is not computed - // when the likelihood logTimetCondLH_kalfilms_1stapp() is computed. Thus, P_{T+1|T} - // has not legal value computed in most applications unless in out-of-sample forecasting problems. - //+ Will be save for updating likelihood and Kalman filter Updatekalfilms_1stapp(), so save time to recompute these objects again. - TSdfourth *PHtran_tdata_d4; //nz-by-ny-by-nst-T, P_{t|t-1}*H_t'. Saved only for updating Kalman filter Updatekalfilms_1stapp(). - TSdcell *etdata_dc; //ny-by-nst-by-T (with base-0 T), forecast errors e_t in the likelihood. - TSdcell *yt_tm1_dc; //ny-by-nst-by-T, one-step forecast y_{t|t-1} for t=0 to T-1 (base-0). Incorrect now (Used to back out structural shocks). - TSdfourth *Dtdata_d4; //ny-by-ny-nst-by-T, forecast covariance D_t in the likelihood. Saved for updating Kalman filter Updatekalfilms_1stapp(). - } TSkalfilmsinputs_1stapp; - - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - //~~~ OLD Code: Inputs for filter for Markov-switching DSGE models at any time t. - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - typedef struct TSkalfilmsinputs_tag - { - //Inputs Markov-switching Kalman filter for DSGE models (conditional on all the regimes at time t). - // It computes a sequence of one-step predictions and their covariance matrices, and the log likelihood. - // The function uses a forward recursion algorithm. See also the Matlab function fn_kalfil_tv.m - // - // State space model is defined as follows: - // y(t) = a(t) + H(t)*z(t) + eps(t) (observation or measurement equation) - // z(t) = b(t) + F(t)*z(t) + eta(t) (state or transition equation) - // where a(t), H(t), b(t), and F(t) depend on s_t that follows a Markov-chain process and are taken as given. - // - // Inputs at time t are as follows where nRc is number of regimes for coefficients - // nRv is number of regimes for volatility (shock variances): - // Y_T is a n_y-by-T matrix containing data [y(1), ... , y(T)]. - // a is an n_y-by-nRc matrix of Markov-switching input vectors in the measurement equation. - // H is an n_y-by-n_z-by-nRc 3-D of Markov-switching matrices in the measurement equation. - // R is an n_y-by-n_y-by-nRv 3-D of Markov-switching covariance matrices for the error in the measurement equation. - // G is an n_z-by-n_y-by-nRv 3-D of Markov-switching E(eta_t * eps_t'). - // ------ - // b is an n_z-by-nRc matrix of Markov-switching input vectors in the state equation with b(:,1) as an initial condition. - // F is an n_z-by-n_z-by-nRc 3-D of Markov-switching transition matrices in the state equation with F(:,:,1) as an initial condition. - // V is an n_z-by-n_z-by-nRv 3-D of Markov-switching covariance matrices for the error in the state equation with V(:,:,1) as an initial condition. - // ------ - // indxIndRegimes: 1: coefficient regime and volatility regime are independent; 0: these two regimes are synchronized completely. - // indxIni: 1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - // 0: using the unconditional mean for any given regime at time 0. - // z0 is an n_z-by-nRc*nRv matrix of initial condition when indxIni=1 and indxIndRegimes=1. (Not used if indxIni=0.) - // z0 is an n_z-by-nRv matrix of initial condition when indxIni=1 and indxIndRegimes=0. (Not used if indxIni=0.) - // P0 is an n_z-by-n_z-by-nRc*nRv 3-D of initial condition when indxIni=1 and indxIndRegimes=1. (Not used if indxIni=0.) - // P0 is an n_z-by-n_z-by-nRv 3-D of initial condition when indxIni=1 and indxIndRegimes=0. (Not used if indxIni=0.) - // - // The initial state vector and its covariance matrix are computed under the bounded (stationary) condition: - // z0_0m1 = (I-F(:,:,1))\b(:,1) - // vec(P0_0m1) = (I-kron(F(:,:,1),F(:,:,1)))\vec(V(:,:,1)) - // Note that all eigenvalues of the matrix F(:,:,1) are inside the unit circle when the state-space model is bounded (stationary). - // - // November 2007, written by Tao Zha - // See Hamilton's book ([13.2.13] -- [13.2.22]), Harvey (pp.100-106), and LiuWZ Model I NOTES pp.001-003. - - //=== Input arguments. - int ny; //number of observables. - int nz; //number of state variables. - int nRc; //number of composite regimes (current and past regimes) for coefficients. - int nRstc; //number of coefficient regimes at time t. - int nRv; //number of regimes for volatility (shock variances). - int indxIndRegimes; //1: coefficient regime and volatility regime are independent; 0: these two regimes are synchronized completely. - int T; //sample size. - int indxIni; //1: using the initial condition with zt_tm1(:,1)=z0 and Pt_tm1(:,:,1)=P0; - //0: using the unconditional mean for any given regime at time 0. (Default value) - TSdmatrix *yt_dm; //ny-by-T. - TSdmatrix *at_dm; //ny-by-nRc. - TSdcell *Ht_dc; //ny-by-nz-by-nRc. - TSdcell *Rt_dc; //ny-by-ny-by-nRv. Covariance matrix for the measurement equation. - TSdcell *Gt_dc; //nz-by-ny-by-nRv. Cross-covariance. - // - TSdmatrix *bt_dm; //nz-by-nRc. - TSdcell *Ft_dc; //nz-by-nz-by-nRc. - TSdcell *Vt_dc; //nz-by-nz-by-nRv. Covariance matrix for the state equation. - // - TSdmatrix *z0_dm; //nz-by-nRc*nRv if indxIndRegimes == 1 or nz-by-nRv if indxIndRegimes == 0. - TSdcell *P0_dc; //nz-by-nz-by-nRc*nRv if indxIndRegimes == 1 or nz-by-nz-by-nRv if indxIndRegimes == 0. - - - //=== Output arguments only used for 1st order approximation to zt and Pt depending on infinite past regimes. - TSdcell *zt_tm1_dc; //nz-by-nRc*nRv-by-T if indxIndRegimes==1, nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - TSdfourth *Pt_tm1_d4; //nz-by-nz-by-nRc*nRv-T if indxIndRegimes==1, nz-by-nz-by-nRv-by-T if indxIndRegimes==0 where nRc=nRv. - } TSkalfilmsinputs; - - - - - //--- Functions for univariate random walk kalman filter. - TSkalcvfurw *CreateTSkalcvfurw(TFlearninguni *func, int T, int k, int tv); //, int storeZ, int storeV); - TSkalcvfurw *DestroyTSkalcvfurw(TSkalcvfurw *kalcvfurw_ps); - void kalcvf_urw(TSkalcvfurw *kalcvfurw_ps, void *dummy_ps); - - //--- New Code: Functions for Markov-switching Kalman filter. - struct TSkalfilmsinputs_1stapp_tag *CreateTSkalfilmsinputs_1stapp2(int ny, int nz, int nu, int ne, int nst, int T); - struct TSkalfilmsinputs_1stapp_tag *DestroyTSkalfilmsinputs_1stapp2(struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps); - struct TSkalfilmsinputs_1stapp_tag *CreateTSkalfilmsinputs_1stapp(int ny, int nz, int nst, int T); - struct TSkalfilmsinputs_1stapp_tag *DestroyTSkalfilmsinputs_1stapp(struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps); - int InitializeKalman_z10_P10(struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps, TSdmatrix *z10_dm, TSdcell *P10_dc); - double logTimetCondLH_kalfilms_1stapp(int st, int inpt, struct TSkalfilmsinputs_1stapp_tag *kalfilmsinputs_1stapp_ps, struct TStateModel_tag *smodel_ps); - - - - //--- OLD Code: Functions for general constant Kalman filter. - struct TSkalfiltv_tag *CreateTSkalfiltv(int ny, int nz, int T); - struct TSkalfiltv_tag *DestroyTSkalfiltv(struct TSkalfiltv_tag *kalfiltv_ps); - //Used to test tz_logTimetCondLH_kalfiltv(). (Done April 08). double tz_kalfiltv(struct TSkalfiltv_tag *kalfiltv_ps); - double tz_logTimetCondLH_kalfiltv(int st, int inpt, struct TSkalfiltv_tag *kalfiltv_ps); - - //--- OLD Code: Functions for Markov-switching Kalman filter. - struct TSkalfilmsinputs_tag *CreateTSkalfilmsinputs(int ny, int nz, int nRc, int nRstc, int nRv, int indxIndRegimes, int T); - struct TSkalfilmsinputs_tag *DestroyTSkalfilmsinputs(struct TSkalfilmsinputs_tag *kalfilmsinputs_ps); - double tz_logTimetCondLH_kalfilms_1st_approx(int st, int inpt, struct TSkalfilmsinputs_tag *kalfilmsinputs_ps, struct TStateModel_tag *smodel_ps); - //IMPORTANT NOTE: in the Markov-switching input file datainp_markov*.prn, it MUST be that - // the coefficient regime is the 1st state variable, and - // the volatility regime is the 2nd state variable. -#endif - diff --git a/CFiles/mathlib.c b/CFiles/mathlib.c deleted file mode 100755 index 09a044992097e86cc47b8801116ecc93999b5dd6..0000000000000000000000000000000000000000 --- a/CFiles/mathlib.c +++ /dev/null @@ -1,5550 +0,0 @@ -#include "mathlib.h" - -//======================================================= -// LAPACK routines -- all based on Intel MKL (or IMSL C Math library) -//======================================================= -#if defined (INTELCMATHLIBRARY) -int lurgen(TSdmatrix *lu_dm, TSivector *pivot_dv, TSdmatrix *x_dm) { - // PLU = x_dm from the LU decomposition of the input matrix x_dm where P is a permutation matrix, L is lower triangular with unit - // diagonal elements (lower trapezoidal if nrows>ncols) and U is upper triangular (upper trapezoidal if nrows<ncols). - // L: (1) If nrows <= ncols, nrows-by-nrows . - // (2) If nrows > ncols, nrows-by-ncols (lower trapezoidal). - // U: (1) If nrows <= ncols, nrows-by-ncols (upper trapezoidal). - // (2) If nrows > ncols, ncols-by-ncols. - // - //Outputs: - // lu_dm: Stack L and U in this nrows-by-ncols matrix where the unit diagonal elements of L are not stored. - // pivot_dv: Optional. An min(nrows, ncols) vector of index integers such that row i was interchanged with row pivot_dv->v[i]. - // When NULL, this output argument is not exported (but computed anyway by the MKL hard-coded function). - //Inputs: - // x_dm: nrows-by-ncols general real matrix. - - int nrows, ncols, mindim, - errflag=2; //errflag=0 implies a successful execution. But we start with 2 so as to let dgetrf export a correct flag. - int *pivot_p=NULL; - double *LU; - - //=== Checking dimensions and memory allocation. - if ( !lu_dm || !x_dm ) fn_DisplayError(".../mathlib.c/lurgen(): The input arguments lu_dm and x_dm must be cretaed (memory-allocated)"); - else if ( ( (nrows=x_dm->nrows) != lu_dm->nrows) || ( (ncols=x_dm->ncols) != lu_dm->ncols) ) - fn_DisplayError(".../mathlib.c/lurgen(): Make sure the dimensions of the input matricies lu_dm and x_dm are the same"); - - if ( !(x_dm->flag & M_GE) ) - { - if (x_dm->flag & M_SU) SUtoGE(x_dm); - else if (x_dm->flag & M_SL) SLtoGE(x_dm); - else fn_DisplayError(".../mathlib.c/lurgen(): Haven't got time to make M_UT, M_LT, and other to a general matrix M_GE"); - } - //else if ( !(x_dm->flag & M_GE) ) fn_DisplayError(".../mathlib.c/lurgen(): The input arguments x_dm must be a general real matrix with the flag M_GE"); - - - mindim = _min(nrows, ncols); - memcpy((LU=lu_dm->M), x_dm->M, nrows*ncols*sizeof(double)); - lu_dm->flag = M_UT; //To make the lower part of lu_dm available, one must create another matrix and explicitly make it a unit lower matrix. - - //=== Calling the MKL function. - if (!pivot_dv) { - pivot_p = tzMalloc(mindim, int); - dgetrf(&nrows, &ncols, LU, &nrows, pivot_p, &errflag); - free(pivot_p); //Frees the memory belonging to this function. - } - else { - if ( pivot_dv->n != mindim) fn_DisplayError("Make sure the dimension of the input vector pivot_dv is the minimum number of row number and column number of the input matrix x_dm"); - dgetrf(&nrows, &ncols, LU, &nrows, pivot_dv->v, &errflag); - } - - - return( errflag ); //(1) If errflag = 0, success. (2) If errorflag = -i, the ith parameter has an illegal value. - //(3) If errflag = i, u_{ii}=0.0. The factorization is completed, but U is exactly singular. Dividing - // by 0.0 will occur if you use the factor U for solving a system of linear equations. -} -#else -//No default routine yet. -#endif - - -#if defined (INTELCMATHLIBRARY) -int eigrsym(TSdvector *eval_dv, TSdmatrix *eVec_dm, const TSdmatrix *S_dm) -{ - // Outputs (dependent on Intel MKL): - // eval_dv: _n-by-1 eigenvalues in ascending order; - // eVec_dm: _n-by-_n eigenvalues -- if (eVec_m==NULL), no eigenvectors are computed; otherwise, S_dm = eVec_dm*diag(eval_dv)*inv(eVec_dm). - // errflag: error flag. - //------------ - // Inputs: - // S_dm: _n-by_n real symmetric matrix. - // - // Eigenanalysis of real symmetric square matrix with all eigenvalues and, optionally, eigenvectors. - // Experts' opinion: do NOT use Cuppen's divide-and-conquer algorithm; instead, use QR algorithm, which I guess this algorithm uses. - - int n1, _n, errflag=2, //errflat=0 implies successful decomposition. But we start with 2 so as to let dsyev export a correct flag. - lwork; - double *tmpd0_m = NULL, - *work_p = NULL; - - if ( !S_dm || !(S_dm->flag & (M_SU | M_SL)) ) fn_DisplayError(".../mathlib.c/eigrsym(): input matrix (1) must be created (memory-alloacted) and (2) must be symmetric (either M_SU or M_SL)"); - if ( !eval_dv ) fn_DisplayError(".../mathlib.c/eigrsym(): input eigenvalue vector must be created (memory-allocated)"); - lwork = (n1=_n=S_dm->nrows)*BLOCKSIZE_FOR_INTEL_MKL; - - - //=== Memory allocated for this function. - tmpd0_m = tzMalloc(square(_n), double), - work_p = tzMalloc(lwork, double); - - - //--------------------------- - // Obtains eigenvalues and, optionally, eigenvectors. - //--------------------------- - memcpy(tmpd0_m, S_dm->M, square(_n)*sizeof(double)); - dsyev( (eVec_dm) ? "V" : "N", (S_dm->flag & M_SU) ? "U" : "L", &n1, tmpd0_m, &n1, eval_dv->v, work_p, &lwork, &errflag); - if (work_p[0]>lwork) printf("Warning for /mathlib.c/eigrsym(): needs at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work_p[0], lwork); - eval_dv->flag = V_DEF; - if (eVec_dm) { - memcpy(eVec_dm->M, tmpd0_m, square(_n)*sizeof(double)); - eVec_dm->flag = M_GE; - } - - - //--------------------------- - // Frees the allocated memory. - //--------------------------- - tzDestroy(tmpd0_m); - tzDestroy(work_p); - - //if (errflag<0) fn_DisplayError("/Subfolder: Calling eigrsym_decomp -- some element in input matrix has an illegal value"); - //else if (errflag>0) fn_DisplayError("/Subfolder: Calling eigrsym_decomp -- the factor U is exactly singular, so the solution cannot be computed"); - return (errflag); -} -#else -//Not default routine yet. -#endif - - - -#if defined (INTELCMATHLIBRARY) -int eigrgen(TSdzvector *vals_dzv, TSdzmatrix *rights_dzm, TSdzmatrix *lefts_dzm, const TSdmatrix *x_dm) -{ - //--- Eigenanalysis of real general (non-symmetric) square matrix with all eigenvalues and, optionally, eigenvectors. --- - // - //Outputs (dependent on Intel MKL): - // vals_dzv->real->v: _n-by-1 real parts of eigenvalues; - // vals_dzv->imag->v: _n-by-1 imaginary parts of eigenvalues -- must be *initialized to zero* in this function; - // rights_dzm->real->M: if (rights_dzm==NULL), no right eigenvectors are computed; otherwise, _n-by-_n corresponding *real* parts of right eigenvectors column by column: A*v(j)=lambda(j)*v(j); - // if (rights_dzm!=NULL), lefts_dzm->Mi must be *initialized to zero* in this function to get _n-by-_n *imaginary* parts of left eigenvectors corresponding to vals_dzv. - // lefts_dzm->imag->M: if (lefts_dzm==NULL), no left eigenvectors are computed; otherwise, n-by-n corresponding *real* parts of left eigenvectors column by column: u(j)^H*A=lambda(j)*u(j)^H, where H means conjugate transpose; - // if (lefts_dzm!=NULL), lefts_dzm->Mi must be *initialized to zero* in this function to get _n-by-_n *imaginary* parts of right eigenvectors corresponding to vals_dzv. - // returned errflag: error flag. If errflag<0, some element in input matrix has an illegal value. - // If errflag>0, the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed. - // if errflag=0, we have a successful decomposition. - //------------ - // Inputs: - // x_dm: _n-by_n real general (non-symmetric) matrix. - - int errflag=2, //errflag=0 implies successful decomposition. But we start with 2 so as to let dgeev export a correct flag. - _n, lwork, n1, _i, _j; - double *tmpd0_m=NULL, - *work_p=NULL, - *x_m=NULL, - *evalr_v=NULL, - *evali_v=NULL, - *revecr_m=NULL, *reveci_m=NULL, //NULL means that by default we dont' compute eigenvectors. - *levecr_m=NULL, *leveci_m=NULL; - - //--------------------------- - // Checking dimensions, etc. - //--------------------------- - if ( !x_dm || !vals_dzv ) - fn_DisplayError(".../mathlib.c/eigrgen(): Input square matrix x_dm and eigen value vectors vals_dzv must be created (memory allocated) before the call to this function"); - else { - _n = x_dm->nrows; - lwork = _n*BLOCKSIZE_FOR_INTEL_MKL; - n1 = _n; - tmpd0_m = tzMalloc(square(_n), double), //@@Must be freed in this function.@@ - work_p = tzMalloc(lwork, double), //@@Must be freed in this function.@@ - InitializeConstantVector_lf(vals_dzv->imag, 0.0); //Imaginary part must be initialized to 0.0 to testing purposes later on. - // - x_m = x_dm->M; - evalr_v = vals_dzv->real->v; - evali_v = vals_dzv->imag->v; - } - if ( _n!=vals_dzv->real->n || _n!=x_dm->ncols ) fn_DisplayError(".../mathlib.c/eigrgen(): (1)input real matrix x_dm must be square; (2) the length of vals_dzv must match the dimension of x_dm"); - if (rights_dzm) { - if ( _n!=rights_dzm->real->nrows || _n!=rights_dzm->real->ncols ) fn_DisplayError(".../mathlib.c/eigrgen(): rights_dzm must have the same dimension as the input square matrix"); - revecr_m = rights_dzm->real->M; // (rights_dzm) ? rights_dzm->real->M : NULL, - rights_dzm->real->flag = M_GE; - InitializeConstantMatrix_lf(rights_dzm->imag, 0.0); - reveci_m = rights_dzm->imag->M; - } - if (lefts_dzm) { - if ( _n!=lefts_dzm->real->nrows || _n!=lefts_dzm->real->ncols ) fn_DisplayError(".../mathlib.c/eigrgen(): lefts_dzm must have the same dimension as the input square matrix"); - levecr_m = lefts_dzm->real->M; // (lefts_dzm) ? lefts_dzm->real->M : NULL, - lefts_dzm->real->flag = M_GE; - InitializeConstantMatrix_lf(lefts_dzm->imag, 0.0); - leveci_m = lefts_dzm->imag->M; - } - - - - //--------------------------- - // Starts with x_m -- the matrix to be decomposed. - //--------------------------- - memcpy(tmpd0_m, x_m, square(_n)*sizeof(double)); - - //--------------------------- - // Obtains eigenvalues and, optionally, eigenvectors. - //--------------------------- - dgeev( (levecr_m) ? "V" : "N", (revecr_m) ? "V" : "N", &n1, tmpd0_m, &n1, evalr_v, evali_v, - levecr_m, &n1, revecr_m, &n1, work_p, &lwork, &errflag); - vals_dzv->real->flag = V_DEF; - - //--------------------------- - // Frees the allocated memory. - //--------------------------- - if (work_p[0]>lwork) printf("Warning for /mathlib.c/eigrgen(): needs at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work_p[0], lwork); - tzDestroy(work_p); - tzDestroy(tmpd0_m); - - //--------------------------- - // Checks error conditions. - // Exports final results. - //--------------------------- - if (errflag) return( errflag ); - else { - if (revecr_m) { //Tested against Matlab output. Works! 10/13/02. - for (_j=0; _j<_n-1; _j++) - if (evali_v[_j] && (evali_v[_j] == -evali_v[_j+1])) - for (_i=0; _i<_n; _i++) { - reveci_m[_i+(_j+1)*_n] = -(reveci_m[_i+_j*_n]=revecr_m[_i+(_j+1)*_n]); - revecr_m[_i+(_j+1)*_n] = revecr_m[_i+_j*_n]; - } - } - if (levecr_m) { //!!WARNINGS!!: Hasn't tested against any other established program, but it seems working. 10/13/02. - for (_j=0; _j<_n-1; _j++) - if (evali_v[_j] && (evali_v[_j] == -evali_v[_j+1])) - for (_i=0; _i<_n; _i++) { - leveci_m[_i+(_j+1)*_n] = -(leveci_m[_i+_j*_n]=levecr_m[_i+(_j+1)*_n]); - levecr_m[_i+(_j+1)*_n] = levecr_m[_i+_j*_n]; - } - } - return( errflag ); - } -} -#else -//Not default routine yet. -#endif - -#if defined (INTELCMATHLIBRARY) -int chol(TSdmatrix *D_dm, TSdmatrix *S_dm, const char ul) { - //?????????? Some of options are NOT tested yet. - // Choleski decomposition of a symmetric, positive definite matrix S. Intel MKL Lapack dependent code. - // The fastest way for chol() is to let D = S, but D will be replaced by the Choleski factor. - // - //Outputs: - // D: _n-by_n -- if ul=='U' or 'u', D'*D = S where D is stored only in the upper triangular part; - // if ul=='L' or 'l', D*D' = S where D is stored only in the lower triangular part. - // If D_dm->M == S_dm->M, D_dm->M (and S_dm->M) will be replaced by the triangular Choleski factor after the call to this function. - // errflag: error flag: 0: successful; - // -6: not symmetric (see mklman.pdf for other error return codes on ?potrf(). - //-------- - //Inputs: - // S: _n-by-_n symmetric, positive definite matrix (whose only triangular part is used by dpotrf). - // ul: if =='U' or 'u', D (NOT necessarily S unless D == S) is upper triangular; if =='L' or 'l', D (NOT necessarily S unless D == S) is lower triangular. - - int errflag=2, loc, nrows, _m, _i, _j; //errflat=0 implies successful decomposition. But we start with 2 so as to let dpotrf export a correct flag. - double *D, *S; - - - if ( !D_dm || !S_dm ) fn_DisplayError(".../mathlib.c/chol(): L and R input square matricies must be created (memory allocated)"); - else { - nrows = S_dm->nrows; - _m = nrows; //Used by Lapack. - D = D_dm->M; - S = S_dm->M; - } - if ( (nrows != D_dm->ncols) || (nrows != S_dm->nrows) || (nrows != S_dm->ncols) ) fn_DisplayError(".../mathlib.c/chol(): Make sure both R and L input matricies are square and have the same dimension"); - - - //=== Fills the triangular part that is used for Choleski decomposition. - if ( D != S) { - switch (ul) { - case 'U': case 'u': - if (S_dm->flag & M_SU) { - for (_j=0; _j<nrows; _j++) - for (_i=0; _i<=_j; _i++) { - loc=mos(_i,_j,nrows); - D[loc] = S[loc]; - } - D_dm->flag = M_UT; - } - else if (S_dm->flag & M_SL) { - for (_j=0; _j<nrows; _j++) - for (_i=0; _i<=_j; _i++) - D[mos(_i,_j,nrows)] = S[mos(_j,_i,nrows)]; - D_dm->flag = M_UT; - } - else - { - //fn_DisplayError(".../mathlib.c/chol(): R input square matrix must be symmetric (and positive definite)"); - printf("\n ------- .../mathlib.c/chol(): R input square matrix must be symmetric!-------\n"); - return (-6); - } - dpotrf("U", &_m, D, &_m, &errflag); - break; - case 'L': case 'l': - if (S_dm->flag & M_SL) { - for (_j=0; _j<nrows; _j++) { - //for (_i=0; _i<_j; _i++) D[_i+_j*nrows] = 0.0; //Initializes the other part of D to zero so as to make it visible and readable. - for (_i=_j; _i<nrows; _i++) { - loc=mos(_i,_j,nrows); - D[loc] = S[loc]; - } - } - D_dm->flag = M_LT; - } - else if (S_dm->flag & M_SU) { - //????????????? NOT teste yet for this option. - for (_j=0; _j<nrows; _j++) - for (_i=_j; _i<nrows; _i++) - D[mos(_i,_j,nrows)] = S[mos(_j,_i,nrows)]; - D_dm->flag = M_LT; - } - else - { - //fn_DisplayError(".../mathlib.c/chol(): R input square matrix must be symmetric (and positive definite)"); - printf("\n ------- .../mathlib.c/chol(): R input square matrix must be symmetric!-------\n"); - return (-6); - } - //??????NOT tested yet. - dpotrf("L", &_m, D, &_m, &errflag); - break; - default: - fn_DisplayError(".../mathlib.c/chol(): Input ul must be either 'U' or 'L'"); - } - } - else { - if ( (ul=='U' || ul=='u') && (D_dm->flag & M_SU) ) { - dpotrf("U", &_m, D, &_m, &errflag); - D_dm->flag = M_UT; - } - else if ( (ul=='L' || ul=='l') && (D_dm->flag & M_SL) ) { - //Tested. It works! - dpotrf("L", &_m, D, &_m, &errflag); - D_dm->flag = M_LT; - } - else { - printf("\nFatal Error: The input ul is %c and the flag D_dm->flag is %d", ul, D_dm->flag); - fn_DisplayError(".../mathlib.c/chol(): When D==S, upper or lower triangular output must be consistent with upper or lower symmetric input; otherwise, use the option with D != S"); - } - } - //=== Choleski decomposition. - // dpotrf(((ul=='u') || (ul=='U')) ? "U" : "L", &_m, D, &_m, &errflag); - //--- - // if (errflag<0) fn_DisplayError("Some element has an illegal value"); - // else if (errflag>0) fn_DisplayError("The leadding minor of some order, hence the entire matrix, is not positive definite"); - return (errflag); -} -#else -//No default routine yet. -#endif - - -#if defined (INTELCMATHLIBRARY) -int invrtri(TSdmatrix *X_dm, TSdmatrix *A_dm, const char un) -{ - //Inverse of a real triangular matrix A. - //The fastest way is to let X=A and A (and X) will be replaced by inv(A). - // - //Outputs: - // X: _n-by_n inverse of A; - // errflag: error flag (=0 means successful). - //-------- - //Inputs: - // A: _n-by-_n real triangular matrix. - // un: if un=='U' or 'u', A is unit triangular; otherwise (un=='N' or 'n', A is not a unit triangular matrix. - - int _n, errflag=2; //errflat=0 implies successful decomposition. But we start with 2 so as to let dgetri export a correct flag. - double *X, *A; - - - if ( !X_dm || !A_dm ) fn_DisplayError(".../mathlib.c/invrtri(): Both input matrices must be created (memory-allocated)"); - else if ( !(A_dm->flag & (M_UT | M_LT)) ) fn_DisplayError(".../mathlib.c/invrtri(): (1) R input matrix A must be given legal values; (2) A must be a real triangular matrix, i.e., M_UT or M_LT"); - else { - X = X_dm->M; - A = A_dm->M; - _n=A_dm->nrows; - } - if ( (_n != A_dm->ncols) || (_n != X_dm->nrows) || (_n != X_dm->ncols) ) - fn_DisplayError(".../mathlib.c/invrtri(): both input and output matrices (1) must be square and (2) must have the same dimension"); - - - if (X==A) { - dtrtri((A_dm->flag & M_UT) ? "U" : "L", (un=='U' || un=='u') ? "U" : "N", &_n, X, &_n, &errflag); - if (errflag) return (errflag); - } - else { - memcpy(X, A, _n*_n*sizeof(double)); - dtrtri((A_dm->flag & M_UT) ? "U" : "L", (un=='U' || un=='u') ? "U" : "N", &_n, X, &_n, &errflag); - if (errflag) return (errflag); - else X_dm->flag = A_dm->flag; - } - - return errflag; //(1) If errflag = 0, success. (2) If errorflag = -i, the ith parameter has an illegal value. - //(3) If errflag = i, the ith diagonal element of A is zero, A is singular, and the inversion - // could not be completed. -} -#else -//No default routine yet. -#endif - - -#if defined (INTELCMATHLIBRARY) -int invspd(TSdmatrix *X_dm, TSdmatrix *A_dm, const char ul) -{ - //Inverse of a symmetric positive matrix A. - //Fastest way: let X=A. Then, A (and X) will be replaced by inv(A). - // - //Outputs: - // X: _n-by_n inverse of A; - // errflag: error flag (=0 means successful). - //-------- - //Inputs: - // A: _n-by-_n symmetric positive matrix. - // ul: if ul=='U' or 'u', only upper part of A is used; otherwise (un=='L' or 'l', only lower part of A is used. - - int _n, errflag=2; //errflat=0 implies successful decomposition. But we start with 2 so as to let dgetri export a correct flag. - double *X, *A; - - - if ( !X_dm || !A_dm ) fn_DisplayError(".../mathlib.c/invspd(): Both input matrices must be created (memory-allocated)"); - else if ( !(A_dm->flag & (M_SU | M_SL)) ) fn_DisplayError(".../mathlib.c/invspd(): (1) R input matrix A must be given legal values; (2) A must be symmetric, positive-definite, i.e., M_SU or M_SL"); - else { - X = X_dm->M; - A = A_dm->M; - _n=A_dm->nrows; - } - - - if (X==A) { - if ( (_n != A_dm->ncols) ) - fn_DisplayError(".../mathlib.c/invspd(): input matrix (1) must be square and (2) must have the same dimension"); - //=== Choleski decomposition. - dpotrf(((ul=='U') || (ul=='u')) ? "U" : "L", &_n, X, &_n, &errflag); - if (errflag) return (errflag); - //=== Takes inverse. - dpotri(((ul=='U') || (ul=='u')) ? "U" : "L", &_n, X, &_n, &errflag); - A_dm->flag = ((ul=='U') || (ul=='u')) ? M_SU : M_SL; - return (errflag); - //--- - // if (errflag<0) fn_DisplayError("Some element has an illegal value"); - // else if (errflag>0) fn_DisplayError("Not symmetric positive definite or matrix inversion cannot be computed"); - } - else { - if ( (_n != A_dm->ncols) || (_n != X_dm->nrows) || (_n != X_dm->ncols) ) - fn_DisplayError(".../mathlib.c/invspd(): both input and output matrices (1) must be square and (2) must have the same dimension"); - memcpy(X, A, _n*_n*sizeof(double)); - //=== Choleski decomposition. - dpotrf(((ul=='U') || (ul=='u')) ? "U" : "L", &_n, X, &_n, &errflag); - if (errflag) return (errflag); - //=== Takes inverse. - dpotri(((ul=='U') || (ul=='u')) ? "U" : "L", &_n, X, &_n, &errflag); - X_dm->flag = ((ul=='U') || (ul=='u')) ? M_SU : M_SL; - return (errflag); - //--- - // if (errflag<0) fn_DisplayError("Some element has an illegal value"); - // else if (errflag>0) fn_DisplayError("Not symmetric positive definite or matrix inversion cannot be computed"); - } -} -#else -//No default routine yet. -#endif - - - -#if defined (INTELCMATHLIBRARY) -int invrgen(TSdmatrix *X_dm, TSdmatrix *A_dm) -{ - //Inverse of a general real matrix A. - //If X=A, A (and X) will be replaced by inv(A). - // - //Outputs: - // X: _n-by_n inverse of A; - // errflag: error flag (=0 means successful). - //-------- - //Inputs: - // A: _n-by-_n real general matrix. - int _n, errflag=2, //errflat=0 implies successful decomposition. But we start with 2 so as to let dgetri export a correct flag. - lwork, *ipivot; //Used when calling LAPACK. - double *X, *A, - *work; //Used when calling LAPACK. - - - if ( !X_dm || !A_dm ) fn_DisplayError(".../mathlib.c/invrgen(): Both input matrices must be created (memory-allocated)"); - else if ( !(A_dm->flag & M_GE) ) fn_DisplayError(".../mathlib.c/invrgen(): (1) R input matrix A must be given legal values; (2) A must be a general matrix, i.e., M_GE"); - else { - X = X_dm->M; - A = A_dm->M; - ipivot = tzMalloc((_n=A_dm->nrows), int); - work = tzMalloc((lwork=_n*BLOCKSIZE_FOR_INTEL_MKL), double); - } - if ( (_n != A_dm->ncols) || (_n != X_dm->nrows) || (_n != X_dm->ncols) ) - fn_DisplayError(".../mathlib.c/invrgen(): both input and output matrices (1) must be square and (2) have the same dimension"); - - - if (X==A) { - dgetrf(&_n, &_n, A, &_n, ipivot, &errflag); - if (errflag) { -// A_dm->flag = M_UNDEF; - free(ipivot); - free(work); - return errflag; - } - dgetri(&_n, A, &_n, ipivot, work, &lwork, &errflag); - if (work[0]>lwork) printf("Warning for /mathlib.c/invrgen(); when calling MKL dgetri(), we need at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work[0], lwork); - if (errflag) { - free(ipivot); - free(work); - return (errflag); //A_dm->flag = M_UNDEF; - } - } - else { - memcpy(X, A, _n*_n*sizeof(double)); - dgetrf(&_n, &_n, X, &_n, ipivot, &errflag); - if (errflag) { -// X_dm->flag = M_UNDEF; - free(ipivot); - free(work); - return errflag; - } - dgetri(&_n, X, &_n, ipivot, work, &lwork, &errflag); - if (work[0]>lwork) printf("Warning for /mathlib.c/invrgen(); when calling MKL dgetri(), we need at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work[0], lwork); - if (errflag) { - free(ipivot); - free(work); - return (errflag); //X_dm->flag = M_UNDEF; - } - else X_dm->flag = A_dm->flag; - } - //=== Frees memory allocated in this function. - free(ipivot); - free(work); - - return errflag; //(1) If errflag = 0, success. (2) If errorflag = -i, the ith parameter has an illegal value. - //(3) If errflag = i, U_{ii}=0.0. The LU factorization U is literally singular and the inversion - // could not be completed. -} -#else -//No default routine yet. -#endif - - - -#if defined (INTELCMATHLIBRARY) -int BdivA_rrect(TSdmatrix *X_dm, const TSdmatrix *B_dm, const char lr, const TSdmatrix *A_dm) -{ - //This routine solves left division (\) problme AX=B (X=A\B). For XA=B (right division problem: X=B/A), we first transpose - // it to A'*X'=B', then solve out X' = A'\B' as a left-division problem, and finally transpose X' back to X. - //It handles cases with _m>=_n. For _n>_m, we have an infinite solution. To get one solution, take the _m-by-_m nonsigular - // part of A_dm and get the solution for the _m-by-_r part of X with \ or the _r-by-_m part of X with /. The (_n-_m)-by-_r part - // or _r-by-(_n-_m) part of X can simply be filled with 0.0. - // - //Outputs: - // X = A\B or B/A where X is _n-by_r if \ (AX=B) or _r-by-_n if / (XA=B). - // Returns info (if info==0, the execution is successful; if info == -i, the ith parameter has an illegal value.) - //-------- - //Inputs: - // A: _m-by-_n real rectangular (rrect) matrix if \ (AX=B) or - // _n-by-_m real rectangular (rrect) matrix if / (XA=B). - // B: _m-by-_r real rectangular (rrect) matrix if \ (AX=B) or - // _r-by-_m real rectangular (rrect) matrix if / (XA=B). - // lr: if lr='\\', left division \ is performed; if lr='/', right division / is performed. - - int _m, _n, _r, //mn_max, mn_min, - lwork, _i, info = -2, - *jpvt_p = NULL; - double *A, *B, *X, - *qra_p = NULL, //QR decomposion for A_dm. - *qrb_p = NULL, //QR decomposion for B_dm. - *tau_p = NULL, - *work_p = NULL; - - if (!A_dm || !(A_dm->flag & M_GE) || !B_dm || !(B_dm->flag &M_GE)) fn_DisplayError(".../mathlib.c/BdivA_rrect(): both input matricies A_dm and B_dm must be (a) created (allocated memory) and (b) given legal values for all elements (in other words, the flag M_GE must exist)"); - if (!X_dm) fn_DisplayError(".../mathlib.c/BdivA_rrect(): output matrix X_dm must be created (allocated memory)"); - if (lr=='/') { - if ( (_n=A_dm->nrows) != X_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rrect(): 1st dim of A_dm and 2nd dim of X_dm must exactly match for / (right division)"); - if ( (_m=A_dm->ncols) != B_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rrect(): 2nd dim of A_dm and 2nd dim of B_dm must exactly match for / (right division)"); - if ( (_r=B_dm->nrows) != X_dm->nrows ) fn_DisplayError(".../mathlib.c/BdivA_rrect(): 1st dim of B_dm and 1st dim of X_dm must exactly match for / (right division)"); - if ( _m < _n) fn_DisplayError(".../mathlib.c/BdivA_rrect(): A_dm->nrows must be <= A_dm->ncols for / (right division). Otherwise, take the nonsigular square part of A_dm and use BdivA_rrect()"); - } - else if (lr=='\\') { - if ( (_m=A_dm->nrows) != B_dm->nrows ) fn_DisplayError(".../mathlib.c/BdivA_rrect(): 1st dim of A_dm and 1st dim of B_dm must exactly match for \\ (left division)"); - if ( (_n=A_dm->ncols) != X_dm->nrows ) fn_DisplayError(".../mathlib.c/BdivA_rrect(): 2nd dim of A_dm and 1st dim of X_dm must exactly match for \\ (left division)"); - if ( (_r=B_dm->ncols) != X_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rrect(): 2nd dim of B_dm and 2nd dim of X_dm must exactly match for \\ (left division)"); - if ( _m < _n) fn_DisplayError(".../mathlib.c/BdivA_rrect(): A_dm->nrows must be >= A_dm->ncols for \\ (left division). Otherwise, take the nonsigular square part of A_dm and use BdivA_rrect()"); - } - else fn_DisplayError(".../mathlib.c/BdivA_rrect(): input character lr must be / (right division) or \\\\ (left division)"); - A = A_dm->M; - B = B_dm->M; - X = X_dm->M; - - -// lwork = ((mn_max = _m>_n ? _m : _n)>_r ? nm_max : _r)*BLOCKSIZE_FOR_INTEL_MKL; -// mn_min = _m<_n ? _m : _n; - - - //=== Memory allocation for this function only. - qra_p = tzMalloc(_m*_n, double); -// qrb_p = tzMalloc((mn_max = _m>_n?_m:_n)*_r, double); //DDDDebug: seems requiring _m>_n, but this may not be the case. - qrb_p = tzMalloc(_m*_r, double); //Note that _m>=_n. - jpvt_p = tzMalloc(_n, int); - tau_p = tzMalloc(_n, double); -// work_p = tzMalloc(lwork, double); - - - //=== Making copies of input matrices A and B */ - if (lr=='/') //Right division. In this case, qra_p is _m-by-_n (transpose of A_dm), and qrb_p is max(_m,_n)-by-_r (transpose of B_dm). - for (_i=0; _i<_m; _i++) { - cblas_dcopy(_n, &A[_i*_n], 1, &qra_p[_i], _m); - cblas_dcopy(_r, &B[_i*_r], 1, &qrb_p[_i], _m); - } - else { - memcpy(qra_p, A, _m*_n*sizeof(double)); //qra_p is _m-by-_n. - memcpy(qrb_p, B, _m*_r*sizeof(double)); //qrb_p is _m-by-_r. -// for (_i=0; _i<_r; _i++) cblas_dcopy(_m, B+_i*_m, 1, qrb_p+_i*mn_max, 1); //qrb_p is max(_m,_n)-by-_r. - } - - - //=== Computes the QR factorization of a general m by n matrix with column pivoting using Level 3 BLAS. - work_p = tzMalloc(lwork=_n*BLOCKSIZE_FOR_INTEL_MKL, double); - dgeqp3(&_m,&_n,qra_p,&_m,jpvt_p,tau_p,work_p,&lwork,&info); - if (work_p[0]>lwork) printf("Warning for /mathlib.c/BdivA_rrect(); when calling MKL dgeqp3(), we need at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work_p[0], lwork); - tzDestroy(work_p); - if (info) return (info); //If info==0, the execution is successful; if info == -i, the ith parameter has an illegal value. - - //=== Multiplies a real matrix by the orthogonal matrix Q of the QR factorization formed by dgeqp3. - work_p = tzMalloc(lwork=_r*BLOCKSIZE_FOR_INTEL_MKL, double); - dormqr("L","T",&_m,&_r,&_n,qra_p,&_m,tau_p,qrb_p,&_m,work_p,&lwork,&info); - if (work_p[0]>lwork) printf("Warning for /mathlib.c/BdivA_rrect(); when calling MKL dormqr(), we need at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work_p[0], lwork); - //dormqr("L","T",&_m,&_r,&mn_min,qra_p,&_m,tau_p,qrb_p,&mn_max,work_p,&lwork,&info); - tzDestroy(work_p) - if (info) return (info); //If info==0, the execution is successful; if info == -i, the ith parameter has an illegal value. - - - //=== Solves a matrix equation R*x = C (one matrix operand is triangular). Note that the dim of X is n-by-r for \ or r-by-n for / - cblas_dtrsm(CblasColMajor,CblasLeft,CblasUpper,CblasNoTrans,CblasNonUnit,_n,_r,1.0,qra_p,_m,qrb_p,_m); - if (lr=='/') //Right division. In this case, qra_p is _m-by-_n (transpose of A_dm), and qrb_p is max(_m, _n)-by-_r (transpose of B_dm). - for (_i=0; _i<_n; _i++) cblas_dcopy(_r, &qrb_p[_i], _m, &X[(jpvt_p[_i]-1)*_r], 1); //Copying the transpose of the _n-by-_r leading part of qrb_p. -// cblas_dcopy(_r, &qrb_p[_i], mn_max, &X[(jpvt_p[_i]-1)*_r], 1); //Copying the transpose of the _n-by-_r leading part of qrb_p. - - else //qrb_p is max(_m, _n)-by-_r. - for (_i=0; _i<_n; _i++) cblas_dcopy(_r, &qrb_p[_i], _m, &X[jpvt_p[_i]-1], _n); -// cblas_dcopy(_r, &qrb_p[_i], mn_max, &X[jpvt_p[_i]-1], _n); - X_dm->flag = M_GE; - - //=== Destroyes memory allocated for this function only. - tzDestroy(qra_p); - tzDestroy(qrb_p); - tzDestroy(jpvt_p); - tzDestroy(tau_p); -// tzDestroy(work_p); - - return (0); -} -#else -//No default routine yet. 7 Oct 2003 -#endif - - - - -#if defined (INTELCMATHLIBRARY) -int BdivA_rgens(TSdmatrix *X_dm, const TSdmatrix *B_dm, const char lr, const TSdmatrix *A_dm) -{ - //Unlike BdivA_rrect(), this routine deals with only the general square matrix A_dm. It solves left division (\) problme - // AX=B (X=A\B). For XA=B (right division problem: X=B/A), we first transpose it to A'*X'=B', then solve out X' = A'\B' - // as a left-division problem, and finally transpose X' back to X. - // - //Outputs: - // X = A\B or B/A where X is _m-by_r if \ (AX=B) or _r-by-_m if / (XA=B). - // Returns info (if info==0, the execution is successful; if info == -i, the ith parameter has an illegal value.) - //-------- - //Inputs: - // A: _m-by-_m real general square (rgens) matrix. - // B: _m-by-_r real general square (rgens) matrix if \ (AX=B) or - // _r-by-_m real general square (rgens) matrix if / (XA=B). - // lr: if lr='\\', left division \ is performed; if lr='/', right division / is performed. - - int _m, _r, m2, - _i, info = -2, - *ipiv_p = NULL; - double *A, *B, *X, - *Atran_p = NULL, //Transpose of A if right division / takes place. - *Btran_p = NULL, //Transpose of B if right division / takes place. - *W = NULL; //Duplicate copy of A when left division \ is used. This will be replaced by LU decomposition. -// *tau_p = NULL, -// *work_p = NULL; - - if (!A_dm || !(A_dm->flag & M_GE) || !B_dm || !(B_dm->flag & M_GE)) fn_DisplayError(".../mathlib.c/BdivA_rgens(): both input matricies A_dm and B_dm must be (a) created (allocated memory) and (b) given legal values for all elements (in other words, the flag M_GE must exist)"); - if (!X_dm) fn_DisplayError(".../mathlib.c/BdivA_rgens(): output matrix X_dm must be created (allocated memory)"); - if (lr=='/') { - if ( (_m=A_dm->nrows) != X_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): 1st dim of A_dm and 2nd dim of X_dm must exactly match for / (right division)"); - if ( _m != A_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): input matrix A_dm must be square. For a nonsqaure matrix, use BdivA_rrect()"); - if ( _m != B_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): 2nd dim of A_dm and 2nd dim of B_dm must exactly match for / (right division)"); - if ( (_r=B_dm->nrows) != X_dm->nrows ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): 1st dim of B_dm and 1st dim of X_dm must exactly match for / (right division)"); - - } - else if (lr=='\\') { - if ( (_m=A_dm->nrows) != B_dm->nrows ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): 1st dim of A_dm and 1st dim of B_dm must exactly match for \\ (left division)"); - if ( _m != A_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): input matrix A_dm must be square. For a nonsqaure matrix, use BdivA_rrect()"); - if ( _m != X_dm->nrows ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): 2nd dim of A_dm and 1st dim of X_dm must exactly match for \\ (left division)"); - if ( (_r=B_dm->ncols) != X_dm->ncols ) fn_DisplayError(".../mathlib.c/BdivA_rgens(): 2nd dim of B_dm and 2nd dim of X_dm must exactly match for \\ (left division)"); - } - else fn_DisplayError(".../mathlib.c/BdivA_rgens(): input character lr must be / (right division) or \\\\ (left division)"); - A = A_dm->M; - B = B_dm->M; - X = X_dm->M; - - - - if (lr=='/') { - //Right divistion /. - //=== Memory allocation for this function only. - ipiv_p = tzMalloc(_m, int); - Atran_p = tzMalloc(square(_m), double); - Btran_p = tzMalloc(_m*_r, double); - - for (_i=0; _i<_m; _i++) { - cblas_dcopy(_m, A+_i*_m, 1, Atran_p+_i, _m); //Copying the transpose of A to Atran. - cblas_dcopy(_r, B+_i*_r, 1, Btran_p+_i, _m); //Copying the transpose of B (_r-by-_m) to Btran (_m-by-_r); - } - dgesv(&_m, &_r, Atran_p, &_m, ipiv_p, Btran_p, &_m, &info); - for (_i=0; _i<_r; _i++) cblas_dcopy(_m, Btran_p+_i*_m, 1, X+_i, _r); //Copying the transpose of Btran(_m-by-_r) to X (_r-by-_m); - X_dm->flag = M_GE; - - //=== Destroyes memory allocated for this function only. - tzDestroy(ipiv_p); - tzDestroy(Atran_p); - tzDestroy(Btran_p); - - return (info); - } - else { - //Left division \. - //=== Memory allocation for this function only. - ipiv_p = tzMalloc(_m, int); - W = tzMalloc(m2=square(_m), double); - - memcpy(X, B, _m*_r*sizeof(double)); - memcpy(W, A, m2*sizeof(double)); - dgesv(&_m, &_r, W, &_m, ipiv_p, X, &_m, &info); - X_dm->flag = M_GE; - - //=== Destroyes memory allocated for this function only. - tzDestroy(ipiv_p); - tzDestroy(W); - - return (info); //If info==0, the execution is successful; if info == -i, the ith parameter has an illegal value; - // if info==i, U(i,i) in LU decomposition is exactly zero. The factorization has been completed, but - // the factor U is exactly singular, so the solution could not be computed. - } -} -//--- -int bdivA_rgens(TSdvector *x_dv, const TSdvector *b_dv, const char lr, const TSdmatrix *A_dm) -{ - //Use bdivA_rgens() where x_dv and b_dv are now both vectors and A_dm is a square matrix. - //Unlike bdivA_rrect(), this routine deals with only the general square matrix A_dm. It solves left division (\) problme - // Ax=b (x=A\b). For xA=b (right division problem: x=B/b), we first transpose it to A'*x'=b', then solve out x' = A'\b' - // as a left-division problem, and finally transpose x' back to x. - // - //If x_dv->v = b_dv->v. Then, x_dv->v will be replaced by new values. - // - //Outputs: Solving Ax = b or xA = b. - // x = A\b or b/A where x is _m-by-1 if \ (Ax=b) or 1-by-_m if / (xA=b). - // Returns info (if info==0, the execution is successful; if info == -i, the ith parameter has an illegal value.) - //-------- - //Inputs: - // A: _m-by-_m real general square (rgens) matrix. - // b: _m-by-1 vector if \ (Ax=b) or - // 1-by-_m vector if / (xA=b). - // lr: if lr='\\', left division \ is performed; if lr='/', right division / is performed. - - int _m, m2, - _r = 1, - _i, info = -2, - *ipiv_p = NULL; - double *A, *b, *x, - *Atran_p = NULL, //Transpose of A if right division / takes place. - *W = NULL; //Duplicate copy of A when left division \ is used. This will be replaced by LU decomposition. - - if (!A_dm || !(A_dm->flag & M_GE) || !b_dv || !b_dv->flag) fn_DisplayError("mathlib.c/bdivA_rgens(): Both A_dm and b_dv must be (a) created (allocated memory) and (b) given legal values for all elements (in other words, the flag M_GE must exist)"); - if (!x_dv) fn_DisplayError("mathlib.c/bdivA_rgens(): output vector x_dv must be created (allocated memory)"); - if ( b_dv->n != x_dv->n ) fn_DisplayError("mathlib.c/bdivA_rgens(): The dim of b_dv and the dim of x_dv must exactly match"); - if ( (_m=A_dm->nrows) != x_dv->n ) fn_DisplayError("mathlib.c/bdivA_rgens(): Number of rows of A_dm and the dim of x_dv must exactly match"); - if ( _m != A_dm->ncols ) fn_DisplayError("mathlib.c/bdivA_rgens(): Input matrix A_dm must be square"); - - A = A_dm->M; - b = b_dv->v; - x = x_dv->v; - - if (lr=='/') { - //Right divistion /. - //=== Memory allocation for this function only. - ipiv_p = tzMalloc(_m, int); - Atran_p = tzMalloc(square(_m), double); - - for (_i=0; _i<_m; _i++) - cblas_dcopy(_m, A+_i*_m, 1, Atran_p+_i, _m); //Copying the transpose of A to Atran. - if (x_dv != b_dv ) memcpy(x, b, _m*sizeof(double)); - dgesv(&_m, &_r, Atran_p, &_m, ipiv_p, x, &_m, &info); - x_dv->flag = V_DEF; - - //=== Destroyes memory allocated for this function only. - tzDestroy(ipiv_p); - tzDestroy(Atran_p); - - return (info); - } - else { - //Left division \. - //=== Memory allocation for this function only. - ipiv_p = tzMalloc(_m, int); - W = tzMalloc(m2=square(_m), double); - - if (x_dv != b_dv ) memcpy(x, b, _m*sizeof(double)); - memcpy(W, A, m2*sizeof(double)); - dgesv(&_m, &_r, W, &_m, ipiv_p, x, &_m, &info); - x_dv->flag = V_DEF; - - //=== Destroyes memory allocated for this function only. - tzDestroy(ipiv_p); - tzDestroy(W); - - return (info); //If info==0, the execution is successful; if info == -i, the ith parameter has an illegal value; - // if info==i, U(i,i) in LU decomposition is exactly zero. The factorization has been completed, but - // the factor U is exactly singular, so the solution could not be computed. - } -} -#else -//No default routine yet. 7 Oct 2003 -#endif - - - -#if defined (INTELCMATHLIBRARY) -void Aldivb_spd(TSdvector *x_dv, TSdmatrix *A_dm, TSdvector *b_dv, char an) { - //??????? Some options (e.g., whe A_dm is M_SL) are NOT tested yet. - //Output x = A\b where x_dv is an _n-by-1 vector. - // Fastest way is to let x_dv->v = b_dv->v. Then, x_dv->v will be replaced by new values. - //-------- - //Inputs: - // A: _n-by-_n symmetric, positive definite matrix. - // b: _n-by-1 vector. - // an: 'N' or 'n': A_dm will NOT be altered and another matrix will be allocated and destroyed in this function. - // Otherwise ('A' or 'a'): A_dm will be altered and A_dm = U if A_dm->flag = M_SU where U is an upper triagular Choleski such that U'*U = A; - // or A_dm = L if A_dm->flag = M_SL (but != M_SU) where L is a lower triangular Choleski such that L*L' = A. - // - // Note I: Intel MLK cblas_dtrsv() does not test for singularity or near-singulariy of the system. - // Such tests must be performed before calling this BLAS routine. - // Note II: If x_dv->v = b_dv->v, x_dv->v will be replaced by new values. - // Note III: If an != 'N' or 'n', A_dm will be replaced by U if A_dm->M_SU where U'*U = A or by L if A_dm->M_SL (but != M_SU) where L*L'=A. - - int errflag=2, nrows, nels; //errflat=0 implies successful decomposition. But we start with 2 so as to let dpotrf export a correct flag. - double *A, *W=NULL, *x, *b; - - if ( !A_dm || !b_dv || !x_dv ) fn_DisplayError(".../mathlib.c/Aldivb_spd(): All input matrices or vectors must be created (memory allocated)"); - nrows = A_dm->nrows; - nels = square(nrows); - A = A_dm->M; - x = x_dv->v; - b= b_dv->v; - if ( nrows != A_dm->ncols ) fn_DisplayError(".../mathlib.c/Aldivb_spd(): L input matrix must be square"); - if ( !A_dm->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/Aldivb_spd(): L input matrix and vector must be given legal values"); - if ( (an=='N') || (an=='n') ) { - W = tzMalloc(nels, double); - memcpy(W, A, nels*sizeof(double)); - } - else if ( (an=='A') || (an=='a') ) W = A; - else fn_DisplayError(".../mathlib.c/Aldivb_spd(): passing charecter an must be A, a, N, or n"); - - - if (A_dm->flag & M_SU) { - dpotrf("U", &nrows, W, &nrows, &errflag); //Choleski. U'*U = W where W will be replaced by upper triangular U. - if (errflag) fn_DisplayError(".../mathlib.c/Aldivb_spd(): Error when calling Choleski dpotrf(). Check if the L input matrix A_dm is positive definite or has legal values"); - if (x==b) { - //=== Solving for A*x=b. - cblas_dtrsv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit, nrows, W, nrows, x, 1); - cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, nrows, W, nrows, x, 1); - } - else { - memcpy(x, b, nrows*sizeof(double)); - cblas_dtrsv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit, nrows, W, nrows, x, 1); - cblas_dtrsv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit, nrows, W, nrows, x, 1); - x_dv->flag = V_DEF; - } - if ( (an!='N') && (an!='n') ) A_dm->flag = M_UT; - } - else if (A_dm->flag & M_SL) { //?????????? Not tested yet. - dpotrf("L", &nrows, W, &nrows, &errflag); //Choleski. L*L' = W where W will be replaced by lower triangular L. - if (errflag) fn_DisplayError(".../mathlib.c/Aldivb_spd(): Error when calling Choleski dpotrf(). Check if the L input matrix A_dm is positive definite or has legal values"); - if (x==b) { - //=== Solving for A*x=b. - cblas_dtrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, nrows, W, nrows, x, 1); - cblas_dtrsv(CblasColMajor, CblasLower, CblasTrans, CblasNonUnit, nrows, W, nrows, x, 1); - } - else { - memcpy(x, b, nrows*sizeof(double)); - cblas_dtrsv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit, nrows, W, nrows, x, 1); - cblas_dtrsv(CblasColMajor, CblasLower, CblasTrans, CblasNonUnit, nrows, W, nrows, x, 1); - x_dv->flag = V_DEF; - } - if ( (an!='N') && (an!='n') ) A_dm->flag = M_LT; - } - else fn_DisplayError(".../mathlib.c/Aldivb_spd(): L input matrix A_dm must be symmetric"); - //dpotrf((A_dm->flag & M_SU) ? "U" : "L", &nrows, A, &nrows, &errflag); //Choleski. If "U", U'*U = A where A will be replaced by upper triangular U. - // if (errflag<0) fn_DisplayError("Some element has an illegal value"); - // else if (errflag>0) fn_DisplayError("The leadding minor of some order, hence the entire matrix, is not positive definite"); - - if ( (an=='N') || (an=='n') ) free(W); -} -#else -//No default routine yet. -#endif - - - -#if defined (INTELCMATHLIBRARY) -double detspd(TSdmatrix *S_dm) -{ - //Determinant of symmetric positive definite (SPD) matrix must be positive. - //We set the return value to be -1 if this matrix is NOT SPD. - double valuedet; - int _n, _i; - int errflag; - //=== - TSdmatrix *Work_dm = NULL; - - if (S_dm) { - _n = S_dm->nrows; - Work_dm = CreateMatrix_lf(_n, _n); - } - else fn_DisplayError(".../mathlib.c/detspd(): Input matrix must be (1) created, (2) symmetric, (3) positive definite"); - - if (S_dm->flag & M_SU) errflag=chol(Work_dm, S_dm, 'U'); - else if (S_dm->flag & M_SL) errflag=chol(Work_dm, S_dm, 'L'); - else fn_DisplayError(".../mathlib.c/detpdf(): Input matrix S_dm must be either M_SU or M_SL"); - - if (errflag) { - //printf("\nFatal Error in .../mathlib.c/detspd() when calling chol() with error flag %d\n", errflag); - //exit(EXIT_FAILURE); - DestroyMatrix_lf(Work_dm); - return (-1.0); - } - else - { - for (valuedet=1.0, _i=square(_n)-1; _i>=0; _i -= _n+1) valuedet *= Work_dm->M[_i]; - //log(fabs(M[_i])); - if (!isfinite(valuedet)) fn_DisplayError(".../mathlib.c/detspd(): the determinant is overflow. Use logdetspd() instead"); - //Done with Work* arrays. - DestroyMatrix_lf(Work_dm); - return (square(valuedet)); //square() because Work_dm is a square root of S_dm. - } -} -#else -//No default routine yet. -#endif -//--- -#if defined (INTELCMATHLIBRARY) -double logdetspd(TSdmatrix *S_dm) -{ - //Determinant of symmetric positive definite (SPD) matrix must be positive. - //We set the return value to be log(-1.0) (becomeing NaN) if this matrix is NOT SPD. - double logvaluedet; - int _n, _i; - int errflag; - //=== - TSdmatrix *Work_dm = NULL; - - if (S_dm) { - _n = S_dm->nrows; - Work_dm = CreateMatrix_lf(_n, _n); - } - else fn_DisplayError(".../mathlib.c/detspd(): Input matrix must be (1) created, (2) symmetric, (3) positive definite"); - - if (S_dm->flag & M_SU) errflag=chol(Work_dm, S_dm, 'U'); - else if (S_dm->flag & M_SL) errflag=chol(Work_dm, S_dm, 'L'); - else fn_DisplayError(".../mathlib.c/logdetspd(): Input matrix S_dm must be either M_SU or M_SL"); - - - if (errflag) { - //printf("\nFatal Error in .../mathlib.c/logdetspd() when calling chol() with error flag %d\n", errflag); - //exit(EXIT_FAILURE); - DestroyMatrix_lf(Work_dm); - printf("\n----- errflag for chol() when calling logdetspd() in mathlib.c = %d -----\n", errflag); - return (log(-1.0)); - } - else - { - for (logvaluedet=0.0, _i=square(_n)-1; _i>=0; _i -= _n+1) logvaluedet += log(Work_dm->M[_i]); - //Done with Work* arrays. - DestroyMatrix_lf(Work_dm); - return (2.0*logvaluedet); //2.0* because Work_dm is a square root of S_dm. - } -} -#else -//No default routine yet. -#endif - - - -#if defined (INTELCMATHLIBRARY) -double logdeterminant(TSdmatrix *A_dm) { - //Outputs: log|A|. - //------ - //Inputs: - // A_dm: m-by-n real general matrix. - - double retval; - int _m, _n, - errflag = -2; - TSdmatrix *U_dm; - - if (!A_dm) fn_DisplayError(".../logdeterminant(): Input matrix must be memory allocated (and make sure it has legal values with the flag M_GE)"); - //NOTE: all properties of A_dm will be double checked again by lurgen() below. - - //=== Allocates memory used only in this function. - U_dm = CreateMatrix_lf(_m=A_dm->nrows, _n=A_dm->ncols); - - errflag = lurgen(U_dm, (TSivector *)NULL, A_dm); //Gets only the upper part of U_dm. - if (errflag) fn_DisplayError(".../logdeterminant(): Error occurs when calling lurgen()"); - retval = tracelogfabs(U_dm); //tracelogfabs(U) = trace(log(diag(U))). - - //=== Frees memory allocated only for this function. - DestroyMatrix_lf(U_dm); - - return ( retval ); -} -#else -//No default routine yet. -#endif - - -int eigrsym_decomp(double *eval_v, double *evec_m, const double *s_m, const int _n, const char ul) { //, const char revec_yn, const char levec_yn) { - // Outputs (dependent on Intel MKL): - // eval_v: _n-by-1 eigenvalues in ascending order; - // evec_m: _n-by-_n eigenvalues -- if (evec_m==NULL), no eigenvectors are computed; otherwise, x_m = evec_m*diag(eval_v)*inv(evec_m). - // errflag: error flag. - //------------ - // Inputs: - // s_m: _n-by_n real symmetric matrix. - // ul: if =='u' or 'U', s_m is upper triangular; if =='l' or 'L', s_m is lower triangular. - // - // Eigenanalysis of real symmetric square matrix with all eigenvalues and, optionally, eigenvectors. - // Experts' opinion: do NOT use Cuppen's divide-and-conquer algorithm; instead, use QR algorithm, which I guess this algorithm uses. - - int n1=_n, errflag=2, //errflat=0 implies successful decomposition. But we start with 2 so as to let dsyev export a correct flag. - lwork=_n*BLOCKSIZE_FOR_INTEL_MKL; - double *tmpd0_m=tzMalloc(square(_n), double), - *work_p=tzMalloc(lwork, double); - - - //--------------------------- - // Obtains eigenvalues and, optionally, eigenvectors. - //--------------------------- - memcpy(tmpd0_m, s_m, square(_n)*sizeof(double)); - dsyev( (evec_m) ? "V" : "N", ((ul=='u') || (ul=='U')) ? "U" : "L", &n1, tmpd0_m, &n1, eval_v, work_p, &lwork, &errflag); - if (evec_m) memcpy(evec_m, tmpd0_m, square(_n)*sizeof(double)); - - - //--------------------------- - // Frees the allocated memory. - //--------------------------- - if (work_p[0]>lwork) printf("Warning for /mathlib.c/eigrsym_decomp(): needs at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work_p[0], lwork); - tzDestroy(tmpd0_m); - tzDestroy(work_p); - - //if (errflag<0) fn_DisplayError("/Subfolder: Calling eigrsym_decomp -- some element in input matrix has an illegal value"); - //else if (errflag>0) fn_DisplayError("/Subfolder: Calling eigrsym_decomp -- the factor U is exactly singular, so the solution cannot be computed"); - return (errflag); -} - -int eigrgen_decomp(double *evalr_v, double *evali_v, double *revecr_m, double *reveci_m, double *levecr_m, double *leveci_m, const double *x_m, const int _n) { //, const char revec_yn, const char levec_yn) { - // Outputs (dependent on Intel MKL): - // evalr_v: _n-by-1 real parts of eigenvalues; - // evali_v: _n-by-1 imaginary parts of eigenvalues; - // revecr_m: if (revecr_m==NULL), no right eigenvectors are computed; otherwise, _n-by-_n corresponding *real* parts of right eigenvectors column by column: A*v(j)=lambda(j)*v(j); - // reveci_m: if (revecr_m!=NULL) -- must be initialized to zero, _n-by-_n *imaginary* parts of right eigenvectors corresponding to revecr_m; - // levecr_m: if (levecr_m==NULL), no left eigenvectors are computed; otherwise, n-by-n corresponding *real* parts of left eigenvectors column by column: u(j)^H*A=lambda(j)*u(j)^H, where H means conjugate transpose; - // leveci_m: if (levecr_m!=NULL) -- must be initialized to zero, _n-by-_n *imaginary* parts of left eigenvectors corresponding to revecr_m; - // errflag: error flag. - //------------ - // Inputs: - // x_m: _n-by_n real general (non-symmetric) matrix. - // - // Eigenanalysis of real general (non-symmetric) square matrix with all eigenvalues and, optionally, eigenvectors. - - int n1=_n, errflag=2, //errflat=0 implies successful decomposition. But we start with 2 so as to let dgeev export a correct flag. - lwork=_n*BLOCKSIZE_FOR_INTEL_MKL, - _i, _j; - double *tmpd0_m=tzMalloc(square(_n), double), //@@Must be freed in this function.@@ - *work_p=tzMalloc(lwork, double); //@@Must be freed in this function.@@ - - //--------------------------- - // Starts with x_m -- the matrix to be decomposed. - //--------------------------- - memcpy(tmpd0_m, x_m, square(_n)*sizeof(double)); - - //--------------------------- - // Obtains eigenvalues and, optionally, eigenvectors. - //--------------------------- - dgeev( (levecr_m) ? "V" : "N", (revecr_m) ? "V" : "N", &n1, tmpd0_m, &n1, evalr_v, evali_v, - levecr_m, &n1, revecr_m, &n1, work_p, &lwork, &errflag); - - //--------------------------- - // Frees the allocated memory. - //--------------------------- - if (work_p[0]>lwork) printf("Warning for /mathlib.c/eigrgen_decomp(): needs at least %d workspace for good performance " - "but lwork is allocated with only %d space!\n", (int)work_p[0], lwork); - if (work_p) free(work_p); - if (tmpd0_m) free(tmpd0_m); - - //--------------------------- - // Checks error conditions. - // Exports final results. - //--------------------------- - //if (errflag<0) fn_DisplayError("/Subfolder: Calling eigrgen_decomp -- some element in input matrix has an illegal value"); - //else if (errflag>0) fn_DisplayError("/Subfolder: Calling eigrgen_decomp -- the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed"); - if (errflag) return (errflag); - else { - if (revecr_m) { // Tested against Matlab output. Works! 10/13/02. - for (_j=0; _j<_n-1; _j++) - if (evali_v[_j] && (evali_v[_j] == -evali_v[_j+1])) - for (_i=0; _i<_n; _i++) { - reveci_m[_i+(_j+1)*_n] = -(reveci_m[_i+_j*_n]=revecr_m[_i+(_j+1)*_n]); - revecr_m[_i+(_j+1)*_n] = revecr_m[_i+_j*_n]; - } - } - if (levecr_m) { //Hasn't tested against any other established program, but it seems working. 10/13/02. - for (_j=0; _j<_n-1; _j++) - if (evali_v[_j] && (evali_v[_j] == -evali_v[_j+1])) - for (_i=0; _i<_n; _i++) { - leveci_m[_i+(_j+1)*_n] = -(leveci_m[_i+_j*_n]=levecr_m[_i+(_j+1)*_n]); - levecr_m[_i+(_j+1)*_n] = levecr_m[_i+_j*_n]; - } - } - return (errflag); - } -} - - - -int chol_decomp(double *D, const double *s_m, const int _n, const char ul) { - //Outputs: - // D: _n-by_n -- if ul='u' or 'U', D'*D = s_m where D is stored only at the upper triangular part; - // if ul='l' or 'L', D*D' = s_m where D is stored only at the lower triangular part. - // errflag: error flag (=0 means successful). - //-------- - //Inputs: - // s_m: _n-by-_n symmetric, positive definite matrix (whose only triangular part is used by dpotrf). - // ul: if =='u' or 'U', D (as well as s_m) is upper triangular; if =='l' or 'L', D (as well as s_m) is lower triangular. - // - // Choleski decomposition of s_m. - // For the MATLAB libriary, ul doest not apply and chol_decomp always takes the 'U' form. - // And Matlab 6.5 (R13) has a different number of inputs for mlfChol(). - // See ...\extern\include\libmatlbm.h (included by matlab.h) for the definition of mlfChol(). - // So R12 version must be used if one chooses to use the MATLAB libriary. - - #ifdef INTELCMATHLIBRARY //Intel MKL Lapack dependent code. - int errflag=2, _m=_n, _i, _j, tmpi0; //errflat=0 implies successful decomposition. But we start with 2 so as to let dpotrf export a correct flag. - - //=== Fills the triangular part that is used for Choleski decomposition. - - switch (ul) { - case 'u': case 'U': - for (_j=0; _j<_n; _j++) { - for (_i=0; _i<=_j; _i++) { - tmpi0 = _i+_j*_n; - D[tmpi0] = s_m[tmpi0]; - } - for (; _i<_n; _i++) D[_i+_j*_n] = 0.0; //Initializes the other part of D to zero so as to make it visible and readable. - } - break; - case 'l': case 'L': - for (_j=0; _j<_n; _j++) { - for (_i=0; _i<_j; _i++) D[_i+_j*_n] = 0.0; //Initializes the other part of D to zero so as to make it visible and readable. - for (; _i<_n; _i++) { - tmpi0 = _i+_j*_n; - D[tmpi0] = s_m[tmpi0]; - } - } - default: - return (-1); - } - //=== Choleski decomposition. - dpotrf(((ul=='u') || (ul=='U')) ? "U" : "L", &_m, D, &_m, &errflag); - //--- - // if (errflag<0) fn_DisplayError("Some element has an illegal value"); - // else if (errflag>0) fn_DisplayError("The leadding minor of some order, hence the entire matrix, is not positive definite"); - return (errflag); - #endif - #ifdef MATLABCMATHLIBRARY //Matlab dependent code. - mxArray *ms_m=mlfDoubleMatrix(_n, _n, s_m, NULL), //@@Must be freed in this function.@@ mx version of s_m. - *mxD=NULL, //@@Must be freed in this function.@@ mx version of D. - *mxflag; - int errflag; - - mxD = mlfChol(&mxflag, ms_m); - errflag = (int)mxGetScalar(mxflag); - //if (errflag) fn_DisplayError("Function mathlib.c\\chol_decomp(): matrix must be positive definite for choleski decomposition"); - memcpy(D, mxGetPr(mxD), square(_n)*sizeof(double)); - - //=== Frees up allocated mxArray. - mxDestroyArray(mxD); - mxDestroyArray(ms_m); - mxDestroyArray(mxflag); - - return errflag; - #endif -} - -int inv_spd(double *D, const double *s_m, const int _n, const char ul) { - // Inverse of symmetric, positive-definite matrix s_m. - // - //Outputs: - // D: _n-by_n inverse of s_m. - // errflag: error flag (=0 means successful). - //-------- - //Inputs: - // s_m: _n-by-_n symmetric, positive definite matrix (whose only triangular part is used by dpotrf). - // ul: if =='u' or 'U', D (as well as s_m) is upper triangular; if =='l' or 'L', D (as well as s_m) is lower triangular. - - int errflag=2, _m=_n, _i, _j, tmpi0; //errflat=0 implies successful decomposition. But we start with 2 so as to let dpotrf export a correct flag. - - //=== Fills the triangular part that is used for Choleski decomposition. - switch (ul) { - case 'u': case 'U': - for (_j=0; _j<_n; _j++) { - for (_i=0; _i<=_j; _i++) { - tmpi0 = _i+_j*_n; - D[tmpi0] = s_m[tmpi0]; - } - for (; _i<_n; _i++) D[_i+_j*_n] = 0.0; //Initializes the other part of D to zero so as to make it visible and readable. - } - break; - case 'l': case 'L': - for (_j=0; _j<_n; _j++) { - for (_i=0; _i<_j; _i++) D[_i+_j*_n] = 0.0; //Initializes the other part of D to zero so as to make it visible and readable. - for (; _i<_n; _i++) { - tmpi0 = _i+_j*_n; - D[tmpi0] = s_m[tmpi0]; - } - } - break; - default: - return (-1); - } - //=== Choleski decomposition. - dpotrf(((ul=='u') || (ul=='U')) ? "U" : "L", &_m, D, &_m, &errflag); - if (errflag) return (errflag); - //=== Takes inverse. - dpotri(((ul=='u') || (ul=='U')) ? "U" : "L", &_m, D, &_m, &errflag); - return (errflag); - //--- - // if (errflag<0) fn_DisplayError("Some element has an illegal value"); - // else if (errflag>0) fn_DisplayError("Not symmetric positive definite or matrix inversion cannot be computed"); -} - - - - -//======================================================= -// BLAS routines -- all based on Intel MKL (or IMSL C Math library). -//======================================================= -//void ScalingVectorUpdate(const double _alpha, TSdvector *x_dv) { -// //Output: x = alpha*x; -// // -// call dscal (n, da, DX, incx) -//} -//Use the scaling vector MKL routine. - -double VectorDotVector(TSdvector *x1_dv, TSdvector *x2_dv) { - //Output: Return sum(x1[i] * x2[i]) over i=1, ..., n. - // Allows the case x1_dv = x2_dv. - //Inputs: - // x1_dv: _n-by-1 double vector. - // x2_dv: _n-by-1 double vector. - int _n, _i; - double *x1, *x2, - sum2 = 0.0; //Cumulative: must be set to 0.0. - - if ( !x1_dv || !x2_dv ) fn_DisplayError(".../mathlib.c/VectorDotVector(): All input vectors must be created (memory-allocated)"); - - if ( (x1=x1_dv->v) == (x2=x2_dv->v) ) { - if ( !x1_dv->flag ) fn_DisplayError(".../mathlib.c/VectorDotVector(): Input vectors must be given legal values"); - for (_i=x1_dv->n-1; _i>=0; _i--) sum2 += square(x1[_i]); - } - else { - if ( (_n=x1_dv->n) != x2_dv->n ) fn_DisplayError(".../mathlib.c/VectorDotVector(): Dimensions of the two input vectors must be same"); - else if ( !x1_dv->flag || !x2_dv->flag ) fn_DisplayError(".../mathlib.c/VectorDotVector(): Both input vectors must be given legal values"); - for (_i=_n-1; _i>=0; _i--) sum2 += x1[_i]*x2[_i]; - } - - return ( sum2 ); - //return cblas_ddot(_n, x1_dv->v, 1, x2_dv->v, 1); -} - - -void ScalarTimesVectorUpdate(TSdvector *x2_dv, const double _alpha, TSdvector *x1_dv) { - //Output: x2 = alpha * x1 + x2; - //Inputs: - // alpha: a double scalar; - // x1: n-by-1 double vector. - int _n; - - if ( !x1_dv || !x2_dv ) fn_DisplayError(".../mathlib.c/ScalarTimesVectorUpdate(): All input vectors must be created (memory-allocated)"); - else _n = x1_dv->n; - - if (_n != x2_dv->n) fn_DisplayError(".../mathlib.c/ScalarTimesVectorUpdate(): All input vectors must have the same length"); - else if ( !x1_dv->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesVectorUpdate(): R input vector must be given values"); - else { - if ( x1_dv->v == x2_dv->v ) fn_DisplayError(".../mathlib.c/ScalarTimesVectorUpdate(): Two input vectors cannot be the same. Instead, use SclarTimesVector() for this option if you are sure this is what you want"); - cblas_daxpy(_n, _alpha, x1_dv->v, 1, x2_dv->v, 1); - x2_dv->flag = V_DEF; - } -} - -void ScalarTimesVector(TSdvector *x_dv, const double _alpha, TSdvector *a_dv, const double _beta) { - //Output: x_dv = alpha*a_dv + beta*x_dv where x_dv is n-by-1. - // When beta=0.0 and x_dv->v = a_dv->v, x_dv->v will be replaced by new values. - //Inputs: - // a_dv: n-by-1. - // _alpha: a double scalar. - // _beta: a double scalar. - int _i, _n; - double *x, *a; - - if ( !x_dv || !a_dv ) fn_DisplayError(".../mathlib.c/ScalarTimesVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesVector(): R input vector must be given values"); - else { - _n = x_dv->n; - x = x_dv->v; - a = a_dv->v; - } - - if ( _n != a_dv->n ) fn_DisplayError(".../mathlib.c/ScalarTimesVector(): Two input vectors must have the same length"); - if (_beta == 0.0) { - #if defined (INTELCMATHLIBRARY) // define: use Intek MKL LAPACK library; undef: use others. - if ( x == a ) cblas_dscal(_n, _alpha, x, 1); - else { - memcpy(x_dv->v, a_dv->v, _n*sizeof(double)); - x_dv->flag = V_DEF; - cblas_dscal(_n, _alpha, x, 1); - } - #else //SWITCHTOTZCMATH: use my own C math library (which is faster than MKL sometimes); undef: use others. - for (_i=_n-1; _i>=0; _i--) x[_i] = _alpha*a[_i]; - x_dv->flag = V_DEF; - #endif - } - else if (_beta == 1.0) { - if ( x == a ) fn_DisplayError(".../mathlib.c/ScalarTimesVector(): Two input vectors must be different, i.e., pointing to different memory places"); - cblas_daxpy(_n, _alpha, a, 1, x, 1); - x_dv->flag = V_DEF; - } - else { - if ( x == a ) fn_DisplayError(".../mathlib.c/ScalarTimesVector(): Two input vectors must be different, i.e., pointing to different memory places"); - for (_i=_n-1; _i>=0; _i--) x[_i] = _alpha*a[_i] + _beta*x[_i]; - x_dv->flag = V_DEF; - } -} - -void VectorPlusMinusVectorUpdate(TSdvector *x_dv, const TSdvector *b_dv, double _alpha) -{ - //Output: x_dv =_alpha * b_dv + x_dv where x_dv is _n-by-1. - //Inputs: - // b_dv: _n-by-1 double vector. - // _alpha: double scalar. - int _n; - - - if ( !x_dv || !b_dv ) fn_DisplayError(".../mathlib.c/VectorPlusMinusVectorUpdate(): All input vectors must be created (memory-allocated)"); - else if ( !b_dv->flag || !x_dv->flag ) fn_DisplayError(".../mathlib.c/VectorPlusMinusVectorUpdate(): All input vectors must be given values"); - else { - _n = x_dv->n; - } - if ( _n != b_dv->n ) fn_DisplayError(".../mathlib.c/VectorPlusMinusVectorUpdate(): Dimensions of all input vectors must be same"); - - cblas_daxpy(_n, _alpha, b_dv->v, 1, x_dv->v, 1); -} - -void VectorPlusMinusVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv, double _alpha) -{ - //???????? Use tz_VectorPlusMinusVector() or VectorPlusVector() or VectorMinusVector(). - //????????? NOT finished yet. - //????????Must add _beta for x_dv = alpha*a_dv + beta*b_dv. If x_dv=b_dv, update. - //??????????? NOT fully tested yet. - //Output: x_dv = a_dv + _alpha * b_dv where x_dv is _n-by-1. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - // _alpha: double scalar. - int _n; - - - if ( !x_dv || !a_dv || !b_dv ) fn_DisplayError(".../mathlib.c/VectorPlusMinusVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/VectorPlusMinusVector(): All input vectors must be given values"); - else { - _n = x_dv->n; - } - if ( (_n != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError(".../mathlib.c/VectorPlusMinusVector(): Dimensions of all input vectors must be same"); - - memcpy(x_dv->v, a_dv->v, _n*sizeof(double)); - cblas_daxpy(_n, _alpha, b_dv->v, 1, x_dv->v, 1); -} - -void VectorTimesSelf(TSdmatrix *C_dm, const TSdvector *a_dv, const double _alpha, const double _beta, const char ul) -{ - //Computes C = alpah*a*a' + beta*C where - // Output: - // the symmetric matrix C. - // Inputs: - // a is m-by-1, - // C is m-by-m symmetric matrix, - // alpha: a double scalar, - // beta: a double scalar. - // ul: if=='U' or 'u', only the upper triangular part of C is to be referenced; otherwise, only the lower triangular part of C is to be referenced; - int _m, _n; - int _i, _j; - double *v, *M; - - if ( !C_dm || !a_dv ) fn_DisplayError(".../mathlib.c/VectorTimesSelf(): At least one of the pointer arguments is not created (memory-allocated)"); - else if (!a_dv->flag) fn_DisplayError(".../mathlib.c/VectorTimesSelf(): Input vector must have legal values"); - else { - _m = C_dm->nrows; - _n = C_dm->ncols; - } - - if ( (_m != a_dv->n) || (_m !=_n) ) fn_DisplayError(".../mathlib.c/VectorTimesSelf(): (1) Size of the input matrix and dimensions of the two input vectors do not match. (2) Output matrix must be square"); - else { - if ( _beta == 1.0 ) { - #if defined (INTELCMATHLIBRARY) // define: use Intek MKL LAPACK library; undef: use others. - //$$$$ cblas_dsyrk is much slower than the following line. cblas_dsyrk(CblasColMajor, ((ul=='u') || (ul=='U')) ? CblasUpper : CblasLower, CblasNoTrans, _m, 1, _alpha, a_dv->v, _m, _beta, C_dm->M, _m); - cblas_dsyr(CblasColMajor, ((ul=='U') || (ul=='u')) ? CblasUpper : CblasLower, _m, _alpha, a_dv->v, 1, C_dm->M, _m); - C_dm->flag = ((ul=='U') || (ul=='u')) ? M_SU : M_SL; - #else //Corresponds to the default: SWITCHTOTZCMATH -- use my own C math library, which is faster than cblas_dsyrk(). - v = a_dv->v; - M = C_dm->M; - if ( (ul == 'U') || (ul == 'u') ) { - C_dm->flag = M_SU; - if ( _alpha==1.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] += v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] += _alpha * v[_i] * v[_j]; - } - } - } - } - else { - C_dm->flag = M_SL; - if ( _alpha==1.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] += v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] += _alpha * v[_i] * v[_j]; - } - } - } - } - #endif - } - else { - //Corresponds to the default: SWITCHTOTZCMATH -- use my own C math library (which is faster than MKL sometimes). - v = a_dv->v; - M = C_dm->M; - if ( (ul == 'U') || (ul == 'u') ) { - C_dm->flag = M_SU; - if ( _alpha==1.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] = v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - else { - if ( _beta==0.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] = _alpha * v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] = _alpha* v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - } - } - else { - C_dm->flag = M_SL; - if ( _alpha==1.0 ) { - if ( _beta==0.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - } - else { - if ( _beta==0.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = _alpha * v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = _alpha* v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - } - } - } - } -} - -#if defined (INTELCMATHLIBRARY) -void VectorTimesVector(TSdmatrix *C_dm, const TSdvector *a_dv, const TSdvector *b_dv, const double _alpha, const double _beta) { - //?????? NOT tested for _beta != 1.0. - //Output is the matrix C and all other arguments are inputs. - //If beta != 0, always converting C (if symmetric or trianuglar) to a general matrix before the operation. - //The fastest way is to let _beta = 1.0. - //Computes C = alpah*a*b' + beta*C where - // a is m-by-1, - // b is n-by-1, - // C is m-by-n general matrix, - // alpha: a double scalar, - // beta: a double scalar. - int _m, _n; - - if ( !C_dm || !a_dv || !b_dv ) fn_DisplayError(".../mathlib.c/VectorTimesVector(): At least one of the pointer arguments is not created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/VectorTimesVector(): Both input R vectors must be given values"); - else { - _m = C_dm->nrows; - _n = C_dm->ncols; - } - if (_beta != 0.0) { - if ( !(C_dm->flag & M_GE) && (_m = _n) ) { - if (C_dm->flag & M_SU) SUtoGE(C_dm); - else if (C_dm->flag & M_SL) SLtoGE(C_dm); - else fn_DisplayError(".../mathlib.c/VectorTimesVector(): (a) make sure C_dm has legal values; (b) for M_UT and M_LT, I have not got time to convert it to a general matrix"); - } - } - - - - if ( (_m != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError(".../mathlib.c/VectorTimesVector(): Size of the input matrix and dimensions of the two input vectors do not match"); - else { - if (_beta==1.0) { - cblas_dger(CblasColMajor, _m, _n, _alpha, a_dv->v, 1, b_dv->v, 1, C_dm->M, _m); - C_dm->flag = M_GE; - } - else { - cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, _m, _n, 1, _alpha, a_dv->v, _m, b_dv->v, 1, _beta, C_dm->M, _m); - //???????????The above is probably too slow. Try the following two lines instead. 3/10/03. - //????? Test to make sure this works for beta=0. - //cblas_dscal(_m*_n, _beta, C_dm->M, 1); - //cblas_dger(CblasColMajor, _m, _n, _alpha, a_dv->v, 1, b_dv->v, 1, C_dm->M, _m); - C_dm->flag = M_GE; - } - } -} -#else -//No default routine yet. -#endif - - -void MatrixPlusMinusMatrixUpdate(TSdmatrix *X_dm, TSdmatrix *A_dm, double _alpha) -{ - //$$$$$ If A_dm or X_dm is only upper or lower symmetric, it will be always converted to a general (and symmetric) matrix. $$$$$$ - //Output: X =_alpha * A + X where X_dm is an m-by-n general (and possibly symmetric) matrix. - //Inputs: - // A_dm: m-by-n general or symmetric matrix. - // _alpha: double scalar. - int _m, _n, nels; - - - if ( !X_dm || !A_dm ) fn_DisplayError(".../mathlib.c/MatrixPlusMinusMatrixUpdate(): All input matrices must be created (memory-allocated)"); - else if ( !X_dm->flag || !A_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixPlusMinusMatrixUpdate(): Both input matrices must be given values"); - else { - _m = X_dm->nrows; - _n = X_dm->ncols; - nels = _m * _n; - } - - if ( (_m != A_dm->nrows) || (_n != A_dm->ncols) ) fn_DisplayError(".../mathlib.c/MatrixPlusMinusMatrixUpdate(): Dimensions of all input matrices must be same"); - - //=== Making both X_dm and A_dm general if not yet. - if ( !(X_dm->flag & M_GE) ) { - if (X_dm->flag & M_SU) SUtoGE(X_dm); - else if (X_dm->flag & M_SL) SLtoGE(X_dm); - else fn_DisplayError(".../mathlib.c/MatrixPlusMinusMatrixUpdate(): Haven't got time to deal with the M_UT and M_LT cases for X_dm"); - } - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixPlusMinusMatrixUpdate(): Haven't got time to deal with the M_UT and M_LT cases for A_dm"); - } - - cblas_daxpy(nels, _alpha, A_dm->M, 1, X_dm->M, 1); //This operation may be much cheaper than explicitly using SU or SL operations with two for loops and integer multiplications for matrix offsets. - - if ( X_dm->flag != A_dm->flag ) { - //printf("WARNING for .../mathlib.c/MatrixPlusMinusMatrixUpdate(): the two input matrices do not have the same matrix type (or flag), so the output matrix is reset to M_GE"); - X_dm->flag = M_GE; //Reset to a general matrix only; otherwise, keep the original X_dm->flag. - } - //if ( X_dm->flag != A_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixPlusMinusMatrixUpdate(): both input matrices must have the same matrix type (or flag)"); -} - -void MatrixTimesVector(TSdvector *x_dv, TSdmatrix *A_dm, const TSdvector *b_dv, const double _alpha, const double _beta, const char tn) -{ - //WARNING: x_dv must NOT be the same as b_dv! - // - //Output: x_dv = _alpha*A_dm'*b_dv + _beta*x_dv for tn=='T'; x_dv = _alpha*A_dm*b_dv + _beta*x_dv for tn=='N' - // where x_dv->v is ncols-by-1 or nrows-by-1 and needs not be initialized outside this function if _beta is set to 0.0. - //Inputs: - // A_dm->M: nrows-by-ncols; - // b_dv->v: nrows-by-1 or ncols-by-1; - // _alpha: double scalar; - // _beta: double scalar; - // tn: if =='T' or 't', transpose of A_dm is used; otherwise, A_dm itself (no transpose) is used. - - if ( !x_dv || !A_dm || !b_dv) fn_DisplayError(".../mathlib.c/MatrixTimesVector(): At least one of the pointer arguments is not created (memory-allocated)"); - else if ( !A_dm->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/MatrixTimesVector(): R input matrix or vector must be given values"); - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixTimesVector(): For M_UT and M_LT, use TrimatrixTimesVector() instead"); - } - - - if ((tn=='T' || tn=='t') && (A_dm->nrows==b_dv->n) && (A_dm->ncols==x_dv->n)) { - cblas_dgemv(CblasColMajor, CblasTrans, A_dm->nrows, A_dm->ncols, _alpha, A_dm->M, A_dm->nrows, b_dv->v, 1, _beta, x_dv->v, 1); - x_dv->flag = V_DEF; - } - else if ( (A_dm->ncols==b_dv->n) && (A_dm->nrows==x_dv->n) ) { - cblas_dgemv(CblasColMajor, CblasNoTrans, A_dm->nrows, A_dm->ncols, _alpha, A_dm->M, A_dm->nrows, b_dv->v, 1, _beta, x_dv->v, 1); - x_dv->flag = V_DEF; - } -//--- The following if clause is wrong because, when tn=='N', A_dm->ncols == b_dv->n, NOT A_dm->nraws==b_dv_>n. -// if ((A_dm->nrows==b_dv->n) && (A_dm->ncols==x_dv->n)) { -// cblas_dgemv(CblasColMajor, (tn=='T' || tn=='t') ? CblasTrans : CblasNoTrans, A_dm->nrows, A_dm->ncols, _alpha, A_dm->M, A_dm->nrows, b_dv->v, 1, _beta, x_dv->v, 1); -// x_dv->flag = V_DEF; -// } - else fn_DisplayError(".../mathlib.c/MatrixTimesVector(): Size of the input matrix and dimensions of the two input vectors do not match"); -} - - -#if defined (INTELCMATHLIBRARY) -void TrimatrixTimesVector(TSdvector *x_dv, TSdmatrix *A_dm, TSdvector *b_dv, const char tn, const char un) -{ - //Output: x_dv = A_dm'*b_dv for tn=='T'; x_dv = A_dm*b_dv for tn=='N' where x_dv->v is _n-by-1. - // If x_dv = b_dv (which gives the fastest return, so try to use this option when possible), x_dv will be relaced by A*b or A'*b. - //Inputs: - // A_dm->M: _n-by-_n triangular matrix. - // b_dv->v: _n-by-1 vector. - // tn: if =='T' or 't', transpose of A_dm is used; otherwise, A_dm itself (no transpose) is used. - // un: if =='U' or 'u', A_dm is unit triangular; otherwise, A_dm is non-unit triangular (i.e., a regular triangular matrix). - - int _n; -// double *x, *b; - - if ( !x_dv || !A_dm || !b_dv) fn_DisplayError(".../mathlib.c/TrimatrixTimesVector(): At least one of the pointer arguments is not created (memory-allocated)"); - else if ( !A_dm->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/TrimatrixTimesVector(): R input matrix or vector must be given values"); - else if ( ((_n = A_dm->nrows) != x_dv->n) ) fn_DisplayError(".../mathlib.c/TrimatrixTimesVector(): Size of input matrix and dimension of input vector must match"); - else if ( !(A_dm->flag & (M_UT | M_LT) ) ) fn_DisplayError(".../mathlib.c/TrimatrixTimesVector(): Make sure R matrix is triangular (i.e., M_UT or M_LT)"); - -// if ( (x = x_dv->v) == (b = b_dv->v) ) //Commented out on 22 Oct 03. - if ( x_dv == b_dv ) - cblas_dtrmv(CblasColMajor, (A_dm->flag & M_UT) ? CblasUpper : CblasLower, (tn=='T' || tn=='t') ? CblasTrans : CblasNoTrans, (un=='U' || un=='u') ? CblasUnit : CblasNonUnit, A_dm->nrows, A_dm->M, A_dm->nrows, x_dv->v, 1); - else { - if ( _n != b_dv->n ) fn_DisplayError(".../mathlib.c/TrimatrixTimesVector(): Two vectors must have the same length"); - memcpy(x_dv->v, b_dv->v, _n*sizeof(double)); - cblas_dtrmv(CblasColMajor, (A_dm->flag & M_UT) ? CblasUpper : CblasLower, (tn=='T' || tn=='t') ? CblasTrans : CblasNoTrans, (un=='U' || un=='u') ? CblasUnit : CblasNonUnit, A_dm->nrows, A_dm->M, A_dm->nrows, x_dv->v, 1); - x_dv->flag = V_DEF; - } -} -#else -//No default routine yet. -#endif - - -#if defined (INTELCMATHLIBRARY) -void SymmatrixTimesVector(TSdvector *x_dv, TSdmatrix *A_dm, TSdvector *b_dv, const double _alpha, const double _beta) -{ - //????? This is NOT checked yet: If x_dv = b_dv, x_dv or b_dv will be relaced by alpha*A*x + beta*x. - //Output: - // x_dv = alpha*A_dm*b_dv + beta*x_dv where x_dv->v is _n-by-1. - // When beta=0, there is no need to initialize the value of x_dv. - //Inputs: - // A_dm->M: _n-by-_n triangular matrix. - // b_dv->v: _n-by-1 vector. - // _alpha: double scalar; - // _beta: double scalar; - - int _n; - - if ( !x_dv || !A_dm || !b_dv) fn_DisplayError(".../mathlib.c/SymmatrixTimesVector(): all input and output arguments must be created (memory-allocated)"); - else if ( !A_dm->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/SymmatrixTimesVector(): R input matrix or vector must be given values"); - else if ( ((_n = A_dm->nrows) != x_dv->n) || (_n != b_dv->n) ) fn_DisplayError(".../mathlib.c/SymmatrixTimesVector(): Size of input matrix and dimensions of input and output vectors must all match"); - else if ( !(A_dm->flag & (M_SU | M_SL) ) ) fn_DisplayError(".../mathlib.c/SymmatrixTimesVector(): Make sure R input matrix is symmetric (i.e., M_SU or M_SL)"); - - cblas_dsymv(CblasColMajor, (A_dm->flag & M_SU) ? CblasUpper : CblasLower, _n, _alpha, A_dm->M, _n, b_dv->v, 1, _beta, x_dv->v, 1); - x_dv->flag = V_DEF; -} -#else -//No default routine yet. -#endif - - - -void VectorTimesMatrix(TSdvector *x_dv, const TSdvector *b_dv, TSdmatrix *A_dm, const double _alpha, const double _beta, const char tn) { - //Note this function is exactly the opposite of MatrixTimeVector (which is based on the MKL default). - // - //Output: x_dv->v = _alpha*b_dv*A_dm + _beta*x_dv for tn=='N'; x_dv = _alpha*b_dv*A_dm' + _beta*x_dv for tn=='T' - // where x_dv->v is 1-by-ncols or 1-by-nrows and needs not be initialized outside this function if _beta is set to 0.0. - //Inputs: - // A_dm->M: nrows-by-ncols; - // b_dv->v: 1-by-nrows or 1-by-ncols; - // _alpha: double scalar; - // _beta: double scalar; - // tn: if =='T' or 't', transpose of A_dm is used; otherwise (=='N' or 'n'), A_dm itself (no transpose) is used. - - if ( !x_dv || !A_dm || !b_dv) fn_DisplayError(".../mathlib.c/VectorTimesMatrix(): At least one of the pointer arguments is not created (memory-allocated)"); - else if ( !A_dm->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/VectorTimesMatrix(): R input matrix or vector must be given values"); - - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/VectorTimesMatrix(): Haven't got time to deal with the M_UT and M_LT cases for A_dm"); - } - - - if ( ((tn=='T') || (tn=='t')) && (A_dm->ncols==b_dv->n) && (A_dm->nrows==x_dv->n)) { - cblas_dgemv(CblasColMajor, CblasNoTrans, A_dm->nrows, A_dm->ncols, _alpha, A_dm->M, A_dm->nrows, b_dv->v, 1, _beta, x_dv->v, 1); - x_dv->flag = V_DEF; - } - else if ( (A_dm->nrows==b_dv->n) && (A_dm->ncols==x_dv->n) ) { - cblas_dgemv(CblasColMajor, CblasTrans, A_dm->nrows, A_dm->ncols, _alpha, A_dm->M, A_dm->nrows, b_dv->v, 1, _beta, x_dv->v, 1); - x_dv->flag = V_DEF; - } - else { - fn_DisplayError(".../mathlib.c/VectorTimesMatrix(): Size of the matrix and dimensions of the two vectors do not match"); - } -} - -void ScalarTimesMatrix(TSdmatrix *x_dm, const double _alpha, TSdmatrix *a_dm, const double _beta) -{ - //$$$$$ If a_dm or x_dm (when _beta!=0) is only upper or lower symmetric, it will be always converted to a general (and symmetric) matrix. $$$$$$ - //Output: x_dm = alpha*a_dm + beta*x_dm where x_dm is m-by-n. - // Fastest way is to let beta=0.0 and x_dm->M = a_dm->M. Then x_dm->M will be replaced by new values. - // However, with beta=0.0, x_dm and a_dm can be different. - //Inputs: - // a_dm: m-by-n. - // _alpha: a double scalar. - // _beta: a double scalar. - int _i, _m, _n, nels; - double *X, *A; - - if ( !x_dm || !a_dm ) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): All input matrices must be created (memory-allocated)"); - else if ( _beta != 0 && !x_dm->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): Input and output matrix must be given legal values because beta != 0"); - else if ( !a_dm->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): R input matrix must be given legal values"); - else { - _m = x_dm->nrows; - _n = x_dm->ncols; - nels = _m*_n; - X = x_dm->M; - A = a_dm->M; - } - - if ( !(a_dm->flag & M_GE) ) { - if (a_dm->flag & M_SU) SUtoGE(a_dm); - else if (a_dm->flag & M_SL) SLtoGE(a_dm); - else fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): Haven't got time to deal with the M_UT or M_LT cases for a_dm"); - } - if ( _beta && !(x_dm->flag & M_GE) ) { - if (x_dm->flag & M_SU) SUtoGE(x_dm); - else if (x_dm->flag & M_SL) SLtoGE(x_dm); - else fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): Haven't got time to deal with the M_UT or M_LT cases for x_dm"); - } - - if ( (_m != a_dm->nrows) || (_n != a_dm->ncols) ) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): Two input matrices must have the same dimension"); - if (_beta == 0.0) { - #if defined( SWITCHTOINTELCMATH ) // define: use Intek MKL LAPACK library; undef: use others. - if ( X == A ) cblas_dscal(nels, _alpha, X, 1); - else { - memcpy(X, A, nels*sizeof(double)); - x_dm->flag = a_dm->flag; - cblas_dscal(nels, _alpha, X, 1); - } - #else //My own C math library (which is faster than MKL sometimes); undef: use others. - for (_i=nels-1; _i>=0; _i--) X[_i] = _alpha*A[_i]; - x_dm->flag = a_dm->flag; - #endif - } - else if (_beta == 1.0) { - #if defined( SWITCHTOINTELCMATH ) // define: use Intek MKL LAPACK library; undef: use others. - if ( X == A ) for (_i=nels-1; _i>=0; _i--) X[_i] += _alpha*A[_i]; //fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): to use cblas_daxpy(), the two input matrices must be different, i.e., pointing to different memory places"); - else cblas_daxpy(nels, _alpha, A, 1, X, 1); - #else - for (_i=nels-1; _i>=0; _i--) X[_i] += _alpha*A[_i]; - #endif - if ( x_dm->flag != a_dm->flag ) x_dm->flag = M_GE; - } - else if (_alpha == _beta) { - //if ( X == A ) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): Two input matrices must be different, i.e., pointing to different memory places"); - //=== Intel library is at least twice as slow as my own loop for a large matarix like 100-by-100 and can be 20 times slower for a small matrix like 15-by-15. - //=== So I don't use Intel library for this. - // #ifdef SWITCHTOINTELCMATH // define: use Intek MKL LAPACK library; undef: use others. - // cblas_daxpy(nels, 1.0, A, 1, X, 1); - // cblas_dscal(nels, _alpha, X, 1); - // #endif - // #ifdef SWITCHTOTZCMATH // define: use my own C math library (which is faster than MKL sometimes); undef: use others. - // for (_i=nels-1; _i>=0; _i--) X[_i] = _alpha*(A[_i] + X[_i]); - // #endif - if (!(x_dm->flag & M_GE)) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): x_dm must be M_GE" - " -- have not got time to convert other matrices to a general matrix"); - for (_i=nels-1; _i>=0; _i--) X[_i] = _alpha*(A[_i] + X[_i]); - if ( x_dm->flag != a_dm->flag ) x_dm->flag = M_GE; - } - else { - //if ( X == A ) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): Two input matrices must be different, i.e., pointing to different memory places"); - if (!(x_dm->flag & M_GE)) fn_DisplayError(".../mathlib.c/ScalarTimesMatrix(): x_dm must be M_GE" - " -- have not got time to convert other matrices to a general matrix"); - for (_i=nels-1; _i>=0; _i--) X[_i] = _alpha*A[_i] + _beta*X[_i]; - if ( x_dm->flag != a_dm->flag ) x_dm->flag = M_GE; - } -} -//--- -void ScalarTimesMatrixSquare(TSdmatrix *B_dm, const double _alpha, TSdmatrix *A_dm, const char tn, const double _beta) -{ - //Outputs: - // B = alpha*o(A) + beta*B, where o(A) = A' if tn=='T' or 't' or A if tn=='N' or 'n'. - // If A=B, then A is replaced by alpha*o(A) + beta*A. - //Inputs: - // A_dm: n-by-n square matrix. - // B_dm: n-by-n square matrix. - // tn: 'T' (transpose of A) or 'N' (no transpose). - // alpha, beta: double scalars. - - int _n = A_dm->nrows; - TSdmatrix *Atran_dm = NULL; - - if (!A_dm || !B_dm) fn_DisplayError(".../mathlib.c/ScalarTimesMatrixSquare(): A_dm and B_dm must be created (memory-allocated)"); - if (A_dm->nrows != A_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesMatrixSquare(): A_dm must be square"); - - if (A_dm->M == B_dm->M) - { - if ((tn == 'T') || (tn == 't')) - { - Atran_dm = CreateMatrix_lf(_n,_n); - TransposeSquare(Atran_dm, A_dm); - ScalarTimesMatrix(A_dm, _alpha, Atran_dm, _beta); - } - else - { - ScalarTimesMatrix(A_dm, _alpha, A_dm, _beta); - } - } - else - { - if ((B_dm->nrows != B_dm->ncols) || (B_dm->nrows != A_dm->nrows)) fn_DisplayError(".../mathlib.c/ScalarTimesMatrixSquare(): B_dm must be square and B_dm=A_dm"); - if ((tn == 'T') || (tn == 't')) - { - Atran_dm = CreateMatrix_lf(_n,_n); - TransposeSquare(Atran_dm, A_dm); - ScalarTimesMatrix(B_dm, _alpha, Atran_dm, _beta); - } - else - { - ScalarTimesMatrix(B_dm, _alpha, A_dm, _beta); - } - } - - //=== - DestroyMatrix_lf(Atran_dm); -} - - - -void MatrixTimesSelf(TSdmatrix *C_dm, const char ul, TSdmatrix *A_dm, const char tn, const double _alpha, const double _beta) -{ - //If tn=='N' or 'n', C = alpha*A*A' + beta*C. - //If tn=='T' or 't', C = alpha*A'*A + beta*C. - //If ul=='U' or 'u', C_dm->flag = M_SU; - //If ul=='L' or 'l', C_dm->flag = M_SL; - // C must be different from A. - // C is n-by-n; - // A is n-by-k if tn=='N'; - // k-by-n if tn=='T'; - // alpha is a double scalar, - // beta is a double scalar. - int _n, _k, lda; - - if ( !C_dm || !A_dm ) fn_DisplayError(".../mathlib.c/MatrixTimesSelf): All input and output matrices must be created (memory-allocated)"); - else if ( !A_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixTimesSelf): Both R input matrices must be given values"); - //=== Making this matrix general if not yet. - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixTimesSelf): Haven't got time to deal with the M_UT or M_LT cases for A_dm"); - } - - - if ((tn=='T') || (tn=='t')) { - if (((_n=C_dm->nrows) != A_dm->ncols)) fn_DisplayError(".../mathlib.c/MatrixTimesSelf): Dimensions of A and C do not match where C = alpha*A'*A + beta*C"); - else if (_n != C_dm->ncols) fn_DisplayError(".../mathlib.c/MatrixTimesSelf): Output matrix C must be a square matrix"); - lda = _k = A_dm->nrows; - } - else { - if ((_n=C_dm->nrows) != (lda=A_dm->nrows)) fn_DisplayError(".../mathlib.c/MatrixTimesSelf): Dimensions of A and C do not match where C = alpha*A*A' + beta*C"); - else if (_n != C_dm->ncols) fn_DisplayError(".../mathlib.c/MatrixTimesSelf): Output matrix C must be a square matrix"); - _k = A_dm->ncols; - } - - cblas_dsyrk(CblasColMajor, ((ul=='U') || (ul=='u')) ? CblasUpper : CblasLower, ((tn=='T') || (tn=='t')) ? CblasTrans : CblasNoTrans, _n, _k, _alpha, A_dm->M, lda, _beta, C_dm->M, _n); - C_dm->flag = ((ul=='U') || (ul=='u')) ? M_SU : M_SL; -} - - -void MatrixTimesMatrix(TSdmatrix *C_dm, TSdmatrix *A_dm, TSdmatrix *B_dm, const double _alpha, const double _beta, const char tn1, const char tn2) { - //Output is C and all other arguments are inputs. - //Computes C = alpah*op(A)*op(B) + beta*C where op() is either transpose or not, depending on 't' or 'n', - // op(A) is m-by-k, - // op(B) is k-by-n, - // C is m-by-n, - // C must be different from A and from B. - // A and B can be the same, however. - // alpha is a double scalar, - // beta is a double scalar. - // tn1: if == 'T' or 't', the transpose of A is used; otherwise (== 'N' or 'n'), A itself (no transpose) is used. - // tn2: if == 'T' or 't', the transpose of B is used; otherwise (== 'N' or 'n'), B itself (no transpose) is used. - int m1, n1, m2, n2, m3, n3; - - if ( !C_dm || !A_dm || !B_dm ) fn_DisplayError(".../mathlib.c/MatrixTimesMatrix(): All input and output matrices must be created (memory-allocated)"); - else if ( !A_dm->flag || !B_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixTimesMatrix(): Both R input matrices must be given values"); - else { - m1 = A_dm->nrows; - n1 = A_dm->ncols; - m2 = B_dm->nrows; - n2 = B_dm->ncols; - m3 = C_dm->nrows; - n3 = C_dm->ncols; - } - if ( (_beta != 0.0) && !(C_dm->flag) ) fn_DisplayError(".../mathlib.c/MatrixTimesMatrix(): L input matrix C_dm must be given values when beta !=0.0 (i.e., when C_dm is to be particially updated)"); - - - //=== Making these matrices general if not yet. For complete symmetric matrix multiplications, do use this function. - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixTimesMatrix(): Haven't got time to deal with the M_UT or M_LT cases for A_dm"); - } - if ( !(B_dm->flag & M_GE) ) { - if (B_dm->flag & M_SU) SUtoGE(B_dm); - else if (B_dm->flag & M_SL) SLtoGE(B_dm); - else fn_DisplayError(".../mathlib.c/MatrixTimesMatrix(): Haven't got time to deal with the M_UT or M_LT cases for B_dm"); - } - - - - if ( ((tn1=='N') || (tn1=='n')) && ((tn2=='N') || (tn2=='n')) && (n1 == m2) && (m3 == m1) && (n3 == n2) ) { - cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, m3, n3, n1, _alpha, A_dm->M, m1, B_dm->M, m2, _beta, C_dm->M, m3); - C_dm->flag = M_GE; - } - else if ( ((tn1=='T') || (tn1=='t')) && ((tn2=='N') || (tn2=='n')) && (m1 == m2) && (m3 == n1) && (n3 == n2) ) { - cblas_dgemm(CblasColMajor, CblasTrans, CblasNoTrans, m3, n3, m1, _alpha, A_dm->M, m1, B_dm->M, m2, _beta, C_dm->M, m3); - C_dm->flag = M_GE; - } - else if ( ((tn1=='T') || (tn1=='t')) && ((tn2=='T') || (tn2=='t')) && (m1 == n2) && (m3 == n1) && (n3 == m2) ) { - cblas_dgemm(CblasColMajor, CblasTrans, CblasTrans, m3, n3, m1, _alpha, A_dm->M, m1, B_dm->M, m2, _beta, C_dm->M, m3); - C_dm->flag = M_GE; - } - else if ( ((tn1=='N') || (tn1=='n')) && ((tn2=='T') || (tn2=='t')) && (n1 == n2) && (m3 == m1) && (n3 == m2) ) { - cblas_dgemm(CblasColMajor, CblasNoTrans, CblasTrans, m3, n3, n1, _alpha, A_dm->M, m1, B_dm->M, m2, _beta, C_dm->M, m3); - C_dm->flag = M_GE; - } - else fn_DisplayError(".../mathlib.c/MatrixTimesMatrix(): (1) Dimensions of both R input matrices must match. (2) Dimension of L input matrix must compatible with the multiplication of the two R input matrices"); -} - -void SolveTriSysVector(TSdvector *x_dv, const TSdmatrix *T_dm, TSdvector *b_dv, const char tn, const char un) -{ - //Output: computes x_dv = inv(T_dm)*b_dv by solving a triangular system of equation T_dm * x_dv = b_dv. - // x_dv(_n-by-1) = inv(T_dm)*b_v if tn=='N'; = inv(T_dm')*b_v if tn=='T'. - // Fastest way is to let x_dv->v = b_dv->v. Then, x_dv->v will be replaced by new values. - //------- - //Inputs: - // T_dm: _n-by-_n upper or lower triangular matrix; - // b_dv: _n-by-1 vector. - // tn: if =='T' or 't', T_dm->M' (transpose), instead of T_m, will be used; otherwise (i.e., =='n' or 'N'), T_dm->M itself (no transpose) will be used. - // un: if =='U' or 'u', T_dm is a unit upper triangular (i.e., the diagonal being 1); - // otherwise (i.e., if =='N' or 'n'), T_dm is a non-unit upper triangular. - // - // Note I: Intel MLK cblas_dtrsv() does not test for singularity or near-singulariy of the system. - // Such tests must be performed before calling this BLAS routine. - // Note II: if x_dv->v = b_dv->v, x_dv->v will be replaced by new values. - int _n, _i; - double *x, *b; - - if ( !T_dm || !b_dv || !x_dv ) fn_DisplayError(".../mathlib.c/SolveTriSysVector(): All input pointers must be created (memory-allocated)"); - else if ( !( T_dm->flag & (M_UT | M_LT) ) || !b_dv->flag ) fn_DisplayError(".../mathlib.c/SolveTriSysVector(): (1) R input matrix must be triangular. (2) R input vector must be given legal values"); - else { - _n = T_dm->nrows; - x = x_dv->v; - b = b_dv->v; - } - - for (_i=square(_n)-1; _i>=0; _i -= _n+1) - if (fabs(T_dm->M[_i])<=MACHINEZERO) - fn_DisplayError(".../mathlib.c/SolveTriSysVector(): The input triangular matrix is singular"); - - - if ( (_n != T_dm->ncols) || (_n != b_dv->n) || (_n != x_dv->n) ) fn_DisplayError(".../mathlib.c/SolveTriSysVector(): (1) R input matrix must be square. (2) Input vectors and the square matrix must have the same dimension"); - else if ( x == b) { - cblas_dtrsv(CblasColMajor, ( T_dm->flag & M_UT ) ? CblasUpper : CblasLower, - ((tn=='T') || (tn=='t')) ? CblasTrans : CblasNoTrans, - ((un=='U') || (tn=='u')) ? CblasUnit : CblasNonUnit, - _n, T_dm->M, _n, x, 1); - } - else { - memcpy(x, b, _n*sizeof(double)); - cblas_dtrsv(CblasColMajor, ( T_dm->flag & M_UT ) ? CblasUpper : CblasLower, - ((tn=='T') || (tn=='t')) ? CblasTrans : CblasNoTrans, - ((un=='U') || (tn=='u')) ? CblasUnit : CblasNonUnit, - _n, T_dm->M, _n, x, 1); - x_dv->flag = V_DEF; - } -} - - - - - - -void SymmetricMatrixTimesVector(double *x_v, const double a, const double *A_m, const double *a_v, const double b, const int _n, const char ul) { - //Output: x_v = a*A_m*a_v + b*X_m where x_v (_n-by-1) must be allocated (but needs not be initialized). - //Inputs: X_m?????????????????????? - // A_m: _n-by-_n symmetric matrix; - // a_v: _n-by-1; - // a, b: scalars; - // ul: if =='u' or 'U', upper triangular elements in A_m are filled; if =='l' or 'L', lower triangular elements in A_m are filled. - - cblas_dsymv(CblasColMajor, ((ul=='u') || (ul=='U')) ? CblasUpper : CblasLower, _n, a, A_m, _n, a_v, 1, b, x_v, 1); -} - - -void SolveTriangularSystemVector(double *x_v, const double *A_m, const double *b_v, const int _n, const char ul, const char tn, const char un) { - //Outputs: - // x_v(_n-by-1) = inv(A_m)*b_v. If x_v=b_v, b_v will be overwritten by x_v. - //------- - //Inputs: - // A_m: _n-by-_n upper or lower triangular matrix; - // b_v: _n-by-1 vector. - // ul: if =='u' or 'U', A_m is upper triangular; if =='l' or 'L', A_m is lower triangular. - // tn: if =='t' or 'T', A_m' (transpose), instead of A_m, will be used; if =='n', A_m itself (no transpose) will be used. - // un: if =='u' or 'U', A_m is a unit upper triangular (i.e., the diagonal being 1); - // if =='n' or 'N', A_m is a non-unit upper triangular. - // - // Computes x_v = inv(A_m)*b_v by solving a triangular system of equation A_m * x_v = b_v. - // Note I: Intel MLK cblas_dtrsv() does not test for singularity or near-singulariy of the system. - // Such tests must be performed before calling this BLAS routine. - // Note II: if x_v=b_v, b_v will be overwritten by x_v. - - if (x_v != b_v) memcpy(x_v, b_v, _n*sizeof(double)); - cblas_dtrsv(CblasColMajor, ((ul=='u') || (ul=='U')) ? CblasUpper : CblasLower, - ((tn=='t') || (tn=='T')) ? CblasTrans : CblasNoTrans, - ((un=='u') || (tn=='U')) ? CblasNonUnit : CblasNonUnit, - _n, A_m, _n, x_v, 1); -} - - - - - -//======================================================= -// MKL Vector Mathematical Library with default using my own routines. -//======================================================= -void VectorDotDivByVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv) { - //????????? NOT tested yet. 06/13/03. - //Output: x_dv = a_dv ./ b_dv (division element by elment) where x_dv, a_dv, and b_dv are all _n-by-1. - // The fastest way is to use MKL VML with x != a and x != b. - // If x_dv = a_dv, x_dv will be replaced by x_dv ./ b_dv. - // If x_dv = b_dv, x_dv will be replaced by a_dv ./ x_dv. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - int _i, _n; - double *x, *a, *b; - - - if ( !x_dv || !a_dv || !b_dv) fn_DisplayError(".../mathlib.c/VectorDotDivideVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/VectorDotDivideVector(): R input vectors must be given legal values"); - else if ( ((_n=x_dv->n) != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError(".../mathlib.c/VectorDotDivideVector(): Dimensions of all input vectors must be same"); - else { - x = x_dv->v; - a = a_dv->v; - b = b_dv->v; - } - - - #if defined (INTELCMATHLIBRARY) - if ( (x != a) && (x != b) ) { - vdDiv (_n, a, b, x); - x_dv->flag = V_DEF; - } - else - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i]/b[_i]; - #else //Default to my own routine. - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i]/b[_i]; - x_dv->flag = V_DEF; - #endif -} - -void ElementwiseVectorDivideVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv) -{ - //The fastest way is to use MKL VML with x != a and x != b. - //Output: x_dv = a_dv ./ b_dv (division element by elment) where x_dv, a_dv, and b_dv are all _n-by-1. - // If x_dv = a_dv, x_dv will be replaced by x_dv ./ b_dv. - // If x_dv = b_dv, x_dv will be replaced by a_dv ./ x_dv. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - int _i, _n; - double *x, *a, *b; - - if ( !x_dv || !a_dv || !b_dv) fn_DisplayError("mathlib.c/ElementwiseVectorDivideVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError("mathlib.c/ElementwiseVectorDivideVector(): R input vectors must be given legal values"); - else if ( ((_n=x_dv->n) != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError("mathlib.c/ElementwiseVectorDivideVector(): Dimensions of all input vectors must be same"); - else { - x = x_dv->v; - a = a_dv->v; - b = b_dv->v; - } - - - #if defined (INTELCMATHLIBRARY) - if ( (x != a) && (x != b) ) { - vdDiv (_n, a, b, x); - x_dv->flag = V_DEF; - } - else - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i]/b[_i]; - #else //Default to my own routine. - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i]/b[_i]; - x_dv->flag = V_DEF; - #endif -} - -void ElementwiseInverseofVector(TSdvector *y_dv, TSdvector *x_dv) { - //The fastest way is to use MKL VML with y_dv != x_dv; - //Outputs: - // If y_dv!=x_dv, y_dv = 1 ./ x_dv; - // If y_dv=x_dv, x_dv = 1 ./ x_dv. - - int _i; - #if !defined( INTELCMATHLIBRARY ) - int _n; - double *y; - #endif - double *x; - - if ( !x_dv || !x_dv->flag ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofVector(): (1) Input vector must be memory-allocated; (2) Legal values must be given"); - - #if defined( INTELCMATHLIBRARY ) - if ( y_dv == x_dv ) { - x = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) x[_i] = 1.0/x[_i]; - } - else { - if ( !y_dv ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofVector(): Output vector must be memory-allocated (but no need for legal values)"); - if ( x_dv->n != y_dv->n) fn_DisplayError(".../mathlib.c/ElementwiseInverseofVector(): Lengths of both input and output vectors must be same"); - vdInv (x_dv->n, x_dv->v, y_dv->v); - y_dv->flag = V_DEF; - } - #else - if ( y_dv == x_dv ) { - x = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) x[_i] = 1.0/x[_i]; - } - else { - if ( !y_dv ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofVector(): Output vector must be memory-allocated (but no need for legal values)"); - if ( (_n=x_dv->n) != y_dv->n) fn_DisplayError(".../mathlib.c/ElementwiseInverseofVector(): Lengths of both input and output vectors must be same"); - x = x_dv->v; - y = y_dv->v; - for (_i=_n-1; _i>=0; _i--) y[_i] = 1.0/x[_i]; - y_dv->flag = V_DEF; - } - #endif -} - -void ElementwiseSqrtofVector(TSdvector *y_dv, TSdvector *x_dv) -{ - //The fastest way is to use MKL VML with y_dv != x_dv; - //Outputs: - // If y_dv!=x_dv, y_dv = sqrt(x_dv); - // If y_dv=x_dv, x_dv = sqrt(x_dv); - - int _i; - #if !defined( INTELCMATHLIBRARY ) - int _n; - double *y; - #endif - double *x; - - if ( !x_dv || !x_dv->flag ) fn_DisplayError("mathlib.c/ElementwiseSqrtofVector(): (1) Input vector must be memory-allocated; (2) Legal values must be given"); - - #if defined( INTELCMATHLIBRARY ) - if ( y_dv == x_dv ) { - x = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) x[_i] = sqrt(x[_i]); - } - else { - if ( !y_dv ) fn_DisplayError("mathlib.c/ElementwiseSqrtofVector(): Output vector must be memory-allocated (but no need for legal values)"); - if ( x_dv->n != y_dv->n) fn_DisplayError("mathlib.c/ElementwiseSqrtofVector(): Lengths of both input and output vectors must be same"); - vdSqrt(x_dv->n, x_dv->v, y_dv->v); - y_dv->flag = V_DEF; - } - #else - if ( y_dv == x_dv ) { - x = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) x[_i] = sqrt(x[_i]); - } - else { - if ( !y_dv ) fn_DisplayError("mathlib.c/ElementwiseSqrtofVector(): Output vector must be memory-allocated (but no need for legal values)"); - if ( (_n=x_dv->n) != y_dv->n) fn_DisplayError("mathlib.c/ElementwiseSqrtofVector(): Lengths of both input and output vectors must be same"); - x = x_dv->v; - y = y_dv->v; - for (_i=_n-1; _i>=0; _i--) y[_i] = sqrt(x[_i]); - y_dv->flag = V_DEF; - } - #endif -} - -void ElementwiseLogofVector(TSdvector *y_dv, TSdvector *x_dv) -{ - //The fastest way is to use MKL VML with y_dv != x_dv; - //Outputs: - // If y_dv!=x_dv, y_dv = log(x_dv); - // If y_dv=x_dv, x_dv = log(x_dv); - - int _i; - #if !defined( INTELCMATHLIBRARY ) - int _n; - double *y; - #endif - double *x; - - if ( !x_dv || !x_dv->flag ) fn_DisplayError("mathlib.c/ElementwiseLogofVector(): (1) Input vector must be memory-allocated; (2) Legal values must be given"); - - #if defined( INTELCMATHLIBRARY ) - if ( y_dv == x_dv ) { - x = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) x[_i] = log(x[_i]); - } - else { - if ( !y_dv ) fn_DisplayError("mathlib.c/ElementwiseLogofVector(): Output vector must be memory-allocated (but no need for legal values)"); - if ( x_dv->n != y_dv->n) fn_DisplayError("mathlib.c/ElementwiseLogofVector(): Lengths of both input and output vectors must be same"); - vdLn(x_dv->n, x_dv->v, y_dv->v); - y_dv->flag = V_DEF; - } - #else - if ( y_dv == x_dv ) { - x = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) x[_i] = log(x[_i]); - } - else { - if ( !y_dv ) fn_DisplayError("mathlib.c/ElementwiseLogofVector(): Output vector must be memory-allocated (but no need for legal values)"); - if ( (_n=x_dv->n) != y_dv->n) fn_DisplayError("mathlib.c/ElementwiseLogofVector(): Lengths of both input and output vectors must be same"); - x = x_dv->v; - y = y_dv->v; - for (_i=_n-1; _i>=0; _i--) y[_i] = log(x[_i]); - y_dv->flag = V_DEF; - } - #endif -} - - -void ElementwiseInverseofMatrix(TSdmatrix *Y_dm, TSdmatrix *X_dm) -{ - //The fastest way is to use MKL VML with Y_dm != X_dm; - //Outputs: - // If Y_dm!=X_dm, Y_dm = 1 ./ X_dm; - // If Y_dm=X_dm, X_dm = 1 ./ X_dm. - - int _i, - nrows, ncols; - double *X; - #if !defined( INTELCMATHLIBRARY ) - double *Y; - #endif - - - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofMatrix(): (1) Input matrix must be memory-allocated; (2) Legal values must be given"); - - #if defined( INTELCMATHLIBRARY ) - if ( Y_dm == X_dm ) { - X = X_dm->M; - for (_i=X_dm->nrows*X_dm->ncols-1; _i>=0; _i--) X[_i] = 1.0/X[_i]; - } - else { - if ( !Y_dm ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofMatrix(): Output matrix must be memory-allocated (but no need for legal values)"); - if ( ((nrows=X_dm->nrows) != Y_dm->nrows) || ((ncols=X_dm->ncols) != Y_dm->ncols) ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofMatrix(): Dimensions of both input and output matrices must be same"); - vdInv (nrows*ncols, X_dm->M, Y_dm->M); - Y_dm->flag = M_GE; - } - #else //Default to my own routine. - if ( Y_dm == X_dm ) { - X = X_dm->M; - for (_i=X_dm->nrows*X_dm->ncols-1; _i>=0; _i--) X[_i] = 1.0/X[_i]; - } - else { - if ( !Y_dm ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofMatrix(): Output matrix must be memory-allocated (but no need for legal values)"); - if ( ((nrows=X_dm->nrows) != Y_dm->nrows) || ((ncols=X_dm->ncols) != Y_dm->ncols) ) fn_DisplayError(".../mathlib.c/ElementwiseInverseofMatrix(): Dimensions of both input and output matrices must be same"); - X = X_dm->M; - Y = Y_dm->M; - for (_i=_nrows*ncols-1; _i>=0; _i--) Y[_i] = 1.0/X[_i]; - Y_dm->flag = M_GE; - } - #endif -} - - - -//======================================================= -// Matrix routines (my own). -//======================================================= -void tz_VectorPlusMinusVector(TSdvector *x_dv, const TSdvector *a_dv, const double _alpha, const TSdvector *b_dv, const double _beta) -{ - //Output: x_dv = alpha*a_dv + beta*b_dv where x_dv is _n-by-1. - //Inputs: - // a_dv: _n-by-1 double vector. - // _alpha: double constant. - // b_dv: _n-by-1 double vector. - // _beta: double constant. - int _i, _n; - double *x, *a, *b; - - - if ( !x_dv || !a_dv || !b_dv) fn_DisplayError("mathlib.c/tz_VectorPlusMinusVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError("mathlib.c/tz_VectorPlusMinusVector(): R input vectors must be given values"); - else { - _n = x_dv->n; - x = x_dv->v; - a = a_dv->v; - b = b_dv->v; - } - if ( (_n != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError("mathlib.c/tz_VectorPlusMinusVector(): Dimensions of all input vectors must be same"); - else { - for (_i=_n-1; _i>=0; _i--) x[_i] = _alpha*a[_i] + _beta*b[_i]; - x_dv->flag = V_DEF; - } -} -void VectorPlusVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv) { - //Output: x_dv = a_dv + b_dv where x_dv is _n-by-1. - // If x_dv = a_dv, a_dv will be replaced by x_dv. - // If x_dv = b_dv, b_dv will be replaced by x_dv, - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - int _i, _n; - double *x, *a, *b; - - - if ( !x_dv || !a_dv || !b_dv) fn_DisplayError(".../mathlib.c/VectorPlusVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/VectorPlusVector(): R input vectors must be given values"); - else { - _n = x_dv->n; - x = x_dv->v; - a = a_dv->v; - b = b_dv->v; - } - if ( (_n != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError(".../mathlib.c/VectorPlusVector(): Dimensions of all input vectors must be same"); - else { - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i] + b[_i]; - x_dv->flag = V_DEF; - } -} -void VectorMinusVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv) -{ - //Output: x_dv = a_dv - b_dv where x_dv is _n-by-1. - // If x_dv = a_dv, x_dv will be replaced by x_dv - b_dv. - // If x_dv = b_dv, x_dv will be replaced by a_dv - x_dv. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - int _i, _n; - double *x, *a, *b; - - - if ( !x_dv || !a_dv || !b_dv) fn_DisplayError(".../mathlib.c/VectorMinusVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/VectorMinusVector(): R input vectors must be given values"); - else { - x = x_dv->v; - a = a_dv->v; - b = b_dv->v; - } - if ( ((_n = x_dv->n) != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError(".../mathlib.c/VectorMinusVector(): Dimensions of all input vectors must be same"); - else { - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i] - b[_i]; - x_dv->flag = V_DEF; - } -} - - -void VectorPlusVectorUpdate(TSdvector *x_dv, const TSdvector *b_dv) { - //Output: x_dv = b_dv + x_dv where x_dv is _n-by-1. - //Inputs: - // b_dv: _n-by-1 double vector. - int _n, _i; - double *x, *b; - - - if ( !x_dv || !b_dv ) fn_DisplayError(".../mathlib.c/VectorPlusVectorUpdate(): All input vectors must be created (memory-allocated)"); - if ( !b_dv->flag || !x_dv->flag ) fn_DisplayError(".../mathlib.c/VectorPlusVectorUpdate(): All input vectors must be given values"); - if ( (_n=x_dv->n) != b_dv->n ) fn_DisplayError(".../mathlib.c/VectorPlusVectorUpdate(): Dimensions of all input vectors must be same"); - - x = x_dv->v; - b = b_dv->v; - for (_i=_n-1; _i>=0; _i--) x[_i] += b[_i]; -} - - -void VectorDotTimesVector(TSdvector *x_dv, const TSdvector *a_dv, TSdvector *b_dv, const double _alpha, const double _beta) { - //Output: - // x_dv is _n-by-1. - // x_dv = _alpha * a_dv .* b_dv + _beta * x_dv if x_dv != b_dv. - // x_dv = _alpha * a_dv .* x_dv + _beta * x_dv if x_dv = b_dv. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - // _alpha: double scalar. - // _beta: a double scalar. - int _i, _n; - double *x, *a, *b; - - - if ( !x_dv || !a_dv || !b_dv) fn_DisplayError(".../mathlib.c/VectorDotTimesVector(): All input vectors must be created (memory-allocated)"); - else if ( !a_dv->flag || !b_dv->flag ) fn_DisplayError(".../mathlib.c/VectorDotTimesVector(): Both R input vectors must be given values"); - else { - _n = x_dv->n; - x = x_dv->v; - a = a_dv->v; - b = b_dv->v; - } - if ( (_n != a_dv->n) || (_n != b_dv->n) ) fn_DisplayError(".../mathlib.c/VectorDotTimesVector(): Dimensions of all input vectors must be same"); - - - if ( _alpha==1.0 ) { - if ( _beta==0.0 ) { - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i] * b[_i]; - if (!x_dv->flag) x_dv->flag = V_DEF; - } - else if ( _beta==1.0 ) { - for (_i=_n-1; _i>=0; _i--) x[_i] += a[_i] * b[_i]; - if (!x_dv->flag) x_dv->flag = V_DEF; - } - else { - for (_i=_n-1; _i>=0; _i--) x[_i] = a[_i] * b[_i] + _beta * x[_i]; - if (!x_dv->flag) x_dv->flag = V_DEF; - } - } - else { - if ( _beta==0.0 ) { - for (_i=_n-1; _i>=0; _i--) x[_i] = _alpha * a[_i] * b[_i]; - if (!x_dv->flag) x_dv->flag = V_DEF; - } - else if ( _beta==1.0 ) { - for (_i=_n-1; _i>=0; _i--) x[_i] += _alpha * a[_i] * b[_i]; - if (!x_dv->flag) x_dv->flag = V_DEF; - } - else { - for (_i=_n-1; _i>=0; _i--) x[_i] = _alpha * a[_i] * b[_i] + _beta * x[_i]; - if (!x_dv->flag) x_dv->flag = V_DEF; - } - } -} - -void SwapColsofMatrix(TSdmatrix *X_dm, int j1, int j2) -{ - //??????? NOT tested yet. - //Ouputs: - // The j1_th column of X_dm is swapped with the j2_th column of X_dm. - //Inputs: - // X_dm: Memory allocated and legal values given already. - // j1: The j1_th column of X_dm. - // j2: The j2_th column of X_dm. - - int nrows; - double *M1, *M2; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): (1) Input matrix X must be created (memory-allocated); (2) Legal values must be given"); - if (j1 >= X_dm->ncols) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): The j1_th column specified for the input matrix X exceeds its column dimension"); - if (j2 >= X_dm->ncols) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): The j2_th column specified for the input matrix X exceeds its column dimension"); - if (j1 == j2) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): The two columns for swapping must be different"); - - #if defined( INTELCMATHLIBRARY ) - M1 = X_dm->M + j1*(nrows=X_dm->nrows); //Points to the beginning of the j1_th column. - M2 = X_dm->M + j2*nrows; //Points to the beginning of the j2_th column. - cblas_dswap(nrows, M1, 1, M2, 1); - #else - fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): Haven't got time to write my own for-loop routine to swap two columns"); - #endif -} -void SwapColsofMatrices(TSdmatrix *X1_dm, int j1, TSdmatrix *X2_dm, int j2) -{ - //Ouputs: - // The j1_th column of X1_dm is swapped with the j2_th column of X2_dm. - //Inputs: - // X1_dm: Memory allocated and legal values given already. - // X2_dm: Memory allocated and legal values given already. - // j1: The j1_th column of X1_dm. - // j2: The j2_th column of X2_dm. - - int nrows; - double *M1, *M2; - - if ( !X1_dm || !X1_dm->flag ) fn_DisplayError(".../mathlib.c/SwapColsofMatrices(): (1) Input matrix X1 must be created (memory-allocated); (2) Legal values must be given"); - if ( !X2_dm || !X2_dm->flag ) fn_DisplayError(".../mathlib.c/SwapColsofMatrices(): (1) Input matrix X2 must be created (memory-allocated); (2) Legal values must be given"); - if ( X1_dm == X2_dm ) fn_DisplayError(".../mathlib.c/SwapColsofMatrices(): The two input matrices must be different"); - if (j1 >= X1_dm->ncols) fn_DisplayError(".../mathlib.c/SwapColsofMatrices(): The jth column specified for the input matrix X1 exceeds its column dimension"); - if (j2 >= X2_dm->ncols) fn_DisplayError(".../mathlib.c/SwapColsofMatrices(): The jth column specified for the input matrix X1 exceeds its column dimension"); - if ( (nrows=X1_dm->nrows) != X2_dm->nrows ) fn_DisplayError(".../mathlib.c/SwapColsofMatrices(): The number of rows for both input matrices must be the same"); - - - #if defined (INTELCMATHLIBRARY) - M1 = X1_dm->M + j1*nrows; //Points to the beginning of the j1_th column. - M2 = X2_dm->M + j2*nrows; //Points to the beginning of the j2_th column. - cblas_dswap(nrows, M1, 1, M2, 1); - #else - fn_DisplayError(".../mathlib.c/SwapColsofMatrices(): Haven't got time to write my own for-loop routine to swap two columns"); - #endif -} -void SwapPositionsofMatrix(TSdmatrix *X_dm, int j1, int j2) { - //Ouputs: - // Column operation: first, the j1_th column of X_dm is swapped with the j2_th column of X_dm. - // Row operation: second, the j1_th row of X_dm is swapped with the j2_th row of X_dm. - //Inputs: - // X_dm: Memory allocated and legal values given already. - // j1: The j1_th column and row of X_dm. - // j2: The j2_th column and row of X_dm. - - int nrows, ncols; - double *M1, *M2; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): (1) Input matrix X must be created (memory-allocated); (2) Legal values must be given"); - if (j1 >= (ncols=X_dm->ncols) || j1 >= (nrows=X_dm->nrows) ) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): The j1_th column or row specified for the input matrix X exceeds its column or row dimension"); - if (j2 >= X_dm->ncols || j2 >= X_dm->ncols ) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): The j2_th column or row specified for the input matrix X exceeds its column or row dimension"); - if (j1 == j2) fn_DisplayError(".../mathlib.c/SwapColsofMatrix(): The two columns for swapping must be different"); - - #if defined( INTELCMATHLIBRARY ) - M1 = X_dm->M + j1*nrows; //Points to the beginning of the j1_th column. - M2 = X_dm->M + j2*nrows; //Points to the beginning of the j2_th column. - cblas_dswap(nrows, M1, 1, M2, 1); //Swaps columns. - // - M1 = X_dm->M + j1; //Points to the beginning of the j1_th row. - M2 = X_dm->M + j2; //Points to the beginning of the j2_th row. - cblas_dswap(ncols, M1, nrows, M2, nrows); //Swaps corresponding rows. - #else - fn_DisplayError(".../mathlib.c/SwapPositionsofMatrix(): Haven't got time to write my own for-loop routine to swap two columns and then two corresponding rows"); - #endif -} - -void SwapMatricesofCell(TSdcell *A_dc, int c1, int c2) -{ - //Ouputs: - // A_dc->C[c1] and A_dc->C[c2] are swapped. - //Inputs: - // A_dc: Memory allocated and legal values given already. - // c1, c2: Positions of cells. - - int _n; - TSdmatrix *tpnter2dm = NULL; - - if ( !A_dc ) fn_DisplayError(".../mathlib.c/SwapMatricesofCell(): Input cell A_dc must be created (memory-allocated)"); - _n = A_dc->ncells; - if ( (c1>=_n) || (c1<0) || (c2>=_n) || (c2<0) ) fn_DisplayError(".../mathlib.c/SwapMatricesofCell(): c1 and c2 must be between 0 and A_dc->ncells inclusive"); - - tpnter2dm = A_dc->C[c1]; - A_dc->C[c1] = A_dc->C[c2]; - A_dc->C[c2] = tpnter2dm; -} - -void SwapVectorsofCellvec(TSdcellvec *x_dcv, int c1, int c2) -{ - //Ouputs: - // x_dcv->C[c1] and x_dcv->C[2] are swapped. - //Inputs: - // x_dcv: Memory allocated and legal values given already. - // c1, c2: Positions of cells. - - int _n; - TSdvector *tpnter2dv = NULL; - - if ( !x_dcv ) fn_DisplayError(".../mathlib.c/SwapVectorsofCellvec(): Input cell vector x_dcv must be created (memory-allocated)"); - _n = x_dcv->ncells; - if ( (c1>=_n) || (c1<0) || (c2>=_n) || (c2<0) ) fn_DisplayError(".../mathlib.c/SwapVectorsofCellvec(): c1 and c2 must be between 0 and x_dcv->ncells inclusive"); - - tpnter2dv = x_dcv->C[c1]; - x_dcv->C[c1] = x_dcv->C[c2]; - x_dcv->C[c2] = tpnter2dv; -} -//-- -void SwapVectorsofCellvec_int(TSicellvec *x_icv, int c1, int c2) -{ - //Ouputs: - // x_icv->C[c1] and x_icv->C[2] are swapped. - //Inputs: - // x_icv: Memory allocated and legal values given already. - // c1, c2: Positions of cells. - - int _n; - TSivector *tpnter2iv = NULL; - - if ( !x_icv ) fn_DisplayError(".../mathlib.c/SwapVectorsofCellvec_int(): Input cell vector x_icv must be created (memory-allocated)"); - _n = x_icv->ncells; - if ( (c1>=_n) || (c1<0) || (c2>=_n) || (c2<0) ) fn_DisplayError(".../mathlib.c/SwapVectorsofCellvec_int(): c1 and c2 must be between 0 and x_icv->ncells inclusive"); - - tpnter2iv = x_icv->C[c1]; - x_icv->C[c1] = x_icv->C[c2]; - x_icv->C[c2] = tpnter2iv; -} - - -//=== The following is NOT efficient. -//#if defined( INTELCMATHLIBRARY ) -//void SwapMatricesofCell(TSdcell *X_dc, int c1, int c2) -//{ -// //??????? NOT tested yet. -// //Ouputs: -// // The c1_th matrix of X_dc is swapped with the c2_th matrix of X_dc. -// //Inputs: -// // X_dc: Memory allocated and legal values given already. -// // c1: The c1_th matrix of X_dc. -// // c2: The c2_th matrix of X_dc. - -// int dim; - - -// if ( !X_dc ) fn_DisplayError(".../mathlib.c/SwapMatricesofCell(): input cell X_dc must be created (memory-allocated)"); -// if ( c1 >= X_dc->ncells || c2 >= X_dc->ncells ) fn_DisplayError(".../mathlib.c/SwapMatricesofCell(): the c1_th or c2_th cell exceeds the cell dimension"); -// if ( c1 == c2 ) fn_DisplayError(".../mathlib.c/MatricesofCell(): the two matrices for swapping must be different"); -// if ( !X_dc->C[c1]->flag || !X_dc->C[c2]->flag ) fn_DisplayError(".../mathlib.c/MatricesofCell(): both matrices for swapping must have legal values"); -// if ( (dim=X_dc->C[c1]->nrows*X_dc->C[c1]->ncols) != (X_dc->C[c2]->nrows*X_dc->C[c2]->ncols) ) -// fn_DisplayError(".../mathlib.c/MatricesofCell(): the two matrices for swapping must have the same dimension"); - - -// cblas_dswap(dim, X_dc->C[c1]->M, 1, X_dc->C[c2]->M, 1); -//} -//#else -////.../mathlib.c/SwapColsofMatrix(): Haven't got time to write my own for-loop routine to swap two columns. 19 Oct. 03 -//#endif - - -//=== Do NOT know what the following is. 20 Oct. 03. -//void SwapPositionsofCell(TSdcell *X_dc, const int c1, const int c2) -//{ -// //???? Not tested yet. -// int dim; - - -// if ( !X_dc ) fn_DisplayError(".../mathlib.c/SwapMatricesofCell(): input cell A_dc must be created (memory-allocated)"); -// if ( c1 >= X_dc->ncells || c2 >= X_dc->ncells ) fn_DisplayError(".../mathlib.c/SwapMatricesofCell(): the c1_th or c2_th cell exceeds the cell dimension"); -// if ( c1 == c2 ) fn_DisplayError(".../mathlib.c/MatricesofCell(): the two matrices for swapping must be different"); -// if ( !X_dc->C[c1]->flag || !X_dc->C[c2]->flag ) fn_DisplayError(".../mathlib.c/MatricesofCell(): both matrices for swapping must have legal values"); -// if ( (dim=X_dc->C[c1]->nrows*X_dc->C[c1]->ncols) != (X_dc->C[c2]->nrows*X_dc->C[c2]->ncols) ) -// fn_DisplayError(".../mathlib.c/MatricesofCell(): the two matrices for swapping must have the same dimension"); - - -// cblas_dswap(dim, X_dc->C[c1]->M, 1, X_dc->C[c2]->M, 1); -//} - - -void PermuteColsofMatrix(TSdmatrix *A_dm, const TSivector *indx_iv) -{ - //Ouputs: - // A_dm (m-by-n) is replaced by permuted columns only, according to indx_iv. - //Inputs: - // A_dm (m-by-n): Memory allocated and legal values given already. - // indx_iv (n-by-1): index for columns and rows of A_dm to exchanged simultaneously. Example: indx_-v->v = {2 0 1} (base 0) for the 3-by-3 matrix - // means that original column 2 is column 0, original column 0 is column 1, etc. - - double *B_pd = NULL, - *A; - int _j, _n, _m, mn, - *indx; - - if ( !A_dm || !A_dm->flag ) fn_DisplayError(".../mathlib.c/PermuteColsofMatrix(): input matrix A_dm must (1) be created (memory allocated) and (2) have legal values"); - if ( !indx_iv->flag || (_n=A_dm->ncols) != indx_iv->n ) fn_DisplayError(".../mathlib.c/PermuteColsofMatrix(): (1) sorted index vector, indx_iv, must have legal values; (2) its length must match the number of columns of the input matrix A_dm"); - - - //=== Memory allocated for this function. - B_pd = tzMalloc(mn=_n*(_m=A_dm->nrows), double); - - indx = indx_iv->v; - memcpy(B_pd, A = A_dm->M, mn*sizeof(double)); - for (_j=_n-1; _j>=0; _j--) - memcpy(A+_j*_m, B_pd+indx[_j]*_m, _m*sizeof(double)); - - //=== Destroys memory allocated for this function. - tzDestroy(B_pd); -} - -void PermuteRowsofMatrix(TSdmatrix *A_dm, const TSivector *indx_iv) -{ - //Ouputs: - // A_dm (n-by-m) is replaced by permuted rows only, according to indx_iv. - //Inputs: - // A_dm (n-by-m): Memory allocated and legal values given already. - // indx_iv (n-by-1): index for columns and rows of A_dm to exchanged simultaneously. Example: indx_-v->v = {2 0 1} (base 0) for the 3-by-3 matrix - // means that original column 2 is column 0, original column 0 is column 1, etc. - - double *B_pd = NULL, - *A; - int _i, _n, _m, mn, - *indx; - #if !defined( INTELCMATHLIBRARY ) - int _j; - #endif - - if ( !A_dm || !A_dm->flag ) fn_DisplayError(".../mathlib.c/PermuteRowsMatrix(): input matrix A_dm must (1) be created (memory allocated) and (2) have legal values"); - if ( !indx_iv->flag || (_n=A_dm->nrows) != indx_iv->n ) fn_DisplayError(".../mathlib.c/PermuteRowsMatrix(): (1) indx_iv must have legal values; (2) number of rows in A_dm must match the length of indx_iv"); - - - //=== Memory allocated for this function. - B_pd = tzMalloc(mn=_n*(_m=A_dm->ncols), double); - - indx = indx_iv->v; - memcpy(B_pd, A = A_dm->M, mn*sizeof(double)); - #if defined( INTELCMATHLIBRARY ) - for (_i=_n-1; _i>=0; _i--) - cblas_dcopy(_m, B_pd+indx[_i], _n, A+_i, _n); - #else //Default to my own routine. - _m = A_dm->ncols; - for (_j=_m-1; _j>=0; _j--) - for (_i=_n-1; _i>=0; _i--) - A[mos(_i, _j, _n)] = B_pd[mos(indx[_i], _j, _n)]; - #endif - - //=== Destroys memory allocated for this function. - tzDestroy(B_pd); -} - -void PermuteMatrix(TSdmatrix *A_dm, const TSivector *indx_iv) -{ - //Ouputs: - // A_dm (n-by-n) is replaced by permuted columns and rows simultaneously. The permutation is dicated by indx_iv. - //Inputs: - // A_dm (n-by-n): Memory allocated and legal values given already. - // indx_iv (n-by-1): index for columns and rows of A_dm to exchanged simultaneously. Example: indx_-v->v = {2 0 1} (base 0) for the 3-by-3 matrix - // means that original column 2 and row 2 are column 0 and row 0, original column 0 and row 0 are column 1 and row 1, etc. - - double *B_pd = NULL, - *A; - int _i, _j, _n, n2, - *indx; - - if ( !A_dm || !A_dm->flag ) fn_DisplayError(".../mathlib.c/PermuteMatrix(): input matrix A_dm must (1) be created (memory allocated) and (2) have legal values"); - if ( !indx_iv->flag || (_n=A_dm->nrows) != A_dm->ncols || _n != indx_iv->n ) fn_DisplayError(".../mathlib.c/PermuteMatrix(): (1) indx_iv must have legal values; (2) input matrix A_dm must be square; (3) it dimension must coincide with the length of indx_iv"); - - - //=== Memory allocated for this function. - B_pd = tzMalloc(n2=_n*_n, double); - - indx = indx_iv->v; - memcpy(B_pd, A = A_dm->M, n2*sizeof(double)); - for (_j=_n-1; _j>=0; _j--) - for (_i=_n-1; _i>=0; _i--) - A[mos(_i, _j, _n)] = B_pd[mos(indx[_i], indx[_j], _n)]; - - - //=== Destroys memory allocated for this function. - tzDestroy(B_pd); -} -//=== The following works but may be less efficient and definitely hard to understand. -// void PermuteMatrix(TSdmatrix *A_dm, const TSivector *indx_iv) -// { -// //Ouputs: -// // A_dm is replaced by permuted columns and rows simultaneously. The permutation is dicated by indx_iv. -// //Inputs: -// // A_dm: Memory allocated and legal values given already. -// // indx_iv: index for columns and rows of A_dm to exchanged simultaneously. Example: indx_-v->v = {2 0 1} (base 0) for the 3-by-3 matrix -// // means that original column 2 and row 2 are column 0 and row 0, original column 0 and row 0 are column 1 and row 1, etc. -// -// double *B_pd = NULL, -// *A; -// int _i, _n, n2, -// *indx; -// -// if ( !A_dm || !A_dm->flag ) fn_DisplayError(".../mathlib.c/PermuteMatrix(): input matrix A_dm must (1) be created (memory allocated) and (2) have legal values"); -// if ( (_n=A_dm->nrows) != A_dm->ncols || _n != indx_iv->n ) fn_DisplayError(".../mathlib.c/PermuteMatrix(): (1) input matrix A_dm must be square; (2) it dimension must coincide with the length of indx_iv"); -// -// -// //=== Memory allocated for this function. -// B_pd = tzMalloc(n2=_n*_n, double); -// -// indx = indx_iv->v; -// memcpy(B_pd, A = A_dm->M, n2*sizeof(double)); -// for (_i=0; _i<n2; _i++) A[_i] = B_pd[indx[_i%_n]+indx[_i/_n]*_n]; -// -// //=== Destroys memory allocated for this function. -// tzDestroy(B_pd); -// } - - -void PermuteMatricesofCell(TSdcell *A_dc, const TSivector *indx_iv) -{ - //Ouputs: - // A_dc is replaced by permuted matrices. The permutation is dicated by indx_iv. - //Inputs: - // A_dc: Memory allocated and legal values given already. - // indx_iv: index for matrices of A_dc to exchanged simultaneously. Example: indx_-v->v = {2 0 1} (base 0) for the 3-by-1 cell - // means that original matrix 2 is matrix 0, original matrix 0 is matrix 1, etc. - - int _i, _n, - *indx_p; - TSdmatrix **tA_p2dm = NULL; - - if ( !A_dc || !indx_iv || !indx_iv->flag ) fn_DisplayError(".../mathlib.c/PermuteMatricesofCell(): (1) input cell A_dc must be created (memory-allocated); (2) index vector indx_iv must be created and have legal values"); - if ( (_n=A_dc->ncells) != indx_iv->n ) fn_DisplayError(".../mathlib.c/PermuteMatricesofCell(): number of cells must match the length of indx_iv"); - indx_p = indx_iv->v; - - - //=== Memory allocated for this function. - tA_p2dm = tzMalloc(_n, TSdmatrix *); - - for (_i=_n-1; _i>=0; _i--) tA_p2dm[_i] = A_dc->C[indx_p[_i]]; - //=== This one is less efficient than the following: for (_i=_n-1; _i>=0; _i--) A_dc->C[_i] = tA_p2dm[_i]; - memcpy(A_dc->C, tA_p2dm, _n*sizeof(TSdmatrix *)); - - //=== Destroys memory allocated for this function. - tzDestroy(tA_p2dm); -} - - -void ScalarTimesColofMatrix(TSdvector *y_dv, double _alpha, TSdmatrix *X_dm, int _j) -{ - //????????? Default option, in the #else, has NOT been tested yet! - //Ouputs: - // If y_dv!=NULL, y_dv is the jth column of X_dm is multiplied by _alpha. - // If !y_dv, the jth column of X_dm is replaced by the new value, which will be multiplied by _alpha. - //Inputs: - // _alpha: Scalar. - // X_dm: Memory allocated and legal values given already. - // _j: The jth column of X_dm. - - #if !defined( INTELCMATHLIBRARY ) - int _i; - #endif - int nrows; - double *M, *v; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix(): (1) Input matrix must be created (memory-allocated); (2) Legal values must be given"); - if (_j >= X_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix(): The jth column specified for the input matrix exceeds the column dimension"); - - #if defined( INTELCMATHLIBRARY ) - M = X_dm->M + _j*(nrows=X_dm->nrows); //Points to the beginning of the jth column. - if (!y_dv) cblas_dscal(nrows, _alpha, M, 1); - else { - memcpy(v=y_dv->v, M, nrows*sizeof(double)); - cblas_dscal(nrows, _alpha, v, 1); - y_dv->flag = V_DEF; - } - #else - Need to be tested for the following. - // - // M = X_dm->M + (_j+1)*(nrows=X_dm->nrows) - 1; //Points to the end of the jth column. - // if (!y_dv) - // for (_i=nrows-1; _i>=0; _i--, M--) *M = _alpha * (*M); - // else { - // v = y_dv->v; - // for (_i=nrows-1; _i>=0; _i--, M--) v[_i] = _alpha * (*M); - // y_dv->flag = V_DEF; - // } - #endif -} -void ScalarTimesColofMatrix2ColofMatrix(TSdmatrix *Y_dm, int jy, double _alpha, TSdmatrix *X_dm, int jx) -{ - //Ouputs: - // If Y_dm!=NULL, the jy_th column of Y_dm is the jx_th column of X_dm multiplied by _alpha. - // If !Y_dm, the jx_th column of X_dm is replaced by the new value, which will be multiplied by _alpha. - //Inputs: - // _alpha: Scalar. - // X_dm: Memory allocated and legal values given already. - // jy: The jy_th column of Y_dm. - // yx: The jx_th column of X_dm. - - #if !defined( INTELCMATHLIBRARY ) - int _i; - #endif - int nrows_x; - double *Mx, *My; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): (1) Input matrix must be created (memory-allocated); (2) Legal values must be given"); - if (jx >= X_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The jth column specified for the input matrix exceeds the column dimension"); - - #if defined( INTELCMATHLIBRARY ) - Mx = X_dm->M + jx*(nrows_x=X_dm->nrows); //Points to the beginning of the jth column. - if (!Y_dm) cblas_dscal(nrows_x, _alpha, Mx, 1); - else { - if (jy >= Y_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The jth column specified for the output matrix exceeds the column dimension"); - if ( nrows_x != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The number of rows for both input and output matrices must be the same"); - - My = Y_dm->M + jy*nrows_x; //Points to the beginning of the jth column. - memcpy(My, Mx, nrows_x*sizeof(double)); - cblas_dscal(nrows_x, _alpha, My, 1); - } - #else - Mx = X_dm->M + (jx+1)*(nrows_x=X_dm->nrows) - 1; //Points to the end of the jth column. - if (!Y_dm) - for (_i=nrows_x-1; _i>=0; _i--, Mx--) *Mx = _alpha * (*Mx); - else { - if (jy >= Y_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The jth column specified for the output matrix exceeds the column dimension"); - if ( nrows_x != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The number of rows for both input and output matrices must be the same"); - - My = Y_dm->M + (jy+1)*nrows_x - 1; //Points to the end of the jth column. - for (_i=nrows_x-1; _i>=0; _i--, Mx--, My--) *My = _alpha * (*Mx); - } - #endif -} - - -void ScalarTimesColofMatrixPlusVector2ColofMatrix(TSdmatrix *Y_dm, int jy, double _alpha, TSdmatrix *X_dm, int jx, double _beta, TSdvector *x_dv) { - //Ouputs: - // If Y_dm!=NULL, Y(:,jy) = alpha*X(:,jx) + beta*x. - // If !Y_dm, X(:,jx) = alpha*X(:,jx) + beta*x. - //Inputs: - // _alpha: Scalar. - // _beta: Scalar. - // X_dm: Memory allocated and legal values given already. - // jy: The jy_th column of Y_dm. - // yx: The jx_th column of X_dm. - - int _i, nrows_x; - double *Mx, *My, *v; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrixPlusVector2ColofMatrix(): (1) Input matrix must be created (memory-allocated); (2) Legal values must be given"); - if (jx >= X_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrixPlusVector2ColofMatrix(): The jth column specified for the input matrix exceeds the column dimension"); - if ( !x_dv || !x_dv->flag ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrixPlusVector2ColofMatrix(): (1) input vectr must be created (memory-allocated); (2) legal values must be given"); - - if (_beta == 0.0) { - #if defined( INTELCMATHLIBRARY ) - Mx = X_dm->M + jx*(nrows_x=X_dm->nrows); //Points to the beginning of the jth column. - if (!Y_dm) cblas_dscal(nrows_x, _alpha, Mx, 1); - else { - if (jy >= Y_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The jth column specified for the output matrix exceeds the column dimension"); - if ( nrows_x != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The number of rows for both input and output matrices must be the same"); - - My = Y_dm->M + jy*nrows_x; //Points to the beginning of the jth column. - memcpy(My, Mx, nrows_x*sizeof(double)); - cblas_dscal(nrows_x, _alpha, My, 1); - } - #else - Mx = X_dm->M + (jx+1)*(nrows_x=X_dm->nrows) - 1; //Points to the end of the jth column. - if (!Y_dm) - for (_i=nrows_x-1; _i>=0; _i--, Mx--) *Mx = _alpha * (*Mx); - else { - if (jy >= Y_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The jth column specified for the output matrix exceeds the column dimension"); - if ( nrows_x != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrix2ColofMatrix(): The number of rows for both input and output matrices must be the same"); - - My = Y_dm->M + (jy+1)*nrows_x - 1; //Points to the end of the jth column. - for (_i=nrows_x-1; _i>=0; _i--, Mx--, My--) *My = _alpha * (*Mx); - } - #endif - } - else { - Mx = X_dm->M + (jx+1)*(nrows_x=X_dm->nrows) - 1; //Points to the end of the jth column. - if ( nrows_x != x_dv->n ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrixPlusVector2ColofMatrix(): The length of the input vector must match the number of rows in the input matrix"); - - if (!Y_dm) { - if ( _alpha == 1.0 && _beta == 1.0 ) - for (_i=nrows_x-1, v=x_dv->v+_i; _i>=0; _i--, Mx--, v--) *Mx = *Mx + *v; - else if ( _alpha == 1.0 ) - for (_i=nrows_x-1, v=x_dv->v+_i; _i>=0; _i--, Mx--, v--) *Mx = _alpha * (*Mx) + *v; - else - for (_i=nrows_x-1, v=x_dv->v+_i; _i>=0; _i--, Mx--, v--) *Mx = _alpha * (*Mx) + _beta * (*v); - } - else { - if (jy >= Y_dm->ncols) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrixPlusVector2ColofMatrix(): The jth column specified for the output matrix exceeds the column dimension"); - if ( nrows_x != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ScalarTimesColofMatrixPlusVector2ColofMatrix(): The number of rows for both input and output matrices must be the same"); - - My = Y_dm->M + (jy+1)*nrows_x - 1; //Points to the end of the jth column. - if ( _alpha == 1.0 && _beta == 1.0 ) - for (_i=nrows_x-1, v=x_dv->v+_i; _i>=0; _i--, Mx--, My--, v--) *My = *Mx + *v; - else if ( _alpha == 1.0 ) - for (_i=nrows_x-1, v=x_dv->v+_i; _i>=0; _i--, Mx--, My--, v--) *My = _alpha * (*Mx) + *v; - else - for (_i=nrows_x-1, v=x_dv->v+_i; _i>=0; _i--, Mx--, My--, v--) *My = _alpha * (*Mx) + _beta * (*v); - } - } -} - - -void MatrixDotDivideVector_row(TSdmatrix *Y_dm, TSdmatrix *X_dm, TSdvector *x_dv, double _alpha, double _beta) -{ - //Outputs: - // If (Y_dm != X_dm), Y_dm(ix, :) = _alpha * X_dm(ix, :) ./ x_dv + _beta * X_dm(ix, :), for all ix. - // If (Y_dm = X_dm), X_dm(ix, :) = _alpha * X_dm(ix, :) ./ x_dv + _beta * X_dm(ix, :), for all ix. - //Inputs: - // _alpha: double scalar. - // _beta: double scalar. - - int _i, cnt, ncols_x, nrows_x, nrows_xm1, ix; - double *X, *x, *Y, xinv; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixDotDivideVector(): (1) Input matrix must be created (memory-allocated); (2) Legal values must be given"); - if ( !x_dv || !x_dv->flag ) fn_DisplayError(".../mathlib.c/MatrixDotDivideVector(): (1) Input vector must be created (memory-allocated); (2) Legal values must be given"); - if ( (ncols_x=X_dm->ncols) != x_dv->n ) fn_DisplayError(".../mathlib.c/MatrixDotDivideVector(): Number of columns in the input matrix must match the length of the input vector"); - X = X_dm->M; - x = x_dv->v; - nrows_xm1 = (nrows_x=X_dm->nrows)-1; - - - if ( _beta==0.0 ) { - if ( Y_dm == X_dm ) { - for (ix=nrows_x*ncols_x-1, cnt=ncols_x-1; ix>=nrows_xm1; ix -= nrows_x, cnt--) { - //Last row of X_dm - xinv = _alpha/x[cnt]; - for (_i=ix-nrows_x+1; _i<=ix; _i++) X[_i] *= xinv; //Must _i<=ix, not _i<ix. For each column at time. - } - } - else { - Y = Y_dm->M; - if ( ncols_x != Y_dm->ncols || nrows_x != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/MatrixDotDivideVector(): Dimension of output matrix Y_dm must be the same as that of input matrix X_dm"); - for (ix=nrows_x*ncols_x-1, cnt=ncols_x-1; ix>=nrows_xm1; ix -= nrows_x, cnt--) { - //Last row of X_dm - xinv = _alpha/x[cnt]; - for (_i=ix-nrows_x+1, cnt=0; _i<=ix; _i++, cnt++) Y[_i] = X[_i] * xinv; //Must _i<=ix, not _i<ix. For each column at time. - } - Y_dm->flag = M_GE; - } - } - else { - if ( Y_dm == X_dm ) { - for (ix=nrows_x*ncols_x-1, cnt=ncols_x-1; ix>=nrows_xm1; ix -= nrows_x, cnt--) { - //Last row of X_dm - xinv = _alpha/x[cnt] + _beta; - for (_i=ix-nrows_x+1; _i<=ix; _i++) X[_i] *= xinv; //Must _i<=ix, not _i<ix. For each column at time. - } - } - else { - Y = Y_dm->M; - if ( ncols_x != Y_dm->ncols || nrows_x != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/MatrixDotDivideVector(): Dimension of output matrix Y_dm must be the same as that of input matrix X_dm"); - for (ix=nrows_x*ncols_x-1, cnt=ncols_x-1; ix>=nrows_xm1; ix -= nrows_x, cnt--) { - //Last row of X_dm - xinv = _alpha/x[cnt] + _beta; - for (_i=ix-nrows_x+1, cnt=0; _i<=ix; _i++, cnt++) Y[_i] = X[_i] * xinv; //Must _i<=ix, not _i<ix. For each column at time. - } - Y_dm->flag = M_GE; - } - } -} - - -void RowofMatrixDotDivideVector(TSdvector *y_dv, TSdmatrix *X_dm, int ix, TSdvector *x_dv, double _alpha, double _beta) -{ - //??????? NOT tested yet, 01/02/04. - //Outputs: - // If (y_dv), y_dv = _alpha * X_dm(ix, :) ./ x_dv + _beta * X_dm(ix, :). - // If (!y_dv), X_dm(ix, :) = _alpha * X_dm(ix, :) ./ x_dv + _beta * X_dm(ix, :). - //Inputs: - // _alpha: double scalar. - // _beta: double scalar. - - int _i, cnt, ncols_x, nrows_x; - double *X, *x, *y; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): (1) Input matrix must be created (memory-allocated); (2) Legal values must be given"); - if ( !x_dv || !x_dv->flag ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): (1) Input vector must be created (memory-allocated); (2) Legal values must be given"); - if ( (ncols_x=X_dm->ncols) != x_dv->n ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): Number of columns in the input matrix must match the length of the input vector"); - if ( ix >= (nrows_x=X_dm->nrows) ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): The specified ix_th row of the input matrix exceeds its row dimension"); - X = X_dm->M; - x = x_dv->v; - - - if ( _alpha==1.0 ) { - if ( _beta==0.0 ) { - if ( !y_dv ) - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) X[_i] /= x[cnt]; - else { - y = y_dv->v; - if ( ncols_x != y_dv->n ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): Number of columns in the input matrix must match the length of the output vector"); - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) y[cnt] = X[_i] / x[cnt]; - y_dv->flag = V_DEF; - } - } -// else if ( _beta==1.0 ) { -// if ( !y_dv ) -// for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) X[_i] *= ( 1.0 / x[cnt] + 1.0); -// else { -// y = y_dv->v; -// if ( ncols_x != y_dv->n ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): Number of columns in the input matrix must match the length of the output vector"); -// for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) y[cnt] = X[_i] * ( 1.0 / x[cnt] + 1.0 ); -// y_dv->flag = V_DEF; -// } -// } - else { - if ( !y_dv ) - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) X[_i] *= 1.0 / x[cnt] + _beta; - else { - y = y_dv->v; - if ( ncols_x != y_dv->n ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): Number of columns in the input matrix must match the length of the output vector"); - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) y[cnt] = X[_i] * ( 1.0 / x[cnt] + _beta ); - y_dv->flag = V_DEF; - } - } - } - else { - if ( _beta==0.0 ) { - if ( !y_dv ) - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) X[_i] *= _alpha / x[cnt]; - else { - y = y_dv->v; - if ( ncols_x != y_dv->n ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): Number of columns in the input matrix must match the length of the output vector"); - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) y[cnt] = (_alpha * X[_i]) / x[cnt]; - y_dv->flag = V_DEF; - } - } -// else if ( _beta==1.0 ) { -// if ( !y_dv ) -// for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) X[_i] *= _alpha / x[cnt] + 1.0; -// else { -// y = y_dv->v; -// if ( ncols_x != y_dv->n ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): Number of columns in the input matrix must match the length of the output vector"); -// for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) y[cnt] = X[_i] * (_alpha / x[cnt] + 1.0); -// y_dv->flag = V_DEF; -// } -// } - else { - if ( !y_dv ) - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) X[_i] *= _alpha / x[cnt] + _beta; - else { - y = y_dv->v; - if ( ncols_x != y_dv->n ) fn_DisplayError(".../mathlib.c/RowofMatrixDotDivideVector(): Number of columns in the input matrix must match the length of the output vector"); - for (_i=ix + (ncols_x-1)*nrows_x, cnt=ncols_x-1; _i>=ix; _i -= nrows_x, cnt--) y[cnt] = X[_i] * (_alpha / x[cnt] + _beta); - y_dv->flag = V_DEF; - } - } - } -} - -void ColofMatrixDotTimesVector(TSdvector *y_dv, TSdmatrix *X_dm, int jx, TSdvector *x_dv, double _alpha, double _beta) { - //Outputs: - // If (y_dv), y_dv = _alpha * X_dm(:,jx) .* x_dv + _beta * X_dm(:,jx). - // If (!y_dv), X_dm(:,jx) = _alpha * X_dm(:,jx) .* x_dv + _beta * X_dm(:,jx). - //Inputs: - // _alpha: double scalar. - // _beta: double scalar. - - int _i, nrows_x; - double *X, *x, *y; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): (1) Input matrix must be created (memory-allocated); (2) Legal values must be given"); - if ( !x_dv || !x_dv->flag ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): (1) Input vector must be created (memory-allocated); (2) Legal values must be given"); - if ( (nrows_x=X_dm->nrows) != x_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the input vector"); - if ( jx >= X_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jx_th column of the input matrix exceeds its column dimension"); - - - X = X_dm->M + (jx+1)*nrows_x - 1; //Points to the end of the jx_th column. - x = x_dv->v + nrows_x - 1; //Points to the end of the vector. - if ( _alpha==1.0 ) { - if ( _beta==0.0 ) { - if ( !y_dv ) - for (_i=nrows_x-1; _i>=0; _i--, X--, x--) *X = (*X) * (*x); - else { - if ( nrows_x != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows_x-1, y=y_dv->v+_i; _i>=0; _i--, X--, x--, y--) *y = (*X) * (*x); - y_dv->flag = V_DEF; - } - } - else if ( _beta==1.0 ) { - if ( !y_dv ) - for (_i=nrows_x-1; _i>=0; _i--, X--, x--) *X = (*X) * (*x) + (*X); - else { - if ( nrows_x != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows_x-1, y=y_dv->v+_i; _i>=0; _i--, X--, x--, y--) *y = (*X) * (*x) + (*X); - y_dv->flag = V_DEF; - } - } - else { - if ( !y_dv ) - for (_i=nrows_x-1; _i>=0; _i--, X--, x--) *X = (*X) * (*x) + _beta * (*X); - else { - if ( nrows_x != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows_x-1, y=y_dv->v+_i; _i>=0; _i--, X--, x--, y--) *y = (*X) * (*x) + _beta * (*X); - y_dv->flag = V_DEF; - } - } - } - else { - if ( _beta==0.0 ) { - if ( !y_dv ) - for (_i=nrows_x-1; _i>=0; _i--, X--, x--) *X = _alpha * (*X) * (*x); - else { - if ( nrows_x != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows_x-1, y=y_dv->v+_i; _i>=0; _i--, X--, x--, y--) *y = _alpha * (*X) * (*x); - y_dv->flag = V_DEF; - } - } - else if ( _beta==1.0 ) { - if ( !y_dv ) - for (_i=nrows_x-1; _i>=0; _i--, X--, x--) *X = _alpha * (*X) * (*x) + (*X); - else { - if ( nrows_x != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows_x-1, y=y_dv->v+_i; _i>=0; _i--, X--, x--, y--) *y = _alpha * (*X) * (*x) + (*X); - y_dv->flag = V_DEF; - } - } - else { - if ( !y_dv ) - for (_i=nrows_x-1; _i>=0; _i--, X--, x--) *X = _alpha * (*X) * (*x) + _beta * (*X); - else { - if ( nrows_x != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows_x-1, y=y_dv->v+_i; _i>=0; _i--, X--, x--, y--) *y = _alpha * (*X) * (*x) + _beta * (*X); - y_dv->flag = V_DEF; - } - } - } -} -void ColofMatrixDotTimesColofMatrix(TSdvector *y_dv, TSdmatrix *X1_dm, int jx1, TSdmatrix *X2_dm, int jx2, double _alpha, double _beta) { - //????????? NOT tested yet. - //Outputs: - // If y_dv!=NULL, y_dv = _alpha * X1_dm(:,jx1) .* X2_dm(:,jx2) + _beta * X1_dm(:,jx1). - // If !y_dv, X1_dm(:,jx1) = _alpha * X1_dm(:,jx1) .* X2_dm(:,jx2) + _beta * X1_dm(:,jx2). - //Inputs: - // _alpha: double scalar. - // _beta: double scalar. - - int _i, nrows1; - double *X1, *X2, *y; - - if ( !X1_dm || !X1_dm->flag ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesColofMatrix(): (1) Input matrix X1 must be created (memory-allocated); (2) Legal values must be given"); - if ( !X2_dm || !X2_dm->flag ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesColofMatrix(): (1) Input matrix X2 must be created (memory-allocated); (2) Legal values must be given"); - if ( (nrows1=X1_dm->nrows) != X2_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesColofMatrix(): Numbers of rows in both input matrices must be the same"); - if ( jx1 >= X1_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jx1_th column of input matrix X1 exceeds its column dimension"); - if ( jx2 >= X2_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jx2_th column of input matrix X2 exceeds its column dimension"); - - X1 = X1_dm->M + (jx1+1)*nrows1 - 1; //Points to the end of the jx1_th column. - X2 = X2_dm->M + (jx2+1)*nrows1 - 1; //Points to the end of the jx2_th column. - if ( _alpha==1.0 ) { - if ( _beta==0.0 ) { - if ( !y_dv ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = (*X1) * (*X2); - else { - if ( nrows1 != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows1-1, y=y_dv->v+_i; _i>=0; _i--, X1--, X2--, y--) *y = (*X1) * (*X2); - y_dv->flag = V_DEF; - } - } - else if ( _beta==1.0 ) { - if ( !y_dv ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = (*X1) * (*X2) + (*X1); - else { - if ( nrows1 != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows1-1, y=y_dv->v+_i; _i>=0; _i--, X1--, X2--, y--) *y = (*X1) * (*X2) + (*X1); - y_dv->flag = V_DEF; - } - } - else { - if ( !y_dv ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = (*X1) * (*X2) + _beta * (*X1); - else { - if ( nrows1 != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows1-1, y=y_dv->v+_i; _i>=0; _i--, X1--, X2--, y--) *y = (*X1) * (*X2) + _beta * (*X1); - y_dv->flag = V_DEF; - } - } - } - else { - if ( _beta==0.0 ) { - if ( !y_dv ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = _alpha * (*X1) * (*X2); - else { - if ( nrows1 != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows1-1, y=y_dv->v+_i; _i>=0; _i--, X1--, X2--, y--) *y = _alpha * (*X1) * (*X2); - y_dv->flag = V_DEF; - } - } - else if ( _beta==1.0 ) { - if ( !y_dv ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = _alpha * (*X1) * (*X2) + (*X1); - else { - if ( nrows1 != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows1-1, y=y_dv->v+_i; _i>=0; _i--, X1--, X2--, y--) *y = _alpha * (*X1) * (*X2) + (*X1); - y_dv->flag = V_DEF; - } - } - else { - if ( !y_dv ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = _alpha * (*X1) * (*X2) + _beta * (*X1); - else { - if ( nrows1 != y_dv->n ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in the input matrix must match the length of the output vector"); - for (_i=nrows1-1, y=y_dv->v+_i; _i>=0; _i--, X1--, X2--, y--) *y = _alpha * (*X1) * (*X2) + _beta * (*X1); - y_dv->flag = V_DEF; - } - } - } -} -void ColofMatrixDotTimesColofMatrix2ColofMatrix(TSdmatrix *Y_dm, int jy, TSdmatrix *X1_dm, int jx1, TSdmatrix *X2_dm, int jx2, double _alpha, double _beta) { - //Outputs: - // If Y_dm!=NULL, Y_dm(:,jy) = _alpha * X1_dm(:,jx1) .* X2_dm(:,jx2) + _beta * X1_dm(:,jx1). - // If !Y_dm, X1_dm(:,jx1) = _alpha * X1_dm(:,jx1) .* X2_dm(:,jx2) + _beta * X1_dm(:,jx2). - //Inputs: - // _alpha: double scalar. - // _beta: double scalar. - - int _i, nrows1; - double *X1, *X2, *Y; - - if ( !X1_dm || !X1_dm->flag ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesColofMatrix(): (1) Input matrix X1 must be created (memory-allocated); (2) Legal values must be given"); - if ( !X2_dm || !X2_dm->flag ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesColofMatrix(): (1) Input matrix X2 must be created (memory-allocated); (2) Legal values must be given"); - if ( (nrows1=X1_dm->nrows) != X2_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesColofMatrix(): Numbers of rows in both input matrices must be the same"); - if ( jx1 >= X1_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jx1_th column of input matrix X1 exceeds its column dimension"); - if ( jx2 >= X2_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jx2_th column of input matrix X2 exceeds its column dimension"); - - X1 = X1_dm->M + (jx1+1)*nrows1 - 1; //Points to the end of the jx1_th column. - X2 = X2_dm->M + (jx2+1)*nrows1 - 1; //Points to the end of the jx2_th column. - if ( _alpha==1.0 ) { - if ( _beta==0.0 ) { - if ( !Y_dm ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = (*X1) * (*X2); - else { - if ( nrows1 != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in input matrices must match that of the output matrix"); - if ( jy >= Y_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jy_th column of output matrix Y exceeds its column dimension"); - Y = Y_dm->M + (jy+1)*nrows1 - 1; //Points to the end of the jy_th column. - - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--, Y--) *Y = (*X1) * (*X2); - } - } - else if ( _beta==1.0 ) { - if ( !Y_dm ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = (*X1) * (*X2) + (*X1); - else { - if ( nrows1 != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in input matrices must match that of the output matrix"); - if ( jy >= Y_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jy_th column of output matrix Y exceeds its column dimension"); - Y = Y_dm->M + (jy+1)*nrows1 - 1; //Points to the end of the jy_th column. - - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--, Y--) *Y = (*X1) * (*X2) + (*X1); - } - } - else { - if ( !Y_dm ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = (*X1) * (*X2) + _beta * (*X1); - else { - if ( nrows1 != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in input matrices must match that of the output matrix"); - if ( jy >= Y_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jy_th column of output matrix Y exceeds its column dimension"); - Y = Y_dm->M + (jy+1)*nrows1 - 1; //Points to the end of the jy_th column. - - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--, Y--) *Y = (*X1) * (*X2) + _beta * (*X1); - } - } - } - else { - if ( _beta==0.0 ) { - if ( !Y_dm ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = _alpha * (*X1) * (*X2); - else { - if ( nrows1 != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in input matrices must match that of the output matrix"); - if ( jy >= Y_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jy_th column of output matrix Y exceeds its column dimension"); - Y = Y_dm->M + (jy+1)*nrows1 - 1; //Points to the end of the jy_th column. - - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--, Y--) *Y = _alpha * (*X1) * (*X2); - } - } - else if ( _beta==1.0 ) { - if ( !Y_dm ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = _alpha * (*X1) * (*X2) + (*X1); - else { - if ( nrows1 != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in input matrices must match that of the output matrix"); - if ( jy >= Y_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jy_th column of output matrix Y exceeds its column dimension"); - Y = Y_dm->M + (jy+1)*nrows1 - 1; //Points to the end of the jy_th column. - - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--, Y--) *Y = _alpha * (*X1) * (*X2) + (*X1); - } - } - else { - if ( !Y_dm ) - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--) *X1 = _alpha * (*X1) * (*X2) + _beta * (*X1); - else { - if ( nrows1 != Y_dm->nrows ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): Number of rows in input matrices must match that of the output matrix"); - if ( jy >= Y_dm->ncols ) fn_DisplayError(".../mathlib.c/ColofMatrixDotTimesVector(): The specified jy_th column of output matrix Y exceeds its column dimension"); - Y = Y_dm->M + (jy+1)*nrows1 - 1; //Points to the end of the jy_th column. - - for (_i=nrows1-1; _i>=0; _i--, X1--, X2--, Y--) *Y = _alpha * (*X1) * (*X2) + _beta * (*X1); - } - } - } -} - - -void MatrixPlusMatrixUpdate(TSdmatrix *X_dm, TSdmatrix *A_dm) { - //Output: X = A + X where X_dm is an m-by-n general (and possibly symmetric) matrix. - // If X = A, then X will be replaced by 2*A; - //Inputs: - // A_dm: m-by-n general or symmetric matrix. - int _i, _m, _n, nels; - double *X, *A; - - - if ( !X_dm || !A_dm ) fn_DisplayError(".../mathlib.c/MatrixPlusMatrixUpdate(): All input matrices must be created (memory-allocated)"); - else if ( !X_dm->flag || !A_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixPlusMatrixUpdate(): Both input matrices must be given values"); - else { - _m = X_dm->nrows; - _n = X_dm->ncols; - nels = _m * _n; - X = X_dm->M; - A = A_dm->M; - } - - if ( (_m != A_dm->nrows) || (_n != A_dm->ncols) ) fn_DisplayError(".../mathlib.c/MatrixPlusMatrixUpdate(): Dimensions of all input matrices must be same"); - - //=== Making both X_dm and A_dm general if not yet. - if ( !(X_dm->flag & M_GE) ) { - if (X_dm->flag & M_SU) SUtoGE(X_dm); - else if (X_dm->flag & M_SL) SLtoGE(X_dm); - else fn_DisplayError(".../mathlib.c/MatrixPlusMatrixUpdate(): Haven't got time to deal with the M_UT and M_LT cases for X_dm"); - } - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixPlusMatrixUpdate(): Haven't got time to deal with the M_UT and M_LT cases for A_dm"); - } - for (_i=nels-1; _i>=0; _i--) X[_i] += A[_i]; //This operation may be much cheaper than explicitly using SU or SL operations with two for loops and integer multiplications for matrix offsets. - - if ( X_dm->flag != A_dm->flag ) X_dm->flag = M_GE; //Reset to a general matrix only; otherwise, keep the original X_dm->flag. -} - -void MatrixPlusMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm) { - //Output: X = A + B where X_dm is an m-by-n general matrix. - // If X=A, A will be replaced by X; if X=B, B will be replaced by X. - //Inputs: - // A_dm: m-by-n general matrix. - // B_dm: m-by-n general matrix. - int _i, _m, _n, nels; - double *X, *A, *B; - - - if ( !X_dm || !A_dm || !B_dm ) fn_DisplayError(".../mathlib.c/MatrixPlusMatrix(): All input matrices must be created (memory-allocated)"); - else if ( !A_dm->flag || !B_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixPlusMatrix(): Two R input matrices must be given values"); - else { - _m = X_dm->nrows; - _n = X_dm->ncols; - nels = _m * _n; - X = X_dm->M; - A = A_dm->M; - B = B_dm->M; - } - - - if ( (_m != A_dm->nrows) || (_m != B_dm->nrows) || (_n != A_dm->ncols) || (_n != B_dm->ncols) ) - fn_DisplayError(".../mathlib.c/MatrixPlusMatrix(): Dimensions of all input matrices must be same"); - else { - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixPlusMatrix(): Haven't got time to deal with the M_UT and M_LT cases for A_dm"); - } - if ( !(B_dm->flag & M_GE) ) { - if (B_dm->flag & M_SU) SUtoGE(B_dm); - else if (B_dm->flag & M_SL) SLtoGE(B_dm); - else fn_DisplayError(".../mathlib.c/MatrixPlusMatrix(): Haven't got time to deal with the M_UT and M_LT cases for B_dm"); - } - - for (_i=nels-1; _i>=0; _i--) X[_i] = A[_i] + B[_i]; - if (A_dm->flag == B_dm->flag) X_dm->flag = A_dm->flag; - else X_dm->flag = M_GE; - } -} - -void MatrixMinusMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm) { - //Output: X = A - B where X_dm is an m-by-n general matrix. - // If X=A, A will be replaced by X; if X=B, B will be replaced by X. - //Inputs: - // A_dm: m-by-n general matrix. - // B_dm: m-by-n general matrix. - int _i, _m, _n, nels; - double *X, *A, *B; - - - if ( !X_dm || !A_dm || !B_dm ) fn_DisplayError(".../mathlib.c/MatrixMinusMatrix(): All input matrices must be created (memory-allocated)"); - else if ( !A_dm->flag || !B_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixMinusMatrix(): Two R input matrices must be given values"); - else { - _m = X_dm->nrows; - _n = X_dm->ncols; - nels = _m * _n; - X = X_dm->M; - A = A_dm->M; - B = B_dm->M; - } - - - if ( (_m != A_dm->nrows) || (_m != B_dm->nrows) || (_n != A_dm->ncols) || (_n != B_dm->ncols) ) - fn_DisplayError(".../mathlib.c/MatrixMinusMatrix(): Dimensions of all input matrices must be same"); - else { - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixMinusMatrix(): Haven't got time to deal with the M_UT and M_LT cases for A_dm"); - } - if ( !(B_dm->flag & M_GE) ) { - if (B_dm->flag & M_SU) SUtoGE(B_dm); - else if (B_dm->flag & M_SL) SLtoGE(B_dm); - else fn_DisplayError(".../mathlib.c/MatrixMinusMatrix(): Haven't got time to deal with the M_UT and M_LT cases for B_dm"); - } - - for (_i=nels-1; _i>=0; _i--) X[_i] = A[_i] - B[_i]; - if (A_dm->flag == B_dm->flag) X_dm->flag = A_dm->flag; - else X_dm->flag = M_GE; - } -} - -void Matrix2PlusMinusMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm, TSdmatrix *C_dm, const double _alpha, const double _beta, const double _gamma) { - //????? Not yet exhaust all possibilities of alpha, beta, and gamma to get most efficiency. Add more as required. 10 February 2003. - //Output: X = alpha*A + beta*B + gamma*C where X_dm is an m-by-n general matrix. - //Inputs: - // A_dm: m-by-n general matrix. - // B_dm: m-by-n general matrix. - // C_dm: m-by-n general matrix. - // _alpha: a double scalar for A_dm. - // _beta: a double scalar for B_dm. - // _gamma: a double scalar for C_dm. - int _i, _m, _n, nels; - double *X, *A, *B, *C; - - - if ( !X_dm || !A_dm || !B_dm || !C_dm ) fn_DisplayError(".../mathlib.c/Matrix2PlusMinusMatrix(): All input matrices must be created (memory-allocated)"); - else if ( !A_dm->flag || !B_dm->flag || !C_dm->flag ) fn_DisplayError(".../mathlib.c/Matrix2PlusMinusMatrix(): Some of R input matrices are not given values"); - else { - _m = X_dm->nrows; - _n = X_dm->ncols; - nels = _m * _n; - X = X_dm->M; - A = A_dm->M; - B = B_dm->M; - C = C_dm->M; - } - - - if ( (_m != A_dm->nrows) || (_m != B_dm->nrows) || (_m != C_dm->nrows) || (_n != A_dm->ncols) || (_n != B_dm->ncols) || (_n != C_dm->ncols) ) - fn_DisplayError(".../mathlib.c/Matrix2PlusMinusMatrix(): Dimensions of all L and R input matrices must be same"); - else { - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/Matrix2PlusMinusMatrix(): Haven't got time to deal with the M_UT and M_LT cases for A_dm"); - } - if ( !(B_dm->flag & M_GE) ) { - if (B_dm->flag & M_SU) SUtoGE(B_dm); - else if (B_dm->flag & M_SL) SLtoGE(B_dm); - else fn_DisplayError(".../mathlib.c/Matrix2PlusMinusMatrix(): Haven't got time to deal with the M_UT and M_LT cases for B_dm"); - } - if ( !(C_dm->flag & M_GE) ) { - if (C_dm->flag & M_SU) SUtoGE(C_dm); - else if (C_dm->flag & M_SL) SLtoGE(C_dm); - else fn_DisplayError(".../mathlib.c/Matrix2PlusMinusMatrix(): Haven't got time to deal with the M_UT and M_LT cases for C_dm"); - } - - - if ( (_alpha==1.0) && (_beta==1.0) && (_gamma==1.0) ) { - for (_i=nels-1; _i>=0; _i--) X[_i] = A[_i] + B[_i] + C[_i]; - if ( (A_dm->flag == B_dm->flag) && (A_dm->flag == C_dm->flag) ) X_dm->flag = A_dm->flag; - else X_dm->flag = M_GE; - } - else if ( (_alpha==1.0) && (_beta==1.0) && (_gamma==-1.0) ) { - for (_i=nels-1; _i>=0; _i--) X[_i] = A[_i] + B[_i] - C[_i]; - if ( (A_dm->flag == B_dm->flag) && (A_dm->flag == C_dm->flag) ) X_dm->flag = A_dm->flag; - else X_dm->flag = M_GE; - } - else if ( (_alpha==1.0) && (_gamma==1.0) ) { - for (_i=nels-1; _i>=0; _i--) X[_i] = A[_i] + _beta*B[_i] + C[_i]; - if ( (A_dm->flag == B_dm->flag) && (A_dm->flag == C_dm->flag) ) X_dm->flag = A_dm->flag; - else X_dm->flag = M_GE; - } - else { - //Default for all cases (thus, may be most inefficient at this point.). - for (_i=nels-1; _i>=0; _i--) X[_i] = _alpha*A[_i] + _beta*B[_i] + _gamma*C[_i]; - if ( (A_dm->flag == B_dm->flag) && (A_dm->flag == C_dm->flag) ) X_dm->flag = A_dm->flag; - else X_dm->flag = M_GE; - } - } -} - -void MatrixPlusConstantDiagUpdate(TSdmatrix *X_dm, const double _alpha) { - //Output: X = X + diag([_alpha, ..., _alpha]) where X is an n-by-n square real matrix. - int _i, nrows; - double *M; - - if (!X_dm) fn_DisplayError(".../mathlib.c/MatrixPlusConstantDiagUpdate(): Input matrix must be created (memory-allocated)"); - else if (!X_dm->flag) fn_DisplayError(".../mathlib.c/MatrixPlusConstantDiagUpdate(): R input matrix must be given values"); - - M = X_dm->M; - nrows = X_dm->nrows; - for (_i=square(nrows)-1; _i>=0; _i -= nrows+1) M[_i] += _alpha; -} - - -void MatrixDotTimesMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm, const double _alpha, const double _beta) -{ - //$$$$$ If A_dm or B_dm or X_dm (when _beta!=0) is only upper or lower symmetric, it will be always converted to a general (and symmetric) matrix. $$$$$$ - //Output: - // X_dm is m-by-n. - // X_dm = _alpha * A_dm .* B_dm + _beta * X_dm if X_dm != B_dm. - // X_dm = _alpha * A_dm .* X_dm + _beta * X_dm if X_dm = B_dm. - //Inputs: - // A_dm: m-by-n double vector. - // B_dm: m-by-n double vector. - // _alpha: double scalar. - // _beta: a double scalar. - int _i, nrows, ncols; - double *X, *A, *B; - - - if ( !X_dm || !A_dm || !B_dm) fn_DisplayError(".../mathlib.c/MatrixDotTimesMatrix(): All input matrices must be created (memory-allocated)"); - else if ( !A_dm->flag || !B_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixDotTimesMatrix(): Both R input matrices must be given legal values"); - else if ( _beta && !X_dm->flag ) fn_DisplayError(".../mathlib.c/MatrixDotTimesMatrix(): L output matrix, X_dm, must be given legal values"); - else { - nrows = X_dm->nrows; - ncols = X_dm->ncols; - X = X_dm->M; - A = A_dm->M; - B = B_dm->M; - } - if ( (nrows != A_dm->nrows) || (nrows != B_dm->nrows) || (ncols != A_dm->ncols) || (ncols != B_dm->ncols) ) - fn_DisplayError(".../mathlib.c/MatrixDotTimesMatrix(): Dimensions of all input matrices must be same"); - if ( !(A_dm->flag & M_GE) ) { - if (A_dm->flag & M_SU) SUtoGE(A_dm); - else if (A_dm->flag & M_SL) SLtoGE(A_dm); - else fn_DisplayError(".../mathlib.c/MatrixDotTimesMatrix(): Haven't got time to deal with the M_UT or M_LT cases for A_dm"); - } - if ( !(B_dm->flag & M_GE) ) { - if (B_dm->flag & M_SU) SUtoGE(B_dm); - else if (B_dm->flag & M_SL) SLtoGE(B_dm); - else fn_DisplayError(".../mathlib.c/MatrixDotTimesMatrix(): Haven't got time to deal with the M_UT or M_LT cases for B_dm"); - } - if ( _beta && !(X_dm->flag & M_GE) ) { - if (X_dm->flag & M_SU) SUtoGE(X_dm); - else if (X_dm->flag & M_SL) SLtoGE(X_dm); - else fn_DisplayError(".../mathlib.c/MatrixDotTimesMatrix(): Haven't got time to deal with the M_UT or M_LT cases for X_dm"); - } - - - - if ( _alpha==1.0 ) { - if ( _beta==0.0 ) { - for (_i=nrows*ncols-1; _i>=0; _i--) X[_i] = A[_i] * B[_i]; - if (B_dm->flag != A_dm->flag) X_dm->flag = M_GE; - else X_dm->flag = A_dm->flag; - } - else if ( _beta==1.0 ) { - for (_i=nrows*ncols-1; _i>=0; _i--) X[_i] += A[_i] * B[_i]; - if (X_dm->flag != A_dm->flag || X_dm->flag != B_dm->flag) X_dm->flag = M_GE; - } - else { - for (_i=nrows*ncols-1; _i>=0; _i--) X[_i] = A[_i] * B[_i] + _beta * X[_i]; - if (X_dm->flag != A_dm->flag || X_dm->flag != B_dm->flag) X_dm->flag = M_GE; - } - } - else { - if ( _beta==0.0 ) { - for (_i=nrows*ncols-1; _i>=0; _i--) X[_i] = _alpha * A[_i] * B[_i]; - if (B_dm->flag != A_dm->flag) X_dm->flag = M_GE; - else X_dm->flag = A_dm->flag; - } - else if ( _beta==1.0 ) { - for (_i=nrows*ncols-1; _i>=0; _i--) X[_i] += _alpha * A[_i] * B[_i]; - if (X_dm->flag != A_dm->flag || X_dm->flag != B_dm->flag) X_dm->flag = M_GE; - } - else { - for (_i=nrows*ncols-1; _i>=0; _i--) X[_i] = _alpha * A[_i] * B[_i] + _beta * X[_i]; - if (X_dm->flag != A_dm->flag || X_dm->flag != B_dm->flag) X_dm->flag = M_GE; - } - } -} - - - -void CopyVector0(TSdvector *x1_dv, const TSdvector *x2_dv) { - //Ouputs: - // x1_dv, whose elements are copied from from x2_dv. - //Inputs: - // Copying elements from x2_dv->v to x1_dv. - int _n; - - if ( !x1_dv || !x2_dv || (x1_dv->n != x2_dv->n) ) - fn_DisplayError(".../mathlib.c/CopyVector0(): (1) all input pointers must be created (memory-allocated) and (2) dimensions of x1_dv and x2_dv must be compatible"); - else if ( !x2_dv->flag ) { - // printf("x2_dv->flag is %d, and length is %d, and the vector is: \n", x2_dv->flag, x2_dv->n); - // PrintVector(x2_dv, " %g "); - fn_DisplayError(".../mathlib.c/CopyVector0(): R input vector must be given values"); - } - else _n = x2_dv->n; - - if ( _n != x1_dv->n ) fn_DisplayError(".../mathlib.c/CopyVector0(): Both L and R input vectors must have the same length"); - memcpy(x1_dv->v, x2_dv->v, _n*sizeof(double)); - x1_dv->flag = V_DEF; -} - - -void CopyMatrix0(TSdmatrix *x1_dm, TSdmatrix *x2_dm) { - //Deals with double matrices. - //Copies the entire matrix x2_dm to x1_dm. - int nrows1, ncols1, nrows2, ncols2; - - if ( !x1_dm || !x2_dm ) fn_DisplayError(".../mathlib.c/CopyMatrix0(): All input matrices must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopyMatrix0(): R input matrix must be given values"); - else { - nrows1=x1_dm->nrows; - ncols1=x1_dm->ncols; - nrows2=x2_dm->nrows; - ncols2=x2_dm->ncols; - } - - - if (nrows2 == nrows1 && ncols2 == ncols1) { - //$$$$$$$$$$ 5/15/2003. At some point, the following if command should be got rid of completely. For now, we keep this for maintaining the backward compatibility. - if ( !(x2_dm->flag & M_GE) ) { - if (x2_dm->flag & M_SU) SUtoGE(x2_dm); - else if (x2_dm->flag & M_SL) SLtoGE(x2_dm); -// else fn_DisplayError(".../mathlib.c/CopyMatrix0(): Haven't got time to deal with the M_UT and M_LT cases for x2_dm"); - } - //Both matrices have the same size. - memcpy(x1_dm->M, x2_dm->M, nrows1 * ncols1 * sizeof(double)); - x1_dm->flag = x2_dm->flag; - -// #ifdef SWITCHTOTZCMATH // define: use my own C math library ; undef: use others. -// memcpy(x1_dm->M, x2_dm->M, nrows1 * ncols1 * sizeof(double)); -// #endif -// #ifdef SWITCHTOINTELCMATH // define: use Intek MKL LAPACK library; undef: use others. -// cblas_dcopy(nrows1*ncols1, x2_dm->M, 1, x1_dm->M, 1); -// #endif -// x1_dm->flag = x2_dm->flag; - } - else fn_DisplayError(".../mathlib.c/CopyMatrix0(): Copying matrix (x2_m) and copied matrix (x1_dm) must have the same size"); - -//?????????? The following is good, but should be used in CopySubmatrix0(), which might have already taken this into account. -// else if (nrows2 <= nrows1 && ncols2 <= ncols1) { -// if ( !(x2_dm->flag & M_GE) ) fn_DisplayError(".../mathlib.c/CopyMatrix0(): Haven't got time to deal with the M_UT and M_LT cases for x2_dm"); -// //Size of x2_dm is smaller than that of x1_dm. -// for (_i=0; _i<ncols2; _i++) { -// loc1 = _i*nrows1; //Points to the top of the column in x1_dm. -// loc2 = _i*nrows2; //Points to the top of the column in x2_dm. -// memcpy((x1_dm->M+loc1), (x2_dm->M+loc2), x2_dm->nrows*sizeof(double)); -// } -// x1_dm->flag = M_GE; -// } -// else fn_DisplayError(".../mathlib.c/CopyMatrix0(): number of rows (columns) of the copying matrix (x2) must be no greater than that of the copied matrix (x1)"); -} - -void CopyCellvec0(TSdcellvec *x1_dcv, TSdcellvec *x2_dcv) -{ - //Deals with double vectors. - //Copies the entire cellvector x2_dcv to x1_dcv. - int _i, ncells; - if (!x1_dcv || !x2_dcv) fn_DisplayError(".../mathlib.c/CopyCellvec0(): Both input cellvectors must be created (memory-allocated)"); - else if ( (ncells=x2_dcv->ncells) != x1_dcv->ncells ) fn_DisplayError(".../mathlib.c/CopyCellvec0(): Both input cellvectors must have exactly the same size"); - for (_i=ncells-1; _i>=0; _i--) CopyVector0(x1_dcv->C[_i], x2_dcv->C[_i]); -} - -void CopyCell0(TSdcell *x1_dc, TSdcell *x2_dc) -{ - //Deals with double matrices. - //Copies the entire cell x2_dc to x1_dc. - int _i, ncells; - if (!x1_dc || !x2_dc) fn_DisplayError(".../mathlib.c/CopyCell0(): Both input cells must be created (memory-allocated)"); - else if ( (ncells=x2_dc->ncells) != x1_dc->ncells ) fn_DisplayError(".../mathlib.c/CopyCell0(): Both input cells must have exactly the same size"); - for (_i=ncells-1; _i>=0; _i--) CopyMatrix0(x1_dc->C[_i], x2_dc->C[_i]); -} - - -void CopySubmatrix0(TSdmatrix *x1_dm, TSdmatrix *x2_dm, const int br, const int bc, const int nrs, const int ncs) -{ - //Copies the nrs-by-ncs submatrix of x2_dm to the most left corner of x1_dm (i.e., at 0). - //Note: br means the beginning of the row (*must* be 0 based) for this submatrix of x2_dm, inclusive; - // bc means the beginning of the column (*must* be 0 based) for this submatrix of x2_dm, inclusive. - int _j, loc1, loc2, - nrows1, ncols1, nrows2, ncols2; - - if ( !x1_dm || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubmatrix0(): All input matrices must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubmatrix0(): R input matrix must be given values"); - else { - nrows1=x1_dm->nrows; - ncols1=x1_dm->ncols; - nrows2=x2_dm->nrows; - ncols2=x2_dm->ncols; - } - - if ( !(x2_dm->flag & M_GE) ) { - if (x2_dm->flag & M_SU) SUtoGE(x2_dm); - else if (x2_dm->flag & M_SL) SLtoGE(x2_dm); - else fn_DisplayError(".../mathlib.c/CopySubmatrix0(): Haven't got time to deal with the M_UT and M_LT cases for x2_dm"); - } - - //=== Performs the operation. - if ( (bc+ncs)<=ncols2 && (br+nrs)<=nrows2 && ncs<=ncols1 && nrs<=nrows1 ) { - for (_j=ncs-1; _j>=0; _j--) { - loc1 = _j*nrows1; //Points to the top of the column in x1_dm. - loc2 = mos(br, bc+_j, nrows2); //Points to the top of the column in the submatrix of x2_dm. - #ifdef SWITCHTOTZCMATH // define: use my own C math library ; undef: use others. - memcpy(x1_dm->M+loc1, x2_dm->M+loc2, nrs*sizeof(double)); - #endif - #ifdef SWITCHTOINTELCMATH // define: use Intek MKL LAPACK library; undef: use others. - cblas_dcopy(nrs, x2_dm->M+loc2, 1, x1_dm->M+loc1, 1); - #endif - } - x1_dm->flag = M_GE; - } - else fn_DisplayError(".../mathlib.c/CopySubmatrix0(): the submatrix of x2_dm must be within the ranges of both x1_dm and x2_dm"); -} - -void CopySubmatrixSelectedCols0(TSdmatrix *x1_dm, TSdmatrix *x2_dm, const int br, const int nrs, TSivector *locs4cols) -{ - //Copies the nrs-by-locs4cols->n submatrix of x2_dm to the most left corner of x1_dm (i.e., at 0). - //Note: br means the beginning of the row (*must* be 0 based) for this submatrix of x2_dm, inclusive; - // locs4cols indicates the locations of columns (*must* be 0 based) for this submatrix of x2_dm to be pasted, inclusive. - int _j, loc1, loc2, ncols_copy, - nrows1, ncols1, nrows2, ncols2; - - if ( !x1_dm || !x2_dm || !locs4cols) fn_DisplayError(".../mathlib.c/CopySubmatrixSelectedCols0(): All input matrices must be created (memory-allocated)"); - else if ( !x2_dm->flag || !locs4cols->flag ) fn_DisplayError(".../mathlib.c/CopySubmatrixSelectedCols0(): R input matrix must be given values"); - else { - nrows1=x1_dm->nrows; - ncols1=x1_dm->ncols; - nrows2=x2_dm->nrows; - ncols2=x2_dm->ncols; - } - if (MaxVector_int(locs4cols)>ncols2) - fn_DisplayError(".../mathlib.c/CopySubmatrixSelectedCols0(): selected columns in x2_dm cannot exceed the number of columns of x2_dm"); - - if ( !(x2_dm->flag & M_GE) ) { - if (x2_dm->flag & M_SU) SUtoGE(x2_dm); - else if (x2_dm->flag & M_SL) SLtoGE(x2_dm); - else fn_DisplayError(".../mathlib.c/CopySubmatrixSelectedCols0(): Haven't got time to deal with the M_UT and M_LT cases for x2_dm"); - } - - //=== Performs the operation. - if ( ((br+nrs)<=nrows2) && ((ncols_copy=locs4cols->n)<=ncols1) && (nrs<=nrows1) ) - { - for (_j=ncols_copy-1; _j>=0; _j--) { - loc1 = _j*nrows1; //Points to the top of the column in x1_dm. - loc2 = mos(br, locs4cols->v[_j], nrows2); //Points to the top of the column in the submatrix of x2_dm. - #if defined(SWITCHTOINTELCMATH) // define: use Intek MKL LAPACK library; undef: use others. - cblas_dcopy(nrs, x2_dm->M+loc2, 1, x1_dm->M+loc1, 1); - #elif defined(SWITCHTOTZCMATH) // define: use my own C math library ; undef: use others. - memcpy(x1_dm->M+loc1, x2_dm->M+loc2, nrs*sizeof(double)); - #endif - - } - x1_dm->flag = M_GE; - } - else fn_DisplayError(".../mathlib.c/CopySubmatrixSelectedCols0(): the submatrix of x2_dm must be within the ranges of both x1_dm and x2_dm"); -} - -void CopySubmatrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs) { - //Copies the nrs-by-ncs submatrix of x2_dm to x1_dm at the specified location (br1, bc1). - //Note: br1 means the beginning of the row (*must* be 0 based) for x1_dm, inclusive. - // bc1 means the beginning of the column (*must* be 0 based) for x1_dm, inclusive. - // br2 means the beginning of the row (*must* be 0 based) for this submatrix of x2_dm, inclusive. - // bc2 means the beginning of the column (*must* be 0 based) for this submatrix of x2_dm, inclusive. - int _j, loc1, loc2, - nrows1, ncols1, nrows2, ncols2; - - if ( !x1_dm || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubmatrix(): All input matrices must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubmatrix(): R input matrix must be given values"); - else { - nrows1=x1_dm->nrows; - ncols1=x1_dm->ncols; - nrows2=x2_dm->nrows; - ncols2=x2_dm->ncols; - } - - if ( (bc2+ncs)<=ncols2 && (br2+nrs)<=nrows2 && (bc1+ncs)<=ncols1 && (br1+nrs)<=nrows1 ) { - for (_j=ncs-1; _j>=0; _j--) { - loc1 = mos(br1, bc1+_j, nrows1); //Points to the top of the column in the submatrix of x1_dm. - loc2 = mos(br2, bc2+_j, nrows2); //Points to the top of the column in the submatrix of x2_dm. - memcpy((x1_dm->M+loc1), (x2_dm->M+loc2), nrs*sizeof(double)); - } - x1_dm->flag = M_GE; - } - else fn_DisplayError(".../mathlib.c/CopySubmatrix(): the submatrix of x2_dm must be within the ranges of both x1_dm and x2_dm"); -} - - -#if defined( INTELCMATHLIBRARY ) -void CopySubrowmatrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs) -{ - //??????? NOT tested yet. - //Copies the nrs-by-ncs submatrix of x2_dm to x1_dm at the specified location (br1, bc1). - //Note: br1 means the beginning of the row (*must* be 0 based) for x1_dm, inclusive. - // bc1 means the beginning of the column (*must* be 0 based) for x1_dm, inclusive. - // br2 means the beginning of the row (*must* be 0 based) for this submatrix of x2_dm, inclusive. - // bc2 means the beginning of the column (*must* be 0 based) for this submatrix of x2_dm, inclusive. - int _i, loc1, loc2, - nrows1, ncols1, nrows2, ncols2; - - if ( !x1_dm || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubrowmatrix(): All input matrices must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubrowmatrix(): R input matrix must be given values"); - else { - nrows1=x1_dm->nrows; - ncols1=x1_dm->ncols; - nrows2=x2_dm->nrows; - ncols2=x2_dm->ncols; - } - - if ( (bc2+ncs)<=ncols2 && (br2+nrs)<=nrows2 && (bc1+ncs)<=ncols1 && (br1+nrs)<=nrows1 ) { - for (_i=nrs-1; _i>=0; _i--) { - loc1 = mos(br1+_i, bc1, nrows1); //Points to the beginning of the row in the submatrix of x1_dm. - loc2 = mos(br2+_i, bc2, nrows2); //Points to the beginning of the row in the submatrix of x2_dm. - cblas_dcopy(ncs, x2_dm->M+loc2, nrows2, x1_dm->M+loc1, nrows1); - } - } - else fn_DisplayError(".../mathlib.c/CopySubrowmatrix(): the submatrix of x2_dm must be within the range of itself as well as x1_dm"); -} -#else - Haven't got time to code up the default using Linux BLAS. -#endif - - -#if defined( INTELCMATHLIBRARY ) -void CopySubmatrix2rowmatrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs) -{ - //Column by column operation on x2_dm: coping the transpose of the nrs-by-ncs submatrix of x2_dm to x1_dm at the specified location (br1, bc1). - //Note: br1 means the beginning of the row (*must* be 0 based) for x1_dm, inclusive. - // bc1 means the beginning of the column (*must* be 0 based) for x1_dm, inclusive. - // br2 means the beginning of the row (*must* be 0 based) for this submatrix of x2_dm, inclusive. - // bc2 means the beginning of the column (*must* be 0 based) for this submatrix of x2_dm, inclusive. - int _j, loc1, loc2, - nrows1, ncols1, nrows2, ncols2; - - if ( !x1_dm || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubmatrix2rowmatrix(): All input matrices must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubmatrix2rowmatrix(): R input matrix must be given values"); - else { - nrows1=x1_dm->nrows; - ncols1=x1_dm->ncols; - nrows2=x2_dm->nrows; - ncols2=x2_dm->ncols; - } - - if ( (bc2+ncs)<=ncols2 && (br2+nrs)<=nrows2 && (bc1+nrs)<=ncols1 && (br1+ncs)<=nrows1 ) { - for (_j=ncs-1; _j>=0; _j--) { - loc1 = mos(br1+_j, bc1, nrows1); //Points to the beginning of the row in the submatrix of x1_dm. - loc2 = mos(br2, bc2+_j, nrows2); //Points to the top of the column in the submatrix of x2_dm. - cblas_dcopy(nrs, x2_dm->M+loc2, 1, x1_dm->M+loc1, nrows1); - } - } - else fn_DisplayError(".../mathlib.c/CopySubmatrix2rowmatrix(): the submatrix of x2_dm must be within the range of x2_dm and its transpose must be within the range of x1_dm"); -} -#else - Haven't got time to code up the default using Linux BLAS. -#endif - - -#if defined( INTELCMATHLIBRARY ) -void CopySubrowmatrix2matrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs) -{ - //??????? NOT tested yet. - //Row by row operation on x2_dm: coping the transpose of the nrs-by-ncs submatrix of x2_dm to x1_dm at the specified location (br1, bc1). - //Note: br1 means the beginning of the row (*must* be 0 based) for x1_dm, inclusive. - // bc1 means the beginning of the column (*must* be 0 based) for x1_dm, inclusive. - // br2 means the beginning of the row (*must* be 0 based) for this submatrix of x2_dm, inclusive. - // bc2 means the beginning of the column (*must* be 0 based) for this submatrix of x2_dm, inclusive. - int _i, loc1, loc2, - nrows1, ncols1, nrows2, ncols2; - - if ( !x1_dm || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubrowmatrix2matrix(): All input matrices must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubrowmatrix2matrix(): R input matrix must be given values"); - else { - nrows1=x1_dm->nrows; - ncols1=x1_dm->ncols; - nrows2=x2_dm->nrows; - ncols2=x2_dm->ncols; - } - - if ( (bc2+ncs)<=ncols2 && (br2+nrs)<=nrows2 && (bc1+nrs)<=ncols1 && (br1+ncs)<=nrows1 ) { - for (_i=nrs-1; _i>=0; _i--) { - loc1 = mos(br1, bc1+_i, nrows1); //Points to the top of the column in the submatrix of x1_dm. - loc2 = mos(br2+_i, bc2, nrows2); //Points to the beginning of the row in the submatrix of x2_dm. - cblas_dcopy(ncs, x2_dm->M+loc2, nrows2, x1_dm->M+loc1, 1); - } - } - else fn_DisplayError(".../mathlib.c/CopySubrowmatrix2matrix(): the submatrix of x2_dm must be within the range of itself as well as x1_dm"); -} -#else - Haven't got time to code up the default using Linux BLAS. -#endif - - -void CopySubvector(TSdvector *x1_dv, const int ptrloc1, const TSdvector *x2_dv, const int ptrloc2, const int nels) { - //Ouputs: - // x1_dv, whose elements from x1_dv->v+ptrloc1 to x1_dv->v+ptrloc1+nels-1 are copied from from x2_dv->v. - //Inputs: - // Copying elements from x2_dv->v+ptrloc2 to x2_dv->v+ptrloc2+nels-1 (to x1_dv->v). - // nels: number of elements to be copied. - // ptrloc1: pointer location for x1_dv->v where the copy begins, inclusive. - // ptrloc2: pointer location for x2_dv->v where the copy begins, inclusive. - - if ( !x1_dv || !x2_dv ) fn_DisplayError(".../mathlib.c/CopySubvector(): All input vectors must be created (memory-allocated)"); - else if (!x2_dv->flag) fn_DisplayError(".../mathlib.c/CopySubvector(): R input vector must be given values"); - - if ( (ptrloc2+nels)<=x2_dv->n && (ptrloc1+nels)<=x1_dv->n) { - memcpy(x1_dv->v+ptrloc1, x2_dv->v+ptrloc2, nels*sizeof(double)); - x1_dv->flag = V_DEF; - } - else fn_DisplayError(".../mathlib.c/CopySubvector(): Copying (copied) elements are outside the dimension of the copying vector x2_dv (the copied vector x1_dv)"); -} -//--- -void CopySubvector_int(TSivector *x1_iv, const int ptrloc1, const TSivector *x2_iv, const int ptrloc2, const int nels) -{ - //Ouputs: - // x1_iv, whose elements from x1_iv->v+ptrloc1 to x1_iv->v+ptrloc1+nels-1 are copied from from x2_iv->v. - //Inputs: - // Copying elements from x2_iv->v+ptrloc2 to x2_iv->v+ptrloc2+nels-1 (to x1_iv->v). - // nels: number of elements to be copied. - // ptrloc1: pointer location for x1_iv->v where the copy begins, inclusive. - // ptrloc2: pointer location for x2_iv->v where the copy begins, inclusive. - - if ( !x1_iv || !x2_iv ) fn_DisplayError(".../mathlib.c/CopySubvector_int(): All input vectors must be created (memory-allocated)"); - else if (!x2_iv->flag) fn_DisplayError(".../mathlib.c/CopySubvector_int(): R input vector must be given values"); - - if ( (ptrloc2+nels)<=x2_iv->n && (ptrloc1+nels)<=x1_iv->n) { - memcpy(x1_iv->v+ptrloc1, x2_iv->v+ptrloc2, nels*sizeof(int)); - x1_iv->flag = V_DEF; - } - else fn_DisplayError(".../mathlib.c/CopySubvector_int(): Copying (copied) elements are outside the dimension of the copying vector x2_iv (the copied vector x1_iv)"); -} - -void CopySubmatrix2vector(TSdvector *x1_dv, const int ptrloc1, TSdmatrix *x2_dm, const int br, const int bc, const int nels) -{ - //Ouputs: - // x1_dv whose elements from x1_dv->v+ptrloc1 to x1_dv->v+ptrloc1+nels-1 are copied from x2_dm->M[br,bc] onward (inclusive) - // where copied elements can run column by column all the way to the end of x2_dm->M[end,end]. Thus, this function - // can be used as the Matlab reshape command. - //Inputs: Copying elements from x2_dm->M+ptrloc2 to x2_dm->M+ptrloc2+nels-1 (to x1_dv->v). - // ptrloc1: pointer location for x1_dv->v where the copy begins, inclusive. - // br: beginning of the row (*must* be 0 based) for x2_dm, inclusive. - // bc: beginning of the column (*must* be 0 based) for x2_dm, inclusive. - // nels: number of elements to be copied. - int ptrloc2; //pointer location for x2_dm->M where the copy begins. - - if ( !x1_dv || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubmatrix2vector(): All input pointers must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubmatrix2vector(): R input matrix must be given values"); - else ptrloc2 = mos(br,bc,x2_dm->nrows); // ptrloc2: pointer location for x2_dm->M where the copy begins. - - if ( !(x2_dm->flag & M_GE) ) { - if (x2_dm->flag & M_SU) SUtoGE(x2_dm); - else if (x2_dm->flag & M_SL) SLtoGE(x2_dm); - else fn_DisplayError(".../mathlib.c/CopySubmatrix2vector(): Haven't got time to deal with the M_UT and M_LT cases for x2_dm"); - } - - - - if ( (ptrloc2+nels)<=(x2_dm->nrows*x2_dm->ncols) && (ptrloc1+nels)<=x1_dv->n) { - memcpy(x1_dv->v+ptrloc1, x2_dm->M+ptrloc2, nels*sizeof(double)); - x1_dv->flag = V_DEF; - } - else fn_DisplayError(".../mathlib.c/CopySubmatrix2vector(): Copying (copied) elements are outside the dimension of the copying matrix x2_dm (the copied vector x1_dv)"); -} - -void CopySubmatrix2vector_sub(TSdvector *x1_dv, const int ptrloc1, TSdmatrix *x2_dm, const int br, const int bc, const int nrs, const int ncs) { - //Ouputs: Unlike CopySubmatrix2vector, _sub means a submatrix, NOT just one column, of the copying matrix x2_dm. - // The copying submatrix must start at (br, bc) ane end at (br+nrs-1, bc+ncs-1). - // Copying is done column by column. - // x1_dv, whose elements from x1_dv->v+ptrloc1 to x1_dv->v+ptrloc1+nrs*ncs-1 are copied from the submatrix of of x2_dm->m. - //Inputs: The copying submatrix of x2_dm->M. - // ptrloc1: inclusive pointer location for x1_dv->v where the copy begins. - // br: beginning of the row (*must* be 0 based) for x2_dm, inclusive. - // bc: beginning of the column (*must* be 0 based) for x2_dm, inclusive. - // nrs: number of rows to be copied. - // ncs: number of colums to be copied. - int nrows, ncols, _j, loc1; - double *v, *M; - - if ( !x1_dv || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_sub(): All input pointers must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_sub(): R input matrix must be given values"); - else { - v = x1_dv->v; - M = x2_dm->M; - nrows = x2_dm->nrows; - ncols = x2_dm->ncols; - } - - if ( !(x2_dm->flag & M_GE) ) { - if (x2_dm->flag & M_SU) SUtoGE(x2_dm); - else if (x2_dm->flag & M_SL) SLtoGE(x2_dm); - else fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_sub(): Haven't got time to deal with the M_UT and M_LT cases for x2_dm"); - } - - if ( (bc+ncs)<=ncols && (br+nrs)<=nrows && (ptrloc1+ncs*nrs)<=x1_dv->n ) { - loc1 = ptrloc1; - for (_j=0; _j<ncs; _j++) { - memcpy(v+loc1, M+mos(br, bc+_j, nrows), nrs*sizeof(double)); //mos(br, bc+_j, nrows): Points to the top of the column in the submatrix of x2_dm. - loc1 += nrs; //Must be after memcpy(). - } - x1_dv->flag = V_DEF; - } - else fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_sub(): the submatrix of x2_dm must be within the ranges of both x1_dv and x2_dm"); -} - -void CopySubmatrix2vector_int(TSivector *x1_iv, const int ptrloc1, TSimatrix *x2_im, const int br, const int bc, const int nels) { - //Ouputs: - // x1_iv, whose elements from x1_iv->v+ptrloc1 to x1_iv->v+ptrloc1+nels-1 are copied from a column of x2_im->m. - //Inputs: Copying elements from x2_im->M+ptrloc2 to x2_im->M+ptrloc2+nels-1 (to x1_iv->v). - // ptrloc1: pointer location for x1_iv->v where the copy begins, inclusive. - // br: beginning of the row (*must* be 0 based) for x2_im, inclusive. - // bc: beginning of the column (*must* be 0 based) for x2_im, inclusive. - // nels: number of elements to be copied. - int ptrloc2; //pointer location for x2_im->M where the copy begins. - - if ( !x1_iv || !x2_im ) fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_int(): All input pointers must be created (memory-allocated)"); - else ptrloc2 = mos(br,bc,x2_im->nrows); // ptrloc2: pointer location for x2_im->M where the copy begins. - - - - if ( (ptrloc2+nels)<=(x2_im->nrows*x2_im->ncols) && (ptrloc1+nels)<=x1_iv->n) { - memcpy(x1_iv->v+ptrloc1, x2_im->M+ptrloc2, nels*sizeof(int)); - x1_iv->flag = V_DEF; - } - else fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_int(): Copying (copied) elements are outside the dimension of the copying matrix x2_im (the copied vector x1_iv)"); -} - -void CopySubmatrix2vector_row(TSdvector *x1_dv, const int ptrloc1, TSdmatrix *x2_dm, const int br, const int bc, const int nels) { - //This is much less efficient because we copy a row of x2_dm where x2_dm is a column-major matrix. But sometimes, - // transposing x2_dm and then using CopySubmatrix2vector() proves more costly if the transpose has to be done in each iteration. - //If SWITCHINTELCMATH is activated, it may achieve efficiency. - // - //Ouputs: copying a row of x2_dm to a vector. - // x1_dv, whose elements from x1_dv->v+ptrloc1 to x1_dv->v+ptrloc1+nels-1 are copied from a row of x2_dm->m. - //Inputs: Copying elements from x2_dm->M(br, bc) to x2_dm->M(br, bc+nels-1) (to x1_dv->v). - // ptrloc1: inclusive pointer location for x1_dv->v where the copy begins. - // br: beginning of the row (*must* be 0 based) for x2_dm, inclusive. - // bc: beginning of the column (*must* be 0 based) for x2_dm, inclusive. - // nels: number of elements to be copied. - int nrows; - #if !defined(SWITCHTOINTELCMATH) // define: use my own C math library ; undef: use others. - int _i; - #endif - double *v, *M; - - if ( !x1_dv || !x2_dm ) fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_row(): All input pointers must be created (memory-allocated)"); - else if ( !x2_dm->flag ) fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_row(): R input matrix must be given values"); - else { - v = x1_dv->v; - M = x2_dm->M; - nrows = x2_dm->nrows; - } - - if ( !(x2_dm->flag & M_GE) ) { - if (x2_dm->flag & M_SU) SUtoGE(x2_dm); - else if (x2_dm->flag & M_SL) SLtoGE(x2_dm); - else fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_row(): Haven't got time to deal with the M_UT and M_LT cases for x2_dm"); - } - - - if ( (bc+nels)<=x2_dm->ncols && (ptrloc1+nels)<=x1_dv->n) { - #if defined (INTELCMATHLIBRARY) // define: use Intek MKL LAPACK library; undef: use others. - cblas_dcopy(nels, M+mos(br, bc, nrows), nrows, v+ptrloc1, 1); //mos(): inclusive pointer location for x2_dm where the copy begins. - #else //Default to SWITCHTOTZCMATH // define: use my own C math library ; undef: use others. - //for (_i=0; _i<nels; _i++) v[ptrloc1+_i] = M[mos(br, bc+_i, nrows)]; - for (_i=nels-1; _i>=0; _i--) v[ptrloc1+_i] = M[mos(br, bc+_i, nrows)]; //Changed above to this. 9/2/03. - #endif - x1_dv->flag = V_DEF; - } - else fn_DisplayError(".../mathlib.c/CopySubmatrix2vector_row(): Copying (copied) elements are outside the dimension of the copying matrix x2_dm (the copied vector x1_dv)"); -} - -void CopySubvector2matrix(TSdmatrix *x1_dm, const int br, const int bc, const TSdvector *x2_dv, const int ptrloc2, const int nels) { - //Ouputs: only the ``bc''th column of the matrix is copied. If this is too restrictive, see CopySubvector2matrix_unr(). - // Copied elements (x1_dm->M+ptrloc1 to x1_dv->M+ptrloc1+nels-1) from x2_dv->v. - // Always sets x1_dm->flag = M_GE after the call to this function. - //Inputs: - // Copying elements from x2_dv->v+ptrloc2 to x2_dv->v+ptrloc2+nels-1 (to x1_dm->M). - // nels: number of elements to be copied. - // br: beginning of the row (*must* be 0 based) for x2_dm, inclusive. - // bc: beginning of the column (*must* be 0 based) for x2_dm, inclusive. - // ptrloc2: pointer location for x2_dv->v where the copy begins, inclusive. - int ptrloc1, nrows, ncols; - - if ( !x1_dm || !x2_dv ) fn_DisplayError(".../mathlib.c/CopySubvector2matrix(): All input pointers must be created (memory-allocated)"); - else if (!x2_dv->flag) fn_DisplayError(".../mathlib.c/CopySubvector2matrix(): R input vector must be given values"); - else { - nrows = x1_dm->nrows; - ncols = x1_dm->ncols; - ptrloc1 = mos(br, bc, x1_dm->nrows); //ptrloc1: pointer location for x1_dm->M where the copy begins. - } - - - if ( (ptrloc2+nels)<=x2_dv->n && (br+nels)<=nrows ) { - memcpy(x1_dm->M+ptrloc1, x2_dv->v+ptrloc2, nels*sizeof(double)); - x1_dm->flag = M_GE; //Always reset to a general matrix because it will almost surely break, say, the original symmetry of the matrix x1_dm if x1_dm->flag exists in the first place. - //-------if (!x1_dm->flag) x1_dm->flag = M_GE; //Set to a general matrix if this matrix is not set yet. - } - else fn_DisplayError(".../mathlib.c/CopySubvector2matrix(): Copying (copied) elements are outside the (row) dimension of the copying vector x2_dv (the copied matrix x1_dm)"); -} - - -#if defined( INTELCMATHLIBRARY ) -void CopySubvector2rowmatrix(TSdmatrix *x1_dm, const int br, const int bc, const TSdvector *x2_dv, const int ptrloc2, const int nels) -{ - //Ouputs: - // Only the ``br''th row of the matrix x1_dm (starting from the ``bc''th column) is copied from x2_dv->v. - // Always sets x1_dm->flag = M_GE after the call to this function. - //Inputs: - // Copying elements from x2_dv->v+ptrloc2 to x2_dv->v+ptrloc2+nels-1 (to x1_dm). - // nels: number of elements to be copied. - // br: beginning of the row (*must* be 0 based) for x2_dm, inclusive. - // bc: beginning of the column (*must* be 0 based) for x2_dm, inclusive. - // ptrloc2: pointer location for x2_dv->v where the copy begins, inclusive. - int ptrloc1, nrows, ncols; - - if ( !x1_dm || !x2_dv ) fn_DisplayError(".../mathlib.c/CopySubvector2rowmatrix(): All input pointers must be created (memory-allocated)"); - else if (!x2_dv->flag) fn_DisplayError(".../mathlib.c/CopySubvector2rowmatrix(): R input vector must be given values"); - else { - nrows = x1_dm->nrows; - ncols = x1_dm->ncols; - ptrloc1 = mos(br, bc, x1_dm->nrows); //ptrloc1: pointer location for x1_dm->M where the copy begins. - } - - - if ( (ptrloc2+nels)<=x2_dv->n && (bc+nels)<=ncols ) { - cblas_dcopy(nels, x2_dv->v+ptrloc2, 1, x1_dm->M+ptrloc1, nrows); - x1_dm->flag = M_GE; //Always reset to a general matrix because it will almost surely break, say, the original symmetry of the matrix x1_dm if x1_dm->flag exists in the first place. - //-------if (!x1_dm->flag) x1_dm->flag = M_GE; //Set to a general matrix if this matrix is not set yet. - } - else fn_DisplayError(".../mathlib.c/CopySubvector2rowmatrix(): Copying (copied) elements are outside the (row) dimension of the copying vector x2_dv (the copied matrix x1_dm)"); -} -#else - Haven't got time to code up the default using Linux BLAS. -#endif - - -void CopySubvector2matrix_sub(TSdmatrix *x1_dm, const int br, const int bc, const int nrs, const int ncs, TSdvector *x2_dv, const int ptrloc2) { - //Ouputs: Unlike CopySubvector2matrix, _sub means a submatrix, NOT just one column, of the copied matrix x1_dm. - // The copyed submatrix must start at (br, bc) ane end at (br+nrs-1, bc+ncs-1). - // x1_dm: The copyed submatrix of x2_dm->M. - - //Inputs: - // x2_dv: whose elements from x2_dv->v+ptrloc2 to x2_dv->v+ptrloc2+nrs*ncs-1 are copied to the submatrix of of x1_dm->m. - // ptrloc2: inclusive pointer location for x2_dv->v where the copy begins. - // br: beginning of the row (*must* be 0 based) for x1_dm, inclusive. - // bc: beginning of the column (*must* be 0 based) for x1_dm, inclusive. - // nrs: number of rows to be copied. - // ncs: number of colums to be copied. - int nrows, ncols, _j, loc2; - double *v, *M; - - if ( !x1_dm || !x2_dv ) fn_DisplayError(".../mathlib.c/CopySubvector2matrix_sub(): All input pointers must be created (memory-allocated)"); - else if ( !x2_dv->flag ) fn_DisplayError(".../mathlib.c/CopySubvector2matrix_sub(): R input vector must be given values"); - else { - v = x2_dv->v; - M = x1_dm->M; - nrows = x1_dm->nrows; - ncols = x1_dm->ncols; - } - - if ( (bc+ncs)<=ncols && (br+nrs)<=nrows && (ncs*nrs)<=(x2_dv->n-ptrloc2) ) { - loc2 = ptrloc2; - for (_j=0; _j<ncs; _j++) { - memcpy(M+mos(br, bc+_j, nrows), v+loc2, nrs*sizeof(double)); //mos(br, bc+_j, nrows): Points to the top of the column in the submatrix of x2_dm. - loc2 += nrs; //Must be after memcpy(). - } - x1_dm->flag = M_GE; - } - else fn_DisplayError(".../mathlib.c/CopySubvector2matrix_sub(): the submatrix of x1_dm must be within the ranges of both x1_dm and x2_dv"); -} - -void CopySubvector2matrix_unr(TSdmatrix *x1_dm, const int br, const int bc, const TSdvector *x2_dv, const int ptrloc2, const int nels) { - //Ouputs: _unr means that there is no such a restriction that only the ``bc''th column to be copied in the matrix. Copied - // elements can affect several columns of the matrix other than the ``bc'' column, but one must be aware - // that the bc+1 column may start before the specified br. Thus, this function can be used as the Matlab reshape function. - // Copied elements (x1_dm->M+ptrloc1 to x1_dv->M+ptrloc1+nels-1) from x2_dv->v. - // Always sets x1_dm->flag = M_GE after the call to this function. - //Inputs: - // Copying elements from x2_dv->v+ptrloc2 to x2_dv->v+ptrloc2+nels-1 (to x1_dm->M). - // nels: number of elements to be copied. - // br: beginning of the row (*must* be 0 based) for x2_dm, inclusive. - // bc: beginning of the column (*must* be 0 based) for x2_dm, inclusive. - // ptrloc2: pointer location for x2_dv->v where the copy begins, inclusive. - int ptrloc1, nrows, ncols; - - if ( !x1_dm || !x2_dv ) fn_DisplayError(".../mathlib.c/CopySubvector2matrix_unr(): All input pointers must be created (memory-allocated)"); - else if (!x2_dv->flag) fn_DisplayError(".../mathlib.c/CopySubvector2matrix_unr(): R input vector must be given values"); - else { - nrows = x1_dm->nrows; - ncols = x1_dm->ncols; - ptrloc1 = mos(br, bc, x1_dm->nrows); //ptrloc1: pointer location for x1_dm->M where the copy begins. - } - - - if ( (ptrloc2+nels)<=x2_dv->n && (ptrloc1+nels)<=(nrows*ncols) ) { - memcpy(x1_dm->M+ptrloc1, x2_dv->v+ptrloc2, nels*sizeof(double)); - x1_dm->flag = M_GE; //Always reset to a general matrix because it will almost surely break, say, the original symmetry of the matrix x1_dm if x1_dm->flag exists in the first place. - //-------if (!x1_dm->flag) x1_dm->flag = M_GE; //Set to a general matrix if this matrix is not set yet. - } - else fn_DisplayError(".../mathlib.c/CopySubvector2matrix_unr(): Copying (copied) elements are outside the dimension of the copying vector x2_dv (the copied matrix x1_dm)"); -} - -void TransposeSquare(TSdmatrix *B_dm, TSdmatrix *A_dm) { - //???????? Some options are NOT test yet. 5/27/03. ??????????? - // Transposes the n-by-n matrix A_dm to the n-by-n matrix B_dm. - // If A_dm = B_dm, B_dm will be replaced by transposed values. - // - //Outputs: - // B_dm: n-by-n matrix (memory already allocated outside this function). - //Inputs: - // A_dm: n-by-n matrix to be transposed. - int _i, _j, _n, Aflag; - double *A, *B, tmpd; - - //=== Checking dimensions and memory allocation. - if ( !B_dm || !A_dm ) fn_DisplayError(".../mathlib.c/TransposeSquare(): Input matrices must be created (memory-allocated)"); - if ( ((_n=A_dm->nrows) != B_dm->ncols) || (_n != B_dm->nrows) || (_n != A_dm->ncols) ) - fn_DisplayError(".../mathlib.c/TransposeSquare(): Both input matrices must be square"); - //This is too tough by killing the program. if ( ((Aflag=A_dm->flag) & M_SU) && (Aflag & M_SL) ) fn_DisplayError(".../mathlib.c/TransposeSquare(): Matrix is already both SU and SL, so there is no need to transpose. Check a possible bug in your program"); - //The above checking is very important even though it takes about 4 clock cycles, because - // (1) one may make a mistake to mis-use this matrix over and over again; - // (2) if there is no mistake, then no need to transpose this matrix. - if ( ((Aflag=A_dm->flag) & M_SU) && (Aflag & M_SL) ) - { - #if defined (USE_DEBUG_FILE) - fprintf(FPTR_DEBUG, "\nWARNING: .../mathlib.c/TransposeSquare(): the matrix is already both SU and SL, so there is no need to transpose.\n"); - fflush(FPTR_DEBUG); - #else - fprintf(stdout, "\nWARNING: .../mathlib.c/TransposeSquare(): the matrix is already both SU and SL, so there is no need to transpose.\n"); - fflush(stdout); - #endif - - if ( (A=A_dm->M) != (B=B_dm->M) ) - { - CopyMatrix0(B_dm, A_dm); - return; - } - else return; - } - - - - //=== Transposing the square matrix A_dm. - if ( (A=A_dm->M) != (B=B_dm->M) ) { - if (Aflag & M_GE) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) { - //Off-diagonal elements. - B[_i*_n+_j] = A[_j*_n+_i]; - B[_j*_n+_i] = A[_i*_n+_j]; - } - for (_i=square(_n)-1; _i>=0; _i -= _n+1) B[_i] = A[_i]; //Diagonal elements. - switch (Aflag) { - case (M_GE | M_UT): - B_dm->flag = M_GE | M_LT; - break; - case (M_GE | M_LT): - B_dm->flag = M_GE | M_UT; - break; - default: - B_dm->flag = M_GE; - } - } - else if (Aflag & M_SU) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - B[mos(_i, _j, _n)] = A[mos(_j, _i, _n)]; //Off-diagonal elements. - for (_i=square(_n)-1; _i>=0; _i -= _n+1) - B[_i] = A[_i]; //Diagonal elements. - B_dm->flag = M_SL; - } - else if (Aflag & M_SL) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - B[mos(_j, _i, _n)] = A[mos(_i, _j, _n)]; //Off-diagonal elements. - for (_i=square(_n)-1; _i>=0; _i -= _n+1) - B[_i] = A[_i]; //Diagonal elements. - B_dm->flag = M_SU; - } - else if (Aflag & M_UT) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - B[mos(_i, _j, _n)] = A[mos(_j, _i, _n)]; //Off-diagonal elements. - for (_i=square(_n)-1; _i>=0; _i -= _n+1) - B[_i] = A[_i]; //Diagonal elements. - B_dm->flag = M_LT; - } - else if (Aflag & M_LT) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - B[mos(_j, _i, _n)] = A[mos(_i, _j, _n)]; //Off-diagonal elements. - for (_i=square(_n)-1; _i>=0; _i -= _n+1) - B[_i] = A[_i]; //Diagonal elements. - B_dm->flag = M_UT; - } - } - else { - // ????? NOT tested yet. 5/27/03. ???????????? - if ( (Aflag & M_GE) && (Aflag & M_UT) ) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) { - //Off-diagonal elements. - A[mos(_i, _j, _n)] = A[mos(_j, _i, _n)]; - A[mos(_j, _i, _n)] = 0.0; - } - A_dm->flag = M_GE | M_LT; - } - else if ( (Aflag & M_GE) && (Aflag & M_LT) ) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) { - //Off-diagonal elements. - A[mos(_j, _i, _n)] = A[mos(_i, _j, _n)]; - A[mos(_i, _j, _n)] = 0.0; - } - A_dm->flag = M_GE | M_UT; - } - else if (Aflag & M_GE) { - //Tested. Fine. 10 Oct. 03. - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - swap(A[mos(_i,_j,_n)], A[mos(_j,_i,_n)], tmpd); //Off-diagonal elements. - A_dm->flag = M_GE; - } - else if (Aflag & M_SU) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - A[mos(_i, _j, _n)] = A[mos(_j, _i, _n)]; //Off-diagonal elements. - A_dm->flag = M_GE | M_SU | M_SL; - } - else if (Aflag & M_SL) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - A[mos(_j, _i, _n)] = A[mos(_i, _j, _n)]; //Off-diagonal elements. - A_dm->flag = M_GE | M_SU | M_SL; - } - else if (Aflag & M_UT) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - A[mos(_i, _j, _n)] = A[mos(_j, _i, _n)]; //Off-diagonal elements. - A_dm->flag = M_LT; - } - else if (Aflag & M_LT) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) - A[mos(_j, _i, _n)] = A[mos(_i, _j, _n)]; //Off-diagonal elements. - A_dm->flag = M_UT; - } - else fn_DisplayError(".../mathlib.c/TransposeSquare(): Input matrix is not M_GE, M_SU, M_SL, M_UT, or M_LT. Check the matrix to see why transpose is still required"); - } - - - /** OLD code, which has some errors, I belive. 5/28/03. - //=== Transposing the square matrix A_dm. - if ( (A=A_dm->M) != (B=B_dm->M) ) { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) { - //Off-diagonal elements. - B[_i*_n+_j] = A[_j*_n+_i]; - B[_j*_n+_i] = A[_i*_n+_j]; - } - for (_i=square(_n)-1; _i>=0; _i -= _n+1) - B[_i] = A[_i]; //Diagonal elements. - - switch (A_dm->flag) { - case (M_GE | M_UT): - B_dm->flag = M_GE | M_LT; - break; - case (M_GE | M_LT): - B_dm->flag = M_GE | M_UT; - break; - case M_GE: - B_dm->flag = M_GE; - break; - default: - fn_DisplayError(".../mathlib.c/TransposeSquare(): (1) If the R input matrix is symmetric, no transpose is needed. (2) If triangular, it may be unnecessary so that no code is written for a triangular case"); - } - } - else { - // ????? NOT tested yet. 2/27/03. ???????????? - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) { - //Off-diagonal elements. - tmpd = A[_j*_n+_i]; - A[_j*_n+_i] = A[_i*_n+_j]; - A[_i*_n+_j] = tmpd; - } - - switch (A_dm->flag) { - case (M_GE | M_UT): - B_dm->flag = M_GE | M_LT; - break; - case (M_GE | M_LT): - B_dm->flag = M_GE | M_UT; - break; - case M_GE: - B_dm->flag = M_GE; - break; - default: - fn_DisplayError(".../mathlib.c/TransposeSquare(): (1) If the R input matrix is symmetric, no transpose is needed. (2) If triangular, it may be unnecessary so that no code is written for a triangular case"); - } - } - /**/ -} - -void TransposeRegular(TSdmatrix *B_dm, const TSdmatrix *A_dm) { - // Transposes the m-by-n matrix A_dm to the n-by-m matrix B_dm. - // - //Outputs: - // B_dm: n-by-m general matrix (memory already allocated outside this function). - //Inputs: - // A_dm: m-by-n general matrix to be transposed. - int _i, _j, _m, _n; - double *A, *B; - - - //=== Checking dimensions and memory allocation. - if ( !B_dm || !A_dm ) fn_DisplayError(".../mathlib.c/TransposeRegular(): Input matrices must be created (memory-allocated)"); - else if ( !(A_dm->flag & M_GE) ) fn_DisplayError(".../mathlib.c/TransposeRegular(): (1) Input matrix A_dm must be given values. (2) A_dm must be a general (M_GE) matrix"); - else { - _m = A_dm->nrows; - _n = A_dm->ncols; - A = A_dm->M; - B = B_dm->M; - } - if ( (_m != B_dm->ncols) || (_n != B_dm->nrows) ) fn_DisplayError(".../mathlib.c/TransposeRegular(): Dimension of B_dm must be compatible with those of tranposed A_dm"); - - - //=== Transposing the regular matrix A_dm - if (_m<_n) { - for (_j=0; _j<_m; _j++) - for (_i=_j+1; _i<_m; _i++) { - //Off-diagonal elements in the square part. - B[mos(_j, _i, _n)] = A[mos(_i, _j, _m)]; - B[mos(_i, _j, _n)] = A[mos(_j, _i, _m)]; - } - - for (_i=_m-1; _i>=0; _i--) - B[mos(_i,_i,_n)] = A[mos(_i, _i, _m)]; //Diagonal elements. - - for (_j=_m; _j<_n; _j++) - for (_i=0; _i<_m; _i++) - B[_i*_n+_j] = A[_j*_m+_i]; //Off-diagonal elements in the trapozoidal part. - - B_dm->flag = M_GE; - } - else { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) { - //Off-diagonal elements in the square part. - B[_i*_n+_j] = A[_j*_m+_i]; - B[_j*_n+_i] = A[_i*_m+_j]; - } - - for (_i=0; _i<_n; _i++) - B[mos(_i,_i,_n)] = A[mos(_i,_i,_m)]; //Diagonal elements. - - for (_i=_n; _i<_m; _i++) - for (_j=0; _j<_n; _j++) - B[_i*_n+_j] = A[_j*_m+_i]; //Off-diagonal elements in the trapozoidal part. - - B_dm->flag = M_GE; - } -} -//--- -TSdmatrix *tz_TransposeRegular(TSdmatrix *B_dm, const TSdmatrix *A_dm) -{ - // Transposes the m-by-n matrix A_dm to the n-by-m matrix B_dm. - // - //Outputs: - // If B_dm==NULL, B_dm (n-by-m general matrix) is created (memory allocated) and returned (thus, the memory must be destroyed outside this function). - // If B_dm!=NULL, B_dm (n-by-m general matrix)'s memory has already been allocated outside this function and the same B_dm will be returned. - //Inputs: - // A_dm: m-by-n general matrix to be transposed. - int _i, _j, _m, _n; - double *A, *B; - - - //=== Checking dimensions and memory allocation. - if (!A_dm) fn_DisplayError(".../mathlib.c/TransposeRegular(): Input matrix A_dm must be created (memory-allocated)"); - if ( !(A_dm->flag & M_GE) ) fn_DisplayError(".../mathlib.c/TransposeRegular(): (1) Input matrix A_dm must be given values. (2) A_dm must be a general (M_GE) matrix"); - _m = A_dm->nrows; - _n = A_dm->ncols; - A = A_dm->M; - // - if (!B_dm) B_dm = CreateMatrix_lf(_n, _m); - else - if ( (_m != B_dm->ncols) || (_n != B_dm->nrows) ) fn_DisplayError(".../mathlib.c/TransposeRegular(): Dimension of B_dm must be compatible with those of tranposed A_dm"); - B = B_dm->M; - - //=== Transposing the regular matrix A_dm - if (_m<_n) { - for (_j=0; _j<_m; _j++) - for (_i=_j+1; _i<_m; _i++) { - //Off-diagonal elements in the square part. - B[mos(_j, _i, _n)] = A[mos(_i, _j, _m)]; - B[mos(_i, _j, _n)] = A[mos(_j, _i, _m)]; - } - - for (_i=_m-1; _i>=0; _i--) - B[mos(_i,_i,_n)] = A[mos(_i, _i, _m)]; //Diagonal elements. - - for (_j=_m; _j<_n; _j++) - for (_i=0; _i<_m; _i++) - B[_i*_n+_j] = A[_j*_m+_i]; //Off-diagonal elements in the trapozoidal part. - - B_dm->flag = M_GE; - } - else { - for (_j=0; _j<_n; _j++) - for (_i=_j+1; _i<_n; _i++) { - //Off-diagonal elements in the square part. - B[_i*_n+_j] = A[_j*_m+_i]; - B[_j*_n+_i] = A[_i*_m+_j]; - } - - for (_i=0; _i<_n; _i++) - B[mos(_i,_i,_n)] = A[mos(_i,_i,_m)]; //Diagonal elements. - - for (_i=_n; _i<_m; _i++) - for (_j=0; _j<_n; _j++) - B[_i*_n+_j] = A[_j*_m+_i]; //Off-diagonal elements in the trapozoidal part. - - B_dm->flag = M_GE; - } - - return (B_dm); -} - - -void SUtoGE(TSdmatrix *x_dm) { - //Output: x_dm (nrows<=ncols) becomes a general matrix in addition to being upper symmetric. - //Input: x_dm (nrows<=ncols) is upper symmetric. - // We do not check if x_dm is upper symmetric because we assume the calling function checks this before this function is called. - int nrows, ncols, _i, _j; - if (!x_dm) fn_DisplayError(".../mathlib.c/SUtoGE(): Input upper symmetric matrix must be created (memory-allocated)"); - else if ( !(x_dm->flag & M_SU) ) fn_DisplayError(".../mathlib.c/SUtoGE(): Input matrix must be (1) upper symmetric and (2) given legal values"); - else if ( (nrows=x_dm->nrows) != (ncols=x_dm->ncols) ) fn_DisplayError(".../mathlib.c/SUtoGE(): Upper symmetric matrix must be square."); - else { - for (_j=0; _j<nrows; _j++) - for (_i=_j+1; _i<nrows; _i++) - x_dm->M[mos(_i, _j, nrows)] = x_dm->M[mos(_j, _i, nrows)]; //Off-diagonal elements in the square part. - x_dm->flag = M_GE | M_SL | M_SU; - } -} - -void SLtoGE(TSdmatrix *x_dm) { - //Output: x_dm becomes a general square matrix in addition to being lower symmetric. - //Input: x_dm is lower symmetric. - // We do not check if x_dm is upper symmetric because we assume the calling function checks this before this function is called. - int nrows, ncols, _i, _j; - if (!x_dm) fn_DisplayError(".../mathlib.c/SLtoGE(): Input lower symmetric matrix must be created (memory-allocated)"); - else if ( !(x_dm->flag & M_SL) ) fn_DisplayError(".../mathlib.c/SLtoGE(): Input matrix must be (1) lower symmetric and (2) given legal values"); - else if ( (nrows=x_dm->nrows) != (ncols=x_dm->ncols) ) fn_DisplayError(".../mathlib.c/SLtoGE(): The lower symmetric matrix must be sqaure"); - else { - for (_j=0; _j<nrows; _j++) - for (_i=_j+1; _i<nrows; _i++) - x_dm->M[mos(_j, _i, nrows)] = x_dm->M[mos(_i, _j, nrows)]; //Off-diagonal elements in the square part. - x_dm->flag = M_GE | M_SU | M_SL; - } -} - -double SumVector(TSdvector *x_dv) { - int _i; - double sum = 0.0, //Cumulative. - *v; - //double *ptrcnt, *endptr; - - //=== This option may not speed up. - // if ( !x_dv ) fn_DisplayError(".../mathlib.c/SumVector(): Input vector must be created (memory-allocated)"); - // else endptr = (ptrcnt = x_dv->v) + x_dv->n; - // for ( ; ptrcnt<endptr; ptrcnt++ ) sum += *ptrcnt; - - if ( !x_dv || !x_dv->flag ) fn_DisplayError(".../mathlib.c/SumVector(): input vector must be (a) created (memory-allocated) and (b) assigned legal values"); - for (_i=x_dv->n-1, v=x_dv->v; _i>=0; _i--) sum += v[_i]; - - return( sum ); -} - -//double SumVector(TSdvector *x_dv) { -// int _i, _n; -// double sum; -// double *v; - -// if ( !x_dv ) fn_DisplayError(".../mathlib.c/SumVector(): Input vector must be created (memory-allocated)"); -// else { -// v = x_dv->v; -// _n = x_dv->n; -// } - -// sum = v[0]; -// for ( _i=1; _i<_n; _i++ ) sum += v[_i]; -// return( sum ); -//} - - -double MinVector(TSdvector *x_dv) -{ - //Input: no change for x_dv in this function. - int _i, n; - double minvalue; - double *v; - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/MinVector_lf(): Input vector x_dv must be (1) allocated memory and (2) assigned legal values"); - n = x_dv->n; - v = x_dv->v; - - minvalue = v[0]; - for (_i=n-1; _i>0; _i--) - if (v[_i]<minvalue) minvalue = v[_i]; - - return( minvalue ); -} - -double MaxVector(TSdvector *x_dv) -{ - //Input: no change for x_dv in this function. - int _i, n; - double maxvalue; - double *v; - - if (!x_dv || !x_dv->flag) fn_DisplayError(".../cstz.c/MaxVector_lf(): Input vector x_dv must be (1) allocated memory and (2) assigned legal values"); - n = x_dv->n; - v = x_dv->v; - - maxvalue = v[0]; - for (_i=n-1; _i>0; _i--) - if (v[_i]>maxvalue) maxvalue = v[_i]; - - return( maxvalue ); -} - -int MaxVector_int(TSivector *x_iv) -{ - //Input: no change for x_iv in this function. - int _i; - int maxvalue; - int *v; - - if (!x_iv || !x_iv->flag) fn_DisplayError(".../cstz.c/MaxVector_int(): Input vector x_iv must be (1) allocated memory and (2) assigned legal values"); - v = x_iv->v; - - maxvalue = v[0]; - for (_i=x_iv->n-1; _i>0; _i--) - if (v[_i]>maxvalue) maxvalue = v[_i]; - - return( maxvalue ); -} - - -void SumMatrix(TSdvector *x_dv, const TSdmatrix *X_dm, const char rc) -{ - //Outputs: - // x_dv: if rc=='R' or 'r', x_dv = sum of X_dm across rows; else or if rc=='C' or 'c', x_dv = sum of X_dm across columns. - int _i, _n, _k, nrows, ncols, last; - double sum; - double *v, *M; - - - if ( !x_dv || !X_dm || !X_dm->flag ) fn_DisplayError(".../mathlib.c/SumMatrix(): (a) output vector must be created (memory-allocated) and (b) input matrix must be created and assigned legal values"); - - - if (rc=='R' || rc=='r') { - if ((_n=x_dv->n) != X_dm->ncols) fn_DisplayError(".../mathlib.c/SumMatrix(): length of the output vector must match the number of columns of the input matrix when summing it across rows"); - v = x_dv->v; - M = X_dm->M; - for (_i=_n-1; _i>=0; _i--) { - sum = 0.0; - last = (_i+1)*(nrows=X_dm->nrows); - for (_k=_i*nrows; _k<last; _k++) sum +=M[_k]; - v[_i] = sum; - } - } - else { - if ((_n=x_dv->n) != X_dm->nrows) fn_DisplayError(".../mathlib.c/SumMatrix(): length of the output vector must match the number of rows of the input matrix when summing it across columns"); - v = x_dv->v; - M = X_dm->M; - for (_i=_n-1; _i>=0; _i--) { - sum = 0.0; - last = _i + ((ncols=X_dm->ncols)-1)*_n; - for (_k=_i; _k<=last; _k += _n) sum +=M[_k]; //Must _k<=, NOT, _k<. - v[_i] = sum; - } - } - - x_dv->flag = V_DEF; -} - - -void diagdv(TSdvector *x_dv, TSdmatrix *x_dm) -{ - //Extract the diagonal elements of x_dm to a vector. - // - //Outputs: - // x_dv: nrows-by-1 vector. - //Inputs: - // x_dm: nrows-by-ncols matrix. - int _i, _n; - double *v, *M; - - - //=== Checking dimensions and memory allocation. - if ( !x_dv || !x_dm ) fn_DisplayError(".../mathlib.c/diagdv(): Both the input vector and output matrix must be created (memory-allocated)"); - else { - if (x_dm->nrows < x_dm->ncols) _n = x_dm->nrows; - else _n = x_dm->ncols; - v = x_dv->v; - M = x_dm->M; - } - if ( _n != x_dv->n ) fn_DisplayError(".../mathlib.c/diagdv(): Dimensions of input vector and matrix must match"); - - - for (_i=0; _i<_n; _i++) v[_i] = M[mos(_i,_i,_n)]; - x_dv->flag = V_DEF; -} -//--- -TSdmatrix *tz_DiagMatrix(TSdmatrix *X_dm, TSdvector *x_dv) -{ - //Converts a vector to a diagonal matrix with the diagonal elements being the input vector. - // - //Outputs: - // X_dm: _n-by-_n diagonal matrix. - // If X_dm = NULL, then Xout_dm is allocated memory and exported (therefore, its memory will be freed outside this function0. - //Inputs: - // x_dv: _n-by-1 vector. - int _i, _n; - double *v, *M; - TSdmatrix *Xout_dm; - - - //=== Checking dimensions and memory allocation. - if ( !x_dv || !x_dv->flag) fn_DisplayError(".../mathlib.c/tz_DiagMatrix(): the input vector must be (1) created (memory-allocated) and (2) given legal values"); - _n = x_dv->n; - - if (X_dm) - { - if ((_n != X_dm->nrows) || (_n != X_dm->ncols)) fn_DisplayError(".../mathlib.c/tz_DiagMatrix(): (1) the input matrix must be square; (2) dimensions of input vector and matrix must match"); - if (isdiagonalmatrix(X_dm)) Xout_dm = X_dm; - else fn_DisplayError(".../mathlib.c/tz_DiagMatrix(): the input matrix must be diagonal (M_UT | M_LT)"); - } - else Xout_dm = CreateConstantMatrix_lf(_n, _n, 0.0); - - M = Xout_dm->M; - v = x_dv->v; - - for (_i=0; _i<_n; _i++) M[mos(_i,_i,_n)] = v[_i]; - if ( !X_dm ) Xout_dm->flag = (M_GE | M_UT | M_LT); //Diagonal (i.e., both lower and upper triangular). - - return (Xout_dm); -} - - -double tracefabs(TSdmatrix *x_dm) -{ - //Sum of absolute values of the diagonal elements of x_dm. - // - //Outputs: - // y: double value. - //Inputs: - // x_dm: nrows-by-ncols matrix. - int _i, _n; - double traceval=0.0, //Cumulative. - *M; - - - //=== Checking dimensions and memory allocation. - if (!x_dm) fn_DisplayError(".../mathlib.c/tracefabs(): The input matrix must be created (memory-allocated)"); - else { - if (x_dm->nrows < x_dm->ncols) _n = x_dm->nrows; - else _n = x_dm->ncols; - M = x_dm->M; - } - - - for (_i=0; _i<_n; _i++) traceval += fabs(M[mos(_i,_i,_n)]); - return( traceval ); -} -double tracelogfabs(TSdmatrix *x_dm) -{ - //Sum of logs of absolute values of the diagonal elements of the square x_dm or sum(log(diag(abs(x_dm)))). - // - //Outputs: - // y: double value. - //Inputs: - // x_dm: nrows-by-ncols matrix. - int _i, _n; - double traceval=0.0, //Cumulative. - *M; - - //=== Checking dimensions and memory allocation. - if (!x_dm || !x_dm->flag) fn_DisplayError(".../mathlib.c/tracelogfabs(): The input matrix must be (1) created (memory-allocated) and (2) gvein legal values"); - else M = x_dm->M; - if ((_n = x_dm->nrows) != x_dm->ncols) fn_DisplayError(".../mathlib.c/tracelogfabs(): The input matrix must be square"); - for (_i=square(_n)-1; _i>=0; _i -= _n+1) traceval += log(fabs(M[_i])); - -// if (!x_dm) fn_DisplayError(".../mathlib.c/tracelogfabs(): The input matrix must be created (memory-allocated)"); -// else if ( !x_dm->flag ) fn_DisplayError(".../mathlib.c/tracelogfabs(): The input matrix must be given legal values"); -// else { -// if (x_dm->nrows < x_dm->ncols) _n = x_dm->nrows; -// else _n = x_dm->ncols; -// M = x_dm->M; -// } -// for (_i=0; _i<_n; _i++) traceval += log(fabs(M[mos(_i,_i,_n)])); - - return( traceval ); -} -double tracelog(TSdmatrix *x_dm) -{ - //Sum of logs of the diagonal elements of the square x_dm or sum(log(diag(x_dm))). - // - //Outputs: - // y: double value. - //Inputs: - // x_dm: nrows-by-ncols matrix. - int _i, _n; - double traceval=0.0, //Cumulative. - *M; - - //=== Checking dimensions and memory allocation. - if (!x_dm || !x_dm->flag) fn_DisplayError(".../mathlib.c/tracelogfabs(): The input matrix must be (1) created (memory-allocated) and (2) gvein legal values"); - else M = x_dm->M; - if ((_n = x_dm->nrows) != x_dm->ncols) fn_DisplayError(".../mathlib.c/tracelogfabs(): The input matrix must be square"); - for (_i=square(_n)-1; _i>=0; _i -= _n+1) traceval += log(M[_i]); - - return( traceval ); -} -//--- -double sumoflogvector(TSdvector *x_dv) -{ - //Output: sum(log(x_dv)). - int _i; - double sumlog = 0.0; - double *v; - - if ( !x_dv || !x_dv->flag ) fn_DisplayError("mathlib.c/sumoflogvector(): Input vector x_dv must be (1) created and (2) given legal values"); - v = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) sumlog += log(v[_i]); - - return( sumlog ); -} - - -TSdmatrix *tz_kron(TSdmatrix *C_dm, TSdmatrix *A_dm, TSdmatrix *B_dm) -{ - //C = kron(A, B), compatible with Matlab notation. - //Inputs: - // A_dm and B_dm: two real general matrices. - //Outputs: - // If C_dm == NULL, C_dm is created (memory allocated) and returned (thus, the memory must be destroyed outside this function). - // If C_dm != NULL, C_dm's memory has already been allocated outside this function and the same C_dm will be returned. - int _i, _j, ma, na, mb, nb, ki, kj; - TSdmatrix *Wmb_nb_dm = NULL; - - //=== Checking dimensions and memory allocation. - if (!A_dm || !B_dm) fn_DisplayError("mathlib.c/tz_kron(): Input matrices A_dm and B_dm must be created (memory-allocated)"); - if ( !(A_dm->flag & M_GE) || !(B_dm->flag & M_GE)) fn_DisplayError("mathlib.c/tz_kron(): " - " (1) Input matrices A_dm and B_dm must be given values." - " (2) A_dm and B_dm must be general (M_GE) matrices"); - ma = A_dm->nrows; - na = A_dm->ncols; - mb = B_dm->nrows; - nb = B_dm->ncols; - Wmb_nb_dm = CreateMatrix_lf(mb,nb); - // - if (!C_dm) C_dm = CreateZeroMatrix_lf(ma*mb, na*nb); - else - if ( (C_dm->nrows != (ma*mb)) || (C_dm->ncols != (na*nb)) ) - fn_DisplayError("mathlib.c/tz_kron(): Dimension of C_dm must be compatible with those of A_dm and B_dm"); - - for (_i=ma-1; _i>=0; _i--) - for (_j=na-1; _j>=0; _j--) - { - ki = _i*mb; - kj = _j*nb; - ScalarTimesMatrix(Wmb_nb_dm, A_dm->M[mos(_i,_j,ma)], B_dm, 0.0); - CopySubmatrix(C_dm, ki, kj, Wmb_nb_dm, 0, 0, mb, nb); - } - - //=== - DestroyMatrix_lf(Wmb_nb_dm); - - - return (C_dm); -} - - - - - - - -//======================================================= -// Self-written routines. -//======================================================= -void ergodicp(TSdvector *p_dv, TSdmatrix *P_dm) { - // Computes the ergodic probabilities. See Hamilton p.681. - // - //Outputs: - // p_dv: n-by-1 vector filled by ergodic probabilities p. - //------------ - //Inputs: - // P_dm: n-by-n Markovian transition matrix. Elements in each column sum up to 1.0. - - int eigmaxindx, // Index of the column corresponding to the max eigenvalue. - _i, _j, _n, errflag; - double gpisum=0.0, - eigmax, tmpd0; - double *p_v=NULL, - *absval_v=NULL, - *evalr_v=NULL, - *evali_v=NULL, - *revecr_m=NULL, - *reveci_m=NULL, - *levecr_m=NULL, - *leveci_m=NULL; - TSdvector *absvals_dv=NULL; - TSdzvector *vals_dzv=NULL; - TSdzmatrix *rights_dzm=NULL, *lefts_dzm=NULL; - - - if ( !p_dv || !P_dm || (p_dv->n != P_dm->nrows) || (P_dm->nrows != P_dm->ncols) ) fn_DisplayError(".../mathlib.c/ergodicp(): One of the two pointer arguments is not created (memory-allocated) or sizes of two pointer arguments do not match or input matrix P_dm is not square"); - else if ( !P_dm->flag || !(P_dm->flag & M_GE) ) fn_DisplayError(".../mathlib.c/ergodicp(): (1) R square input matrix (P_dm) must be given values. (2) P_dm must be a general (M_GE) matrix"); - else { - _n = p_dv->n; - absvals_dv = CreateVector_lf(_n); - vals_dzv = CreateVector_dz(_n); - rights_dzm = CreateMatrix_dz(_n, _n); - InitializeConstantMatrix_lf(rights_dzm->imag, 0.0); //Imaginary part must be initialized to zero. - } - - - //=== Obtains eigen values and vectors. - //errflag = eigrgen_decomp(evalr_v, evali_v, revecr_m, reveci_m, levecr_m, leveci_m, cp_m, _n); - errflag = eigrgen(vals_dzv, rights_dzm, lefts_dzm, P_dm); - if (errflag<0) fn_DisplayError("/mathlib.c/eigrgen(): some element in input matrix P_dm has an illegal value"); - else if (errflag>0) fn_DisplayError("/mathlib.c/eigrgen(): the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed"); - - //=== Utilizes old notations because I have no time to polish this function. - p_v = p_dv->v; - absval_v = absvals_dv->v; - evalr_v = vals_dzv->real->v; - evali_v = vals_dzv->imag->v; - revecr_m = rights_dzm->real->M; - reveci_m = rights_dzm->imag->M; //Imaginary part must be initialized to zero. - - - for (_j=0; _j<_n; _j++) { - if (!(evali_v[_j])) { //No imaginary part (in other words, real solutions). - eigmax = evalr_v[_j]; - eigmaxindx = _j; - break; - } - else { - eigmax = sqrt(square(evalr_v[_j])+square(evali_v[_j])); - eigmaxindx = _j; - break; - } - } - //+ - for (_j++; _j<_n; _j++) { - if (!(evali_v[_j]) && (evalr_v[_j] > eigmax)) { - eigmax = evalr_v[_j]; - eigmaxindx = _j; - } - else if (evali_v[_j]) { - tmpd0 = sqrt(square(evalr_v[_j])+square(evali_v[_j])); - if (tmpd0 > eigmax) { - eigmax = tmpd0; - eigmaxindx = _j; - } - } - } - - if (!(evali_v[eigmaxindx])) { - for (_i=0;_i<_n;_i++) { - absval_v[_i] = fabs(revecr_m[_i+_n*eigmaxindx]); - gpisum += absval_v[_i]; // Sum over the eigmaxindx_th column. - } - tmpd0 = 1.0/gpisum; - for (_i=0;_i<_n;_i++) p_v[_i] = absval_v[_i]*tmpd0; // Normalized eigmaxindx_th column as ergodic probabilities. - } - else { - for (_i=0;_i<_n;_i++) { - absval_v[_i] = sqrt(square(revecr_m[_i+_n*eigmaxindx])+square(reveci_m[_i+_n*eigmaxindx])); - gpisum += absval_v[_i]; // Sum over the eigmaxindx_th column. - } - tmpd0 = 1.0/gpisum; - for (_i=0;_i<_n;_i++) p_v[_i] = absval_v[_i]*tmpd0; // Normalized eigmaxindx_th column as ergodic probabilities. - } - - - p_dv->flag = V_DEF; - //=== Frees up allocated memory belonging to this function. - DestroyVector_lf(absvals_dv); - DestroyVector_dz(vals_dzv); - DestroyMatrix_dz(rights_dzm); -} - - - -double *alloc_ergodp2(const double *cp_m, const int _n) { - // Output: - // p_v: n-by-1 vector of ergodic probabilities p. - //------------ - // cp_m: n-by-n Markovian transition matrix. - // _n: the order of cp_m. - // - // Compute the ergodic probabilities. See Hamilton p.681. - - int eigmaxindx, // Index of the column corresponding to the max eigenvalue. - _i, _j, errflag; - double gpisum=0.0, - eigmax, tmpd0; - double *p_v=NULL, //@@Will be freed outside this function.@@ D: n-by-1. Erogodic probabilties. - *absval_v=NULL, - *evalr_v=NULL, - *evali_v=NULL, - *revecr_m=NULL, - *reveci_m=NULL, - *levecr_m=NULL, - *leveci_m=NULL; - - //=== Allocates memory. - p_v = tzMalloc(_n, double); - absval_v = tzMalloc(_n, double); - evalr_v = tzMalloc(_n, double); - evali_v = tzCalloc(_n, double); //Imaginary part must be initialized to zero. - revecr_m = tzMalloc(square(_n), double); - reveci_m = tzCalloc(square(_n), double); //Imaginary part must be initialized to zero. - - //=== Obtains eigen values and vectors. - errflag = eigrgen_decomp(evalr_v, evali_v, revecr_m, reveci_m, levecr_m, leveci_m, cp_m, _n); - if (errflag<0) fn_DisplayError("/mathlib.c/eigrgen_decomp(): some element in input matrix has an illegal value"); - else if (errflag>0) fn_DisplayError("/mathlib.c/eigrgen_decomp(): the QR algorithm failed to compute all the eigenvalues and no eigenvectors have been computed"); - - for (_j=0; _j<_n; _j++) { - if (!(evali_v[_j])) { //No imaginary part (in other words, real solutions). - eigmax = evalr_v[_j]; - eigmaxindx = _j; - break; - } - else { - eigmax = sqrt(square(evalr_v[_j])+square(evali_v[_j])); - eigmaxindx = _j; - break; - } - } - //+ - for (_j++; _j<_n; _j++) { - if (!(evali_v[_j]) && (evalr_v[_j] > eigmax)) { - eigmax = evalr_v[_j]; - eigmaxindx = _j; - break; - } - else if (evali_v[_j]) { - tmpd0 = sqrt(square(evalr_v[_j])+square(evali_v[_j])); - if (tmpd0 > eigmax) { - eigmax = tmpd0; - eigmaxindx = _j; - break; - } - } - } - - if (!(evali_v[eigmaxindx])) { - for (_i=0;_i<_n;_i++) { - absval_v[_i] = fabs(revecr_m[_i+_n*eigmaxindx]); - gpisum += absval_v[_i]; // Sum over the eigmaxindx_th column. - } - tmpd0 = 1.0/gpisum; - for (_i=0;_i<_n;_i++) p_v[_i] = absval_v[_i]*tmpd0; // Normalized eigmaxindx_th column as ergodic probabilities. - } - else { - for (_i=0;_i<_n;_i++) { - absval_v[_i] = sqrt(square(revecr_m[_i+_n*eigmaxindx])+square(reveci_m[_i+_n*eigmaxindx])); - gpisum += absval_v[_i]; // Sum over the eigmaxindx_th column. - } - tmpd0 = 1.0/gpisum; - for (_i=0;_i<_n;_i++) p_v[_i] = absval_v[_i]*tmpd0; // Normalized eigmaxindx_th column as ergodic probabilities. - } - - - //=== Frees up allocated memory. - if (absval_v) free(absval_v); - if (evalr_v) free(evalr_v); - if (evali_v) free(evali_v); - if (revecr_m) free(revecr_m); - if (reveci_m) free(reveci_m); - if (levecr_m) free(levecr_m); - if (leveci_m) free(leveci_m); - - return (p_v); -} - - - - -/** -void eig_rgen_all(double *eval_v, double *evec_m, const double *x_m, const int _n) { - // Outputs (dependent on MATLAB C math library): NEED to be fixed about eval_v or mxval_d, which may be *complex*. 10/13/02 - // eval_v: n-by-1 eigenvalues; - // evec_m: n-by-n corresponding eigenvectors column by column. - //------------ - // Inputs: - // x_m: _n-by_n real general (non-symmetric) matrix. - // - // Eigenanalysis of real general (non-symmetric) square matrix with all eigenvalues and eigenvectors. - - #ifdef MATLABCMATHLIBRARY //Matlab dependent code. - mxArray *mxval_d=NULL, *mxvec_m=NULL, // @@Must be freed in this function.@@ m: n-by-n eigvector matrix; d: n-by-n eigvalue diagonal. - *mx_m=NULL; // @@Must be freed in this function.@@ - double *mxval_d_p; // _p: pointer to the corresponding mxArray whose name occurs before _p. - int ki; - - - mx_m = mlfDoubleMatrix(_n, _n, x_m, NULL); - mxvec_m = mlfEig(&mxval_d, mx_m, NULL, NULL); - - memcpy(evec_m, mxGetPr(mxvec_m), square(_n)*sizeof(double)); - //+ - mxval_d_p = mxGetPr(mxval_d); - for (ki=0; ki<_n; ki++) eval_v[ki] = mxval_d_p[_n*ki+ki]; // Note that n*ki+ki refers to a diagonal location in the n-by-n matrix. - - //=== Frees up allocated mxArray. - mxDestroyArray(mxval_d); - mxDestroyArray(mxvec_m); - mxDestroyArray(mx_m); - #endif -} - - -double *fn_ergodp2(const double *cp_m, const int _n) { - // Output: - // p_v: n-by-1 vector of ergodic probabilities p. - //------------ - // cp_m: n-by-n Markovian transition matrix. - // _n: the order of cp_m. - // - // Compute the ergodic probabilities. See Hamilton p.681. - - int eigmaxindx, // Index of the column corresponding to the max eigenvalue. - ki; - double gpisum=0.0, - eigmax, tmpd0, - *p_v, // @@Will be freed outside this function.@@ D: n-by-1. Erogodic probabilties. - *eval_v, *evec_m; // @@Must be freed in this function.@@ D: n-by-1 and n-by-n. Eigenvalues and eigenvectors. - - //=== Allocates memory. - p_v = tzMalloc(_n, double); - eval_v = tzMalloc(_n, double); - evec_m = tzMalloc(square(_n), double); - - - eig_rgen_all(eval_v, evec_m, cp_m, _n); - eigmax = *eval_v; - eigmaxindx = 0; - if (_n>1) { - for (ki=1;ki<_n;ki++) { - if (eval_v[ki] > eigmax) { - eigmax=eval_v[ki]; - eigmaxindx=ki; - } // Note that n*ki+ki refers to a diagonal location in the n-by-n matrix. - } - } - for (ki=0;ki<_n;ki++) gpisum += evec_m[_n*eigmaxindx+ki]; // Sum over the eigmaxindx_th column. - tmpd0 = 1.0/gpisum; - for (ki=0;ki<_n;ki++) p_v[ki] = evec_m[_n*eigmaxindx+ki]*tmpd0; // Normalized eigmaxindx_th column as ergodic probabilities. - - //=== Frees up allocated memory. - free(eval_v); - free(evec_m); - - - return p_v; -} -/**/ - - -/** //Iskander's code. -int eiggen(double *a, int n, double *dr, double *di, double *vr, double *vi) { - unsigned char msg[101]; - int lwork = -1, info = 0; - double *work, work1; - char *jobvr = vr?"V":"N"; - register int i, j; - - // Query dsyev on the value of lwork - dgeev("N",jobvr,&n,a,&n,dr,di,NULL,&n,vr,&n,&work1,&lwork,&info); - - if (info < 0) { - sprintf(msg, "Input %d to dgeev had an illegal value",-info); - mexWarnMsgTxt(msg); - return(info); - } - - lwork = (int)(work1); - work = mxCalloc(lwork,sizeof(double)); - dgeev("N",jobvr,&n,a,&n,dr,di,NULL,&n,vr,&n,work,&lwork,&info); - mxFree(work); - - if (info < 0) { - sprintf(msg, "Input %d to dgeev had an illegal value",-info); - mexWarnMsgTxt(msg); - return(info); - } - - for (i=0; i<n-1; i++) - if (di[i] && (di[i]==-di[i+1])) - for (j=0; j<n; j++) { - vi[(i+1)*n+j] = -(vi[i*n+j]=vr[(i+1)*n+j]); - vr[(i+1)*n+j] = vr[i*n+j]; - } - - if (info > 0) { - sprintf(msg,"The QR algorithm failed to compute all the eigenvalues,\n" - "and no eigenvectors have been computed, but elements D(%d:N) contain\n" - "those eigenvalues which have converged.",info+1); - mexWarnMsgTxt(msg); - return(info); - } - - return(info); -} -/**/ - - -/** SAVE (Dan's code). Transpose the square matrix. -for (_i=0: _i<_n; _i++) - for (_j=i+1; _j<_n; _j++) { - tmp=A[_i+_j*_n]; - A[i+j*n]=A[j+i*n]; - A[j+i*n] = tmp; - } -/**/ - -/** SAVE (Dan's code). Transpose the regular matrix. -memcpy(tmp, A, ....); -for (_i=0: _i<_n; _i++) - for (_j=i+1; _j<m; _j++) { - A[i+j*..] = tmp[j+i*..]; - } -/**/ - - - - -/** -void VectorTimesSelf(TSdmatrix *C_dm, const TSdvector *a_dv, const double _alpha, const double _beta, const char ul) { - //No Lapack -- my own function. - //Output is C and all other arguments are inputs. - //Computes C = alpah*a*a' + beta*C where - // a is m-by-1, - // C is m-by-m symmetric matrix, - // alpha: a double scalar, - // beta: a double scalar, - // ul: if == 'u' or 'U', elements in C are stored only in the upper part; otherwise, C is stored only in the lower part. - int _i, _j, _m, _n; - double *v, *M; - - if ( !C_dm || !a_dv ) fn_DisplayError(".../mathlib.c/VectorTimesSelf(): At least one of the pointer arguments is not created (memory-allocated)"); - else { - v = a_dv->v; - M = C_dm->M; - _m = C_dm->nrows; - _n = C_dm->ncols; - } - - if ( (_m != a_dv->n) || (_m != _n) ) fn_DisplayError(".../mathlib.c/VectorTimesSelf(): (1) Input matrix must square and (2) its size must match the dimension of the input vector"); - else { - if ( (ul == 'u') || (ul == 'U') ) { - if ( _alpha==1.0 ) { - if ( _beta==1.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] += v[_i] * v[_j]; - } - } - } - else if ( _beta==0.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] = v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] = v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - } - else { - if ( _beta==1.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] += _alpha * v[_i] * v[_j]; - } - } - } - else if ( _beta==0.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] = _alpha * v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=0; _i<=_j; _i++ ) { - M[mos(_i, _j, _m)] = _alpha* v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - } - } - else { - if ( _alpha==1.0 ) { - if ( _beta==1.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] += v[_i] * v[_j]; - } - } - } - else if ( _beta==0.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - } - else { - if ( _beta==1.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] += _alpha * v[_i] * v[_j]; - } - } - } - else if ( _beta==0.0 ) { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = _alpha * v[_i] * v[_j]; - } - } - } - else { - for ( _j=0; _j<_m; _j++ ) { - for ( _i=_j; _i<_m; _i++ ) { - M[mos(_i, _j, _m)] = _alpha* v[_i] * v[_j] + _beta*M[mos(_i, _j, _m)]; - } - } - } - } - } - } -} -/**/ - - - - - -/** -void swap_lf(double *a, double *b) { - double tmpd0; - - tmpd0 = *a; - *a = *b; - *b = tmpd0; -} -/**/ - -/** Creates zeros of the matrix of a given size. -TSdmatrix *CreateZeros_lf(int nrows, int ncols) { - int _i; - TSdmatrix *x_im=CreateMatrix_lf(nrows, ncols); - for (_i=nrows*ncols-1; _i>=0; _i--) - x_im->M[_i] = 0.0; - return(x_im); -} -TSdmatrix *CreateIdentity_lf(int nrows, int ncols) { - int _i; - TSdmatrix *x_im=CreateMatrix_lf(nrows, ncols); - for (_i=nrows*ncols-1; _i>=0; _i--) - x_im->M[_i] = 0.0; - if (nrows<=ncols) - for (_i=square(nrows)-1; _i>=0; _i -= nrows+1) - x_im->M[_i] = 1.0; - else - for (_i=(ncols-1)*(nrows+1); _i>=0; _i -= nrows+1) - x_im->M[_i] = 1.0; - return(x_im); -} -/**/ - - - -/** -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -void permute_matrix(double *a, int n, int *indx) { - double *b; - int nn=n*n; - register int i; - b = calloc(nn,sizeof(double)); - memcpy(b, a, nn*sizeof(double)); - for (i=0; i<nn; i++, a++) - *a = b[indx[i%n]+indx[i/n]*n]; -} - -int main() { - double a[9]={1,2,3,4,5,6,7,8,9}; - int indx[3]={1,2,0}; - permute_matrix(a,3,indx); - return 0; -} -/**/ diff --git a/CFiles/mathlib.h b/CFiles/mathlib.h deleted file mode 100644 index ae0a099faa613e2cec2da79206aafd6e5953e0d7..0000000000000000000000000000000000000000 --- a/CFiles/mathlib.h +++ /dev/null @@ -1,396 +0,0 @@ -#ifndef __MATHLIB_H__ -#define __MATHLIB_H__ - #include "tzmatlab_dw.h" - #include "fn_filesetup.h" //Used to call WriteMatrix(FPTR_DEBUG,....). - - //------------------------------------------------------ - // LAPACK routines -- all based on Intel MKL (or IMSL C Math library). - //------------------------------------------------------ - int lurgen(TSdmatrix *lu_dm, TSivector *pivot_dv, TSdmatrix *x_dm); - int eigrsym(TSdvector *eval_dv, TSdmatrix *eVec_dm, const TSdmatrix *S_dm); - int invrtri(TSdmatrix *X_dm, TSdmatrix *A_dm, const char un); - //The fastest way is to let X=A and A (and X) will be replaced by inv(A). - int invspd(TSdmatrix *X_dm, TSdmatrix *A_dm, const char ul); - //Inverse of a symmetric positive matrix A. - //Fastest way: let X=A. Then, A (and X) will be replaced by inv(A). - int invrgen(TSdmatrix *X_dm, TSdmatrix *A_dm); - //Inverse of a general real matrix A. - //If X=A, A (and X) will be replaced by inv(A). - int eigrgen(TSdzvector *vals_dzv, TSdzmatrix *rights_dzm, TSdzmatrix *lefts_dzm, const TSdmatrix *x_dm); - int chol(TSdmatrix *D_dm, TSdmatrix *S_dm, const char ul); - // The fastest way for chol() is to let D = S, but D will be replaced by the Choleski factor. - int BdivA_rrect(TSdmatrix *X_dm, const TSdmatrix *B_dm, const char lr, const TSdmatrix *A_dm); - int BdivA_rgens(TSdmatrix *X_dm, const TSdmatrix *B_dm, const char lr, const TSdmatrix *A_dm); - int bdivA_rgens(TSdvector *x_dv, const TSdvector *b_dv, const char lr, const TSdmatrix *A_dm); - //If x_dv->v = b_dv->v. Then, x_dv->v will be replaced by new values. - // x = A\b or b/A if lr='\\' or lr='/' where A is a real general square matrix. - void Aldivb_spd(TSdvector *x_dv, TSdmatrix *A_dm, TSdvector *b_dv, char an); - // Fastest way is to let x_dv->v = b_dv->v. Then, x_dv->v will be replaced by new values. - double detspd(TSdmatrix *S_dm); - //Determinant of symmetric positive definite (SPD) matrix must be positive. - //We set the return value to be -1 if this matrix is NOT SPD. - double logdetspd(TSdmatrix *S_dm); - //Determinant of symmetric positive definite (SPD) matrix must be positive. - //We set the return value to be log(-1.0) (becomeing NaN) if this matrix is NOT SPD. - double logdeterminant(TSdmatrix *A_dm); - // - //void eig_rgen_all(double *eval_v, double *evec_m, const double *x_m, const int _n); - int chol_decomp(double *D, const double *x_m, const int _n, const char ul); - int eigrgen_decomp(double *evalr_v, double *evali_v, double *revecr_m, double *reveci_m, double *levecr_m, double *leveci_m, const double *x_m, const int _n); - int eigrsym_decomp(double *eval_v, double *evec_m, const double *s_m, const int _n, const char ul); - int inv_spd(double *D, const double *s_m, const int _n, const char ul); - - - - //------------------------------------------------------ - // BLAS routines -- all based on Intel MKL (or IMSL C Math library). - //------------------------------------------------------ - double VectorDotVector(TSdvector *x1_dv, TSdvector *x2_dv); - //Output: Return sum(x1[i] * x2[i]) over i=1, ..., n. - // Allows the case x1_dv = x2_dv. - void ScalarTimesVectorUpdate(TSdvector *x2_dv, const double _alpha, TSdvector *x1_dv); - //Output: x2 = alpha * x1 + x2; - //Inputs: - // alpha: a double scalar; - // x1: n-by-1 double vector. - void ScalarTimesVector(TSdvector *x_dv, const double _alpha, TSdvector *a_dv, const double _beta); - //Output: x_dv = alpha*a_dv + beta*x_dv where x_dv is n-by-1. - // When beta=0.0 and x_dv->v = a_dv->v, x_dv->v will be replaced by new values. - //Inputs: - // a_dv: n-by-1. - // _alpha: a double scalar. - // _beta: a double scalar. - void VectorPlusMinusVectorUpdate(TSdvector *x_dv, const TSdvector *b_dv, double _alpha); - //Output: x_dv = _alpha * b_dv + x_dv where x_dv is _n-by-1. - //Inputs: - // b_dv: _n-by-1 double vector. - // _alpha: double scalar. - void VectorPlusMinusVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv, double _alpha); - //???????? Use tz_VectorPlusMinusVector() or VectorPlusVector() or VectorMinusVector(). - //???????? NOT finished yet. - //????????Must add _beta for x_dv = alpha*a_dv + beta*b_dv. - //??????????? NOT fully tested yet. - //Output: x_dv = a_dv + _alpha * b_dv where x_dv is _n-by-1. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - // _alpha: double scalar. - void VectorTimesSelf(TSdmatrix *C_dm, const TSdvector *a_dv, const double _alpha, const double _beta, const char ul); - //Using MKL with a default to my own C code. - //Output is the matrix C and all other arguments are inputs. - //Computes C = alpah*a*a' + beta*C where - // a is m-by-1, - // C is m-by-m symmetric matrix, - // alpha: a double scalar, - // beta: a double scalar. - // ul: if=='u' or 'U', only the upper triangular part of C is to be referenced; otherwise, only the lower triangular part of C is to be referenced; - void VectorTimesVector(TSdmatrix *C_dm, const TSdvector *a_dv, const TSdvector *b_dv, const double _alpha, const double _beta); - //?????? NOT tested for _beta != 1.0. - //Output is the matrix C and all other arguments are inputs. - //If beta != 0, always converting C (if symmetric or trianuglar) to a general matrix before the operation. - //The fastest way is to let _beta = 1.0. - //Computes C = alpah*a*b' + beta*C where - // a is m-by-1, - // b is n-by-1, - // C is m-by-n general matrix, - // alpha: a double scalar, - // beta: a double scalar. - void MatrixPlusMinusMatrixUpdate(TSdmatrix *X_dm, TSdmatrix *A_dm, double _alpha); - //$$$$$ If A_dm or X_dm is only upper or lower symmetric, it will be always converted to a general (and symmetric) matrix. $$$$$$ - //Output: X =_alpha * A + X where X_dm is an m-by-n general (and possibly symmetric) matrix. - //Inputs: - // A_dm: m-by-n general or symmetric matrix. - // _alpha: double scalar. - void MatrixTimesVector(TSdvector *x_dv, TSdmatrix *A_dm, const TSdvector *b_dv, const double _alpha, const double _beta, const char tn); - //WARNING: x_dv must NOT be the same as b_dv! - //Output: x_dv->v = _alpha*A_dm'*b_dv + _beta*x_dv for tn=='T'; x_dv = _alpha*A_dm*b_dv + _beta*x_dv for tn=='N' - // where x_dv->v is ncols-by-1 or nrows-by-1 and needs not be initialized if _beta is set to 0.0. - //Inputs: - // A_dm->M: nrows-by-ncols; - // b_dv->v: nrows-by-1 or ncols-by-1; - // _alpha: double scalar; - // _beta: double scalar; - // tn: if =='t' or 'T', transpose of A_dm is used; otherwise, A_dm itself (no transpose) is used. - void TrimatrixTimesVector(TSdvector *x_dv, TSdmatrix *A_dm, TSdvector *b_dv, const char tn, const char un); - //Output: x_dv = A_dm'*b_dv for tn=='T'; x_dv = A_dm*b_dv for tn=='N' where x_dv->v is _n-by-1. - // If x_dv = b_dv (which gives the fastest return, so try to use this option), x_dv will be relaced by A*b or A'*b. - //Inputs: - // A_dm->M: _n-by-_n triangular matrix. - // b_dv->v: _n-by-1 vector. - // tn: if =='T' or 't', transpose of A_dm is used; otherwise, A_dm itself (no transpose) is used. - // un: if =='U' or 'u', A_dm is unit triangular; otherwise, A_dm is non-unit triangular (i.e., a regular triangular matrix). - void SymmatrixTimesVector(TSdvector *x_dv, TSdmatrix *A_dm, TSdvector *b_dv, const double _alpha, const double _beta); - //????? This is NOT checked yet: If x_dv = b_dv, x_dv or b_dv will be relaced by alpha*A*x + beta*x. - //Output: - // x_dv = alpha*A_dm*b_dv + beta*x_dv where x_dv->v is _n-by-1. - // When beta=0, there is no need to initialize the value of x_dv. - //Inputs: - // A_dm->M: _n-by-_n triangular matrix. - // b_dv->v: _n-by-1 vector. - // _alpha: double scalar; - // _beta: double scalar; - void VectorTimesMatrix(TSdvector *x_dv, const TSdvector *b_dv, TSdmatrix *A_dm, const double _alpha, const double _beta, const char tn); - //Output: x_dv->v = _alpha*b_dv*A_dm + _beta*x_dv for tn=='N'; x_dv = _alpha*b_dv*A_dm' + _beta*x_dv for tn=='T' - // where x_dv->v is 1-by-ncols or 1-by-nrows and needs not be initialized if _beta is set to 0.0. - //Inputs: - // A_dm->M: nrows-by-ncols; - // b_dv->v: 1-by-nrows or 1-by-ncols; - // _alpha: double scalar; - // _beta: double scalar; - // tn: if =='T' or 't', transpose of A_dm is used; otherwise (=='N' or 'n'), A_dm itself (no transpose) is used. - void ScalarTimesMatrix(TSdmatrix *x_dm, const double _alpha, TSdmatrix *a_dm, const double _beta); - //$$$$$ If a_dm or x_dm (when _beta!=0) is only upper or lower symmetric, it will be always converted to a general (and symmetric) matrix. $$$$$$ - //Output: x_dm = alpha*a_dm + beta*x_dm where x_dm is m-by-n. - // Fastest way is to let beta=0.0 and x_dm->M = a_dm->M. Then x_dm->M will be replaced by new values. - // However, with beta=0.0, x_dm and a_dm can be different. - //Inputs: - // a_dm: m-by-n. - // _alpha: a double scalar. - // _beta: a double scalar. - void ScalarTimesMatrixSquare(TSdmatrix *B_dm, const double _alpha, TSdmatrix *A_dm, const char tn, const double _beta); - //Outputs: - // B = alpha*o(A) + beta*B, where o(A) = A' if tn=='T' or 't' or A if tn=='N' or 'n'. - // If A=B, then A is replaced by alpha*o(A) + beta*A. - //Inputs: - // A_dm: n-by-n square matrix. - // B_dm: n-by-n square matrix. - // tn: 'T' (transpose of A) or 'N' (no transpose). - // alpha, beta: double scalars. - void MatrixTimesSelf(TSdmatrix *C_dm, const char ul, TSdmatrix *A_dm, const char tn, const double _alpha, const double _beta); - //If tn=='N' or 'n', C = alpha*A*A' + beta*C. - //If tn=='T' or 't', C = alpha*A'*A + beta*C. - //If ul=='U' or 'u', C_dm->flag = M_SU; - //If ul=='L' or 'l', C_dm->flag = M_SL; - // C must be different from A. - // C is n-by-n; - // A is n-by-k if tn=='N'; - // k-by-n if tn=='T'; - // alpha is a double scalar, - // beta is a double scalar. - void MatrixTimesMatrix(TSdmatrix *C_dm, TSdmatrix *A_dm, TSdmatrix *B_dm, const double _alpha, const double _beta, const char tn1, const char tn2); - //Output is C and all other arguments are inputs. - //Computes C = alpah*op(A)*op(B) + beta*C where op() is either transpose or not, depending on 't' or 'n', - // op(A) is m-by-k, - // op(B) is k-by-n, - // C is m-by-n, - // C must be different from A and from B. - // A and B can be the same, however. - // alpha is a double scalar, - // beta is a double scalar. - // tn1: if == 'T' or 't', the transpose of A is used; otherwise (== 'N' or 'n"), A itself (no transpose) is used. - // tn2: if == 'T' or 't', the transpose of B is used; otherwise (== 'N' or 'n"), B itself (no transpose) is used. - void SolveTriSysVector(TSdvector *x_dv, const TSdmatrix *T_dm, TSdvector *b_dv, const char tn, const char un); - //Output --- computes x_dv = inv(T_dm)*b_dv by solving a triangular system of equation T_dm * x_dv = b_dv. - // x_dv(_n-by-1) = inv(T_dm)*b_v if tn=='N'; = inv(T_dm')*b_v if tn=='T'. - // Fastest way is to let x_dv->v = b_dv->v. Then, x_dv->v will be replaced by new values. - - - - -// #define ScalarTimesVector(x_v, a, b_v, _n) cblas_daxpy(_n, a, b_v, 1, x_v, 1) -// //Output: x_v = a * b_v + x_v where double *x_v (_n-by-1) must be initialized. -// //Inputs: a -- double scalar; b_v -- pointer (_n-by-1) to double. -// #define VectorDotVector(a_v, b_v, _n) cblas_ddot(_n, a_v, 1, b_v, 1) -// //Output: x=a_v'*b_v: double scalar. -// //Inputs: a_v, b_v: pointer (_n-by-1) to double. - - void SymmetricMatrixTimesVector(double *x_v, const double a, const double *A_m, const double *a_v, const double b, const int _n, const char ul); - //Output: x_v = a*A_m*a_v + b*X_m where x_v (_n-by-1) must be allocated (but needs not be initialized). - //Inputs: - // A_m: _n-by-_n symmetric matrix; - // a_v: _n-by-1; - // a, b: scalars; - // ul: if =='u' or 'U', upper triangular elements in A_m are filled; if =='l' or 'L', lower triangular elements in A_m are filled. - void SolveTriangularSystemVector(double *x_v, const double *A_m, const double *b_v, const int _n, const char ul, const char tn, const char un); - //Outputs: - // x_v(_n-by-1) = inv(A_m)*b_v. If x_v=b_v, b_v will be overwritten by x_v. - //------- - //Inputs: - // A_m: _n-by-_n upper or lower triangular matrix; - // b_v: _n-by-1 vector. - // ul: if =='u' or 'U', A_m is upper triangular; if =='l' or 'L', A_m is lower triangular. - // tn: if =='t' or 'T', A_m' (transpose), instead of A_m, will be used; if =='n', A_m itself (no transpose) will be used. - // un: if =='u' or 'U', A_m is a unit upper triangular (i.e., the diagonal being 1); - // if =='n' or 'N', A_m is a non-unit upper triangular. - // - // Computes x_v = inv(A_m)*b_v by solving a triangular system of equation A_m * x_v = b_v. - // Note I: Intel MLK cblas_dtrsv() does not test for singularity or near-singulariy of the system. - // Such tests must be performed before calling this BLAS routine. - // Note II: if x_v=b_v, b_v will be overwritten by x_v. - - - - - - - //------------------------------------------------------ - // MKL Vector Mathematical Library with default using my own routines. - //------------------------------------------------------ - void VectorDotDivByVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv); - //????????? NOT tested yet. 06/13/03. - //--- The faster way is to use MKL VML with x_dv != a_dv and x_dv != b_dv; x = a./b; - void ElementwiseVectorDivideVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv); - //--- The faster way is to use MKL VML with y_dv != x_dv; - void ElementwiseInverseofVector(TSdvector *y_dv, TSdvector *x_dv); - void ElementwiseSqrtofVector(TSdvector *y_dv, TSdvector *x_dv); - void ElementwiseLogtofVector(TSdvector *y_dv, TSdvector *x_dv); - //--- The faster way is to use MKL VML with Y_dm != X_dm; - void ElementwiseInverseofMatrix(TSdmatrix *Y_dm, TSdmatrix *X_dm); - - - - //------------------------------------------------------ - // Matrix routines (my own). - //------------------------------------------------------ - void tz_VectorPlusMinusVector(TSdvector *x_dv, const TSdvector *a_dv, const double _alpha, const TSdvector *b_dv, const double _beta); - //Output: x_dv = alpha*a_dv + beta*b_dv where x_dv is _n-by-1. - //Inputs: - // a_dv: _n-by-1 double vector. - // _alpha: double constant. - // b_dv: _n-by-1 double vector. - // _beta: double constant. - void VectorPlusVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv); - //Output: x_dv = a_dv + b_dv where x_dv is _n-by-1. - // If x_dv = a_dv, a_dv will be replaced by x_dv. - // If x_dv = b_dv, b_dv will be replaced by x_dv, - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - void VectorMinusVector(TSdvector *x_dv, const TSdvector *a_dv, const TSdvector *b_dv); - //Output: x_dv = a_dv - b_dv where x_dv is _n-by-1. - // If x_dv = a_dv, x_dv will be replaced by x_dv - b_dv. - // If x_dv = b_dv, x_dv will be replaced by a_dv - x_dv. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - void VectorPlusVectorUpdate(TSdvector *x_dv, const TSdvector *b_dv); - //Output: x_dv = b_dv + x_dv where x_dv is _n-by-1. - //Inputs: - // b_dv: _n-by-1 double vector. - void VectorDotTimesVector(TSdvector *x_dv, const TSdvector *a_dv, TSdvector *b_dv, const double _alpha, const double _beta); - //Output: - // x_dv is _n-by-1. - // x_dv = _alpha * a_dv .* b_dv + _beta * x_dv if x_dv != b_dv. - // x_dv = _alpha * a_dv .* x_dv + _beta * x_dv if x_dv = b_dv. - //Inputs: - // a_dv: _n-by-1 double vector. - // b_dv: _n-by-1 double vector. - // _alpha: double scalar. - // _beta: a double scalar. - void SwapColsofMatrix(TSdmatrix *X_dm, int j1, int j2); - //??????? NOT tested yet. - void SwapColsofMatrices(TSdmatrix *X1_dm, int j1, TSdmatrix *X2_dm, int j2); - void SwapPositionsofMatrix(TSdmatrix *X_dm, int j1, int j2); - void SwapMatricesofCell(TSdcell *A_dc, int c1, int c2); - void SwapVectorsofCellvec(TSdcellvec *x_dcv, int c1, int c2); - void SwapVectorsofCellvec_int(TSicellvec *x_icv, int c1, int c2); - void PermuteColsofMatrix(TSdmatrix *A_dm, const TSivector *indx_iv); - void PermuteRowsofMatrix(TSdmatrix *A_dm, const TSivector *indx_iv); - void PermuteMatrix(TSdmatrix *A_dm, const TSivector *indx_iv); - void PermuteMatricesofCell(TSdcell *A_dc, const TSivector *indx_iv); - void ScalarTimesColofMatrix(TSdvector *y_dv, double _alpha, TSdmatrix *x_dm, int _j); - //????????? Default option, in the #else, has NOT been tested yet! - void ScalarTimesColofMatrix2ColofMatrix(TSdmatrix *y_dm, int jy, double _alpha, TSdmatrix *x_dm, int jx); - void ScalarTimesColofMatrixPlusVector2ColofMatrix(TSdmatrix *Y_dm, int jy, double _alpha, TSdmatrix *X_dm, int jx, double _beta, TSdvector *x_dv); -// void ColofMatrixDotTimesVector(TSdvector *y_dv, TSdmatrix *X_dm, int jx, TSdvector *x_dv, double _alpha, double _beta); - void MatrixDotDivideVector_row(TSdmatrix *Y_dm, TSdmatrix *X_dm, TSdvector *x_dv, double _alpha, double _beta); - void RowofMatrixDotDivideVector(TSdvector *y_dv, TSdmatrix *X_dm, int ix, TSdvector *x_dv, double _alpha, double _beta); - //??????? NOT tested yet, 01/02/04. - void ColofMatrixDotTimesVector(TSdvector *y_dv, TSdmatrix *X_dm, int jx, TSdvector *x_dv, double _alpha, double _beta); - void ColofMatrixDotTimesColofMatrix(TSdvector *y_dv, TSdmatrix *X1_dm, int jx1, TSdmatrix *X2_dm, int jx2, double _alpha, double _beta); - void ColofMatrixDotTimesColofMatrix2ColofMatrix(TSdmatrix *Y_dm, int jy, TSdmatrix *X1_dm, int jx1, TSdmatrix *X2_dm, int jx2, double _alpha, double _beta); - void MatrixPlusMatrixUpdate(TSdmatrix *X_dm, TSdmatrix *A_dm); - //Output: X = X + A where X_dm is an m-by-n general matrix. - //Inputs: - // A_dm: m-by-n general matrix. - void MatrixPlusMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm); - //Output: X = A + B where X_dm is an m-by-n general matrix. - // If X=A, A will be replaced by X; if X=B, B will be replaced by X. - //Inputs: - // A_dm: m-by-n general matrix. - // B_dm: m-by-n general matrix. - void MatrixMinusMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm); - //Output: X = A - B where X_dm is an m-by-n general matrix. - // If X=A, A will be replaced by X; if X=B, B will be replaced by X. - //Inputs: - // A_dm: m-by-n general matrix. - // B_dm: m-by-n general matrix. - void Matrix2PlusMinusMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm, TSdmatrix *C_dm, const double _alpha, const double _beta, const double _gamma); - //????? Not yet exhaust all possibilities of alpha, beta, and gamma to get most efficiency. Add more as required. 10 February 2003. - //Output: X = alpha*A + beta*B + gamma*C where X_dm is an m-by-n general matrix. - //Inputs: - // A_dm: m-by-n general matrix. - // B_dm: m-by-n general matrix. - // C_dm: m-by-n general matrix. - // _alpha: a double scalar for A_dm. - // _beta: a double scalar for B_dm. - // _gamma: a double scalar for C_dm. - void MatrixPlusConstantDiagUpdate(TSdmatrix *X_dm, const double _alpha); - //Output: X = X + diag([_alpha, ..., _alpha]) where X is an n-by-n square real matrix. - void MatrixDotTimesMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm, const double _alpha, const double _beta); - //$$$$$ If A_dm or B_dm or X_dm (when _beta!=0) is only upper or lower symmetric, it will be always converted to a general (and symmetric) matrix. $$$$$$ - //Output: - // X_dm is m-by-n. - // X_dm = _alpha * A_dm .* B_dm + _beta * X_dm if X_dm != B_dm. - // X_dm = _alpha * A_dm .* X_dm + _beta * X_dm if X_dm = B_dm. - void CopyVector0(TSdvector *x1_dv, const TSdvector *x2_dv); - void CopyMatrix0(TSdmatrix *x1_dm, TSdmatrix *x2_dm); - void CopyCellvec0(TSdcellvec *x1_dcv, TSdcellvec *x2_dcv); - void CopyCell0(TSdcell *x1_dc, TSdcell *x2_dc); - void CopySubmatrix0(TSdmatrix *x1_dm, TSdmatrix *x2_dm, const int br, const int bc, const int nrs, const int ncs); - void CopySubmatrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs); - void CopySubmatrixSelectedCols0(TSdmatrix *x1_dm, TSdmatrix *x2_dm, const int br, const int nrs, TSivector *locs4cols); - void CopySubrowmatrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs); - //??????? NOT tested yet. - void CopySubmatrix2rowmatrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs); - void CopySubrowmatrix2matrix(TSdmatrix *x1_dm, const int br1, const int bc1, TSdmatrix *x2_dm, const int br2, const int bc2, const int nrs, const int ncs); - //??????? NOT tested yet. - void CopySubvector(TSdvector *x1_dv, const int ptrloc1, const TSdvector *x2_dv, const int ptrloc2, const int nels); - void CopySubvector_int(TSivector *x1_iv, const int ptrloc1, const TSivector *x2_iv, const int ptrloc2, const int nels); - void CopySubmatrix2vector(TSdvector *x1_dv, const int ptrloc1, TSdmatrix *x2_dm, const int br, const int bc, const int nels); - void CopySubmatrix2vector_sub(TSdvector *x1_dv, const int ptrloc1, TSdmatrix *x2_dm, const int br, const int bc, const int nrs, const int ncs); - void CopySubmatrix2vector_int(TSivector *x1_iv, const int ptrloc1, TSimatrix *x2_im, const int br, const int bc, const int nels); - void CopySubmatrix2vector_row(TSdvector *x1_dv, const int ptrloc1, TSdmatrix *x2_dm, const int br, const int bc, const int nels); - void CopySubvector2matrix(TSdmatrix *x1_dm, const int br, const int bc, const TSdvector *x2_dv, const int ptrloc2, const int nels); - void CopySubvector2rowmatrix(TSdmatrix *x1_dm, const int br, const int bc, const TSdvector *x2_dv, const int ptrloc2, const int nels); - void CopySubvector2matrix_sub(TSdmatrix *x1_dm, const int br, const int bc, const int nrs, const int ncs, TSdvector *x2_dv, const int ptrloc2); - void CopySubvector2matrix_unr(TSdmatrix *x1_dm, const int br, const int bc, const TSdvector *x2_dv, const int ptrloc2, const int nels); - void TransposeSquare(TSdmatrix *B_dm, TSdmatrix *A_dm); - //???????? Some options are NOT test yet. 2/27/03. ??????????? - void TransposeRegular(TSdmatrix *B_dm, const TSdmatrix *A_dm); - TSdmatrix *tz_TransposeRegular(TSdmatrix *B_dm, const TSdmatrix *A_dm); - void SUtoGE(TSdmatrix *x_dm); - //Output: x_dm (nrows<=ncols) becomes a general matrix in addition to being upper symmetric. - //Input: x_dm (nrows<=ncols) is upper symmetric. - void SLtoGE(TSdmatrix *x_dm); - //Output: x_dm (nrows>=ncols) becomes a general matrix in addition to being lower symmetric. - //Input: x_dm (nrows>=ncols) is lower symmetric. - double SumVector(TSdvector *x_dv); - double MaxVector(TSdvector *x_dv); - double MinVector(TSdvector *x_dv); - int MaxVector_int(TSivector *x_iv); - void SumMatrix(TSdvector *x_dv, const TSdmatrix *X_dm, const char rc); - //+ - void diagdv(TSdvector *x_dv, TSdmatrix *x_dm); - TSdmatrix *tz_DiagMatrix(TSdmatrix *X_dm, TSdvector *x_dv); - double tracefabs(TSdmatrix *x_dm); - double tracelogfabs(TSdmatrix *x_dm); - double tracelog(TSdmatrix *x_dm); - double sumoflogvector(TSdvector *x_dv); - // - TSdmatrix *tz_kron(TSdmatrix *C_dm, TSdmatrix *A_dm, TSdmatrix *B_dm); - //C = kron(A, B), compatible with Matlab notation. - //Inputs: - // A_dm and B_dm: two real general matrices. - //Outputs: - // If C_dm == NULL, C_dm is created (memory allocated) and returned (thus, the memory must be destroyed outside this function). - // If C_dm != NULL, C_dm's memory has already been allocated outside this function and the same C_dm will be returned. - - - - - //=== Self-written routines. - void ergodicp(TSdvector *p_dv, TSdmatrix *P_dm); - //double *fn_ergodp2(const double *cp_m, const int _n); - double *alloc_ergodp2(const double *cp_m, const int _n); -#endif diff --git a/CFiles/optpackage.c b/CFiles/optpackage.c deleted file mode 100644 index 1da1647b0dbe5e7a189045b69bd3a87d038c4c77..0000000000000000000000000000000000000000 --- a/CFiles/optpackage.c +++ /dev/null @@ -1,1496 +0,0 @@ -/*========================================================= - * Optimization package for different third-party routines, including csminwel. - * -=========================================================*/ -#include "optpackage.h" - -#define STRLEN 256 -static char filename_sp_vec_minproj[STRLEN]; - -static struct TSetc_csminwel_tag *CreateTSetc_csminwel(FILE *fptr_input1, const int n, const int q, const int k); //Used by CreateTSminpack() only. -static struct TSetc_csminwel_tag *DestroyTSetc_csminwel(struct TSetc_csminwel_tag *etc_csminwel_ps); //Used by DestroyTSminpack() only. -//------- For csminwel only. ------- -static TSminpack *SetMincsminwelGlobal(TSminpack *minpack_csminwel_ps); -static double minobj_csminwelwrap(double *x, int n, double **dummy1, int *dummy2); -static int mingrad_csminwelwrap(double *x, int n, double *g, double **dummy1, int *dummy2); -//------- For IMSL linearly constrainted optimization only. ------- -static double GLB_FVALMIN = NEARINFINITY; //Must be initialized to ba a very big number. -static int GLB_DISPLAY = 1; //Print out intermediate results on screen. -static TSdvector *XIMSL_DV = NULL; //To save the minimized value in case the IMSL quits with a higher value. -static struct TStateModel_tag *SetModelGlobalForIMSLconlin(struct TStateModel_tag *smodel_ps); -static void ObjFuncForModel_imslconlin(int d_x0, double *x0_p, double *fret_p); -static void imslconlin_SetPrintFile(char *filename); -static double opt_logOverallPosteriorKernal(struct TStateModel_tag *smodel_ps, TSdvector *xchange_dv); -static void gradcd_imslconlin(int n, double *x, double *g); -static double ObjFuncForModel_congrad(double *x0_p, int d_x0); - - -// NPSOL related -static TSdvector *XNPSOL_DV = NULL; //To save the minimized value in case the IMSL quits with a higher value. -void confun(int *mode, int *ncnln, int *n, int *ldJ, int *needc, double *x, double *c, double *cJac, int *nstate); -void npsol(int *n, int *nclin, int *ncnln, int *ldA, int *ldJ, int *ldR, double *A, double *bl, double *bu, - void (*funcon)(int *mode, int *ncnln, int *n, int *ldJ, int *needc, double *x, double *c, double *cJac, int *nstate), - void (*funobj)(int *mode, int *n, double *x, double *f, double *g, int *nstate), - int *inform, int *iter, int *istate, double *c, double *cJac, double *clamda, double *f, double *g, double *R, double *x, - int *iw, int *leniw, double *w, int *lenw); -static void ObjFuncForModel_npsolconlin(int *mode, int *N, double *x, double *f, double *g, int *nstate); -static struct TStateModel_tag *SetModelGlobalForNPSOLconlin(struct TStateModel_tag *smodel_ps); -static void npsolconlin_SetPrintFile(char *filename); - -////TSminpack *CreateTSminpack(TFminpackage *minfinder_func, TFminobj *minobj_func, TFmingrad *mingrad_func, TFSetPrintFile *printinterresults_func, const int n, const int package) //, const int indxAnag) -////TSminpack *CreateTSminpack(TFminfinder *minfinder_func, TFminobj *minobj_func, TFmingrad *mingrad_func, char *filename_printout, const int n, const int package) //, const int indxAnag) -TSminpack *CreateTSminpack(TFminobj *minobj_func, void **etc_project_pps, TFmindestroy_etcproject *etcproject_func, TFmingrad *mingrad_func, char *filename_printout, const int n, const int package) -{ - TSminpack *minpack_ps = tzMalloc(1, TSminpack); - - //$$$$WARNING: Note the vector xtemp_dv->v or gtemp_dv-v itself is not allocated memory, but only the POINTER. - //$$$$ Within the minimization routine like csminwel(), the temporary array x enters as the argument in - //$$$$ the objective function to compare with other values. If we use minpack_ps->x_dv->v = x - //$$$$ in a wrapper function like minobj_csminwelwrap() where x is a temporay array in csminwel(), - //$$$$ this tempoary array (e.g., x[0] in csminwel()) within the csminwel minimization routine - //$$$$ will be freed after the csminwel minimization is done. Consequently, minpack_ps->x_dv-v, which - //$$$$ which was re-pointed to this tempoary array, will freed as well. Thus, no minimization results - //$$$$ would be stored and trying to access to minpack_ps->x_dv would cause memory leak. - //$$$$ We don't need, however, to create another temporary pointer within the objective function itself, - //$$$$ but we must use minpack_ps->xtemp_dv for a *wrapper* function instead and at the end of - //$$$$ minimization, minpack_ps->x_dv will have the value of minpack_ps->xtemp_dv, which is automatically - //$$$$ taken care of by csminwel with the lines such as - //$$$$ memcpy(xh,x[3],n*sizeof(double)); - //$$$$ where xh and minpack_ps->x_dv->v point to the same memory space. - - - minpack_ps->xtemp_dv = tzMalloc(1, TSdvector); - minpack_ps->gtemp_dv = tzMalloc(1, TSdvector); - minpack_ps->xtemp_dv->flag = minpack_ps->gtemp_dv->flag = V_DEF; //Set the flag first but will be assigned legal values in minobj_csminwelwrap(). - minpack_ps->xtemp_dv->n = minpack_ps->gtemp_dv->n = n; - - - minpack_ps->x_dv = CreateVector_lf(n); - minpack_ps->g_dv = CreateVector_lf(n); - minpack_ps->x0_dv = CreateVector_lf(n); - // - minpack_ps->etc_project_ps = (void *)*etc_project_pps; - minpack_ps->DestroyTSetc_project = etcproject_func; - if (etcproject_func) *etc_project_pps = NULL; //If destroy function makes this structure responsible to free memory of the passing pointer, reset this passing pointer to NULL to avoid double destroying actions and cause memory problem. - // - minpack_ps->etc_package_ps = NULL; - minpack_ps->minobj = minobj_func; - minpack_ps->mingrad = mingrad_func; - minpack_ps->filename_printout = filename_printout; -// minpack_ps->SetPrintFile = printinterresults_func; - - if ( (minpack_ps->package=package) & MIN_CSMINWEL ) { - minpack_ps->etc_package_ps = (void *)CreateTSetc_csminwel(((struct TSetc_minproj_tag *)minpack_ps->etc_project_ps)->args_blockcsminwel_ps->fptr_input1, n, 0, 0); -// if (minpack_ps->mingrad) fn_DisplayError(".../optpackage.c/CreateTSminpack(): Have not got time to deal with analytical gradient situation"); -// if (minpack_ps->indxAnag=indxAnag) fn_DisplayError(".../optpackage.c/CreateTSminpack(): Have not got time to deal with analytical gradient situation"); - } - else fn_DisplayError(".../optpackage.c/CreateTSminpack(): Have not got time to specify other minimization packages than csminwel"); - - return (minpack_ps); -} -//--- -TSminpack *DestroyTSminpack(TSminpack *minpack_ps) -{ - if (minpack_ps) { - //$$$$WARNING: Note the following vectors themselves are NOT allocated memory, but only the POINTERs. Used within the minimization problem. - //$$$$ See minobj_csminwelwrap() as an example. - free(minpack_ps->xtemp_dv); - free(minpack_ps->gtemp_dv); - - - DestroyVector_lf(minpack_ps->x_dv); - DestroyVector_lf(minpack_ps->g_dv); - DestroyVector_lf(minpack_ps->x0_dv); - if (minpack_ps->DestroyTSetc_project) minpack_ps->DestroyTSetc_project(minpack_ps->etc_project_ps); //If destroy function is active, destroy it here; ohterwise, it will be destroyed somewhere else. - if ( minpack_ps->package & MIN_CSMINWEL ) DestroyTSetc_csminwel((TSetc_csminwel *)minpack_ps->etc_package_ps); - - //=== - free(minpack_ps); - return ((TSminpack *)NULL); - } - else return (minpack_ps); -} - - - -//----------------------------------------------------------------------- -// Unconstrained BFGS csminwel package. -//----------------------------------------------------------------------- -static TSetc_csminwel *CreateTSetc_csminwel(FILE *fptr_input1, const int n, const int q, const int k) -{ - //If fptr_input1==NULL or no no values supplied when fptr_input1 != NULL, default values are taken. - - int _i; - //=== - TSetc_csminwel *etc_csminwel_ps = tzMalloc(1, TSetc_csminwel); - - etc_csminwel_ps->_k = k; - if (!k) { - etc_csminwel_ps->args = (double **)NULL; - etc_csminwel_ps->dims = (int *)NULL; - } - else { - etc_csminwel_ps->dims = tzMalloc(k, int); - etc_csminwel_ps->args = tzMalloc(k, double *); - for (_i=k-1; _i>=0; _i--) *(etc_csminwel_ps->args + _i) = tzMalloc(q, double); - } - - //=== Default values of input arguments. - etc_csminwel_ps->Hx_dm = CreateMatrix_lf(n, n); //n-by-n inverse Hessian. - //+ - etc_csminwel_ps->badg = 1; //1: numerical gradient will be used. - etc_csminwel_ps->indxnumgrad_csminwel = INDXNUMGRAD_CSMINWEL; //Method of the numerical gradient. - - //=== Reads doubles. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== crit ==//") || fscanf(fptr_input1, " %lf ", &etc_csminwel_ps->crit) != 1 ) - etc_csminwel_ps->crit = CRIT_CSMINWEL; //Defaut for overall convergence criterion for the function value. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== ini_h_csminwel ==//") || fscanf(fptr_input1, " %lf ", &etc_csminwel_ps->ini_h_csminwel) != 1 ) - etc_csminwel_ps->ini_h_csminwel = INI_H_CSMINWEL; //Defaut - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== gradstps_csminwel ==//") || fscanf(fptr_input1, " %lf ", &etc_csminwel_ps->gradstps_csminwel) != 1 ) - etc_csminwel_ps->gradstps_csminwel = GRADSTPS_CSMINWEL; //Default for step size of the numerical gradient. - - //=== Reads integers. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== itmax ==//") || fscanf(fptr_input1, " %d ", &etc_csminwel_ps->itmax) != 1 ) - etc_csminwel_ps->itmax = ITMAX_CSMINWEL; //Default for maximum number of iterations. - - - return (etc_csminwel_ps); -} -//#undef CRIT_CSMINWEL -//#undef ITMAX_CSMINWEL -//--- -static TSetc_csminwel *DestroyTSetc_csminwel(TSetc_csminwel *etc_csminwel_ps) -{ - int _i; - - if (etc_csminwel_ps) { - for (_i=etc_csminwel_ps->_k-1; _i>=0; _i--) tzDestroy(etc_csminwel_ps->args[_i]); - tzDestroy(etc_csminwel_ps->args); - tzDestroy(etc_csminwel_ps->dims); - //--- - DestroyMatrix_lf(etc_csminwel_ps->Hx_dm); - - //=== - free(etc_csminwel_ps); - return ((TSetc_csminwel *)NULL); - } - else return (etc_csminwel_ps); -} - - - -/********************************************* - * WARNING: All the following data structures are declared global because - * (1) the minimization package takes only global variables; - * (2) these global structures make the existing functions reusable; - * (3) modifying the exisiting functions to keep global variables at minimum is NOT really worth the time. -*********************************************/ -//--------------------------------- -// Begin: This wrapper function makes it conformable to the call of the csminwel package. -//--------------------------------- -static struct TSminpack_tag *MINPACK_CSMINWEL_PS = NULL; //Minimization to find the MLE or posterior peak. -static TSminpack *SetMincsminwelGlobal(TSminpack *minpack_csminwel_ps) -{ - //Returns the old pointer in order to preserve the previous value. - TSminpack *tmp_ps = MINPACK_CSMINWEL_PS; - MINPACK_CSMINWEL_PS = minpack_csminwel_ps; - return (tmp_ps); -} -static double minobj_csminwelwrap(double *x, int n, double **dummy1, int *dummy2) -{ - if (!MINPACK_CSMINWEL_PS || !MINPACK_CSMINWEL_PS->minobj) fn_DisplayError(".../optpackage.c/minobj_csminwelwrap(): (1) MINPACK_CSMINWEL_PS must be created and (2) there exists an objective function assigned to MINPACK_CSMINWEL_PS->minobj"); - // if (MINPACK_CSMINWEL_PS->x_dv->n != n) fn_DisplayError(".../optpackage.c/minobj_csminwelwrap(): Length of passing vector must match minpack_ps->x_dv"); - MINPACK_CSMINWEL_PS->xtemp_dv->v = x; - return (MINPACK_CSMINWEL_PS->minobj(MINPACK_CSMINWEL_PS)); //This function is specified in the main program. -} -//--- -static int mingrad_csminwelwrap(double *x, int n, double *g, double **dummy1, int *dummy2) -{ - if (!MINPACK_CSMINWEL_PS || !MINPACK_CSMINWEL_PS->mingrad) fn_DisplayError(".../optpackage.c/mingrad_csminwelwrap(): (1) MINPACK_CSMINWEL_PS must be created and (2) there exists an objective function assigned to MINPACK_CSMINWEL_PS->minobj"); - // if (MINPACK_CSMINWEL_PS->x_dv->n != n) fn_DisplayError(".../optpackage.c/mingrad_csminwelwrap(): Length of passing vector must match minpack_ps->x_dv"); - MINPACK_CSMINWEL_PS->xtemp_dv->v = x; - MINPACK_CSMINWEL_PS->gtemp_dv->v = g; - //>>>>>>>> Inside the following function, make sure to set MINPACK_CSMINWEL_PS->etc_csminwel_ps->badg = 0; //1: numerical gradient will be used. - MINPACK_CSMINWEL_PS->mingrad(MINPACK_CSMINWEL_PS); - //<<<<<<<< - - return (0); -} -//--------------------------------- -// End: This wrapper function makes it conformable to the call of the csminwel package. -//--------------------------------- - - -//---------------------------------------------------------------// -//--- New ways to set up the minimization problems. 03/10/06. ---// -//---------------------------------------------------------------// -//------- Step 1. ------- -//=== -//=== Using blockwise csminwel minimization package. -struct TSargs_blockcsminwel_tag *CreateTSargs_blockcsminwel(FILE *fptr_input1) -{ - //If fptr_input1==NULL or no no values supplied when fptr_input1 != NULL, default values are taken. - - int nvec; - struct TSargs_blockcsminwel_tag *args_blockcsminwel_ps = tzMalloc(1, struct TSargs_blockcsminwel_tag); - - - //=== Reads doubles. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== criterion_start ==//") || fscanf(fptr_input1, " %lf ", &args_blockcsminwel_ps->criterion_start) != 1 ) - args_blockcsminwel_ps->criterion_start = 1.0e-3; //Default. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== criterion_end ==//") || fscanf(fptr_input1, " %lf ", &args_blockcsminwel_ps->criterion_end) != 1 ) - args_blockcsminwel_ps->criterion_end = 1.0e-6; //Default. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== criterion_increment ==//") || fscanf(fptr_input1, " %lf ", &args_blockcsminwel_ps->criterion_increment) != 1 ) - args_blockcsminwel_ps->criterion_increment = 0.1; //Default. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== max_iterations_increment ==//") || fscanf(fptr_input1, " %lf ", &args_blockcsminwel_ps->max_iterations_increment) != 1 ) - args_blockcsminwel_ps->max_iterations_increment = 1.5; //Default. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== ini_h_scale ==//") || fscanf(fptr_input1, " %lf ", &args_blockcsminwel_ps->ini_h_scale) != 1 ) - args_blockcsminwel_ps->ini_h_scale = 5.0e-4; //Default. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== gradstps_csminwel_const ==//") || fscanf(fptr_input1, " %lf ", &args_blockcsminwel_ps->gradstps_csminwel_const) != 1 ) - args_blockcsminwel_ps->gradstps_csminwel_const = 1.0e-4; //Default. - - //=== Reads integers. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== max_iterations_start ==//") || fscanf(fptr_input1, " %d ", &args_blockcsminwel_ps->max_iterations_start) != 1 ) - args_blockcsminwel_ps->max_iterations_start = 50; //Default. - if ( !fptr_input1 || !fn_SetFilePosition(fptr_input1, "//== max_block_iterations ==//") || fscanf(fptr_input1, " %d ", &args_blockcsminwel_ps->max_block_iterations) != 1 ) - args_blockcsminwel_ps->max_block_iterations = 70; //Default. - - //=== Reads vectors. - if (fptr_input1 && fn_SetFilePosition(fptr_input1, "//== gradstps_csminwel_dv ==//")) - { - if ( fscanf(fptr_input1, " %d ", &nvec) != 1) - fn_DisplayError(".../fwz_comfuns.c/CreateTSinput(): check the first integer in the first row below the line //== gradstps_csminwel_dv ==// in the input data file"); - args_blockcsminwel_ps->gradstps_csminwel_dv = CreateVector_lf(nvec); - if ( !ReadVector_lf(fptr_input1, args_blockcsminwel_ps->gradstps_csminwel_dv) ) - fn_DisplayError(".../fwz_comfuns.c/CreateTSinput(): check the data matrix or vector after the first row below the line //== gradstps_csminwel_dv ==// in the input data file"); - args_blockcsminwel_ps->gradstps_csminwel_dv->flag = V_DEF; - } - else //Default (hard-coded). fn_DisplayError(".../fwz_comfuns.c/CreateTSinput(): the line with //== gradstps_csminwel_dv ==// in the input data file does not exist"); - { - args_blockcsminwel_ps->gradstps_csminwel_dv = CreateVector_lf(3); - args_blockcsminwel_ps->gradstps_csminwel_dv->v[0] = 1.0e-02; - args_blockcsminwel_ps->gradstps_csminwel_dv->v[1] = 1.0e-03; - args_blockcsminwel_ps->gradstps_csminwel_dv->v[2] = 1.0e-03; - args_blockcsminwel_ps->gradstps_csminwel_dv->flag = V_DEF; - } - - - args_blockcsminwel_ps->fptr_input1 = fptr_input1; - - return (args_blockcsminwel_ps); -} -//--- -struct TSargs_blockcsminwel_tag *DestroyTSargs_blockcsminwel(struct TSargs_blockcsminwel_tag *args_blockcsminwel) -{ - if (args_blockcsminwel) - { - //=== - free(args_blockcsminwel); - return ((struct TSargs_blockcsminwel_tag *)NULL); - } - else - return (args_blockcsminwel); -} -//=== -//=== Sets up a project-specific structure. -struct TSetc_minproj_tag *CreateTSetc_minproj(struct TStateModel_tag **smodel_pps, TFDestroyTStateModel *DestroyTStateModel_func, - struct TSargs_blockcsminwel_tag **args_blockcsminwel_pps, struct TSargs_blockcsminwel_tag *(*DestroyTSargs_blockcsminwel)(struct TSargs_blockcsminwel_tag *)) -{ - struct TSetc_minproj_tag *etc_minproj_ps = tzMalloc(1, struct TSetc_minproj_tag); - - //=== Initialization. - etc_minproj_ps->smodel_ps = *smodel_pps; - etc_minproj_ps->DestroyTStateModel = DestroyTStateModel_func; - if (DestroyTStateModel_func) *smodel_pps = (struct TStateModel_tag *)NULL; - //If destroy function makes this structure responsible to free memory of the passing pointer, reset this passing pointer to NULL to avoid double destroying actions and cause memory problem. - // In this case, the original pointer *smodel_pps or smodel_ps is no longer valid, while etc_minproj_ps->smodel_ps. - // Note that we pass **smodel_pps only when we want to use DestroyTStateModel_func and let this structure take over smodel_ps. - // In many other cases, we do not need to pass **smodel_pps, but only *smodel_ps will do. - //+ - etc_minproj_ps->args_blockcsminwel_ps = *args_blockcsminwel_pps; - etc_minproj_ps->DestroyTSargs_blockcsminwel = DestroyTSargs_blockcsminwel; - if (DestroyTSargs_blockcsminwel) *args_blockcsminwel_pps = (struct TSargs_blockcsminwel_tag *)NULL; - //If destroy function makes this structure responsible to free memory of the passing pointer, reset this passing pointer to NULL to avoid double destroying actions and cause memory problem. - - return (etc_minproj_ps); -} -//--- -struct TSetc_minproj_tag *DestroyTSetc_minproj(struct TSetc_minproj_tag *etc_minproj_ps) -{ - if (etc_minproj_ps) - { - if (etc_minproj_ps->DestroyTStateModel) etc_minproj_ps->DestroyTStateModel(etc_minproj_ps->smodel_ps); - //If destroy function is active, destroy it here; ohterwise, it will be destroyed somewhere else. - if (etc_minproj_ps->DestroyTSargs_blockcsminwel) etc_minproj_ps->DestroyTSargs_blockcsminwel(etc_minproj_ps->args_blockcsminwel_ps); - //If destroy function is active, destroy it here; ohterwise, it will be destroyed somewhere else. - - //=== - free(etc_minproj_ps); - return ((struct TSetc_minproj_tag *)NULL); - } - else return (etc_minproj_ps); -} -//------- Step 2. ------- -//$$$$$$ 28/Oct/2007: I commented them out because it'd better left to be the user's function because of -//$$$$$$ (1) constant-parameter case without using DW's functions; -//$$$$$$ (2) allowing us to generate parameters randomly, which depends on the specific model. -//$$$$$$ See lwz_est.c in D:\ZhaData\WorkDisk\LiuWZ\Project2_empirical\EstimationOct07 -//$$$$$$ or ExamplesForC.prn in D:\ZhaData\CommonFiles\C_Examples_DebugTips. -/** -void InitializeForMinproblem(struct TSminpack_tag *minpack_ps, char *filename_sp, TSdvector *gphi_dv, int indxStartValuesForMin) -{ - //Outputs: - // minpack_ps->x_dv and minpack_ps->xtemp_dv: - // The 1st gphi_dv->n elements of x_dv are model parameters (excluding those in the transition matrices). - // The 2nd-part or rest of the elements of x_dv are the free parameters in the transition matrices. - //Inputs: - // gphi_dv: model free parameters (excluding those in the transition matrices); - // indxStartValuesForMin (corresponding to the command option /c in runprog.bat): - // 0: continuing from the last estimated results contained in filename_sp. - // 1: starts from the fixed values for gphi_dv, manually keyed in datainpu_setup.prn. - // 2: randomly or arbitarily selects the initial starting values for the MLE or posterior estimate. - FILE *fptr_sp = NULL; - int _n, _i; - int nqs; - TSdvector xphi_sdv, xqs_sdv; - TSdvector *x_dv = minpack_ps->x_dv; - TSdvector *x0_dv = minpack_ps->x0_dv; - //--- - struct TStateModel_tag *smodel_ps = (struct TStateModel_tag *)((struct TSetc_minproj_tag *)minpack_ps->etc_project_ps)->smodel_ps; - int nfreempars = smodel_ps->routines->pNumberFreeParametersTheta(smodel_ps); - - if ( nfreempars != gphi_dv->n ) - fn_DisplayError("optpackage.c/InitializeForMinproblem(): Input vector gphi_dv must be free model parameters only"); - if ( nqs=NumberFreeParametersQ(smodel_ps) != x_dv->n - nfreempars ) - fn_DisplayError("optpackage.c/InitializeForMinproblem(): Minimization vector must have length equal to # of free model parameters plus # of free transition matrix parameters"); - - xphi_sdv.flag = V_DEF; - xphi_sdv.n = nfreempars; - xphi_sdv.v = x_dv->v; - - xqs_sdv.flag = V_DEF; - xqs_sdv.n = nqs; - xqs_sdv.v = x_dv->v + xphi_sdv.n; - - if (indxStartValuesForMin == 1) - { - CopyVector0(&xphi_sdv, gphi_dv); - ConvertQToFreeParameters(smodel_ps, xqs_sdv.v); //Waggnoer's own function for the transition matrix. - x_dv->flag = V_DEF; - } - else if (!indxStartValuesForMin) - { - fptr_sp = tzFopen(filename_sp,"r"); - rewind(fptr_sp); //Must put the pointer at the beginning of the file. - - for (_n=x_dv->n, _i=0; _i<_n; _i++) - if (fscanf(fptr_sp, " %lf ", x_dv->v+_i) != 1) - { - printf("Error: optpackage.c/InitializeForMinproblem() -- cannot read the number from the file %s. Check the data file", filename_sp); - exit(EXIT_FAILURE); - } - x_dv->flag = V_DEF; - - tzFclose(fptr_sp); - } - else fn_DisplayError("optpackage.c/InitializeForMinproblem(): the case indxStartValuesForMin = 2 has not been programmed yet"); - - - //--- Initial or starting values of the parameters. - CopyVector0(x0_dv, x_dv); - SetupObjectiveFunction(smodel_ps, xphi_sdv.v, xqs_sdv.v, xphi_sdv.v); //Must before using PosteriorObjectiveFunction(); - minpack_ps->fret0 = minpack_ps->fret = PosteriorObjectiveFunction(xphi_sdv.v, xphi_sdv.n); -// minpack_ps->fret0 = minpack_ps->fret = -logOverallPosteriorKernal(smodel_ps, x0_dv); - if (minpack_ps->fret0 >= NEARINFINITY) - { - printf("\nFatal Error:\n"); - printf(" optpackage.c/InitializeForMinproblem(): Bad initialization. All parameters must be in the reasonable range.\n"); -// printf(" optpackage.c/InitializeForMinproblem(): Bad initialization. All parameters must be in the reasonable range.\n" -// " Most likely, the parameters get stuck in the following line in swz2_confuns.c:\n" -// " if ((tmpd1mPhi=1.0-fn_normalcdf(xid * (log(mt-boundthetamt_1) - logdbar))) <= 0.0) logvalue = -NEARINFINITY;\n"); -// exit(EXIT_FAILURE); - } -} -/**/ -//------- Step 3. ------- -void minfinder_blockcsminwel(struct TSminpack_tag *minpack_ps, int indx_findMLE) -{ - //Better version (November 2007) - //Inputs: - // indx_findMLE: 1: find MLE without a prior, 0: find posterior (with a prior). - - //--- Block-csminwel arguments. - struct TSargs_blockcsminwel_tag *args_blockcsminwel_ps = ((struct TSetc_minproj_tag *)minpack_ps->etc_project_ps)->args_blockcsminwel_ps; - //--- DW's Markov-switching structure. - struct TStateModel_tag *smodel_ps = ((struct TSetc_minproj_tag *)minpack_ps->etc_project_ps)->smodel_ps; - //--- TSminpack arguments. - TSdvector *x_dv = minpack_ps->x_dv; - TSdvector *g_dv = minpack_ps->g_dv; - char *filename_printout = minpack_ps->filename_printout; //Printing out the intermediate results of x_dv and g_dv. - double fret = minpack_ps->fret; //Returned value of the objective function. - struct TSetc_csminwel_tag *etc_csminwel_ps = (TSetc_csminwel *)minpack_ps->etc_package_ps; - //--- Blockwise arguments. - int n1, n2; - int _n = x_dv->n; - double *x1_pd, *x2_pd, *g1_pd, *g2_pd; - double fret_last, logvalue; - TSdvector *gradstps_csminwel_dv = args_blockcsminwel_ps->gradstps_csminwel_dv; - //--- Blockwise csminwel intput arguments. - double criterion_start = args_blockcsminwel_ps->criterion_start; - double criterion_end = args_blockcsminwel_ps->criterion_end; - double criterion_increment = args_blockcsminwel_ps->criterion_increment; - int max_iterations_start = args_blockcsminwel_ps->max_iterations_start; - double max_iterations_increment = args_blockcsminwel_ps->max_iterations_increment; - int max_block_iterations = args_blockcsminwel_ps->max_block_iterations; - double ini_h_csminwel = args_blockcsminwel_ps->ini_h_scale; - //+ Other csminwel arguments - int iteration, total_iteration; - int niters, fcount, retcodeh, max_niters; - double crit; - //=== Blockwise and overall memory creations. - TSdmatrix *H1_dm = NULL; - TSdmatrix *H2_dm = NULL; - TSdmatrix *H_dm = NULL; - // - FILE *fptr_interesults = (FILE *)NULL; //Printing intermediate results to a file. - - - - if (!x_dv || !x_dv->flag) fn_DisplayError("swz2_comfuns.c/ minfinder_blockcsminwel(): free parameters x_dv must be initialized"); - - n1 = NumberFreeParametersTheta(smodel_ps); //Number of free model parameters. - n2 = NumberFreeParametersQ(smodel_ps); //Number of free transition matrix elements. - if (_n != (n1 + n2)) fn_DisplayError("optpackage.c/minfinder_blockcsminwel(): total number of free parameters" - " must be equal to number of free model parameters + number of free q's"); - H1_dm = CreateMatrix_lf(n1, n1); - H2_dm = CreateMatrix_lf(n2, n2); - H_dm = CreateMatrix_lf(_n, _n); - // - x1_pd = x_dv->v; - x2_pd = x_dv->v+n1; - g1_pd = g_dv->v; - g2_pd = g_dv->v+n1; - - //---- Refreshing the parameters outside this function. TZ October 2007. - SetupObjectiveFunction(smodel_ps, x1_pd, x2_pd, x_dv->v); - logvalue = -( minpack_ps->fret0 = minpack_ps->fret = PosteriorObjectiveFunction(x_dv->v, x_dv->n) ); //Refreshing. logPosterirPdf. DW function. - fprintf(FPTR_OPT, "\n=========== Beginning Blockwise and Overall csminwel Minimizations =======================\nLog Peak Value: %.16e\n", logvalue); - fflush(FPTR_OPT); - - - //======= Minimizing using csminwel ======= - //--- Set up a printout file to record x_dv and g_dv. - csminwel_SetPrintFile(filename_printout); //Set the print-out file outputsp_mle_tag.prn. - for (total_iteration=1, crit=criterion_start, max_niters=max_iterations_start; - crit >= criterion_end; - crit*=criterion_increment, max_niters=(int)(max_niters*max_iterations_increment)) - { - for (iteration=1; iteration <= max_block_iterations; total_iteration++, iteration++) - { - fret_last = fret; - //=== Minimizing the objective function w.r.t. the 1st block of parameters (model parameters). - printf("\nMinimizing user's specific model parameters at iteration %d\n",iteration); - InitializeDiagonalMatrix_lf(H1_dm, ini_h_csminwel); - H1_dm->flag = M_GE | M_SU | M_SL; //Hessian is symmetric. - //+ - SetupObjectiveFunction(smodel_ps, x1_pd, x2_pd, x_dv->v); - GRADSTPS_CSMINWEL = gradstps_csminwel_dv->v[0]; - if (indx_findMLE) - csminwel(MLEObjectiveFunction_csminwel, x1_pd, n1, H1_dm->M, g1_pd, NULL, - &fret, crit, &niters, max_niters, &fcount, &retcodeh, - (double **)NULL, (int *)NULL); - else - csminwel(PosteriorObjectiveFunction_csminwel, x1_pd, n1, H1_dm->M, g1_pd, NULL, - &fret, crit, &niters, max_niters, &fcount, &retcodeh, - (double **)NULL, (int *)NULL); - - ConvertFreeParametersToQ(smodel_ps,x2_pd); - ConvertFreeParametersToTheta(smodel_ps,x1_pd); - - //+ - logvalue = -fret; - fprintf(FPTR_OPT, "\n=========== Block iteration %d for block 1 at total iteration %d =======================\nLog Peak Value: %.16e\n", iteration, total_iteration, logvalue); - fflush(FPTR_OPT); - - - - //=== Minimizing the objective function w.r.t. the 2nd block of parameters (transition matrix). - printf("\nMinimizing transitiona matrix Q at iteration %d\n",iteration); - InitializeDiagonalMatrix_lf(H2_dm, ini_h_csminwel); - H2_dm->flag = M_GE | M_SU | M_SL; //Hessian is symmetric. - //+ - SetupObjectiveFunction(smodel_ps, x2_pd, x2_pd, x_dv->v); - GRADSTPS_CSMINWEL = gradstps_csminwel_dv->v[1]; - if (indx_findMLE) - csminwel(MLEObjectiveFunction_csminwel, x2_pd, n2, H2_dm->M, g2_pd, NULL, - &fret, crit, &niters, max_niters, &fcount, &retcodeh, - (double **)NULL, (int *)NULL); - else - csminwel(PosteriorObjectiveFunction_csminwel, x2_pd, n2, H2_dm->M, g2_pd, NULL, - &fret, crit, &niters, max_niters, &fcount, &retcodeh, - (double **)NULL, (int *)NULL); - - ConvertFreeParametersToQ(smodel_ps,x2_pd); - ConvertFreeParametersToTheta(smodel_ps,x1_pd); - - //+ - logvalue = -fret; - fprintf(FPTR_OPT, "\n=========== Block iteration %d for block 2 at total iteration %d =======================\nLog Peak Value: %.16e\n", iteration, total_iteration, logvalue); - fprintf(FPTR_OPT, "--------Numerical gradient---------\n"); - WriteVector(FPTR_OPT, g_dv, " %0.16e "); - fprintf(FPTR_OPT, "--------Restarting point---------\n"); - WriteVector(FPTR_OPT, x_dv, " %0.16e "); - fflush(FPTR_OPT); - - - if (fabs(fret - fret_last) <= crit) break; - } - - //=== Minimizing the overall likelihood or posterior kernel. - logvalue = -fret; - fprintf(FPTR_OPT,"\n\n=========== Total iteration %d ===========\n",++total_iteration); - fprintf(FPTR_OPT,"Criterion/Max_Numer_Iterations: %le %d\n",crit,max_niters); - fprintf(FPTR_OPT,"Log peak value before overall minimization: %.16e\n", logvalue); - fflush(FPTR_OPT); - //--- - InitializeDiagonalMatrix_lf(H_dm, ini_h_csminwel); - H_dm->flag = M_GE | M_SU | M_SL; //Hessian is symmetric. - //+ - SetupObjectiveFunction(smodel_ps, x_dv->v, x2_pd, x_dv->v); - GRADSTPS_CSMINWEL = gradstps_csminwel_dv->v[2]; - if (indx_findMLE) - csminwel(MLEObjectiveFunction_csminwel, x_dv->v, _n, H_dm->M, g_dv->v, NULL, - &fret, crit, &niters, max_niters, &fcount, &retcodeh, - (double **)NULL, (int *)NULL); - else - csminwel(PosteriorObjectiveFunction_csminwel, x_dv->v, _n, H_dm->M, g_dv->v, NULL, - &fret, crit, &niters, max_niters, &fcount, &retcodeh, - (double **)NULL, (int *)NULL); - - - //--- - logvalue = -fret; - fprintf(FPTR_OPT,"Log peak value after overall minimization: %.16e\n", logvalue); - fprintf(FPTR_OPT, "--------Numerical gradient---------\n"); - WriteVector(FPTR_OPT, g_dv, " %0.16e "); - fprintf(FPTR_OPT, "--------Restarting point---------\n"); - WriteVector(FPTR_OPT, x_dv, " %0.16e "); - fflush(FPTR_OPT); - - //--- Write to the intermediate results file. - if ( !(fptr_interesults = fopen(filename_printout,"w")) ) { - printf("\n\nUnable to open the starting point data file %s in minfinder_blockcsminwel() in optpackage.c!\n", filename_printout); - getchar(); - exit(EXIT_FAILURE); - } - fprintf(fptr_interesults, "========= All blocks are reported here. ========== \n"); - fprintf(fptr_interesults, "--------Numerical gradient---------\n"); - WriteVector(fptr_interesults, g_dv, " %0.16e "); - fprintf(fptr_interesults, "--------Restarting point---------\n"); - WriteVector(fptr_interesults, x_dv, " %0.16e "); - fflush(fptr_interesults); - tzFclose(fptr_interesults); - - - ConvertFreeParametersToQ(smodel_ps,x2_pd); - ConvertFreeParametersToTheta(smodel_ps,x1_pd); - } - - etc_csminwel_ps->niter = niters; //Number of iterations taken by csminwel. - etc_csminwel_ps->fcount = fcount; //Number of function evaluations used by csminwel. - etc_csminwel_ps->retcode = retcodeh; //Return code for the terminating condition. - // 0, normal step (converged). 1, zero gradient (converged). - // 4,2, back and forth adjustment of stepsize didn't finish. - // 3, smallest stepsize still improves too slow. 5, largest step still improves too fast. - // 6, no improvement found. - - DestroyMatrix_lf(H1_dm); - DestroyMatrix_lf(H2_dm); - DestroyMatrix_lf(H_dm); -} - - -//----------------------------------------------------- -// Minimization csminwel for the constant parameter model only. 5/24/04. -//----------------------------------------------------- -//------- Step 2. ------- -//--- 28/Oct/07: This function has NOT been used even for the constant-parameter model. -//--- For examples, see lwz_est.c in D:\ZhaData\WorkDisk\LiuWZ\Project2_empirical\EstimationOct07 -//--- or ExamplesForC.prn under D:\ZhaData\CommonFiles\C_Examples_DebugTips. -/** -void InitializeForMinproblem_const(struct TSminpack_tag *minpack_ps, char *filename_sp, TSdvector *gphi_dv, int indxStartValuesForMin) -{ - //Outputs: - // minpack_ps->x_dv and minpack_ps->xtemp_dv: - // The 1st gphi_dv->n elements of x_dv are model parameters (excluding those in the transition matrices). - // The 2nd-part or rest of the elements of x_dv are the free parameters in the transition matrices. - //Inputs: - // gphi_dv: model free parameters (excluding those in the transition matrices); - // indxStartValuesForMin (corresponding to the command option /c in runprog.bat): - // 0: continuing from the last estimated results contained in filename_sp. - // 1: starts from the fixed values for gphi_dv, manually keyed in datainpu_setup.prn. - // 2: randomly or arbitarily selects the initial starting values for the MLE or posterior estimate. - FILE *fptr_sp = NULL; - int _n, _i; - TSdvector xphi_sdv; - TSdvector *x_dv = minpack_ps->x_dv; - TSdvector *x0_dv = minpack_ps->x0_dv; - //--- - struct TStateModel_tag *smodel_ps = (struct TStateModel_tag *)((struct TSetc_minproj_tag *)minpack_ps->etc_project_ps)->smodel_ps; - int nfreempars = smodel_ps->routines->pNumberFreeParametersTheta(smodel_ps); - - if ( nfreempars != gphi_dv->n ) - fn_DisplayError("optpackage.c/InitializeForMinproblem_const(): Input vector gphi_dv must be free model parameters only"); - - xphi_sdv.flag = V_DEF; - xphi_sdv.n = nfreempars; - xphi_sdv.v = x_dv->v; - - if (indxStartValuesForMin == 1) - { - CopyVector0(&xphi_sdv, gphi_dv); - x_dv->flag = V_DEF; - } - else if (!indxStartValuesForMin) - { - fptr_sp = tzFopen(filename_sp,"r"); - rewind(fptr_sp); //Must put the pointer at the beginning of the file. - - for (_n=x_dv->n, _i=0; _i<_n; _i++) - if (fscanf(fptr_sp, " %lf ", x_dv->v+_i) != 1) - { - printf("Error: optpackage.c/InitializeForMinproblem_const() -- cannot read the number from the file %s. Check the data file", filename_sp); - exit(EXIT_FAILURE); - } - x_dv->flag = V_DEF; - - tzFclose(fptr_sp); - } - else fn_DisplayError("optpackage.c/InitializeForMinproblem_const(): the case indxStartValuesForMin = 2 has not been programmed yet"); - - - //--- Initial or starting values of the parameters. - CopyVector0(x0_dv, x_dv); - //The following line does not work because minpack_ps->xtemp_ps will be used in minneglogpost_const(), which has not be initialized. - //Use instead minpack_ps->fret0 = minpack_ps->fret = logOverallPosteriorKernal_const(smodel_ps, minpack_ps->x0_dv); - //minpack_ps->fret0 = minpack_ps->fret = minpack_ps->minobj(minpack_ps); This will not work because -} -/**/ - -//------- Step 3. ------- -void minfinder(TSminpack *minpack_ps) -{ - TSdvector *x_dv = minpack_ps->x_dv; - //--- For MIN_CSMINWEL only. - TSdmatrix *Hx_dm; - TSetc_csminwel *etc_csminwel_ps; - - if (minpack_ps->package & MIN_CSMINWEL) { - if (!x_dv->flag) fn_DisplayError("optpackage.c/ minfinder(): Parameter x_dv must be initialized"); - else { - //=== BFGS (csminwel) method. - etc_csminwel_ps = (TSetc_csminwel *)minpack_ps->etc_package_ps; - Hx_dm = etc_csminwel_ps->Hx_dm; - //Alternative: Hx_dm = ((TSetc_csminwel *)minpack_ps->etc_package_ps)->Hx_dm; - if (!Hx_dm->flag) { - InitializeDiagonalMatrix_lf(Hx_dm, INI_H_CSMINWEL); - Hx_dm->flag = M_GE | M_SU | M_SL; //Hessian is symmetric. - } - //if (minpack_ps->filename_printout) csminwel_SetPrintFile(minpack_ps->filename_printout); - csminwel_SetPrintFile(minpack_ps->filename_printout); - SetMincsminwelGlobal(minpack_ps); - GRADSTPS_CSMINWEL = etc_csminwel_ps->gradstps_csminwel; - csminwel(minobj_csminwelwrap, x_dv->v, x_dv->n, Hx_dm->M, minpack_ps->g_dv->v, minpack_ps->mingrad ? mingrad_csminwelwrap : NULL, - &minpack_ps->fret, etc_csminwel_ps->crit, &etc_csminwel_ps->niter, etc_csminwel_ps->itmax, - &etc_csminwel_ps->fcount, &etc_csminwel_ps->retcode, (double **)NULL, (int *)NULL); - } - } - else fn_DisplayError("optpackage.c/minfinder(): (1) minpack_ps must be created and (2) I have not got time to specify other minimization packages such as ISML"); -} - - - -//----------------------------------------------------------------------- -// Linearly-constrained IMSL minimization package. -//----------------------------------------------------------------------- -struct TSpackage_imslconlin_tag *CreateTSpackagae_imslconlin(const int npars_tot, const int neqs, const int ncons) -{ - //npars_tot: total number of variables (e.g., all the model variables plus free parameters in transition matrix). - //ncons: total number of constraints (excluding simple bounds) which include the linear equality constraints. - //neqs: number of linear equality constrains. Thus, ncons >= neqs. - //lh_coefs_dv: ncons*npars_tot-by-1 left-hand-side constraint cofficients with the first neqs rows dealing with equality constraints. - //rh_constraints_dv: ncons-by-1 right-hand-side the values for all the constraints. - //lowbounds_dv: npars_tot-by-1 simple lower bounds. - //upperbounds_dv: npars_tot-by-1 simple upper bounds. - //=== - struct TSpackage_imslconlin_tag *package_imslconlin_ps = tzMalloc(1, struct TSpackage_imslconlin_tag); - - if (neqs > ncons || npars_tot<=0) - fn_DisplayError("CreateTSpackage_imslconlin(): make sure (1) # of equality constraints no greater than total # of constraints" - "\t and (2) number of free parameters must be greater than 0"); - package_imslconlin_ps->npars_tot = npars_tot; - package_imslconlin_ps->neqs = neqs; - package_imslconlin_ps->ncons = ncons; - - - if (ncons<=0) - { - package_imslconlin_ps->lh_coefs_dv = NULL; - package_imslconlin_ps->rh_constraints_dv = NULL; - } - else - { - package_imslconlin_ps->lh_coefs_dv = CreateConstantVector_lf(ncons*npars_tot, 0.0); - package_imslconlin_ps->rh_constraints_dv = CreateVector_lf(ncons); - } - package_imslconlin_ps->lowbounds_dv = CreateConstantVector_lf(npars_tot, -BIGREALNUMBER); - package_imslconlin_ps->upperbounds_dv = CreateConstantVector_lf(npars_tot, BIGREALNUMBER); - //- - package_imslconlin_ps->xsaved_dv = CreateVector_lf(package_imslconlin_ps->npars_tot); - XIMSL_DV = CreateVector_lf(package_imslconlin_ps->npars_tot); //Used in ObjFuncForModel_imslconlin() to save the minimized value in case the IMSL quits with a higher value. - - package_imslconlin_ps->crit = CRIT_IMSLCONLIN; - package_imslconlin_ps->itmax = ITMAX_IMSLCONLIN; - - - return (package_imslconlin_ps); -} -//--- -struct TSpackage_imslconlin_tag *DestroyTSpackagae_imslconlin(struct TSpackage_imslconlin_tag *package_imslconlin_ps) -{ - if (package_imslconlin_ps) - { - DestroyVector_lf(package_imslconlin_ps->lh_coefs_dv); - DestroyVector_lf(package_imslconlin_ps->rh_constraints_dv); - DestroyVector_lf(package_imslconlin_ps->lowbounds_dv); - DestroyVector_lf(package_imslconlin_ps->upperbounds_dv); - // - DestroyVector_lf(package_imslconlin_ps->xsaved_dv); - DestroyVector_lf(XIMSL_DV); - - //=== - free(package_imslconlin_ps); - return ((struct TSpackage_imslconlin_tag *)NULL); - } - else return (package_imslconlin_ps); -} -//----------------------------------------------------------------------- -// Using Linearly-constrained IMSL minimization package. -//----------------------------------------------------------------------- -void minfinder_noblockimslconlin(struct TSpackage_imslconlin_tag *package_imslconlin_ps, struct TSminpack_tag *minpack_ps, char *filename_printout, int ntheta) -{ - //ntheta: number of free model parameters (NOT including free transition matrix Q parameters). - //filename_printout: the file that stores the intermediate results. - - //--- Model or project specific structure. - struct TStateModel_tag *smodel_ps = ((struct TSetc_minproj_tag *)minpack_ps->etc_project_ps)->smodel_ps; - //--- - TSdvector *x_dv = minpack_ps->x_dv; - TSdvector *g_dv = minpack_ps->g_dv; - double *x1_pd, *x2_pd; - //=== - TSdvector *xguess_dv = CreateVector_lf(x_dv->n); - - x1_pd = x_dv->v; - x2_pd = x_dv->v + ntheta; //In the constant parameter model, this will point to invalid, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - CopyVector0(xguess_dv, x_dv); - - - //======= IMSL linearly-constrained optimization, which makes sure that the boundary condition is met. - imslconlin_SetPrintFile(filename_printout); //Set the print-out file outputsp_min_tag.prn. - printf("\n\n======= Starting the IMSL constrained optimization======= \n\n"); - fflush(stdout); - //====== The following linearly-constrained minimization works well for this kind of model but has a bugger of returning a higher value of the objective function. - CopyVector0(XIMSL_DV, x_dv); //This is absolutely necessary because once imsl_d_min_con_gen_lin() is called, x_dv will be - // changed before ObjFuncForModel_imslconlin() is evaluated. It is possible that x_dv is changed - // so much that bad objective is returned and thus XIMSL_DV would be bad from the start, thus - // giving 1.eE+3000 from beginning to end. - GLB_FVALMIN = -LogPosterior_StatesIntegratedOut(smodel_ps); - CopyVector0(package_imslconlin_ps->xsaved_dv, XIMSL_DV); - //+ - SetModelGlobalForIMSLconlin(smodel_ps); - - - ////////////////////////////////////////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////////////////////////////////////////// - - //if (imsl_d_min_con_gen_lin(ObjFuncForModel_imslconlin, x_dv->n, package_imslconlin_ps->ncons, package_imslconlin_ps->neqs, - // package_imslconlin_ps->lh_coefs_dv->v, - // package_imslconlin_ps->rh_constraints_dv->v, - // package_imslconlin_ps->lowbounds_dv->v, package_imslconlin_ps->upperbounds_dv->v, - // IMSL_XGUESS, xguess_dv->v, IMSL_GRADIENT, gradcd_imslconlin, - // IMSL_MAX_FCN, package_imslconlin_ps->itmax, IMSL_OBJ, &minpack_ps->fret, - // IMSL_TOLERANCE, package_imslconlin_ps->crit, IMSL_RETURN_USER, x_dv->v, 0)) - //{ - // printf("\nFinished: IMSL linearly-constrained optimization is successfully finished with the value of obj. fun.: %.16e\n", minpack_ps->fret); - //} - //else printf("\nWarning: IMSL linearly-constrained optimization fails, so the results from csminwel and congramin are used.\n"); - printf("\n===Ending the IMSL constrained optimization===\n"); - - //=== Printing out messages indicating that IMSL has bugs. - if (minpack_ps->fret > GLB_FVALMIN) - { - //IMSL linearly-constrained optimization returns a higher obj. func. (a bug). - printf("\n----------IMSL linearly-constrained minimization finished but with a higher objective function value!----------\n"); - printf("The improperly-returned value is %.10f while the lowest value of the objective function is %.16e.\n\n", minpack_ps->fret, GLB_FVALMIN); - fflush(stdout); - fprintf(FPTR_DEBUG, "\n----------IMSL linearly-constrained minimization finished but with a higher objective function value!----------\n"); - fprintf(FPTR_DEBUG, "The improperly-returned value is %.16e while the lowest value of the objective function is %.16e.\n\n", minpack_ps->fret, GLB_FVALMIN); - fflush(FPTR_DEBUG); - } - - ConvertFreeParametersToQ(smodel_ps,x2_pd); - //DW's function, which takes care of the degenerate case where x2_pd points to an - // invalid place as in the constant parameter case. - ConvertFreeParametersToTheta(smodel_ps,x1_pd); //DW's function, which calls TZ's function. So essentially it's TZ's function. - - //Saved the last best results in case the IMSL quits with a bug. - CopyVector0(package_imslconlin_ps->xsaved_dv, XIMSL_DV); - - - //=== - DestroyVector_lf(xguess_dv); -} -//=== -static struct TStateModel_tag *SMODEL_PS = NULL; //Minimization to find the MLE or posterior peak. -static struct TStateModel_tag *SetModelGlobalForIMSLconlin(struct TStateModel_tag *smodel_ps) -{ - //Returns the old pointer in order to preserve the previous value. - struct TStateModel_tag *tmp_ps = SMODEL_PS; - SMODEL_PS = smodel_ps; - return (tmp_ps); -} -static void ObjFuncForModel_imslconlin(int d_x0, double *x0_p, double *fret_p) -{ - TSdvector x0_sdv; - // - FILE *fptr_startingpoint_vec = NULL; - static int ncnt_fevals = -1; - - // printf("\n----- Entering the objective function. ------"); - // fflush(stdout); - x0_sdv.v = x0_p; - x0_sdv.n = d_x0; - x0_sdv.flag = V_DEF; - - *fret_p = -opt_logOverallPosteriorKernal(SMODEL_PS, &x0_sdv); - if ( GLB_DISPLAY) { - printf("\nValue of objective function at the %dth evaluation: %.16e\n", ++ncnt_fevals, *fret_p); - fflush(stdout); - } - if (*fret_p < GLB_FVALMIN) { - //=== Resets GLB_FVALMIN at *fret_p and then prints the intermediate point to a file. - fptr_startingpoint_vec = tzFopen(filename_sp_vec_minproj,"w"); - fprintf(fptr_startingpoint_vec, "================= Output from IMSC linear constrained optimization ====================\n"); - fprintf(fptr_startingpoint_vec, "IMSL: Value of objective miminization function at the %dth iteration: %.15f\n", ncnt_fevals, GLB_FVALMIN=*fret_p); - fprintf(fptr_startingpoint_vec, "--------Restarting point---------\n"); - WriteVector(fptr_startingpoint_vec, &x0_sdv, " %0.16e "); - CopyVector0(XIMSL_DV, &x0_sdv); //Saved in case the IMSL quits with a bug. - //=== Must print this results because imsl_d_min_con_gen_lin() has a bug and quits with a higher value. The printed-out results in the debug file may be used for imsl_d_min_con_nonlin() to continue. - fprintf(FPTR_DEBUG, "\nIMSL: Value of objective miminization function at the %dth iteration: %.15f\n", ncnt_fevals, GLB_FVALMIN=*fret_p); - fprintf(FPTR_DEBUG, "--------Restarting point---------\n"); - WriteVector(FPTR_DEBUG, &x0_sdv, " %0.16e "); - fflush(FPTR_DEBUG); - } - - // printf("\n----- Leaving the objective function. ------\n"); - // fflush(stdout); - - tzFclose(fptr_startingpoint_vec); -} -//------------------------ -// Overall posterior kernal for calling Waggoner's regime-switching procedure. -//------------------------ -static double opt_logOverallPosteriorKernal(struct TStateModel_tag *smodel_ps, TSdvector *xchange_dv) -{ - double *x1_pd, *x2_pd; - - x1_pd = xchange_dv->v; - x2_pd = xchange_dv->v + NumberFreeParametersTheta(smodel_ps); - //Note that NumberFreeParametersTheta() is DW's function, which points to TZ's function. - //In the constant parameter model, this will point to invalid, - // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - //======= This is a must step to refresh the value at the new point. ======= - ConvertFreeParametersToTheta(smodel_ps, x1_pd); //Waggoner's function, which calls TZ's Convertphi2*(). - ConvertFreeParametersToQ(smodel_ps, x2_pd); //Waggoner's function, which automatically takes care of the constant-parameter situition - ThetaChanged(smodel_ps); //DW's function, which will also call my function to set a flag for refreshing everything under these new parameters. - if (1) //Posterior function. - return ( LogPosterior_StatesIntegratedOut(smodel_ps) ); //DW's function. - else //Likelihood (with no prior) - return ( LogLikelihood_StatesIntegratedOut(smodel_ps) ); //DW's function. -} -//--- -static void imslconlin_SetPrintFile(char *filename) { - if (!filename) sprintf(filename_sp_vec_minproj, "outdata5imslconlin.prn"); //Default filename. - else if (STRLEN-1 < strlen(filename)) fn_DisplayError(".../optpackage.c: the allocated length STRLEN for filename_sp_vec_minproj is too short. Must increase the string length"); - else strcpy(filename_sp_vec_minproj, filename); -} -//--- -static void gradcd_imslconlin(int n, double *x, double *g) -{ - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x: the vector point at which the gradient is evaluated. No change in the end although will be added or - // substracted by dh during the function (but in the end the original value will be put back). - // n: the dimension of g or x. - //int _i; - FILE *fptr_startingpoint_vec = NULL; - - // printf("\n=== Entering the gradient function. ===\n"); - // fflush(stdout); - GLB_DISPLAY = 0; //This guarantees that the objective function printouts will not show when the gradient is computed. - gradcd_gen(g, x, n, ObjFuncForModel_congrad, (double *)NULL, ObjFuncForModel_congrad(x, n)); - - //=== Prints the intermediate gradient to a file. - // fptr_startingpoint_vec = tzFopen(filename_sp_vec_minproj,"r"); - // fprintf(fptr_startingpoint_vec, "--------Numerical gradient---------\n"); - // for (_i=0; _i<n; _i++) fprintf(fptr_startingpoint_vec, " %0.16e ", g[_i]); - // tzFclose(fptr_startingpoint_vec); - - GLB_DISPLAY = 1; - // printf("\n=== Leaving the gradient function. ===\n"); - // fflush(stdout); -} -//--- For conjugate gradient minimization as well. -static double ObjFuncForModel_congrad(double *x0_p, int d_x0) -{ - TSdvector x0_sdv; - x0_sdv.v = x0_p; - x0_sdv.n = d_x0; - x0_sdv.flag = V_DEF; - - return ( -opt_logOverallPosteriorKernal(SMODEL_PS, &x0_sdv) ); -} - - - - - - - -//----------------------------------------------------------------------- -// Conjugate gradient method I minimization package. -//----------------------------------------------------------------------- -struct TSpackage_congrad1_tag *CreateTSpackage_congrad1(void) -{ - //=== - struct TSpackage_congrad1_tag *package_congrad1_ps = tzMalloc(1, struct TSpackage_congrad1_tag); - - package_congrad1_ps->crit = CRIT_CONGRAD1; - package_congrad1_ps->itmax = ITMAX_CONGRAD1; - - return (package_congrad1_ps); -} -//--- -struct TSpackage_congrad1_tag *DestroyTSpackage_congrad1(struct TSpackage_congrad1_tag *package_congrad1_ps) -{ - if (package_congrad1_ps) - { - //=== - free(package_congrad1_ps); - return ((struct TSpackage_congrad1_tag *)NULL); - } - else return (package_congrad1_ps); -} - - -/** -static void imslconlin_gradcd(int n, double *x, double *g) { - //Outputs: - // g: the gradient n-by-1 g (no need to be initialized). - //Inputs: - // x: the vector point at which the gradient is evaluated. No change in the end although will be added or substracted by dh during the function (but in the end the original value will be put back). - // n: the dimension of g or x. - int _i; - - // printf("\n=== Entering the gradient function. ===\n"); - // fflush(stdout); - GLB_DISPLAY = 0; //This guarantees so that the objective function printouts will not show when the gradient is computed. - gradcd_gen(g, x, n, congrad_ObjFuncForTVBVAR, (double *)NULL, congrad_ObjFuncForTVBVAR(x, n)); - //=== Prints the intermediate gradient to a file. - fptr_startingpoint_grad = tzFopen(filename_spgrad,"w"); - fprintf(fptr_startingpoint_grad, "--------Numerical gradient---------\n"); - for (_i=0; _i<n; _i++) fprintf(fptr_startingpoint_grad, " %0.16e ", g[_i]); - tzFclose(fptr_startingpoint_grad); - GLB_DISPLAY = 1; - // printf("\n=== Leaving the gradient function. ===\n"); - // fflush(stdout); -} -/**/ - - - -/** - //=== Conjugate gradient method, which works too slowly but is reliable. Thus, it is used to finish it up. - congradmin_SetPrintFile(filename_spvec); - frprmn(x0_dv->v, x0_dv->n, &niter, &fret, congrad_ObjFuncForTVBVAR, gradcd_gen, &ftol, &itmax, (double *)NULL, (int *)NULL, (double *)NULL); - - -void frprmn(double p[], int n, int *iter, double *fret, - double (*func)(double [], int), void (*dfunc)(double [], double [], int, double (*func)(double [], int), double *, double), - double *ftol_p, int *itmax_p, double *tol_brent_p, int *itmax_brent_p, double *grdh_p) { - //Outputs: - // p[0, ..., n-1]: the location of the minimum if it converges, which replaces the starting value. - // iter: pointer to the number of iterations that were performed. - // fret: pointer to the minimum value of the function. - //Inputs: - // p[0, ..., n-1]: a starting point for the minimization. - // n: the dimension of p. - // ftol_p: pointer to the convergence tolerance on the objective function value. Default: 1.0e-4 if NULL. - // itmax_p: pointer to the maximum number of iterations in the main minimization program frprmn(). Default: 2000 if NULL. - // tol_brent_p: pointer to the convergence tolerance for the line minimization in brent(). Default: 2.0e-4 if NULL. - // itmax_brent_p: pointer to the maximum number of iterations for the line minimization in brent(). Default: 100 if NULL. - // grdh: pointer to the user's specified step size for a numerical gradient. If NULL, dfunc() (i.e., gradcd_gen()) will select grdh automatically. - // func(): the objective function. - // dfunc(): the gradient function computing the numerical gradient. In the form of gradcd_gen() in cstz.c. - - -//------- For csminwel only. ------- -typedef struct TSetc_congrad1_tag { - //=== Optional input arguments, often NOT used, so we set to NULL at this point. - double **args; //k-by-q. - int *dims; //k-by-1; - int _k; - - //=== Mandatory input arguments. - TSdmatrix *Hx_dm; //n-by-n inverse Hessian. Output as well, when csminwel is done. - double crit; //Overall convergence criterion for the function value. - int itmax; //Maximum number of iterations. -// double grdh; //Step size for the numerical gradient if no analytical gradient is available. - - //=== Some reported input arguments. - double ini_h_csminwel; - int indxnumgrad_csminwel; - double gradstps_csminwel; - - - //=== Output arguments. - int badg; //If (badg==0), analytical gradient is used; otherwise, numerical gradient will be produced. - int niter; //Number of iterations taken by csminwel. - int fcount; //Number of function evaluations used by csminwel. - int retcode; //Return code for the terminating condition. - // 0, normal step (converged). 1, zero gradient (converged). - // 4,2, back and forth adjustment of stepsize didn't finish. - // 3, smallest stepsize still improves too slow. 5, largest step still improves too fast. - // 6, no improvement found. -} TSetc_csminwel; - - -/**/ - - - -/** -//------- For IMSL multivariate linearly-constrained minimizaiton package only. ------- -typedef struct TSetc_imslconlin_tag { - //=== Non-trivial constraint arguments, whose arrays will point to the constraints specified in the specific project minpack->etc_project_ps. - int nvars; //Total number of free parameters for the optimaization. - int neqs; //Number of linear equality constrains. Must be no greater than ncons. - int ncons; //Total number of linear equality and non-equality constrains (excluding simple bounds). - double *lh_coefs_pd; //ncons*nvars-by-1. Left-hand coefficients in the linear constrains (excluding simple bounds). - //lh_coefs_pd stacks the neqs rows first, followed by the inequality constraints. - //Set to NULL if ncons=0; - double *rh_constraints_pd; //ncons-by-1. Right-hand constrains in the equality and non-equality constrains (excluding simple bounds). - //Set to NULL if ncons=0; - - //=== Trivial or simple bounds. - double *lowbounds_pd; //nvars-by-1. Simple lower bounds. If a component is unbounded, choose a very negative large value (e.g., -BIGREALNUMBER). - double *upperbounds_pd; //nvars-by-1. Simple upper bounds. If a component is unbounded, choose a very positive large value (e.g., BIGREALNUMBER). - - //=== Other inputs. - int itmax; //Maximum number of iterations. - double crit; //Overall convergence criterion on the first-order conditions. -} TSetc_imslconlin; - - -//----------------------------------------------------------------------- -// Linearly-constrained IMSL minimization package. -//----------------------------------------------------------------------- -static struct TSetc_imslconlin_tag *CreateTSetc_imslconlin(struct TSminpack_tag *minpack_psconst int nvars, const int neqs, const int ncons) -{ - //=== - struct TSetc_imslconlin *etc_imslconlin_ps = tzMalloc(1, struct TSetc_imslconlin_tag); - - if (neqs.ncons) fn_DisplayErrors("optpackage.c/CreateTSetc_imslconlin: make sure # of equality constraints no greater than total # of constraints"); - - - return (etc_imslconlin_ps); -} - -/**/ - - -//----------------------------------------------------------------------- -// Using Linearly-constrained NPSOL minimization package. -// Added: 4/21/10 - Jake Smith -//----------------------------------------------------------------------- -void minfinder_noblocknpsolconlin(struct TSpackage_npsolconlin_tag *package_npsolconlin_ps, struct TSminpack_tag *minpack_ps, char *filename_printout, int ntheta) -{ -#ifdef _NPSOL_ - - - //ntheta: number of free model parameters (NOT including free transition matrix Q parameters). - //filename_printout: the file that stores the intermediate results. - - int i, j; - - //--- Model or project specific structure. - struct TStateModel_tag *smodel_ps = ((struct TSetc_minproj_tag *)minpack_ps->etc_project_ps)->smodel_ps; - //--- - - - TSdvector *x_dv = minpack_ps->x_dv; - TSdvector *g_dv = minpack_ps->g_dv; - double *x1_pd=NULL, *x2_pd=NULL; - //=== - TSdvector *xguess_dv = CreateVector_lf(x_dv->n); - - x1_pd = x_dv->v; //In the constant parameter model, this will point to invalid, - x2_pd = x_dv->v + ntheta; // but will be taken care of automatically by DW's function ConvertFreeParametersToQ(). - - CopyVector0(xguess_dv, x_dv); - - //======= NPSOL linearly-constrained optimization, which makes sure that the boundary condition is met. - npsolconlin_SetPrintFile(filename_printout); //Set the print-out file outputsp_min_tag.prn. - printf("\n\n======= Starting the NPSOL constrained optimization======= \n\n"); - fflush(stdout); - //====== The following linearly-constrained minimization works well for this kind of model but has a bugger of returning a higher value of the objective function. - CopyVector0(XNPSOL_DV, x_dv); //This is absolutely necessary because once imsl_d_min_con_gen_lin() is called, x_dv will be - // changed before ObjFuncForModel_imslconlin() is evaluated. It is possible that x_dv is changed - // so much that bad objective is returned and thus XIMSL_DV would be bad from the start, thus - // giving 1.eE+3000 from beginning to end. - GLB_FVALMIN = -LogPosterior_StatesIntegratedOut(smodel_ps); - CopyVector0(package_npsolconlin_ps->xsaved_dv, XNPSOL_DV); - //+ - SetModelGlobalForNPSOLconlin(smodel_ps); - - //////////////////////////////////////////////////////////////// - // Set up NPSOL variables - //////////////////////////////////////////////////////////////// - int N = package_npsolconlin_ps->n; - int nlin = package_npsolconlin_ps->num_lin; - int nclin = package_npsolconlin_ps->num_nlin; - int nbnd = N + nlin + nclin; - - double x[N]; - double g[N]; - //double *x = malloc(sizeof(double)*N); - //double *g = malloc(sizeof(double)*N); - - int ldJ = nclin; - if (nclin <= 0) - ldJ = 1; - - int ldR = N; - int ldA = nlin; - - double A[50][50]; - - // convert row major definition to column major - if (nlin > 0) { - TSdmatrix *m = package_npsolconlin_ps->A; - for (i=0; i<N; i++) { - for (j=0; j<ldA; j++) { - //TODO: Talk to Tao about how he wants this done - //A[i][j] = m->M[j][i]; - } - } - } - else - { - ldA = 1; - for (i=0; i<N; i++) - A[i][0] = 0; - } - - double lb[150]; - double ub[150]; - - - // the first part of ub/lb are the general bound constraints - for (i=0; i<N;i++) { - lb[i] = package_npsolconlin_ps->lb->v[i]; - ub[i] = package_npsolconlin_ps->ub->v[i]; - } - // the second part of the ub/lb are the linear constraints; - for (i=N; i<N+nlin; i++) { - lb[i] = package_npsolconlin_ps->lin_lb->v[i-N]; - ub[i] = package_npsolconlin_ps->lin_ub->v[i-N]; - } - // the third part of the ub/lb are the nonlinear constraints; - for (i=N+nlin; i<nbnd; i++) { - lb[i] = package_npsolconlin_ps->nlin_lb->v[i-N-nlin]; - ub[i] = package_npsolconlin_ps->nlin_ub->v[i-N-nlin]; - } - - double result; - double *c = NULL; - c = malloc(sizeof(double)*nclin); - - int inform; - - // workspace - double *R = malloc(ldR*N*sizeof(double)); - int itera; - int istate[nbnd]; - int leniw = 3*N + nlin + 2*nclin; - int lenw = 2*pow(N,2) + N*nlin + 2*N*nclin + 20*N + 11*nlin + 21*nclin; - int *iw = malloc(sizeof(int)*leniw); - double *w = malloc(sizeof(double)*lenw); - double *cJac = malloc(sizeof(double)*1); - double *clambda = malloc(sizeof(double)*nbnd); - - //////////////////////////////////////////////////////////////// - // CALL NPSOL - //////////////////////////////////////////////////////////////// - - npsol((int*) &N, &nlin, &nclin, &ldA, &ldJ, &ldR, *A, lb, ub, &confun, &ObjFuncForModel_npsolconlin, &inform, - &itera, istate, c, cJac, clambda, &result, g_dv->v, R, x_dv->v, iw, &leniw, w, &lenw); - - minpack_ps->fret = result; - - if (inform == 0) { - // The function completed successfullly - printf("\n===Ending the NPSOL constrained optimization===\n"); - } - else if (inform == 1) { - // The final iterate of x satisfies the optimality condition to eh accuracy, but has yet to converge - printf("\n===Ending the NPSOL constrained optimization, DID NOT CONVERGE===\n"); - } else { - // There was a problem - printf("\n-------NPSOL had a problem estimating ----------\n"); - printf("Error Code: %d\n\n", (int) inform); - } - - - //=== Printing out messages indicating that IMSL has bugs. - if (minpack_ps->fret > GLB_FVALMIN) - { - //NPSOL linearly-constrained optimization returns a higher obj. func. (a bug). - printf("\n----------NPSOL linearly-constrained minimization finished but with a higher objective function value!----------\n"); - printf("The improperly-returned value is %.10f while the lowest value of the objective function is %.16e.\n\n", minpack_ps->fret, GLB_FVALMIN); - fflush(stdout); - fprintf(FPTR_DEBUG, "\n----------NPSOL linearly-constrained minimization finished but with a higher objective function value!----------\n"); - fprintf(FPTR_DEBUG, "The improperly-returned value is %.16e while the lowest value of the objective function is %.16e.\n\n", minpack_ps->fret, GLB_FVALMIN); - fflush(FPTR_DEBUG); - } - - ConvertFreeParametersToQ(smodel_ps,x2_pd); - //DW's function, which takes care of the degenerate case where x2_pd points to an - // invalid place as in the constant parameter case. - ConvertFreeParametersToTheta(smodel_ps,x1_pd); //DW's function, which calls TZ's function. So essentially it's TZ's function. - - //Saved the last best results in case the IMSL quits with a bug. - CopyVector0(package_npsolconlin_ps->xsaved_dv, XNPSOL_DV); - - - //=== - DestroyVector_lf(xguess_dv); - -#endif -} - -//----------------------------------------------------------------------- -// ObjFuncForModel_npsolconlin(): -// Objective Function for linear constrained NPSOL problem -// -// mode: negative to exit NPSOL -// N: dimensions of X -// x0: parameters to maximize over -// f: value of objective function evaluated at x0 -// g: gradient vector evaluated at x0: g(j) -> df/dx_j -// nstate: can be ignored (allows for if the objective function needs -// time to initiate itself, then nstate=1 the first time it is called -//----------------------------------------------------------------------- -static void ObjFuncForModel_npsolconlin(int *mode, int *N, double *x0, double *f, double *g, int *nstate) -{ - TSdvector x0_sdv; - // - FILE *fptr_startingpoint_vec = NULL; - static int ncnt_fevals = -1; - - // printf("\n----- Entering the objective function. ------"); - // fflush(stdout); - x0_sdv.v = x0; - x0_sdv.n = *N; - x0_sdv.flag = V_DEF; - - *f = -opt_logOverallPosteriorKernal(SMODEL_PS, &x0_sdv); - if ( GLB_DISPLAY) { - printf("\nValue of objective function at the %dth evaluation: %.16e\n", ++ncnt_fevals, *f); - fflush(stdout); - } - if (*f < GLB_FVALMIN) { - //=== Resets GLB_FVALMIN at *fret_p and then prints the intermediate point to a file. - fptr_startingpoint_vec = tzFopen(filename_sp_vec_minproj,"w"); - fprintf(fptr_startingpoint_vec, "================= Output from IMSC linear constrained optimization ====================\n"); - fprintf(fptr_startingpoint_vec, "NPSOL: Value of objective miminization function at the %dth iteration: %.15f\n", ncnt_fevals, GLB_FVALMIN=*f); - fprintf(fptr_startingpoint_vec, "--------Restarting point---------\n"); - WriteVector(fptr_startingpoint_vec, &x0_sdv, " %0.16e "); - CopyVector0(XNPSOL_DV, &x0_sdv); //Saved in case the IMSL quits with a bug. - //=== Must print this results because imsl_d_min_con_gen_lin() has a bug and quits with a higher value. The printed-out results in the debug file may be used for imsl_d_min_con_nonlin() to continue. - fprintf(FPTR_DEBUG, "\nNPSOL: Value of objective miminization function at the %dth iteration: %.15f\n", ncnt_fevals, GLB_FVALMIN=*f); - fprintf(FPTR_DEBUG, "--------Restarting point---------\n"); - WriteVector(FPTR_DEBUG, &x0_sdv, " %0.16e "); - fflush(FPTR_DEBUG); - } - - // printf("\n----- Leaving the objective function. ------\n"); - // fflush(stdout); - - - // Deal with the gradient - - // printf("\n=== Entering the gradient function. ===\n"); - // fflush(stdout); - // TODO: JAKE FIX - //GLB_DISPLAY = 0; //This guarantees that the objective function printouts will not show when the gradient is computed. - gradcd_gen(g, x0, *N, ObjFuncForModel_congrad, (double *)NULL, ObjFuncForModel_congrad(x0, *N)); - - //=== Prints the intermediate gradient to a file. - // fptr_startingpoint_vec = tzFopen(filename_sp_vec_minproj,"r"); - // fprintf(fptr_startingpoint_vec, "--------Numerical gradient---------\n"); - // for (_i=0; _i<n; _i++) fprintf(fptr_startingpoint_vec, " %0.16e ", g[_i]); - // tzFclose(fptr_startingpoint_vec); - - GLB_DISPLAY = 1; - // printf("\n=== Leaving the gradient function. ===\n"); - // fflush(stdout); - - tzFclose(fptr_startingpoint_vec); - -} - -// Holder for eventual nonlinear constraints -void confun(int *mode, int *ncnln, int *n, int *ldJ, int *needc, double *x, double *c, double *cJac, int *nstate) -{ - *mode=1; -} - -//----------------------------------------------------------------------- -// Linearly-constrained IMSL minimization package. -//----------------------------------------------------------------------- -struct TSpackage_npsolconlin_tag *CreateTSpackagae_npsolconlin(const int npars_tot, const int num_lin, const int num_nlin) -{ - // n: total number of variables - // num_lin: the number of linear constraints - // num_nlin: the number of non-linear constraints - // - // General bounds again for equality lb(i) = ub(i) - // lb: n x 1 lower bound on paramters - // ub: n x 1 upper bound on paramters - // - // LINEAR BOUNDS if you want equality on an equation, set - // lin_lb(i) == lin_ub(i) - // lin_lb: (num_lin x 1) the lower bound of linear constraints - // lin_ub: (num_lin x 1) the upper bound of linear constraints - // - // NON-LINEAR BOUNDS - // nlin_lb: (num_nlin x 1) the lower bound for nonlinear constraint - // nlin_ub: (num_nlin x 1) the upper bound for nonlinear constraint - // - // A: (num_nlin x n) linear constraint matrix, with each row representing an equation - // - // - // EX: - // n = 4; - // x_1 + x_2 + x_3 >= 5 - // x_2 + 2*x_4 = 4 - // ==> - // A[0][0] = 1; - // A[0][1] = 1; - // A[0][2] = 1; - // A[1][1] = 1; - // A[1][3] = 2; - // nlin_lb[0] = 5; - // nlin_lb[1] = 4; - // nlin_ub[1] = 4; - - //=== - struct TSpackage_npsolconlin_tag *package_npsolconlin_ps = tzMalloc(1, struct TSpackage_npsolconlin_tag); - - if (npars_tot<=0) - fn_DisplayError("CreateTSpackage_npsolconlin(): make sure (1) # of equality constraints no greater than total # of constraints" - "\t and (2) number of free parameters must be greater than 0"); - package_npsolconlin_ps->n = npars_tot; - package_npsolconlin_ps->num_lin = num_lin; - package_npsolconlin_ps->num_nlin = num_nlin; - - if (num_lin<=0) - { - package_npsolconlin_ps->lin_lb = NULL; - package_npsolconlin_ps->lin_ub = NULL; - package_npsolconlin_ps->A = NULL; - } - else - { - package_npsolconlin_ps->lin_lb = CreateConstantVector_lf(num_lin, -NPSOLINF); - package_npsolconlin_ps->lin_ub = CreateConstantVector_lf(num_lin, NPSOLINF); - package_npsolconlin_ps->A = CreateConstantMatrix_lf(num_lin, npars_tot, 0); - } - if (num_nlin<=0) - { - package_npsolconlin_ps->nlin_lb = NULL; - package_npsolconlin_ps->nlin_ub = NULL; - } - else - { - package_npsolconlin_ps->nlin_lb = CreateConstantVector_lf(num_nlin, -NPSOLINF); - package_npsolconlin_ps->nlin_ub = CreateConstantVector_lf(num_nlin, NPSOLINF); - } - - // default to blank non linear constraint function - package_npsolconlin_ps->nlin_func = &confun; - - - package_npsolconlin_ps->lb = CreateConstantVector_lf(npars_tot, -NPSOLINF); - package_npsolconlin_ps->ub = CreateConstantVector_lf(npars_tot, NPSOLINF); - //- - package_npsolconlin_ps->xsaved_dv = CreateVector_lf(package_npsolconlin_ps->n); - XNPSOL_DV = CreateVector_lf(package_npsolconlin_ps->n); //Used in ObjFuncForModel_npsolconlin() to save the minimized value in case the IMSL quits with a higher value. - - package_npsolconlin_ps->crit = CRIT_NPSOLCONLIN; - package_npsolconlin_ps->itmax = ITMAX_NPSOLCONLIN; - - - return (package_npsolconlin_ps); -} -//--- -struct TSpackage_npsolconlin_tag *DestroyTSpackagae_npsolconlin(struct TSpackage_npsolconlin_tag *package_npsolconlin_ps) -{ - if (package_npsolconlin_ps) - { - DestroyVector_lf(package_npsolconlin_ps->nlin_lb); - DestroyVector_lf(package_npsolconlin_ps->nlin_ub); - DestroyVector_lf(package_npsolconlin_ps->lin_lb); - DestroyVector_lf(package_npsolconlin_ps->lin_ub); - DestroyMatrix_lf(package_npsolconlin_ps->A); - - // - DestroyVector_lf(package_npsolconlin_ps->xsaved_dv); - DestroyVector_lf(XNPSOL_DV); - - //=== - free(package_npsolconlin_ps); - return ((struct TSpackage_npsolconlin_tag *)NULL); - } - else return (package_npsolconlin_ps); -} - -static struct TStateModel_tag *SetModelGlobalForNPSOLconlin(struct TStateModel_tag *smodel_ps) -{ - //Returns the old pointer in order to preserve the previous value. - struct TStateModel_tag *tmp_ps = SMODEL_PS; - SMODEL_PS = smodel_ps; - return (tmp_ps); -} - -static void npsolconlin_SetPrintFile(char *filename) { - if (!filename) sprintf(filename_sp_vec_minproj, "outdata5npsolonlin.txt"); //Default filename. - else if (STRLEN-1 < strlen(filename)) fn_DisplayError(".../optpackage.c: the allocated length STRLEN for filename_sp_vec_minproj is too short. Must increase the string length"); - else strcpy(filename_sp_vec_minproj, filename); -} diff --git a/CFiles/optpackage.h b/CFiles/optpackage.h deleted file mode 100644 index 50d187fd7da8df10be17031d1a1199378f672aff..0000000000000000000000000000000000000000 --- a/CFiles/optpackage.h +++ /dev/null @@ -1,575 +0,0 @@ -/************ 3 steps to find minimization solution. ***************** - * See details at the bottom of this file. - * or lwz_est.c in D:\ZhaData\WorkDisk\LiuWZ\Project2_empirical\EstimationOct07 - * or ExamplesForC.prn in D:\ZhaData\CommonFiles\C_Examples_DebugTips - * - * - * 1. minpack_csminwel_ps = CreateTSminpack(); - * 2. InitializeForMinproblem(minpack_csminwel_ps, ..., indxRanIniForMin); - * //This is a local, project-specific function that initializes minpack_csminwel_ps->x_dv (note, NOT xtemp_dv) - * // according to indxStartValuesForMin. - * 3. minfinder(minpack_csminwel_ps); -/*********************************************************************/ - - -#ifndef __OPTPACKAGE_H__ -#define __OPTPACKAGE_H__ - -#include "tzmatlab.h" -#include "csminwel.h" -#include "congradmin.h" -#include "fn_filesetup.h" //fn_SetFilePosition(), etc. -#include "mathlib.h" //CopyVector0(), etc. -#include "dw_switch_opt.h" //DW's optimization routines for Markov-switching models. -#include "cstz.h" //Used for gradcd_gen() only in the IMSL linear constrainted problem. - -// ARE WE GOING TO BE USING NPSOL? -#ifdef _NPSOL_ - #define npsol npsol_ - #define npoptn npoptn_ -#endif - -//-------------- Attributes for selecting optimization packages. -------------- -#define MIN_DEFAULT 0 //0 or NULL: default or no minimization package. -#define MIN_CSMINWEL 0x0001 //1: csminwel unconstrained minimization package. -#define MIN_IMSL 0x0002 //2: IMSL unconstrained minimization package. -#define MIN_IMSL_LNCONS 0x0004 //4: IMSL linearly constrained minimization package. -#define MIN_IMSL_NLNCONS 0x0008 //8: IMSL nonlinearly constrained minimization package. -#define MIN_CONGRADI 0x0010 //16: unconstrained conjugate gradient minimization method 1. Polak-Ribiere conjugate gradient method without using derivative information in performing the line minimization. -#define MIN_CONGRADII 0x0020 //2*16=32: unconstrained conjugate gradient minimization method 2. NOT available yet! Pletcher-Reeves conjugate gradient method using derivative information in performing the line minimization. -//#define MIN_CONGRADII 0x0040 //4*16=2^6: unconstrained conjugate gradient minimization method 2. -//#define MIN_CONGRADII 0x0080 //8*16=2^7: unconstrained conjugate gradient minimization method 2. -//#define MIN_CONGRADII 0x0100 //16^2=2^8: unconstrained conjugate gradient minimization method 2. - - -//-------------- Minimization package: unconstrained BFGS csminwel. -------------- -//--- The following three macros will be void if the input data file specifies the values of these macros. -//--- The following three are used for the constant-parameter model only. -#define CRIT_CSMINWEL 1.0e-09 //1.5e-08 (for monthly TVBVAR) //Overall convergence criterion for the function value. -#define ITMAX_CSMINWEL 100000 //Maximum number of iterations. -#define INI_H_CSMINWEL 1.0e-005 //Initial value for the diagonal of inverse Hessian in the quasi-Newton search. - //1.0e-05 (sometimes used for SargentWZ USinflation project I) - //5.0e-04 (for monthly TVBAR) -//--- The following macros are used in csminwel.c. Have not got time to make them void by input values. -#define INDXNUMGRAD_CSMINWEL 2 //Index for choosing the numerical gradient. 1, forward difference; 2, central difference. - //central difference method is twice as slower as forward difference. - - -//-------------- Minimization package: linearly-nconstrained IMSL. -------------- -#define CRIT_IMSLCONLIN 1.0e-09 //Overall convergence criterion on the first-order conditions. -#define ITMAX_IMSLCONLIN 100000 //Maximum number of iterations. - - -//-------------- Minimization package: linearly-nconstrained NPSOL. -------------- -#define CRIT_NPSOLCONLIN 1.0e-09 //Overall convergence criterion on the first-order conditions. -#define ITMAX_NPSOLCONLIN 100000 //Maximum number of iterations. -#define NPSOLINF 1.0e21 -#define MAXPARAMETERS 50; -#define MAXLINCONSTRAINTS 20; - - -//-------------- Minimization package: conjugate gradient method I. -------------- -#define CRIT_CONGRAD1 1.0e-09 //Overall convergence criterion on the first-order conditions. -#define ITMAX_CONGRAD1 100000 //Maximum number of iterations. - - -//struct TSminpack_tag; - -// extern struct TSminpack_tag *MINPACK_PS; - - -//typedef void TFminfinder(struct TSminpack_tag *, const int ipackage); //If ipackage = MIN_CWMINWEL, uses csminwel; etc. -//int n, double *x_ptr, double g_ptr); //, void *mingrad_etc_ptr); -//typedef void TFmingrad_imsl(struct TSminpack_tag *); //NOT used yet. -//typedef void TFmingrad(void); //int n, double *x_ptr, double g_ptr); //, void *mingrad_etc_ptr); - -//====================================================== -// Old way of using cwminwel. No longer used in my new code. 11/01/05. -//====================================================== -//------- For unconstrained BFGS csminwel only. ------- -typedef struct TSetc_csminwel_tag { - //=== Optional input arguments (originally set up by Iskander), often or no longer NOT used, so we set to NULL at this point. - double **args; //k-by-q. - int *dims; //k-by-1; - int _k; - - //=== Mandatory input arguments. - TSdmatrix *Hx_dm; //n-by-n inverse Hessian. Output as well, when csminwel is done. - double crit; //Overall convergence criterion for the function value. - int itmax; //Maximum number of iterations. - - //=== Some reported input arguments. - double ini_h_csminwel; - int indxnumgrad_csminwel; - double gradstps_csminwel; //Step size for the numerical gradient if no analytical gradient is available. - - - //=== Output arguments. - int badg; //If (badg==0), analytical gradient is used; otherwise, numerical gradient will be produced. - int niter; //Number of iterations taken by csminwel. - int fcount; //Number of function evaluations used by csminwel. - int retcode; //Return code for the terminating condition. - // 0, normal step (converged). 1, zero gradient (converged). - // 4,2, back and forth adjustment of stepsize didn't finish. - // 3, smallest stepsize still improves too slow. 5, largest step still improves too fast. - // 6, no improvement found. -} TSetc_csminwel; - - -//============================================================= -// New ways of making optimization packages. -//============================================================= -typedef struct TSminpack_tag { - //=== Input arguments. - int package; //Minimization package or routine. - TSdvector *x_dv; //n-by-1 of estimated parameters. - TSdvector *g_dv; //n-by-1 of gradient. When no analytical gradient is provided, it returns the numerical one. - //$$$$ The x_dv and g_dv are only used minfinder(). In the wrapper function like minobj_csminwelwrap(), we must - //$$$$ use xtemp_dv and gtemp_dv to be repointed to the temporary array created in csminwel() itself. See below. - - TSdvector *xtemp_dv; //$$$$Used within the minimization problem. - TSdvector *gtemp_dv; //$$$$Used within the minimization problem. - //$$$$WARNING: Note the vector xtemp_dv->v or gtemp_dv-v itself is not allocated memory, but only the POINTER. - //$$$$ Within the minimization routine like csminwel(), the temporary array x enters as the argument in - //$$$$ the objective function to compare with other values. If we use minpack_ps->x_dv->v = x - //$$$$ in a wrapper function like minobj_csminwelwrap() where x is a temporay array in csminwel(), - //$$$$ this tempoary array (e.g., x[0] in csminwel()) within the csminwel minimization routine - //$$$$ will be freed after the csminwel minimization is done. Consequently, minpack_ps->x_dv-v, which - //$$$$ which was re-pointed to this tempoary array, will freed as well. Thus, no minimization results - //$$$$ would be stored and trying to access to minpack_ps->x_dv would cause memory leak. - //$$$$ We don't need, however, to create another temporary pointer within the objective function itself, - //$$$$ but we must use minpack_ps->xtemp_dv for a *wrapper* function instead and at the end of - //$$$$ minimization, minpack_ps->x_dv will have the value of minpack_ps->xtemp_dv, which is automatically - //$$$$ taken care of by csminwel with the lines such as - //$$$$ memcpy(xh,x[3],n*sizeof(double)); - //$$$$ where xh and minpack_ps->x_dv->v point to the same memory space. - - TSdvector *x0_dv; //n-by-1 of initial or starting values of the estimated parameters. - - - //--- Created here. Contains csminwel arguments iter, retcodeh, etc. or those that are essential to minimization package. - void *etc_package_ps; - - //--- Created outside of this structure. Including, say, csminwel input arguments such as convergence criteria - //--- or block-wise csminwel input arguments. - void *etc_project_ps; - void *(*DestroyTSetc_project)(void *); - //--- Optional. - char *filename_printout; - - //--- Minimization function for objective function. - //--- May *NOT* be needed for swithcing model because DW's switch_opt.c takes care of things. - double (*minobj)(struct TSminpack_tag *); ////From the input argument of CreateTSminpack(). - /*** This function is used only for the constant-parameter case, NOT for DW's Markov-swtiching case. ***/ - //--- Optional: Minimization function for analytical gradient. Often NOT available. - void (*mingrad)(struct TSminpack_tag *); //From the input argument of CreateTSminpack(). - - //=== Output arguments. - double fret; //Returned value of the objective function. - double fret0; //Returned value of the objective function at the initial or starting values x0. - -} TSminpack; - -typedef double TFminobj(struct TSminpack_tag *); //int n, double *x_ptr); //, void *minobj_etc_ptr); -typedef void TFmingrad(struct TSminpack_tag *); -typedef void *TFmindestroy_etcproject(void *); -typedef void TFSetPrintFile(char *); - -//======= Function prototypes. =======// -TSminpack *CreateTSminpack(TFminobj *minobj_func, void **etc_project_pps, TFmindestroy_etcproject *etcproject_func, TFmingrad *mingrad_func, char *filename_printout, const int n, const int package); -TSminpack *DestroyTSminpack(TSminpack *); - - -//=== Used for the constant-parameter model. -//--- 28/Oct/07: The function InitializeForMinproblem_const() has not been used even for the constant-parameter model. -//--- For examples, see lwz_est.c in D:\ZhaData\WorkDisk\LiuWZ\Project2_empirical\EstimationOct07 -//--- or ExamplesForC.prn under D:\ZhaData\CommonFiles\C_Examples_DebugTips. -//NOT used: void InitializeForMinproblem_const(struct TSminpack_tag *minpack_ps, char *filename_sp, TSdvector *gphi_dv, int indxStartValuesForMin); -//--- -void minfinder(TSminpack *minpack_ps); - - -//------------------------------------------------------------------------------// -//---------- New ways of making optimization packages. 03/10/06. -------// -//------------------------------------------------------------------------------// -//================ For the csminwel minimization problem. ================// -//=== Step 1. -typedef struct TSargs_blockcsminwel_tag -{ - //Arguments for blockwise minimization. - - //=== Within the block: sequence of convergence criteria. - double criterion_start; //Default: 1.0e-3; - double criterion_end; //Default: 1.0e-6; - double criterion_increment; //Default: 0.1; - int max_iterations_start; //Default: 50; Max # of iterations for csminwel. The starting value is small because criterion_start - // is coarse at the start. As the convergence criterion is getting tighter, the max # of - // iteration increases as it is multiplied by max_iterations_increment. - double max_iterations_increment; //Default: 2.0; Used to multiply the max # of iterations in csminwel as the convergence - // criterion tightens. - double ini_h_scale; //Default: 5.0e-4; 1.0e-05 (sometimes used for SargentWZ USinflation project I) - // 5.0e-04 (for monthly TVBAR) - //=== Outside the blocks. - int max_block_iterations; //Default: 100; - - //------------------------------------------------------------ - //Step size for numerical gradient only when the value of x is less than 1.0 in absolute value. - //If abs(x)>1.0, the step size is GRADSTPS_CSMINWEL*x. - // - //For the time-varying-parameter model, GRADSTPS_CSMINWEL takes the values of gradstps_csminwel_dv: - // 1st element: gradient step for the model parameters (tends to be large; the default value is 1.0e-02). - // 2nd element: gradient step for the transition probability matrix (tends to be smaller; the default value is 1.0e-03) - // 3rd element: gradient step for all the parameters (tends to be smaller; the default value is 1.0e-03 or 1.0e-04). - //For the constant-parameter model: - // GRADSTPS_CSMINWEL takes the value of gradstps_csminwel_const. The default value is 1.0e-04 (for monthly TBVAR) - //------------------------------------------------------------ - TSdvector *gradstps_csminwel_dv; //3-by-1. For the time-varying-parameter model only. - double gradstps_csminwel_const; //For the constant-parameter model. - - //--- pointer to the input data file that contains all the data on convergence, max iterations, etc. - FILE *fptr_input1; -} TSargs_blockcsminwel; -struct TSargs_blockcsminwel_tag *CreateTSargs_blockcsminwel(FILE *fptr_input1); - //If fptr_input1==NULL or no no values supplied when fptr_input1 != NULL, default values are taken. -struct TSargs_blockcsminwel_tag *DestroyTSargs_blockcsminwel(struct TSargs_blockcsminwel_tag *args_blockcsminwel_ps); -//+ -typedef struct TStateModel_tag *TFDestroyTStateModel(struct TStateModel_tag *); -typedef struct TSetc_minproj_tag -{ - //For optimization of the posterior or likelihood function. - struct TStateModel_tag *smodel_ps; - struct TStateModel_tag *(*DestroyTStateModel)(struct TStateModel_tag *); - // - struct TSargs_blockcsminwel_tag *args_blockcsminwel_ps; - struct TSargs_blockcsminwel_tag *(*DestroyTSargs_blockcsminwel)(struct TSargs_blockcsminwel_tag *); -} TSetc_minproj; -// -struct TSetc_minproj_tag *CreateTSetc_minproj(struct TStateModel_tag **smodel_pps, TFDestroyTStateModel *DestroyTStateModel_func, - struct TSargs_blockcsminwel_tag **args_blockcsminwel_pps, struct TSargs_blockcsminwel_tag *(*DestroyTSargs_blockcsminwel)(struct TSargs_blockcsminwel_tag *)); -struct TSetc_minproj_tag *DestroyTSetc_minproj(struct TSetc_minproj_tag *); -//And creates the following user's function. -//static double minneglogpost(struct TSminpack_tag *minpack_ps); //For the constant-parameter only. -//=== Step 2. Belongs to the user's responsibility because this function must be able to deal with -// (1) constant-parameter case without using DW's functions; -// (2) allowing us to generate parameters randomly, which depends on the specific model. -// See lwz_est.c in D:\ZhaData\WorkDisk\LiuWZ\Project2_empirical\EstimationOct07 -// or ExamplesForC.prn in D:\ZhaData\CommonFiles\C_Examples_DebugTips. -//--- -//void InitializeForMinproblem(struct TSminpack_tag *minpack_ps, char *filename_sp, TSdvector *gphi_dv, int indxStartValuesForMin); -//=== Step 3. -void minfinder_blockcsminwel(struct TSminpack_tag *minpack_ps, int indx_findMLE); //Blockwise minimization. - //indx_findMLE: 1: find MLE without a prior, 0: find posterior (with a prior). - - - - -//================ For IMSL multivariate linearly-constrained minimizaiton package only. ================// -typedef struct TSpackage_imslconlin_tag -{ - //=== Non-simple constraints. - int npars_tot; //Total number of free parameters for the optimaization. - //For example, model free parameters + free transition matrix parameters in the regime-switching case. - int neqs; //Number of equality constraints, excluding simple bound constraints. Must be no greater than ncons. - //IMSL dictates that equality constraints come always BEFORE inequality constrains. - int ncons; //Total number of constrains, including equality and inequality constraints, but excluding simple bounds. - TSdvector *lh_coefs_dv; //ncons*npars_tot-by-1. ALWAYS initialized to be 0.0. - //Left-hand coefficients in the linear constrains (excluding simple bounds). - //IMSL rule: lh_coefs_dv stacks the neqs rows of equality constraints first, followed by the inequality constraints. - //Set to NULL if ncons=0; - TSdvector *rh_constraints_dv; //ncons-by-1. Set to NULL if ncons=0. - //Right-hand constraints in the equality and non-equality constrains (excluding simple bounds). - - - //=== Simple bounds. - TSdvector *lowbounds_dv; //npars_tot-by-1. ALWAYS initialized to -BIGREALNUMBER for thes simple lower bounds. - //If a component is unbounded, choose a very negative large value (e.g., -BIGREALNUMBER). - TSdvector *upperbounds_dv; //npars_tot-by-1. ALWAYS initialized to +BIGREALNUMBER for thes simple lower bounds. - //If a component is unbounded, choose a very positive large value (e.g., BIGREALNUMBER). - - //=== Other output. - TSdvector *xsaved_dv; //npars_tot-by-1. Saved the parameters that give the minimal value of the objective function. - - //=== Other inputs. - double crit; //Overall convergence criterion on the first-order conditions. - int itmax; //Maximum number of iterations. -} TSpackage_imslconlin; -//+ -struct TSpackage_imslconlin_tag *CreateTSpackagae_imslconlin(const int npars_tot, const int neqs, const int ncons); -struct TSpackage_imslconlin_tag *DestroyTSpackagae_imslconlin(struct TSpackage_imslconlin_tag *package_imslconlin_ps); -void minfinder_noblockimslconlin(struct TSpackage_imslconlin_tag *package_imslconlin_ps, struct TSminpack_tag *minpack_ps, char *filename_printout, int ntheta); - - - - - -//================ For conjugate gradient method I only. ================// -typedef struct TSpackage_congrad1_tag -{ - //=== Input arguments. - double crit; //Overall convergence criterion on the function value. - int itmax; //Maximum number of iterations. - - //=== Output arguments. - int niters; //Number of iterations. -} TSpackage_congrad1; -//+ -struct TSpackage_congrad1_tag *CreateTSpackage_congrad1(void); -struct TSpackage_congrad1_tag *DestroyTSpackage_congrad1(struct TSpackage_congrad1_tag *package_congrad1_ps); - - - - -/** -//------- For unconstrained BFGS csminwel only. ------- -typedef struct TSminpack_csminwel_tag { - //=== Optional input arguments, often NOT used, so we set to NULL at this point. - double **args; //k-by-q. - int *dims; //k-by-1; - int _k; - - //=== Mandatory input arguments. - TSdmatrix *Hx_dm; //n-by-n inverse Hessian. Output as well, when csminwel is done. - double crit; //Overall convergence criterion for the function value. - int itmax; //Maximum number of iterations. -// double grdh; //Step size for the numerical gradient if no analytical gradient is available. - - //=== Initial input arguments. - double ini_h_csminwel; - int indxnumgrad_csminwel; - double gradstps_csminwel; - - - //=== Output arguments. - int badg; //If (badg==0), analytical gradient is used; otherwise, numerical gradient will be produced. - int niter; //Number of iterations taken by csminwel. - int fcount; //Number of function evaluations used by csminwel. - int retcode; //Return code for the terminating condition. - // 0, normal step (converged). 1, zero gradient (converged). - // 4,2, back and forth adjustment of stepsize didn't finish. - // 3, smallest stepsize still improves too slow. 5, largest step still improves too fast. - // 6, no improvement found. -} TSminpack_csminwel; -/**/ - - - -//================ For NPSOL multivariate linearly-constrained minimizaiton package only. ================// -//----------------------------------------------------------------------- -// Using Linearly-constrained NPSOL minimization package. -// Added: 4/21/10 - Jake Smith -//----------------------------------------------------------------------- - -typedef struct TSpackage_npsolconlin_tag -{ - // n: total number of variables - // nlin: the number of linear constraints - // nclin: the number of non-linear constraints - // - // General bounds again for equality lb(i) = ub(i) - // lb: n x 1 lower bound on paramters - // ub: n x 1 upper bound on paramters - // - // LINEAR BOUNDS if you want equality on an equation, set - // nlin_lb(i) == nlin_ub(i) - // nlin_lb: (nlin x 1) the lower bound of linear constraints - // nlin_ub: (nlin x 1) the upper bound of linear constraints - // - // NON-LINEAR BOUNDS - // nclin_lb: (nclin x 1) the lower bound for nonlinear constraint - // nclin_ub: (nclin x 1) the upper bound for nonlinear constraint - // - // A: (nclin x n) linear constraint matrix, with each row representing an equation - - int n; //Total number of free parameters for the optimaization. - //For example, model free parameters + free transition matrix parameters in the regime-switching case. - int num_lin; //the number of linear constraints - int num_nlin; //the number of non-linear constraints - - TSdmatrix *A; //(nclin x n) linear constraint matrix, with each row representing an equation - - TSdvector *lb; // lb: n x 1 lower bound on paramters - TSdvector *ub; // ub: n x 1 upper bound on paramters - // - // LINEAR BOUNDS if you want equality on an equation, set - // lin_lb(i) == lin_ub(i) - TSdvector *lin_lb; // nlin_lb: (nlin x 1) the lower bound of linear constraints - TSdvector *lin_ub; // nlin_ub: (nlin x 1) the upper bound of linear constraints - // - // NON-LINEAR BOUNDS - TSdvector *nlin_lb; // nclin_lb: (nclin x 1) the lower bound for nonlinear constraint - TSdvector *nlin_ub; // nclin_ub: (nclin x 1) the upper bound for nonlinear constraint - - //=== Other output. - TSdvector *xsaved_dv; //npars_tot-by-1. Saved the parameters that give the minimal value of the objective function. - - // NONLINEAR CONSTRAINT FUNCTION - void *nlin_func; - - //=== Other inputs. - double crit; //Overall convergence criterion on the first-order conditions. - int itmax; //Maximum number of iterations. -} TSpackage_npsolconlin; -//+ -struct TSpackage_npsolconlin_tag *CreateTSpackagae_npsolconlin(const int npars_tot, const int neqs, const int ncons); -struct TSpackage_npsolconlin_tag *DestroyTSpackagae_npsolconlin(struct TSpackage_npsolconlin_tag *package_npsolconlin_ps); - -void minfinder_noblocknpsolconlin(struct TSpackage_npsolconlin_tag *package_npsolconlin_ps, struct TSminpack_tag *minpack_ps, char *filename_printout, int ntheta); -static void ObjFuncForModel_npsolconlin(int *mode, int *N, double *x, double *f, double *g, int *nstate); - - -#endif - - -/*************** 3 steps to find minimization solution. ***************** -//--------------------------------- -//-- For concrete examples, see -//-- lwz_est.c in D:\ZhaData\WorkDisk\LiuWZ\Project2_empirical\EstimationOct07 -//-- ExamplesForC.prn in D:\ZhaData\CommonFiles\C_Examples_DebugTips -//--------------------------------- - -//------ For the csminwel minimization problem. ------- -//--- Step 1. Creats a number of csminwel structures for both Markov-switching and constant-parameter models. -static double minobj(struct TSminpack_tag *minpack_ps); //This function is for the constant-parameter model only. -//--- Step 2. -static void InitializeForMinproblem(struct TSminpack_tag *minpack_ps, char *filename_sp); -//--- Step 3. -//For the constant-parameter model, run minfinder(minpack_ps); //Constant-parameter case. -//For the regime-switching model, run minfinder_blockcsminwel(minpack_ps); //Time-varying case. - * - * - * - - -//=== main.c - -int indxInitializeTransitionMatrix; -//--- My model structure. -struct TSlwzmodel_tag *lwzmodel_ps = NULL; -//--- Waggoner's Markov switching package. -struct TMarkovStateVariable_tag *sv_ps = NULL; -ThetaRoutines *sroutines_ps = NULL; -struct TStateModel_tag *smodel_ps = NULL; -//--- General (csminwel) minimization for constant-parameter. -struct TSetc_minproj_tag *etc_minproj_ps = NULL; -struct TSminpack_tag *minpack_ps = NULL; -//--- Blockwise (csminwel) minimization for regime-switching model. -struct TSargs_blockcsminwel_tag *args_blockcsminwel_ps = NULL; - - -//----------------- -// Reads from the command line the user-specified input file and the most-often-used integer arguments such as sample size. -//----------------- -cl_modeltag = fn_ParseCommandLine_String(n_arg,args_cl,'t',(char *)NULL); // Tag for different models. -if (!cl_modeltag) fn_DisplayError(".../main(): No model tag is specified yet"); -//--- Type of the model: (0) const, (1) varionly, (2) trendinf, (3) policyonly, and (4) firmspolicy. -if (!strncmp("const", cl_modeltag, 5)) indx_tvmodel = 0; -else if (!strncmp("varionly", cl_modeltag, 5)) indx_tvmodel = 1; -else if (!strncmp("trendinf", cl_modeltag, 5)) indx_tvmodel = 2; -else if (!strncmp("policyonly", cl_modeltag, 5)) indx_tvmodel = 3; -else if (!strncmp("firmspolicy", cl_modeltag, 5)) indx_tvmodel = 4; -else fn_DisplayError("main(): the model tag is NOT properly selected"); -indxStartValuesForMin = fn_ParseCommandLine_Integer(n_arg,args_cl,'c',1); -sprintf(filename_sp_vec_minproj, "outdatasp_min_%s.prn", cl_modeltag); -//+ -sprintf(filenamebuffer, "dataraw.prn"); -cl_filename_rawdata = fn_ParseCommandLine_String(n_arg,args_cl,'r',filenamebuffer); //Raw data input file. -fptr_rawdata = tzFopen(cl_filename_rawdata,"r"); -//+ -sprintf(filenamebuffer, "datainp_common.prn"); -cl_filename_input1 = fn_ParseCommandLine_String(n_arg,args_cl,'i',filenamebuffer); //Common setup input data file. -fptr_input1 = tzFopen(cl_filename_input1,"r"); -//+ -sprintf(filenamebuffer, "datainp_%s.prn", cl_modeltag); -cl_filename_input2 = fn_ParseCommandLine_String(n_arg,args_cl,'s',filenamebuffer); //Model-specific setupt input data file. -fptr_input2 = tzFopen(cl_filename_input2,"r"); -//+ -sprintf(filenamebuffer, "datainp_markov_%s.prn", cl_modeltag); -cl_filename_markov = fn_ParseCommandLine_String(n_arg,args_cl,'m',filenamebuffer); //Markov-switching setup input data file. -fptr_markov = tzFopen(cl_filename_markov,"r"); -//--- Output data files. -sprintf(filenamebuffer, "outdata_debug_%s.prn", cl_modeltag); -FPTR_DEBUG = tzFopen(filenamebuffer,"w"); //Debug output file. -//+ -sprintf(filenamebuffer, "outdataout_%s.prn", cl_modeltag); -fptr_output = tzFopen(filenamebuffer,"w"); //Final output file. -//+ -sprintf(filenamebuffer, "outdatainp_matlab_%s.prn", cl_modeltag); -fptr_matlab = tzFopen(filenamebuffer, "w"); -//+ -sprintf(filenamebuffer, "outdatainp_matlab1_%s.prn", cl_modeltag); -fptr_matlab1 = tzFopen(filenamebuffer, "w"); -//+ -sprintf(filenamebuffer, "outdatainp_matlab2_%s.prn", cl_modeltag); -fptr_matlab2 = tzFopen(filenamebuffer, "w"); -//+ -sprintf(filenamebuffer, "outdatainp_matlab3_%s.prn", cl_modeltag); -fptr_matlab3 = tzFopen(filenamebuffer, "w"); - - -//---------------------------------------------- -//--- Memory allocation and structure creation. -//--- The order matters! -//---------------------------------------------- -//--- Model structure. --- -lwzmodel_ps = CreateTSlwzmodel(fptr_rawdata, fptr_input1, fptr_input2, fptr_markov, indx_tvmodel, indxStartValuesForMin); -sprintf(lwzmodel_ps->tag_modeltype_cv->v, cl_modeltag); -lwzmodel_ps->tag_modeltype_cv->flag = V_DEF; - - -//====== Waggoner's Markov switching variables. ====== -sv_ps = CreateMarkovStateVariable_File(fptr_markov, (char *)NULL, lwzmodel_ps->fss); - //In this case, fptr_markov points to datainp_markov_const.prn, which can be found in D:\ZhaData\CommonFiles\C_Examples_DebugTips\DW_MarkovInputFiles. -sroutines_ps = CreateThetaRoutines_empty(); -sroutines_ps->pLogConditionalLikelihood = logTimetCondLH; //User's: logTimetCondLH -sroutines_ps->pLogPrior = logpriordensity_usingDW; //User's: pLogPrior -sroutines_ps->pNumberFreeParametersTheta = NumberOfFreeModelSpecificParameters; //User's: NumberOfFreeModelSpecificParameters, -sroutines_ps->pConvertFreeParametersToTheta = ConvertFreeParameters2ModelSpecificParameters; //User's: ConvertFreeParameters2ModelSpecificParameters, -sroutines_ps->pConvertThetaToFreeParameters = ConvertModelSpecificParameters2FreeParameters; //User's: ConvertModelSpecificParameters2FreeParameters, -sroutines_ps->pThetaChanged = tz_thetaChanged; //User's: Notification routine (need to refresh everything given new parameters?) -sroutines_ps->pTransitionMatrixChanged = tz_TransitionMatrixChanged; //User's: Notification routine (need to refresh everything given new parameters?) -smodel_ps = CreateStateModel_new(sv_ps, sroutines_ps, (void *)lwzmodel_ps); -//--- Optional. -if (!indx_tvmodel && fn_SetFilePosition(fptr_markov, "//== indxInitializeTransitionMatrix ==//")) - if ((fscanf(fptr_markov, " %d ", &indxInitializeTransitionMatrix) == 1) && indxInitializeTransitionMatrix) - ReadTransitionMatrices(fptr_markov, (char*)NULL, "Initial: ", smodel_ps); //Waggoner's function. - - -//--- Minimization problem: Step 1. --- -args_blockcsminwel_ps = CreateTSargs_blockcsminwel(fptr_input1); - //Blockwise (csminwel) minimization arguments, reading convergence criteria or using default values if fptr_input1 is set to NULL. - //fptr_input1 contains parameters for both constant-parameter and Markov-switching models. -etc_minproj_ps = CreateTSetc_minproj(&smodel_ps, (TFDestroyTStateModel *)NULL, &args_blockcsminwel_ps, DestroyTSargs_blockcsminwel); - //Taking convergence criteria and my model structure smodel_ps into minpack_ps. -minpack_ps = CreateTSminpack((TFminobj *)minobj, (void **)&etc_minproj_ps, (TFmindestroy_etcproject *)NULL, (TFmingrad *)NULL, - filename_sp_vec_minproj, - lwzmodel_ps->xphi_dv->n+NumberFreeParametersQ(smodel_ps), - MIN_CSMINWEL); - //minobj is for the constant-parameter model only in which case, NumberFreeParametersQ(smodel_ps) will be 0. - - -//----------------- -// Main matter. -//----------------- -time(&lwzmodel_ps->prog_begtime); //Beginning time of the whole program. -InitializeGlobleSeed(lwzmodel_ps->randomseed = 0); //2764 If seednumber==0, a value is computed using the system clock. -csminwel_randomseedChanged(lwzmodel_ps->randomseed); //Using the same (or different) seednumber to reset csminwel seednumber for random perturbation. -//=== Finding the peak value of the logLH or logPosterior -if (lwzmodel_ps->indxEstFinder) -{ - //Minimization problem: Steps 2 and 3. - - InitializeForMinproblem(minpack_ps, filename_sp_vec_minproj); //Initialization for minimization. - //======= 1st round of minimization. ======= - //-------------------------- - //-- csminwel minimization where - //-- minpack_ps->x_dv contains the minimizing vector of parameters. - //-- minpack_ps->fret contains the minimized value. - //-------------------------- - - if (!lwzmodel_ps->indx_tvmodel) minfinder(minpack_ps); //Constant-parameter case. - else minfinder_blockcsminwel(minpack_ps); //Time-varying case. -} -else InitializeForMinproblem(minpack_ps, filename_sp_vec_minproj); -time(&lwzmodel_ps->prog_endtime); //Ending time of the whole program. -/*************************************************************************/ - diff --git a/CFiles/rand.c b/CFiles/rand.c deleted file mode 100644 index 03d08db9f4ff01cc219237fe38e9fa0da7bcec46..0000000000000000000000000000000000000000 --- a/CFiles/rand.c +++ /dev/null @@ -1,537 +0,0 @@ - -#include "rand.h" - - -//========================================================== -// I. My own library -//========================================================== -static long idum=-1; - -long initialize_generator(long init) { - //=== init can be a positive or negative integer. - if (init > 0) - idum=-init; - else - if (init < 0) - idum=init; - else // when init=0. - idum=-(long)time((time_t *)NULL); - return idum; -} - - - -/* - Returns a uniform variate, adapted from Numerical Recipes in C - (C) Copr. 1986-92 Numerical Recipes Software $=|''1`2. - Ran2() in Numerical Recipes in C. The cycle period is - about 2.3*10^18 -- practically infinite. -*/ -#define IM1 2147483563 -#define IM2 2147483399 -#define AM (1.0/IM1) -#define IMM1 (IM1-1) -#define IA1 40014 -#define IA2 40692 -#define IQ1 53668 -#define IQ2 52774 -#define IR1 12211 -#define IR2 3791 -#define NTAB 32 -#define NDIV (1+IMM1/NTAB) -#define EPS 1.2e-7 -#define RNMX (1.0-EPS) - -double unirnd(void) -{ - int j; - long k; - static long idum2=123456789; - static long iy=0; - static long iv[NTAB]; - double temp; - - if (idum <= 0) { - if (-(idum) < 1) idum=1; - else idum = -(idum); - idum2=(idum); - for (j=NTAB+7;j>=0;j--) { - k=(idum)/IQ1; - idum=IA1*(idum-k*IQ1)-k*IR1; - if (idum < 0) idum += IM1; - if (j < NTAB) iv[j] = idum; - } - iy=iv[0]; - } - k=(idum)/IQ1; - idum=IA1*(idum-k*IQ1)-k*IR1; - if (idum < 0) idum += IM1; - k=idum2/IQ2; - idum2=IA2*(idum2-k*IQ2)-k*IR2; - if (idum2 < 0) idum2 += IM2; - j=iy/NDIV; - iy=iv[j]-idum2; - iv[j] = idum; - if (iy < 1) iy += IMM1; - if ((temp=AM*iy) > RNMX) return RNMX; - else return temp; -} -#undef IM1 -#undef IM2 -#undef AM -#undef IMM1 -#undef IA1 -#undef IA2 -#undef IQ1 -#undef IQ2 -#undef IR1 -#undef IR2 -#undef NTAB -#undef NDIV -#undef EPS -#undef RNMX - - -/* - Returns a standard gaussian variate. The density function for the - standard gaussian is - - 1 - ----------- exp(-0.5*x^2) - sqrt(2*Pi) - -*/ -double gaussrnd(void) -{ - static long iset=0; - static double gset; - double fac,r,v1,v2; - - if (iset == 0) - { - do - { - v1=(double)(2.0*unirnd()-1.0); - v2=(double)(2.0*unirnd()-1.0); - r=v1*v1+v2*v2; - } - while (r >= 1.0); - fac=(double)sqrt(-2.0*log(r)/r); - gset=v1*fac; - iset=1; - return v2*fac; - } - else - { - iset=0; - return gset; - } -} - -/* - Returns a standard gamma variate. The density function for a standard gamma - distribution is - - 1 - p(x) = --------- x^(a-1) exp(-x). - gamma(a) - - where a>0 and gamma denotes the gamma function, which is defined as the - integral with respect to t from 0 to infinity of exp(-t)*t^(z-1). - - When a==1.0, then gamma is exponential. (Devroye, page 405). - When a<1.0, Johnk's generator (Devroye, page 418). - When a>1.0, a rejection method or Best's algorithm (Devroye, page 410). - - A general gamma variate can be obtained as follows. Let z=x/b. Then, - z is drawn from a general gamma distribution whose density is - - b^a - p(z) = ---------- z^(a-1) exp(-b*z). - gamma(a) - - This density is the same as Matlab where b is an inverse scale parameter (same - as Gelman's book but different from Matlab). - - Uses algorithm translated by Iskander Karibzhanov from the Matlab function - gamrnd.m, which follows Johnk's generator in Devroye ("Non-Uniform Random - Variate Generation", Springer-Verlag, 1986, page 418). -*/ -double gammrnd(double a) { - double b = a-1.0, - u, v, w, x, y, z; - - if (a <= 0.0) - { - //** When used with a C MEX-file for MATLAB. - printf("\nThe input argument x for gammrnd(x) in rand.c must be a positive double."); - - //@ When used entirely with C. - getchar(); - exit(1); // This exits the entire C program. - } - if (a==1.0) - return -log(unirnd()); - if (a < 1.0) { - for (;;) { - x = pow(unirnd(), 1.0/a), - y = pow(unirnd(), 1.0/(1.0-a)); - if (x+y <= 1.0) - return -log(unirnd())*x/(x+y); - } - } - else { - for (;;) { - u = unirnd(); - v = unirnd(); - w = u*(1.0-u); - y = sqrt((3.0*a-0.75)/w)*(u-0.5); - x = b+y; - if (x >= 0.0) { - z = 64.0*w*w*w*v*v; - if (z <= (1.0-2.0*y*y/x)) - return x; - else if (log(z) <= (2.0*(b*log(x/b)-y))) - return x; - } - } - } -} - - -/* - Returns a random draw from beta(a,b). The density function is - - gamma(a+b) - p(x) = ------------------- x^(a-1) (1-x)^(b-1). - gamma(a)*gamma(b) - - where a>0, b>0 and gamma denotes the gamma function, which is defined as - the integral with respect to t from 0 to infinity of exp(-t)*t^(z-1). -*/ -double betarnd(double a, double b) -{ - double xa=2.0*gammrnd(a), - xb=2.0*gammrnd(b); - - return (xa/(xa+xb)); -} - - -/* - Returns the integral from -infinity to x of 1/sqrt(2*PI)*exp(-y^2/2). - Routine adapted from Numerical Recipes in C. -*/ -double cumulative_normal(double x) -{ - double z=fabs(0.7071067811865*x), t=2.0/(2.0+z); - - return (x > 0) ? - 1.0-0.5*t*exp(-z*z-1.26551223+t*(1.00002368+t*(0.37409196+ - t*(0.09678418+t*(-0.18628806+t*(0.27886807+t*(-1.13520398+ - t*(1.48851587+t*(-0.82215223+t*0.17087277))))))))) - : - 0.5*t*exp(-z*z-1.26551223+t*(1.00002368+t*(0.37409196+ - t*(0.09678418+t*(-0.18628806+t*(0.27886807+t*(-1.13520398+ - t*(1.48851587+t*(-0.82215223+t*0.17087277))))))))); - -} - - - -//========================================================== -// II. IMSL Library -//========================================================== -void InitializeGlobleSeed(int seednumber) { - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - imsls_random_option( 7 ); //Selects a random number generator from 1 to 7. When 7, the GFSR algorithm is used. - imsls_random_seed_set( seednumber ); //Initializes a random seed from 0 to 2147483646 inclusive. - //If seednumber==0, a value is computed using the system clock. - #else //Default to CASE2_RANDOMNUMBERGENERATOR: imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - initialize_generator(seednumber); //If seednumber==0, a value is computed using the system clock. - #endif -} - -#ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. -//**** WARNING:**** DO NOT allocate memory to itable outside this function. -int GetSeedTableGFSR_IMSL(int **ads_itable) -{ - //Output: - // iseed: seednumber; - // ads_itable: the address of itable where itable is seed table with pointer being set, whose memory is allocated by the IMSL, so do NOT allocate memory to itable outside this function. - //Input: itable, just a pointer and NO memory shall be allocated outside this function -- the IMSL will take care of it. - int iseed; - - iseed = imsls_random_seed_get(); - imsls_random_GFSR_table_get(ads_itable, 0); - - return (iseed); -} -// -void SetSeedTableGFSR_IMSL(int iseed, int *itable) -{ - //Input (also becomes output): - // iseed: seednumber; - // itable: seed table with pointer being set, whose memory is allocated by the IMSL, so do NOT allocate memory to itable outside this function. - imsls_random_seed_set(iseed); - imsls_random_GFSR_table_set(itable); -} -#endif - -double UniformDouble(void) { - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - double x; - imsls_d_random_uniform(1, IMSLS_RETURN_USER, &x, 0); - return x; - #else //Default to CASE2_RANDOMNUMBERGENERATOR: imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - return unirnd(); - #endif -} - -double StandardNormalDouble(void) { - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - double x; - imsls_d_random_normal(1, IMSLS_RETURN_USER, &x, 0); - return x; - #else CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - return gaussrnd(); - #endif -} - -double NormalDouble(double m, double s) -{ - //m: mean; - //s: standard deviation. - - return (m+s*StandardNormalDouble()); -} - -double LogNormalDouble(double mean, double std) -{ - //Return x where log(x) is normal(mean, std^2). - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - double x; - imsls_d_random_lognormal(1, mean, std, IMSLS_RETURN_USER, &x, 0); - return x; - #else CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - fn_DisplayError(".../rand.c/LogNormalDouble(): NO defaul available for log normal draws"); - return (0); - #endif -} - - -double GammaDouble(const double a, const double b) { - //The probability density of x is of the form: ( x^(a-1) exp(-bx) )/( b^a /Gamma(a) ). - //The same form as in the Gelman et al's (not MATLAB) notation. - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - double x; - imsls_d_random_gamma(1, a, IMSLS_RETURN_USER, &x, 0); - if (b != 1.0) x /= b; - return x; - #else CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - return ( (b==1.0) ? gammrnd(a) : gammrnd(a)/b ); - #endif -} - -double InverseGammaDouble(const double a, const double b) -{ - //p(x) = ( b^a/Gamma(a) ) x^(-a-1) exp(-b/x) for a>0 and b>0. - // where a is shape and b is scale parameter. - //E(x) = b/(a-1) for a>1; var(x) = b^2/( (a-1)^2*(a-2) ) for a>2; - //Noninformative distribution: a,b -> 0. - //How to draw: (1) draw z from Gamma(a,b); (2) let x=1/z. - - return (1.0/GammaDouble(a,b)); -} - - -void UniformVector(TSdvector *x_dv) -{ - #if !defined( IMSL_RANDOMNUMBERGENERATOR ) //Default to CASE2_RANDOMNUMBERGENERATOR: imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - int _i; - double *v; - #endif - - - if ( !x_dv ) fn_DisplayError(".../rand.c/UniformVector(): Input vector must be created (memory-allocated)"); - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - imsls_d_random_uniform(x_dv->n, IMSLS_RETURN_USER, x_dv->v, 0); - x_dv->flag = V_DEF; - #else //CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - v = x_dv->v; - for (_i=x_dv->n-1; _i>=0; _i--) v[_i] = unirnd(); - x_dv->flag = V_DEF; - #endif -} - -void StandardNormalVector(TSdvector *x_dv) { - #if !defined( IMSL_RANDOMNUMBERGENERATOR ) //Default to CASE2_RANDOMNUMBERGENERATOR: imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - int _i; - #endif - double *v; - - if ( !x_dv ) fn_DisplayError(".../rand.c/StandardNormalVector(): Input vector must be created (memory-allocated)"); - else v = x_dv->v; - - #if defined (IMSL_RANDOMNUMBERGENERATOR) // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - imsls_d_random_normal(x_dv->n, IMSLS_RETURN_USER, v, 0); - x_dv->flag = V_DEF; - #else //Default to CASE2_RANDOMNUMBERGENERATOR, imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - for (_i=x_dv->n-1; _i>=0; _i--) v[_i] = gaussrnd(); - x_dv->flag = V_DEF; - #endif -} - - -void StandardNormalMatrix(TSdmatrix *X_dm) { - #ifndef IMSL_RANDOMNUMBERGENERATOR //Default to the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - int _i; - #endif - double *M; - - if ( !X_dm ) fn_DisplayError(".../rand.c/StandardNormalMatrix(): Input matrix must be created (memory-allocated)"); - M = X_dm->M; - - #if defined (IMSL_RANDOMNUMBERGENERATOR) // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - imsls_d_random_normal(X_dm->nrows*X_dm->ncols, IMSLS_RETURN_USER, M, 0); - X_dm->flag = M_GE; - #else //Default to CASE2_RANDOMNUMBERGENERATOR, imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - for (_i=X_dm->nrows*X_dm->ncols-1; _i>=0; _i--) M[_i] = gaussrnd(); - X_dm->flag = M_GE; - #endif -} - - -void GammaMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm) { - //The probability density of each element of X_dm is of the form: ( x^(a-1) exp(-x/b) )/( Gamma(a) * b^a ). - //The same form as in the MATLAB (not Gelman et al's) notation. - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - int _i, nels, nrows, ncols; - double *X, *A, *B, a, b; - - if ( !X_dm || !A_dm || !B_dm ) fn_DisplayError(".../rand.c/GammaMatrix(): All input matrices must be created (memory-allocated)"); - else if ( !A_dm->flag || !B_dm->flag ) fn_DisplayError(".../rand.c/GammaMatrix(): Two R input matrices must be given values"); - else { - nrows = X_dm->nrows; - ncols = X_dm->ncols; - nels = nrows*ncols; - X = X_dm->M; - A = A_dm->M; - B = B_dm->M; - } - - if ( (nrows != A_dm->nrows) || (nrows != B_dm->nrows) || (ncols != A_dm->ncols) || (ncols != B_dm->ncols) ) - fn_DisplayError(".../rand.c/GammaMatrix(): Dimensions of all input matrices must match"); - - - if ( A_dm->flag & M_CN ) { - imsls_d_random_gamma(nels, a=A[0], IMSLS_RETURN_USER, X, 0); //Same for all elements of A_dm->M. - if ( B_dm->flag & M_CN ) { - if ( !((b = B[0])==1.0) ) cblas_dscal(nels, b, X, 1); //Same for all elements of B_dm->M. - } - else { - for (_i=nels-1; _i>=0; _i--) X[_i] *= B[_i]; - } - } - else { - for (_i=nels-1; _i>=0; _i--) { - if (A[_i]!=0) //Added 02/23/05. To take account of exclusion restrictions. - { - imsls_d_random_gamma(1, A[_i], IMSLS_RETURN_USER, &X[_i], 0); - X[_i] *= B[_i]; - } - else - X[_i] = 0.0; - } - } - - X_dm->flag = M_GE; - #else CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - int _i, nels, nrows, ncols; - double *X, *A, *B; - - if ( !X_dm || !A_dm || !B_dm ) fn_DisplayError(".../rand.c/GammaMatrix(): All input matrices must be created (memory-allocated)"); - else if ( !A_dm->flag || !B_dm->flag ) fn_DisplayError(".../rand.c/GammaMatrix(): Two R input matrices must be given values"); - else { - nrows = X_dm->nrows; - ncols = X_dm->ncols; - nels = nrows*ncols; - X = X_dm->M; - A = A_dm->M; - B = B_dm->M; - } - - if ( (nrows != A_dm->nrows) || (nrows != B_dm->nrows) || (ncols != A_dm->ncols) || (ncols != B_dm->ncols) ) - fn_DisplayError(".../rand.c/GammaMatrix(): Dimensions of all input matrices must match"); - - for (_i=nels-1; _i>=0; _i--) - if (A[_i]!=0) //Added 02/23/05. To take account of exclusion restrictions. - X[_i] = B[_i]*gammrnd(A[_i]); - else - X[_i] = 0.0; - X_dm->flag = M_GE; - #endif -} - - -double ChisquareDouble(const double v) { - //The probability density of x is of the form: ( x^(v/2-1) exp(-x/2) )/( Gamma(v/2) * 2^(v/2) ). - //= GammaDouble(v/2.0, 2.0). - #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. - //The GFSR algorithm to generate random numbers. - double x; - imsls_d_random_chi_squared(1, v, IMSLS_RETURN_USER, &x, 0); - return x; - #else CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. - return ( 2.0*gammrnd(0.5*v) ); - #endif -} - - - -//-------------------------------------- -int tz_DrawState(TSdvector *qs_dv) -{ - //Randomly generate states, given the probabilties qs_dv where sum(qs_dv)=1. - //Output: sindx is 0, 1, ..., or nStates, randomly drawn according the uniform distribution. - // - //Users are responsible to make sure sum(qs_dv)=1. - int si, sindx, nStates=qs_dv->n; - double tmpd1, tmpd2; - double *v=qs_dv->v; - - if ( (tmpd2=UniformDouble()) <= v[0] ) sindx = 0; - else { - tmpd1 = v[0]; // Cumulative sum of qs_dv. - for (si=1; si<nStates; si++) { - if ( tmpd2 <= (tmpd1 += v[si]) ) { - sindx = si; - break; - } - } - if (tmpd2 > tmpd1) fn_DisplayError(".../rand.c/tz_DrawState(): the sum of probabilities must be 1.0"); - } - - return( sindx ); -} - - -/** -//void UniformDouble(double *x) { -// #ifdef IMSL_RANDOMNUMBERGENERATOR // IMSL optimization routines. -// //The GFSR algorithm to generate random numbers. -// imsls_d_random_uniform(1, IMSLS_RETURN_USER, x, 0); -// #endif -// #ifdef CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- Case 2 and my own (Iskander) code for generating a gamma distribution. -// *x = unirnd(); -// #endif -//} -/**/ diff --git a/CFiles/rand.h b/CFiles/rand.h deleted file mode 100755 index 01c3ab08d0063c403420678cd200eec41274f9f3..0000000000000000000000000000000000000000 --- a/CFiles/rand.h +++ /dev/null @@ -1,47 +0,0 @@ - -#ifndef __RANDOM__ -#define __RANDOM__ - #include "tzmatlab.h" // Only when used with the MATLAB interface in gammrnd(). - - #include <time.h> - - //========================================================== - // I. My own library - //========================================================== -// long initialize_generator(long init); - long initialize_generator(long init); - double unirnd(void); - double gaussrnd(void); - double gammrnd(double a); - double betarnd(double a, double b); - double cumulative_normal(double x); - - - - //========================================================== - // II. IMSL Library - //========================================================== -// #define SetGlobleSeed(seed) imsls_random_seed_set( seed ) -// //Initializes a random seed for the IMSL random number generator. -// //seed: an integer number from 0 to 2147483646 inclusive. If seed==0, a value is computed using the system clock. -// #define SetGenerator(indicator) imsls_random_option( indicator ) -// //Select a random number generator from the IMSL. -// //indicator: an integer number from 1 to 7. If indicator==7, the GFSR algorithm is used. - - void InitializeGlobleSeed(int seednumber); //If seednumber==0, a value is computed using the system clock. - int GetSeedTableGFSR_IMSL(int **itable); - void SetSeedTableGFSR_IMSL(int iseed, int *itable); - double UniformDouble(void); - double StandardNormalDouble(void); - double NormalDouble(double m, double s); - double LogNormalDouble(double mean, double std); - double GammaDouble(const double a, const double b); - double InverseGammaDouble(const double a, const double b); - double ChisquareDouble(const double v); - void UniformVector(TSdvector *x_dv); - void StandardNormalVector(TSdvector *x_dv); - void StandardNormalMatrix(TSdmatrix *X_dm); - void GammaMatrix(TSdmatrix *X_dm, TSdmatrix *A_dm, TSdmatrix *B_dm); - //------------ - int tz_DrawState(TSdvector *qs_dv); -#endif diff --git a/CFiles/tzmatlab.c b/CFiles/tzmatlab.c deleted file mode 100644 index 299daea904ff1e9a922e236b8c0478fa67f319fb..0000000000000000000000000000000000000000 --- a/CFiles/tzmatlab.c +++ /dev/null @@ -1,837 +0,0 @@ -/** Example: - #if defined (USE_DEBUG_FILE) - fprintf(FPTR_DEBUG, "\nWARNING: .../mathlib.c/TransposeSquare(): the matrix is already both SU and SL, so there is no need to transpose.\n"); - fflush(FPTR_DEBUG); - #else - fprintf(stdout, "\nWARNING: .../mathlib.c/TransposeSquare(): the matrix is already both SU and SL, so there is no need to transpose.\n"); - fflush(stdout); - #endif -/**/ - - -#include "tzmatlab_dw.h" - - -FILE *FPTR_DEBUG = (FILE *)NULL; //Debug output file, to be opened by main.c. -FILE *FPTR_OPT = (FILE *)NULL; //Optimization output file, to be opened by main.c. - -//----------------- -// Some high-level functions. -//----------------- -int fn_locofyearqm(int q_m, int yrstart, int qmstart, int yrend, int qmend) -{ - //Returns the (base 0) location of a specified year and month (quarter) for the time series. - //All the other inputs take the usual (base-1) numbers. For example, yrstart = 1960 means the year 1960. - int tmpi, loc; - - if ( q_m != 12 ) - if ( q_m != 4 ) fn_DisplayError(".../tzmatlab.c/fn_locofyearqm(): This function only works for monthly or quarterly data"); - - if ( (qmstart>q_m) || (qmend>q_m) ) - fn_DisplayError(".../tzmatlab.c/fn_locofyearqm(): quarters must be no greater than 4 and months must be no greater than 12"); - - if ( (tmpi=yrend - yrstart) < 0 ) - fn_DisplayError(".../cstz.c/fn_locofyearqm(): the end year must be greater than or equal to the start year"); - else if ( (loc = (tmpi==0) ? qmend-qmstart : tmpi*q_m+qmend-qmstart) < 0 ) - fn_DisplayError(".../tzmatlab.c/fn_locofyearqm(): the end month or quarter must be greater than or equal to the start month or quarter for the given year"); - - return (loc); -} - - - -//----------------- -// Function to display errors. -//----------------- -void fn_DisplayError(char *msg_s) -{ - #if defined (USE_DEBUG_FILE) - fprintf(FPTR_DEBUG, "\nFatal Error:\n" - " %s!\n", msg_s); - fflush(FPTR_DEBUG); - #else - fprintf(stdout, "\nFatal Error:\n" - "\t %s!\n", msg_s); - fflush(stdout); - #endif - - #ifdef WIN_MATLABAPI - mexErrMsgTxt("."); - #else - //getchar(); - exit( EXIT_FAILURE ); // This exits the entire C program. - #endif -} - - -//----------------- -// Error-checking memory allocators -//----------------- -void *m_alloc(size_t size) { - void *new_mem; - if ( (new_mem = malloc(size)) == NULL ) fn_DisplayError("Out of Memory!"); - return(new_mem); -} -//+ -void *c_alloc(size_t elt_count, size_t elt_size) { - void *new_mem; - if ( (new_mem = calloc(elt_count, elt_size)) == NULL ) fn_DisplayError("Out of Memory!"); - return(new_mem); -} - - -//----------------- -// Creat and destroy vectors, matrices, and cells. -//----------------- -/** -TSvoidvector *CreateVector_void(int _n) -{ - TSvoidvector *x_voidv = tzMalloc(1, TSvoidvector); - x_voidv->flag = V_UNDEF; - x_voidv->n = _n; - x_voidv->v = tzMalloc(_n, void); - return(x_voidv); -} -TSvoidvector *DestroyVector_void(TSvoidvector *x_voidv) -{ - if (x_voidv) { - free(x_voidv->v); - free(x_voidv); - return ((TSvoidvector *)NULL); - } - else return (x_voidv); -} -/**/ - - -TScvector *CreateVector_c(int _n) -{ - TScvector *x_cv = tzMalloc(1, TScvector); - x_cv->flag = V_UNDEF; - x_cv->n = _n; - if (_n<1) fn_DisplayError(".../tzmatlab.c/CreateVector_c(): dimension input _n must be a positive integer"); - x_cv->v = tzMalloc(_n, char); - return( x_cv ); -} -TScvector *DestroyVector_c(TScvector *x_cv) -{ - if (x_cv) { - free(x_cv->v); - free(x_cv); - return ((TScvector *)NULL); - } - else return (x_cv); -} - -TSivector *CreateVector_int(int _n) -{ - TSivector *x_iv=tzMalloc(1, TSivector); - x_iv->flag = V_UNDEF; - x_iv->n = _n; - if (_n<1) fn_DisplayError(".../tzmatlab.c/CreateVector_int(): dimension input _n must be a positive integer"); - x_iv->v = tzMalloc(_n, int); - return(x_iv); -} -TSivector *DestroyVector_int(TSivector *x_iv) -{ - if (x_iv) { - free(x_iv->v); - free(x_iv); - return ((TSivector *)NULL); - } - else return (x_iv); -} - -TSimatrix *CreateMatrix_int(int nrows, int ncols) -{ - TSimatrix *x_im=tzMalloc(1, TSimatrix); - x_im->nrows = nrows; - x_im->ncols = ncols; - if (nrows<1 || ncols<1) fn_DisplayError(".../tzmatlab.c/CreateMatrix_int(): dimension inputs nrows and ncols must both be positive integers"); - x_im->M = tzMalloc(nrows*ncols, int); - return (x_im); -} -TSimatrix *DestroyMatrix_int(TSimatrix *x_im) -{ - if (x_im) { - free(x_im->M); - free(x_im); - return ((TSimatrix *)NULL); - } - else return (x_im); -} - -TSicellvec *CreateCellvec_int(TSivector *n_iv) -{ - int _i, - ncells; - TSicellvec *x_icv = tzMalloc(1, TSicellvec); - - if (!n_iv || !n_iv->flag) fn_DisplayError(".../CreateCellvec_int( ): Dimension vector n_iv must (1) created and (2) assigned legal values"); - x_icv->ncells = ncells = n_iv->n; - x_icv->C = tzMalloc(ncells, TSivector *); - for (_i=ncells-1; _i>-0; _i--) *(x_icv->C + _i) = CreateVector_int(n_iv->v[_i]); - return(x_icv); -} -TSicellvec *DestroyCellvec_int(TSicellvec *x_icv) -{ - int _i; - if (x_icv) { - for (_i=0; _i<x_icv->ncells; _i++) DestroyVector_int(x_icv->C[_i]); - free(x_icv->C); - free(x_icv); - return ((TSicellvec *)NULL); - } - else return (x_icv); -} - -TSicell *CreateCell_int(TSivector *row_iv, TSivector *col_iv) -{ - int _i, - ncells; - TSicell *x_ic=NULL; - if (!row_iv || !col_iv || !row_iv->flag || !col_iv->flag) fn_DisplayError(".../CreateCell_int( ): Dimension vectors row_iv and col_iv must (1) created and (2) assigned legal values"); - if ((ncells = row_iv->n) != col_iv->n) fn_DisplayError(".../CreateCell_int( ): the lengths of row_iv and col_iv (i.e., numbers of cells) must be the same"); - x_ic = tzMalloc(1, TSicell); - x_ic->ncells = ncells; - x_ic->C = tzMalloc(ncells, TSimatrix *); - for (_i=ncells-1; _i>=0; _i--) { - *(x_ic->C + _i) = CreateMatrix_int(row_iv->v[_i], col_iv->v[_i]); - } - return(x_ic); -} -TSicell *DestroyCell_int(TSicell *x_ic) -{ - int _i; - if (x_ic) { - for (_i=x_ic->ncells-1; _i>=0; _i--) x_ic->C[_i] = DestroyMatrix_int(x_ic->C[_i]); - tzDestroy(x_ic->C); - free(x_ic); - return ((TSicell *)NULL); - } - else return (x_ic); -} - - - - -TSdvector *CreateVector_lf(int _n) -{ - TSdvector *x_dv=tzMalloc(1, TSdvector); - x_dv->flag = V_UNDEF; - x_dv->n = _n; - if (_n<1) fn_DisplayError(".../tzmatlab.c/CreateVector_lf(): dimension input _n must be a positive integers"); - x_dv->v = tzMalloc(_n, double); - return(x_dv); -} -TSdvector *DestroyVector_lf(TSdvector *x_dv) -{ - if (x_dv) { - free(x_dv->v); - free(x_dv); - return ((TSdvector *)NULL); - } - else return (x_dv); -} - -TSdmatrix *CreateMatrix_lf(int nrows, int ncols) -{ - TSdmatrix *x_dm=tzMalloc(1, TSdmatrix); - x_dm->flag = M_UNDEF; - x_dm->nrows = nrows; - x_dm->ncols = ncols; - if (nrows<1 || ncols<1) fn_DisplayError(".../tzmatlab.c/CreateMatrix_lf(): dimension inputs nrows and ncols must both be positive integers"); - x_dm->M = tzMalloc(nrows*ncols, double); - return(x_dm); -} -TSdmatrix *DestroyMatrix_lf(TSdmatrix *x_dm) -{ - if (x_dm) { - free(x_dm->M); - free(x_dm); - return ((TSdmatrix *)NULL); - } - else return (x_dm); -} - -TSdcell *CreateCell_lf(TSivector *row_iv, TSivector *col_iv) -{ - int _i, - ncells; - TSdcell *x_dc=NULL; - //-------------- The following line must be enacted when we produce new code in the future. --------------------- - //-------------- In old code I forgot to set the flags for row_iv and col_iv but change them in all places are too time-consuming at this point. --------------------- - //if (!row_iv || !col_iv || !row_iv->flag || !col_iv->flag) fn_DisplayError(".../CreateCell_lf( ): Dimension vectors row_iv and col_iv must (1) created and (2) assigned legal values"); - if ((ncells = row_iv->n) != col_iv->n) fn_DisplayError(".../CreateCell_lf( ): the lengths of row_iv and col_iv (i.e., numbers of cells) must be the same"); - x_dc = tzMalloc(1, TSdcell); - x_dc->ncells = ncells; - x_dc->C = tzMalloc(ncells, TSdmatrix *); - for (_i=ncells-1; _i>=0; _i--) { - *(x_dc->C + _i) = CreateMatrix_lf(row_iv->v[_i], col_iv->v[_i]); - } - return(x_dc); -} -TSdcell *DestroyCell_lf(TSdcell *x_dc) -{ - int _i; - if (x_dc) { - for (_i=x_dc->ncells-1; _i>=0; _i--) x_dc->C[_i] = DestroyMatrix_lf(x_dc->C[_i]); - tzDestroy(x_dc->C); - free(x_dc); - return ((TSdcell *)NULL); - } - else return (x_dc); -} - -TSdcellvec *CreateCellvec_lf(TSivector *n_iv) { - TSdcellvec *x_dcv = tzMalloc(1, TSdcellvec); - int _i, - ncells; - //-------------- The following line must be enacted when we produce new code in the future. --------------------- - //-------------- In old code I forgot to set the flag for n_iv but change it in all places are too time-consuming at this point. --------------------- - //if (!n_iv || !n_iv->flag) fn_DisplayError(".../CreateCellvec_lf( ): Dimension vector n_iv must (1) created and (2) assigned legal values"); - x_dcv->ncells = ncells = n_iv->n; - x_dcv->C = tzMalloc(ncells, TSdvector *); - for (_i=0; _i<ncells; _i++) *(x_dcv->C + _i) = CreateVector_lf(n_iv->v[_i]); - return(x_dcv); -} -TSdcellvec *DestroyCellvec_lf(TSdcellvec *x_dcv) { - int _i; - if (x_dcv) { - for (_i=x_dcv->ncells-1; _i>=0; _i--) DestroyVector_lf(x_dcv->C[_i]); - free(x_dcv->C); - free(x_dcv); - return ((TSdcellvec *)NULL); - } - else return (x_dcv); -} - -TSdfourth *CreateFourth_lf(int ndims, TSivector *row_iv, TSivector *col_iv) { - int _i; - TSdfourth *x_d4 = NULL; - //if (row_iv->n != col_iv->n) fn_DisplayError(".../CreateFourth_lf( ): the lengths of row_iv and col_iv (i.e., sizes of dimensions) must be the same"); - - x_d4 = tzMalloc(1, TSdfourth); - x_d4->ndims = ndims; - x_d4->F = tzMalloc(ndims, TSdcell *); - for (_i=ndims-1; _i>=0; _i--) { - *(x_d4->F + _i) = CreateCell_lf(row_iv, col_iv); - } - return(x_d4); -} -TSdfourth *DestroyFourth_lf(TSdfourth *x_d4) { - int _i; - if (x_d4) { - for (_i=x_d4->ndims-1; _i>=0; _i--) DestroyCell_lf(x_d4->F[_i]); - free(x_d4->F); - free(x_d4); - return ((TSdfourth *)NULL); - } - else return (x_d4); -} - -TSdfourthvec *CreateFourthvec_lf(int ndims, TSivector *n_iv) -{ - int _i; - TSdfourthvec *x_d4v = NULL; - //if (n_iv->n != col_iv->n) fn_DisplayError(".../CreateFourth_lf( ): the lengths of n_iv and col_iv (i.e., sizes of dimensions) must be the same"); - - x_d4v = tzMalloc(1, TSdfourthvec); - x_d4v->ndims = ndims; - x_d4v->F = tzMalloc(ndims, TSdcellvec *); - for (_i=ndims-1; _i>=0; _i--) { - *(x_d4v->F + _i) = CreateCellvec_lf(n_iv); - } - return(x_d4v); -} -TSdfourthvec *DestroyFourthvec_lf(TSdfourthvec *x_d4v) -{ - int _i; - if (x_d4v) { - for (_i=x_d4v->ndims-1; _i>=0; _i--) DestroyCellvec_lf(x_d4v->F[_i]); - free(x_d4v->F); - free(x_d4v); - return ((TSdfourthvec *)NULL); - } - else return (x_d4v); -} - -TSdzvector *CreateVector_dz(int _n) -{ - TSdzvector *x_dzv=tzMalloc(1, TSdzvector); - x_dzv->real = CreateVector_lf(_n); - x_dzv->imag = CreateVector_lf(_n); - return( x_dzv ); -} -TSdzvector *DestroyVector_dz(TSdzvector *x_dzv) -{ - if (x_dzv) { - DestroyVector_lf(x_dzv->real); - DestroyVector_lf(x_dzv->imag); - free(x_dzv); - return ((TSdzvector *)NULL); - } - else return (x_dzv); -} - -TSdzmatrix *CreateMatrix_dz(int nrows, int ncols) { - TSdzmatrix *x_dzm=tzMalloc(1, TSdzmatrix); - x_dzm->real = CreateMatrix_lf(nrows, ncols); - x_dzm->imag = CreateMatrix_lf(nrows, ncols); - return( x_dzm ); -} -TSdzmatrix *DestroyMatrix_dz(TSdzmatrix *x_dzm) -{ - if (x_dzm) { - DestroyMatrix_lf(x_dzm->real); - DestroyMatrix_lf(x_dzm->imag); - free(x_dzm); - return ((TSdzmatrix *)NULL); - } - else return (x_dzm); -} - - - -//----------------- -// Creates special vectors, matrices, and cells but uses the same destroy utilities as above. -//----------------- -//=== Creates two special matrices: zeros and identity. Use DestroyMatrix_lf to free the memory allocated to these functions. -TSdmatrix *CreateZeroMatrix_lf(const int nrows, const int ncols) { - int _i; - TSdmatrix *x_dm=CreateMatrix_lf(nrows, ncols); - //x_dm->flag = M_GE | M_SU | M_SL | M_UT | M_LT; - x_dm->flag = M_GE; - for (_i=nrows*ncols-1; _i>=0; _i--) - x_dm->M[_i] = 0.0; - return(x_dm); -} -TSdmatrix *CreateIdentityMatrix_lf(const int nrows, const int ncols) { - int _i; - TSdmatrix *x_dm=CreateZeroMatrix_lf(nrows, ncols); - if (nrows==ncols) { - //x_dm->flag = M_GE | M_SU | M_SL | M_UT | M_LT; - //x_dm->flag = M_GE; - for (_i=square(nrows)-1; _i>=0; _i -= nrows+1) x_dm->M[_i] = 1.0; - x_dm->flag = M_GE | M_SU | M_SL | M_UT | M_LT; - } - else if (nrows<ncols) { - //x_dm->flag = M_GE | M_SU | M_UT; - //x_dm->flag = M_GE; - for (_i=square(nrows)-1; _i>=0; _i -= nrows+1) x_dm->M[_i] = 1.0; - x_dm->flag = M_GE | M_UT | M_LT; - } - else { - //x_dm->flag = M_GE | M_SL | M_LT; - //x_dm->flag = M_GE; - for (_i=(ncols-1)*(nrows+1); _i>=0; _i -= nrows+1) x_dm->M[_i] = 1.0; - x_dm->flag = M_GE | M_UT | M_LT; - } - return(x_dm); -} - -//=== Other speicial matrices. -TSivector *CreateConstantVector_int(const int _n, const int _k) { - //Inputs: - // _k: Integer constant; - // _n: Dimension of the vector. - int _i; - TSivector *x_iv=CreateVector_int(_n); - for (_i=_n-1; _i>=0; _i--) - x_iv->v[_i] = _k; - x_iv->flag = V_DEF; - return(x_iv); -} - -TSimatrix *CreateConstantMatrix_int(const int nrows, const int ncols, const int _n) -{ - int _i; - TSimatrix *x_im=CreateMatrix_int(nrows, ncols); - - for (_i=nrows*ncols-1; _i>=0; _i--) x_im->M[_i] = _n; - if ( nrows==ncols ) x_im->flag = M_GE | M_SU | M_SL | M_CN; - else x_im->flag = M_GE | M_CN; - return(x_im); -} - -TSicellvec *CreateConstantCellvec_int(TSivector *n_iv, const int _n) -{ - int _i, - ncells; - TSicellvec *x_icv = tzMalloc(1, TSicellvec); - - if (!n_iv || !n_iv->flag) fn_DisplayError(".../CreateCellvec_int( ): Dimension vector n_iv must (1) created and (2) assigned legal values"); - x_icv->ncells = ncells = n_iv->n; - x_icv->C = tzMalloc(ncells, TSivector *); - for (_i=ncells-1; _i>=0; _i--) *(x_icv->C + _i) = CreateConstantVector_int(n_iv->v[_i], _n); - return(x_icv); -} - -TSicell *CreateConstantCell_int(TSivector *row_iv, TSivector *col_iv, const int _n) -{ - int _i, - ncells; - TSicell *x_ic=NULL; - if (!row_iv || !col_iv || !row_iv->flag || !col_iv->flag) fn_DisplayError(".../CreateConstantCell_int( ): Dimension vectors row_iv and col_iv must (1) created and (2) assigned legal values"); - if ((ncells = row_iv->n) != col_iv->n) fn_DisplayError(".../CreateCell_int( ): the lengths of row_iv and col_iv (i.e., numbers of cells) must be the same"); - - x_ic = tzMalloc(1, TSicell); - x_ic->ncells = ncells; - x_ic->C = tzMalloc(ncells, TSimatrix *); - for (_i=ncells-1; _i>=0; _i--) *(x_ic->C + _i) = CreateConstantMatrix_int(row_iv->v[_i], col_iv->v[_i], _n); - return(x_ic); -} - - -TSdvector *CreateConstantVector_lf(const int _n, const double _alpha) { - int _i; - TSdvector *x_dv=CreateVector_lf(_n); - for (_i=_n-1; _i>=0; _i--) x_dv->v[_i] = _alpha; - x_dv->flag = V_DEF; - return(x_dv); -} - -TSdmatrix *CreateConstantMatrix_lf(const int nrows, const int ncols, const double _alpha) { - //Inputs: - // _alpha: Double constant; - // nrows and ncols: Dimensions of the matrix. - int _i; - TSdmatrix *x_dm=CreateMatrix_lf(nrows, ncols); - - for (_i=nrows*ncols-1; _i>=0; _i--) x_dm->M[_i] = _alpha; - if ( nrows==ncols ) x_dm->flag = M_GE | M_SU | M_SL | M_CN; - else x_dm->flag = M_GE | M_CN; - return(x_dm); -} - -TSdcellvec *CreateConstantCellvec_lf(TSivector *n_iv, const double _alpha) { - //Inputs: - // _alpha: Double constant; - // _n: Length (dimension) of the vector. - int _i, - ncells; - TSdcellvec *x_dcv = tzMalloc(1, TSdcellvec); - //-------------- The following line must be enacted when we produce new code in the future. --------------------- - //-------------- In old code I forgot to set the flag for n_iv but change it in all places are too time-consuming at this point. --------------------- - //if (!n_iv || !n_iv->flag) fn_DisplayError(".../CreateConstantCellvec_lf( ): Dimension vector n_iv must (1) created and (2) assigned legal values"); - x_dcv->ncells = ncells = n_iv->n; - x_dcv->C = tzMalloc(ncells, TSdvector *); - for (_i=ncells-1; _i>=0; _i--) *(x_dcv->C + _i) = CreateConstantVector_lf(n_iv->v[_i], _alpha); - return(x_dcv); -} - -TSdcell *CreateConstantCell_lf(TSivector *row_iv, TSivector *col_iv, const double _alpha) { - //Inputs: - // _alpha: Double constant; - // nrows: Number of rows; - // ncols: Number of columns. - int _i, - ncells; - TSdcell *x_dc=NULL; - //-------------- The following line must be enacted when we produce new code in the future. --------------------- - //-------------- In old code I forgot to set the flags for row_iv and col_iv but change them in all places are too time-consuming at this point. --------------------- - //if (!row_iv || !col_iv || !row_iv->flag || !col_iv->flag) fn_DisplayError(".../CreateConstantCell_lf( ): Dimension vectors row_iv and col_iv must (1) created and (2) assigned legal values"); - if ((ncells = row_iv->n) != col_iv->n) fn_DisplayError(".../CreateCell_lf( ): the lengths of row_iv and col_iv (i.e., numbers of cells) must be the same"); - - x_dc = tzMalloc(1, TSdcell); - x_dc->ncells = ncells; - x_dc->C = tzMalloc(ncells, TSdmatrix *); - for (_i=ncells-1; _i>=0; _i--) *(x_dc->C + _i) = CreateConstantMatrix_lf(row_iv->v[_i], col_iv->v[_i], _alpha); - return(x_dc); -} - - -TSdvector *CreateDatesVector_lf(int nq_m, int yrstart, int qmstart, int yrend, int qmend) -{ - //If nq_m==4, quarterly data; nq_m==12, monthly data. - //All the other inputs take the usual (base-1) numbers. For example, yrstart = 1960 means the year 1960. - int _t; - int samplesize = 1+fn_locofyearqm(nq_m, yrstart, qmstart, yrend, qmend); //1+ because fn_locofyearqm() returns a 0-based integer. - // - TSdvector *dates_dv = tzMalloc(1, TSdvector); - dates_dv->n = samplesize; - dates_dv->v = tzMalloc(samplesize, double); - - if ( (qmstart>nq_m) || (qmend>nq_m) ) - fn_DisplayError(".../tzmatlab.c/CreateDatesVector_lf(): quarters must be no greater than 4 and months must be no greater than 12"); - - if (nq_m==4 || nq_m==12) { - for (_t=samplesize-1; _t>=0; _t--) dates_dv->v[_t] = (double)yrstart + (double)(qmstart+_t-1)/(double)nq_m; - dates_dv->flag = V_DEF; - } - else fn_DisplayError(".../tzmatlab.c/CreateDatesVector_lf(): Dates have to be either monthly or quarterly"); - - - return (dates_dv); -} - - - -//----------------- -// Initializes already-created special vectors, matrices, and cells. -//----------------- -void InitializeConstantVector_lf(TSdvector *x_dv, const double _alpha) -{ - //Ouputs: - // x_dv: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_dv: Memory allocated already. - // _alpha: Double constant; - int _i, _n; - - if (!x_dv) fn_DisplayError(".../tzmatlab.c/InitializeConstantVector_lf(): Input vector must be created (memory-allocated)"); - else { - _n=x_dv->n; - } - for (_i=_n-1; _i>=0; _i--) x_dv->v[_i] = _alpha; - x_dv->flag = V_DEF; -} - -void InitializeConstantVector_int(TSivector *x_iv, const int _k) -{ - //Ouputs: - // x_iv: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_iv: Memory allocated already. - // _alpha: Integer constant; - int _i, _n; - - if (!x_iv) fn_DisplayError(".../tzmatlab.c/InitializeConstantVector_int(): Input vector must be created (memory-allocated)"); - else { - _n=x_iv->n; - } - for (_i=_n-1; _i>=0; _i--) x_iv->v[_i] = _k; - x_iv->flag = V_DEF; -} - -void InitializeConstantMatrix_lf(TSdmatrix *x_dm, const double _alpha) -{ - //Ouputs: - // x_dm: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_dm: Memory allocated already. - // _alpha: Double constant; - //See Kenneth Reek, pp.202-212. - -// int _i; -// for (_i=x_dm->nrows*x_dm->ncols-1; _i>=0; _i--) -// x_dm->M[_i] = _alpha; -// int nrows, ncols; - double *ptrcnt, *lastptr; - - if ( !x_dm) fn_DisplayError(".../tzmathlab.c/InitializeConstantMatrix_int(): Input matrix must be created (memory-allocated)"); - else { -// nrows = x_dm->nrows; -// ncols = x_dm->ncols; - lastptr = (ptrcnt = x_dm->M) + x_dm->nrows * x_dm->ncols; - } - -// if (nrows==ncols) x_dm->flag = M_GE | M_SU | M_SL; -// else if (nrows<ncols) x_dm->flag = M_GE | M_SU; -// else x_dm->flag = M_GE | M_SL; - x_dm->flag = M_GE | M_CN; - for ( ; ptrcnt<lastptr; ptrcnt++ ) *ptrcnt = _alpha; -} - -void InitializeDiagonalMatrix_lf(TSdmatrix *x_dm, const double _alpha) { - int _i, n2, nrows, ncols; - double *M; - - if ( !x_dm ) fn_DisplayError(".../tzmathlab.c/InitializeIdentiyMatrix_lf(): (1) Input matrix must be created (memory-allocated)"); - else { - nrows = x_dm->nrows; - ncols = x_dm->ncols; - M = x_dm->M; - } - - if (nrows==ncols) { - for (_i=(n2=square(nrows))-1; _i>=0; _i--) M[_i] = 0.0; - for (_i=n2-1; _i>=0; _i -= nrows+1) M[_i] = _alpha; - x_dm->flag = M_GE | M_SU | M_SL | M_UT | M_LT; - } - else if (nrows<ncols) { - for (_i=nrows*ncols-1; _i>=0; _i--) M[_i] = 0.0; - for (_i=square(nrows)-1; _i>=0; _i -= nrows+1) M[_i] = _alpha; - x_dm->flag = M_GE | M_UT | M_LT; - } - else { - for (_i=nrows*ncols-1; _i>=0; _i--) M[_i] = 0.0; - for (_i=(ncols-1)*(nrows+1); _i>=0; _i -= nrows+1) M[_i] = _alpha; - x_dm->flag = M_GE | M_UT | M_LT; - } -} - -void InitializeConstantMatrix_int(TSimatrix *x_im, const int _alpha) { - //Ouputs: - // x_im: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_im: Memory allocated already. - // _alpha: Integer constant; - // - //See Kenneth Reek, pp.202-212. - - -// int _i; -// for (_i=x_im->nrows*x_im->ncols-1; _i>=0; _i--) -// x_im->M[_i] = _alpha; - - int *ptrcnt, *lastptr; - - if ( !x_im) fn_DisplayError(".../tzmathlab.c/InitializeConstantMatrix_int(): Input matrix must be created (memory-allocated)"); - else lastptr = (ptrcnt = x_im->M) + x_im->nrows * x_im->ncols; - - for ( ; ptrcnt<lastptr; ptrcnt++ ) *ptrcnt = _alpha; -} - -void InitializeConstantCellvec_lf(TSdcellvec *x_dcv, const double _alpha) { - //Ouputs: - // x_dcv: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_dcv: Memory allocated already. - // _alpha: Double constant; - int _i, _k, _n; - double *v; - - if ( !x_dcv ) fn_DisplayError(".../tzmatlab.c/InitializeConstantCellvec_lf(): Input cell vector must be created (memory-allocated)"); - - - for (_i=x_dcv->ncells-1; _i>=0; _i--) { - v = x_dcv->C[_i]->v; - _n = x_dcv->C[_i]->n; - for (_k=_n-1; _k>=0; _k--) v[_k] = _alpha; - x_dcv->C[_i]->flag = V_DEF; - } -} - -void InitializeConstantCell_lf(TSdcell *x_dc, const double _alpha) -{ - //Ouputs: - // x_dc: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_dc: Memory allocated already. - // _alpha: Double constant; - int _i, _k, nrows, ncols; - double *M; - - if ( !x_dc ) fn_DisplayError(".../tzmatlab.c/InitializeConstantCell_lf(): Input cell must be created (memory-allocated)"); - - - for (_i=x_dc->ncells-1; _i>=0; _i--) { - M = x_dc->C[_i]->M; - nrows = x_dc->C[_i]->nrows; - ncols = x_dc->C[_i]->ncols; -// if (nrows==ncols) x_dc->C[_i]->flag = M_GE | M_SU | M_SL; -// else if (nrows<ncols) x_dc->C[_i]->flag = M_GE | M_SU; -// else x_dc->C[_i]->flag = M_GE | M_SL; - for (_k=nrows*ncols-1; _k>=0; _k--) M[_k] = _alpha; - x_dc->C[_i]->flag = M_GE | M_CN; - } -} - - - -void InitializeConstantFourthvec_lf(TSdfourthvec *x_d4v, const double _alpha) { - //Ouputs: - // x_d4v: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_d4v: Memory allocated already. - // _alpha: Double constant; - int _j, _i, _k; - double *v; - - if ( !x_d4v ) fn_DisplayError(".../tzmatlab.c/InitializeConstantFourthvec_lf(): Input fourth must be created (memory-allocated)"); - - for (_j=x_d4v->ndims-1; _j>=0; _j--) { - for (_i=x_d4v->F[_j]->ncells-1; _i>=0; _i--) { - v = x_d4v->F[_j]->C[_i]->v; - for (_k=x_d4v->F[_j]->C[_i]->n-1; _k>=0; _k--) v[_k] = _alpha; - x_d4v->F[_j]->C[_i]->flag = V_DEF; - } - } -} -void InitializeConstantFourth_lf(TSdfourth *x_d4, const double _alpha) { - //Ouputs: - // x_d4: Initialized to a constant value _alpha for all elements. - //Inputs: - // x_d4: Memory allocated already. - // _alpha: Double constant; - int _j, _i, _k, nrows, ncols; - double *M; - - if ( !x_d4 ) fn_DisplayError(".../tzmatlab.c/InitializeConstantFourth_lf(): Input fourth must be created (memory-allocated)"); - - for (_j=x_d4->ndims-1; _j>=0; _j--) { - for (_i=x_d4->F[_j]->ncells-1; _i>=0; _i--) { - M = x_d4->F[_j]->C[_i]->M; - nrows = x_d4->F[_j]->C[_i]->nrows; - ncols = x_d4->F[_j]->C[_i]->ncols; - for (_k=nrows*ncols-1; _k>=0; _k--) M[_k] = _alpha; - x_d4->F[_j]->C[_i]->flag = M_GE | M_CN; - } - } -} - - -void NegateColofMatrix_lf(TSdvector *y_dv, TSdmatrix *X_dm, int jx) { - //Ouputs: - // If y_dv!=NULL, y_dv is the negative of the jx_th column of X_dm (i.e., multiplied by -1.0). - // If !y_dv, the jx_th column of X_dm is replaced by its negated value (i.e., multiplied by -1.0). - //Inputs: - // X_dm: Memory allocated and legal values given already. - // jx: The jx_th column of X_dm. - - int _i, nrows_x; - double *M, *v; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../tzmathlab.c/NegateColumnofMatrix_lf(): (1) input matrix must be created (memory-allocated); (2) legal values must be given"); - if (jx >= X_dm->ncols) fn_DisplayError(".../tzmathlab.c/NegateColumnofMatrix_lf(): The jx_th column specified exceeds the column dimension of the input matrix"); - - M = X_dm->M + (jx+1)*(nrows_x=X_dm->nrows) - 1; //Points to the end of the jx_th column. - if ( !y_dv ) - for (_i=nrows_x-1; _i>=0; _i--, M--) *M = -(*M); - else { - for (_i=nrows_x-1, v=y_dv->v+_i; _i>=0; _i--, M--, v--) *v = -(*M); - y_dv->flag = V_DEF; - } -} - - -void InitializeConstantColofMatrix_lf(TSdmatrix *X_dm, int jx, double _alpha) { - //Ouputs: - // The jx_th column of X_dm is replaced by its original value multiplied by _alpha. - //Inputs: - // X_dm: Memory allocated and legal values given already. - // jx: The jx_th column of X_dm. - // _alpha: A double constant. - - int _i, nrows_x; - double *M; - - if ( !X_dm || !X_dm->flag ) fn_DisplayError(".../tzmathlab.c/NegateColumnofMatrix_lf(): (1) input matrix must be created (memory-allocated); (2) legal values must be given"); - if (jx >= X_dm->ncols) fn_DisplayError(".../tzmathlab.c/NegateColumnofMatrix_lf(): The jx_th column specified exceeds the column dimension of the input matrix"); - - M = X_dm->M + (jx+1)*(nrows_x=X_dm->nrows) - 1; //Points to the end of the jx_th column. - for (_i=nrows_x-1; _i>=0; _i--, M--) *M = _alpha; -} - - - - -//----------------- -// Open files. -//----------------- -FILE *tzFopen(char *filename, char *mode) { - FILE *fptr_dummy; - - if (filename) - { - if ( !(fptr_dummy = fopen(filename,mode)) ) { - printf("\n\n...tzmatlab.c/tzFopen(): Fatal Error -- unable to write, read, or append the file %s!\n", filename); - //getchar(); - exit(EXIT_FAILURE); - } - } - else fn_DisplayError(".../tzmatlab.c/tzFopen(): the input filename must exit"); - - return (fptr_dummy); -} diff --git a/CFiles/tzmatlab.h b/CFiles/tzmatlab.h deleted file mode 100644 index b319d3568a1b355156f3b5f012df5efebc1eef04..0000000000000000000000000000000000000000 --- a/CFiles/tzmatlab.h +++ /dev/null @@ -1,363 +0,0 @@ -/********* - * _cv: Pointer to TScvector (character vector). - * _iv: Pointer to TSivector (integer vector). - * _im: Pointer to TSimatrix (integer matrix). - * _dv: Pointer to TSdvector (double vector). - * _dm: Pointer to TSdmatrix (double matrix). - * _dc: Pointer to TSdcell (double cell -- pointer to pointer to a matrix). - * _dcv: Pointer to TSdcellvec (double cell -- pointer to pointer to a vector). - * _d4: Pointer to TSdfourth (double fourth dimension -- pointer to pointer to pointer to a matrix). - * _dzv: Pointer to TSdzvector (double complex vector). - * _dzm: Pointer to TSdzmatrix (double complex matrix). - * - * _s: structure variable. - * _ps: pointer to a structure. - * _sv: an array of structures. - * - * _sdv: structure (NOT pointer to structure) that contains TSdvector. - * _sdm: structure (NOT pointer to structure) that contains TSdmatrix. - * - * ???????? OLD NOTATIONS ?????????? - * _v: C row or column vector pointer. - * _vint: C row or column vector pointer to integer. - * _m: C matrix pointer. - * _mint: C matrix pointer to integer. - * _m3: C 3-D matrix pointer. - * _ppm: C pointer to pointer to a matrix. - * d_???_ppm: the number of pointers that are pointed to by _ppm. - * rv_???_ppm: a vector (with dimension d_???_ppm) pointer of numbers of rows, each of the numbers coresponding to a pointed matrix. - * cv_???_ppm: a vector (with dimension d_???_ppm) pointer of numbers of columns, each of the numbers coresponding to a pointed matrix. - * d_???_v: dimension size. - * r_???_m: numbers of rows. - * c_???_m: number of columns. - * r_???_m3: number of rows. - * c_???_m3: number of columns. - * t_???_m3: number of a third dimension. -*********/ - - -#ifndef __TZMATLAB__ -#define __TZMATLAB__ - #define _ISOC99_SOURCE //Using C99 features for gcc or icc on Linux. Must be placed as the first line above all #include lines. - - #include <stdio.h> - #include <stdlib.h> // For rand(), size_t, exit, malloc, free, qsort, EXIT_FAILURE. - #include <memory.h> //For memcpy, etc. Alternative: string.h - #include <math.h> //For isfinite. - #include <float.h> //For DBL_MIN, etc. - #include <time.h> //For time(), etc. - - - #define USE_DEBUG_FILE //When defined, one must use tzFopen to give the file name in the main .c file. - extern FILE *FPTR_DEBUG; //For debugging. Applied to all functions and all .c files that call tzmatlab.h. - //Initiated to NULL in tzmatlab.c. - //Must use tzFopen to give the file name in the main .c file. - extern FILE *FPTR_OPT; //For recording the optimization intermediate results. - //Applied to minfinder_blockcsminwel() in optpackage.c. - //Initiated to NULL in tzmatlab.c. - //Must use tzFopen to give the file name in the main .c file. - -/*******************************************************************************/ -/* Added by DW 9/1/08 */ -/*******************************************************************************/ -//#define USE_IMSL_MATH_LIBRARY -//#define USE_IMSL_STAT_LIBRARY -#define USE_GSL_LIBRARY -#define USE_MKL_LIBRARY -/*******************************************************************************/ - -#define NEWVERSIONofDW_SWITCH //If defined, using DW's new switch program (implemented in 2008), - // which may be incompatible with previous programs, such as ...\SargentWZ2\EstProbModel\EstimationJuly07USED - //If undef, using the old, working switch program for, say, ...\SargentWZ2\EstProbModel\EstimationJuly07USED. - //Files that are affected are: cstz.c, kalman.c, optpackage.c, - - - #define SWITCHTOIMSLCMATH // define: use IMSL special functions like gammlog; undef: use my own default code if it exists. - - //-------Only one of the following for math library.-------- - #define INTELCMATHLIBRARY // define: use Intel MKL LAPACK library; undef: use others. - //#define IMSLCMATHLIBRARY // define: use IMSL C Math library; undef: use others. - //#define MATLABCMATHLIBRARY // define: use Matlab C math library; undef: use others. - - //-------Only one of the following for math library.-------- - #define SWITCHTOINTELCMATH // define: use Intel MKL LAPACK library; undef: use others. - //#define SWITCHTOTZCMATH // define: use my own C math library; undef: use others. - - //-------Only one of the following for optimization routines except that CG?_ and CSMINWEL_ can be chosen together.-------- - //#define IMSL_OPTIMIZATION // IMSL optimization routines. - #define CSMINWEL_OPTIMIZATION //Sims's optimization routine. - #define CGI_OPTIMIZATION //Polak-Ribiere conjugate gradient method without using derivative information in performing the line minimization. - //NOT available yet! #define CGII_OPTIMIZATION //NOT available yet! Pletcher-Reeves conjugate gradient method using derivative information in performing the line minimization. - - //-------Only one of the following for random number generating routines.-------- - #define IMSL_RANDOMNUMBERGENERATOR // IMSL random number generator. - //#define CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- case 2 and my own (Iskander) code for generating a gamma distribution. - - //-------Only one of the following statistical packages.-------- - #define IMSL_STATISTICSTOOLBOX // IMSL statistical package. - -/*******************************************************************************/ -/* Added by DW 9/1/08 */ -/*******************************************************************************/ -#if defined(USE_MKL_LIBRARY) - #include "mkl.h" -#else - #if defined (USE_GSL_LIBRARY) - #include "gsl_cblas.h" - #endif - #include "blas_lapack.h" - #undef SWITCHTOINTELCMATH - #undef INTELCMATHLIBRARY -#endif - -#if defined(USE_GSL_LIBRARY) - #include "gsl_sf_gamma.h" - #include "gsl_cdf.h" -#endif - -#if defined(USE_IMSL_MATH_LIBRARY) - #include <imsl.h> //IMSL math package. - #include <imsls.h> //IMSL statistical package. -#else - #undef IMSL_OPTIMIZATION - #undef SWITCHTOIMSLCMATH - #undef IMSL_OPTIMIZATION - #undef IMSL_RANDOMNUMBERGENERATOR -#endif - -#if defined(USE_IMSL_STAT_LIBRARY) - #include <imsls.h> //IMSL statistical package. -#else - #undef IMSL_STATISTICSTOOLBOX -#endif -/*******************************************************************************/ - - //-------If define: use matlab API interface; otherwise (undef), use C console. - #undef WIN_MATLABAPI // define: use matlab API interface; undef: use C dos console. - - - //--------------- - #ifdef MATLABCMATHLIBRARY - #include "matlab.h" // For all mlf???? functions. - #include "matrix.h" // For mxGetM, mxCreatDoubleMatrix, etc. - #endif - #ifdef WIN_MATLABAPI // define: use matlab API interface; undef: use C dos console. - #include "mex.h" // For all mex??? calls. Matlab API (application program interface or external interface). - #define printf mexPrintf - #define malloc mxMalloc - #define calloc mxCalloc - #define free mxFree - #endif - - - //-------------- Attributes for the real double matrix type TSdmatrix. -------------- - //-------------- Whenever a matrix is initialized, the default is M_GE, but nothing else. -------------- - #define M_UNDEF 0 //0 or NULL: No attribute will be given when memory is allocated but no values are initialized. - #define M_GE 0x0001 //1: A general matrix. - #define M_SU 0x0002 //2: A symmetric (must be square) matrix but only the upper triangular part is referenced. - #define M_SL 0x0004 //4: A symmetric (must be square) matrix but only the lower triangular part is referenced. - #define M_UT 0x0008 //8: A upper triangular (trapezoidal if nrows < ncols) matrix but only the upper triangular part is referenced. - #define M_LT 0x0010 //16: A lower triangular (trapezoidal if nrows > ncols) matrix but only the lower triangular part is referenced. - #define M_CN 0x0020 //32: A constant (CN) matrix (All elements are the same or no (N) change from one to another). -// #define M_UTU 0x0040 //2^6: An unit upper triangular matrix. -// #define M_LTU 0x0080 //2^7: An unit lower triangular matrix. - //-------------- Attributes for the real double vector type TSdvector or the character vector type TScvector. -------------- - #define V_UNDEF 0 //Zero or NULL: No values have been assigned to the double vector. - #define V_DEF 1 //True: Values have been assigned to the double vector. - - - //-------------- Other macro definitions. -------------- - #define BLOCKSIZE_FOR_INTEL_MKL 128 //A machine-dependent value (typically, 16 to 64) required for optimum performance of the blocked algorithm in Intel MKL. - #define NEARINFINITY 1.0E+300 - #define BIGREALNUMBER 1.0E+30 - #define MACHINEZERO DBL_MIN - #define EPSILON DBL_EPSILON //1.0E-015. In Standard C, DBL_EPSILON = 2.2204460492503131 - #define SQRTEPSILON 1.490116119384766E-008 //1.0E-15. In Standard C, DBL_EPSILON = 2.2204460492503131E-016 - #define SQRTMACHINEZERO 1.490116119384766E-008 - //This is really not correct, because this number is sqrt(epsion), where DBL_MIN is around 1.0e-300. - #define MACHINEINFINITY DBL_MAX - #define MACHINE_EXP_INFINITY DBL_MAX_EXP - #define EXP_NEARINFINITY 1000 - //=== - #define TZ_TRUE 1 - #define TZ_FALSE 0 - - - - //--------------- - #define tzMalloc(elt_count, type) (type *)m_alloc((elt_count)*sizeof(type)) - #define tzCalloc(elt_count, type) (type *)c_alloc((elt_count), sizeof(type)) - #define tzDestroy(x) {if ((x)) { \ - free((x)); \ - (x) = NULL; \ - }} - #define tzFclose(x) {if ((x)) { \ - fclose((x)); \ - (x) = (FILE *)NULL; \ - }} - #define mos(i, j, nrows) ((j)*(nrows)+(i)) //i: ith row; j: jth column; nrows: number of rows for the matrix. - //Offset(os) for a matrix(m) in column major order and with base 0. See Reek pp.241-242. - #define square(x) ((x) * (x)) //Must be careful to avoid using, say, square(tmpd=2) or square(++x). - #define _max(a, b) ((a)>(b) ? (a) : (b)) // Macro max or __max is already defined in stdlib.h in MS visual C++, but mex.h may overwrite the max macro so we use _max. - #define _min(a, b) ((a)>(b) ? (b) : (a)) - #define swap(a, b, stemp) {(stemp)=(a); (a)=(b); (b)=(stemp);} - // - #ifndef isfinite - #define isfinite(x) _finite(x) //_finite is for Microsoft C++ compiler only (in float.h, which strangely is not ANSI compible), - // All these Microsoft functions are not yet C99 compatible. - #endif - //--- The following does not work. - // #ifndef FP_NAN - // #define FP_NAN _FPCLASS_SNAN //_FPCLASS_SNAN is for Microsoft C++ compiler only (in float.h, which strangely is not ANSI compible), - // // All these Microsoft functions are not yet C99 compatible. - // #endif - #define isdiagonalmatrix(x) (((x)->flag & (M_UT | M_LT)) == (M_UT | M_LT)) //x is the tz type of matrix. - // - #define DestroyDatesVector_lf(x) DestroyVector_lf(x) - - - //--------------- - typedef struct TScvector_tag - { - char *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TScvector; - typedef struct TSvoidvector_tag - { - void *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSvoidvector; - typedef struct { - int *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSivector; - typedef struct { - int *M; //M: matrix. - int nrows, ncols; - int flag; //flag: Refers to M_GE, M_SU, M_SL, M_UT, and M_LT in tzmatlab.h. - } TSimatrix; - typedef struct { - TSivector **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSicellvec; - typedef struct { - TSimatrix **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSicell; - //=== Real types. - typedef struct { - double *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSdvector; - typedef struct { - double *M; //M: matrix. - int nrows, ncols; - int flag; //flag: Refers to M_GE, M_SU, M_SL, M_UT, and M_LT in tzmatlab.h. - } TSdmatrix; - typedef struct { - TSdmatrix **C; //ncells-by-1 cells (C) and a pointer to matrix in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSdcell; - typedef struct { - TSdvector **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSdcellvec; - typedef struct { - TSdcell **F; //ndims-by-1 fourths (F) and a pointer to cell in each fourth. - int ndims; //Number of pointers (fourth dimensions) to pointer. - } TSdfourth; - typedef struct { - TSdcellvec **F; //ndims-by-1 fourths (F) and a pointer to cellvec in each fourth. - int ndims; //Number of pointers (fourth dimensions) to pointer. - } TSdfourthvec; - //=== Complex types. - typedef struct { - TSdvector *real; //Real part. - TSdvector *imag; //Imaginary part. - } TSdzvector; - typedef struct { - TSdmatrix *real; //Real part. - TSdmatrix *imag; //Imaginary part. - } TSdzmatrix; - - - - //----------------- Some high-level functions. ----------------- - int fn_locofyearqm(int q_m, int yrstart, int qmstart, int yrend, int qmend); - - - - - //--------------- - void fn_DisplayError(char *msg_s); - void *m_alloc(size_t size); - void *c_alloc(size_t elt_count, size_t elt_size); - - /** - TSvoidvector *CreateVector_void(int _n); - TSvoidvector *DestroyVector_void(TSvoidvector *x_voidv); - /**/ - - TScvector *CreateVector_c(int _n); - TScvector *DestroyVector_c(TScvector *x_s); - TSivector *CreateVector_int(int _n); - TSivector *DestroyVector_int(TSivector *x_iv); - TSimatrix *CreateMatrix_int(int nrows, int ncols); - TSimatrix *DestroyMatrix_int(TSimatrix *x_im); - TSicellvec *CreateCellvec_int(TSivector *n_iv); - TSicellvec *DestroyCellvec_int(TSicellvec *x_icv); - TSicell *CreateCell_int(TSivector *row_iv, TSivector *col_iv); - TSicell *DestroyCell_int(TSicell *x_ic); - - TSdvector *CreateVector_lf(int _n); - TSdvector *DestroyVector_lf(TSdvector *x_iv); - TSdmatrix *CreateMatrix_lf(int nrows, int ncols); - TSdmatrix *DestroyMatrix_lf(TSdmatrix *x_im); - TSdcell *CreateCell_lf(TSivector *row_iv, TSivector *col_iv); - TSdcell *DestroyCell_lf(TSdcell *x_dc); - TSdcellvec *CreateCellvec_lf(TSivector *n_iv); - TSdcellvec *DestroyCellvec_lf(TSdcellvec *x_dcv); - TSdfourth *CreateFourth_lf(int ndims, TSivector *row_iv, TSivector *col_iv); - TSdfourth *DestroyFourth_lf(TSdfourth *x_d4); - TSdfourthvec *CreateFourthvec_lf(int ndims, TSivector *n_iv); - TSdfourthvec *DestroyFourthvec_lf(TSdfourthvec *x_d4v); - - TSdzvector *CreateVector_dz(int _n); - TSdzvector *DestroyVector_dz(TSdzvector *x_dzv); - TSdzmatrix *CreateMatrix_dz(int nrows, int ncols); - TSdzmatrix *DestroyMatrix_dz(TSdzmatrix *x_dzm); - - //+ - TSdmatrix *CreateZeroMatrix_lf(const int nrows, const int ncols); - TSdmatrix *CreateIdentityMatrix_lf(const int nrows, const int ncols); - //TSdvector *CreateZerosVector_lf(int _n); - TSivector *CreateConstantVector_int( const int _n, const int _k); - TSimatrix *CreateConstantMatrix_int(const int nrows, const int ncols, const int _n); - TSicellvec *CreateConstantCellvec_int(TSivector *n_iv, const int _n); - TSicell *CreateConstantCell_int(TSivector *row_iv, TSivector *col_iv, const int _n); - TSdvector *CreateConstantVector_lf(const int _n, const double _alpha); - TSdmatrix *CreateConstantMatrix_lf(const int nrows, const int ncols, const double _alpha); - TSdcellvec *CreateConstantCellvec_lf(TSivector *n_iv, const double _alpha); - TSdcell *CreateConstantCell_lf(TSivector *row_iv, TSivector *col_iv, const double _alpha); - TSdvector *CreateDatesVector_lf(int nq_m, int yrstart, int qmstart, int yrend, int qmend); - //+ - void InitializeConstantVector_lf(TSdvector *x_dv, const double _alpha); - void InitializeConstantVector_int(TSivector *x_iv, const int _k); - void InitializeConstantMatrix_lf(TSdmatrix *x_dm, const double _alpha); - void InitializeDiagonalMatrix_lf(TSdmatrix *x_dm, const double _alpha); - void InitializeConstantMatrix_int(TSimatrix *x_dm, const int _alpha); - void InitializeConstantCellvec_lf(TSdcellvec *x_dcv, const double _alpha); - void InitializeConstantCell_lf(TSdcell *x_dc, const double _alpha); - void InitializeConstantFourthvec_lf(TSdfourthvec *x_d4v, const double _alpha); - void InitializeConstantFourth_lf(TSdfourth *x_d4, const double _alpha); - - - void NegateColofMatrix_lf(TSdvector *y_dv, TSdmatrix *x_dm, int _j); - void InitializeConstantColofMatrix_lf(TSdmatrix *X_dm, int jx, double _alpha); - - FILE *tzFopen(char *filename, char *mode); -#endif diff --git a/CFiles/tzmatlab_dw.h b/CFiles/tzmatlab_dw.h deleted file mode 100644 index 0d2449ae007127c9da3503d1bf202a61c322ffea..0000000000000000000000000000000000000000 --- a/CFiles/tzmatlab_dw.h +++ /dev/null @@ -1,363 +0,0 @@ -/********* - * _cv: Pointer to TScvector (character vector). - * _iv: Pointer to TSivector (integer vector). - * _im: Pointer to TSimatrix (integer matrix). - * _dv: Pointer to TSdvector (double vector). - * _dm: Pointer to TSdmatrix (double matrix). - * _dc: Pointer to TSdcell (double cell -- pointer to pointer to a matrix). - * _dcv: Pointer to TSdcellvec (double cell -- pointer to pointer to a vector). - * _d4: Pointer to TSdfourth (double fourth dimension -- pointer to pointer to pointer to a matrix). - * _dzv: Pointer to TSdzvector (double complex vector). - * _dzm: Pointer to TSdzmatrix (double complex matrix). - * - * _s: structure variable. - * _ps: pointer to a structure. - * _sv: an array of structures. - * - * _sdv: structure (NOT pointer to structure) that contains TSdvector. - * _sdm: structure (NOT pointer to structure) that contains TSdmatrix. - * - * ???????? OLD NOTATIONS ?????????? - * _v: C row or column vector pointer. - * _vint: C row or column vector pointer to integer. - * _m: C matrix pointer. - * _mint: C matrix pointer to integer. - * _m3: C 3-D matrix pointer. - * _ppm: C pointer to pointer to a matrix. - * d_???_ppm: the number of pointers that are pointed to by _ppm. - * rv_???_ppm: a vector (with dimension d_???_ppm) pointer of numbers of rows, each of the numbers coresponding to a pointed matrix. - * cv_???_ppm: a vector (with dimension d_???_ppm) pointer of numbers of columns, each of the numbers coresponding to a pointed matrix. - * d_???_v: dimension size. - * r_???_m: numbers of rows. - * c_???_m: number of columns. - * r_???_m3: number of rows. - * c_???_m3: number of columns. - * t_???_m3: number of a third dimension. -*********/ - - -#ifndef __TZMATLAB__ -#define __TZMATLAB__ - #define _ISOC99_SOURCE //Using C99 features for gcc or icc on Linux. Must be placed as the first line above all #include lines. - - #include <stdio.h> - #include <stdlib.h> // For rand(), size_t, exit, malloc, free, qsort, EXIT_FAILURE. - #include <memory.h> //For memcpy, etc. Alternative: string.h - #include <math.h> //For isfinite. - #include <float.h> //For DBL_MIN, etc. - #include <time.h> //For time(), etc. - - - #define USE_DEBUG_FILE //When defined, one must use tzFopen to give the file name in the main .c file. - extern FILE *FPTR_DEBUG; //For debugging. Applied to all functions and all .c files that call tzmatlab.h. - //Initiated to NULL in tzmatlab.c. - //Must use tzFopen to give the file name in the main .c file. - extern FILE *FPTR_OPT; //For recording the optimization intermediate results. - //Applied to minfinder_blockcsminwel() in optpackage.c. - //Initiated to NULL in tzmatlab.c. - //Must use tzFopen to give the file name in the main .c file. - -/*******************************************************************************/ -/* Added by DW 9/1/08 */ -/*******************************************************************************/ -//#define USE_IMSL_MATH_LIBRARY -//#define USE_IMSL_STAT_LIBRARY -#define USE_GSL_LIBRARY -#define USE_MKL_LIBRARY -/*******************************************************************************/ - -// #define NEWVERSIONofDW_SWITCH //If defined, using DW's new switch program (implemented in 2008), - // which may be incompatible with previous programs, such as ...\SargentWZ2\EstProbModel\EstimationJuly07USED - //If undef, using the old, working switch program for, say, ...\SargentWZ2\EstProbModel\EstimationJuly07USED. - //Files that are affected are: cstz.c, kalman.c, optpackage.c, - - - #define SWITCHTOIMSLCMATH // define: use IMSL special functions like gammlog; undef: use my own default code if it exists. - - //-------Only one of the following for math library.-------- - #define INTELCMATHLIBRARY // define: use Intel MKL LAPACK library; undef: use others. - //#define IMSLCMATHLIBRARY // define: use IMSL C Math library; undef: use others. - //#define MATLABCMATHLIBRARY // define: use Matlab C math library; undef: use others. - - //-------Only one of the following for math library.-------- - #define SWITCHTOINTELCMATH // define: use Intel MKL LAPACK library; undef: use others. - //#define SWITCHTOTZCMATH // define: use my own C math library; undef: use others. - - //-------Only one of the following for optimization routines except that CG?_ and CSMINWEL_ can be chosen together.-------- - //#define IMSL_OPTIMIZATION // IMSL optimization routines. - #define CSMINWEL_OPTIMIZATION //Sims's optimization routine. - #define CGI_OPTIMIZATION //Polak-Ribiere conjugate gradient method without using derivative information in performing the line minimization. - //NOT available yet! #define CGII_OPTIMIZATION //NOT available yet! Pletcher-Reeves conjugate gradient method using derivative information in performing the line minimization. - - //-------Only one of the following for random number generating routines.-------- - #define IMSL_RANDOMNUMBERGENERATOR // IMSL random number generator. - //#define CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- case 2 and my own (Iskander) code for generating a gamma distribution. - - //-------Only one of the following statistical packages.-------- - #define IMSL_STATISTICSTOOLBOX // IMSL statistical package. - -/*******************************************************************************/ -/* Added by DW 9/1/08 */ -/*******************************************************************************/ -#if defined(USE_MKL_LIBRARY) - #include "mkl.h" -#else - #if defined (USE_GSL_LIBRARY) - #include "gsl_cblas.h" - #endif - #include "blas_lapack.h" - #undef SWITCHTOINTELCMATH - #undef INTELCMATHLIBRARY -#endif - -#if defined(USE_GSL_LIBRARY) - #include "gsl_sf_gamma.h" - #include "gsl_cdf.h" -#endif - -#if defined(USE_IMSL_MATH_LIBRARY) - #include <imsl.h> //IMSL math package. - #include <imsls.h> //IMSL statistical package. -#else - #undef IMSL_OPTIMIZATION - #undef SWITCHTOIMSLCMATH - #undef IMSL_OPTIMIZATION - #undef IMSL_RANDOMNUMBERGENERATOR -#endif - -#if defined(USE_IMSL_STAT_LIBRARY) - #include <imsls.h> //IMSL statistical package. -#else - #undef IMSL_STATISTICSTOOLBOX -#endif -/*******************************************************************************/ - - //-------If define: use matlab API interface; otherwise (undef), use C console. - #undef WIN_MATLABAPI // define: use matlab API interface; undef: use C dos console. - - - //--------------- - #ifdef MATLABCMATHLIBRARY - #include "matlab.h" // For all mlf???? functions. - #include "matrix.h" // For mxGetM, mxCreatDoubleMatrix, etc. - #endif - #ifdef WIN_MATLABAPI // define: use matlab API interface; undef: use C dos console. - #include "mex.h" // For all mex??? calls. Matlab API (application program interface or external interface). - #define printf mexPrintf - #define malloc mxMalloc - #define calloc mxCalloc - #define free mxFree - #endif - - - //-------------- Attributes for the real double matrix type TSdmatrix. -------------- - //-------------- Whenever a matrix is initialized, the default is M_GE, but nothing else. -------------- - #define M_UNDEF 0 //0 or NULL: No attribute will be given when memory is allocated but no values are initialized. - #define M_GE 0x0001 //1: A general matrix. - #define M_SU 0x0002 //2: A symmetric (must be square) matrix but only the upper triangular part is referenced. - #define M_SL 0x0004 //4: A symmetric (must be square) matrix but only the lower triangular part is referenced. - #define M_UT 0x0008 //8: A upper triangular (trapezoidal if nrows < ncols) matrix but only the upper triangular part is referenced. - #define M_LT 0x0010 //16: A lower triangular (trapezoidal if nrows > ncols) matrix but only the lower triangular part is referenced. - #define M_CN 0x0020 //32: A constant (CN) matrix (All elements are the same or no (N) change from one to another). -// #define M_UTU 0x0040 //2^6: An unit upper triangular matrix. -// #define M_LTU 0x0080 //2^7: An unit lower triangular matrix. - //-------------- Attributes for the real double vector type TSdvector or the character vector type TScvector. -------------- - #define V_UNDEF 0 //Zero or NULL: No values have been assigned to the double vector. - #define V_DEF 1 //True: Values have been assigned to the double vector. - - - //-------------- Other macro definitions. -------------- - #define BLOCKSIZE_FOR_INTEL_MKL 128 //A machine-dependent value (typically, 16 to 64) required for optimum performance of the blocked algorithm in Intel MKL. - #define NEARINFINITY 1.0E+300 - #define BIGREALNUMBER 1.0E+30 - #define MACHINEZERO DBL_MIN - #define EPSILON DBL_EPSILON //1.0E-015. In Standard C, DBL_EPSILON = 2.2204460492503131 - #define SQRTEPSILON 1.490116119384766E-008 //1.0E-15. In Standard C, DBL_EPSILON = 2.2204460492503131E-016 - #define SQRTMACHINEZERO 1.490116119384766E-008 - //This is really not correct, because this number is sqrt(epsion), where DBL_MIN is around 1.0e-300. - #define MACHINEINFINITY DBL_MAX - #define MACHINE_EXP_INFINITY DBL_MAX_EXP - #define EXP_NEARINFINITY 1000 - //=== - #define TZ_TRUE 1 - #define TZ_FALSE 0 - - - - //--------------- - #define tzMalloc(elt_count, type) (type *)m_alloc((elt_count)*sizeof(type)) - #define tzCalloc(elt_count, type) (type *)c_alloc((elt_count), sizeof(type)) - #define tzDestroy(x) {if ((x)) { \ - free((x)); \ - (x) = NULL; \ - }} - #define tzFclose(x) {if ((x)) { \ - fclose((x)); \ - (x) = (FILE *)NULL; \ - }} - #define mos(i, j, nrows) ((j)*(nrows)+(i)) //i: ith row; j: jth column; nrows: number of rows for the matrix. - //Offset(os) for a matrix(m) in column major order and with base 0. See Reek pp.241-242. - #define square(x) ((x) * (x)) //Must be careful to avoid using, say, square(tmpd=2) or square(++x). - #define _max(a, b) ((a)>(b) ? (a) : (b)) // Macro max or __max is already defined in stdlib.h in MS visual C++, but mex.h may overwrite the max macro so we use _max. - #define _min(a, b) ((a)>(b) ? (b) : (a)) - #define swap(a, b, stemp) {(stemp)=(a); (a)=(b); (b)=(stemp);} - // - #ifndef isfinite - #define isfinite(x) _finite(x) //_finite is for Microsoft C++ compiler only (in float.h, which strangely is not ANSI compible), - // All these Microsoft functions are not yet C99 compatible. - #endif - //--- The following does not work. - // #ifndef FP_NAN - // #define FP_NAN _FPCLASS_SNAN //_FPCLASS_SNAN is for Microsoft C++ compiler only (in float.h, which strangely is not ANSI compible), - // // All these Microsoft functions are not yet C99 compatible. - // #endif - #define isdiagonalmatrix(x) (((x)->flag & (M_UT | M_LT)) == (M_UT | M_LT)) //x is the tz type of matrix. - // - #define DestroyDatesVector_lf(x) DestroyVector_lf(x) - - - //--------------- - typedef struct TScvector_tag - { - char *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TScvector; - typedef struct TSvoidvector_tag - { - void *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSvoidvector; - typedef struct { - int *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSivector; - typedef struct { - int *M; //M: matrix. - int nrows, ncols; - int flag; //flag: Refers to M_GE, M_SU, M_SL, M_UT, and M_LT in tzmatlab.h. - } TSimatrix; - typedef struct { - TSivector **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSicellvec; - typedef struct { - TSimatrix **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSicell; - //=== Real types. - typedef struct { - double *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSdvector; - typedef struct { - double *M; //M: matrix. - int nrows, ncols; - int flag; //flag: Refers to M_GE, M_SU, M_SL, M_UT, and M_LT in tzmatlab.h. - } TSdmatrix; - typedef struct { - TSdmatrix **C; //ncells-by-1 cells (C) and a pointer to matrix in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSdcell; - typedef struct { - TSdvector **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSdcellvec; - typedef struct { - TSdcell **F; //ndims-by-1 fourths (F) and a pointer to cell in each fourth. - int ndims; //Number of pointers (fourth dimensions) to pointer. - } TSdfourth; - typedef struct { - TSdcellvec **F; //ndims-by-1 fourths (F) and a pointer to cellvec in each fourth. - int ndims; //Number of pointers (fourth dimensions) to pointer. - } TSdfourthvec; - //=== Complex types. - typedef struct { - TSdvector *real; //Real part. - TSdvector *imag; //Imaginary part. - } TSdzvector; - typedef struct { - TSdmatrix *real; //Real part. - TSdmatrix *imag; //Imaginary part. - } TSdzmatrix; - - - - //----------------- Some high-level functions. ----------------- - int fn_locofyearqm(int q_m, int yrstart, int qmstart, int yrend, int qmend); - - - - - //--------------- - void fn_DisplayError(char *msg_s); - void *m_alloc(size_t size); - void *c_alloc(size_t elt_count, size_t elt_size); - - /** - TSvoidvector *CreateVector_void(int _n); - TSvoidvector *DestroyVector_void(TSvoidvector *x_voidv); - /**/ - - TScvector *CreateVector_c(int _n); - TScvector *DestroyVector_c(TScvector *x_s); - TSivector *CreateVector_int(int _n); - TSivector *DestroyVector_int(TSivector *x_iv); - TSimatrix *CreateMatrix_int(int nrows, int ncols); - TSimatrix *DestroyMatrix_int(TSimatrix *x_im); - TSicellvec *CreateCellvec_int(TSivector *n_iv); - TSicellvec *DestroyCellvec_int(TSicellvec *x_icv); - TSicell *CreateCell_int(TSivector *row_iv, TSivector *col_iv); - TSicell *DestroyCell_int(TSicell *x_ic); - - TSdvector *CreateVector_lf(int _n); - TSdvector *DestroyVector_lf(TSdvector *x_iv); - TSdmatrix *CreateMatrix_lf(int nrows, int ncols); - TSdmatrix *DestroyMatrix_lf(TSdmatrix *x_im); - TSdcell *CreateCell_lf(TSivector *row_iv, TSivector *col_iv); - TSdcell *DestroyCell_lf(TSdcell *x_dc); - TSdcellvec *CreateCellvec_lf(TSivector *n_iv); - TSdcellvec *DestroyCellvec_lf(TSdcellvec *x_dcv); - TSdfourth *CreateFourth_lf(int ndims, TSivector *row_iv, TSivector *col_iv); - TSdfourth *DestroyFourth_lf(TSdfourth *x_d4); - TSdfourthvec *CreateFourthvec_lf(int ndims, TSivector *n_iv); - TSdfourthvec *DestroyFourthvec_lf(TSdfourthvec *x_d4v); - - TSdzvector *CreateVector_dz(int _n); - TSdzvector *DestroyVector_dz(TSdzvector *x_dzv); - TSdzmatrix *CreateMatrix_dz(int nrows, int ncols); - TSdzmatrix *DestroyMatrix_dz(TSdzmatrix *x_dzm); - - //+ - TSdmatrix *CreateZeroMatrix_lf(const int nrows, const int ncols); - TSdmatrix *CreateIdentityMatrix_lf(const int nrows, const int ncols); - //TSdvector *CreateZerosVector_lf(int _n); - TSivector *CreateConstantVector_int( const int _n, const int _k); - TSimatrix *CreateConstantMatrix_int(const int nrows, const int ncols, const int _n); - TSicellvec *CreateConstantCellvec_int(TSivector *n_iv, const int _n); - TSicell *CreateConstantCell_int(TSivector *row_iv, TSivector *col_iv, const int _n); - TSdvector *CreateConstantVector_lf(const int _n, const double _alpha); - TSdmatrix *CreateConstantMatrix_lf(const int nrows, const int ncols, const double _alpha); - TSdcellvec *CreateConstantCellvec_lf(TSivector *n_iv, const double _alpha); - TSdcell *CreateConstantCell_lf(TSivector *row_iv, TSivector *col_iv, const double _alpha); - TSdvector *CreateDatesVector_lf(int nq_m, int yrstart, int qmstart, int yrend, int qmend); - //+ - void InitializeConstantVector_lf(TSdvector *x_dv, const double _alpha); - void InitializeConstantVector_int(TSivector *x_iv, const int _k); - void InitializeConstantMatrix_lf(TSdmatrix *x_dm, const double _alpha); - void InitializeDiagonalMatrix_lf(TSdmatrix *x_dm, const double _alpha); - void InitializeConstantMatrix_int(TSimatrix *x_dm, const int _alpha); - void InitializeConstantCellvec_lf(TSdcellvec *x_dcv, const double _alpha); - void InitializeConstantCell_lf(TSdcell *x_dc, const double _alpha); - void InitializeConstantFourthvec_lf(TSdfourthvec *x_d4v, const double _alpha); - void InitializeConstantFourth_lf(TSdfourth *x_d4, const double _alpha); - - - void NegateColofMatrix_lf(TSdvector *y_dv, TSdmatrix *x_dm, int _j); - void InitializeConstantColofMatrix_lf(TSdmatrix *X_dm, int jx, double _alpha); - - FILE *tzFopen(char *filename, char *mode); -#endif diff --git a/CFiles/tzmatlab_tao.h b/CFiles/tzmatlab_tao.h deleted file mode 100644 index e8da1ac75ec89f031c686cafa8fdd03968c0ebaf..0000000000000000000000000000000000000000 --- a/CFiles/tzmatlab_tao.h +++ /dev/null @@ -1,359 +0,0 @@ -/********* - * _cv: Pointer to TScvector (character vector). - * _iv: Pointer to TSivector (integer vector). - * _im: Pointer to TSimatrix (integer matrix). - * _dv: Pointer to TSdvector (double vector). - * _dm: Pointer to TSdmatrix (double matrix). - * _dc: Pointer to TSdcell (double cell -- pointer to pointer to a matrix). - * _dcv: Pointer to TSdcellvec (double cell -- pointer to pointer to a vector). - * _d4: Pointer to TSdfourth (double fourth dimension -- pointer to pointer to pointer to a matrix). - * _dzv: Pointer to TSdzvector (double complex vector). - * _dzm: Pointer to TSdzmatrix (double complex matrix). - * - * _s: structure variable. - * _ps: pointer to a structure. - * _sv: an array of structures. - * - * _sdv: structure (NOT pointer to structure) that contains TSdvector. - * _sdm: structure (NOT pointer to structure) that contains TSdmatrix. - * - * ???????? OLD NOTATIONS ?????????? - * _v: C row or column vector pointer. - * _vint: C row or column vector pointer to integer. - * _m: C matrix pointer. - * _mint: C matrix pointer to integer. - * _m3: C 3-D matrix pointer. - * _ppm: C pointer to pointer to a matrix. - * d_???_ppm: the number of pointers that are pointed to by _ppm. - * rv_???_ppm: a vector (with dimension d_???_ppm) pointer of numbers of rows, each of the numbers coresponding to a pointed matrix. - * cv_???_ppm: a vector (with dimension d_???_ppm) pointer of numbers of columns, each of the numbers coresponding to a pointed matrix. - * d_???_v: dimension size. - * r_???_m: numbers of rows. - * c_???_m: number of columns. - * r_???_m3: number of rows. - * c_???_m3: number of columns. - * t_???_m3: number of a third dimension. -*********/ - - -#ifndef __TZMATLAB__ -#define __TZMATLAB__ - #define _ISOC99_SOURCE //Using C99 features for gcc or icc on Linux. Must be placed as the first line above all #include lines. - - #include <stdio.h> - #include <stdlib.h> // For rand(), size_t, exit, malloc, free, qsort, EXIT_FAILURE. - #include <memory.h> //For memcpy, etc. Alternative: string.h - #include <math.h> //For isfinite. - #include <float.h> //For DBL_MIN, etc. - #include <time.h> //For time(), etc. - - - #define USE_DEBUG_FILE //When defined, one must use tzFopen to give the file name in the main .c file. - extern FILE *FPTR_DEBUG; //For debugging. Applied to all functions and all .c files that call tzmatlab.h. - //Initiated to NULL in tzmatlab.c. - //Must use tzFopen to give the file name in the main .c file. - extern FILE *FPTR_OPT; //For recording the optimization intermediate results. - //Applied to minfinder_blockcsminwel() in optpackage.c. - //Initiated to NULL in tzmatlab.c. - //Must use tzFopen to give the file name in the main .c file. - -/*******************************************************************************/ -/* Added by DW 9/1/08 */ -/*******************************************************************************/ -//#define USE_IMSL_MATH_LIBRARY -//#define USE_IMSL_STAT_LIBRARY -#define USE_GSL_LIBRARY -#define USE_MKL_LIBRARY -/*******************************************************************************/ - - #define NEWVERSIONofDW_SWITCH //If defined, using DW's new switch program (implemented in 2008), - // which may be incompatible with previous programs, such as ...\SargentWZ2\EstProbModel\EstimationJuly07USED - //If undef, using the old, working switch program for, say, ...\SargentWZ2\EstProbModel\EstimationJuly07USED. - //Files that are affected are: cstz.c, kalman.c, optpackage.c, - - - #define SWITCHTOIMSLCMATH // define: use IMSL special functions like gammlog; undef: use my own default code if it exists. - - //-------Only one of the following for math library.-------- - #define INTELCMATHLIBRARY // define: use Intel MKL LAPACK library; undef: use others. - //#define IMSLCMATHLIBRARY // define: use IMSL C Math library; undef: use others. - //#define MATLABCMATHLIBRARY // define: use Matlab C math library; undef: use others. - - //-------Only one of the following for math library.-------- - #define SWITCHTOINTELCMATH // define: use Intel MKL LAPACK library; undef: use others. - //#define SWITCHTOTZCMATH // define: use my own C math library; undef: use others. - - //-------Only one of the following for optimization routines except that CG?_ and CSMINWEL_ can be chosen together.-------- - //#define IMSL_OPTIMIZATION // IMSL optimization routines. - #define CSMINWEL_OPTIMIZATION //Sims's optimization routine. - #define CGI_OPTIMIZATION //Polak-Ribiere conjugate gradient method without using derivative information in performing the line minimization. - //NOT available yet! #define CGII_OPTIMIZATION //NOT available yet! Pletcher-Reeves conjugate gradient method using derivative information in performing the line minimization. - - //-------Only one of the following for random number generating routines.-------- - #define IMSL_RANDOMNUMBERGENERATOR // IMSL random number generator. - //#define CASE2_RANDOMNUMBERGENERATOR //Imported from the C recipe book -- case 2 and my own (Iskander) code for generating a gamma distribution. - - //-------Only one of the following statistical packages.-------- - #define IMSL_STATISTICSTOOLBOX // IMSL statistical package. - -/*******************************************************************************/ -/* Added by DW 9/1/08 */ -/*******************************************************************************/ -#if defined(USE_MKL_LIBRARY) - #include "mkl.h" -#else - #include "blas_lapack.h" - #undef SWITCHTOINTELCMATH -#endif - -#if defined(USE_GSL_LIBRARY) - #include "gsl_sf_gamma.h" - #include "gsl_cdf.h" -#endif - -#if defined(USE_IMSL_MATH_LIBRARY) - #include <imsl.h> //IMSL math package. - #include <imsls.h> //IMSL statistical package. -#else - #undef IMSL_OPTIMIZATION - #undef SWITCHTOIMSLCMATH - #undef IMSL_OPTIMIZATION - #undef IMSL_RANDOMNUMBERGENERATOR -#endif - -#if defined(USE_IMSL_STAT_LIBRARY) - #include <imsls.h> //IMSL statistical package. -#else - #undef IMSL_STATISTICSTOOLBOX -#endif -/*******************************************************************************/ - - //-------If define: use matlab API interface; otherwise (undef), use C console. - #undef WIN_MATLABAPI // define: use matlab API interface; undef: use C dos console. - - - //--------------- - #ifdef MATLABCMATHLIBRARY - #include "matlab.h" // For all mlf???? functions. - #include "matrix.h" // For mxGetM, mxCreatDoubleMatrix, etc. - #endif - #ifdef WIN_MATLABAPI // define: use matlab API interface; undef: use C dos console. - #include "mex.h" // For all mex??? calls. Matlab API (application program interface or external interface). - #define printf mexPrintf - #define malloc mxMalloc - #define calloc mxCalloc - #define free mxFree - #endif - - - //-------------- Attributes for the real double matrix type TSdmatrix. -------------- - //-------------- Whenever a matrix is initialized, the default is M_GE, but nothing else. -------------- - #define M_UNDEF 0 //0 or NULL: No attribute will be given when memory is allocated but no values are initialized. - #define M_GE 0x0001 //1: A general matrix. - #define M_SU 0x0002 //2: A symmetric (must be square) matrix but only the upper triangular part is referenced. - #define M_SL 0x0004 //4: A symmetric (must be square) matrix but only the lower triangular part is referenced. - #define M_UT 0x0008 //8: A upper triangular (trapezoidal if nrows < ncols) matrix but only the upper triangular part is referenced. - #define M_LT 0x0010 //16: A lower triangular (trapezoidal if nrows > ncols) matrix but only the lower triangular part is referenced. - #define M_CN 0x0020 //32: A constant (CN) matrix (All elements are the same or no (N) change from one to another). -// #define M_UTU 0x0040 //2^6: An unit upper triangular matrix. -// #define M_LTU 0x0080 //2^7: An unit lower triangular matrix. - //-------------- Attributes for the real double vector type TSdvector or the character vector type TScvector. -------------- - #define V_UNDEF 0 //Zero or NULL: No values have been assigned to the double vector. - #define V_DEF 1 //True: Values have been assigned to the double vector. - - - //-------------- Other macro definitions. -------------- - #define BLOCKSIZE_FOR_INTEL_MKL 128 //A machine-dependent value (typically, 16 to 64) required for optimum performance of the blocked algorithm in Intel MKL. - #define NEARINFINITY 1.0E+300 - #define BIGREALNUMBER 1.0E+30 - #define MACHINEZERO DBL_MIN - #define EPSILON DBL_EPSILON //1.0E-015. In Standard C, DBL_EPSILON = 2.2204460492503131 - #define SQRTEPSILON 1.490116119384766E-008 //1.0E-15. In Standard C, DBL_EPSILON = 2.2204460492503131E-016 - #define SQRTMACHINEZERO 1.490116119384766E-008 - //This is really not correct, because this number is sqrt(epsion), where DBL_MIN is around 1.0e-300. - #define MACHINEINFINITY DBL_MAX - #define MACHINE_EXP_INFINITY DBL_MAX_EXP - #define EXP_NEARINFINITY 1000 - //=== - #define TZ_TRUE 1 - #define TZ_FALSE 0 - - - - //--------------- - #define tzMalloc(elt_count, type) (type *)m_alloc((elt_count)*sizeof(type)) - #define tzCalloc(elt_count, type) (type *)c_alloc((elt_count), sizeof(type)) - #define tzDestroy(x) {if ((x)) { \ - free((x)); \ - (x) = NULL; \ - }} - #define tzFclose(x) {if ((x)) { \ - fclose((x)); \ - (x) = (FILE *)NULL; \ - }} - #define mos(i, j, nrows) ((j)*(nrows)+(i)) //i: ith row; j: jth column; nrows: number of rows for the matrix. - //Offset(os) for a matrix(m) in column major order and with base 0. See Reek pp.241-242. - #define square(x) ((x) * (x)) //Must be careful to avoid using, say, square(tmpd=2) or square(++x). - #define _max(a, b) ((a)>(b) ? (a) : (b)) // Macro max or __max is already defined in stdlib.h in MS visual C++, but mex.h may overwrite the max macro so we use _max. - #define _min(a, b) ((a)>(b) ? (b) : (a)) - #define swap(a, b, stemp) {(stemp)=(a); (a)=(b); (b)=(stemp);} - // - #ifndef isfinite - #define isfinite(x) _finite(x) //_finite is for Microsoft C++ compiler only (in float.h, which strangely is not ANSI compible), - // All these Microsoft functions are not yet C99 compatible. - #endif - //--- The following does not work. - // #ifndef FP_NAN - // #define FP_NAN _FPCLASS_SNAN //_FPCLASS_SNAN is for Microsoft C++ compiler only (in float.h, which strangely is not ANSI compible), - // // All these Microsoft functions are not yet C99 compatible. - // #endif - #define isdiagonalmatrix(x) (((x)->flag & (M_UT | M_LT)) == (M_UT | M_LT)) //x is the tz type of matrix. - // - #define DestroyDatesVector_lf(x) DestroyVector_lf(x) - - - //--------------- - typedef struct TScvector_tag - { - char *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TScvector; - typedef struct TSvoidvector_tag - { - void *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSvoidvector; - typedef struct { - int *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSivector; - typedef struct { - int *M; //M: matrix. - int nrows, ncols; - int flag; //flag: Refers to M_GE, M_SU, M_SL, M_UT, and M_LT in tzmatlab.h. - } TSimatrix; - typedef struct { - TSivector **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSicellvec; - typedef struct { - TSimatrix **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSicell; - //=== Real types. - typedef struct { - double *v; //v: vector. - int n; - int flag; //flag: no legal values are assigned if 0 and legal values are assigned if 1. - } TSdvector; - typedef struct { - double *M; //M: matrix. - int nrows, ncols; - int flag; //flag: Refers to M_GE, M_SU, M_SL, M_UT, and M_LT in tzmatlab.h. - } TSdmatrix; - typedef struct { - TSdmatrix **C; //ncells-by-1 cells (C) and a pointer to matrix in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSdcell; - typedef struct { - TSdvector **C; //ncells-by-1 cells (C) and a ponter to vector in each cell. - int ncells; //Number of pointers (cells) to pointer. - } TSdcellvec; - typedef struct { - TSdcell **F; //ndims-by-1 fourths (F) and a pointer to cell in each fourth. - int ndims; //Number of pointers (fourth dimensions) to pointer. - } TSdfourth; - typedef struct { - TSdcellvec **F; //ndims-by-1 fourths (F) and a pointer to cellvec in each fourth. - int ndims; //Number of pointers (fourth dimensions) to pointer. - } TSdfourthvec; - //=== Complex types. - typedef struct { - TSdvector *real; //Real part. - TSdvector *imag; //Imaginary part. - } TSdzvector; - typedef struct { - TSdmatrix *real; //Real part. - TSdmatrix *imag; //Imaginary part. - } TSdzmatrix; - - - - //----------------- Some high-level functions. ----------------- - int fn_locofyearqm(int q_m, int yrstart, int qmstart, int yrend, int qmend); - - - - - //--------------- - void fn_DisplayError(char *msg_s); - void *m_alloc(size_t size); - void *c_alloc(size_t elt_count, size_t elt_size); - - /** - TSvoidvector *CreateVector_void(int _n); - TSvoidvector *DestroyVector_void(TSvoidvector *x_voidv); - /**/ - - TScvector *CreateVector_c(int _n); - TScvector *DestroyVector_c(TScvector *x_s); - TSivector *CreateVector_int(int _n); - TSivector *DestroyVector_int(TSivector *x_iv); - TSimatrix *CreateMatrix_int(int nrows, int ncols); - TSimatrix *DestroyMatrix_int(TSimatrix *x_im); - TSicellvec *CreateCellvec_int(TSivector *n_iv); - TSicellvec *DestroyCellvec_int(TSicellvec *x_icv); - TSicell *CreateCell_int(TSivector *row_iv, TSivector *col_iv); - TSicell *DestroyCell_int(TSicell *x_ic); - - TSdvector *CreateVector_lf(int _n); - TSdvector *DestroyVector_lf(TSdvector *x_iv); - TSdmatrix *CreateMatrix_lf(int nrows, int ncols); - TSdmatrix *DestroyMatrix_lf(TSdmatrix *x_im); - TSdcell *CreateCell_lf(TSivector *row_iv, TSivector *col_iv); - TSdcell *DestroyCell_lf(TSdcell *x_dc); - TSdcellvec *CreateCellvec_lf(TSivector *n_iv); - TSdcellvec *DestroyCellvec_lf(TSdcellvec *x_dcv); - TSdfourth *CreateFourth_lf(int ndims, TSivector *row_iv, TSivector *col_iv); - TSdfourth *DestroyFourth_lf(TSdfourth *x_d4); - TSdfourthvec *CreateFourthvec_lf(int ndims, TSivector *n_iv); - TSdfourthvec *DestroyFourthvec_lf(TSdfourthvec *x_d4v); - - TSdzvector *CreateVector_dz(int _n); - TSdzvector *DestroyVector_dz(TSdzvector *x_dzv); - TSdzmatrix *CreateMatrix_dz(int nrows, int ncols); - TSdzmatrix *DestroyMatrix_dz(TSdzmatrix *x_dzm); - - //+ - TSdmatrix *CreateZeroMatrix_lf(const int nrows, const int ncols); - TSdmatrix *CreateIdentityMatrix_lf(const int nrows, const int ncols); - //TSdvector *CreateZerosVector_lf(int _n); - TSivector *CreateConstantVector_int( const int _n, const int _k); - TSimatrix *CreateConstantMatrix_int(const int nrows, const int ncols, const int _n); - TSicellvec *CreateConstantCellvec_int(TSivector *n_iv, const int _n); - TSicell *CreateConstantCell_int(TSivector *row_iv, TSivector *col_iv, const int _n); - TSdvector *CreateConstantVector_lf(const int _n, const double _alpha); - TSdmatrix *CreateConstantMatrix_lf(const int nrows, const int ncols, const double _alpha); - TSdcellvec *CreateConstantCellvec_lf(TSivector *n_iv, const double _alpha); - TSdcell *CreateConstantCell_lf(TSivector *row_iv, TSivector *col_iv, const double _alpha); - TSdvector *CreateDatesVector_lf(int nq_m, int yrstart, int qmstart, int yrend, int qmend); - //+ - void InitializeConstantVector_lf(TSdvector *x_dv, const double _alpha); - void InitializeConstantVector_int(TSivector *x_iv, const int _k); - void InitializeConstantMatrix_lf(TSdmatrix *x_dm, const double _alpha); - void InitializeDiagonalMatrix_lf(TSdmatrix *x_dm, const double _alpha); - void InitializeConstantMatrix_int(TSimatrix *x_dm, const int _alpha); - void InitializeConstantCellvec_lf(TSdcellvec *x_dcv, const double _alpha); - void InitializeConstantCell_lf(TSdcell *x_dc, const double _alpha); - void InitializeConstantFourthvec_lf(TSdfourthvec *x_d4v, const double _alpha); - void InitializeConstantFourth_lf(TSdfourth *x_d4, const double _alpha); - - - void NegateColofMatrix_lf(TSdvector *y_dv, TSdmatrix *x_dm, int _j); - void InitializeConstantColofMatrix_lf(TSdmatrix *X_dm, int jx, double _alpha); - - FILE *tzFopen(char *filename, char *mode); -#endif diff --git a/MathematicaFiles/Applications/BayesianDistributions.m b/MathematicaFiles/Applications/BayesianDistributions.m deleted file mode 100755 index 74e6c870d905974a9adcaf96fc9250fdc1706c87..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/BayesianDistributions.m +++ /dev/null @@ -1,259 +0,0 @@ -(* Additional distributions for Bayesian analysis. *) - -(* :Reference: - Bayesian Data Analysis (BDA) - by Gelman, Carlin, Stern, and Rubin, 2nd ed., 2003, Chapman & Hall/CRC. - - Notes: - BDA Gamma(a, b) is equivalent to GammaDistribution[a, 1/b]. - BDA Neg-bin(a, b) is equivalent to NegativeBinomial[a, b/(1+b)]. -*) - -(* two useful definitions *) -Logit[x_] := Log[x/(1 - x)] -InverseLogit[z_] := E^z/(1 + E^z) - -Needs["MultivariateStatistics`"] - -GammaDistributionBDA /: - f_[GammaDistributionBDA[a_, b_], x___] := f[GammaDistribution[a, 1/b], x] - -NegativeBinomialDistributionBDA /: - f_[NegativeBinomialDistributionBDA[a_, b_], x___] := - f[NegativeBinomialDistribution[a, b/(1 + b)], x] - -InverseGammaDistributionBDA /: - f_[InverseGammaDistributionBDA[a_, b_], x___] := - f[InverseGammaDistribution[a, 1/b], x] - -(* InverseGammaDistribution *) -InverseGammaDistribution /: - PDF[InverseGammaDistribution[a_, b_], x_] := - x^(-1 - a)/(b^a * E^(1/(b * x)) * Gamma[a]) - -InverseGammaDistribution /: - CDF[InverseGammaDistribution[a_, b_], x_] := Gamma[a, 1/(b*x)]/Gamma[a] - -InverseGammaDistribution /: - Mean[InverseGammaDistribution[a_, b_]] := 1/((a - 1) * b) - -InverseGammaDistribution /: - Variance[InverseGammaDistribution[a_, b_]] := 1/((a - 2)*(a - 1)^2 * b^2) - -InverseGammaDistribution /: - RandomReal[InverseGammaDistribution[a_, b_]] := - 1/RandomReal[GammaDistribution[a, b]] - -InverseGammaDistribution /: - RandomReal[InverseGammaDistribution[a_, b_], n_] := - 1/RandomReal[GammaDistribution[a, b], n] - -(* InverseChiSquareDistribution *) - -InverseChiSquareDistribution /: - PDF[InverseChiSquareDistribution[n_], x_] := - x^(-1 - n/2)/(2^(n/2) * E^(1/(2*x))*Gamma[n/2]) - -InverseChiSquareDistribution /: - CDF[InverseChiSquareDistribution[n_], x_] := - Gamma[n/2, 1/(2*x)]/Gamma[n/2] - -InverseChiSquareDistribution /: - Mean[InverseChiSquareDistribution[n_]] := 1/(n - 2) - -InverseChiSquareDistribution /: - Variance[InverseChiSquareDistribution[n_]] := 2/((n - 2)^2 * (n - 4)) - - -InverseChiSquareDistribution /: - RandomReal[InverseChiSquareDistribution[n_]] := - 1/RandomReal[ChiSquareDistribution[n]] - -InverseChiSquareDistribution /: - RandomReal[InverseChiSquareDistribution[nu_], n_] := - 1/RandomReal[ChiSquareDistribution[nu], n] - -(* InverseChiSquareScaledDistributionBDA *) -InverseChiSquareScaledDistributionBDA /: - f_[InverseChiSquareScaledDistributionBDA[n_, v_], x___] := - f[InverseGammaDistributionBDA[n/2, (n/2) * v], x] - -(* InverseChiSquareScaledDistribution *) -InverseChiSquareScaledDistribution /: - f_[InverseChiSquareScaledDistribution[n_, v_], x___] := - f[InverseGammaDistribution[n/2, 1/((n/2) * v)], x] - -InverseWishartDistribution /: - RandomReal[InverseWishartDistribution[args__]] := - 1/RandomReal[WishartDistribution[args]]; - -InverseWishartDistribution /: - RandomReal[InverseWishartDistribution[args__], n_] := - 1/RandomReal[WishartDistribution[args], n] - -WishartDistributionBDA::usage = "WishartDistributionBDA[sigma, n] -represents the Wishart distribution for Random and RandomArray." - -WishartDistributionBDA /: - RandomReal[WishartDistributionBDA[S_, n_Integer]] := - Transpose[#].# & @ - RandomReal[MultinormalDistribution[Table[0, {Length[S]}], S], n] - -WishartDistributionBDA /: - RandomReal[WishartDistributionBDA[S_, n_Integer], num_Integer] := - Transpose[#].# & /@ - RandomReal[MultinormalDistribution[Table[0, {Length[S]}], S], {num, n}] - -InverseWishartDistributionBDA::usage = -"InverseWishartDistributionBDA[sigma, n] represents the inverse -Wishart distribution for Random and RandomArray." - -InverseWishartDistributionBDA /: - RandomReal[InverseWishartDistributionBDA[S_, n_Integer]] := - 1/RandomReal[WishartDistributionBDA[S, n]] - -InverseWishartDistributionBDA /: - RandomReal[InverseWishartDistributionBDA[S_, n_Integer], num_Integer] := - 1/RandomReal[WishartDistributionBDA[S, n], num] - -(* multivariate t distribution - Gary Koop (2003) Bayesian Econometrics by (p. 328) *) -MultiTDistribution /: - PDF[MultiTDistribution[mu_?VectorQ, sigma_?MatrixQ, nu_], y_?VectorQ] /; - Length[mu] == Length[y] == Length[sigma] := - With[{k = Length[y]}, - (nu^(nu/2) * (nu + (y - mu).Inverse[sigma].(y - mu))^((-k - nu)/2) * - Gamma[(k + nu)/2])/(Pi^(k/2) * Sqrt[Det[sigma]] * Gamma[nu/2]) - ] - -(* Borrowed from Dan Waggoner. - gamma density for x|a: x^(a-1) * Exp[-x]/Gamma[a] - - a = 1, exponential - a < 1, Johnk's generator (Devroye, page 418) - a > 1, Beta's algorithm (Devroye, page 410) - - Devroye (1986) "Non-uniform random variate generation", Springer-Verlag. - - Use b*x to obtain general gamma deviate (i.e., GammaDistribution[a, b]). -*) - -(* -GammaDeviateFunction = - Function[a, - Module[{u, v, x, y, b, w, z}, - Catch[ - If[a == 1, Throw[-Log[Random[]]]]; - If[a < 1, - u = 1/a; - v = 1/(1 - a); - While[True, - x = Random[]^u; - y = Random[]^v; - If[x + y <= 1, - Throw[-Log[Random[]] * x/(x + y)] - ] - ] - ]; - While[True, - b = a - 1; - u = Random[]; - w = u(1 - u); - y = Sqrt[(3a - .75)/w](u - .5); - x = b + y; - If[x > 0, - v = Random[]; - z = 64 w^3 * v^2; - If[(z <= 1 - 2 * y^2/x) || (Log[z] <= 2(b * Log[x/b] - y)), - Throw[x] - ] - ] - ] (* end While *) - ]]] (* end Catch, Module, and Function *) - -GammaDeviateCompiled = - With[{f = GammaDeviateFunction}, - Compile[{a, b}, - b * f[a] - ] - ] - -DirichletCompiled = - With[{f = GammaDeviateFunction}, - Compile[{{a, _Real, 1}}, - #/(Plus @@ #)&[f /@ a] - ] - ]; - -DirichletArrayCompiled = - With[{f = GammaDeviateFunction}, - Compile[{{a, _Real, 1}, {n, _Integer, 0}}, - Table[#/(Plus @@ #)&[f /@ a], {n}] - ] - ]; - -(* more artful stuff: Compiling generating student t vectors with integer - degrees of freedom with the "option" of just Gaussian *) -CompileNormalizedFunction[ - n_Integer?Positive, (* length of random vector *) - df_Integer (* degrees of freedom for t distribution *) - ] := - - With[{fun = - If[df == 0, (* determine which function to use *) - (* then: do "nothing" *) - 1 &, - (* else: normalized chi-square *) - 1/Sqrt[(#.#)&[Table[Sqrt[-2 Log[Random[]]] Cos[2 Pi Random[]], {#}]]/#]& - ]}, - - Compile[{}, - fun[df] * (* use the function *) - Table[Table[Sqrt[-2 Log[Random[]]] Cos[2 Pi Random[]], {n}]] - ]] - -erfc[x_] := - Module[{z = Abs[x], t=1.,ans=1.}, - t= 1/(1+.5*z); - ans=t*Exp[-z*z-1.26551223+t*(1.00002368+t*(.37409196+t*(.09678418+ - t*(-.18628806+t*(.27886807+t*(-1.13520398+t*(1.48851587+t*(-.82215223+t*.\ - 17087277))))))))]; - If[x >= 0, ans, 2-ans] - ] - -cdfnorm[x_]:= - Module[{z = Abs[x/Sqrt[2.]], t=1., ans=1.}, - t = 1/(1+.5*z); - ans = t * Exp[-z*z - - 1.26551223 + - t*( 1.00002368 + - t*( 0.37409196 + - t*( 0.09678418 + - t*(-0.18628806 + - t*( 0.27886807 + - t*(-1.13520398 + - t*( 1.48851587 + - t*(-0.82215223 + - t* 0.17087277))))))))]; - If[x >= 0, 1 - ans/2, ans/2] - ] - -cdffun = Function[x, - Module[{z = Abs[x/Sqrt[2.]], t=1., ans=1.}, - t = 1/(1+.5*z); - ans = t * Exp[-z*z - - 1.26551223 + - t*( 1.00002368 + - t*( 0.37409196 + - t*( 0.09678418 + - t*(-0.18628806 + - t*( 0.27886807 + - t*(-1.13520398 + - t*( 1.48851587 + - t*(-0.82215223 + - t* 0.17087277))))))))]; - If[x >= 0, 1 - ans/2, ans/2] - ]]; - -*) - diff --git a/MathematicaFiles/Applications/BinnedKernelDensity.m b/MathematicaFiles/Applications/BinnedKernelDensity.m deleted file mode 100755 index 3f444a7f1a69b0e8a28882a1a13cd22fb3d4e2e5..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/BinnedKernelDensity.m +++ /dev/null @@ -1,1110 +0,0 @@ -(* :Title: Binned Kernel Density *) - -(* :Author: Mark Fisher *) - -(* :Mathematica Version: 5.1 *) - -(* :Context: BinnedKernelDensity` *) - -(* :Package Version: - 1.0 July 1999 - 1.1 September 2002 - 1.2 January 2005 - Modified to take advantage of SparseArray in SimpleBinning -*) - -(* :Summary: This package combines a modified version of BinCounts -(from Statistics`DataManipulation`) along with ListCorrelate (new in version -4.0) to compute binned kernel density (and regression) estimators. -These are also known as WARP-ed estimators (Weighted Average of -Rounded Points). Two binning rules and six kernels are implemented. -The binned kernel density is designed to work with multi-dimensional -data. - -I prefer this to the Histogram function introduced in version 4.0 in -Graphics`Graphics`. -*) - -(* :Discussion: -The binned kernel density (and regression) estimators have the -following structure: (1) bin the data, (2) weight the bins, and (3) -interpolate. - -The two binning rules are simple binning and linear binning. For -simple binning, the function SimpleBinning (defined in this package) -is used rather than BinCounts (defined in the standard package -Statistics`DataManipulation`). SimpleBinning is a modification to -BinCounts that speeds it up for high dimensional cases -where the density of non-zero bins is low. The modification involves -directly Scan-ing the Split list of indexes, combining the in-bounds -test with the updating of the bin counts. As a result, only non-zero -bins are visited. The function LinearBinning works similarly to -SimpleBinning, except that a fraction of each observation is binned -in adjacent bins. - -Five kernels are implemented for weighting the bins: uniform, -triange, Epanechnikov, quartic, triweight, and cosinus. The bin weighting -relies on ListCorrelate, which was introduced in version 4.0. -*) - -(* :Sources: -Wolfgang Hardle (1990), Smoothing techniques with implementation in S, - Springer-Verlag. - -Peter Hall and M.P. Wand (1994), "On the accuracy of binned kernel - density estimators," University of New South Wales, Australian - Graduate School of Management, Working Paper 93-003. -*) - -(* :Requirements: This package imports the following standard packages: - Graphics`Graphics`, Graphics`Colors`, Graphics`ContourPlot3D`, - Utilities`FilterOptions`, and Statistics`DescriptiveStatistics`. *) - -(* :Warning: This package overrides the definition of Histogram in -Graphics`Graphics that was introduced in version 4.0. *) - -BeginPackage["BinnedKernelDensity`", {(*"Graphics`Graphics`", - "Graphics`Colors`", "Graphics`ContourPlot3D`", - "Statistics`DescriptiveStatistics`",*) - "Utilities`FilterOptions`", "DotPlot`"}] - -Remove[Histogram] (* eliminate Version 4 Histogram in Graphics`Graphics` *) - -Histogram::usage = "Histogram[data, {min, max, h}] plots a histogram of the -data with bin width h, where min and max are the midpoints of the lowest -and highest bins. Values x \[Element] data are included if (min - h/2) <= x -< (max + h/2). Histogram[data, n] plots a histogram with n bins, where min -= Min[data] and max = Max[data]. Histogram[data] plots a histogram with 20 -bins. Histogram[data, {h, x0}] plots a histogram with bin width h and bin -\"origin\" x0. Histogram[data, {h}] plots a histogram with bin width h and -\"origin\" 0. Histogram[data, {{min, max}, n}] plots a histogram with n -bins and a minimum of min and a maximum of max. Histogram takes the options -PlotFrequencies, which specifies whether to plot relative frequencies of -the data, and Outline, which specifies whether to draw the ouline of the -histogram instead of the bars. The default settings are PlotFrequencies -> -True and Outline -> True." - -ConditionalPlot::usage = "ConditionalPlot[data, {min, max, h}] takes -a list of {x,y} pairs, bins the x-coordinates and produces a line plot -of the mean of the y-coordinates for each of the bins. ConditionalPlot -take the option Function. The default setting is Function -> Mean." - -BinnedDensityPlot::usage = "BinnedDensityPlot[data,{n, m}] produces a - density plot of the data binned into n by m bins. - BinnedDensityPlot[data, n] uses n by n bins. - BinnedDensityPlot[data] uses 20 by 20 bins." - -PlotFrequencies::usage = "PlotFrequencies is an option for Histogram and - BinnedDensityPlot. The default setting PlotFrequencies -> True specifies - that relative frequencies should be used." - -BinnedSurfacePlot::usage = "BinnedSurfacePlot[data,{n, m}] produces a - surface plot of the data binned into n by m bins. - BinnedSurfacePlot[data, n] uses n by n bins. - BinnedSurfacePlot[data] uses 20 by 20 bins." - -BinnedContourPlot::usage = "BinnedContourPlot[data,{n, m}] produces a - surface plot of the data binned into n by m bins. - BinnedContourPlot[data, n] uses n by n bins. - BinnedContourPlot[data] uses 20 by 20 bins." - -Outline::usage = "Outline is an option for Histogram which specifies -whether to draw only the outline instead of the bars." - -RuleOfThumbBinwidth::usage = "RuleOfThumbBinwidth[data] returns the -rule-of-thumb binwidth for the data based on the sample size and the -minimum of the estimated standard deviation and the adjusted interquartile -range." - -BinwidthFactor::usage = "BinwidthFactor is an option of BinnedKernelDensity -and related functions which specifies how to scale the RuleOfThumbBinWidth. -The default setting is BinwidthFactor -> 1." - -DefaultBins::usage = "DefaultBins[data]." - -BinnedKernelDensity::usage = "BinnedKernelDensity[data, {h, M}...] - computes the Binned density estimator where h is the bandwidth - (binwidth) and M is the number of subdivisions. (BinnedKernelDesity - approaches a kernel density estimate as M increases.) A separate {h, M} - pair must be specified for each dimension of the data. - If no {h, M} pairs are specified, default values derived from - RuleOfThumbBinwidth with M = 5 are used. - BinnedKernelDensity returns an InterpolatingFunction." - -Normalize::usage = "Normalize is an option for BinnedKernelDensity and - related functions. The default setting Normalize -> True specifies - that relative frequencies should be used." - -BinningRule::usage = "BinningRule is an option for BinnedKernelDensity - and related functions that specifies which binning rule to use. - Valid binning rules are SimpleBinning and LinearBinning." - -SimpleBinning::usage = "SimpleBinning[data, {min, max, dx}] returns a -SparseArray object containing the bin counts. The left-hand edge of the -smallest bin is located at min and the number of bins equals Round[(max- -min)/dx]. Values x \[Element] data are included if min <= x < min + -dx \[Times] Round[(max - min)/dx], where dx is the bin width." - -LinearBinning::usage = "LinearBinning[data, {min, max, dx}]." - -BinArray::usage = "BinArray is an object that contains a -SparseArray and mesh information. BinArray is also an option -for SimpleBinning and LinearBinning that specifies whether -to produce a BinArray." - -KernelArray::usage = "KernelArray is an object that contains -a normalized SparseArray, mesh information, and a kernel." - -MakeKernelArray::usage = "MakeKernelArray[data, {h, M}..] returns -a KernelArray object." - -WeightedBinning::usage = "WeightedBinning[data, weights, {min, max, dx}] -returns a list of bin counts using the weights. Also, -WeightedBinning[weights][data, {min, max, dx}], which allows -BinningRule -> WeightedBinning[weights] to be used." - -Kernel::usage = "Kernel is an option for BinnedKernelDensity and - BinnedKernelRegression. The default setting is Kernel -> - TriangleKernel. Other valid weighting functions are - UniformKernel, TriangleKernel, EpanechnikovKernel, - QuarticKernel, and CosinusKernel." - -UniformKernel::usage = "UniformKernel is a weighting function for - BinnedKernelDensity and BinnedKernelRegression. For integer M, - UniformKernel[M] returns a list of 2M+1 weights normalized to sum - to M." - -TriangleKernel::usage = "TriangleKernel is a weighting function for - BinnedKernelDensity and BinnedKernelRegression. For integer M, - TriangleKernel[M] returns a list of 2M+1 weights normalized to sum - to M." - -EpanechnikovKernel::usage = "EpanechnikovKernel is a weighting - function for BinnedKernelDensity and BinnedKernelRegression. For - integer M, EpanechnikovKernel[M] returns a list of 2M+1 weights - normalized to sum to M." - -QuarticKernel::usage = "QuarticKernel is a weighting function for - BinnedKernelDensity and BinnedKernelRegression. For integer M, - QuarticKernel[M] returns a list of 2M+1 weights normalized to sum - to M." - -TriweightKernel::usage = "TriweightKernel is a weighting function for - BinnedKernelDensity and BinnedKernelRegression. For integer M, - TriweightKernel[M] returns a list of 2M+1 weights normalized to - sum to M." - -CosinusKernel::usage = "CosinusKernel is a weighting function for - BinnedKernelDensity and BinnedKernelRegression. For integer M, - CosinusKernel[M] returns a list of 2M+1 weights normalized to - sum to M." - -BinnedKernelRegression::usage = "BinnedKernelRegression[data, {h, M}]." - -BinnedKernelDensityPlot::usage = "BinnedKernelDensityPlot[data, {h, M}] - calls BinnedKernelDensity (which see). BinnedKernelDensityPlot takes - the option PlotType. The default setting is PlotType -> Plot3D. - Other valid types are ContourPlot and DensityPlot." - - -AverageShiftedHistogram::usage = "AverageShiftedHistogram[data] produces -an average shifted histogram." - -PlotType::usage = "PlotType is an option for BinnedKernelDensityPlot - that specifies the type of plot for two dimensional data. Valid - types are Plot3D, ContourPlot, and DensityPlot." - -BinnedKernelRegressionPlot::usage = "BinnedKernelRegressionPlot[data, - {h, M}]." - -InterpolatingFunctionPlot::usage = "InterpolatingFunctionPlot[ifun[args], - x] plots the interpolatign function over its range. A 2-dimensional - interpolating function can be plotted over 1 dimension by fixing one - argument numerically, as in ifun[2, x]." - -InterpolatingFunctionPlot3D::usage = - "InterpolatingFunctionPlot3D[ifun[args], x, y] plots the - InterpolationFunction over its range. A 3-dimensional interpolating - function can be plotted over 2 dimensions by fixing one argument - numerically, as in ifun[x, 2, y]." - -InterpolatingFunctionContourPlot::usage = - "InterpolatingFunctionContourPlot[ifun[args], x, y] plots the - InterpolationFunction over its range. A 3-dimensional interpolating - function can be plotted over 2 dimensions by fixing one argument - numerically, as in ifun[x, 2, y]." - -InterpolatingFunctionDensityPlot::usage = - "InterpolatingFunctionDensityPlot[ifun[args], x, y] plots the - InterpolationFunction over its range. A 3-dimensional interpolating - function can be plotted over 2 dimensions by fixing one argument - numerically, as in ifun[x, 2, y]." - -InterpolatingFunctionContourPlot3D::usage = - "InterpolatingFunctionContourPlot3D[ifun[args], x, y, z] plots - 3-dimensional contours of the InterpolationFunction over its range. A - 4-dimensional interpolating function can be plotted over 3 dimensions - by fixing one argument numerically, as in ifun[x, 2, y, z]." - -Begin["`Private`"] - -Histogram::baddata = "The data are not a list of two or more numbers." -ConditionalPlot::baddata = "The data are not a list of two or more pairs of numbers." - -Options[Histogram] = {PlotFrequencies -> True, Outline -> True, - BinningRule -> SimpleBinning} - -Histogram[data_, ___] := (Message[Histogram::baddata]; $Failed) - -ConditionalPlot[data_, ___] := (Message[ConditionalPlot::baddata]; $Failed) - -Histogram[data_?(VectorQ[#, NumericQ]&), {{min_, max_}, nbins_Integer}, - opts___?OptionQ] := - With[{h = (max - min)/nbins}, - Histogram[data, {min + h/2, max - h/2, h}, opts] - ] - -ConditionalPlot[data_?(MatrixQ[#, NumericQ]&), {{min_, max_}, nbins_Integer}, - opts___?OptionQ] := - With[{h = (max - min)/nbins}, - ConditionalPlot[data, {min + h/2, max - h/2, h}, opts] - ] - -Histogram[data_?(VectorQ[#, NumericQ]&), opts___?OptionQ] := - Histogram[data, 20, opts] - -ConditionalPlot[data_?(MatrixQ[#, NumericQ]&), opts___?OptionQ] := - ConditionalPlot[data, 20, opts] - -(* -Histogram[data_?(VectorQ[#, NumericQ]&), nbins_Integer?Positive, - opts___?OptionQ] := - Module[{min = Min[data], max = Max[data], h}, - h = (max - min)/(nbins - 1); - Histogram[data, {min - h/2, max + h/2, h}, opts] - ] /; nbins > 1 -*) - -Histogram[data_?(VectorQ[#, NumericQ]&), nbins_Integer?Positive, - opts___?OptionQ] := - Module[{min = Min[data], max = Max[data], h}, - h = (max - min)/(nbins - 1); - Histogram[data, {min, max, h}, opts] - ] /; nbins > 1 - -ConditionalPlot[data_?(MatrixQ[#, NumericQ]&), nbins_Integer?Positive, - opts___?OptionQ] := - Module[{min = Min[data], max = Max[data], h}, - h = (max - min)/(nbins - 1); - ConditionalPlot[data, {min, max, h}, opts] - ] /; nbins > 1 - -(* h is the bin width and x0 is the "origin" *) -Histogram[data_?(VectorQ[#, NumericQ]&), {h_, x0_}, opts___?OptionQ] := - Module[{min = Min[data], max = Max[data], first, last}, - {first, last} = x0 + h/2 + Floor[(# - x0)/h]*h & /@ {min, max}; - Histogram[data, {first, last, h}, opts] - ] /; h > 0 - -ConditionalPlot[data_?(MatrixQ[#, NumericQ]&), {h_, x0_}, opts___?OptionQ] := - Module[{min = Min[data], max = Max[data], first, last}, - {first, last} = x0 + h/2 + Floor[(# - x0)/h]*h & /@ {min, max}; - ConditionalPlot[data, {first, last, h}, opts] - ] /; h > 0 - -(* h is the bin width *) -Histogram[data_?(VectorQ[#, NumericQ]&), {h_}, opts___?OptionQ] := - Histogram[data, {h, 0}, opts] - -ConditionalPlot[data_?(MatrixQ[#, NumericQ]&), {h_}, opts___?OptionQ] := - ConditionalPlot[data, {h, 0}, opts] - -(* -Histogram[data_?(VectorQ[#, NumericQ]&), {min_, max_, h_}, - opts___?OptionQ] := - Module[{freq, brule, height, max1, gopts, ds, ps, line, width, pos, pts}, - {freq, brule} = {PlotFrequencies, BinningRule} /. {opts} /. - Options[Histogram]; - height = brule[data, {min, max, h}]; -(* these next two lines need some thought *) - If[Max[data] == max, height[[-1]]++]; (* for discrete data *) - max1 = min + h * Length[height]; - (*If[Last[height] == 0, height = Drop[height, -1]]; (* last bin empty *)*) - If[TrueQ[freq], height = height/(h Length[data])]; - If[TrueQ[Outline /. {opts} /. Options[Histogram]], - (* then *) - gopts = FilterOptions[Graphics, opts]; - ds = Sequence @@ Cases[{gopts}, f_[DisplayFunction, _]]; - ps = PlotStyle /. {opts}; - Which[Head[ps] === List, ps = Sequence @@ ps, - ps === PlotStyle, ps = Sequence[]]; - If[TrueQ[FrequencyPolygon /. {opts} /. Options[Histogram]], - line = Transpose[ - {Range[min-h/2, max1+h/2, h], Join[{0}, height, {0}]}], - line = Join[ - {{min, 0}}, - Flatten[Thread /@ - Transpose[{Partition[Range[min, max1, h], 2, 1], height}], - 1], - {{max, 0}}] - ]; - line = Flatten[Union /@ Split[line, #1[[2]] == #2[[2]] &][[All, {1, -1}]], 1]; - Show[Graphics[{ps, Line[line]}], gopts, - Frame -> {True, True, False, False}, - DisplayFunction -> $DisplayFunction], - (* else *) - width = Table[h, {Length[height]}]; - pos = Range[min + h/2, max1 - h/2, h]; - pts = Transpose[{pos, height, width}]; - GeneralizedBarChart[pts, Evaluate[FilterOptions[Plot, opts]], - AxesOrigin -> {min, 0}, PlotRange -> All, BarStyle -> {White}] - ] - ] /; max > min && h > 0 -*) - -Options[ConditionalPlot] = {Function -> Mean} - -ConditionalPlot[data:{{_?NumericQ,_?NumericQ}..}, {min_, max_, h_}, - opts___?OptionQ] := - Module[{gopts, ps, min1, max1, index, groups, fun, fg, uindex, - midpoints, hends, hlines, vpos, irules, ipos, vlines}, - gopts = FilterOptions[Graphics, opts]; - ps = PlotStyle /. {opts}; - Which[Head[ps] === List, ps = Sequence @@ ps, - ps === PlotStyle, ps = Sequence[]]; - min1 = min - h/2; - max1 = max + h/2; - index = Floor[(data[[All, 1]] - min1)/h] + 1; - groups = #[[All, 2]]& /@ - Split[Sort[Transpose[{index, data[[All, 2]]}]], #1[[1]] == #2[[1]] &]; - fun = Function /. {opts} /. Options[ConditionalPlot]; - fg = fun /@ groups; - uindex = Union[index]; - midpoints = min + h(uindex - 1); - hends = Transpose[{midpoints - h/2, midpoints + h/2}]; - hlines = Line /@ (Thread /@ Transpose[{hends, fg}]); - vpos = Flatten[Partition[#, 2, 1] & /@ - Select[Split[uindex, #1 + 1 == #2 &], Length[#] >= 2 &], 1]; - irules = Rule @@@ Transpose[{uindex, fg}]; - ipos = Flatten[Position[uindex, Alternatives @@ vpos[[All, 1]]]]; - vlines = Line /@ (Thread /@ Transpose[{midpoints[[ipos]] + h/2, vpos /. irules}]); - Show[Graphics[{ps, hlines, vlines}], gopts] - ] - -(* main engine *) -(* min and max are the midpoints of the bottom and top bins *) -Histogram[data_?(VectorQ[#, NumericQ]&), {min_, max_, h_}, - opts___?OptionQ] := - Module[{freq, brule, gopts, ps, min1, max1, height, - ar, z1, z2, v1, w1, w2, line0, outline, droplines, bottomline}, - {freq, brule} = {PlotFrequencies, BinningRule} /. {opts} /. - Options[Histogram]; - gopts = FilterOptions[Graphics, opts]; - ps = PlotStyle /. {opts}; - Which[Head[ps] === List, ps = Sequence @@ ps, - ps === PlotStyle, ps = Sequence[]]; - min1 = min - h/2; - max1 = max + h/2; - height = brule[data, {min1, max1, h}]; - If[TrueQ[freq], height = height/(h Length[data])]; - ar = Most[ArrayRules[height]]; - z1 = Split[ar[[All, 1, 1]], #1 + 1 == #2 &][[All, {1, -1}]]; - z2 = {Union[{1, -1} + #], 0} & /@ Partition[Take[Flatten[z1], {2, -2}], 2]; - v1 = {Union[#[[1, {1, -1}]]], #[[2, 1]]} & /@ - (Transpose /@ Split[ar /. ({x_} -> y_) -> {x, y}, #1 + {1, 0} == #2 &]); - w1 = Sort[Join[v1, z2], #1[[1, 1]] < #2[[1, 1]] &]; - w2 = {min1 + (#[[1]] - 1) h, min1 + #[[-1]] h} & /@ w1[[All, 1]]; - line0 = Flatten[MapThread[Thread[{##}] &, {w2, w1[[All, 2]]}], 1]; - outline = Line[Join[{{line0[[1, 1]], 0}}, line0, {{line0[[-1, 1]], 0}}]]; - If[TrueQ[Outline /. {opts} /. Options[Histogram]], - droplines = bottomline = {}, - (* else *) - droplines = Line[{{min1 + (#[[1, 1]] - 1)h, #[[2]]}, - {min1 + (#[[1, 1]] - 1)h, 0}}] & /@ Rest[ar]; - bottomline = Line[{{min1 + (ar[[1, 1, 1]] - 1)h, 0}, - {min1 + ar[[-1, 1, 1]]h, 0}}] - ]; - Show[Graphics[{ps, outline, droplines, bottomline}], - gopts, - AspectRatio -> 1/GoldenRatio, - Frame -> {True, True, False, False}, - DisplayFunction -> $DisplayFunction] - ] /; max > min && h > 0 - -Options[BinnedDensityPlot] = { - PlotFrequencies -> True, - BinningRule -> SimpleBinning} - -BinnedDensityPlot[data_?(MatrixQ[#, NumericQ]&), opts___?OptionQ] := - BinnedDensityPlot[data, 20, opts] - -BinnedDensityPlot[data_?(MatrixQ[#, NumericQ]&), nbins_Integer, - opts___?OptionQ] := - BinnedDensityPlot[data, Table[nbins, {Length[First[data]]}], opts] - -BinnedDensityPlot[data_?(MatrixQ[#, NumericQ]&), - nbins:{_Integer ..}, opts___?OptionQ] := - Module[{freq, brule, popts, tdata, min, max, h, height, mesh}, - {freq, brule} = {PlotFrequencies, BinningRule} /. {opts} /. - Options[BinnedDensityPlot]; - popts = FilterOptions[ListDensityPlot, opts]; - tdata = Transpose[data]; - min = Min /@ tdata; - max = Max /@ tdata; - h = (max - min)/(nbins - 1); - height = brule[data, Sequence @@ Transpose[{min-h/2, max+h/2, h}]]; - If[TrueQ[freq], height = height/((Times@@h) Length[data])]; - mesh = Transpose[{min-h/2, max+h/2}]; - mesh = Transpose[{min, max}]; - ListDensityPlot[Transpose[height], Evaluate[popts], - InterpolationOrder -> 0, - DataRange -> mesh, - Mesh -> False, - PlotRange -> All, - ColorFunction -> (GrayLevel[1-#^.5]&) - ] - ] /; Length[First[data]] == Length[nbins] - -BinnedSurfacePlot[data_?(MatrixQ[#, NumericQ]&), opts___?OptionQ] := - SurfaceShow[{data}, opts] - -BinnedSurfacePlot[data_?(MatrixQ[#, NumericQ]&), nbins_Integer, - opts___?OptionQ] := - SurfaceShow[{data, nbins}, opts] - -BinnedSurfacePlot[data_?(MatrixQ[#, NumericQ]&), - nbins:{_Integer ..}, opts___?OptionQ] := - SurfaceShow[{data, nbins}, opts] /; Length[First[data]] == Length[nbins] - -BinnedContourPlot[data_?(MatrixQ[#, NumericQ]&), opts___?OptionQ] := - ContourShow[{data}, opts] - -BinnedContourPlot[data_?(MatrixQ[#, NumericQ]&), nbins_Integer, - opts___?OptionQ] := - ContourShow[{data, nbins}, opts] - -BinnedContourPlot[data_?(MatrixQ[#, NumericQ]&), - nbins:{_Integer ..}, opts___?OptionQ] := - ContourShow[{data, nbins}, opts] /; Length[First[data]] == Length[nbins] - -(* private helper functions *) -SurfaceShow[{x__}, opts___?OptionQ] := - Show[SurfaceGraphics[ - Block[{$DisplayFunction = Identity}, - BinnedDensityPlot[x, opts] /. a : HoldPattern[SparseArray[__]] :> Normal[a] - ]], - FilterOptions[SurfaceGraphics, opts], - DisplayFunction -> $DisplayFunction, Axes -> True, - BoxRatios -> {1, 1, .4}] - -ContourShow[{x__}, opts___?OptionQ] := - Show[ContourGraphics[ - Block[{$DisplayFunction = Identity}, - BinnedDensityPlot[x, opts] /. a : HoldPattern[SparseArray[__]] :> Normal[a] - ]], - FilterOptions[ContourGraphics, opts], - DisplayFunction -> $DisplayFunction, AspectRatio -> 1, - PlotRange -> All, ContourShading -> False] - - -RuleOfThumbBinwidth[data_] := - 1.06 * Length[data]^(-1/5) * - Min[StandardDeviation[data], - (Quantile[data, .75] - Quantile[data, .25])/1.34] - -(* doesn't appear to be used *) -DefaultBins[data_] := DefaultBins[data, 20] - -DefaultBins[data_, n_Integer] := - With[{pdata = If[MatrixQ[data], data, Partition[data, 1]]}, - DefaultBins[pdata, Array[n&, Length[First[pdata]]]] - ] - -DefaultBins[data_, nbins:{_Integer ..}] := - Module[{tdata, min, max, h}, - tdata = Transpose[data]; - min = Min /@ tdata; - max = Max /@ tdata; - h = (max - min)/(nbins - 1); - Transpose[{min-h/2, max+h/2, h}] - ] - -(****** binned kernel density estimate ******) - -Options[BinnedKernelDensity] = {Kernel :> TriangleKernel, - BinningRule -> SimpleBinning, BinwidthFactor -> 2} - -(*BinnedKernelDensity[data_?VectorQ, hM:{_, _}, opts___?OptionQ] := - BinnedKernelDensity[Transpose[{data}], hM, opts]*) - -(* default versions use RuleOfThumbBinwidth *) - -BinnedKernelDensity[data_?VectorQ, opts___?OptionQ] := - With[{factor = BinwidthFactor /. {opts} /. Options[BinnedKernelDensity]}, - BinnedKernelDensity[ - data, - {factor * RuleOfThumbBinwidth[data], 5}, - opts] - ] - -BinnedKernelDensity[data_List, opts___?OptionQ] := - With[{factor = BinwidthFactor /. {opts} /. Options[BinnedKernelDensity]}, - BinnedKernelDensity[ - data, - Sequence @@ - Thread[{factor * (RuleOfThumbBinwidth /@ Transpose[data]), 5}], - opts] - ] - -(* -BinnedKernelDensity[data_?VectorQ, {h_, M_}, opts___?OptionQ] := - Module[{norm, weights, brule, liopts, dx, min, max, left, - right, height, adj, mesh}, - {norm, weights, brule} = {Normalize, Kernel, BinningRule} /. - {opts} /. Options[BinnedKernelDensity]; - liopts = FilterOptions[ListInterpolation, opts]; - dx = h/M; - min = Min[data]; - max = Max[data]; - {left, right} = dx {Floor[min/dx], Ceiling[max/dx] + 1}; - height = brule[data, {left, right, dx}]; - If[TrueQ[norm], height = height/(h Length[data])]; - height = ListCorrelate[weights[M], height, {-1, 1}, 0]; - adj = dx/2 - (M-1)dx; -(* height = ListCorrelate[weights[M], height, {-M, M}]; *) -(* adj = 0; *) - mesh = {left + adj, right - adj}; - ListInterpolation[height, {mesh}, liopts] - ] -*) - -(* -BinnedKernelDensity[data_List, hM:({_, _} ..), opts___?OptionQ] := - Module[{norm, weights, brule, liopts, h, M, dx, minmax, ends, - height, ker, adj, mesh}, - {norm, weights, brule} = {Normalize, Kernel, BinningRule} /. - {opts} /. Options[BinnedKernelDensity]; - liopts = FilterOptions[ListInterpolation, opts]; - {h, M} = N @ Transpose[{hM}]; - dx = h/M; - minmax = Through[{Min, Max}[#]] & /@ Transpose[data]; - ends = MapThread[#2{Floor[First[#1]/#2], Ceiling[Last[#1]/#2] + 1}&, - {minmax, dx}]; - height = brule[data, Sequence @@ MapThread[Append, {ends, dx}]]; - If[TrueQ[norm], height = height/((Times@@h) Length[data])]; - ker = Outer[Times, Sequence @@ (weights /@ M)]; - height = ListCorrelate[ker, height, {-1, 1}, 0]; - adj = MapThread[#1/2 - (#2-1)#1&, {dx, M}]; -(* height = ListCorrelate[ - Outer[Times, Sequence @@ (weights /@ M)], height, {-M, M}]; *) - mesh = MapThread[#1 + #2{1, -1}&, {ends, adj}]; - ListInterpolation[height, mesh, liopts] - ] -*) - -(* univariate *) -BinnedKernelDensity[data_?VectorQ, {h_, M_}, opts___?OptionQ] := - Module[{weights, brule, liopts, dx, min, max, - height, smooth}, - {weights, brule} = {Kernel, BinningRule} /. - {opts} /. Options[BinnedKernelDensity]; - liopts = FilterOptions[ListInterpolation, opts]; - dx = h/M; - min = Min[data]; - max = Max[data]; - height = brule[data, {min - dx/2, max + dx/2, dx}]; - height = height/(h Length[data]); - smooth = ListCorrelate[weights[M], height, {-1, 1}, 0]; - ListInterpolation[smooth, {{min - dx (M-1), max + dx (M-1)}}, liopts] - ] - -(* multivariate *) -BinnedKernelDensity[data_List, hM:({_, _} ..), opts___?OptionQ] := - Module[{weights, brule, liopts, h, M, dx, minmax, - height, ker, smooth}, - {weights, brule} = {Kernel, BinningRule} /. - {opts} /. Options[BinnedKernelDensity]; - liopts = FilterOptions[ListInterpolation, opts]; - {h, M} = N @ Transpose[{hM}]; - dx = h/M; - minmax = Through[{Min, Max}[#]] & /@ Transpose[data]; - height = brule[data, Sequence @@ MapThread[Append, {minmax, dx}]]; - height = height/((Times @@ h) Length[data]); - ker = Outer[Times, Sequence @@ (weights /@ M)]; - smooth = ListCorrelate[ker, height, {-1, 1}, 0]; - ListInterpolation[smooth, - Transpose[{minmax[[All,1]] - dx(M-1), minmax[[All,2]] + dx(M-1)}], - liopts] - ] - - -(****** kernels ******) - -UniformKernel = Compile[{n}, 2n/(2n - 1)Table[1/2, {i, 1 - n, n - 1}]] -TriangleKernel = Compile[{n}, Table[1 - Abs[i]/n, {i, 1 - n, n - 1}]] -EpanechnikovKernel = Compile[{n}, - (3n^2)/(4n^2-1)Table[1 - (i/n)^2, {i, 1 - n, n - 1}]] -QuarticKernel = Compile[{n}, - (15n^4)/(16n^4-1)Table[(1 - (i/n)^2)^2, {i, 1 - n, n - 1}]] -TriweightKernel = Compile[{n}, - (105n^6)/(14n^2+96n^6-5)Table[(1 - (i/n)^2)^3, {i, 1 - n, n - 1}]] -CosinusKernel = Compile[{n}, - n * Tan[Pi/(4*n)] * Table[Cos[(Pi/2)*(i/n)], {i, 1 - n, n - 1}]] - -(* work in progress: Covariance matrix {{s1, c}, {c, s2}} -EpanechnikovKernel2D[n_, s1_, s2_, c_] := - n^2 * - Table[Max[0, 1 - (s1(i/n)^2 - 2c (i/n)(j/n) + s2(j/n)^2)/(s1 s2 - c^2)], - {i, 1 - n, n - 1}, {j, 1 - n, n - 1}]/ - Sum[ Max[0, 1 - (s1(i/n)^2 - 2c (i/n)(j/n) + s2(j/n)^2)/(s1 s2 - c^2)], - {i, 1 - n, n - 1}, {j, 1 - n, n - 1}] -*) - -BinArray[mesh_List, sp_SparseArray][args__] := - Module[{rescaled, index, frac, box}, - dims = Dimensions[sp]; - rescaled = MapThread[Rescale[#1, #2, {1, #3}] &, {{args}, mesh, dims}]; - (* boundary issues *) - {index, frac} = Transpose @ - MapThread[Which[#1 < 1, {1, 0}, #1 > #2, {#2, 1}, True, {#1, #3}]&, - {IntegerPart[rescaled], dims - 1, FractionalPart[rescaled]}]; - box = Take[sp, Sequence @@ Transpose[{index, index + 1}]]; - ListInterpolation[Normal[box], Table[{0, 1}, {Length[{args}]}], - InterpolationOrder -> 1] @@ frac - ] - -MakeKernelArray[data_List, hM:({_, _} ..), opts___?OptionQ] := - Module[{weights, brule, h, M, dx, minmax, - height, ker, smooth}, - {weights, brule} = {Kernel, BinningRule} /. - {opts} /. Options[BinnedKernelDensity]; - {h, M} = N @ Transpose[{hM}]; - dx = h/M; - minmax = Through[{Min, Max}[#]] & /@ Transpose[data]; - height = brule[data, Sequence @@ MapThread[Append, {minmax, dx}]]; - height = height/((Times @@ h) Length[data]); - ker = Outer[Times, Sequence @@ (weights /@ M)]; - mesh = Transpose[{minmax[[All,1]] - dx(M-1), minmax[[All,2]] + dx(M-1)}]; - ] - -KernelArray[mesh_List, sp_SparseArray, ker_List][args___] := - Module[{rescaled, index, frac, bigbox, box}, - dims = Dimensions[sp]; - M = (Dimensions[ker]-1)/2 + 1; - rescaled = MapThread[Rescale[#1, #2, {1, #3}] &, {{args}, mesh, dims}]; - (* boundary issues *) - {index, frac} = Transpose @ - MapThread[Which[#1 < 1, {1, 0}, #1 > #2, {#2, 1}, True, {#1, #3}]&, - {IntegerPart[rescaled], dims - 1, FractionalPart[rescaled]}]; - bigbox = Take[sp, Sequence @@ Transpose[{index - M + 1, index + M}]]; - box = ListCorrelate[ker, bigbox]; - Print[{Normal@bigbox,box}]; - ListInterpolation[box, Table[{0, 1}, {Length[{args}]}], - InterpolationOrder -> 1] @@ frac - ] - -(****** binning rules ******) - -(****** simple binning ******) -(* SimpleBinning is modified from BinCounts in Statistics`DataManipulation *) - -(* older version: -(* this version is faster for univariate data *) -SimpleBinning[data_?(VectorQ[#, NumericQ]&), {min_, max_, h_}] := - Module[{nbins, count, index, split}, - nbins = Ceiling[(max - min)/h]; - index = Floor[(data - min)/h] + 1; (* include min *) - split = Split[Sort[index]]; - count = Array[0&, nbins]; - Scan[If[1 <= First[#] <= nbins, count[[ First[#] ]] = Length[#]]&, split]; - count - ] /; max > min && h > 0 - -SimpleBinning[data_?(MatrixQ[#, NumericQ]&), bins:({_, _, _}..)] := - Module[{min, max, h, nbins, index, split, count, unit}, - {min, max, h} = Transpose[{bins}]; - nbins = Ceiling[(max - min)/h]; - index = Floor[(# - min)/h& /@ data] + 1; (* include min *) - split = Split[Sort[index]]; - count = Array[0&, nbins]; - unit = Array[1&, Length[nbins]]; - Scan[If[And @@ Thread[unit <= First[#] <= nbins], - count[[ Sequence @@ First[#] ]] = Length[#]]&, split]; - count - ] /; Dimensions[data][[2]] == Length[{bins}] && MatrixQ[{bins}, NumericQ] -*) - -Options[SimpleBinning] = {BinArray -> False} - -(* this version is faster for univariate data *) -SimpleBinning[data_?(VectorQ[#, NumericQ]&), {min_, max_, h_}, - opts___?OptionQ] := - Module[{nbins, index, pairs, inbounds, sp}, - nbins = Round[(max - min)/h]; - index = Floor[(data - min)/h] + 1; (* include min *) - pairs = {First[#], Length[#]}& /@ Split[Sort[index]]; - inbounds = Pick[pairs, (1 <= # <= nbins)& /@ pairs[[All, 1]] ]; - sp = SparseArray[Rule @@@ inbounds, nbins]; - If[TrueQ[BinArray /. {opts} /. Options[SimpleBinning]], - BinArray[{{min, max}}, sp], - sp] - ] /; max > min && h > 0 - -SimpleBinning[data_?(MatrixQ[#, NumericQ]&), bins:({_, _, _}..), - opts___?OptionQ] := - Module[{min, max, h, nbins, index, pairs, inbounds, sp}, - {min, max, h} = Transpose[{bins}]; - nbins = Round[(max - min)/h]; - index = Floor[(# - min)/h& /@ data] + 1; (* include min *) - pairs = {First[#], Length[#]}& /@ Split[Sort[index]]; - inbounds = Pick[pairs, (And @@ Thread[(1 <= # <= nbins)])& /@ pairs[[All, 1]] ]; - sp = SparseArray[Rule @@@ inbounds, nbins]; - If[TrueQ[BinArray /. {opts} /. Options[SimpleBinning]], - BinArray[Transpose[{min, max}], sp], - sp] - ] /; Dimensions[data][[2]] == Length[{bins}] && MatrixQ[{bins}, NumericQ] - -SimpleBinning[data_, opts___] := - SimpleBinning[data, Sequence @@ DefaultBins[data], opts] - -SimpleBinning[data_, n_Integer, opts___] := - SimpleBinning[data, Sequence @@ DefaultBins[data, n], opts] - -SimpleBinning[data_?MatrixQ, nbins:{_Integer ..}, opts___] := - SimpleBinning[data, Sequence @@ DefaultBins[data, nbins], opts] - -(****** linear binning ******) - -Options[LinearBinning] = {BinArray -> False} - -(* this version is faster for univariate data *) -LinearBinning[data_?(VectorQ[#, NumericQ]&), {min_, max_, h_}, - opts___?OptionQ] := - Module[{nbins, scaled, index, frac, assigned, split, count}, - nbins = Round[(max - min)/h]; - scaled = (data - (min + h/2))/h; - index = Floor[scaled]; (* include min *) - frac = scaled - index; - assigned = Flatten[Transpose[{{index + 1, index + 2}, {1 - frac, frac}}, - {3, 1, 2}], 1]; - - inbounds = Select[assigned, 1 <= #[[1]] <= nbins &]; - split = Split[Sort[inbounds], First[#1] == First[#2] &]; - SparseArray[Rule@@Transpose[{#[[1,1]], Tr[#[[All,2]]]}& /@ split], nbins] - - (* - split = Split[Sort[assigned], First[#1] == First[#2]&]; - count = Array[0&, nbins]; - Scan[If[1 <= #[[1,1]] <= nbins, - count[[ #[[1,1]] ]] = Plus @@ (Last /@ #)]&, split]; - count - *) - ] /; max > min && h > 0 - -LinearBinning[data_:(MatrixQ[#, NumericQ]&), bins:({_, _, _}..), - opts___?OptionQ] := - Module[{min, max, h, nbins, d, scaled, index, frac, fracfun, - indexfun, ofrac, oindex, assigned, inbounds, split, count, unit}, - {min, max, h} = Transpose[{bins}]; - nbins = Round[(max - min)/h]; - d = Length[nbins]; - scaled = (# - (min + h/2))/h& /@ data; - index = Floor[scaled]; (* include min *) - indexfun = MakeIndexer[d]; - oindex = Flatten[indexfun @@@ index, 1]; - frac = scaled - index; - fracfun = MakeAssigner[d]; - ofrac = Flatten[fracfun @@@ frac]; - assigned = Transpose[{oindex, ofrac}]; - - inbounds = Select[assigned, And @@ Thread[1 <= #[[1]] <= nbins] &]; - split = Split[Sort[inbounds], First[#1] == First[#2]&]; - SparseArray[Rule@@Transpose[{#[[1,1]], Tr[#[[All, 2]]]}& /@ split], nbins] - (* - split = Split[Sort[assigned], First[#1] == First[#2]&]; - count = Array[0&, nbins]; - unit = Array[1&, d]; - Scan[If[And @@ Thread[unit <= #[[1,1]] <= nbins], - count[[ Sequence @@ #[[1,1]] ]] = Plus @@ Flatten[Last /@ #]]&, - split]; - count - *) - ] /; Dimensions[data][[2]] == Length[{bins}] && MatrixQ[{bins}, NumericQ] - -LinearBinning[data_, opts___] := - LinearBinning[data, Sequence @@ DefaultBins[data], opts] - -LinearBinning[data_, n_Integer, opts___] := - LinearBinning[data, Sequence @@ DefaultBins[data, n], opts] - -LinearBinning[data_?MatrixQ, nbins:{_Integer ..}, opts___] := - LinearBinning[data, Sequence @@ DefaultBins[data, nbins], opts] - -(* helper functions *) -MakeAssigner[d_] := MakeAssigner[d] = - Compile @@ {Array[x, d], - Flatten[Outer[Times, ##]& @@ Transpose[{1 - Array[x, d], Array[x, d]}]]} - -MakeIndexer[d_] := MakeIndexer[d] = - Compile @@ {Array[{x[#], _Integer}&, d], - Flatten[Outer[Plus, {Array[x, d] + 1}, UnitVertices[d], 1], 1]} - -UnitVertices[d_] := IntegerDigits[Range[0, 2^d - 1], 2, d] -(* 5.1 can use Tuples[{0, 1}, d] *) - -(* weighted binning *) -(* -WeightedBinCounts[data_?(MatrixQ[#, NumericQ] &), - {min_, max_, h_}] /; Dimensions[data][[2]] == 2 := - Module[{nbins, count, index, split}, - nbins = Ceiling[(max - min)/h]; - index = Floor[(data[[All, 1]] - min)/h] + 1; - split = Split[Sort[Transpose[{index, data[[All, 2]]}]], - #1[[1]] == #2[[1]] &]; - split1 = {#[[1, 1]], Tr[#[[2]]]} & /@ (Transpose /@ split); - count = Array[0 &, nbins]; - Scan[If[1 = First[#] = nbins, count[[First[#]]] = Last[#]] &, split1]; - count] /; max > min && h > 0 -*) - -WeightedBinning[weights_?(VectorQ[#, NumericQ] &)][ - data_, {min_, max_, h_}] := - WeightedBinning[data, weights, {min, max, h}] - -WeightedBinning[weights_?(VectorQ[#, NumericQ] &)][ - data_, bins:({_, _, _}..)] := - WeightedBinning[data, weights, bins] - -WeightedBinning[data_?(VectorQ[#, NumericQ] &), - weights_?(VectorQ[#, NumericQ] &), - {min_, max_, h_}] := - Module[{nbins, count, index, split}, - nbins = Ceiling[(max - min)/h]; - index = Floor[(data - min)/h] + 1; - split = Split[Sort[Transpose[{index, weights}]], - #1[[1]] == #2[[1]] &]; - split = {#[[1, 1]], Tr[#[[2]]]} & /@ (Transpose /@ split); - count = Array[0 &, nbins]; - Scan[If[1 <= First[#] <= nbins, count[[First[#]]] = Last[#]] &, split]; - count - ] /; max > min && h > 0 && Length[data] == Length[weights] - -WeightedBinning[data_?(MatrixQ[#, NumericQ]&), - weights_?(VectorQ[#, NumericQ] &), - bins:({_, _, _}..)] := - Module[{min, max, h, nbins, index, split, count, unit}, - {min, max, h} = Transpose[{bins}]; - nbins = Ceiling[(max - min)/h]; - index = Floor[(# - min)/h& /@ data] + 1; (* include min *) -(* split = Split[Sort[index]];*) - split = Split[Sort[Transpose[{index, weights}]], - #1[[1]] == #2[[1]] &]; - split = {#[[1, 1]], Tr[#[[2]]]} & /@ (Transpose /@ split); - count = Array[0&, nbins]; - unit = Array[1&, Length[nbins]]; - Scan[If[And @@ Thread[unit <= First[#] <= nbins], - count[[ Sequence @@ First[#] ]] = Length[#]]&, split]; - count - ] /; (Dimensions[data][[2]] == Length[{bins}] && - MatrixQ[{bins}, NumericQ] && - Length[data] == Length[weights]) - - -(***** binned kernel regression estimator ******) - -Options[BinnedKernelRegression] = {Kernel -> TriangleKernel} - -BinnedKernelRegression[data_List, opts___?OptionQ] := - With[{factor = BinwidthFactor /. {opts} /. Options[BinnedKernelDensity]}, - BinnedKernelRegression[ - data, - {factor * RuleOfThumbBinwidth[ data[[All,1]] ], 5}, - opts] - ] - -BinnedKernelRegression[data_List, {h_, M_}, opts___?OptionQ] := - Module[{weights, liopts, dx, x, min, max, first, last, - bl, counts, ysum, num, den, ratio, mesh}, - weights = Kernel /. {opts} /. Options[BinnedKernelRegression]; - liopts = FilterOptions[ListInterpolation, opts]; - dx = N[h/M]; - x = First /@ data; - {min, max} = Through[{Min, Max}[x]]; - {first, last} = dx {Floor[min/dx], Ceiling[max/dx]}; - bl = binlists[data, {first, last, dx}]; - counts = Length /@ bl; - ysum = Apply[Plus, Map[Last, bl, {2}], {1}]; - {num, den} = ListCorrelate[weights[M], #, M, 0]& /@ {ysum, counts}; - ratio = MapThread[If[#1 == 0, 0, #1/#2]&, {num, den}]; - mesh = {first + dx/2, last - dx/2}; - ListInterpolation[ratio, {mesh}, liopts] - ] - -(* binlists is modified from BinLists in Statistics`DataManipulation *) -(* binlists bins a list of {x,y} pairs according to the value of x. *) -binlists[data:{{_,_}..}, {xmin_, xmax_, dx_}] := - Module[{nbins, index}, - nbins = Ceiling[(xmax - xmin)/dx]; - index = Ceiling[((First /@ data) - xmin)/dx]; - Table[data[[ Flatten[Position[index, i]] ]], {i, nbins}] - ] /; xmax > xmin && dx > 0 - - -(****** plotting routines ******) - -AverageShiftedHistogram[data_?(VectorQ[#, NumericQ]&), opts___?OptionQ] := - With[{factor = BinwidthFactor /. {opts} /. Options[BinnedKernelDensity], - h = RuleOfThumbBinwidth[data]}, - BinnedKernelDensityPlot[ - data, - {factor * h, 5}, - opts, InterpolationOrder -> 0, - PlotPoints -> Ceiling[(Max[data]-Min[data]) 5/(factor * h) + 20] - ] - ] - -Options[BinnedKernelDensityPlot] = {PlotType -> Plot3D} - -BinnedKernelDensityPlot::toomany = "Cannot plot more than two dimensions." - -BinnedKernelDensityPlot[data_?VectorQ, opts___?OptionQ] := - With[{factor = BinwidthFactor /. {opts} /. Options[BinnedKernelDensity]}, - BinnedKernelDensityPlot[ - data, - {factor * RuleOfThumbBinwidth[data], 5}, - opts] - ] - -BinnedKernelDensityPlot[data_List, opts___?OptionQ] := - With[{factor = BinwidthFactor /. {opts} /. Options[BinnedKernelDensity]}, - BinnedKernelDensityPlot[ - data, - Sequence @@ - Thread[{factor * (RuleOfThumbBinwidth /@ Transpose[data]), 5}], - opts] - ] - -(* -BinnedKernelDensityPlot[data_?(VectorQ[#, NumericQ]&), opts___?OptionQ] := - BinnedKernelDensityPlot[data, {RuleOfThumbBinwidth[data], 5}, opts] - -BinnedKernelDensityPlot[data_List, opts___?OptionQ] := - BinnedKernelDensityPlot[ - data, - Sequence @@ Thread[{RuleOfThumbBinwidth /@ Transpose[data], 5}], - opts] -*) - -BinnedKernelDensityPlot[data_?(VectorQ[#, NumericQ]&), hM:{_, _}, - opts___?OptionQ] := - Module[{bkd, popts, x}, - bkd = BinnedKernelDensity[data, hM, opts]; - popts = FilterOptions[Plot, opts]; - InterpolatingFunctionPlot[bkd[x], x, popts, PlotRange -> All, - AxesOrigin -> {bkd[[1,1,1]], 0}] - ] - -BinnedKernelDensityPlot[data_?(MatrixQ[#, NumericQ]&), hM:({_, _} ..), - opts___?OptionQ] := - Module[{dkd, popts, x, y}, - If[Length[First[data]] > 2, Message[BinnedKernelDensityPlot::toomany]; - Return[$Failed]]; - bkd = BinnedKernelDensity[data, hM, opts]; - type = PlotType /. {opts} /. Options[BinnedKernelDensityPlot]; - popts = FilterOptions[type, opts]; - Switch[type, - Plot3D, - InterpolatingFunctionPlot3D[bkd[x,y], x, y, popts, PlotRange -> All, - PlotPoints -> 45], - ContourPlot, - InterpolatingFunctionContourPlot[bkd[x,y], x, y, popts, - PlotRange -> All, PlotPoints -> 45], - DensityPlot, - InterpolatingFunctionDensityPlot[bkd[x,y], x, y, popts, - PlotRange -> All, PlotPoints -> 45], - _, Message[BinnedKernelDensityPlot::badtype, type]; Return[$Failed] - ] - ] - -BinnedKernelRegressionPlot[data_List, opts___?OptionQ] := - With[{factor = BinwidthFactor /. {opts} /. Options[BinnedKernelDensity]}, - BinnedKernelRegressionPlot[ - data, - {factor * RuleOfThumbBinwidth[ data[[All, 1]] ], 5}, - opts] - ] - -BinnedKernelRegressionPlot[data_List, {h_, M_}, opts___?OptionQ] := - Module[{popts, bkr, x}, - popts = FilterOptions[Plot, opts]; - bkr = BinnedKernelRegression[data, {h, M}, opts]; - InterpolatingFunctionPlot[bkr[x], x, popts, PlotRange -> All] - ] - -InterpolatingFunctionPlot[ifun_InterpolatingFunction[args__], x_Symbol, - opts___?OptionQ] := - Module[{pos}, - pos = Position[{args}, x][[1, 1]]; - Plot[ifun[args], - Evaluate[Prepend[First[ifun][[pos]], x]], opts] - ] - -InterpolatingFunctionPlot3D[ifun_InterpolatingFunction[args__], - x_Symbol, y_Symbol, opts___?OptionQ] := - Module[{pos}, - pos = Flatten[Position[{args}, #]& /@ {x, y}]; - Plot3D[ifun[args], - Evaluate[ - Sequence @@ MapThread[Prepend, {First[ifun][[pos]], {x, y}}] - ], opts] - ] - -InterpolatingFunctionContourPlot[ifun_InterpolatingFunction[args__], - x_Symbol, y_Symbol, opts___?OptionQ] := - Module[{pos}, - pos = Flatten[Position[{args}, #]& /@ {x, y}]; - ContourPlot[ifun[args], - Evaluate[ - Sequence @@ MapThread[Prepend, {First[ifun][[pos]], {x, y}}] - ], opts] - ] - -InterpolatingFunctionDensityPlot[ifun_InterpolatingFunction[args__], - x_Symbol, y_Symbol, opts___?OptionQ] := - Module[{pos}, - pos = Flatten[Position[{args}, #]& /@ {x, y}]; - DensityPlot[ifun[args], - Evaluate[ - Sequence @@ MapThread[Prepend, {First[ifun][[pos]], {x, y}}] - ], opts] - ] - -InterpolatingFunctionContourPlot3D[ifun_InterpolatingFunction[args__], - x_Symbol, y_Symbol, z_Symbol, opts___?OptionQ] := - Module[{pos}, - pos = Flatten[Position[{args}, #]& /@ {x, y, z}]; - ContourPlot3D[ifun[args], - Evaluate[ - Sequence @@ MapThread[Prepend, {First[ifun][[pos]], {x, y, z}}] - ], opts] - ] - - - -(****** not used ******) -(* This is borrowed from Hardle. It's designed to make the interval - begin nearly at Min[data] - h and end nearly at Max[data] + h. - I don't use it: It extends the edges too far for my taste. *) -MinMax[data_, {h_, M_}] := - Module[{step, nbins, start, origin}, - dx = h/M; - nbins = Floor[(Max[data] - Min[data])/dx] + 2(M + 1 + Ceiling[M/10]); - start = Min[data] - h - .1 dx; - origin = dx Floor[(start/dx) - .5]; - {origin, origin + dx (nbins + 1)} - ] - -End[] -EndPackage[] - - diff --git a/MathematicaFiles/Applications/DateFunctions.m b/MathematicaFiles/Applications/DateFunctions.m deleted file mode 100755 index 56fbbf15d57de22d980274e8e3494969cc45d412..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/DateFunctions.m +++ /dev/null @@ -1,206 +0,0 @@ -(* :Title: DateFunctions *) - -(* :Author: Mark Fisher *) - -(* :Date: July 2005 *) - -(* :Package Version: 0.2 *) - -(* :Mathematica Version: 6.0 *) - -(* :Summary: -A number of functions to convert dates between list, string, and integer -representations. The options have the same form as ConversionOptions for -Import for "CSV" files. -*) - -BeginPackage["DateFunctions`"] - -DateToIndex::usage = "DateToIndex[{year, month, day}] converts the date to -an integer using {1900, 1, 1} as the base day. DateToIndex[{year, month}] -converts the date to an integer using {1900, 1} as the base month. In -either case, a different base can be specified as a second argument." - -DayIndexToDate::usage = "DayIndexToDate[index] converts the integer index -to {year, month, day} using {1900, 1, 1} as the base day. A different base -can be specified as a second argument." - -MonthIndexToDate::usage = "MonthIndexToDate[index] converts the integer -index to {year, month} using {1900, 1} as the base month. A different base -can be specified as a second argument." - -StringDateToListDate::usage = "StringDateToListDate[date, opts] returns a -date of the form {y, m, d} given the string of the form \"yyyy/mm/dd\". -StringDateToListDate takes three options. \"DateStyle\" has settings -\"Scientific\" (the default), \"American\" (\"mm/dd/yyyy\"), or -\"European\" (\"dd/mm/yyyy\"). \"DateSeparator\" has default setting \"/\". -\"TwoDigitYearFunction\" has default None (and has not yet been -implemented). StringDateToListDate also works with dates of the form -\"yyyy/mm\" and \"mm/yyyy\", etc." - -StringDateToIntegerDate::usage = "StringDateToIntegerDate[date, opts] -returns an integer of the form yyyymmdd given the string of the form -\"yyyy/mm/dd\". StringDateToListDate takes three options. \"DateStyle\" has -settings \"Scientific\" (the default), \"American\" (\"mm/dd/yyyy\"), or -\"European\" (\"dd/mm/yyyy\"). \"DateSeparator\" has default setting \"/\". -\"TwoDigitYearFunction\" has default None (and has not yet been -implemented)." - -ListDateToStringDate::usage = "ListDateToStringDate[{y, m, d}, opts] -returns a date of the form \"yyyy/mm/dd\". StringDateToListDate takes three -options. \"DateStyle\" has settings \"Scientific\" (the default), -\"American\" (\"mm/dd/yyyy\"), or \"European\" (\"dd/mm/yyyy\"). -\"DateSeparator\" has default setting \"/\". \"TwoDigitYear\" has -default False." - -IntegerDateToStringDate::usage = "IntegerDateToStringDate[int] take an -integer of the form yyyymmdd and returns a string date of the -\"Scientific\" form \"yyyy/mm/dd\". IntegerDateToStringDate takes three -options. \"DateStyle\" has settings \"Scientific\" (the default), -\"American\" (\"mm/dd/yyyy\"), or \"European\" (\"dd/mm/yyyy\"). -\"DateSeparator\" has default setting \"/\". \"TwoDigitYear\" has -default False (and has not yet been implemented)." - -ListDateToIntegerDate::usage = "ListDateToIntegerDate[{year, month, day}] -returns an integer of the form yyyymmdd. ListDateToIntegerDate[{year, month}] -returns an integer of the form yyyymm." - -IntegerDateToListDate::usage "IntegerDateToListDate[int] returns -a list of the form {yyyy, mm, dd} or {yyyy, mm} depending on the -magnitude of the integer." - -Begin["Private`"] - -(***** code starts here *****) - -DateToIndex[date : {y_, m_}, base_:{1900, 1}] := {12, 1}.(date - base) - -DateToIndex[date : {y_, m_, d_}, base_:{1900, 1, 1}] := DateDifference[base, date] - -DayIndexToDate[i_Integer, base_:{1900, 1, 1}] := DatePlus[base, i] - -MonthIndexToDate[i_Integer, base_:{1900, 1}] := monthindextodate[i, base] - -monthindextodate = - Compile[{{i, _Integer}, {base, _Integer, 1}}, - With[{q = base[[1]] + Quotient[i, 12], m = base[[2]] + Mod[i, 12]}, - {q + Quotient[m, 12, 1], Mod[m, 12, 1]} - ]] - -Options[StringDateToListDate] = - {"DateStyle" -> "Scientific", - "DateSeparator" -> "/", - "TwoDigitYearFunction" -> None} - -StringDateToListDate[date_String, opts___?OptionQ] := - Module[{separator, style, fun, split, order}, - {separator, style, fun} = - {"DateSeparator", "DateStyle", "TwoDigitYearFunction"} /. - {opts} /. Options[StringDateToListDate]; - split = StringSplit[date, separator]; - order = If[Length[split] == 3, - (* then *) - Switch[style, - "Scientific", {1, 2, 3}, - "American", {3, 1, 2}, - "European", {3, 2, 1}, - _, {1, 2, 3}], - (* else *) - Switch[style, - "Scientific", {1, 2}, - "American" | "European", {2, 1}, - _, {1, 2}] - ]; - ToExpression[split][[ order ]] - ] - -StringDateToIntegerDate[date_String, opts___?OptionQ] := - ListDateToIntegerDate[StringDateToListDate[date, opts]] - -Options[ListDateToStringDate] = - {"DateStyle" -> "Scientific", - "DateSeparator" -> "/", - "TwoDigitYear" -> False} - -ListDateToStringDate[{y_Integer, m_Integer, d_Integer}, opts___?OptionQ] := - Module[{separator, style, y2, order}, - {separator, style, y2} = - {"DateSeparator", "DateStyle", "TwoDigitYear"} /. - {opts} /. Options[ListDateToStringDate]; - order = Switch[style, - "Scientific", {1, 2, 3}, - "American", {2, 3, 1}, - "European", {3, 2, 1}, - _, {1, 2, 3}]; - StringJoin[ - Insert[ - {If[TrueQ[y2], StringDrop[#, 2], #]& @ ToString[y], - StringJoin @@ (ToString /@ IntegerDigits[m, 10, 2]), - StringJoin @@ (ToString /@ IntegerDigits[d, 10, 2])}[[order]], - separator, {{2}, {3}} - ] - ] - ] - -ListDateToStringDate[{y_Integer, m_Integer}, opts___?OptionQ] := - Module[{separator, style, fun, order}, - {separator, style, y2} = - {"DateSeparator", "DateStyle", "TwoDigitYear"} /. - {opts} /. Options[ListDateToStringDate]; - order = Switch[style, - "Scientific", {1, 2}, - "American" | "European", {2, 1}, - _, {1, 2}]; - StringJoin[ - Insert[ - {If[TrueQ[y2], StringDrop[#, 2], #]& @ ToString[y], - StringJoin @@ (ToString /@ IntegerDigits[m, 10, 2])}[[order]], - separator, {{2}} - ] - ] - ] - -Options[IntegerDateToStringDate] = - {"DateStyle" -> "Scientific", - "DateSeparator" -> "/", - "TwoDigitYear" -> False} - -IntegerDateToStringDate[i_Integer /; i >= 10^6, opts___?OptionQ] := - Module[{separator, style, y2, order, list}, - {separator, style, y2} = - {"DateSeparator", "DateStyle", "TwoDigitYear"} /. - {opts} /. Options[ListDateToStringDate]; - order = Switch[style, - "Scientific", {1, 2, 3}, - "American", {3, 1, 2}, - "European", {3, 2, 1}, - _, {1, 2, 3}]; - list = StringSplit[StringInsert[ToString[i], " ", {5, 7}]][[ order ]]; - StringJoin @@ Most[Flatten[Transpose[{list, {separator, separator, ""}}]]] - ] - -IntegerDateToStringDate[i_Integer /; i < 10^6, opts___?OptionQ] := - Module[{separator, style, y2, order, list}, - {separator, style, y2} = - {"DateSeparator", "DateStyle", "TwoDigitYear"} /. - {opts} /. Options[ListDateToStringDate]; - order = Switch[style, - "Scientific", {1, 2}, - "American" | "European", {2, 1}, - _, {1, 2}]; - list = StringSplit[StringInsert[ToString[i], " ", {5}]][[ order ]]; - StringJoin @@ Most[Flatten[Transpose[{list, {separator, ""}}]]] - ] - -ListDateToIntegerDate[date : {y_Integer, m_Integer, d_Integer}] := - date.{10000, 100, 1} - -ListDateToIntegerDate[date : {y_Integer, m_Integer}] := date.{100, 1} - -IntegerDateToListDate[i_Integer] := - ToExpression @ StringSplit[ - StringInsert[ToString[i], " ", If[i < 10^6, {5}, {5, 7}]] - ] - -End[] -EndPackage[] diff --git a/MathematicaFiles/Applications/Difference.m b/MathematicaFiles/Applications/Difference.m deleted file mode 100755 index 990e0a23a720015ab6710f37bf2501842e6aa745..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/Difference.m +++ /dev/null @@ -1,58 +0,0 @@ -(* :Title: Difference *) - -(* :Author: Mark Fisher *) - -(* :Summary: Code for differencing vectors (and higher order tensors). *) - -(* :Discussion: - Difference is implemented using polynomials in the lag operator to - compute the kernel for ListConvolve. -*) - -Difference::usage = "Difference[list] returns the first differnce of - the list. Difference[list, d] returns the d-th difference of the - list (d >= 0). (For negative d, Difference returns the accumulated - sum.) Difference[list, d, s] returns the d-th difference of the - list with a span of s (s >= 1). The list can be a matrix or a - tensor. Difference[list, polyfun] takes a polynominal function as - a second argument to specify the differencing kernel symbolically. - In fact, Difference[list, d, s] calls Difference[list, (1-#^s)^d - &]. For another example, Difference[list, (1-#^s)^d (1-#)^n &] - performs d-th seasonal differencing at span s and n-th - differencing at span 1." - -FractionalDifference::usage = "FractionalDifference[list, polyfun, maxlag] - returns the fractionally differenced list computed from the polyfun and - truncating at maxlag. A typical example of polyfun is (1-#)^(-2/3)&." - -Difference[list_List, d_Integer:1, s_Integer:1] /; Positive[s] := - Switch[{d, s}, - {1, 1}, Rest[list] - Drop[list, -1], - {0, _}, list, - {_?Negative, _}, Nest[Rest @ FoldList[Plus, 0, #] &, list, -d], - {_, _}, Difference[list, (1 - #^s)^d &] - ] - -Difference[list_List, poly_, var_] := - Difference[list, Function[var, poly]] - -(* # is used purely as a dummy variable in p[#] *) -Difference[list_List, p_Function] /; PolynomialQ[p[#], #] := - ListConvolve[DifferenceKernel[p, TensorRank[list]], list] - -DifferenceKernel[poly_, var_Symbol, rank_Intger:1] := - DifferenceKernel[Function[var, poly], rank] - -DifferenceKernel[p_Function, rank_Integer:1] := - With[{ker = CoefficientList[p[#], #]}, - If[rank > 1, - (Composition @@ Table[List, {rank - 1}]) /@ ker, - ker] - ] - -FractionalDifference[list_List, fun_Function, maxlag_:Automatic] := - Module[{ml}, - ml = If[TrueQ[maxlag == Automatic], Floor[Length[list]/2], maxlag]; - Difference[list, - Block[{L}, Function @@ {{L}, Normal[Series[fun[L], {L, 0, ml}]]}]] - ] \ No newline at end of file diff --git a/MathematicaFiles/Applications/DirichletDistribution.m b/MathematicaFiles/Applications/DirichletDistribution.m deleted file mode 100755 index 9a2c39d9cdd5939e709d03324fbadb663759e3b8..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/DirichletDistribution.m +++ /dev/null @@ -1,141 +0,0 @@ -(* code for Random by Rob Knapp *) - -(* Dirichlet distribution *) -DirichletDistribution::usage = "DirichletDistribution[\[Alpha]] \ -represents a Dirichlet distribution with parameter vector \[Alpha] \ -(a list of positive reals). DirichletDistribution[d] (where d is \ -a positive integer) represents the \"flat\" Dirichlet distribution \ -with \[Alpha] = Table[1, {d}]." - -DirichletDistribution /: - Random`DistributionVector[ - DirichletDistribution[a_?(VectorQ[#, Positive] &)], - n_, prec_ - ] := - Transpose[#]/Total[#]& @ - Map[RandomReal[GammaDistribution[#, 1], n, - WorkingPrecision -> prec]&, a] - -(* -DirichletDistribution /: - Random`DistributionVector[ - DirichletDistribution[d_Integer?Positive], - n_, prec_ - ] := - Transpose[#]/Total[#]& @ - Map[RandomReal[GammaDistribution[#, 1], n, - WorkingPrecision -> prec]&, - Table[1, {d}]] -*) - -DirichletDistribution /: - Random`DistributionVector[ - DirichletDistribution[d_Integer?Positive], - n_, prec_ - ] := - Random`DistributionVector[DirichletDistribution[Table[1, {d}]], n, prec] - -DirichletDistribution /: - PDF[DirichletDistribution[parms_List], w_List] /; - Length[parms] == Length[w] := - Gamma[Tr[parms]]/Times@@(Gamma /@ parms) Times @@ (w^(parms - 1)) - -BayesianBootstrapFunction::usage = "BayesianBootstrapFunction[moms, \ -vars, parms, data] returns a function that takes a positive integer n \ -as an argument and returns n Bayesian bootstrap draws for the specified \ -moments, variable names, parameter names, and data." - -(* -Options[BayesianBootstrapFunction] = {StartingValues -> Automatic} - -BayesianBootstrapFunction[moms_List, vars_List, parms_List, data_List, - opts___?OptionQ] := - Module[{ - sv = StartingValues /. {opts} /. Options[BayesianBootstrapFunction] - }, - If[sv === Automatic, sv = Table[0, {Length[parms]}]]; - With[{ - fropts = FilterOptions[FindRoot, opts], - nmoms = (Function @@ {vars, moms}) @@ Transpose[data], - parmseq = Sequence @@ Transpose[{parms, sv}], - len = Length[data] - }, - Function[{n}, - (parms /. FindRoot[Expand /@ (nmoms.#), parmseq, fropts])& /@ - RandomReal[DirichletDistribution[len], n] - ] - ]] -*) -(* -BayesianBootstrapFunction[moms_List, vars_List, parms:{__Symbol}, data_List, - opts___?OptionQ] := - With[{ - fropts = FilterOptions[FindRoot, opts], - nmoms = (Function @@ {vars, moms}) @@ Transpose[data], - parmseq = Sequence @@ Transpose[{parms, Table[0, {Length[parms]}]}], - len = Length[data] - }, - Function[{n}, - (parms /. FindRoot[Expand /@ (nmoms.#), parmseq, fropts])& /@ - RandomReal[DirichletDistribution[len], n] - ] - ] -*) - -BayesianBootstrapFunction[moms_List, vars_List, parms:{__Symbol}, data_List, - opts___?OptionQ] := - BayesianBootstrapFunction[moms, vars, - Transpose[{parms, Table[0, {Length[parms]}]}], data, opts] - -BayesianBootstrapFunction[moms_List, vars_List, parms:{{_Symbol, _?NumericQ} ..}, - data_List, opts___?OptionQ] := - With[{ - fropts = FilterOptions[FindRoot, opts], - nmoms = (Function @@ {vars, moms}) @@ Transpose[data], - parmseq = Sequence @@ parms, - len = Length[data] - }, - Function[{n}, - (parms /. FindRoot[Expand /@ (nmoms.#), parmseq, fropts])& /@ - RandomReal[DirichletDistribution[len], n] - ] - ] - -BayesianBootstrapMean::usage = "BayesianBootstrapMean[data, n] returns n \ -Bayesian bootstrap draws of the mean(s) of the specified data." - -BayesianBootstrapMean[data_List, n_Integer?Positive] := - RandomReal[DirichletDistribution[Length[data]], n].data - -BayesianBootstrapLinearRegress::usage = -"BayesianBootstrapLinearRegress[data, n] returns n Bayesian bootstrap draws of \ -the coefficients of the specified data where each row of the data represents \ -an observation of the form (x1, x2, ..., xn, y). BayesianBootstrapLinearRegress \ -takes the option IncludeConstant. The default is IncludeIntercept -> True." - -(* use IncludeIntercept to avoid conflict with IncludeConstant from - LinearRegression context *) -IncludeIntercept::usage = "IncludeIntercept is an option for \ -BayesianBootstrapLinearRegress. It is used to specify whether a constant \ -is to be added to the data matrix." - -Options[BayesianBootstrapLinearRegress] = {IncludeIntercept -> True} - -BayesianBootstrapLinearRegress[data_?MatrixQ, n_Integer, opts___?OptionQ] := - With[{ - d = If[TrueQ[IncludeIntercept /. {opts} /. - Options[BayesianBootstrapLinearRegress]], - Prepend[#, 1]& /@ data, - data], - len = Length[data] - }, - With[{ - X = Most /@ d, - y = Last /@ d - }, - Function[w, - With[{t = Transpose[X].DiagonalMatrix[w]}, LinearSolve[t.X, t.y]] - ] /@ RandomReal[DirichletDistribution[len], n] - ]] - - diff --git a/MathematicaFiles/Applications/DotPlot.m b/MathematicaFiles/Applications/DotPlot.m deleted file mode 100755 index e0603047099ab14f7212111832c0d7e9f1bd918c..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/DotPlot.m +++ /dev/null @@ -1,179 +0,0 @@ -(* :Title: DotPlot *) - -(* :Author: Mark Fisher *) - -(* :Context: DotPlot` *) - -(* :Package Version: 3.0 April 2006 *) - -(* :Mathematica Version: 5.2 *) - -(* :Summary: - DotPlot is an enhnaced version of ListPlot combining points with - "connecting" lines that leave a gap near the points. DotPlot - effectively replicates the kind of plot used in Edward R. Tufte's <The - visual display of quantitative information> (1983, Graphics Press: - Cheshire, Connecticut) on pages 74-75 and elsewhere. - - Also included is CirclePlot, another enhanced version of ListPlot that - plots the points as circles. CirclePlot has the option Jitter which - specifies whether to add random jitter to the data points. -*) - -(* :History: - The original version of DotPlot created the gaps by laying down - oversized white points to mask the lines near the points. The current - version computes the end points of the connecting lines using a - transformation involving PlotRange and AspectRatio. - - October 2006, modified to accomodate Version 6. In particular, - Point[{pt1, ..., ptn}] instead of {Point[pt1], ..., Point[ptn]}. -*) - -(* :Notes: - There is some slightly tricky stuff regarding the default PointSize for - DotPlot. The idea is to set the default PointSize in such a way that if - the user passes a PlotStyle option to change the color (for example), - the default PointSize remains intact, while at the same time allowing a - user-specified PointSize to control. - - Also, the FullOptions[] values for PlotRange and AspectRatio are - imposed on both DotPlot and CirclePlot in order to prevent the default - algorithms to reshape and resize the plot after the lines or circles - have been added when the settings are Automatic. This may require the - user to give an explicit PlotRange instead of All to avoid trimming - some circles. - - The use of DeleteCases regarding the lists of options is not necessary: - I'm just being neat and tidy, avoiding redundancies and the expense of - a small amount of speed. - - The lines in DotPlot are computed as follows. Let {a, b} denote an - adjacent pair of points. Then {A, B} = T.#& /@ {a, b} is the pair in - standardized coordinates, where - T = {{1/xr, 0}, {0, ar/yr}} - and where ar is the aspect ration, xr is the horizontal range, and yr - is the vertical range. The distance d = Sqrt[#.#]&[A - B] is computed, - and if d > 2 r (where r is the circle radius) then {A, B} are moved - toward each other and returned to the original coordinates: - Inverse[T].#& /@ ({A, B} + {B - A, A - B}(r/d)) - If d <= 2 r, then the line length should be zero and consequently the - pair is discarded. -*) - -BeginPackage["DotPlot`", {"Utilities`FilterOptions`"}] - -DotPlot::usage = "DotPlot[data] is an enhanced version of ListPlot -combining dots and lines. The radius of the line gaps are controlled by the -option DotPlotGap. The default setting is DotPlotGap -> .015. The line gaps -are computed via a transformation using PlotRange and AspectRatio. -Redisplaying the plot with different settings of these options may produce -undesirable results. Instead, recreate the plot with the desired settings." - -CirclePlot::usage = "CirclePlot[data] is an enhanced version of ListPlot -using circles to indicate the points. CirclePlot takes the option -CirclePlotRadius. The default setting is CirclePlotRadius -> .01. The -circles are computed via a transformation using PlotRange and AspectRatio. -Redisplaying the plot with different settings of these options may produce -undesirable results. Instead, recreate the plot with the desired settings. -CirclePlot also takes the options Jitter and JitterFactor. If Jitter -> True, -then random jitter is added to the plotted points. The amount of jitter is -controlled by JitterFactor." - -DotPlotGap::usage = "DotPlotGap is an option for DotPlot which specifies -the radius of the line gaps around the data points." - -CirclePlotRadius::usage = "CirclePlotRadius is an option for CirclePlot which -specifies the radius of the circles that represent the data points." - -Jitter::usage = "Jitter is an option for CirclePlot which specifies whether -to add jitter to the data points. The default setting is Jitter -> False." - -JitterFactor::usage = "JitterFactor controls the amount of jitter when Jitter -> True. -The default setting is JitterFactor -> 1." - -Begin["`Private`"] - -Options[DotPlot] = {DotPlotGap -> .02} - -DefaultPointSize = .012 - -DotPlot[data : ({__?NumericQ} | {{_?NumericQ, _?NumericQ} ..}), - opts___?OptionQ] := - Module[{plotopts, ps, r, g, ar, pr, xr, yr, pts, ptpairs, cf, - shrunk, lines, gp}, - plotopts = {FilterOptions[ListPlot, opts]} /. - f_[PlotStyle, ps_] /; FreeQ[{ps}, PointSize[_]] :> - f[PlotStyle, Flatten[{PointSize[DefaultPointSize], ps}]]; - plotopts = Sequence @@ - Append[plotopts, PlotStyle -> PointSize[DefaultPointSize]]; - ps = DeleteCases[PlotStyle /. {plotopts}, PointSize[_], {0, Infinity}]; - If[ps === Automatic, ps = {}]; - r = DotPlotGap /. {opts} /. Options[DotPlot]; - g = Block[{$DisplayFunction = Identity}, - ListPlot[data, PlotJoined -> False, Evaluate[plotopts]]]; - {ar, pr} = {AspectRatio, PlotRange} /. AbsoluteOptions[g]; - {xr, yr} = pr[[All, 2]] - pr[[All, 1]]; - pts = Cases[g[[1]], Point[p_] :> p, Infinity]; - If[$VersionNumber >= 6, pts = Flatten[pts, 1]]; (* Version 6 changes *) - ptpairs = Partition[pts, 2, 1]; - cf = MakeLineGapFunction[{r, ar, xr, yr}]; - shrunk = DeleteCases[cf @@@ (Flatten /@ ptpairs), {{0.,0.}, {0.,0.}}]; - lines = Graphics[Flatten @ {ps, Line /@ shrunk}]; - gp = DeleteCases[g, (PlotRange -> _) | (AspectRatio -> _), Infinity]; - Show[gp, lines, PlotRange -> pr, AspectRatio -> ar] - ] - -(* helper function *) -MakeLineGapFunction[{r_, ar_, xr_, yr_}] := - Compile[{x1, y1, x2, y2}, - With[{d = Sqrt[ar^2*xr^2*(y1 - y2)^2 + (x1 - x2)^2*yr^2]/(xr*yr)}, - If[d <= 2*r, - {{0, 0}, {0, 0}}, (* to be discarded *) - {{(d*x1 + r*(-x1 + x2))/d, (d*y1 + r*(-y1 + y2))/d}, - {(r*(x1 - x2) + d*x2)/d, (r*(y1 - y2) + d*y2)/d}} - ] - ]] - -Options[CirclePlot] = {CirclePlotRadius -> .01, - Jitter -> False, JitterFactor -> 1} - -CirclePlot[data : ({__?NumericQ} | {{_?NumericQ, _?NumericQ} ..}), - opts___?OptionQ] := - Module[{plotopts, r, g, ar, pr, xr, yr, gp, j, jfactor, jfun, - pts2circles, pts}, - plotopts = FilterOptions[ListPlot, opts]; - r = CirclePlotRadius /. {opts} /. Options[CirclePlot]; - {j, jfactor} = {Jitter, JitterFactor} /. {opts} /. Options[CirclePlot]; - g = Block[{$DisplayFunction = Identity}, - ListPlot[data, PlotJoined -> False, plotopts]]; - {ar, pr} = {AspectRatio, PlotRange} /. AbsoluteOptions[g]; - {xr, yr} = pr[[All, 2]] - pr[[All, 1]]; - gp = DeleteCases[g, (PlotRange -> _) | (AspectRatio -> _), Infinity]; - If[TrueQ[j], - jfun = MakeJitterFunction[{xr, yr}, jfactor], - jfun = Identity - ]; - pts2circles = If[ - $VersionNumber >= 6, (* Version 6 changes *) - (* then *) - gp /. Point[pts:{{_, _}..}] :> (Circle[jfun[#], r * {xr, yr/ar}]& /@ pts), - (* else *) - gp /. Point[{x_, y_}] :> Circle[jfun[{x, y}], r * {xr, yr/ar}] - ]; - Show[pts2circles, PlotRange -> pr, AspectRatio -> ar] - ] - -(* helper function *) -MakeJitterFunction[{xr_, yr_}, factor_:1] := - With[{a = xr/50, b = yr/50}, - Compile[{{pt, _Real, 1}}, - pt + factor * {Random[Real, {-a, a}], Random[Real, {-b, b}]} - ] - ] - -End[] -EndPackage[] - - - diff --git a/MathematicaFiles/Applications/EulerSimulate.m b/MathematicaFiles/Applications/EulerSimulate.m deleted file mode 100755 index d53f6ca3a0ab3b969ae4d51d3bfc193c0123104f..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/EulerSimulate.m +++ /dev/null @@ -1,146 +0,0 @@ -(* :Title: EulerSimulate *) - -(* :Author: Mark Fisher *) - -(* :Context: EulerSimulate` *) - -(* :Mathematica Version: 6.0 *) - -(* :History: - Version 1.0 February 1999. - Version 1.1 September 1999. - Use RandomArray instead of StandardNormal. - Version 1.2 June 2000. - Improved compiling. - Modified argument list. - Added option InitialTime. - Added scalar verion. - Version 2.0 Changed Random to RandomReal for Version 6 -*) - -(* :Keywords: Ito's lemma, stochastic calculus, random walk, brownian -motion, option pricing, Black-Scholes *) - -(* :Summary: simulate SDEs via Euler approximation *) - -(* :Discussion: -This package impliments first-order Euler simulation for any number of Ito -processes with any number of arbitrarily-correlated Brownian motions. The -sole function is EulerSimulate. -*) - -(* :Requirements: This package imports the package - Statistics`NormalDistribution.m *) - -(* :Examples: - -Example 1 -Geometric brownian motion: - -sim = EulerSimulate[.2 s, .1 s, {s, 100}, {1, 10^3}]; -ListPlot[sim, PlotJoined -> True] - -Example 2 -To let time play an active role, model time explicitly as an Ito process: - -sim = EulerSimulate[{1, x - t}, {{0}, {1}}, {t, 0}, {x, 0}, {1, 10^3}, - IncludeTime -> False]; -ListPlot[sim, PlotJoined -> True] - -Example 3 -Three "affine" state variables: - -mu = {5(m - r), .1( .05 - m), 1( .01 - v)}; -sig = Re @ {{Sqrt[v], 0, 0}, {0, .1 Sqrt[m], 0}, {0, 0, .1 Sqrt[v]}}; -sim = EulerSimulate[mu, sig, {r, .05}, {m, .05}, {v, .01}, {1, 10^3}]; -Show @ GraphicsArray @ - Table[ListPlot[sim[[All, {1, i}]], PlotJoined -> True, - DisplayFunction -> Identity, Frame -> True, Axes -> False], - {i, 2, 4}] - -*) - -BeginPackage["EulerSimulate`"] - -EulerSimulate::usage = "EulerSimulate[drift, diffusion, {x, x0}, {duration, \ -nsteps}] returns a list of simulated values for the Ito process determined \ -by the arguments. The arguments specify the drift and diffusion, the \ -symbolic name and initial value {x, x0}, and the length of time and the \ -number of time steps,{duration, nsteps}. The default settings for the \ -options are Compiled -> True, IncludeTime -> True, InitialTime -> 0, and \ -IntermediateValues -> True. A system of Ito processes can be simulated by \ -specifying the drift as a vector and the the diffusion as a matrix, and by \ -providing a {x, x0} pair for each process in a sequence. By default, \ -EulerSimulate generates a matrix of orthogonal standard normal deviates; \ -alternatively, the vector form of EulerSimulate allows the user to supply a \ -matrix of shocks as a final optional argument." - -IncludeTime::usage = "IncludeTime is an option for EulerSimulate. The \ -default setting is IncludeTime -> True." - -InitialTime::usage = "InitialTime is an option for Eulersimulate. The \ -default setting is InitialTime -> 0." - -IntermediateValues::usage = "IntermediateValues is an option for \ -EulerSimulate. The default setting is IntermediateValues -> True." - -Begin["`Private`"] - -Options[EulerSimulate] = {Compiled -> True, IncludeTime -> True, - InitialTime -> 0, IntermediateValues -> True} - -(* main engine: vector version, takes shocks as argument *) - -EulerSimulate[drift_?VectorQ, diffusion_?MatrixQ, - x:{_Symbol, _?NumericQ}.., - {duration_?NumericQ, nsteps_Integer}, - devs_?(MatrixQ[#, NumberQ]&), opts___?OptionQ] /; - (Length[drift] == Length[diffusion] == Length[{x}] && - Dimensions[devs][[2]] == Dimensions[diffusion][[2]]) := - Module[{compile, time, t0, list, dt, sqrtdt, args0, args, - errargs, fun, sim}, - {compile, time, t0, list} = - {Compiled, IncludeTime, InitialTime, IntermediateValues} /. - {opts} /. Options[EulerSimulate]; - sqrtdt = Sqrt[ dt = N[duration/nsteps] ]; - {args, args0} = Transpose[{x}]; - errargs = Unique[]& /@ Range[Last @ Dimensions[diffusion]]; - fun = If[TrueQ[compile], Compile, Function] @@ - {Join[args, errargs], args + drift dt + (diffusion.errargs) sqrtdt}; - sim = If[TrueQ[list], FoldList, Fold] - [fun @@ Join[#1, #2]&, N[args0], devs]; - If[TrueQ[time] && TrueQ[list], - Flatten /@ Transpose[ - {N @ Range[t0, t0 + duration, duration/nsteps], sim}], - sim - ] - ] - -(* vector version, constructs shocks and calls main engine *) - -EulerSimulate[drift_?VectorQ, diffusion_?MatrixQ, - x:{_Symbol, _?NumericQ}.., - {duration_?NumericQ, nsteps_Integer}, opts___?OptionQ] /; - (Length[drift] == Length[diffusion] == Length[{x}]) := - EulerSimulate[drift, diffusion, x, {duration, nsteps}, - (* make the random number matrix *) - RandomReal[NormalDistribution[], - {nsteps, Last @ Dimensions[diffusion]}], - opts] - -(* scalar version, calls vector version *) - -EulerSimulate[drift_, diffusion_, {x_Symbol, x0_?NumericQ}, - {duration_?NumericQ, nsteps_Integer}, opts___?OptionQ] := - If[TrueQ[IncludeTime /. {opts} /. Options[EulerSimulate]], - (* then do nothing *) - Identity, - (* else flatten the result *) - Flatten] @ - EulerSimulate[{drift}, - If[VectorQ[diffusion], {diffusion}, {{diffusion}}], - {x, x0}, {duration, nsteps}, opts] - -End[] -EndPackage[] - diff --git a/MathematicaFiles/Applications/Eurodollar Data.nb b/MathematicaFiles/Applications/Eurodollar Data.nb deleted file mode 100755 index bbc7aa822e426133240aff6c2c373add2968d31d..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/Eurodollar Data.nb +++ /dev/null @@ -1,21433 +0,0 @@ -(* Content-type: application/mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 6.0' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 145, 7] -NotebookDataLength[ 1086959, 21424] -NotebookOptionsPosition[ 1081746, 21252] -NotebookOutlinePosition[ 1082112, 21268] -CellTagsIndexPosition[ 1082069, 21265] -WindowFrame->Normal -ContainsDynamic->True *) - -(* Beginning of Notebook Content *) -Notebook[{ - -Cell[CellGroupData[{ -Cell["Eurodollar Data", "Title", - CellChangeTimes->{{3.4114804836839523`*^9, 3.411480486271228*^9}}], - -Cell["Download, update, and extract", "Subtitle", - CellChangeTimes->{{3.4114804983971357`*^9, 3.41148050601869*^9}}], - -Cell[CellGroupData[{ - -Cell["Setup", "Section", - CellChangeTimes->{{3.4114805148559523`*^9, 3.411480515479392*^9}}], - -Cell[BoxData[ - RowBox[{"<<", "EuroDollarDataFunctions`"}]], "Input"], - -Cell[BoxData[ - RowBox[{"<<", "PagePrint`"}]], "Input", - CellChangeTimes->{{3.411484665140573*^9, 3.411484669154913*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"$CMEEuroDollarDataDirectory", "=", - RowBox[{"ToFileName", "[", - RowBox[{"{", - RowBox[{"myWorkingDrive", ",", "\"\<projects\\\\eurodollar\>\""}], "}"}], - "]"}]}]], "Input", - CellChangeTimes->{{3.411480872710512*^9, 3.411480873053404*^9}}], - -Cell[BoxData["\<\"d:\\\\data\\\\projects\\\\eurodollar\\\\\"\>"], "Output", - CellChangeTimes->{3.411480552885792*^9, 3.4114808743158703`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"$CMEEuroDollarDataDirectory", "=", - "\"\<O:\\\\cme_pdfs\\\\\>\""}]], "Input", - CellChangeTimes->{{3.411480963265172*^9, 3.411480973785722*^9}}], - -Cell[BoxData["\<\"O:\\\\cme_pdfs\\\\\"\>"], "Output", - CellChangeTimes->{{3.411480969343712*^9, 3.411480973925996*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"$CMEEuroDollarSection09Directory", "=", - "\"\<O:\\\\cme_pdfs\\\\Section09\\\\\>\""}]], "Input", - CellChangeTimes->{{3.411480814169496*^9, 3.41148085888573*^9}, { - 3.41148107373874*^9, 3.411481076263672*^9}}], - -Cell[BoxData["\<\"O:\\\\cme_pdfs\\\\Section09\\\\\"\>"], "Output", - CellChangeTimes->{3.41148085950917*^9, 3.4114810770273857`*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{"Get", "[", - RowBox[{ - "myWorkingDrive", "<>", - "\"\<\\\\projects\\\\eurodollar\\\\eurodollar_new.m\>\""}], "]"}]], "Input",\ - - Evaluatable->False] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Read database", "Section", - CellChangeTimes->{{3.4114805736307583`*^9, 3.4114805855852203`*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{"desc", ",", "headings", ",", "cmedata"}], "}"}], "=", - RowBox[{"ImportFuturesRates", "[", - RowBox[{"ToFileName", "[", - RowBox[{ - RowBox[{"{", "$CMEEuroDollarDataDirectory", "}"}], ",", - "\"\<eurodollardata.mef\>\""}], "]"}], "]"}]}], ";"}], "//", - "Timing"}]], "Input", - CellChangeTimes->{{3.410781051453125*^9, 3.410781072359375*^9}, { - 3.4112205638706045`*^9, 3.411220566681611*^9}, {3.411480615058346*^9, - 3.411480616071436*^9}, {3.411480878165612*^9, 3.411480878508504*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1.4209999999999994`", ",", "Null"}], "}"}]], "Output", - CellChangeTimes->{3.4114806179261703`*^9, 3.411480980659148*^9, - 3.411481723176188*^9, 3.41148380564649*^9, 3.4114841023153334`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"daymat", "=", - RowBox[{"MaturityInDays", "[", "cmedata", "]"}]}], ";"}], "//", - "Timing"}]], "Input", - CellChangeTimes->{{3.411213286573807*^9, 3.4112133323810606`*^9}, - 3.411215433966129*^9, {3.4112203638335147`*^9, 3.4112203800273685`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1.6880000000000024`", ",", "Null"}], "}"}]], "Output", - CellChangeTimes->{{3.4112133226865687`*^9, 3.411213334251381*^9}, { - 3.4112154197984548`*^9, 3.4112154358676205`*^9}, {3.4112203732162867`*^9, - 3.411220382599059*^9}, 3.411220997939823*^9, 3.41123570653125*^9, - 3.4112997742372847`*^9, {3.4113650889375*^9, 3.4113651109375*^9}, - 3.411371699546875*^9, 3.411480622586384*^9, 3.4114809847894382`*^9, - 3.4114817264024897`*^9, 3.411483809900298*^9, 3.411484104973096*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"dateDay", "=", - RowBox[{"Flatten", "/@", - RowBox[{"Union", "[", - RowBox[{"cmedata", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "]"}], "]"}], "]"}]}]}], - ";"}]], "Input", - CellChangeTimes->{{3.411482476525498*^9, 3.41148250009153*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CMEHeaderReport", "[", - RowBox[{"desc", ",", "headings"}], "]"}]], "Input", - CellChangeTimes->{{3.411221268526948*^9, 3.411221278840025*^9}}], - -Cell[BoxData[ - FrameBox[ - TagBox[GridBox[{ - {"\<\"Eurodollar Futures Rates: Daily\"\>"}, - { - InterpretationBox[ - RowBox[{ - TagBox[GridBox[{ - {"\<\"Quote date: Year\"\>"}, - {"\<\"Quote date: Month\"\>"}, - {"\<\"Quote date: Day\"\>"} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Column"], - InterpretationBox[ - StyleBox[ - GraphicsBox[{}, - BaselinePosition->Baseline, - ImageSize->{12, 0}], - CacheGraphics->False], - Spacer[12]], "\<\"CME day number\"\>", - InterpretationBox[ - StyleBox[ - GraphicsBox[{}, - BaselinePosition->Baseline, - ImageSize->{12, 0}], - CacheGraphics->False], - Spacer[12]], - TagBox[GridBox[{ - {"\<\"Maturity date: Year\"\>"}, - {"\<\"Maturity date: Month\"\>"}, - {"\<\"Maturity date: Day\"\>"} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Column"], - InterpretationBox[ - StyleBox[ - GraphicsBox[{}, - BaselinePosition->Baseline, - ImageSize->{12, 0}], - CacheGraphics->False], - Spacer[12]], "\<\"Futures rate\"\>"}], - Row[{ - Column[{"Quote date: Year", "Quote date: Month", "Quote date: Day"}], - "CME day number", - Column[{ - "Maturity date: Year", "Maturity date: Month", - "Maturity date: Day"}], "Futures rate"}, - Spacer[12]]]} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - GridBoxDividers->{ - "Columns" -> {False, {True}, False}, "Rows" -> {False, {True}, False}}, - GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Column"], - StripOnInput->False]], "Output", - CellChangeTimes->{ - 3.4112212792994404`*^9, 3.411235708296875*^9, 3.411299775611387*^9, { - 3.41136508896875*^9, 3.41136511334375*^9}, 3.41137172825*^9, - 3.411480624565806*^9, 3.41148098559991*^9, 3.4114817275870256`*^9, - 3.411483812121036*^9, 3.4114841070993066`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"MissingCMEDays", "[", "cmedata", "]"}]], "Input", - CellChangeTimes->{{3.411165992796875*^9, 3.411165997453125*^9}, { - 3.411215218645539*^9, 3.411215220328827*^9}}], - -Cell[BoxData[ - InterpretationBox[GridBox[{ - { - TagBox["\<\"Missing CME Days (by year)\"\>", - "Labeled", - Editable->True, - Selectable->True]}, - { - TagBox[ - TagBox[ - FrameBox[ - TagBox[GridBox[{ - {"1999", "", "", "", "", "", "", "", ""}, - {"2000", "", "", "", "", "", "", "", ""}, - {"2001", "162", "173", "175", "176", "188", "197", "216", "219"}, - {"2002", "56", "127", "198", "201", "218", "", "", ""}, - {"2003", "130", "", "", "", "", "", "", ""}, - {"2004", "26", "112", "", "", "", "", "", ""}, - {"2005", "133", "135", "153", "162", "186", "187", "195", "219"}, - {"2006", "", "", "", "", "", "", "", ""}, - {"2007", "68", "", "", "", "", "", "", ""}, - {"2008", "16", "22", "", "", "", "", "", ""} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Right}}}, - - GridBoxDividers->{ - "Columns" -> {False, True, False}, "Rows" -> {{None}}}, - - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Grid"], - StripOnInput->False], - "Labeled", - Editable->True, - Selectable->True], - "SkipImageSizeLevel"]} - }, - BaselinePosition->{2, 1}, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Center}}, - "RowsIndexed" -> {}}, - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, - "RowsIndexed" -> {}}], - Labeled[ - Framed[ - Grid[{{1999}, {2000}, {2001, 162, 173, 175, 176, 188, 197, 216, 219}, { - 2002, 56, 127, 198, 201, 218}, {2003, 130}, {2004, 26, 112}, {2005, 133, - 135, 153, 162, 186, 187, 195, 219}, {2006}, {2007, 68}, {2008, 16, - 22}}, Dividers -> {{False, True, False}, None}, Alignment -> Right]], - "Missing CME Days (by year)", Top], - Editable->False, - Selectable->False]], "Output", - CellChangeTimes->{ - 3.411165997859375*^9, 3.41116619728125*^9, 3.411215167398771*^9, { - 3.4112152137203627`*^9, 3.4112152640787287`*^9}, 3.4112210091373863`*^9, - 3.411235725515625*^9, 3.411299777844303*^9, {3.411365089*^9, - 3.41136511575*^9}, 3.411371730578125*^9, 3.411480626404954*^9, - 3.411480987345542*^9, 3.41148172936383*^9, 3.411483814185384*^9, - 3.4114841086939645`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"MostRecentDay", "[", "cmedata", "]"}]], "Input", - CellChangeTimes->{{3.411165939890625*^9, 3.41116594234375*^9}, { - 3.4112153423672066`*^9, 3.411215343723189*^9}}], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"Most Recent Day:\"\>", " ", "\<\"07 Feb 2008\"\>", - " ", "\<\"Day\"\>", " ", "26"}], - Row[{"Most Recent Day:", "07 Feb 2008", "Day", 26}, " "]]], "Output", - CellChangeTimes->{ - 3.411165942765625*^9, 3.411166199328125*^9, 3.411214482440829*^9, - 3.411215273336813*^9, 3.4112153441907687`*^9, 3.4112210113672037`*^9, - 3.411235727890625*^9, {3.411365089046875*^9, 3.411365117765625*^9}, - 3.411371735578125*^9, 3.4114806292416058`*^9, 3.411480989761372*^9, - 3.411481731592628*^9, 3.411483817422657*^9, 3.4114841108514423`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DateToCMEDay", "[", "]"}]], "Input", - CellChangeTimes->{{3.41116636015625*^9, 3.411166365203125*^9}, { - 3.411166405296875*^9, 3.41116640853125*^9}, 3.411195914640625*^9}], - -Cell[BoxData["27"], "Output", - CellChangeTimes->{3.411166408890625*^9, 3.411194748046875*^9, - 3.411195915078125*^9, 3.4112154644991026`*^9, 3.4112210169579067`*^9, - 3.41123573084375*^9, 3.411365089140625*^9, 3.4113651213125*^9, - 3.41148063616179*^9, 3.411484120935308*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ListAnimate", "[", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"DateListPlot", "[", - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{ - RowBox[{"-", "2"}], ";;"}]}], "]"}], "]"}], ",", - RowBox[{"Joined", "\[Rule]", "True"}], ",", - RowBox[{"PlotRange", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "5", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2018", ",", "3", ",", "1"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{"2.5", ",", "6.5"}], "}"}]}], "}"}]}], ",", - RowBox[{"PlotLabel", "\[Rule]", - RowBox[{"Style", "[", - RowBox[{ - RowBox[{"DateString", "[", - RowBox[{ - RowBox[{"#", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", - RowBox[{"{", - RowBox[{ - "\"\<Day\>\"", ",", "\"\< \>\"", ",", "\"\<MonthNameShort\>\"", - ",", "\"\< \>\"", ",", "\"\<Year\>\""}], "}"}]}], "]"}], ",", - RowBox[{"FontFamily", "->", "\"\<Courier\>\""}], ",", "Bold", ",", - "Italic"}], "]"}]}], ",", - RowBox[{"Frame", "\[Rule]", - RowBox[{"{", - RowBox[{"True", ",", "True", ",", "False", ",", "False"}], "}"}]}]}], - "]"}], "&"}], "/@", - RowBox[{"Split", "[", - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{"cmedata", ",", - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", - RowBox[{ - "6", "|", "7", "|", "8", "|", "9", "|", "10", "|", "11", "|", - "12"}], ",", "_"}], "}"}], "|", - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "_"}], "}"}]}], ",", "__"}], - "}"}]}], "]"}], ",", - RowBox[{ - RowBox[{ - RowBox[{"#1", "[", - RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", - RowBox[{"#2", "[", - RowBox[{"[", "1", "]"}], "]"}]}], "&"}]}], "]"}]}], ",", - RowBox[{"DefaultDuration", "\[Rule]", "20"}]}], "]"}]], "Input", - CellChangeTimes->{{3.41123739590625*^9, 3.411237539046875*^9}, - 3.41123763965625*^9, {3.411237774296875*^9, 3.4112378513125*^9}, { - 3.41123788228125*^9, 3.41123794934375*^9}, {3.411238013734375*^9, - 3.411238036828125*^9}}], - -Cell[BoxData[ - TagBox[ - StyleBox[ - DynamicModuleBox[{$CellContext`i3$$ = 72, Typeset`show$$ = True, - Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", - Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = - "\"untitled\"", Typeset`specs$$ = {{{ - Hold[$CellContext`i3$$], 1, ""}, 1, 161, 1}}, Typeset`size$$ = - Automatic, Typeset`update$$ = 0, Typeset`initDone$$, - Typeset`skipInitDone$$ = True, $CellContext`i3$19001$$ = 0}, - PaneBox[ - PanelBox[ - DynamicWrapperBox[ - TagBox[GridBox[{ - { - ItemBox[ - ItemBox[ - StyleBox[ - TagBox[GridBox[{ - {"\<\"\\!\\(\\*TagBox[\\\"\\\\\\\"\\\\\\\"\\\", HoldForm]\\)\ -\"\>", - AnimatorBox[Dynamic[$CellContext`i3$$], {1, 161, 1}, - AnimationRate->Automatic, - - AppearanceElements->{ - "ProgressSlider", "PlayPauseButton", - "FasterSlowerButtons", "DirectionButton"}, - AutoAction->False, - ContinuousAction->True, - DefaultDuration->20, - DisplayAllSteps->True, - PausedTime->9.008708000183105]} - }, - ColumnsEqual->False, - - GridBoxAlignment->{ - "Columns" -> {Right, {Left}}, "ColumnsIndexed" -> {}, - "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, - - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Grid"], "ManipulateLabel", - StripOnInput->False], - Alignment->{Automatic, Inherited}, - StripOnInput->False], - Background->None, - StripOnInput->False]}, - { - ItemBox[ - TagBox[ - StyleBox[ - PaneBox[Cell[BoxData[ - TagBox[ - PaneSelectorBox[{1-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.36}, {3.398976*^9, 5.35}, {3.4068384*^9, - 5.33}, {3.4147008*^9, 5.29}, {3.4225632*^9, 5.24}, { - 3.4304256*^9, 5.22}, {3.438288*^9, 5.22}, {3.4461504*^9, - 5.22}, {3.4540128*^9, 5.23}, {3.4618752*^9, 5.26}, { - 3.4697376*^9, 5.29}, {3.4776*^9, 5.3}, {3.4854624*^9, - 5.33}, {3.4933248*^9, 5.35}, {3.5011872*^9, 5.39}, { - 3.5090496*^9, 5.4}, {3.516912*^9, 5.43}, {3.5253792*^9, - 5.45}, {3.5332416*^9, 5.49}, {3.541104*^9, 5.5}, { - 3.5489664*^9, 5.53}, {3.5568288*^9, 5.55}, {3.5646912*^9, - 5.58}, {3.5725536*^9, 5.6}, {3.580416*^9, 5.62}, { - 3.5882784*^9, 5.64}, {3.5961408*^9, 5.67}, {3.6040032*^9, - 5.69}, {3.6118656*^9, 5.71}, {3.619728*^9, 5.73}, { - 3.6275904*^9, 5.76}, {3.6354528*^9, 5.78}, {3.6433152*^9, - 5.8}, {3.6511776*^9, 5.82}, {3.65904*^9, 5.85}, { - 3.6669024*^9, 5.87}, {3.6747648*^9, 5.89}, {3.683232*^9, - 5.91}, {3.6910944*^9, 5.94}, {3.698352*^9, 5.95}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"01 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 2-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.35}, {3.398976*^9, 5.34}, {3.4068384*^9, - 5.33}, {3.4147008*^9, 5.28}, {3.4225632*^9, 5.23}, { - 3.4304256*^9, 5.21}, {3.438288*^9, 5.21}, {3.4461504*^9, - 5.21}, {3.4540128*^9, 5.22}, {3.4618752*^9, 5.24}, { - 3.4697376*^9, 5.27}, {3.4776*^9, 5.28}, {3.4854624*^9, - 5.3}, {3.4933248*^9, 5.33}, {3.5011872*^9, 5.36}, { - 3.5090496*^9, 5.38}, {3.516912*^9, 5.4}, {3.5253792*^9, - 5.42}, {3.5332416*^9, 5.46}, {3.541104*^9, 5.47}, { - 3.5489664*^9, 5.5}, {3.5568288*^9, 5.52}, {3.5646912*^9, - 5.55}, {3.5725536*^9, 5.57}, {3.580416*^9, 5.59}, { - 3.5882784*^9, 5.61}, {3.5961408*^9, 5.64}, {3.6040032*^9, - 5.66}, {3.6118656*^9, 5.68}, {3.619728*^9, 5.7}, { - 3.6275904*^9, 5.73}, {3.6354528*^9, 5.75}, {3.6433152*^9, - 5.77}, {3.6511776*^9, 5.79}, {3.65904*^9, 5.82}, { - 3.6669024*^9, 5.84}, {3.6747648*^9, 5.86}, {3.683232*^9, - 5.88}, {3.6910944*^9, 5.91}, {3.698352*^9, 5.92}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"04 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 3-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.36}, {3.398976*^9, 5.35}, {3.4068384*^9, - 5.34}, {3.4147008*^9, 5.3}, {3.4225632*^9, 5.27}, { - 3.4304256*^9, 5.25}, {3.438288*^9, 5.26}, {3.4461504*^9, - 5.26}, {3.4540128*^9, 5.27}, {3.4618752*^9, 5.29}, { - 3.4697376*^9, 5.33}, {3.4776*^9, 5.34}, {3.4854624*^9, - 5.36}, {3.4933248*^9, 5.39}, {3.5011872*^9, 5.42}, { - 3.5090496*^9, 5.44}, {3.516912*^9, 5.46}, {3.5253792*^9, - 5.48}, {3.5332416*^9, 5.52}, {3.541104*^9, 5.53}, { - 3.5489664*^9, 5.56}, {3.5568288*^9, 5.58}, {3.5646912*^9, - 5.61}, {3.5725536*^9, 5.63}, {3.580416*^9, 5.65}, { - 3.5882784*^9, 5.67}, {3.5961408*^9, 5.7}, {3.6040032*^9, - 5.72}, {3.6118656*^9, 5.74}, {3.619728*^9, 5.76}, { - 3.6275904*^9, 5.79}, {3.6354528*^9, 5.81}, {3.6433152*^9, - 5.83}, {3.6511776*^9, 5.85}, {3.65904*^9, 5.88}, { - 3.6669024*^9, 5.9}, {3.6747648*^9, 5.92}, {3.683232*^9, - 5.94}, {3.6910944*^9, 5.97}, {3.698352*^9, 5.98}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"05 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 4-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.35}, {3.398976*^9, 5.34}, {3.4068384*^9, - 5.32}, {3.4147008*^9, 5.26}, {3.4225632*^9, 5.22}, { - 3.4304256*^9, 5.2}, {3.438288*^9, 5.21}, {3.4461504*^9, - 5.22}, {3.4540128*^9, 5.25}, {3.4618752*^9, 5.27}, { - 3.4697376*^9, 5.31}, {3.4776*^9, 5.32}, {3.4854624*^9, - 5.35}, {3.4933248*^9, 5.38}, {3.5011872*^9, 5.42}, { - 3.5090496*^9, 5.44}, {3.516912*^9, 5.46}, {3.5253792*^9, - 5.49}, {3.5332416*^9, 5.52}, {3.541104*^9, 5.54}, { - 3.5489664*^9, 5.57}, {3.5568288*^9, 5.59}, {3.5646912*^9, - 5.62}, {3.5725536*^9, 5.64}, {3.580416*^9, 5.66}, { - 3.5882784*^9, 5.68}, {3.5961408*^9, 5.71}, {3.6040032*^9, - 5.73}, {3.6118656*^9, 5.75}, {3.619728*^9, 5.77}, { - 3.6275904*^9, 5.81}, {3.6354528*^9, 5.82}, {3.6433152*^9, - 5.84}, {3.6511776*^9, 5.86}, {3.65904*^9, 5.89}, { - 3.6669024*^9, 5.91}, {3.6747648*^9, 5.94}, {3.683232*^9, - 5.96}, {3.6910944*^9, 5.99}, {3.698352*^9, 6.}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"06 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 5-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.36}, {3.398976*^9, 5.35}, {3.4068384*^9, - 5.35}, {3.4147008*^9, 5.31}, {3.4225632*^9, 5.29}, { - 3.4304256*^9, 5.3}, {3.438288*^9, 5.33}, {3.4461504*^9, - 5.35}, {3.4540128*^9, 5.39}, {3.4618752*^9, 5.43}, { - 3.4697376*^9, 5.46}, {3.4776*^9, 5.48}, {3.4854624*^9, - 5.51}, {3.4933248*^9, 5.54}, {3.5011872*^9, 5.58}, { - 3.5090496*^9, 5.61}, {3.516912*^9, 5.63}, {3.5253792*^9, - 5.66}, {3.5332416*^9, 5.7}, {3.541104*^9, 5.72}, { - 3.5489664*^9, 5.74}, {3.5568288*^9, 5.77}, {3.5646912*^9, - 5.8}, {3.5725536*^9, 5.82}, {3.580416*^9, 5.84}, { - 3.5882784*^9, 5.86}, {3.5961408*^9, 5.89}, {3.6040032*^9, - 5.91}, {3.6118656*^9, 5.93}, {3.619728*^9, 5.95}, { - 3.6275904*^9, 5.99}, {3.6354528*^9, 6.}, {3.6433152*^9, - 6.02}, {3.6511776*^9, 6.04}, {3.65904*^9, 6.07}, { - 3.6669024*^9, 6.09}, {3.6747648*^9, 6.12}, {3.683232*^9, - 6.14}, {3.6910944*^9, 6.17}, {3.698352*^9, 6.18}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"07 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 6-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.36}, {3.398976*^9, 5.35}, {3.4068384*^9, - 5.35}, {3.4147008*^9, 5.32}, {3.4225632*^9, 5.3}, { - 3.4304256*^9, 5.31}, {3.438288*^9, 5.33}, {3.4461504*^9, - 5.36}, {3.4540128*^9, 5.41}, {3.4618752*^9, 5.45}, { - 3.4697376*^9, 5.49}, {3.4776*^9, 5.52}, {3.4854624*^9, - 5.55}, {3.4933248*^9, 5.58}, {3.5011872*^9, 5.63}, { - 3.5090496*^9, 5.65}, {3.516912*^9, 5.68}, {3.5253792*^9, - 5.71}, {3.5332416*^9, 5.75}, {3.541104*^9, 5.77}, { - 3.5489664*^9, 5.79}, {3.5568288*^9, 5.82}, {3.5646912*^9, - 5.85}, {3.5725536*^9, 5.87}, {3.580416*^9, 5.89}, { - 3.5882784*^9, 5.92}, {3.5961408*^9, 5.95}, {3.6040032*^9, - 5.97}, {3.6118656*^9, 5.99}, {3.619728*^9, 6.01}, { - 3.6275904*^9, 6.04}, {3.6354528*^9, 6.06}, {3.6433152*^9, - 6.08}, {3.6511776*^9, 6.1}, {3.65904*^9, 6.13}, { - 3.6669024*^9, 6.15}, {3.6747648*^9, 6.17}, {3.683232*^9, - 6.19}, {3.6910944*^9, 6.22}, {3.698352*^9, 6.24}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"08 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 7-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.36}, {3.398976*^9, 5.35}, {3.4068384*^9, - 5.35}, {3.4147008*^9, 5.32}, {3.4225632*^9, 5.29}, { - 3.4304256*^9, 5.3}, {3.438288*^9, 5.33}, {3.4461504*^9, - 5.36}, {3.4540128*^9, 5.41}, {3.4618752*^9, 5.46}, { - 3.4697376*^9, 5.5}, {3.4776*^9, 5.53}, {3.4854624*^9, - 5.56}, {3.4933248*^9, 5.59}, {3.5011872*^9, 5.64}, { - 3.5090496*^9, 5.66}, {3.516912*^9, 5.69}, {3.5253792*^9, - 5.72}, {3.5332416*^9, 5.76}, {3.541104*^9, 5.78}, { - 3.5489664*^9, 5.8}, {3.5568288*^9, 5.83}, {3.5646912*^9, - 5.86}, {3.5725536*^9, 5.88}, {3.580416*^9, 5.9}, { - 3.5882784*^9, 5.93}, {3.5961408*^9, 5.96}, {3.6040032*^9, - 5.98}, {3.6118656*^9, 6.}, {3.619728*^9, 6.02}, { - 3.6275904*^9, 6.05}, {3.6354528*^9, 6.07}, {3.6433152*^9, - 6.09}, {3.6511776*^9, 6.11}, {3.65904*^9, 6.14}, { - 3.6669024*^9, 6.16}, {3.6747648*^9, 6.18}, {3.683232*^9, - 6.2}, {3.6910944*^9, 6.23}, {3.698352*^9, 6.25}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"11 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 8-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.36}, {3.398976*^9, 5.36}, {3.4068384*^9, - 5.39}, {3.4147008*^9, 5.37}, {3.4225632*^9, 5.37}, { - 3.4304256*^9, 5.39}, {3.438288*^9, 5.44}, {3.4461504*^9, - 5.48}, {3.4540128*^9, 5.54}, {3.4618752*^9, 5.58}, { - 3.4697376*^9, 5.63}, {3.4776*^9, 5.66}, {3.4854624*^9, - 5.7}, {3.4933248*^9, 5.74}, {3.5011872*^9, 5.78}, { - 3.5090496*^9, 5.81}, {3.516912*^9, 5.83}, {3.5253792*^9, - 5.87}, {3.5332416*^9, 5.91}, {3.541104*^9, 5.93}, { - 3.5489664*^9, 5.95}, {3.5568288*^9, 5.98}, {3.5646912*^9, - 6.01}, {3.5725536*^9, 6.03}, {3.580416*^9, 6.06}, { - 3.5882784*^9, 6.09}, {3.5961408*^9, 6.12}, {3.6040032*^9, - 6.14}, {3.6118656*^9, 6.17}, {3.619728*^9, 6.19}, { - 3.6275904*^9, 6.22}, {3.6354528*^9, 6.24}, {3.6433152*^9, - 6.26}, {3.6511776*^9, 6.28}, {3.65904*^9, 6.31}, { - 3.6669024*^9, 6.33}, {3.6747648*^9, 6.35}, {3.683232*^9, - 6.37}, {3.6910944*^9, 6.4}, {3.698352*^9, 6.42}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"12 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 9-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.37}, {3.398976*^9, 5.37}, {3.4068384*^9, - 5.4}, {3.4147008*^9, 5.38}, {3.4225632*^9, 5.38}, { - 3.4304256*^9, 5.4}, {3.438288*^9, 5.44}, {3.4461504*^9, - 5.47}, {3.4540128*^9, 5.51}, {3.4618752*^9, 5.55}, { - 3.4697376*^9, 5.59}, {3.4776*^9, 5.61}, {3.4854624*^9, - 5.65}, {3.4933248*^9, 5.68}, {3.5011872*^9, 5.72}, { - 3.5090496*^9, 5.74}, {3.516912*^9, 5.76}, {3.5253792*^9, - 5.79}, {3.5332416*^9, 5.83}, {3.541104*^9, 5.84}, { - 3.5489664*^9, 5.87}, {3.5568288*^9, 5.89}, {3.5646912*^9, - 5.93}, {3.5725536*^9, 5.95}, {3.580416*^9, 5.98}, { - 3.5882784*^9, 6.}, {3.5961408*^9, 6.04}, {3.6040032*^9, - 6.06}, {3.6118656*^9, 6.07}, {3.619728*^9, 6.09}, { - 3.6275904*^9, 6.13}, {3.6354528*^9, 6.14}, {3.6433152*^9, - 6.15}, {3.6511776*^9, 6.17}, {3.65904*^9, 6.2}, { - 3.6669024*^9, 6.22}, {3.6747648*^9, 6.24}, {3.683232*^9, - 6.26}, {3.6910944*^9, 6.29}, {3.698352*^9, 6.3}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"13 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 10-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.37}, {3.398976*^9, 5.37}, {3.4068384*^9, - 5.4}, {3.4147008*^9, 5.39}, {3.4225632*^9, 5.39}, { - 3.4304256*^9, 5.42}, {3.438288*^9, 5.45}, {3.4461504*^9, - 5.49}, {3.4540128*^9, 5.53}, {3.4618752*^9, 5.56}, { - 3.4697376*^9, 5.6}, {3.4776*^9, 5.62}, {3.4854624*^9, - 5.65}, {3.4933248*^9, 5.68}, {3.5011872*^9, 5.72}, { - 3.5090496*^9, 5.74}, {3.516912*^9, 5.76}, {3.5253792*^9, - 5.79}, {3.5332416*^9, 5.83}, {3.541104*^9, 5.84}, { - 3.5489664*^9, 5.87}, {3.5568288*^9, 5.89}, {3.5646912*^9, - 5.93}, {3.5725536*^9, 5.95}, {3.580416*^9, 5.97}, { - 3.5882784*^9, 6.}, {3.5961408*^9, 6.03}, {3.6040032*^9, - 6.05}, {3.6118656*^9, 6.06}, {3.619728*^9, 6.08}, { - 3.6275904*^9, 6.12}, {3.6354528*^9, 6.13}, {3.6433152*^9, - 6.14}, {3.6511776*^9, 6.16}, {3.65904*^9, 6.19}, { - 3.6669024*^9, 6.2}, {3.6747648*^9, 6.21}, {3.683232*^9, - 6.23}, {3.6910944*^9, 6.26}, {3.698352*^9, 6.28}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"14 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 11-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3911136*^9, 5.36}, {3.3935328*^9, 5.36}, { - 3.395952*^9, 5.36}, {3.398976*^9, 5.36}, {3.4068384*^9, - 5.38}, {3.4147008*^9, 5.36}, {3.4225632*^9, 5.34}, { - 3.4304256*^9, 5.36}, {3.438288*^9, 5.38}, {3.4461504*^9, - 5.41}, {3.4540128*^9, 5.45}, {3.4618752*^9, 5.48}, { - 3.4697376*^9, 5.52}, {3.4776*^9, 5.54}, {3.4854624*^9, - 5.57}, {3.4933248*^9, 5.6}, {3.5011872*^9, 5.64}, { - 3.5090496*^9, 5.66}, {3.516912*^9, 5.68}, {3.5253792*^9, - 5.71}, {3.5332416*^9, 5.75}, {3.541104*^9, 5.76}, { - 3.5489664*^9, 5.79}, {3.5568288*^9, 5.81}, {3.5646912*^9, - 5.85}, {3.5725536*^9, 5.87}, {3.580416*^9, 5.89}, { - 3.5882784*^9, 5.92}, {3.5961408*^9, 5.95}, {3.6040032*^9, - 5.97}, {3.6118656*^9, 5.99}, {3.619728*^9, 6.01}, { - 3.6275904*^9, 6.04}, {3.6354528*^9, 6.05}, {3.6433152*^9, - 6.06}, {3.6511776*^9, 6.08}, {3.65904*^9, 6.11}, { - 3.6669024*^9, 6.13}, {3.6747648*^9, 6.14}, {3.683232*^9, - 6.16}, {3.6910944*^9, 6.2}, {3.698352*^9, 6.21}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"15 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 12-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.36}, {3.395952*^9, 5.36}, { - 3.398976*^9, 5.36}, {3.4068384*^9, 5.36}, {3.4147008*^9, - 5.33}, {3.4225632*^9, 5.3}, {3.4304256*^9, 5.31}, { - 3.438288*^9, 5.34}, {3.4461504*^9, 5.37}, {3.4540128*^9, - 5.4}, {3.4618752*^9, 5.44}, {3.4697376*^9, 5.48}, { - 3.4776*^9, 5.5}, {3.4854624*^9, 5.53}, {3.4933248*^9, - 5.56}, {3.5011872*^9, 5.61}, {3.5090496*^9, 5.63}, { - 3.516912*^9, 5.65}, {3.5253792*^9, 5.68}, {3.5332416*^9, - 5.72}, {3.541104*^9, 5.73}, {3.5489664*^9, 5.76}, { - 3.5568288*^9, 5.79}, {3.5646912*^9, 5.82}, {3.5725536*^9, - 5.84}, {3.580416*^9, 5.87}, {3.5882784*^9, 5.9}, { - 3.5961408*^9, 5.94}, {3.6040032*^9, 5.95}, {3.6118656*^9, - 5.98}, {3.619728*^9, 6.}, {3.6275904*^9, 6.03}, { - 3.6354528*^9, 6.04}, {3.6433152*^9, 6.05}, {3.6511776*^9, - 6.07}, {3.65904*^9, 6.1}, {3.6669024*^9, 6.12}, { - 3.6747648*^9, 6.13}, {3.683232*^9, 6.15}, {3.6910944*^9, - 6.19}, {3.698352*^9, 6.2}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"18 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 13-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.35}, {3.4068384*^9, 5.32}, {3.4147008*^9, - 5.27}, {3.4225632*^9, 5.24}, {3.4304256*^9, 5.24}, { - 3.438288*^9, 5.26}, {3.4461504*^9, 5.28}, {3.4540128*^9, - 5.31}, {3.4618752*^9, 5.35}, {3.4697376*^9, 5.4}, { - 3.4776*^9, 5.42}, {3.4854624*^9, 5.45}, {3.4933248*^9, - 5.48}, {3.5011872*^9, 5.53}, {3.5090496*^9, 5.55}, { - 3.516912*^9, 5.58}, {3.5253792*^9, 5.61}, {3.5332416*^9, - 5.64}, {3.541104*^9, 5.66}, {3.5489664*^9, 5.69}, { - 3.5568288*^9, 5.72}, {3.5646912*^9, 5.75}, {3.5725536*^9, - 5.77}, {3.580416*^9, 5.8}, {3.5882784*^9, 5.83}, { - 3.5961408*^9, 5.87}, {3.6040032*^9, 5.89}, {3.6118656*^9, - 5.91}, {3.619728*^9, 5.93}, {3.6275904*^9, 5.97}, { - 3.6354528*^9, 5.98}, {3.6433152*^9, 6.}, {3.6511776*^9, - 6.02}, {3.65904*^9, 6.05}, {3.6669024*^9, 6.06}, { - 3.6747648*^9, 6.08}, {3.683232*^9, 6.1}, {3.6910944*^9, - 6.13}, {3.698352*^9, 6.15}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"19 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 14-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.35}, {3.4068384*^9, 5.34}, {3.4147008*^9, - 5.31}, {3.4225632*^9, 5.28}, {3.4304256*^9, 5.28}, { - 3.438288*^9, 5.31}, {3.4461504*^9, 5.33}, {3.4540128*^9, - 5.37}, {3.4618752*^9, 5.42}, {3.4697376*^9, 5.46}, { - 3.4776*^9, 5.49}, {3.4854624*^9, 5.52}, {3.4933248*^9, - 5.56}, {3.5011872*^9, 5.6}, {3.5090496*^9, 5.62}, { - 3.516912*^9, 5.65}, {3.5253792*^9, 5.68}, {3.5332416*^9, - 5.72}, {3.541104*^9, 5.74}, {3.5489664*^9, 5.76}, { - 3.5568288*^9, 5.79}, {3.5646912*^9, 5.83}, {3.5725536*^9, - 5.85}, {3.580416*^9, 5.88}, {3.5882784*^9, 5.91}, { - 3.5961408*^9, 5.94}, {3.6040032*^9, 5.96}, {3.6118656*^9, - 5.99}, {3.619728*^9, 6.01}, {3.6275904*^9, 6.04}, { - 3.6354528*^9, 6.06}, {3.6433152*^9, 6.07}, {3.6511776*^9, - 6.09}, {3.65904*^9, 6.12}, {3.6669024*^9, 6.14}, { - 3.6747648*^9, 6.15}, {3.683232*^9, 6.17}, {3.6910944*^9, - 6.21}, {3.698352*^9, 6.22}, {3.7068192*^9, 6.24}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"20 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 15-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.34}, {3.4068384*^9, 5.33}, {3.4147008*^9, - 5.3}, {3.4225632*^9, 5.29}, {3.4304256*^9, 5.3}, { - 3.438288*^9, 5.33}, {3.4461504*^9, 5.37}, {3.4540128*^9, - 5.41}, {3.4618752*^9, 5.46}, {3.4697376*^9, 5.51}, { - 3.4776*^9, 5.55}, {3.4854624*^9, 5.59}, {3.4933248*^9, - 5.63}, {3.5011872*^9, 5.68}, {3.5090496*^9, 5.7}, { - 3.516912*^9, 5.74}, {3.5253792*^9, 5.77}, {3.5332416*^9, - 5.81}, {3.541104*^9, 5.83}, {3.5489664*^9, 5.85}, { - 3.5568288*^9, 5.88}, {3.5646912*^9, 5.92}, {3.5725536*^9, - 5.94}, {3.580416*^9, 5.97}, {3.5882784*^9, 6.}, { - 3.5961408*^9, 6.03}, {3.6040032*^9, 6.05}, {3.6118656*^9, - 6.08}, {3.619728*^9, 6.1}, {3.6275904*^9, 6.13}, { - 3.6354528*^9, 6.15}, {3.6433152*^9, 6.16}, {3.6511776*^9, - 6.18}, {3.65904*^9, 6.21}, {3.6669024*^9, 6.23}, { - 3.6747648*^9, 6.24}, {3.683232*^9, 6.26}, {3.6910944*^9, - 6.3}, {3.698352*^9, 6.31}, {3.7068192*^9, 6.33}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"21 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 16-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.33}, {3.4068384*^9, 5.29}, {3.4147008*^9, - 5.25}, {3.4225632*^9, 5.23}, {3.4304256*^9, 5.25}, { - 3.438288*^9, 5.29}, {3.4461504*^9, 5.33}, {3.4540128*^9, - 5.38}, {3.4618752*^9, 5.43}, {3.4697376*^9, 5.49}, { - 3.4776*^9, 5.52}, {3.4854624*^9, 5.57}, {3.4933248*^9, - 5.6}, {3.5011872*^9, 5.65}, {3.5090496*^9, 5.68}, { - 3.516912*^9, 5.71}, {3.5253792*^9, 5.74}, {3.5332416*^9, - 5.78}, {3.541104*^9, 5.8}, {3.5489664*^9, 5.83}, { - 3.5568288*^9, 5.86}, {3.5646912*^9, 5.89}, {3.5725536*^9, - 5.91}, {3.580416*^9, 5.94}, {3.5882784*^9, 5.98}, { - 3.5961408*^9, 6.01}, {3.6040032*^9, 6.03}, {3.6118656*^9, - 6.06}, {3.619728*^9, 6.08}, {3.6275904*^9, 6.11}, { - 3.6354528*^9, 6.13}, {3.6433152*^9, 6.14}, {3.6511776*^9, - 6.16}, {3.65904*^9, 6.19}, {3.6669024*^9, 6.21}, { - 3.6747648*^9, 6.23}, {3.683232*^9, 6.25}, {3.6910944*^9, - 6.28}, {3.698352*^9, 6.3}, {3.7068192*^9, 6.31}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"22 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 17-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.33}, { - 3.398976*^9, 5.32}, {3.4068384*^9, 5.26}, {3.4147008*^9, - 5.2}, {3.4225632*^9, 5.17}, {3.4304256*^9, 5.18}, { - 3.438288*^9, 5.22}, {3.4461504*^9, 5.26}, {3.4540128*^9, - 5.31}, {3.4618752*^9, 5.36}, {3.4697376*^9, 5.41}, { - 3.4776*^9, 5.45}, {3.4854624*^9, 5.49}, {3.4933248*^9, - 5.53}, {3.5011872*^9, 5.58}, {3.5090496*^9, 5.6}, { - 3.516912*^9, 5.64}, {3.5253792*^9, 5.67}, {3.5332416*^9, - 5.71}, {3.541104*^9, 5.73}, {3.5489664*^9, 5.76}, { - 3.5568288*^9, 5.79}, {3.5646912*^9, 5.83}, {3.5725536*^9, - 5.85}, {3.580416*^9, 5.88}, {3.5882784*^9, 5.91}, { - 3.5961408*^9, 5.95}, {3.6040032*^9, 5.97}, {3.6118656*^9, - 6.}, {3.619728*^9, 6.02}, {3.6275904*^9, 6.05}, { - 3.6354528*^9, 6.07}, {3.6433152*^9, 6.08}, {3.6511776*^9, - 6.1}, {3.65904*^9, 6.13}, {3.6669024*^9, 6.15}, { - 3.6747648*^9, 6.17}, {3.683232*^9, 6.19}, {3.6910944*^9, - 6.23}, {3.698352*^9, 6.24}, {3.7068192*^9, 6.26}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"25 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 18-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.33}, {3.4068384*^9, 5.28}, {3.4147008*^9, - 5.21}, {3.4225632*^9, 5.19}, {3.4304256*^9, 5.21}, { - 3.438288*^9, 5.25}, {3.4461504*^9, 5.29}, {3.4540128*^9, - 5.34}, {3.4618752*^9, 5.39}, {3.4697376*^9, 5.44}, { - 3.4776*^9, 5.48}, {3.4854624*^9, 5.52}, {3.4933248*^9, - 5.55}, {3.5011872*^9, 5.6}, {3.5090496*^9, 5.63}, { - 3.516912*^9, 5.66}, {3.5253792*^9, 5.69}, {3.5332416*^9, - 5.73}, {3.541104*^9, 5.75}, {3.5489664*^9, 5.78}, { - 3.5568288*^9, 5.81}, {3.5646912*^9, 5.85}, {3.5725536*^9, - 5.87}, {3.580416*^9, 5.9}, {3.5882784*^9, 5.93}, { - 3.5961408*^9, 5.97}, {3.6040032*^9, 5.99}, {3.6118656*^9, - 6.01}, {3.619728*^9, 6.03}, {3.6275904*^9, 6.07}, { - 3.6354528*^9, 6.08}, {3.6433152*^9, 6.1}, {3.6511776*^9, - 6.12}, {3.65904*^9, 6.15}, {3.6669024*^9, 6.17}, { - 3.6747648*^9, 6.19}, {3.683232*^9, 6.21}, {3.6910944*^9, - 6.24}, {3.698352*^9, 6.26}, {3.7068192*^9, 6.27}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"26 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 19-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.32}, {3.4068384*^9, 5.27}, {3.4147008*^9, - 5.2}, {3.4225632*^9, 5.17}, {3.4304256*^9, 5.19}, { - 3.438288*^9, 5.22}, {3.4461504*^9, 5.26}, {3.4540128*^9, - 5.31}, {3.4618752*^9, 5.36}, {3.4697376*^9, 5.41}, { - 3.4776*^9, 5.45}, {3.4854624*^9, 5.49}, {3.4933248*^9, - 5.52}, {3.5011872*^9, 5.57}, {3.5090496*^9, 5.6}, { - 3.516912*^9, 5.63}, {3.5253792*^9, 5.66}, {3.5332416*^9, - 5.7}, {3.541104*^9, 5.72}, {3.5489664*^9, 5.75}, { - 3.5568288*^9, 5.78}, {3.5646912*^9, 5.82}, {3.5725536*^9, - 5.84}, {3.580416*^9, 5.87}, {3.5882784*^9, 5.9}, { - 3.5961408*^9, 5.94}, {3.6040032*^9, 5.96}, {3.6118656*^9, - 5.98}, {3.619728*^9, 6.}, {3.6275904*^9, 6.04}, { - 3.6354528*^9, 6.05}, {3.6433152*^9, 6.07}, {3.6511776*^9, - 6.09}, {3.65904*^9, 6.12}, {3.6669024*^9, 6.14}, { - 3.6747648*^9, 6.16}, {3.683232*^9, 6.18}, {3.6910944*^9, - 6.21}, {3.698352*^9, 6.23}, {3.7068192*^9, 6.24}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"27 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 20-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.34}, {3.4068384*^9, 5.32}, {3.4147008*^9, - 5.28}, {3.4225632*^9, 5.26}, {3.4304256*^9, 5.28}, { - 3.438288*^9, 5.31}, {3.4461504*^9, 5.34}, {3.4540128*^9, - 5.38}, {3.4618752*^9, 5.43}, {3.4697376*^9, 5.47}, { - 3.4776*^9, 5.5}, {3.4854624*^9, 5.54}, {3.4933248*^9, - 5.57}, {3.5011872*^9, 5.62}, {3.5090496*^9, 5.64}, { - 3.516912*^9, 5.67}, {3.5253792*^9, 5.7}, {3.5332416*^9, - 5.74}, {3.541104*^9, 5.76}, {3.5489664*^9, 5.79}, { - 3.5568288*^9, 5.82}, {3.5646912*^9, 5.85}, {3.5725536*^9, - 5.87}, {3.580416*^9, 5.9}, {3.5882784*^9, 5.93}, { - 3.5961408*^9, 5.97}, {3.6040032*^9, 5.99}, {3.6118656*^9, - 6.01}, {3.619728*^9, 6.03}, {3.6275904*^9, 6.07}, { - 3.6354528*^9, 6.08}, {3.6433152*^9, 6.1}, {3.6511776*^9, - 6.12}, {3.65904*^9, 6.15}, {3.6669024*^9, 6.17}, { - 3.6747648*^9, 6.19}, {3.683232*^9, 6.21}, {3.6910944*^9, - 6.24}, {3.698352*^9, 6.26}, {3.7068192*^9, 6.27}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"28 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 21-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.33}, {3.4068384*^9, 5.28}, {3.4147008*^9, - 5.21}, {3.4225632*^9, 5.17}, {3.4304256*^9, 5.18}, { - 3.438288*^9, 5.22}, {3.4461504*^9, 5.26}, {3.4540128*^9, - 5.31}, {3.4618752*^9, 5.35}, {3.4697376*^9, 5.4}, { - 3.4776*^9, 5.43}, {3.4854624*^9, 5.47}, {3.4933248*^9, - 5.5}, {3.5011872*^9, 5.55}, {3.5090496*^9, 5.57}, { - 3.516912*^9, 5.6}, {3.5253792*^9, 5.63}, {3.5332416*^9, - 5.67}, {3.541104*^9, 5.69}, {3.5489664*^9, 5.72}, { - 3.5568288*^9, 5.75}, {3.5646912*^9, 5.79}, {3.5725536*^9, - 5.81}, {3.580416*^9, 5.84}, {3.5882784*^9, 5.87}, { - 3.5961408*^9, 5.91}, {3.6040032*^9, 5.93}, {3.6118656*^9, - 5.95}, {3.619728*^9, 5.98}, {3.6275904*^9, 6.01}, { - 3.6354528*^9, 6.03}, {3.6433152*^9, 6.04}, {3.6511776*^9, - 6.06}, {3.65904*^9, 6.09}, {3.6669024*^9, 6.11}, { - 3.6747648*^9, 6.13}, {3.683232*^9, 6.15}, {3.6910944*^9, - 6.19}, {3.698352*^9, 6.2}, {3.7068192*^9, 6.22}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"29 Jun 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 22-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.33}, {3.4068384*^9, 5.28}, {3.4147008*^9, - 5.19}, {3.4225632*^9, 5.14}, {3.4304256*^9, 5.13}, { - 3.438288*^9, 5.16}, {3.4461504*^9, 5.2}, {3.4540128*^9, - 5.25}, {3.4618752*^9, 5.3}, {3.4697376*^9, 5.35}, { - 3.4776*^9, 5.38}, {3.4854624*^9, 5.41}, {3.4933248*^9, - 5.45}, {3.5011872*^9, 5.5}, {3.5090496*^9, 5.52}, { - 3.516912*^9, 5.55}, {3.5253792*^9, 5.58}, {3.5332416*^9, - 5.62}, {3.541104*^9, 5.64}, {3.5489664*^9, 5.67}, { - 3.5568288*^9, 5.7}, {3.5646912*^9, 5.74}, {3.5725536*^9, - 5.76}, {3.580416*^9, 5.79}, {3.5882784*^9, 5.82}, { - 3.5961408*^9, 5.86}, {3.6040032*^9, 5.88}, {3.6118656*^9, - 5.9}, {3.619728*^9, 5.93}, {3.6275904*^9, 5.96}, { - 3.6354528*^9, 5.98}, {3.6433152*^9, 5.99}, {3.6511776*^9, - 6.01}, {3.65904*^9, 6.04}, {3.6669024*^9, 6.06}, { - 3.6747648*^9, 6.08}, {3.683232*^9, 6.1}, {3.6910944*^9, - 6.14}, {3.698352*^9, 6.15}, {3.7068192*^9, 6.17}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"02 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 23-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.33}, {3.4068384*^9, 5.3}, {3.4147008*^9, - 5.23}, {3.4225632*^9, 5.18}, {3.4304256*^9, 5.18}, { - 3.438288*^9, 5.21}, {3.4461504*^9, 5.25}, {3.4540128*^9, - 5.3}, {3.4618752*^9, 5.35}, {3.4697376*^9, 5.4}, { - 3.4776*^9, 5.43}, {3.4854624*^9, 5.46}, {3.4933248*^9, - 5.5}, {3.5011872*^9, 5.55}, {3.5090496*^9, 5.57}, { - 3.516912*^9, 5.6}, {3.5253792*^9, 5.63}, {3.5332416*^9, - 5.67}, {3.541104*^9, 5.69}, {3.5489664*^9, 5.72}, { - 3.5568288*^9, 5.75}, {3.5646912*^9, 5.79}, {3.5725536*^9, - 5.81}, {3.580416*^9, 5.84}, {3.5882784*^9, 5.87}, { - 3.5961408*^9, 5.91}, {3.6040032*^9, 5.93}, {3.6118656*^9, - 5.95}, {3.619728*^9, 5.98}, {3.6275904*^9, 6.01}, { - 3.6354528*^9, 6.03}, {3.6433152*^9, 6.04}, {3.6511776*^9, - 6.06}, {3.65904*^9, 6.09}, {3.6669024*^9, 6.11}, { - 3.6747648*^9, 6.13}, {3.683232*^9, 6.15}, {3.6910944*^9, - 6.19}, {3.698352*^9, 6.2}, {3.7068192*^9, 6.22}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"03 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 24-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.36}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.34}, {3.4013952*^9, 5.35}, {3.4068384*^9, - 5.35}, {3.4147008*^9, 5.32}, {3.4225632*^9, 5.29}, { - 3.4304256*^9, 5.3}, {3.438288*^9, 5.32}, {3.4461504*^9, - 5.36}, {3.4540128*^9, 5.41}, {3.4618752*^9, 5.46}, { - 3.4697376*^9, 5.51}, {3.4776*^9, 5.54}, {3.4854624*^9, - 5.58}, {3.4933248*^9, 5.62}, {3.5011872*^9, 5.66}, { - 3.5090496*^9, 5.69}, {3.516912*^9, 5.72}, {3.5253792*^9, - 5.75}, {3.5332416*^9, 5.79}, {3.541104*^9, 5.81}, { - 3.5489664*^9, 5.84}, {3.5568288*^9, 5.87}, {3.5646912*^9, - 5.9}, {3.5725536*^9, 5.92}, {3.580416*^9, 5.95}, { - 3.5882784*^9, 5.98}, {3.5961408*^9, 6.02}, {3.6040032*^9, - 6.04}, {3.6118656*^9, 6.07}, {3.619728*^9, 6.09}, { - 3.6275904*^9, 6.13}, {3.6354528*^9, 6.14}, {3.6433152*^9, - 6.16}, {3.6511776*^9, 6.18}, {3.65904*^9, 6.21}, { - 3.6669024*^9, 6.23}, {3.6747648*^9, 6.25}, {3.683232*^9, - 6.27}, {3.6910944*^9, 6.3}, {3.698352*^9, 6.32}, { - 3.7068192*^9, 6.33}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"05 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 25-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.36}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.35}, {3.4013952*^9, 5.36}, {3.4068384*^9, - 5.36}, {3.4147008*^9, 5.34}, {3.4225632*^9, 5.32}, { - 3.4304256*^9, 5.33}, {3.438288*^9, 5.36}, {3.4461504*^9, - 5.41}, {3.4540128*^9, 5.47}, {3.4618752*^9, 5.52}, { - 3.4697376*^9, 5.57}, {3.4776*^9, 5.61}, {3.4854624*^9, - 5.65}, {3.4933248*^9, 5.69}, {3.5011872*^9, 5.74}, { - 3.5090496*^9, 5.76}, {3.516912*^9, 5.79}, {3.5253792*^9, - 5.82}, {3.5332416*^9, 5.86}, {3.541104*^9, 5.88}, { - 3.5489664*^9, 5.91}, {3.5568288*^9, 5.94}, {3.5646912*^9, - 5.98}, {3.5725536*^9, 6.}, {3.580416*^9, 6.03}, { - 3.5882784*^9, 6.06}, {3.5961408*^9, 6.1}, {3.6040032*^9, - 6.12}, {3.6118656*^9, 6.14}, {3.619728*^9, 6.17}, { - 3.6275904*^9, 6.2}, {3.6354528*^9, 6.22}, {3.6433152*^9, - 6.23}, {3.6511776*^9, 6.25}, {3.65904*^9, 6.28}, { - 3.6669024*^9, 6.3}, {3.6747648*^9, 6.32}, {3.683232*^9, - 6.34}, {3.6910944*^9, 6.38}, {3.698352*^9, 6.39}, { - 3.7068192*^9, 6.41}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"06 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 26-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.36}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.35}, {3.4013952*^9, 5.36}, {3.4068384*^9, - 5.36}, {3.4147008*^9, 5.33}, {3.4225632*^9, 5.3}, { - 3.4304256*^9, 5.3}, {3.438288*^9, 5.33}, {3.4461504*^9, - 5.38}, {3.4540128*^9, 5.44}, {3.4618752*^9, 5.49}, { - 3.4697376*^9, 5.54}, {3.4776*^9, 5.58}, {3.4854624*^9, - 5.62}, {3.4933248*^9, 5.65}, {3.5011872*^9, 5.7}, { - 3.5090496*^9, 5.73}, {3.516912*^9, 5.76}, {3.5253792*^9, - 5.79}, {3.5332416*^9, 5.83}, {3.541104*^9, 5.85}, { - 3.5489664*^9, 5.88}, {3.5568288*^9, 5.9}, {3.5646912*^9, - 5.94}, {3.5725536*^9, 5.96}, {3.580416*^9, 5.99}, { - 3.5882784*^9, 6.02}, {3.5961408*^9, 6.06}, {3.6040032*^9, - 6.08}, {3.6118656*^9, 6.1}, {3.619728*^9, 6.13}, { - 3.6275904*^9, 6.16}, {3.6354528*^9, 6.18}, {3.6433152*^9, - 6.19}, {3.6511776*^9, 6.21}, {3.65904*^9, 6.24}, { - 3.6669024*^9, 6.26}, {3.6747648*^9, 6.28}, {3.683232*^9, - 6.3}, {3.6910944*^9, 6.34}, {3.698352*^9, 6.35}, { - 3.7068192*^9, 6.37}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"09 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 27-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.34}, {3.4013952*^9, 5.34}, {3.4068384*^9, - 5.3}, {3.4147008*^9, 5.23}, {3.4225632*^9, 5.18}, { - 3.4304256*^9, 5.17}, {3.438288*^9, 5.19}, {3.4461504*^9, - 5.24}, {3.4540128*^9, 5.31}, {3.4618752*^9, 5.36}, { - 3.4697376*^9, 5.42}, {3.4776*^9, 5.45}, {3.4854624*^9, - 5.5}, {3.4933248*^9, 5.54}, {3.5011872*^9, 5.59}, { - 3.5090496*^9, 5.61}, {3.516912*^9, 5.64}, {3.5253792*^9, - 5.67}, {3.5332416*^9, 5.71}, {3.541104*^9, 5.73}, { - 3.5489664*^9, 5.76}, {3.5568288*^9, 5.79}, {3.5646912*^9, - 5.83}, {3.5725536*^9, 5.85}, {3.580416*^9, 5.88}, { - 3.5882784*^9, 5.91}, {3.5961408*^9, 5.95}, {3.6040032*^9, - 5.97}, {3.6118656*^9, 5.99}, {3.619728*^9, 6.02}, { - 3.6275904*^9, 6.06}, {3.6354528*^9, 6.07}, {3.6433152*^9, - 6.09}, {3.6511776*^9, 6.11}, {3.65904*^9, 6.14}, { - 3.6669024*^9, 6.16}, {3.6747648*^9, 6.18}, {3.683232*^9, - 6.2}, {3.6910944*^9, 6.24}, {3.698352*^9, 6.25}, { - 3.7068192*^9, 6.27}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"10 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 28-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.34}, { - 3.398976*^9, 5.34}, {3.4013952*^9, 5.36}, {3.4068384*^9, - 5.32}, {3.4147008*^9, 5.26}, {3.4225632*^9, 5.2}, { - 3.4304256*^9, 5.19}, {3.438288*^9, 5.21}, {3.4461504*^9, - 5.27}, {3.4540128*^9, 5.34}, {3.4618752*^9, 5.4}, { - 3.4697376*^9, 5.46}, {3.4776*^9, 5.5}, {3.4854624*^9, - 5.54}, {3.4933248*^9, 5.58}, {3.5011872*^9, 5.63}, { - 3.5090496*^9, 5.66}, {3.516912*^9, 5.69}, {3.5253792*^9, - 5.72}, {3.5332416*^9, 5.76}, {3.541104*^9, 5.78}, { - 3.5489664*^9, 5.81}, {3.5568288*^9, 5.84}, {3.5646912*^9, - 5.88}, {3.5725536*^9, 5.9}, {3.580416*^9, 5.93}, { - 3.5882784*^9, 5.96}, {3.5961408*^9, 6.}, {3.6040032*^9, - 6.02}, {3.6118656*^9, 6.04}, {3.619728*^9, 6.07}, { - 3.6275904*^9, 6.11}, {3.6354528*^9, 6.13}, {3.6433152*^9, - 6.14}, {3.6511776*^9, 6.17}, {3.65904*^9, 6.2}, { - 3.6669024*^9, 6.22}, {3.6747648*^9, 6.24}, {3.683232*^9, - 6.26}, {3.6910944*^9, 6.29}, {3.698352*^9, 6.31}, { - 3.7068192*^9, 6.32}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"11 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 29-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.34}, {3.4013952*^9, 5.34}, {3.4068384*^9, - 5.33}, {3.4147008*^9, 5.29}, {3.4225632*^9, 5.25}, { - 3.4304256*^9, 5.25}, {3.438288*^9, 5.27}, {3.4461504*^9, - 5.31}, {3.4540128*^9, 5.38}, {3.4618752*^9, 5.44}, { - 3.4697376*^9, 5.5}, {3.4776*^9, 5.54}, {3.4854624*^9, - 5.58}, {3.4933248*^9, 5.62}, {3.5011872*^9, 5.66}, { - 3.5090496*^9, 5.69}, {3.516912*^9, 5.72}, {3.5253792*^9, - 5.75}, {3.5332416*^9, 5.79}, {3.541104*^9, 5.81}, { - 3.5489664*^9, 5.84}, {3.5568288*^9, 5.87}, {3.5646912*^9, - 5.91}, {3.5725536*^9, 5.93}, {3.580416*^9, 5.96}, { - 3.5882784*^9, 5.99}, {3.5961408*^9, 6.03}, {3.6040032*^9, - 6.05}, {3.6118656*^9, 6.07}, {3.619728*^9, 6.1}, { - 3.6275904*^9, 6.14}, {3.6354528*^9, 6.16}, {3.6433152*^9, - 6.17}, {3.6511776*^9, 6.2}, {3.65904*^9, 6.23}, { - 3.6669024*^9, 6.25}, {3.6747648*^9, 6.27}, {3.683232*^9, - 6.29}, {3.6910944*^9, 6.32}, {3.698352*^9, 6.34}, { - 3.7068192*^9, 6.35}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"12 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 30-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.3935328*^9, 5.35}, {3.395952*^9, 5.35}, { - 3.398976*^9, 5.34}, {3.4013952*^9, 5.34}, {3.4068384*^9, - 5.33}, {3.4147008*^9, 5.29}, {3.4225632*^9, 5.25}, { - 3.4304256*^9, 5.25}, {3.438288*^9, 5.27}, {3.4461504*^9, - 5.31}, {3.4540128*^9, 5.37}, {3.4618752*^9, 5.43}, { - 3.4697376*^9, 5.49}, {3.4776*^9, 5.52}, {3.4854624*^9, - 5.56}, {3.4933248*^9, 5.6}, {3.5011872*^9, 5.64}, { - 3.5090496*^9, 5.67}, {3.516912*^9, 5.7}, {3.5253792*^9, - 5.73}, {3.5332416*^9, 5.77}, {3.541104*^9, 5.79}, { - 3.5489664*^9, 5.82}, {3.5568288*^9, 5.85}, {3.5646912*^9, - 5.89}, {3.5725536*^9, 5.91}, {3.580416*^9, 5.94}, { - 3.5882784*^9, 5.97}, {3.5961408*^9, 6.01}, {3.6040032*^9, - 6.03}, {3.6118656*^9, 6.05}, {3.619728*^9, 6.08}, { - 3.6275904*^9, 6.12}, {3.6354528*^9, 6.13}, {3.6433152*^9, - 6.15}, {3.6511776*^9, 6.17}, {3.65904*^9, 6.2}, { - 3.6669024*^9, 6.21}, {3.6747648*^9, 6.23}, {3.683232*^9, - 6.25}, {3.6910944*^9, 6.28}, {3.698352*^9, 6.3}, { - 3.7068192*^9, 6.31}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"13 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 31-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.34}, { - 3.4013952*^9, 5.33}, {3.4068384*^9, 5.31}, {3.4147008*^9, - 5.23}, {3.4225632*^9, 5.18}, {3.4304256*^9, 5.17}, { - 3.438288*^9, 5.19}, {3.4461504*^9, 5.23}, {3.4540128*^9, - 5.28}, {3.4618752*^9, 5.34}, {3.4697376*^9, 5.41}, { - 3.4776*^9, 5.46}, {3.4854624*^9, 5.5}, {3.4933248*^9, - 5.54}, {3.5011872*^9, 5.59}, {3.5090496*^9, 5.61}, { - 3.516912*^9, 5.65}, {3.5253792*^9, 5.68}, {3.5332416*^9, - 5.72}, {3.541104*^9, 5.74}, {3.5489664*^9, 5.77}, { - 3.5568288*^9, 5.79}, {3.5646912*^9, 5.83}, {3.5725536*^9, - 5.85}, {3.580416*^9, 5.88}, {3.5882784*^9, 5.91}, { - 3.5961408*^9, 5.95}, {3.6040032*^9, 5.97}, {3.6118656*^9, - 6.}, {3.619728*^9, 6.03}, {3.6275904*^9, 6.06}, { - 3.6354528*^9, 6.08}, {3.6433152*^9, 6.09}, {3.6511776*^9, - 6.11}, {3.65904*^9, 6.14}, {3.6669024*^9, 6.16}, { - 3.6747648*^9, 6.18}, {3.683232*^9, 6.19}, {3.6910944*^9, - 6.23}, {3.698352*^9, 6.24}, {3.7068192*^9, 6.26}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"16 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 32-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.34}, { - 3.4013952*^9, 5.34}, {3.4068384*^9, 5.33}, {3.4147008*^9, - 5.28}, {3.4225632*^9, 5.24}, {3.4304256*^9, 5.23}, { - 3.438288*^9, 5.25}, {3.4461504*^9, 5.29}, {3.4540128*^9, - 5.35}, {3.4618752*^9, 5.41}, {3.4697376*^9, 5.47}, { - 3.4776*^9, 5.51}, {3.4854624*^9, 5.56}, {3.4933248*^9, - 5.59}, {3.5011872*^9, 5.64}, {3.5090496*^9, 5.66}, { - 3.516912*^9, 5.7}, {3.5253792*^9, 5.73}, {3.5332416*^9, - 5.77}, {3.541104*^9, 5.79}, {3.5489664*^9, 5.81}, { - 3.5568288*^9, 5.83}, {3.5646912*^9, 5.87}, {3.5725536*^9, - 5.89}, {3.580416*^9, 5.91}, {3.5882784*^9, 5.94}, { - 3.5961408*^9, 5.98}, {3.6040032*^9, 5.99}, {3.6118656*^9, - 6.02}, {3.619728*^9, 6.05}, {3.6275904*^9, 6.08}, { - 3.6354528*^9, 6.1}, {3.6433152*^9, 6.12}, {3.6511776*^9, - 6.14}, {3.65904*^9, 6.17}, {3.6669024*^9, 6.18}, { - 3.6747648*^9, 6.2}, {3.683232*^9, 6.22}, {3.6910944*^9, - 6.25}, {3.698352*^9, 6.27}, {3.7068192*^9, 6.28}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"17 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 33-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.34}, { - 3.4013952*^9, 5.33}, {3.4068384*^9, 5.3}, {3.4147008*^9, - 5.22}, {3.4225632*^9, 5.16}, {3.4304256*^9, 5.14}, { - 3.438288*^9, 5.16}, {3.4461504*^9, 5.2}, {3.4540128*^9, - 5.26}, {3.4618752*^9, 5.32}, {3.4697376*^9, 5.39}, { - 3.4776*^9, 5.44}, {3.4854624*^9, 5.48}, {3.4933248*^9, - 5.52}, {3.5011872*^9, 5.57}, {3.5090496*^9, 5.6}, { - 3.516912*^9, 5.63}, {3.5253792*^9, 5.66}, {3.5332416*^9, - 5.7}, {3.541104*^9, 5.72}, {3.5489664*^9, 5.75}, { - 3.5568288*^9, 5.77}, {3.5646912*^9, 5.8}, {3.5725536*^9, - 5.82}, {3.580416*^9, 5.85}, {3.5882784*^9, 5.87}, { - 3.5961408*^9, 5.91}, {3.6040032*^9, 5.93}, {3.6118656*^9, - 5.95}, {3.619728*^9, 5.98}, {3.6275904*^9, 6.02}, { - 3.6354528*^9, 6.03}, {3.6433152*^9, 6.05}, {3.6511776*^9, - 6.07}, {3.65904*^9, 6.1}, {3.6669024*^9, 6.12}, { - 3.6747648*^9, 6.14}, {3.683232*^9, 6.15}, {3.6910944*^9, - 6.19}, {3.698352*^9, 6.21}, {3.7068192*^9, 6.22}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"18 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 34-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.34}, { - 3.4013952*^9, 5.34}, {3.4068384*^9, 5.3}, {3.4147008*^9, - 5.23}, {3.4225632*^9, 5.17}, {3.4304256*^9, 5.15}, { - 3.438288*^9, 5.17}, {3.4461504*^9, 5.21}, {3.4540128*^9, - 5.27}, {3.4618752*^9, 5.33}, {3.4697376*^9, 5.4}, { - 3.4776*^9, 5.45}, {3.4854624*^9, 5.49}, {3.4933248*^9, - 5.53}, {3.5011872*^9, 5.58}, {3.5090496*^9, 5.61}, { - 3.516912*^9, 5.64}, {3.5253792*^9, 5.67}, {3.5332416*^9, - 5.71}, {3.541104*^9, 5.73}, {3.5489664*^9, 5.75}, { - 3.5568288*^9, 5.77}, {3.5646912*^9, 5.81}, {3.5725536*^9, - 5.82}, {3.580416*^9, 5.85}, {3.5882784*^9, 5.87}, { - 3.5961408*^9, 5.91}, {3.6040032*^9, 5.92}, {3.6118656*^9, - 5.94}, {3.619728*^9, 5.97}, {3.6275904*^9, 6.01}, { - 3.6354528*^9, 6.02}, {3.6433152*^9, 6.04}, {3.6511776*^9, - 6.07}, {3.65904*^9, 6.1}, {3.6669024*^9, 6.11}, { - 3.6747648*^9, 6.13}, {3.683232*^9, 6.15}, {3.6910944*^9, - 6.18}, {3.698352*^9, 6.2}, {3.7068192*^9, 6.22}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"19 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 35-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.34}, {3.398976*^9, 5.33}, { - 3.4013952*^9, 5.32}, {3.4068384*^9, 5.26}, {3.4147008*^9, - 5.17}, {3.4225632*^9, 5.1}, {3.4304256*^9, 5.08}, { - 3.438288*^9, 5.1}, {3.4461504*^9, 5.14}, {3.4540128*^9, - 5.21}, {3.4618752*^9, 5.27}, {3.4697376*^9, 5.34}, { - 3.4776*^9, 5.39}, {3.4854624*^9, 5.44}, {3.4933248*^9, - 5.48}, {3.5011872*^9, 5.53}, {3.5090496*^9, 5.55}, { - 3.516912*^9, 5.59}, {3.5253792*^9, 5.62}, {3.5332416*^9, - 5.66}, {3.541104*^9, 5.68}, {3.5489664*^9, 5.7}, { - 3.5568288*^9, 5.72}, {3.5646912*^9, 5.76}, {3.5725536*^9, - 5.77}, {3.580416*^9, 5.8}, {3.5882784*^9, 5.82}, { - 3.5961408*^9, 5.86}, {3.6040032*^9, 5.87}, {3.6118656*^9, - 5.89}, {3.619728*^9, 5.92}, {3.6275904*^9, 5.96}, { - 3.6354528*^9, 5.97}, {3.6433152*^9, 5.99}, {3.6511776*^9, - 6.02}, {3.65904*^9, 6.05}, {3.6669024*^9, 6.06}, { - 3.6747648*^9, 6.08}, {3.683232*^9, 6.1}, {3.6910944*^9, - 6.13}, {3.698352*^9, 6.15}, {3.7068192*^9, 6.17}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"20 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 36-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.33}, { - 3.4013952*^9, 5.33}, {3.4068384*^9, 5.29}, {3.4147008*^9, - 5.2}, {3.4225632*^9, 5.13}, {3.4304256*^9, 5.11}, { - 3.438288*^9, 5.13}, {3.4461504*^9, 5.17}, {3.4540128*^9, - 5.23}, {3.4618752*^9, 5.29}, {3.4697376*^9, 5.35}, { - 3.4776*^9, 5.4}, {3.4854624*^9, 5.44}, {3.4933248*^9, - 5.48}, {3.5011872*^9, 5.53}, {3.5090496*^9, 5.55}, { - 3.516912*^9, 5.58}, {3.5253792*^9, 5.61}, {3.5332416*^9, - 5.65}, {3.541104*^9, 5.67}, {3.5489664*^9, 5.7}, { - 3.5568288*^9, 5.72}, {3.5646912*^9, 5.75}, {3.5725536*^9, - 5.77}, {3.580416*^9, 5.79}, {3.5882784*^9, 5.81}, { - 3.5961408*^9, 5.85}, {3.6040032*^9, 5.86}, {3.6118656*^9, - 5.88}, {3.619728*^9, 5.91}, {3.6275904*^9, 5.95}, { - 3.6354528*^9, 5.96}, {3.6433152*^9, 5.98}, {3.6511776*^9, - 6.01}, {3.65904*^9, 6.04}, {3.6669024*^9, 6.05}, { - 3.6747648*^9, 6.07}, {3.683232*^9, 6.09}, {3.6910944*^9, - 6.12}, {3.698352*^9, 6.14}, {3.7068192*^9, 6.16}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"23 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 37-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.33}, { - 3.4013952*^9, 5.32}, {3.4068384*^9, 5.28}, {3.4147008*^9, - 5.17}, {3.4225632*^9, 5.09}, {3.4304256*^9, 5.07}, { - 3.438288*^9, 5.09}, {3.4461504*^9, 5.14}, {3.4540128*^9, - 5.2}, {3.4618752*^9, 5.27}, {3.4697376*^9, 5.33}, { - 3.4776*^9, 5.38}, {3.4854624*^9, 5.43}, {3.4933248*^9, - 5.47}, {3.5011872*^9, 5.52}, {3.5090496*^9, 5.54}, { - 3.516912*^9, 5.58}, {3.5253792*^9, 5.61}, {3.5332416*^9, - 5.65}, {3.541104*^9, 5.67}, {3.5489664*^9, 5.69}, { - 3.5568288*^9, 5.72}, {3.5646912*^9, 5.75}, {3.5725536*^9, - 5.77}, {3.580416*^9, 5.79}, {3.5882784*^9, 5.82}, { - 3.5961408*^9, 5.85}, {3.6040032*^9, 5.87}, {3.6118656*^9, - 5.89}, {3.619728*^9, 5.92}, {3.6275904*^9, 5.95}, { - 3.6354528*^9, 5.97}, {3.6433152*^9, 5.99}, {3.6511776*^9, - 6.02}, {3.65904*^9, 6.05}, {3.6669024*^9, 6.06}, { - 3.6747648*^9, 6.08}, {3.683232*^9, 6.1}, {3.6910944*^9, - 6.13}, {3.698352*^9, 6.15}, {3.7068192*^9, 6.17}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"24 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 38-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.33}, { - 3.4013952*^9, 5.31}, {3.4068384*^9, 5.25}, {3.4147008*^9, - 5.14}, {3.4225632*^9, 5.05}, {3.4304256*^9, 5.03}, { - 3.438288*^9, 5.04}, {3.4461504*^9, 5.09}, {3.4540128*^9, - 5.15}, {3.4618752*^9, 5.22}, {3.4697376*^9, 5.29}, { - 3.4776*^9, 5.34}, {3.4854624*^9, 5.39}, {3.4933248*^9, - 5.43}, {3.5011872*^9, 5.48}, {3.5090496*^9, 5.51}, { - 3.516912*^9, 5.55}, {3.5253792*^9, 5.58}, {3.5332416*^9, - 5.62}, {3.541104*^9, 5.64}, {3.5489664*^9, 5.67}, { - 3.5568288*^9, 5.7}, {3.5646912*^9, 5.73}, {3.5725536*^9, - 5.75}, {3.580416*^9, 5.78}, {3.5882784*^9, 5.8}, { - 3.5961408*^9, 5.84}, {3.6040032*^9, 5.85}, {3.6118656*^9, - 5.88}, {3.619728*^9, 5.91}, {3.6275904*^9, 5.94}, { - 3.6354528*^9, 5.96}, {3.6433152*^9, 5.98}, {3.6511776*^9, - 6.01}, {3.65904*^9, 6.04}, {3.6669024*^9, 6.05}, { - 3.6747648*^9, 6.07}, {3.683232*^9, 6.09}, {3.6910944*^9, - 6.13}, {3.698352*^9, 6.15}, {3.7068192*^9, 6.16}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"25 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 39-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.29}, {3.398976*^9, 5.25}, { - 3.4013952*^9, 5.22}, {3.4068384*^9, 5.12}, {3.4147008*^9, - 4.98}, {3.4225632*^9, 4.88}, {3.4304256*^9, 4.85}, { - 3.438288*^9, 4.87}, {3.4461504*^9, 4.91}, {3.4540128*^9, - 4.98}, {3.4618752*^9, 5.06}, {3.4697376*^9, 5.14}, { - 3.4776*^9, 5.2}, {3.4854624*^9, 5.26}, {3.4933248*^9, - 5.31}, {3.5011872*^9, 5.37}, {3.5090496*^9, 5.41}, { - 3.516912*^9, 5.45}, {3.5253792*^9, 5.49}, {3.5332416*^9, - 5.54}, {3.541104*^9, 5.57}, {3.5489664*^9, 5.6}, { - 3.5568288*^9, 5.63}, {3.5646912*^9, 5.67}, {3.5725536*^9, - 5.7}, {3.580416*^9, 5.73}, {3.5882784*^9, 5.76}, { - 3.5961408*^9, 5.8}, {3.6040032*^9, 5.82}, {3.6118656*^9, - 5.85}, {3.619728*^9, 5.88}, {3.6275904*^9, 5.92}, { - 3.6354528*^9, 5.94}, {3.6433152*^9, 5.96}, {3.6511776*^9, - 5.99}, {3.65904*^9, 6.02}, {3.6669024*^9, 6.04}, { - 3.6747648*^9, 6.06}, {3.683232*^9, 6.08}, {3.6910944*^9, - 6.11}, {3.698352*^9, 6.13}, {3.7068192*^9, 6.15}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"26 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 40-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.3}, {3.398976*^9, 5.25}, { - 3.4013952*^9, 5.21}, {3.4068384*^9, 5.1}, {3.4147008*^9, - 4.95}, {3.4225632*^9, 4.86}, {3.4304256*^9, 4.83}, { - 3.438288*^9, 4.85}, {3.4461504*^9, 4.89}, {3.4540128*^9, - 4.97}, {3.4618752*^9, 5.06}, {3.4697376*^9, 5.16}, { - 3.4776*^9, 5.23}, {3.4854624*^9, 5.3}, {3.4933248*^9, - 5.36}, {3.5011872*^9, 5.42}, {3.5090496*^9, 5.47}, { - 3.516912*^9, 5.51}, {3.5253792*^9, 5.56}, {3.5332416*^9, - 5.61}, {3.541104*^9, 5.64}, {3.5489664*^9, 5.68}, { - 3.5568288*^9, 5.72}, {3.5646912*^9, 5.76}, {3.5725536*^9, - 5.78}, {3.580416*^9, 5.81}, {3.5882784*^9, 5.85}, { - 3.5961408*^9, 5.89}, {3.6040032*^9, 5.91}, {3.6118656*^9, - 5.94}, {3.619728*^9, 5.98}, {3.6275904*^9, 6.02}, { - 3.6354528*^9, 6.04}, {3.6433152*^9, 6.06}, {3.6511776*^9, - 6.09}, {3.65904*^9, 6.13}, {3.6669024*^9, 6.14}, { - 3.6747648*^9, 6.16}, {3.683232*^9, 6.18}, {3.6910944*^9, - 6.22}, {3.698352*^9, 6.24}, {3.7068192*^9, 6.25}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"27 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 41-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.32}, {3.398976*^9, 5.27}, { - 3.4013952*^9, 5.21}, {3.4068384*^9, 5.1}, {3.4147008*^9, - 4.95}, {3.4225632*^9, 4.87}, {3.4304256*^9, 4.85}, { - 3.438288*^9, 4.87}, {3.4461504*^9, 4.91}, {3.4540128*^9, - 4.99}, {3.4618752*^9, 5.08}, {3.4697376*^9, 5.17}, { - 3.4776*^9, 5.24}, {3.4854624*^9, 5.31}, {3.4933248*^9, - 5.37}, {3.5011872*^9, 5.43}, {3.5090496*^9, 5.47}, { - 3.516912*^9, 5.52}, {3.5253792*^9, 5.56}, {3.5332416*^9, - 5.61}, {3.541104*^9, 5.65}, {3.5489664*^9, 5.68}, { - 3.5568288*^9, 5.72}, {3.5646912*^9, 5.76}, {3.5725536*^9, - 5.79}, {3.580416*^9, 5.82}, {3.5882784*^9, 5.85}, { - 3.5961408*^9, 5.89}, {3.6040032*^9, 5.91}, {3.6118656*^9, - 5.94}, {3.619728*^9, 5.98}, {3.6275904*^9, 6.02}, { - 3.6354528*^9, 6.04}, {3.6433152*^9, 6.06}, {3.6511776*^9, - 6.1}, {3.65904*^9, 6.13}, {3.6669024*^9, 6.15}, { - 3.6747648*^9, 6.17}, {3.683232*^9, 6.19}, {3.6910944*^9, - 6.22}, {3.698352*^9, 6.24}, {3.7068192*^9, 6.26}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"30 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 42-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.32}, {3.398976*^9, 5.27}, { - 3.4013952*^9, 5.21}, {3.4068384*^9, 5.09}, {3.4147008*^9, - 4.94}, {3.4225632*^9, 4.85}, {3.4304256*^9, 4.83}, { - 3.438288*^9, 4.85}, {3.4461504*^9, 4.9}, {3.4540128*^9, - 4.97}, {3.4618752*^9, 5.05}, {3.4697376*^9, 5.13}, { - 3.4776*^9, 5.2}, {3.4854624*^9, 5.26}, {3.4933248*^9, - 5.32}, {3.5011872*^9, 5.38}, {3.5090496*^9, 5.42}, { - 3.516912*^9, 5.46}, {3.5253792*^9, 5.5}, {3.5332416*^9, - 5.55}, {3.541104*^9, 5.59}, {3.5489664*^9, 5.62}, { - 3.5568288*^9, 5.66}, {3.5646912*^9, 5.7}, {3.5725536*^9, - 5.72}, {3.580416*^9, 5.75}, {3.5882784*^9, 5.79}, { - 3.5961408*^9, 5.83}, {3.6040032*^9, 5.85}, {3.6118656*^9, - 5.88}, {3.619728*^9, 5.92}, {3.6275904*^9, 5.96}, { - 3.6354528*^9, 5.98}, {3.6433152*^9, 6.}, {3.6511776*^9, - 6.03}, {3.65904*^9, 6.07}, {3.6669024*^9, 6.08}, { - 3.6747648*^9, 6.1}, {3.683232*^9, 6.12}, {3.6910944*^9, - 6.16}, {3.698352*^9, 6.18}, {3.7068192*^9, 6.19}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"31 Jul 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 43-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.32}, {3.398976*^9, 5.25}, { - 3.4013952*^9, 5.2}, {3.4068384*^9, 5.06}, {3.4147008*^9, - 4.91}, {3.4225632*^9, 4.84}, {3.4304256*^9, 4.83}, { - 3.438288*^9, 4.85}, {3.4461504*^9, 4.89}, {3.4540128*^9, - 4.96}, {3.4618752*^9, 5.04}, {3.4697376*^9, 5.12}, { - 3.4776*^9, 5.19}, {3.4854624*^9, 5.25}, {3.4933248*^9, - 5.31}, {3.5011872*^9, 5.36}, {3.5090496*^9, 5.4}, { - 3.516912*^9, 5.45}, {3.5253792*^9, 5.49}, {3.5332416*^9, - 5.54}, {3.541104*^9, 5.57}, {3.5489664*^9, 5.61}, { - 3.5568288*^9, 5.64}, {3.5646912*^9, 5.68}, {3.5725536*^9, - 5.71}, {3.580416*^9, 5.74}, {3.5882784*^9, 5.77}, { - 3.5961408*^9, 5.81}, {3.6040032*^9, 5.83}, {3.6118656*^9, - 5.86}, {3.619728*^9, 5.9}, {3.6275904*^9, 5.94}, { - 3.6354528*^9, 5.96}, {3.6433152*^9, 5.98}, {3.6511776*^9, - 6.02}, {3.65904*^9, 6.05}, {3.6669024*^9, 6.07}, { - 3.6747648*^9, 6.09}, {3.683232*^9, 6.11}, {3.6910944*^9, - 6.14}, {3.698352*^9, 6.16}, {3.7068192*^9, 6.18}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"01 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 44-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.33}, {3.398976*^9, 5.26}, { - 3.4013952*^9, 5.2}, {3.4068384*^9, 5.07}, {3.4147008*^9, - 4.92}, {3.4225632*^9, 4.86}, {3.4304256*^9, 4.85}, { - 3.438288*^9, 4.88}, {3.4461504*^9, 4.92}, {3.4540128*^9, - 4.99}, {3.4618752*^9, 5.06}, {3.4697376*^9, 5.13}, { - 3.4776*^9, 5.19}, {3.4854624*^9, 5.24}, {3.4933248*^9, - 5.29}, {3.5011872*^9, 5.34}, {3.5090496*^9, 5.38}, { - 3.516912*^9, 5.43}, {3.5253792*^9, 5.47}, {3.5332416*^9, - 5.51}, {3.541104*^9, 5.54}, {3.5489664*^9, 5.58}, { - 3.5568288*^9, 5.61}, {3.5646912*^9, 5.65}, {3.5725536*^9, - 5.68}, {3.580416*^9, 5.71}, {3.5882784*^9, 5.74}, { - 3.5961408*^9, 5.78}, {3.6040032*^9, 5.8}, {3.6118656*^9, - 5.83}, {3.619728*^9, 5.87}, {3.6275904*^9, 5.91}, { - 3.6354528*^9, 5.93}, {3.6433152*^9, 5.95}, {3.6511776*^9, - 5.98}, {3.65904*^9, 6.02}, {3.6669024*^9, 6.03}, { - 3.6747648*^9, 6.05}, {3.683232*^9, 6.07}, {3.6910944*^9, - 6.11}, {3.698352*^9, 6.13}, {3.7068192*^9, 6.14}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"02 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 45-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.31}, {3.398976*^9, 5.22}, { - 3.4013952*^9, 5.13}, {3.4068384*^9, 4.98}, {3.4147008*^9, - 4.82}, {3.4225632*^9, 4.75}, {3.4304256*^9, 4.75}, { - 3.438288*^9, 4.78}, {3.4461504*^9, 4.83}, {3.4540128*^9, - 4.89}, {3.4618752*^9, 4.96}, {3.4697376*^9, 5.04}, { - 3.4776*^9, 5.1}, {3.4854624*^9, 5.16}, {3.4933248*^9, - 5.22}, {3.5011872*^9, 5.28}, {3.5090496*^9, 5.32}, { - 3.516912*^9, 5.37}, {3.5253792*^9, 5.41}, {3.5332416*^9, - 5.47}, {3.541104*^9, 5.5}, {3.5489664*^9, 5.54}, { - 3.5568288*^9, 5.58}, {3.5646912*^9, 5.62}, {3.5725536*^9, - 5.64}, {3.580416*^9, 5.67}, {3.5882784*^9, 5.71}, { - 3.5961408*^9, 5.75}, {3.6040032*^9, 5.77}, {3.6118656*^9, - 5.8}, {3.619728*^9, 5.84}, {3.6275904*^9, 5.88}, { - 3.6354528*^9, 5.9}, {3.6433152*^9, 5.92}, {3.6511776*^9, - 5.96}, {3.65904*^9, 5.99}, {3.6669024*^9, 6.01}, { - 3.6747648*^9, 6.03}, {3.683232*^9, 6.05}, {3.6910944*^9, - 6.08}, {3.698352*^9, 6.1}, {3.7068192*^9, 6.12}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"03 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 46-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.32}, {3.398976*^9, 5.23}, { - 3.4013952*^9, 5.13}, {3.4068384*^9, 4.99}, {3.4147008*^9, - 4.83}, {3.4225632*^9, 4.78}, {3.4304256*^9, 4.79}, { - 3.438288*^9, 4.83}, {3.4461504*^9, 4.88}, {3.4540128*^9, - 4.94}, {3.4618752*^9, 5.01}, {3.4697376*^9, 5.08}, { - 3.4776*^9, 5.13}, {3.4854624*^9, 5.19}, {3.4933248*^9, - 5.24}, {3.5011872*^9, 5.3}, {3.5090496*^9, 5.34}, { - 3.516912*^9, 5.39}, {3.5253792*^9, 5.43}, {3.5332416*^9, - 5.48}, {3.541104*^9, 5.52}, {3.5489664*^9, 5.56}, { - 3.5568288*^9, 5.59}, {3.5646912*^9, 5.63}, {3.5725536*^9, - 5.66}, {3.580416*^9, 5.69}, {3.5882784*^9, 5.74}, { - 3.5961408*^9, 5.78}, {3.6040032*^9, 5.8}, {3.6118656*^9, - 5.83}, {3.619728*^9, 5.87}, {3.6275904*^9, 5.91}, { - 3.6354528*^9, 5.93}, {3.6433152*^9, 5.95}, {3.6511776*^9, - 5.99}, {3.65904*^9, 6.02}, {3.6669024*^9, 6.04}, { - 3.6747648*^9, 6.06}, {3.683232*^9, 6.08}, {3.6910944*^9, - 6.11}, {3.698352*^9, 6.13}, {3.7068192*^9, 6.15}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"06 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 47-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.35}, {3.398976*^9, 5.29}, { - 3.4013952*^9, 5.19}, {3.4068384*^9, 5.06}, {3.4147008*^9, - 4.87}, {3.4225632*^9, 4.8}, {3.4304256*^9, 4.8}, { - 3.438288*^9, 4.84}, {3.4461504*^9, 4.89}, {3.4540128*^9, - 4.95}, {3.4618752*^9, 5.02}, {3.4697376*^9, 5.09}, { - 3.4776*^9, 5.14}, {3.4854624*^9, 5.19}, {3.4933248*^9, - 5.24}, {3.5011872*^9, 5.3}, {3.5090496*^9, 5.34}, { - 3.516912*^9, 5.39}, {3.5253792*^9, 5.43}, {3.5332416*^9, - 5.48}, {3.541104*^9, 5.52}, {3.5489664*^9, 5.56}, { - 3.5568288*^9, 5.59}, {3.5646912*^9, 5.63}, {3.5725536*^9, - 5.66}, {3.580416*^9, 5.69}, {3.5882784*^9, 5.74}, { - 3.5961408*^9, 5.78}, {3.6040032*^9, 5.8}, {3.6118656*^9, - 5.83}, {3.619728*^9, 5.87}, {3.6275904*^9, 5.91}, { - 3.6354528*^9, 5.93}, {3.6433152*^9, 5.95}, {3.6511776*^9, - 5.99}, {3.65904*^9, 6.02}, {3.6669024*^9, 6.04}, { - 3.6747648*^9, 6.06}, {3.683232*^9, 6.08}, {3.6910944*^9, - 6.11}, {3.698352*^9, 6.13}, {3.7068192*^9, 6.15}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"07 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 48-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.39}, {3.398976*^9, 5.33}, { - 3.4013952*^9, 5.27}, {3.4044192*^9, 5.2}, {3.4068384*^9, - 5.12}, {3.4147008*^9, 4.96}, {3.4225632*^9, 4.9}, { - 3.4304256*^9, 4.9}, {3.438288*^9, 4.93}, {3.4461504*^9, - 4.98}, {3.4540128*^9, 5.03}, {3.4618752*^9, 5.09}, { - 3.4697376*^9, 5.16}, {3.4776*^9, 5.21}, {3.4854624*^9, - 5.26}, {3.4933248*^9, 5.3}, {3.5011872*^9, 5.36}, { - 3.5090496*^9, 5.4}, {3.516912*^9, 5.44}, {3.5253792*^9, - 5.48}, {3.5332416*^9, 5.53}, {3.541104*^9, 5.57}, { - 3.5489664*^9, 5.61}, {3.5568288*^9, 5.64}, {3.5646912*^9, - 5.68}, {3.5725536*^9, 5.71}, {3.580416*^9, 5.74}, { - 3.5882784*^9, 5.79}, {3.5961408*^9, 5.83}, {3.6040032*^9, - 5.85}, {3.6118656*^9, 5.88}, {3.619728*^9, 5.92}, { - 3.6275904*^9, 5.96}, {3.6354528*^9, 5.98}, {3.6433152*^9, - 6.}, {3.6511776*^9, 6.04}, {3.65904*^9, 6.07}, { - 3.6669024*^9, 6.09}, {3.6747648*^9, 6.11}, {3.683232*^9, - 6.13}, {3.6910944*^9, 6.16}, {3.698352*^9, 6.18}, { - 3.7068192*^9, 6.2}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"08 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 49-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.4}, {3.398976*^9, 5.24}, { - 3.4013952*^9, 5.13}, {3.4044192*^9, 5.03}, {3.4068384*^9, - 4.96}, {3.4147008*^9, 4.77}, {3.4225632*^9, 4.73}, { - 3.4304256*^9, 4.76}, {3.438288*^9, 4.82}, {3.4461504*^9, - 4.89}, {3.4540128*^9, 4.96}, {3.4618752*^9, 5.03}, { - 3.4697376*^9, 5.1}, {3.4776*^9, 5.16}, {3.4854624*^9, - 5.21}, {3.4933248*^9, 5.26}, {3.5011872*^9, 5.32}, { - 3.5090496*^9, 5.36}, {3.516912*^9, 5.41}, {3.5253792*^9, - 5.45}, {3.5332416*^9, 5.51}, {3.541104*^9, 5.54}, { - 3.5489664*^9, 5.58}, {3.5568288*^9, 5.62}, {3.5646912*^9, - 5.66}, {3.5725536*^9, 5.69}, {3.580416*^9, 5.73}, { - 3.5882784*^9, 5.78}, {3.5961408*^9, 5.82}, {3.6040032*^9, - 5.85}, {3.6118656*^9, 5.88}, {3.619728*^9, 5.92}, { - 3.6275904*^9, 5.96}, {3.6354528*^9, 5.99}, {3.6433152*^9, - 6.01}, {3.6511776*^9, 6.05}, {3.65904*^9, 6.08}, { - 3.6669024*^9, 6.1}, {3.6747648*^9, 6.12}, {3.683232*^9, - 6.14}, {3.6910944*^9, 6.18}, {3.698352*^9, 6.2}, { - 3.7068192*^9, 6.21}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"09 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 50-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.395952*^9, 5.5}, {3.398976*^9, 5.23}, { - 3.4013952*^9, 5.08}, {3.4044192*^9, 4.99}, {3.4068384*^9, - 4.91}, {3.4147008*^9, 4.75}, {3.4225632*^9, 4.72}, { - 3.4304256*^9, 4.76}, {3.438288*^9, 4.82}, {3.4461504*^9, - 4.89}, {3.4540128*^9, 4.96}, {3.4618752*^9, 5.03}, { - 3.4697376*^9, 5.1}, {3.4776*^9, 5.15}, {3.4854624*^9, - 5.21}, {3.4933248*^9, 5.26}, {3.5011872*^9, 5.32}, { - 3.5090496*^9, 5.36}, {3.516912*^9, 5.4}, {3.5253792*^9, - 5.45}, {3.5332416*^9, 5.5}, {3.541104*^9, 5.54}, { - 3.5489664*^9, 5.58}, {3.5568288*^9, 5.62}, {3.5646912*^9, - 5.66}, {3.5725536*^9, 5.69}, {3.580416*^9, 5.73}, { - 3.5882784*^9, 5.78}, {3.5961408*^9, 5.82}, {3.6040032*^9, - 5.85}, {3.6118656*^9, 5.88}, {3.619728*^9, 5.92}, { - 3.6275904*^9, 5.96}, {3.6354528*^9, 5.99}, {3.6433152*^9, - 6.01}, {3.6511776*^9, 6.05}, {3.65904*^9, 6.08}, { - 3.6669024*^9, 6.1}, {3.6747648*^9, 6.12}, {3.683232*^9, - 6.15}, {3.6910944*^9, 6.18}, {3.698352*^9, 6.2}, { - 3.7068192*^9, 6.22}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"10 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 51-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.26}, {3.4013952*^9, 5.14}, { - 3.4044192*^9, 5.05}, {3.4068384*^9, 4.96}, {3.4147008*^9, - 4.76}, {3.4225632*^9, 4.72}, {3.4304256*^9, 4.76}, { - 3.438288*^9, 4.83}, {3.4461504*^9, 4.9}, {3.4540128*^9, - 4.97}, {3.4618752*^9, 5.04}, {3.4697376*^9, 5.12}, { - 3.4776*^9, 5.18}, {3.4854624*^9, 5.24}, {3.4933248*^9, - 5.29}, {3.5011872*^9, 5.36}, {3.5090496*^9, 5.4}, { - 3.516912*^9, 5.44}, {3.5253792*^9, 5.49}, {3.5332416*^9, - 5.54}, {3.541104*^9, 5.58}, {3.5489664*^9, 5.62}, { - 3.5568288*^9, 5.66}, {3.5646912*^9, 5.7}, {3.5725536*^9, - 5.73}, {3.580416*^9, 5.77}, {3.5882784*^9, 5.82}, { - 3.5961408*^9, 5.86}, {3.6040032*^9, 5.89}, {3.6118656*^9, - 5.92}, {3.619728*^9, 5.96}, {3.6275904*^9, 6.}, { - 3.6354528*^9, 6.03}, {3.6433152*^9, 6.05}, {3.6511776*^9, - 6.09}, {3.65904*^9, 6.12}, {3.6669024*^9, 6.14}, { - 3.6747648*^9, 6.16}, {3.683232*^9, 6.19}, {3.6910944*^9, - 6.22}, {3.698352*^9, 6.24}, {3.7068192*^9, 6.26}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"13 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 52-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.27}, {3.4013952*^9, 5.15}, { - 3.4044192*^9, 5.04}, {3.4068384*^9, 4.94}, {3.4147008*^9, - 4.71}, {3.4225632*^9, 4.67}, {3.4304256*^9, 4.71}, { - 3.438288*^9, 4.78}, {3.4461504*^9, 4.85}, {3.4540128*^9, - 4.92}, {3.4618752*^9, 5.}, {3.4697376*^9, 5.08}, { - 3.4776*^9, 5.15}, {3.4854624*^9, 5.21}, {3.4933248*^9, - 5.26}, {3.5011872*^9, 5.33}, {3.5090496*^9, 5.37}, { - 3.516912*^9, 5.42}, {3.5253792*^9, 5.46}, {3.5332416*^9, - 5.52}, {3.541104*^9, 5.55}, {3.5489664*^9, 5.59}, { - 3.5568288*^9, 5.63}, {3.5646912*^9, 5.68}, {3.5725536*^9, - 5.71}, {3.580416*^9, 5.74}, {3.5882784*^9, 5.79}, { - 3.5961408*^9, 5.84}, {3.6040032*^9, 5.86}, {3.6118656*^9, - 5.89}, {3.619728*^9, 5.94}, {3.6275904*^9, 5.98}, { - 3.6354528*^9, 6.}, {3.6433152*^9, 6.03}, {3.6511776*^9, - 6.06}, {3.65904*^9, 6.1}, {3.6669024*^9, 6.12}, { - 3.6747648*^9, 6.14}, {3.683232*^9, 6.16}, {3.6910944*^9, - 6.2}, {3.698352*^9, 6.22}, {3.7068192*^9, 6.23}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"14 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 53-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.26}, {3.4013952*^9, 5.15}, { - 3.4044192*^9, 4.98}, {3.4068384*^9, 4.87}, {3.4147008*^9, - 4.62}, {3.4225632*^9, 4.59}, {3.4304256*^9, 4.65}, { - 3.438288*^9, 4.73}, {3.4461504*^9, 4.8}, {3.4540128*^9, - 4.87}, {3.4618752*^9, 4.94}, {3.4697376*^9, 5.03}, { - 3.4776*^9, 5.09}, {3.4854624*^9, 5.15}, {3.4933248*^9, - 5.21}, {3.5011872*^9, 5.28}, {3.5090496*^9, 5.33}, { - 3.516912*^9, 5.38}, {3.5253792*^9, 5.43}, {3.5332416*^9, - 5.49}, {3.541104*^9, 5.53}, {3.5489664*^9, 5.57}, { - 3.5568288*^9, 5.62}, {3.5646912*^9, 5.67}, {3.5725536*^9, - 5.7}, {3.580416*^9, 5.74}, {3.5882784*^9, 5.79}, { - 3.5961408*^9, 5.84}, {3.6040032*^9, 5.86}, {3.6118656*^9, - 5.89}, {3.619728*^9, 5.94}, {3.6275904*^9, 5.98}, { - 3.6354528*^9, 6.01}, {3.6433152*^9, 6.03}, {3.6511776*^9, - 6.07}, {3.65904*^9, 6.11}, {3.6669024*^9, 6.13}, { - 3.6747648*^9, 6.15}, {3.683232*^9, 6.17}, {3.6910944*^9, - 6.21}, {3.698352*^9, 6.23}, {3.7068192*^9, 6.25}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"15 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 54-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.19}, {3.4013952*^9, 5.07}, { - 3.4044192*^9, 4.87}, {3.4068384*^9, 4.74}, {3.4147008*^9, - 4.4}, {3.4225632*^9, 4.38}, {3.4304256*^9, 4.49}, { - 3.438288*^9, 4.6}, {3.4461504*^9, 4.69}, {3.4540128*^9, - 4.76}, {3.4618752*^9, 4.84}, {3.4697376*^9, 4.92}, { - 3.4776*^9, 4.98}, {3.4854624*^9, 5.05}, {3.4933248*^9, - 5.11}, {3.5011872*^9, 5.19}, {3.5090496*^9, 5.24}, { - 3.516912*^9, 5.3}, {3.5253792*^9, 5.36}, {3.5332416*^9, - 5.42}, {3.541104*^9, 5.46}, {3.5489664*^9, 5.51}, { - 3.5568288*^9, 5.57}, {3.5646912*^9, 5.62}, {3.5725536*^9, - 5.65}, {3.580416*^9, 5.7}, {3.5882784*^9, 5.75}, { - 3.5961408*^9, 5.8}, {3.6040032*^9, 5.83}, {3.6118656*^9, - 5.87}, {3.619728*^9, 5.91}, {3.6275904*^9, 5.96}, { - 3.6354528*^9, 5.99}, {3.6433152*^9, 6.01}, {3.6511776*^9, - 6.05}, {3.65904*^9, 6.09}, {3.6669024*^9, 6.11}, { - 3.6747648*^9, 6.13}, {3.683232*^9, 6.16}, {3.6910944*^9, - 6.2}, {3.698352*^9, 6.22}, {3.7068192*^9, 6.24}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"16 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 55-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.11}, {3.4013952*^9, 5.}, { - 3.4044192*^9, 4.85}, {3.4068384*^9, 4.71}, {3.4147008*^9, - 4.47}, {3.4225632*^9, 4.46}, {3.4304256*^9, 4.57}, { - 3.438288*^9, 4.68}, {3.4461504*^9, 4.76}, {3.4540128*^9, - 4.83}, {3.4618752*^9, 4.91}, {3.4697376*^9, 4.99}, { - 3.4776*^9, 5.05}, {3.4854624*^9, 5.11}, {3.4933248*^9, - 5.17}, {3.5011872*^9, 5.25}, {3.5090496*^9, 5.3}, { - 3.516912*^9, 5.36}, {3.5253792*^9, 5.42}, {3.5332416*^9, - 5.48}, {3.541104*^9, 5.53}, {3.5489664*^9, 5.58}, { - 3.5568288*^9, 5.63}, {3.5646912*^9, 5.69}, {3.5725536*^9, - 5.72}, {3.580416*^9, 5.77}, {3.5882784*^9, 5.83}, { - 3.5961408*^9, 5.88}, {3.6040032*^9, 5.91}, {3.6118656*^9, - 5.94}, {3.619728*^9, 5.99}, {3.6275904*^9, 6.03}, { - 3.6354528*^9, 6.06}, {3.6433152*^9, 6.09}, {3.6511776*^9, - 6.12}, {3.65904*^9, 6.16}, {3.6669024*^9, 6.18}, { - 3.6747648*^9, 6.2}, {3.683232*^9, 6.23}, {3.6910944*^9, - 6.27}, {3.698352*^9, 6.3}, {3.7068192*^9, 6.31}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"17 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 56-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.09}, {3.4013952*^9, 4.97}, { - 3.4044192*^9, 4.81}, {3.4068384*^9, 4.7}, {3.4147008*^9, - 4.47}, {3.4225632*^9, 4.46}, {3.4304256*^9, 4.55}, { - 3.438288*^9, 4.65}, {3.4461504*^9, 4.73}, {3.4540128*^9, - 4.8}, {3.4618752*^9, 4.87}, {3.4697376*^9, 4.95}, { - 3.4776*^9, 5.01}, {3.4854624*^9, 5.08}, {3.4933248*^9, - 5.14}, {3.5011872*^9, 5.21}, {3.5090496*^9, 5.27}, { - 3.516912*^9, 5.33}, {3.5253792*^9, 5.38}, {3.5332416*^9, - 5.45}, {3.541104*^9, 5.49}, {3.5489664*^9, 5.54}, { - 3.5568288*^9, 5.6}, {3.5646912*^9, 5.65}, {3.5725536*^9, - 5.69}, {3.580416*^9, 5.74}, {3.5882784*^9, 5.79}, { - 3.5961408*^9, 5.85}, {3.6040032*^9, 5.88}, {3.6118656*^9, - 5.91}, {3.619728*^9, 5.96}, {3.6275904*^9, 6.01}, { - 3.6354528*^9, 6.04}, {3.6433152*^9, 6.06}, {3.6511776*^9, - 6.1}, {3.65904*^9, 6.14}, {3.6669024*^9, 6.16}, { - 3.6747648*^9, 6.18}, {3.683232*^9, 6.22}, {3.6910944*^9, - 6.26}, {3.698352*^9, 6.28}, {3.7068192*^9, 6.3}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"20 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 57-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.12}, {3.4013952*^9, 4.96}, { - 3.4044192*^9, 4.77}, {3.4068384*^9, 4.65}, {3.4147008*^9, - 4.43}, {3.4225632*^9, 4.43}, {3.4304256*^9, 4.53}, { - 3.438288*^9, 4.61}, {3.4461504*^9, 4.68}, {3.4540128*^9, - 4.74}, {3.4618752*^9, 4.81}, {3.4697376*^9, 4.88}, { - 3.4776*^9, 4.94}, {3.4854624*^9, 5.}, {3.4933248*^9, - 5.06}, {3.5011872*^9, 5.13}, {3.5090496*^9, 5.19}, { - 3.516912*^9, 5.25}, {3.5253792*^9, 5.3}, {3.5332416*^9, - 5.37}, {3.541104*^9, 5.41}, {3.5489664*^9, 5.46}, { - 3.5568288*^9, 5.52}, {3.5646912*^9, 5.57}, {3.5725536*^9, - 5.61}, {3.580416*^9, 5.66}, {3.5882784*^9, 5.71}, { - 3.5961408*^9, 5.77}, {3.6040032*^9, 5.8}, {3.6118656*^9, - 5.83}, {3.619728*^9, 5.88}, {3.6275904*^9, 5.93}, { - 3.6354528*^9, 5.96}, {3.6433152*^9, 5.98}, {3.6511776*^9, - 6.02}, {3.65904*^9, 6.06}, {3.6669024*^9, 6.08}, { - 3.6747648*^9, 6.1}, {3.683232*^9, 6.14}, {3.6910944*^9, - 6.18}, {3.698352*^9, 6.2}, {3.7068192*^9, 6.22}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"21 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 58-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.21}, {3.4013952*^9, 5.07}, { - 3.4044192*^9, 4.9}, {3.4068384*^9, 4.78}, {3.4147008*^9, - 4.56}, {3.4225632*^9, 4.54}, {3.4304256*^9, 4.62}, { - 3.438288*^9, 4.69}, {3.4461504*^9, 4.75}, {3.4540128*^9, - 4.81}, {3.4618752*^9, 4.86}, {3.4697376*^9, 4.93}, { - 3.4776*^9, 4.97}, {3.4854624*^9, 5.03}, {3.4933248*^9, - 5.08}, {3.5011872*^9, 5.15}, {3.5090496*^9, 5.19}, { - 3.516912*^9, 5.25}, {3.5253792*^9, 5.3}, {3.5332416*^9, - 5.36}, {3.541104*^9, 5.4}, {3.5489664*^9, 5.45}, { - 3.5568288*^9, 5.5}, {3.5646912*^9, 5.55}, {3.5725536*^9, - 5.58}, {3.580416*^9, 5.63}, {3.5882784*^9, 5.68}, { - 3.5961408*^9, 5.73}, {3.6040032*^9, 5.76}, {3.6118656*^9, - 5.79}, {3.619728*^9, 5.83}, {3.6275904*^9, 5.88}, { - 3.6354528*^9, 5.9}, {3.6433152*^9, 5.92}, {3.6511776*^9, - 5.96}, {3.65904*^9, 5.99}, {3.6669024*^9, 6.01}, { - 3.6747648*^9, 6.03}, {3.683232*^9, 6.06}, {3.6910944*^9, - 6.09}, {3.698352*^9, 6.11}, {3.7068192*^9, 6.13}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"22 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 59-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.29}, {3.4013952*^9, 5.16}, { - 3.4044192*^9, 4.97}, {3.4068384*^9, 4.86}, {3.4147008*^9, - 4.64}, {3.4225632*^9, 4.6}, {3.4304256*^9, 4.66}, { - 3.438288*^9, 4.73}, {3.4461504*^9, 4.78}, {3.4540128*^9, - 4.84}, {3.4618752*^9, 4.89}, {3.4697376*^9, 4.95}, { - 3.4776*^9, 4.98}, {3.4854624*^9, 5.03}, {3.4933248*^9, - 5.08}, {3.5011872*^9, 5.14}, {3.5090496*^9, 5.18}, { - 3.516912*^9, 5.23}, {3.5253792*^9, 5.28}, {3.5332416*^9, - 5.33}, {3.541104*^9, 5.37}, {3.5489664*^9, 5.42}, { - 3.5568288*^9, 5.46}, {3.5646912*^9, 5.51}, {3.5725536*^9, - 5.54}, {3.580416*^9, 5.58}, {3.5882784*^9, 5.62}, { - 3.5961408*^9, 5.67}, {3.6040032*^9, 5.7}, {3.6118656*^9, - 5.73}, {3.619728*^9, 5.77}, {3.6275904*^9, 5.82}, { - 3.6354528*^9, 5.84}, {3.6433152*^9, 5.86}, {3.6511776*^9, - 5.89}, {3.65904*^9, 5.93}, {3.6669024*^9, 5.94}, { - 3.6747648*^9, 5.96}, {3.683232*^9, 5.99}, {3.6910944*^9, - 6.02}, {3.698352*^9, 6.04}, {3.7068192*^9, 6.05}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"23 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 60-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.33}, {3.4013952*^9, 5.22}, { - 3.4044192*^9, 5.06}, {3.4068384*^9, 4.97}, {3.4147008*^9, - 4.74}, {3.4225632*^9, 4.69}, {3.4304256*^9, 4.72}, { - 3.438288*^9, 4.77}, {3.4461504*^9, 4.82}, {3.4540128*^9, - 4.87}, {3.4618752*^9, 4.91}, {3.4697376*^9, 4.96}, { - 3.4776*^9, 4.99}, {3.4854624*^9, 5.03}, {3.4933248*^9, - 5.07}, {3.5011872*^9, 5.13}, {3.5090496*^9, 5.16}, { - 3.516912*^9, 5.21}, {3.5253792*^9, 5.25}, {3.5332416*^9, - 5.3}, {3.541104*^9, 5.34}, {3.5489664*^9, 5.38}, { - 3.5568288*^9, 5.42}, {3.5646912*^9, 5.46}, {3.5725536*^9, - 5.49}, {3.580416*^9, 5.52}, {3.5882784*^9, 5.56}, { - 3.5961408*^9, 5.6}, {3.6040032*^9, 5.63}, {3.6118656*^9, - 5.65}, {3.619728*^9, 5.69}, {3.6275904*^9, 5.73}, { - 3.6354528*^9, 5.75}, {3.6433152*^9, 5.77}, {3.6511776*^9, - 5.8}, {3.65904*^9, 5.84}, {3.6669024*^9, 5.85}, { - 3.6747648*^9, 5.87}, {3.683232*^9, 5.89}, {3.6910944*^9, - 5.93}, {3.698352*^9, 5.94}, {3.7068192*^9, 5.96}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"24 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 61-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.32}, {3.4013952*^9, 5.19}, { - 3.4044192*^9, 5.03}, {3.4068384*^9, 4.91}, {3.4147008*^9, - 4.66}, {3.4225632*^9, 4.61}, {3.4304256*^9, 4.65}, { - 3.438288*^9, 4.7}, {3.4461504*^9, 4.74}, {3.4540128*^9, - 4.8}, {3.4618752*^9, 4.85}, {3.4697376*^9, 4.91}, { - 3.4776*^9, 4.94}, {3.4854624*^9, 4.98}, {3.4933248*^9, - 5.03}, {3.5011872*^9, 5.08}, {3.5090496*^9, 5.12}, { - 3.516912*^9, 5.17}, {3.5253792*^9, 5.21}, {3.5332416*^9, - 5.26}, {3.541104*^9, 5.3}, {3.5489664*^9, 5.34}, { - 3.5568288*^9, 5.38}, {3.5646912*^9, 5.43}, {3.5725536*^9, - 5.45}, {3.580416*^9, 5.49}, {3.5882784*^9, 5.52}, { - 3.5961408*^9, 5.57}, {3.6040032*^9, 5.59}, {3.6118656*^9, - 5.62}, {3.619728*^9, 5.65}, {3.6275904*^9, 5.7}, { - 3.6354528*^9, 5.72}, {3.6433152*^9, 5.74}, {3.6511776*^9, - 5.77}, {3.65904*^9, 5.8}, {3.6669024*^9, 5.82}, { - 3.6747648*^9, 5.83}, {3.683232*^9, 5.86}, {3.6910944*^9, - 5.89}, {3.698352*^9, 5.91}, {3.7068192*^9, 5.92}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"27 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 62-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.32}, {3.4013952*^9, 5.17}, { - 3.4044192*^9, 4.97}, {3.4068384*^9, 4.81}, {3.4147008*^9, - 4.56}, {3.4225632*^9, 4.51}, {3.4304256*^9, 4.54}, { - 3.438288*^9, 4.58}, {3.4461504*^9, 4.63}, {3.4540128*^9, - 4.69}, {3.4618752*^9, 4.75}, {3.4697376*^9, 4.82}, { - 3.4776*^9, 4.86}, {3.4854624*^9, 4.91}, {3.4933248*^9, - 4.96}, {3.5011872*^9, 5.02}, {3.5090496*^9, 5.07}, { - 3.516912*^9, 5.12}, {3.5253792*^9, 5.17}, {3.5332416*^9, - 5.22}, {3.541104*^9, 5.26}, {3.5489664*^9, 5.31}, { - 3.5568288*^9, 5.36}, {3.5646912*^9, 5.41}, {3.5725536*^9, - 5.44}, {3.580416*^9, 5.48}, {3.5882784*^9, 5.52}, { - 3.5961408*^9, 5.57}, {3.6040032*^9, 5.59}, {3.6118656*^9, - 5.62}, {3.619728*^9, 5.66}, {3.6275904*^9, 5.71}, { - 3.6354528*^9, 5.73}, {3.6433152*^9, 5.75}, {3.6511776*^9, - 5.79}, {3.65904*^9, 5.82}, {3.6669024*^9, 5.84}, { - 3.6747648*^9, 5.86}, {3.683232*^9, 5.89}, {3.6910944*^9, - 5.92}, {3.698352*^9, 5.94}, {3.7068192*^9, 5.96}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"28 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 63-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.39}, {3.4013952*^9, 5.23}, { - 3.4044192*^9, 5.04}, {3.4068384*^9, 4.88}, {3.4147008*^9, - 4.62}, {3.4225632*^9, 4.54}, {3.4304256*^9, 4.55}, { - 3.438288*^9, 4.59}, {3.4461504*^9, 4.64}, {3.4540128*^9, - 4.71}, {3.4618752*^9, 4.76}, {3.4697376*^9, 4.83}, { - 3.4776*^9, 4.87}, {3.4854624*^9, 4.92}, {3.4933248*^9, - 4.98}, {3.5011872*^9, 5.05}, {3.5090496*^9, 5.09}, { - 3.516912*^9, 5.15}, {3.5253792*^9, 5.2}, {3.5332416*^9, - 5.26}, {3.541104*^9, 5.31}, {3.5489664*^9, 5.36}, { - 3.5568288*^9, 5.4}, {3.5646912*^9, 5.45}, {3.5725536*^9, - 5.48}, {3.580416*^9, 5.52}, {3.5882784*^9, 5.56}, { - 3.5961408*^9, 5.61}, {3.6040032*^9, 5.64}, {3.6118656*^9, - 5.67}, {3.619728*^9, 5.71}, {3.6275904*^9, 5.75}, { - 3.6354528*^9, 5.77}, {3.6433152*^9, 5.8}, {3.6511776*^9, - 5.83}, {3.65904*^9, 5.87}, {3.6669024*^9, 5.88}, { - 3.6747648*^9, 5.9}, {3.683232*^9, 5.93}, {3.6910944*^9, - 5.97}, {3.698352*^9, 5.98}, {3.7068192*^9, 6.}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"29 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 64-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.45}, {3.4013952*^9, 5.29}, { - 3.4044192*^9, 5.07}, {3.4068384*^9, 4.89}, {3.4147008*^9, - 4.56}, {3.4225632*^9, 4.46}, {3.4304256*^9, 4.47}, { - 3.438288*^9, 4.51}, {3.4461504*^9, 4.57}, {3.4540128*^9, - 4.63}, {3.4618752*^9, 4.69}, {3.4697376*^9, 4.76}, { - 3.4776*^9, 4.81}, {3.4854624*^9, 4.87}, {3.4933248*^9, - 4.93}, {3.5011872*^9, 5.}, {3.5090496*^9, 5.05}, { - 3.516912*^9, 5.11}, {3.5253792*^9, 5.16}, {3.5332416*^9, - 5.22}, {3.541104*^9, 5.27}, {3.5489664*^9, 5.32}, { - 3.5568288*^9, 5.36}, {3.5646912*^9, 5.42}, {3.5725536*^9, - 5.45}, {3.580416*^9, 5.49}, {3.5882784*^9, 5.54}, { - 3.5961408*^9, 5.59}, {3.6040032*^9, 5.62}, {3.6118656*^9, - 5.65}, {3.619728*^9, 5.69}, {3.6275904*^9, 5.74}, { - 3.6354528*^9, 5.76}, {3.6433152*^9, 5.79}, {3.6511776*^9, - 5.83}, {3.65904*^9, 5.86}, {3.6669024*^9, 5.88}, { - 3.6747648*^9, 5.91}, {3.683232*^9, 5.94}, {3.6910944*^9, - 5.97}, {3.698352*^9, 5.99}, {3.7068192*^9, 6.01}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"30 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 65-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.5}, {3.4013952*^9, 5.34}, { - 3.4044192*^9, 5.1}, {3.4068384*^9, 4.93}, {3.4147008*^9, - 4.64}, {3.4225632*^9, 4.55}, {3.4304256*^9, 4.56}, { - 3.438288*^9, 4.6}, {3.4461504*^9, 4.65}, {3.4540128*^9, - 4.71}, {3.4618752*^9, 4.75}, {3.4697376*^9, 4.81}, { - 3.4776*^9, 4.85}, {3.4854624*^9, 4.9}, {3.4933248*^9, - 4.95}, {3.5011872*^9, 5.01}, {3.5090496*^9, 5.06}, { - 3.516912*^9, 5.11}, {3.5253792*^9, 5.16}, {3.5332416*^9, - 5.22}, {3.541104*^9, 5.27}, {3.5489664*^9, 5.31}, { - 3.5568288*^9, 5.36}, {3.5646912*^9, 5.41}, {3.5725536*^9, - 5.45}, {3.580416*^9, 5.49}, {3.5882784*^9, 5.53}, { - 3.5961408*^9, 5.58}, {3.6040032*^9, 5.61}, {3.6118656*^9, - 5.65}, {3.619728*^9, 5.69}, {3.6275904*^9, 5.73}, { - 3.6354528*^9, 5.76}, {3.6433152*^9, 5.79}, {3.6511776*^9, - 5.82}, {3.65904*^9, 5.86}, {3.6669024*^9, 5.88}, { - 3.6747648*^9, 5.9}, {3.683232*^9, 5.93}, {3.6910944*^9, - 5.97}, {3.698352*^9, 5.98}, {3.7068192*^9, 6.}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"31 Aug 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 66-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.6}, {3.4013952*^9, 5.4}, { - 3.4044192*^9, 5.16}, {3.4068384*^9, 4.97}, {3.4147008*^9, - 4.64}, {3.4225632*^9, 4.55}, {3.4304256*^9, 4.55}, { - 3.438288*^9, 4.59}, {3.4461504*^9, 4.64}, {3.4540128*^9, - 4.7}, {3.4618752*^9, 4.75}, {3.4697376*^9, 4.81}, { - 3.4776*^9, 4.85}, {3.4854624*^9, 4.9}, {3.4933248*^9, - 4.95}, {3.5011872*^9, 5.01}, {3.5090496*^9, 5.06}, { - 3.516912*^9, 5.11}, {3.5253792*^9, 5.16}, {3.5332416*^9, - 5.22}, {3.541104*^9, 5.27}, {3.5489664*^9, 5.31}, { - 3.5568288*^9, 5.36}, {3.5646912*^9, 5.41}, {3.5725536*^9, - 5.45}, {3.580416*^9, 5.49}, {3.5882784*^9, 5.53}, { - 3.5961408*^9, 5.58}, {3.6040032*^9, 5.61}, {3.6118656*^9, - 5.65}, {3.619728*^9, 5.69}, {3.6275904*^9, 5.73}, { - 3.6354528*^9, 5.76}, {3.6433152*^9, 5.79}, {3.6511776*^9, - 5.82}, {3.65904*^9, 5.86}, {3.6669024*^9, 5.88}, { - 3.6747648*^9, 5.9}, {3.683232*^9, 5.93}, {3.6910944*^9, - 5.97}, {3.698352*^9, 5.98}, {3.7068192*^9, 6.}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"04 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 67-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.55}, {3.4013952*^9, 5.36}, { - 3.4044192*^9, 5.08}, {3.4068384*^9, 4.9}, {3.4147008*^9, - 4.51}, {3.4225632*^9, 4.41}, {3.4304256*^9, 4.42}, { - 3.438288*^9, 4.46}, {3.4461504*^9, 4.52}, {3.4540128*^9, - 4.58}, {3.4618752*^9, 4.64}, {3.4697376*^9, 4.71}, { - 3.4776*^9, 4.75}, {3.4854624*^9, 4.8}, {3.4933248*^9, - 4.86}, {3.5011872*^9, 4.92}, {3.5090496*^9, 4.97}, { - 3.516912*^9, 5.03}, {3.5253792*^9, 5.08}, {3.5332416*^9, - 5.14}, {3.541104*^9, 5.18}, {3.5489664*^9, 5.23}, { - 3.5568288*^9, 5.28}, {3.5646912*^9, 5.34}, {3.5725536*^9, - 5.38}, {3.580416*^9, 5.42}, {3.5882784*^9, 5.46}, { - 3.5961408*^9, 5.51}, {3.6040032*^9, 5.54}, {3.6118656*^9, - 5.58}, {3.619728*^9, 5.62}, {3.6275904*^9, 5.67}, { - 3.6354528*^9, 5.69}, {3.6433152*^9, 5.72}, {3.6511776*^9, - 5.76}, {3.65904*^9, 5.79}, {3.6669024*^9, 5.81}, { - 3.6747648*^9, 5.84}, {3.683232*^9, 5.87}, {3.6910944*^9, - 5.9}, {3.698352*^9, 5.92}, {3.7068192*^9, 5.94}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"05 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 68-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.59}, {3.4013952*^9, 5.41}, { - 3.4044192*^9, 5.13}, {3.4068384*^9, 4.94}, {3.4147008*^9, - 4.56}, {3.4225632*^9, 4.46}, {3.4304256*^9, 4.45}, { - 3.438288*^9, 4.49}, {3.4461504*^9, 4.55}, {3.4540128*^9, - 4.62}, {3.4618752*^9, 4.67}, {3.4697376*^9, 4.73}, { - 3.4776*^9, 4.76}, {3.4854624*^9, 4.81}, {3.4933248*^9, - 4.86}, {3.5011872*^9, 4.92}, {3.5090496*^9, 4.97}, { - 3.516912*^9, 5.02}, {3.5253792*^9, 5.07}, {3.5332416*^9, - 5.13}, {3.541104*^9, 5.18}, {3.5489664*^9, 5.23}, { - 3.5568288*^9, 5.27}, {3.5646912*^9, 5.33}, {3.5725536*^9, - 5.37}, {3.580416*^9, 5.41}, {3.5882784*^9, 5.45}, { - 3.5961408*^9, 5.5}, {3.6040032*^9, 5.53}, {3.6118656*^9, - 5.57}, {3.619728*^9, 5.61}, {3.6275904*^9, 5.66}, { - 3.6354528*^9, 5.68}, {3.6433152*^9, 5.71}, {3.6511776*^9, - 5.75}, {3.65904*^9, 5.78}, {3.6669024*^9, 5.8}, { - 3.6747648*^9, 5.83}, {3.683232*^9, 5.86}, {3.6910944*^9, - 5.89}, {3.698352*^9, 5.91}, {3.7068192*^9, 5.93}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"06 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 69-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.56}, {3.4013952*^9, 5.28}, { - 3.4044192*^9, 4.98}, {3.4068384*^9, 4.74}, {3.4147008*^9, - 4.31}, {3.4225632*^9, 4.23}, {3.4304256*^9, 4.24}, { - 3.438288*^9, 4.29}, {3.4461504*^9, 4.36}, {3.4540128*^9, - 4.42}, {3.4618752*^9, 4.47}, {3.4697376*^9, 4.53}, { - 3.4776*^9, 4.57}, {3.4854624*^9, 4.62}, {3.4933248*^9, - 4.67}, {3.5011872*^9, 4.73}, {3.5090496*^9, 4.77}, { - 3.516912*^9, 4.83}, {3.5253792*^9, 4.87}, {3.5332416*^9, - 4.93}, {3.541104*^9, 4.98}, {3.5489664*^9, 5.03}, { - 3.5568288*^9, 5.08}, {3.5646912*^9, 5.14}, {3.5725536*^9, - 5.18}, {3.580416*^9, 5.23}, {3.5882784*^9, 5.28}, { - 3.5961408*^9, 5.33}, {3.6040032*^9, 5.36}, {3.6118656*^9, - 5.4}, {3.619728*^9, 5.45}, {3.6275904*^9, 5.5}, { - 3.6354528*^9, 5.53}, {3.6433152*^9, 5.56}, {3.6511776*^9, - 5.6}, {3.65904*^9, 5.64}, {3.6669024*^9, 5.66}, { - 3.6747648*^9, 5.69}, {3.683232*^9, 5.73}, {3.6910944*^9, - 5.77}, {3.698352*^9, 5.79}, {3.7068192*^9, 5.81}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"07 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 70-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.62}, {3.4013952*^9, 5.33}, { - 3.4044192*^9, 5.01}, {3.4068384*^9, 4.78}, {3.4147008*^9, - 4.31}, {3.4225632*^9, 4.21}, {3.4304256*^9, 4.2}, { - 3.438288*^9, 4.24}, {3.4461504*^9, 4.29}, {3.4540128*^9, - 4.36}, {3.4618752*^9, 4.41}, {3.4697376*^9, 4.47}, { - 3.4776*^9, 4.51}, {3.4854624*^9, 4.56}, {3.4933248*^9, - 4.61}, {3.5011872*^9, 4.67}, {3.5090496*^9, 4.72}, { - 3.516912*^9, 4.77}, {3.5253792*^9, 4.82}, {3.5332416*^9, - 4.88}, {3.541104*^9, 4.92}, {3.5489664*^9, 4.98}, { - 3.5568288*^9, 5.03}, {3.5646912*^9, 5.08}, {3.5725536*^9, - 5.12}, {3.580416*^9, 5.17}, {3.5882784*^9, 5.22}, { - 3.5961408*^9, 5.27}, {3.6040032*^9, 5.3}, {3.6118656*^9, - 5.34}, {3.619728*^9, 5.39}, {3.6275904*^9, 5.44}, { - 3.6354528*^9, 5.47}, {3.6433152*^9, 5.5}, {3.6511776*^9, - 5.54}, {3.65904*^9, 5.58}, {3.6669024*^9, 5.61}, { - 3.6747648*^9, 5.64}, {3.683232*^9, 5.68}, {3.6910944*^9, - 5.72}, {3.698352*^9, 5.74}, {3.7068192*^9, 5.76}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"10 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 71-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.66}, {3.4013952*^9, 5.43}, { - 3.4044192*^9, 5.12}, {3.4068384*^9, 4.93}, {3.4147008*^9, - 4.45}, {3.4225632*^9, 4.33}, {3.4304256*^9, 4.3}, { - 3.438288*^9, 4.31}, {3.4461504*^9, 4.36}, {3.4540128*^9, - 4.43}, {3.4618752*^9, 4.49}, {3.4697376*^9, 4.55}, { - 3.4776*^9, 4.59}, {3.4854624*^9, 4.64}, {3.4933248*^9, - 4.69}, {3.5011872*^9, 4.75}, {3.5090496*^9, 4.79}, { - 3.516912*^9, 4.84}, {3.5253792*^9, 4.89}, {3.5332416*^9, - 4.95}, {3.541104*^9, 4.99}, {3.5489664*^9, 5.05}, { - 3.5568288*^9, 5.1}, {3.5646912*^9, 5.15}, {3.5725536*^9, - 5.19}, {3.580416*^9, 5.24}, {3.5882784*^9, 5.29}, { - 3.5961408*^9, 5.35}, {3.6040032*^9, 5.38}, {3.6118656*^9, - 5.42}, {3.619728*^9, 5.47}, {3.6275904*^9, 5.52}, { - 3.6354528*^9, 5.55}, {3.6433152*^9, 5.58}, {3.6511776*^9, - 5.62}, {3.65904*^9, 5.66}, {3.6669024*^9, 5.69}, { - 3.6747648*^9, 5.72}, {3.683232*^9, 5.76}, {3.6910944*^9, - 5.8}, {3.698352*^9, 5.82}, {3.7068192*^9, 5.84}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"11 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 72-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.68}, {3.4013952*^9, 5.48}, { - 3.4044192*^9, 5.18}, {3.4068384*^9, 4.97}, {3.4147008*^9, - 4.51}, {3.4225632*^9, 4.34}, {3.4304256*^9, 4.3}, { - 3.438288*^9, 4.31}, {3.4461504*^9, 4.36}, {3.4540128*^9, - 4.44}, {3.4618752*^9, 4.5}, {3.4697376*^9, 4.57}, { - 3.4776*^9, 4.61}, {3.4854624*^9, 4.67}, {3.4933248*^9, - 4.72}, {3.5011872*^9, 4.79}, {3.5090496*^9, 4.83}, { - 3.516912*^9, 4.89}, {3.5253792*^9, 4.94}, {3.5332416*^9, - 5.01}, {3.541104*^9, 5.06}, {3.5489664*^9, 5.11}, { - 3.5568288*^9, 5.17}, {3.5646912*^9, 5.23}, {3.5725536*^9, - 5.27}, {3.580416*^9, 5.31}, {3.5882784*^9, 5.37}, { - 3.5961408*^9, 5.43}, {3.6040032*^9, 5.46}, {3.6118656*^9, - 5.5}, {3.619728*^9, 5.55}, {3.6275904*^9, 5.6}, { - 3.6354528*^9, 5.63}, {3.6433152*^9, 5.66}, {3.6511776*^9, - 5.7}, {3.65904*^9, 5.74}, {3.6669024*^9, 5.77}, { - 3.6747648*^9, 5.8}, {3.683232*^9, 5.84}, {3.6910944*^9, - 5.88}, {3.698352*^9, 5.9}, {3.7068192*^9, 5.92}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"12 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 73-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.63}, {3.4013952*^9, 5.4}, { - 3.4044192*^9, 5.13}, {3.4068384*^9, 4.94}, {3.4147008*^9, - 4.54}, {3.4225632*^9, 4.42}, {3.4304256*^9, 4.4}, { - 3.438288*^9, 4.42}, {3.4461504*^9, 4.47}, {3.4540128*^9, - 4.54}, {3.4618752*^9, 4.61}, {3.4697376*^9, 4.68}, { - 3.4776*^9, 4.73}, {3.4854624*^9, 4.78}, {3.4933248*^9, - 4.83}, {3.5011872*^9, 4.9}, {3.5090496*^9, 4.94}, { - 3.516912*^9, 5.}, {3.5253792*^9, 5.05}, {3.5332416*^9, - 5.11}, {3.541104*^9, 5.16}, {3.5489664*^9, 5.22}, { - 3.5568288*^9, 5.27}, {3.5646912*^9, 5.33}, {3.5725536*^9, - 5.37}, {3.580416*^9, 5.41}, {3.5882784*^9, 5.46}, { - 3.5961408*^9, 5.52}, {3.6040032*^9, 5.55}, {3.6118656*^9, - 5.59}, {3.619728*^9, 5.64}, {3.6275904*^9, 5.69}, { - 3.6354528*^9, 5.72}, {3.6433152*^9, 5.75}, {3.6511776*^9, - 5.79}, {3.65904*^9, 5.83}, {3.6669024*^9, 5.85}, { - 3.6747648*^9, 5.89}, {3.683232*^9, 5.92}, {3.6910944*^9, - 5.96}, {3.698352*^9, 5.98}, {3.7068192*^9, 6.01}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"13 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 74-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.398976*^9, 5.59}, {3.4013952*^9, 5.28}, { - 3.4044192*^9, 5.05}, {3.4068384*^9, 4.89}, {3.4147008*^9, - 4.52}, {3.4225632*^9, 4.4}, {3.4304256*^9, 4.36}, { - 3.438288*^9, 4.38}, {3.4461504*^9, 4.43}, {3.4540128*^9, - 4.51}, {3.4618752*^9, 4.59}, {3.4697376*^9, 4.66}, { - 3.4776*^9, 4.71}, {3.4854624*^9, 4.77}, {3.4933248*^9, - 4.83}, {3.5011872*^9, 4.89}, {3.5090496*^9, 4.94}, { - 3.516912*^9, 5.}, {3.5253792*^9, 5.05}, {3.5332416*^9, - 5.11}, {3.541104*^9, 5.16}, {3.5489664*^9, 5.22}, { - 3.5568288*^9, 5.27}, {3.5646912*^9, 5.33}, {3.5725536*^9, - 5.37}, {3.580416*^9, 5.41}, {3.5882784*^9, 5.46}, { - 3.5961408*^9, 5.52}, {3.6040032*^9, 5.55}, {3.6118656*^9, - 5.59}, {3.619728*^9, 5.64}, {3.6275904*^9, 5.69}, { - 3.6354528*^9, 5.72}, {3.6433152*^9, 5.75}, {3.6511776*^9, - 5.79}, {3.65904*^9, 5.83}, {3.6669024*^9, 5.85}, { - 3.6747648*^9, 5.89}, {3.683232*^9, 5.92}, {3.6910944*^9, - 5.96}, {3.698352*^9, 5.98}, {3.7068192*^9, 6.01}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"14 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 75-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.29}, {3.4044192*^9, 5.05}, { - 3.4068384*^9, 4.91}, {3.4147008*^9, 4.56}, {3.4225632*^9, - 4.43}, {3.4304256*^9, 4.39}, {3.438288*^9, 4.4}, { - 3.4461504*^9, 4.46}, {3.4540128*^9, 4.54}, {3.4618752*^9, - 4.62}, {3.4697376*^9, 4.7}, {3.4776*^9, 4.75}, { - 3.4854624*^9, 4.81}, {3.4933248*^9, 4.86}, {3.5011872*^9, - 4.93}, {3.5090496*^9, 4.97}, {3.516912*^9, 5.03}, { - 3.5253792*^9, 5.08}, {3.5332416*^9, 5.15}, {3.541104*^9, - 5.2}, {3.5489664*^9, 5.25}, {3.5568288*^9, 5.3}, { - 3.5646912*^9, 5.36}, {3.5725536*^9, 5.4}, {3.580416*^9, - 5.44}, {3.5882784*^9, 5.49}, {3.5961408*^9, 5.55}, { - 3.6040032*^9, 5.58}, {3.6118656*^9, 5.62}, {3.619728*^9, - 5.66}, {3.6275904*^9, 5.7}, {3.6354528*^9, 5.73}, { - 3.6433152*^9, 5.76}, {3.6511776*^9, 5.8}, {3.65904*^9, - 5.83}, {3.6669024*^9, 5.86}, {3.6747648*^9, 5.89}, { - 3.683232*^9, 5.92}, {3.6910944*^9, 5.96}, {3.698352*^9, - 5.98}, {3.7068192*^9, 6.}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"17 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 76-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.16}, {3.4044192*^9, 4.88}, { - 3.4068384*^9, 4.71}, {3.4147008*^9, 4.39}, {3.4225632*^9, - 4.28}, {3.4304256*^9, 4.26}, {3.438288*^9, 4.3}, { - 3.4461504*^9, 4.38}, {3.4540128*^9, 4.47}, {3.4618752*^9, - 4.56}, {3.4697376*^9, 4.65}, {3.4776*^9, 4.71}, { - 3.4854624*^9, 4.78}, {3.4933248*^9, 4.84}, {3.5011872*^9, - 4.91}, {3.5090496*^9, 4.96}, {3.516912*^9, 5.02}, { - 3.5253792*^9, 5.08}, {3.5332416*^9, 5.14}, {3.541104*^9, - 5.19}, {3.5489664*^9, 5.25}, {3.5568288*^9, 5.3}, { - 3.5646912*^9, 5.36}, {3.5725536*^9, 5.41}, {3.580416*^9, - 5.45}, {3.5882784*^9, 5.5}, {3.5961408*^9, 5.56}, { - 3.6040032*^9, 5.6}, {3.6118656*^9, 5.64}, {3.619728*^9, - 5.68}, {3.6275904*^9, 5.72}, {3.6354528*^9, 5.75}, { - 3.6433152*^9, 5.79}, {3.6511776*^9, 5.82}, {3.65904*^9, - 5.86}, {3.6669024*^9, 5.89}, {3.6747648*^9, 5.92}, { - 3.683232*^9, 5.95}, {3.6910944*^9, 5.99}, {3.698352*^9, - 6.02}, {3.7068192*^9, 6.04}, {3.7146816*^9, 6.08}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"18 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 77-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.06}, {3.4044192*^9, 4.82}, { - 3.4068384*^9, 4.65}, {3.4147008*^9, 4.37}, {3.4225632*^9, - 4.3}, {3.4304256*^9, 4.28}, {3.438288*^9, 4.32}, { - 3.4461504*^9, 4.39}, {3.4540128*^9, 4.48}, {3.4618752*^9, - 4.56}, {3.4697376*^9, 4.65}, {3.4776*^9, 4.71}, { - 3.4854624*^9, 4.78}, {3.4933248*^9, 4.85}, {3.5011872*^9, - 4.92}, {3.5090496*^9, 4.97}, {3.516912*^9, 5.03}, { - 3.5253792*^9, 5.09}, {3.5332416*^9, 5.15}, {3.541104*^9, - 5.2}, {3.5489664*^9, 5.26}, {3.5568288*^9, 5.31}, { - 3.5646912*^9, 5.37}, {3.5725536*^9, 5.42}, {3.580416*^9, - 5.46}, {3.5882784*^9, 5.51}, {3.5961408*^9, 5.57}, { - 3.6040032*^9, 5.61}, {3.6118656*^9, 5.65}, {3.619728*^9, - 5.69}, {3.6275904*^9, 5.74}, {3.6354528*^9, 5.77}, { - 3.6433152*^9, 5.8}, {3.6511776*^9, 5.84}, {3.65904*^9, - 5.88}, {3.6669024*^9, 5.91}, {3.6747648*^9, 5.94}, { - 3.683232*^9, 5.97}, {3.6910944*^9, 6.01}, {3.698352*^9, - 6.04}, {3.7068192*^9, 6.06}, {3.7146816*^9, 6.1}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"19 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 78-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.09}, {3.4044192*^9, 4.88}, { - 3.4068384*^9, 4.73}, {3.4147008*^9, 4.48}, {3.4225632*^9, - 4.43}, {3.4304256*^9, 4.43}, {3.438288*^9, 4.47}, { - 3.4461504*^9, 4.56}, {3.4540128*^9, 4.65}, {3.4618752*^9, - 4.74}, {3.4697376*^9, 4.83}, {3.4776*^9, 4.9}, { - 3.4854624*^9, 4.97}, {3.4933248*^9, 5.04}, {3.5011872*^9, - 5.12}, {3.5090496*^9, 5.17}, {3.516912*^9, 5.23}, { - 3.5253792*^9, 5.29}, {3.5332416*^9, 5.35}, {3.541104*^9, - 5.4}, {3.5489664*^9, 5.46}, {3.5568288*^9, 5.51}, { - 3.5646912*^9, 5.57}, {3.5725536*^9, 5.61}, {3.580416*^9, - 5.65}, {3.5882784*^9, 5.7}, {3.5961408*^9, 5.75}, { - 3.6040032*^9, 5.79}, {3.6118656*^9, 5.82}, {3.619728*^9, - 5.86}, {3.6275904*^9, 5.91}, {3.6354528*^9, 5.93}, { - 3.6433152*^9, 5.96}, {3.6511776*^9, 5.99}, {3.65904*^9, - 6.03}, {3.6669024*^9, 6.06}, {3.6747648*^9, 6.09}, { - 3.683232*^9, 6.12}, {3.6910944*^9, 6.16}, {3.698352*^9, - 6.18}, {3.7068192*^9, 6.2}, {3.7146816*^9, 6.23}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"20 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 79-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.1}, {3.4044192*^9, 4.89}, { - 3.4068384*^9, 4.74}, {3.4147008*^9, 4.47}, {3.4225632*^9, - 4.39}, {3.4304256*^9, 4.37}, {3.438288*^9, 4.41}, { - 3.4461504*^9, 4.51}, {3.4540128*^9, 4.62}, {3.4618752*^9, - 4.72}, {3.4697376*^9, 4.81}, {3.4776*^9, 4.87}, { - 3.4854624*^9, 4.95}, {3.4933248*^9, 5.02}, {3.5011872*^9, - 5.09}, {3.5090496*^9, 5.14}, {3.516912*^9, 5.2}, { - 3.5253792*^9, 5.26}, {3.5332416*^9, 5.32}, {3.541104*^9, - 5.36}, {3.5489664*^9, 5.42}, {3.5568288*^9, 5.47}, { - 3.5646912*^9, 5.53}, {3.5725536*^9, 5.57}, {3.580416*^9, - 5.61}, {3.5882784*^9, 5.66}, {3.5961408*^9, 5.71}, { - 3.6040032*^9, 5.75}, {3.6118656*^9, 5.78}, {3.619728*^9, - 5.82}, {3.6275904*^9, 5.87}, {3.6354528*^9, 5.89}, { - 3.6433152*^9, 5.92}, {3.6511776*^9, 5.95}, {3.65904*^9, - 5.99}, {3.6669024*^9, 6.02}, {3.6747648*^9, 6.05}, { - 3.683232*^9, 6.08}, {3.6910944*^9, 6.12}, {3.698352*^9, - 6.14}, {3.7068192*^9, 6.16}, {3.7146816*^9, 6.19}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"21 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 80-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.16}, {3.4044192*^9, 4.98}, { - 3.4068384*^9, 4.85}, {3.4147008*^9, 4.51}, {3.4225632*^9, - 4.4}, {3.4304256*^9, 4.37}, {3.438288*^9, 4.4}, { - 3.4461504*^9, 4.49}, {3.4540128*^9, 4.6}, {3.4618752*^9, - 4.7}, {3.4697376*^9, 4.79}, {3.4776*^9, 4.86}, { - 3.4854624*^9, 4.94}, {3.4933248*^9, 5.01}, {3.5011872*^9, - 5.09}, {3.5090496*^9, 5.14}, {3.516912*^9, 5.2}, { - 3.5253792*^9, 5.26}, {3.5332416*^9, 5.32}, {3.541104*^9, - 5.37}, {3.5489664*^9, 5.42}, {3.5568288*^9, 5.47}, { - 3.5646912*^9, 5.52}, {3.5725536*^9, 5.56}, {3.580416*^9, - 5.6}, {3.5882784*^9, 5.64}, {3.5961408*^9, 5.7}, { - 3.6040032*^9, 5.73}, {3.6118656*^9, 5.76}, {3.619728*^9, - 5.8}, {3.6275904*^9, 5.84}, {3.6354528*^9, 5.87}, { - 3.6433152*^9, 5.89}, {3.6511776*^9, 5.92}, {3.65904*^9, - 5.96}, {3.6669024*^9, 5.99}, {3.6747648*^9, 6.01}, { - 3.683232*^9, 6.04}, {3.6910944*^9, 6.08}, {3.698352*^9, - 6.1}, {3.7068192*^9, 6.12}, {3.7146816*^9, 6.16}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"24 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 81-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.2}, {3.4044192*^9, 5.02}, { - 3.4068384*^9, 4.87}, {3.4147008*^9, 4.5}, {3.4225632*^9, - 4.39}, {3.4304256*^9, 4.35}, {3.438288*^9, 4.37}, { - 3.4461504*^9, 4.45}, {3.4540128*^9, 4.57}, {3.4618752*^9, - 4.67}, {3.4697376*^9, 4.77}, {3.4776*^9, 4.85}, { - 3.4854624*^9, 4.93}, {3.4933248*^9, 5.}, {3.5011872*^9, - 5.08}, {3.5090496*^9, 5.13}, {3.516912*^9, 5.2}, { - 3.5253792*^9, 5.26}, {3.5332416*^9, 5.32}, {3.541104*^9, - 5.36}, {3.5489664*^9, 5.42}, {3.5568288*^9, 5.47}, { - 3.5646912*^9, 5.52}, {3.5725536*^9, 5.56}, {3.580416*^9, - 5.6}, {3.5882784*^9, 5.64}, {3.5961408*^9, 5.7}, { - 3.6040032*^9, 5.73}, {3.6118656*^9, 5.77}, {3.619728*^9, - 5.81}, {3.6275904*^9, 5.85}, {3.6354528*^9, 5.87}, { - 3.6433152*^9, 5.9}, {3.6511776*^9, 5.93}, {3.65904*^9, - 5.97}, {3.6669024*^9, 6.}, {3.6747648*^9, 6.03}, { - 3.683232*^9, 6.06}, {3.6910944*^9, 6.1}, {3.698352*^9, - 6.12}, {3.7068192*^9, 6.14}, {3.7146816*^9, 6.17}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"25 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 82-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.18}, {3.4044192*^9, 4.98}, { - 3.4068384*^9, 4.83}, {3.4147008*^9, 4.48}, {3.4225632*^9, - 4.36}, {3.4304256*^9, 4.31}, {3.438288*^9, 4.34}, { - 3.4461504*^9, 4.42}, {3.4540128*^9, 4.53}, {3.4618752*^9, - 4.64}, {3.4697376*^9, 4.74}, {3.4776*^9, 4.82}, { - 3.4854624*^9, 4.91}, {3.4933248*^9, 4.98}, {3.5011872*^9, - 5.06}, {3.5090496*^9, 5.12}, {3.516912*^9, 5.19}, { - 3.5253792*^9, 5.25}, {3.5332416*^9, 5.32}, {3.541104*^9, - 5.37}, {3.5489664*^9, 5.42}, {3.5568288*^9, 5.48}, { - 3.5646912*^9, 5.54}, {3.5725536*^9, 5.57}, {3.580416*^9, - 5.62}, {3.5882784*^9, 5.66}, {3.5961408*^9, 5.72}, { - 3.6040032*^9, 5.75}, {3.6118656*^9, 5.79}, {3.619728*^9, - 5.83}, {3.6275904*^9, 5.87}, {3.6354528*^9, 5.9}, { - 3.6433152*^9, 5.93}, {3.6511776*^9, 5.96}, {3.65904*^9, - 6.}, {3.6669024*^9, 6.02}, {3.6747648*^9, 6.05}, { - 3.683232*^9, 6.08}, {3.6910944*^9, 6.12}, {3.698352*^9, - 6.15}, {3.7068192*^9, 6.17}, {3.7146816*^9, 6.2}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"26 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 83-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.16}, {3.4044192*^9, 4.95}, { - 3.4068384*^9, 4.8}, {3.4147008*^9, 4.45}, {3.4225632*^9, - 4.31}, {3.4304256*^9, 4.25}, {3.438288*^9, 4.27}, { - 3.4461504*^9, 4.34}, {3.4540128*^9, 4.46}, {3.4618752*^9, - 4.57}, {3.4697376*^9, 4.67}, {3.4776*^9, 4.76}, { - 3.4854624*^9, 4.84}, {3.4933248*^9, 4.92}, {3.5011872*^9, - 5.}, {3.5090496*^9, 5.06}, {3.516912*^9, 5.12}, { - 3.5253792*^9, 5.19}, {3.5332416*^9, 5.25}, {3.541104*^9, - 5.3}, {3.5489664*^9, 5.36}, {3.5568288*^9, 5.41}, { - 3.5646912*^9, 5.47}, {3.5725536*^9, 5.51}, {3.580416*^9, - 5.55}, {3.5882784*^9, 5.6}, {3.5961408*^9, 5.65}, { - 3.6040032*^9, 5.69}, {3.6118656*^9, 5.72}, {3.619728*^9, - 5.76}, {3.6275904*^9, 5.8}, {3.6354528*^9, 5.83}, { - 3.6433152*^9, 5.86}, {3.6511776*^9, 5.89}, {3.65904*^9, - 5.93}, {3.6669024*^9, 5.95}, {3.6747648*^9, 5.98}, { - 3.683232*^9, 6.01}, {3.6910944*^9, 6.05}, {3.698352*^9, - 6.07}, {3.7068192*^9, 6.09}, {3.7146816*^9, 6.12}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"27 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 84-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.17}, {3.4044192*^9, 4.97}, { - 3.4068384*^9, 4.84}, {3.4147008*^9, 4.52}, {3.4225632*^9, - 4.37}, {3.4304256*^9, 4.31}, {3.438288*^9, 4.31}, { - 3.4461504*^9, 4.38}, {3.4540128*^9, 4.5}, {3.4618752*^9, - 4.6}, {3.4697376*^9, 4.7}, {3.4776*^9, 4.77}, { - 3.4854624*^9, 4.84}, {3.4933248*^9, 4.91}, {3.5011872*^9, - 4.99}, {3.5090496*^9, 5.05}, {3.516912*^9, 5.12}, { - 3.5253792*^9, 5.18}, {3.5332416*^9, 5.24}, {3.541104*^9, - 5.29}, {3.5489664*^9, 5.34}, {3.5568288*^9, 5.4}, { - 3.5646912*^9, 5.46}, {3.5725536*^9, 5.49}, {3.580416*^9, - 5.54}, {3.5882784*^9, 5.58}, {3.5961408*^9, 5.64}, { - 3.6040032*^9, 5.67}, {3.6118656*^9, 5.71}, {3.619728*^9, - 5.74}, {3.6275904*^9, 5.79}, {3.6354528*^9, 5.81}, { - 3.6433152*^9, 5.84}, {3.6511776*^9, 5.87}, {3.65904*^9, - 5.91}, {3.6669024*^9, 5.94}, {3.6747648*^9, 5.97}, { - 3.683232*^9, 6.}, {3.6910944*^9, 6.04}, {3.698352*^9, - 6.06}, {3.7068192*^9, 6.08}, {3.7146816*^9, 6.11}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"28 Sep 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 85-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.2}, {3.4044192*^9, 5.04}, { - 3.4068384*^9, 4.89}, {3.4147008*^9, 4.58}, {3.4225632*^9, - 4.42}, {3.4304256*^9, 4.35}, {3.438288*^9, 4.36}, { - 3.4461504*^9, 4.43}, {3.4540128*^9, 4.54}, {3.4618752*^9, - 4.64}, {3.4697376*^9, 4.73}, {3.4776*^9, 4.8}, { - 3.4854624*^9, 4.86}, {3.4933248*^9, 4.93}, {3.5011872*^9, - 5.}, {3.5090496*^9, 5.06}, {3.516912*^9, 5.12}, { - 3.5253792*^9, 5.17}, {3.5332416*^9, 5.23}, {3.541104*^9, - 5.27}, {3.5489664*^9, 5.33}, {3.5568288*^9, 5.38}, { - 3.5646912*^9, 5.43}, {3.5725536*^9, 5.47}, {3.580416*^9, - 5.51}, {3.5882784*^9, 5.55}, {3.5961408*^9, 5.6}, { - 3.6040032*^9, 5.63}, {3.6118656*^9, 5.67}, {3.619728*^9, - 5.7}, {3.6275904*^9, 5.74}, {3.6354528*^9, 5.76}, { - 3.6433152*^9, 5.79}, {3.6511776*^9, 5.82}, {3.65904*^9, - 5.85}, {3.6669024*^9, 5.87}, {3.6747648*^9, 5.9}, { - 3.683232*^9, 5.93}, {3.6910944*^9, 5.96}, {3.698352*^9, - 5.98}, {3.7068192*^9, 6.}, {3.7146816*^9, 6.03}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"01 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 86-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.22}, {3.4044192*^9, 5.05}, { - 3.4068384*^9, 4.92}, {3.4147008*^9, 4.58}, {3.4225632*^9, - 4.4}, {3.4304256*^9, 4.31}, {3.438288*^9, 4.31}, { - 3.4461504*^9, 4.38}, {3.4540128*^9, 4.48}, {3.4618752*^9, - 4.58}, {3.4697376*^9, 4.67}, {3.4776*^9, 4.73}, { - 3.4854624*^9, 4.8}, {3.4933248*^9, 4.87}, {3.5011872*^9, - 4.95}, {3.5090496*^9, 5.}, {3.516912*^9, 5.06}, { - 3.5253792*^9, 5.12}, {3.5332416*^9, 5.18}, {3.541104*^9, - 5.23}, {3.5489664*^9, 5.28}, {3.5568288*^9, 5.33}, { - 3.5646912*^9, 5.39}, {3.5725536*^9, 5.42}, {3.580416*^9, - 5.46}, {3.5882784*^9, 5.51}, {3.5961408*^9, 5.55}, { - 3.6040032*^9, 5.58}, {3.6118656*^9, 5.62}, {3.619728*^9, - 5.65}, {3.6275904*^9, 5.69}, {3.6354528*^9, 5.71}, { - 3.6433152*^9, 5.74}, {3.6511776*^9, 5.77}, {3.65904*^9, - 5.8}, {3.6669024*^9, 5.82}, {3.6747648*^9, 5.85}, { - 3.683232*^9, 5.88}, {3.6910944*^9, 5.91}, {3.698352*^9, - 5.93}, {3.7068192*^9, 5.95}, {3.7146816*^9, 5.98}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"02 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 87-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.22}, {3.4044192*^9, 5.08}, { - 3.4068384*^9, 4.95}, {3.4147008*^9, 4.62}, {3.4225632*^9, - 4.44}, {3.4304256*^9, 4.36}, {3.438288*^9, 4.36}, { - 3.4461504*^9, 4.42}, {3.4540128*^9, 4.52}, {3.4618752*^9, - 4.61}, {3.4697376*^9, 4.69}, {3.4776*^9, 4.76}, { - 3.4854624*^9, 4.83}, {3.4933248*^9, 4.89}, {3.5011872*^9, - 4.96}, {3.5090496*^9, 5.01}, {3.516912*^9, 5.07}, { - 3.5253792*^9, 5.13}, {3.5332416*^9, 5.19}, {3.541104*^9, - 5.23}, {3.5489664*^9, 5.28}, {3.5568288*^9, 5.32}, { - 3.5646912*^9, 5.37}, {3.5725536*^9, 5.41}, {3.580416*^9, - 5.45}, {3.5882784*^9, 5.49}, {3.5961408*^9, 5.53}, { - 3.6040032*^9, 5.56}, {3.6118656*^9, 5.59}, {3.619728*^9, - 5.62}, {3.6275904*^9, 5.66}, {3.6354528*^9, 5.68}, { - 3.6433152*^9, 5.71}, {3.6511776*^9, 5.74}, {3.65904*^9, - 5.77}, {3.6669024*^9, 5.79}, {3.6747648*^9, 5.82}, { - 3.683232*^9, 5.85}, {3.6910944*^9, 5.88}, {3.698352*^9, - 5.9}, {3.7068192*^9, 5.92}, {3.7146816*^9, 5.95}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"03 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 88-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.22}, {3.4044192*^9, 5.07}, { - 3.4068384*^9, 4.95}, {3.4147008*^9, 4.62}, {3.4225632*^9, - 4.44}, {3.4304256*^9, 4.36}, {3.438288*^9, 4.35}, { - 3.4461504*^9, 4.4}, {3.4540128*^9, 4.5}, {3.4618752*^9, - 4.6}, {3.4697376*^9, 4.69}, {3.4776*^9, 4.76}, { - 3.4854624*^9, 4.83}, {3.4933248*^9, 4.89}, {3.5011872*^9, - 4.96}, {3.5090496*^9, 5.01}, {3.516912*^9, 5.07}, { - 3.5253792*^9, 5.12}, {3.5332416*^9, 5.18}, {3.541104*^9, - 5.22}, {3.5489664*^9, 5.27}, {3.5568288*^9, 5.31}, { - 3.5646912*^9, 5.36}, {3.5725536*^9, 5.39}, {3.580416*^9, - 5.42}, {3.5882784*^9, 5.46}, {3.5961408*^9, 5.5}, { - 3.6040032*^9, 5.53}, {3.6118656*^9, 5.56}, {3.619728*^9, - 5.59}, {3.6275904*^9, 5.63}, {3.6354528*^9, 5.65}, { - 3.6433152*^9, 5.68}, {3.6511776*^9, 5.71}, {3.65904*^9, - 5.74}, {3.6669024*^9, 5.76}, {3.6747648*^9, 5.79}, { - 3.683232*^9, 5.82}, {3.6910944*^9, 5.85}, {3.698352*^9, - 5.87}, {3.7068192*^9, 5.89}, {3.7146816*^9, 5.92}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"04 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 89-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.24}, {3.4044192*^9, 5.13}, { - 3.4068384*^9, 5.02}, {3.4147008*^9, 4.73}, {3.4225632*^9, - 4.57}, {3.4304256*^9, 4.48}, {3.438288*^9, 4.47}, { - 3.4461504*^9, 4.52}, {3.4540128*^9, 4.62}, {3.4618752*^9, - 4.72}, {3.4697376*^9, 4.82}, {3.4776*^9, 4.9}, { - 3.4854624*^9, 4.97}, {3.4933248*^9, 5.03}, {3.5011872*^9, - 5.11}, {3.5090496*^9, 5.16}, {3.516912*^9, 5.21}, { - 3.5253792*^9, 5.27}, {3.5332416*^9, 5.33}, {3.541104*^9, - 5.37}, {3.5489664*^9, 5.42}, {3.5568288*^9, 5.47}, { - 3.5646912*^9, 5.51}, {3.5725536*^9, 5.55}, {3.580416*^9, - 5.58}, {3.5882784*^9, 5.62}, {3.5961408*^9, 5.66}, { - 3.6040032*^9, 5.69}, {3.6118656*^9, 5.72}, {3.619728*^9, - 5.75}, {3.6275904*^9, 5.79}, {3.6354528*^9, 5.81}, { - 3.6433152*^9, 5.84}, {3.6511776*^9, 5.87}, {3.65904*^9, - 5.9}, {3.6669024*^9, 5.92}, {3.6747648*^9, 5.95}, { - 3.683232*^9, 5.98}, {3.6910944*^9, 6.01}, {3.698352*^9, - 6.03}, {3.7068192*^9, 6.05}, {3.7146816*^9, 6.08}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"05 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 90-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.24}, {3.4044192*^9, 5.13}, { - 3.4068384*^9, 5.02}, {3.4147008*^9, 4.73}, {3.4225632*^9, - 4.57}, {3.4304256*^9, 4.48}, {3.438288*^9, 4.47}, { - 3.4461504*^9, 4.52}, {3.4540128*^9, 4.62}, {3.4618752*^9, - 4.72}, {3.4697376*^9, 4.82}, {3.4776*^9, 4.9}, { - 3.4854624*^9, 4.97}, {3.4933248*^9, 5.03}, {3.5011872*^9, - 5.11}, {3.5090496*^9, 5.16}, {3.516912*^9, 5.21}, { - 3.5253792*^9, 5.27}, {3.5332416*^9, 5.33}, {3.541104*^9, - 5.37}, {3.5489664*^9, 5.42}, {3.5568288*^9, 5.47}, { - 3.5646912*^9, 5.51}, {3.5725536*^9, 5.55}, {3.580416*^9, - 5.58}, {3.5882784*^9, 5.62}, {3.5961408*^9, 5.66}, { - 3.6040032*^9, 5.69}, {3.6118656*^9, 5.72}, {3.619728*^9, - 5.75}, {3.6275904*^9, 5.79}, {3.6354528*^9, 5.81}, { - 3.6433152*^9, 5.84}, {3.6511776*^9, 5.87}, {3.65904*^9, - 5.9}, {3.6669024*^9, 5.92}, {3.6747648*^9, 5.95}, { - 3.683232*^9, 5.98}, {3.6910944*^9, 6.01}, {3.698352*^9, - 6.03}, {3.7068192*^9, 6.05}, {3.7146816*^9, 6.08}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"08 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 91-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.24}, {3.4044192*^9, 5.15}, { - 3.4068384*^9, 5.05}, {3.4147008*^9, 4.79}, {3.4225632*^9, - 4.62}, {3.4304256*^9, 4.54}, {3.438288*^9, 4.53}, { - 3.4461504*^9, 4.57}, {3.4540128*^9, 4.66}, {3.4618752*^9, - 4.76}, {3.4697376*^9, 4.85}, {3.4776*^9, 4.92}, { - 3.4854624*^9, 4.99}, {3.4933248*^9, 5.05}, {3.5011872*^9, - 5.12}, {3.5090496*^9, 5.17}, {3.516912*^9, 5.22}, { - 3.5253792*^9, 5.27}, {3.5332416*^9, 5.32}, {3.541104*^9, - 5.37}, {3.5489664*^9, 5.41}, {3.5568288*^9, 5.46}, { - 3.5646912*^9, 5.5}, {3.5725536*^9, 5.53}, {3.580416*^9, - 5.57}, {3.5882784*^9, 5.6}, {3.5961408*^9, 5.64}, { - 3.6040032*^9, 5.67}, {3.6118656*^9, 5.7}, {3.619728*^9, - 5.72}, {3.6275904*^9, 5.76}, {3.6354528*^9, 5.78}, { - 3.6433152*^9, 5.8}, {3.6511776*^9, 5.83}, {3.65904*^9, - 5.86}, {3.6669024*^9, 5.88}, {3.6747648*^9, 5.9}, { - 3.683232*^9, 5.93}, {3.6910944*^9, 5.96}, {3.698352*^9, - 5.97}, {3.7068192*^9, 5.99}, {3.7146816*^9, 6.01}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"09 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 92-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.23}, {3.4044192*^9, 5.13}, { - 3.4068384*^9, 5.05}, {3.4147008*^9, 4.79}, {3.4225632*^9, - 4.62}, {3.4304256*^9, 4.54}, {3.438288*^9, 4.53}, { - 3.4461504*^9, 4.57}, {3.4540128*^9, 4.66}, {3.4618752*^9, - 4.75}, {3.4697376*^9, 4.84}, {3.4776*^9, 4.91}, { - 3.4854624*^9, 4.98}, {3.4933248*^9, 5.04}, {3.5011872*^9, - 5.1}, {3.5090496*^9, 5.15}, {3.516912*^9, 5.2}, { - 3.5253792*^9, 5.25}, {3.5332416*^9, 5.31}, {3.541104*^9, - 5.35}, {3.5489664*^9, 5.4}, {3.5568288*^9, 5.44}, { - 3.5646912*^9, 5.48}, {3.5725536*^9, 5.51}, {3.580416*^9, - 5.55}, {3.5882784*^9, 5.58}, {3.5961408*^9, 5.62}, { - 3.6040032*^9, 5.65}, {3.6118656*^9, 5.68}, {3.619728*^9, - 5.7}, {3.6275904*^9, 5.73}, {3.6354528*^9, 5.75}, { - 3.6433152*^9, 5.78}, {3.6511776*^9, 5.8}, {3.65904*^9, - 5.83}, {3.6669024*^9, 5.85}, {3.6747648*^9, 5.88}, { - 3.683232*^9, 5.9}, {3.6910944*^9, 5.93}, {3.698352*^9, - 5.95}, {3.7068192*^9, 5.96}, {3.7146816*^9, 5.98}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"10 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 93-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.2}, {3.4044192*^9, 5.06}, { - 3.4068384*^9, 4.96}, {3.4147008*^9, 4.7}, {3.4225632*^9, - 4.55}, {3.4304256*^9, 4.49}, {3.438288*^9, 4.5}, { - 3.4461504*^9, 4.56}, {3.4540128*^9, 4.66}, {3.4618752*^9, - 4.75}, {3.4697376*^9, 4.84}, {3.4776*^9, 4.91}, { - 3.4854624*^9, 4.97}, {3.4933248*^9, 5.03}, {3.5011872*^9, - 5.1}, {3.5090496*^9, 5.14}, {3.516912*^9, 5.19}, { - 3.5253792*^9, 5.24}, {3.5332416*^9, 5.3}, {3.541104*^9, - 5.34}, {3.5489664*^9, 5.38}, {3.5568288*^9, 5.42}, { - 3.5646912*^9, 5.46}, {3.5725536*^9, 5.49}, {3.580416*^9, - 5.53}, {3.5882784*^9, 5.56}, {3.5961408*^9, 5.6}, { - 3.6040032*^9, 5.63}, {3.6118656*^9, 5.66}, {3.619728*^9, - 5.68}, {3.6275904*^9, 5.71}, {3.6354528*^9, 5.73}, { - 3.6433152*^9, 5.76}, {3.6511776*^9, 5.78}, {3.65904*^9, - 5.81}, {3.6669024*^9, 5.83}, {3.6747648*^9, 5.86}, { - 3.683232*^9, 5.88}, {3.6910944*^9, 5.91}, {3.698352*^9, - 5.93}, {3.7068192*^9, 5.94}, {3.7146816*^9, 5.96}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"11 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 94-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4013952*^9, 5.21}, {3.4044192*^9, 5.06}, { - 3.4068384*^9, 4.96}, {3.4092576*^9, 4.84}, {3.4147008*^9, - 4.76}, {3.4225632*^9, 4.63}, {3.4304256*^9, 4.57}, { - 3.438288*^9, 4.58}, {3.4461504*^9, 4.64}, {3.4540128*^9, - 4.73}, {3.4618752*^9, 4.81}, {3.4697376*^9, 4.89}, { - 3.4776*^9, 4.95}, {3.4854624*^9, 5.01}, {3.4933248*^9, - 5.07}, {3.5011872*^9, 5.14}, {3.5090496*^9, 5.18}, { - 3.516912*^9, 5.23}, {3.5253792*^9, 5.28}, {3.5332416*^9, - 5.33}, {3.541104*^9, 5.37}, {3.5489664*^9, 5.41}, { - 3.5568288*^9, 5.45}, {3.5646912*^9, 5.49}, {3.5725536*^9, - 5.52}, {3.580416*^9, 5.55}, {3.5882784*^9, 5.58}, { - 3.5961408*^9, 5.62}, {3.6040032*^9, 5.65}, {3.6118656*^9, - 5.68}, {3.619728*^9, 5.7}, {3.6275904*^9, 5.73}, { - 3.6354528*^9, 5.75}, {3.6433152*^9, 5.78}, {3.6511776*^9, - 5.8}, {3.65904*^9, 5.83}, {3.6669024*^9, 5.85}, { - 3.6747648*^9, 5.87}, {3.683232*^9, 5.9}, {3.6910944*^9, - 5.93}, {3.698352*^9, 5.94}, {3.7068192*^9, 5.96}, { - 3.7146816*^9, 5.97}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"12 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 95-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 5.05}, {3.4068384*^9, 4.95}, { - 3.4092576*^9, 4.84}, {3.4147008*^9, 4.75}, {3.4225632*^9, - 4.61}, {3.4304256*^9, 4.54}, {3.438288*^9, 4.55}, { - 3.4461504*^9, 4.61}, {3.4540128*^9, 4.7}, {3.4618752*^9, - 4.79}, {3.4697376*^9, 4.87}, {3.4776*^9, 4.93}, { - 3.4854624*^9, 5.}, {3.4933248*^9, 5.06}, {3.5011872*^9, - 5.12}, {3.5090496*^9, 5.17}, {3.516912*^9, 5.22}, { - 3.5253792*^9, 5.27}, {3.5332416*^9, 5.32}, {3.541104*^9, - 5.36}, {3.5489664*^9, 5.4}, {3.5568288*^9, 5.44}, { - 3.5646912*^9, 5.49}, {3.5725536*^9, 5.52}, {3.580416*^9, - 5.55}, {3.5882784*^9, 5.59}, {3.5961408*^9, 5.63}, { - 3.6040032*^9, 5.65}, {3.6118656*^9, 5.68}, {3.619728*^9, - 5.71}, {3.6275904*^9, 5.74}, {3.6354528*^9, 5.76}, { - 3.6433152*^9, 5.79}, {3.6511776*^9, 5.81}, {3.65904*^9, - 5.84}, {3.6669024*^9, 5.86}, {3.6747648*^9, 5.88}, { - 3.683232*^9, 5.91}, {3.6910944*^9, 5.94}, {3.698352*^9, - 5.96}, {3.7068192*^9, 5.97}, {3.7146816*^9, 5.99}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"15 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 96-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 5.04}, {3.4068384*^9, 4.92}, { - 3.4092576*^9, 4.81}, {3.4147008*^9, 4.68}, {3.4225632*^9, - 4.54}, {3.4304256*^9, 4.47}, {3.438288*^9, 4.48}, { - 3.4461504*^9, 4.54}, {3.4540128*^9, 4.64}, {3.4618752*^9, - 4.73}, {3.4697376*^9, 4.82}, {3.4776*^9, 4.88}, { - 3.4854624*^9, 4.95}, {3.4933248*^9, 5.01}, {3.5011872*^9, - 5.08}, {3.5090496*^9, 5.12}, {3.516912*^9, 5.18}, { - 3.5253792*^9, 5.23}, {3.5332416*^9, 5.29}, {3.541104*^9, - 5.33}, {3.5489664*^9, 5.37}, {3.5568288*^9, 5.41}, { - 3.5646912*^9, 5.46}, {3.5725536*^9, 5.5}, {3.580416*^9, - 5.54}, {3.5882784*^9, 5.57}, {3.5961408*^9, 5.61}, { - 3.6040032*^9, 5.64}, {3.6118656*^9, 5.67}, {3.619728*^9, - 5.7}, {3.6275904*^9, 5.74}, {3.6354528*^9, 5.77}, { - 3.6433152*^9, 5.79}, {3.6511776*^9, 5.82}, {3.65904*^9, - 5.85}, {3.6669024*^9, 5.87}, {3.6747648*^9, 5.9}, { - 3.683232*^9, 5.92}, {3.6910944*^9, 5.96}, {3.698352*^9, - 5.97}, {3.7068192*^9, 5.99}, {3.7146816*^9, 6.}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"16 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 97-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 5.01}, {3.4068384*^9, 4.87}, { - 3.4092576*^9, 4.73}, {3.4147008*^9, 4.57}, {3.4225632*^9, - 4.41}, {3.4304256*^9, 4.34}, {3.438288*^9, 4.35}, { - 3.4461504*^9, 4.41}, {3.4540128*^9, 4.51}, {3.4618752*^9, - 4.61}, {3.4697376*^9, 4.7}, {3.4776*^9, 4.77}, { - 3.4854624*^9, 4.84}, {3.4933248*^9, 4.91}, {3.5011872*^9, - 4.98}, {3.5090496*^9, 5.02}, {3.516912*^9, 5.08}, { - 3.5253792*^9, 5.14}, {3.5332416*^9, 5.19}, {3.541104*^9, - 5.24}, {3.5489664*^9, 5.28}, {3.5568288*^9, 5.33}, { - 3.5646912*^9, 5.38}, {3.5725536*^9, 5.42}, {3.580416*^9, - 5.46}, {3.5882784*^9, 5.5}, {3.5961408*^9, 5.54}, { - 3.6040032*^9, 5.57}, {3.6118656*^9, 5.6}, {3.619728*^9, - 5.63}, {3.6275904*^9, 5.67}, {3.6354528*^9, 5.7}, { - 3.6433152*^9, 5.72}, {3.6511776*^9, 5.75}, {3.65904*^9, - 5.78}, {3.6669024*^9, 5.8}, {3.6747648*^9, 5.83}, { - 3.683232*^9, 5.85}, {3.6910944*^9, 5.89}, {3.698352*^9, - 5.9}, {3.7068192*^9, 5.92}, {3.7146816*^9, 5.93}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"17 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 98-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.96}, {3.4068384*^9, 4.81}, { - 3.4092576*^9, 4.68}, {3.4147008*^9, 4.52}, {3.4225632*^9, - 4.36}, {3.4304256*^9, 4.28}, {3.438288*^9, 4.29}, { - 3.4461504*^9, 4.36}, {3.4540128*^9, 4.46}, {3.4618752*^9, - 4.56}, {3.4697376*^9, 4.65}, {3.4776*^9, 4.72}, { - 3.4854624*^9, 4.8}, {3.4933248*^9, 4.86}, {3.5011872*^9, - 4.93}, {3.5090496*^9, 4.98}, {3.516912*^9, 5.04}, { - 3.5253792*^9, 5.1}, {3.5332416*^9, 5.16}, {3.541104*^9, - 5.2}, {3.5489664*^9, 5.25}, {3.5568288*^9, 5.29}, { - 3.5646912*^9, 5.35}, {3.5725536*^9, 5.38}, {3.580416*^9, - 5.43}, {3.5882784*^9, 5.47}, {3.5961408*^9, 5.52}, { - 3.6040032*^9, 5.54}, {3.6118656*^9, 5.58}, {3.619728*^9, - 5.61}, {3.6275904*^9, 5.65}, {3.6354528*^9, 5.68}, { - 3.6433152*^9, 5.71}, {3.6511776*^9, 5.73}, {3.65904*^9, - 5.77}, {3.6669024*^9, 5.79}, {3.6747648*^9, 5.82}, { - 3.683232*^9, 5.84}, {3.6910944*^9, 5.88}, {3.698352*^9, - 5.89}, {3.7068192*^9, 5.91}, {3.7146816*^9, 5.92}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"18 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 99-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.88}, {3.4068384*^9, 4.7}, { - 3.4092576*^9, 4.56}, {3.4147008*^9, 4.4}, {3.4225632*^9, - 4.24}, {3.4304256*^9, 4.16}, {3.438288*^9, 4.17}, { - 3.4461504*^9, 4.24}, {3.4540128*^9, 4.35}, {3.4618752*^9, - 4.45}, {3.4697376*^9, 4.54}, {3.4776*^9, 4.61}, { - 3.4854624*^9, 4.68}, {3.4933248*^9, 4.75}, {3.5011872*^9, - 4.82}, {3.5090496*^9, 4.87}, {3.516912*^9, 4.93}, { - 3.5253792*^9, 4.98}, {3.5332416*^9, 5.04}, {3.541104*^9, - 5.09}, {3.5489664*^9, 5.14}, {3.5568288*^9, 5.18}, { - 3.5646912*^9, 5.24}, {3.5725536*^9, 5.27}, {3.580416*^9, - 5.32}, {3.5882784*^9, 5.36}, {3.5961408*^9, 5.41}, { - 3.6040032*^9, 5.44}, {3.6118656*^9, 5.47}, {3.619728*^9, - 5.51}, {3.6275904*^9, 5.55}, {3.6354528*^9, 5.57}, { - 3.6433152*^9, 5.6}, {3.6511776*^9, 5.63}, {3.65904*^9, - 5.66}, {3.6669024*^9, 5.68}, {3.6747648*^9, 5.71}, { - 3.683232*^9, 5.74}, {3.6910944*^9, 5.77}, {3.698352*^9, - 5.79}, {3.7068192*^9, 5.8}, {3.7146816*^9, 5.82}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"19 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 100-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.88}, {3.4068384*^9, 4.71}, { - 3.4092576*^9, 4.57}, {3.4147008*^9, 4.41}, {3.4225632*^9, - 4.26}, {3.4304256*^9, 4.17}, {3.438288*^9, 4.17}, { - 3.4461504*^9, 4.24}, {3.4540128*^9, 4.34}, {3.4618752*^9, - 4.44}, {3.4697376*^9, 4.53}, {3.4776*^9, 4.61}, { - 3.4854624*^9, 4.68}, {3.4933248*^9, 4.75}, {3.5011872*^9, - 4.82}, {3.5090496*^9, 4.88}, {3.516912*^9, 4.94}, { - 3.5253792*^9, 4.99}, {3.5332416*^9, 5.05}, {3.541104*^9, - 5.1}, {3.5489664*^9, 5.15}, {3.5568288*^9, 5.19}, { - 3.5646912*^9, 5.24}, {3.5725536*^9, 5.28}, {3.580416*^9, - 5.32}, {3.5882784*^9, 5.36}, {3.5961408*^9, 5.41}, { - 3.6040032*^9, 5.44}, {3.6118656*^9, 5.47}, {3.619728*^9, - 5.51}, {3.6275904*^9, 5.55}, {3.6354528*^9, 5.57}, { - 3.6433152*^9, 5.6}, {3.6511776*^9, 5.63}, {3.65904*^9, - 5.66}, {3.6669024*^9, 5.68}, {3.6747648*^9, 5.71}, { - 3.683232*^9, 5.74}, {3.6910944*^9, 5.77}, {3.698352*^9, - 5.79}, {3.7068192*^9, 5.8}, {3.7146816*^9, 5.82}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"22 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 101-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.87}, {3.4068384*^9, 4.71}, { - 3.4092576*^9, 4.57}, {3.4147008*^9, 4.41}, {3.4225632*^9, - 4.26}, {3.4304256*^9, 4.16}, {3.438288*^9, 4.15}, { - 3.4461504*^9, 4.21}, {3.4540128*^9, 4.31}, {3.4618752*^9, - 4.41}, {3.4697376*^9, 4.51}, {3.4776*^9, 4.59}, { - 3.4854624*^9, 4.66}, {3.4933248*^9, 4.74}, {3.5011872*^9, - 4.81}, {3.5090496*^9, 4.87}, {3.516912*^9, 4.93}, { - 3.5253792*^9, 4.99}, {3.5332416*^9, 5.05}, {3.541104*^9, - 5.1}, {3.5489664*^9, 5.15}, {3.5568288*^9, 5.2}, { - 3.5646912*^9, 5.25}, {3.5725536*^9, 5.29}, {3.580416*^9, - 5.33}, {3.5882784*^9, 5.37}, {3.5961408*^9, 5.42}, { - 3.6040032*^9, 5.45}, {3.6118656*^9, 5.48}, {3.619728*^9, - 5.52}, {3.6275904*^9, 5.56}, {3.6354528*^9, 5.58}, { - 3.6433152*^9, 5.61}, {3.6511776*^9, 5.64}, {3.65904*^9, - 5.67}, {3.6669024*^9, 5.69}, {3.6747648*^9, 5.72}, { - 3.683232*^9, 5.75}, {3.6910944*^9, 5.78}, {3.698352*^9, - 5.8}, {3.7068192*^9, 5.81}, {3.7146816*^9, 5.83}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"23 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 102-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.8}, {3.4068384*^9, 4.63}, { - 3.4092576*^9, 4.48}, {3.4147008*^9, 4.31}, {3.4225632*^9, - 4.15}, {3.4304256*^9, 4.06}, {3.438288*^9, 4.05}, { - 3.4461504*^9, 4.11}, {3.4540128*^9, 4.21}, {3.4618752*^9, - 4.31}, {3.4697376*^9, 4.41}, {3.4776*^9, 4.49}, { - 3.4854624*^9, 4.57}, {3.4933248*^9, 4.65}, {3.5011872*^9, - 4.73}, {3.5090496*^9, 4.79}, {3.516912*^9, 4.86}, { - 3.5253792*^9, 4.92}, {3.5332416*^9, 4.98}, {3.541104*^9, - 5.03}, {3.5489664*^9, 5.09}, {3.5568288*^9, 5.14}, { - 3.5646912*^9, 5.19}, {3.5725536*^9, 5.23}, {3.580416*^9, - 5.27}, {3.5882784*^9, 5.31}, {3.5961408*^9, 5.36}, { - 3.6040032*^9, 5.39}, {3.6118656*^9, 5.43}, {3.619728*^9, - 5.46}, {3.6275904*^9, 5.51}, {3.6354528*^9, 5.53}, { - 3.6433152*^9, 5.56}, {3.6511776*^9, 5.59}, {3.65904*^9, - 5.62}, {3.6669024*^9, 5.64}, {3.6747648*^9, 5.67}, { - 3.683232*^9, 5.7}, {3.6910944*^9, 5.73}, {3.698352*^9, - 5.75}, {3.7068192*^9, 5.76}, {3.7146816*^9, 5.78}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"24 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 103-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.8}, {3.4068384*^9, 4.64}, { - 3.4092576*^9, 4.5}, {3.4147008*^9, 4.3}, {3.4225632*^9, - 4.15}, {3.4304256*^9, 4.07}, {3.438288*^9, 4.06}, { - 3.4461504*^9, 4.12}, {3.4540128*^9, 4.23}, {3.4618752*^9, - 4.33}, {3.4697376*^9, 4.44}, {3.4776*^9, 4.52}, { - 3.4854624*^9, 4.6}, {3.4933248*^9, 4.68}, {3.5011872*^9, - 4.76}, {3.5090496*^9, 4.83}, {3.516912*^9, 4.89}, { - 3.5253792*^9, 4.96}, {3.5332416*^9, 5.02}, {3.541104*^9, - 5.07}, {3.5489664*^9, 5.13}, {3.5568288*^9, 5.18}, { - 3.5646912*^9, 5.23}, {3.5725536*^9, 5.27}, {3.580416*^9, - 5.32}, {3.5882784*^9, 5.36}, {3.5961408*^9, 5.41}, { - 3.6040032*^9, 5.44}, {3.6118656*^9, 5.48}, {3.619728*^9, - 5.51}, {3.6275904*^9, 5.55}, {3.6354528*^9, 5.58}, { - 3.6433152*^9, 5.61}, {3.6511776*^9, 5.63}, {3.65904*^9, - 5.67}, {3.6669024*^9, 5.69}, {3.6747648*^9, 5.72}, { - 3.683232*^9, 5.74}, {3.6910944*^9, 5.78}, {3.698352*^9, - 5.79}, {3.7068192*^9, 5.81}, {3.7146816*^9, 5.82}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"25 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 104-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.77}, {3.4068384*^9, 4.64}, { - 3.4092576*^9, 4.5}, {3.4147008*^9, 4.32}, {3.4225632*^9, - 4.19}, {3.4304256*^9, 4.11}, {3.438288*^9, 4.1}, { - 3.4461504*^9, 4.16}, {3.4540128*^9, 4.27}, {3.4618752*^9, - 4.38}, {3.4697376*^9, 4.49}, {3.4776*^9, 4.58}, { - 3.4854624*^9, 4.67}, {3.4933248*^9, 4.75}, {3.5011872*^9, - 4.84}, {3.5090496*^9, 4.9}, {3.516912*^9, 4.97}, { - 3.5253792*^9, 5.03}, {3.5332416*^9, 5.1}, {3.541104*^9, - 5.15}, {3.5489664*^9, 5.21}, {3.5568288*^9, 5.26}, { - 3.5646912*^9, 5.31}, {3.5725536*^9, 5.35}, {3.580416*^9, - 5.4}, {3.5882784*^9, 5.44}, {3.5961408*^9, 5.49}, { - 3.6040032*^9, 5.52}, {3.6118656*^9, 5.56}, {3.619728*^9, - 5.59}, {3.6275904*^9, 5.63}, {3.6354528*^9, 5.66}, { - 3.6433152*^9, 5.69}, {3.6511776*^9, 5.71}, {3.65904*^9, - 5.75}, {3.6669024*^9, 5.77}, {3.6747648*^9, 5.8}, { - 3.683232*^9, 5.82}, {3.6910944*^9, 5.86}, {3.698352*^9, - 5.87}, {3.7068192*^9, 5.89}, {3.7146816*^9, 5.9}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"26 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 105-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.78}, {3.4068384*^9, 4.68}, { - 3.4092576*^9, 4.53}, {3.4147008*^9, 4.36}, {3.4225632*^9, - 4.23}, {3.4304256*^9, 4.15}, {3.438288*^9, 4.15}, { - 3.4461504*^9, 4.2}, {3.4540128*^9, 4.31}, {3.4618752*^9, - 4.41}, {3.4697376*^9, 4.52}, {3.4776*^9, 4.6}, { - 3.4854624*^9, 4.68}, {3.4933248*^9, 4.76}, {3.5011872*^9, - 4.84}, {3.5090496*^9, 4.9}, {3.516912*^9, 4.97}, { - 3.5253792*^9, 5.03}, {3.5332416*^9, 5.09}, {3.541104*^9, - 5.14}, {3.5489664*^9, 5.19}, {3.5568288*^9, 5.24}, { - 3.5646912*^9, 5.29}, {3.5725536*^9, 5.33}, {3.580416*^9, - 5.37}, {3.5882784*^9, 5.41}, {3.5961408*^9, 5.46}, { - 3.6040032*^9, 5.49}, {3.6118656*^9, 5.52}, {3.619728*^9, - 5.56}, {3.6275904*^9, 5.6}, {3.6354528*^9, 5.62}, { - 3.6433152*^9, 5.65}, {3.6511776*^9, 5.67}, {3.65904*^9, - 5.71}, {3.6669024*^9, 5.73}, {3.6747648*^9, 5.75}, { - 3.683232*^9, 5.78}, {3.6910944*^9, 5.81}, {3.698352*^9, - 5.82}, {3.7068192*^9, 5.84}, {3.7146816*^9, 5.85}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"29 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 106-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.78}, {3.4068384*^9, 4.7}, { - 3.4092576*^9, 4.56}, {3.4147008*^9, 4.38}, {3.4225632*^9, - 4.25}, {3.4304256*^9, 4.17}, {3.438288*^9, 4.16}, { - 3.4461504*^9, 4.21}, {3.4540128*^9, 4.3}, {3.4618752*^9, - 4.41}, {3.4697376*^9, 4.51}, {3.4776*^9, 4.6}, { - 3.4854624*^9, 4.68}, {3.4933248*^9, 4.76}, {3.5011872*^9, - 4.84}, {3.5090496*^9, 4.89}, {3.516912*^9, 4.96}, { - 3.5253792*^9, 5.02}, {3.5332416*^9, 5.08}, {3.541104*^9, - 5.13}, {3.5489664*^9, 5.18}, {3.5568288*^9, 5.23}, { - 3.5646912*^9, 5.28}, {3.5725536*^9, 5.32}, {3.580416*^9, - 5.36}, {3.5882784*^9, 5.4}, {3.5961408*^9, 5.45}, { - 3.6040032*^9, 5.48}, {3.6118656*^9, 5.51}, {3.619728*^9, - 5.54}, {3.6275904*^9, 5.58}, {3.6354528*^9, 5.61}, { - 3.6433152*^9, 5.63}, {3.6511776*^9, 5.66}, {3.65904*^9, - 5.69}, {3.6669024*^9, 5.71}, {3.6747648*^9, 5.74}, { - 3.683232*^9, 5.76}, {3.6910944*^9, 5.79}, {3.698352*^9, - 5.8}, {3.7068192*^9, 5.82}, {3.7146816*^9, 5.83}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"30 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 107-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.83}, {3.4068384*^9, 4.75}, { - 3.4092576*^9, 4.63}, {3.4147008*^9, 4.49}, {3.4225632*^9, - 4.38}, {3.4304256*^9, 4.31}, {3.438288*^9, 4.3}, { - 3.4461504*^9, 4.34}, {3.4540128*^9, 4.44}, {3.4618752*^9, - 4.54}, {3.4697376*^9, 4.64}, {3.4776*^9, 4.72}, { - 3.4854624*^9, 4.79}, {3.4933248*^9, 4.86}, {3.5011872*^9, - 4.94}, {3.5090496*^9, 4.99}, {3.516912*^9, 5.05}, { - 3.5253792*^9, 5.11}, {3.5332416*^9, 5.17}, {3.541104*^9, - 5.21}, {3.5489664*^9, 5.26}, {3.5568288*^9, 5.31}, { - 3.5646912*^9, 5.36}, {3.5725536*^9, 5.39}, {3.580416*^9, - 5.43}, {3.5882784*^9, 5.46}, {3.5961408*^9, 5.51}, { - 3.6040032*^9, 5.54}, {3.6118656*^9, 5.57}, {3.619728*^9, - 5.6}, {3.6275904*^9, 5.64}, {3.6354528*^9, 5.66}, { - 3.6433152*^9, 5.68}, {3.6511776*^9, 5.71}, {3.65904*^9, - 5.74}, {3.6669024*^9, 5.76}, {3.6747648*^9, 5.78}, { - 3.683232*^9, 5.8}, {3.6910944*^9, 5.83}, {3.698352*^9, - 5.84}, {3.7068192*^9, 5.86}, {3.7146816*^9, 5.87}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"31 Oct 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 108-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.82}, {3.4068384*^9, 4.74}, { - 3.4092576*^9, 4.6}, {3.4147008*^9, 4.42}, {3.4225632*^9, - 4.26}, {3.4304256*^9, 4.17}, {3.438288*^9, 4.17}, { - 3.4461504*^9, 4.22}, {3.4540128*^9, 4.32}, {3.4618752*^9, - 4.42}, {3.4697376*^9, 4.52}, {3.4776*^9, 4.6}, { - 3.4854624*^9, 4.68}, {3.4933248*^9, 4.75}, {3.5011872*^9, - 4.82}, {3.5090496*^9, 4.88}, {3.516912*^9, 4.94}, { - 3.5253792*^9, 5.}, {3.5332416*^9, 5.06}, {3.541104*^9, - 5.1}, {3.5489664*^9, 5.15}, {3.5568288*^9, 5.19}, { - 3.5646912*^9, 5.24}, {3.5725536*^9, 5.27}, {3.580416*^9, - 5.31}, {3.5882784*^9, 5.35}, {3.5961408*^9, 5.4}, { - 3.6040032*^9, 5.42}, {3.6118656*^9, 5.46}, {3.619728*^9, - 5.49}, {3.6275904*^9, 5.52}, {3.6354528*^9, 5.54}, { - 3.6433152*^9, 5.57}, {3.6511776*^9, 5.59}, {3.65904*^9, - 5.62}, {3.6669024*^9, 5.64}, {3.6747648*^9, 5.66}, { - 3.683232*^9, 5.68}, {3.6910944*^9, 5.71}, {3.698352*^9, - 5.73}, {3.7068192*^9, 5.74}, {3.7146816*^9, 5.75}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"01 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 109-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.84}, {3.4068384*^9, 4.77}, { - 3.4092576*^9, 4.6}, {3.4147008*^9, 4.32}, {3.4225632*^9, - 4.13}, {3.4304256*^9, 4.04}, {3.438288*^9, 4.03}, { - 3.4461504*^9, 4.09}, {3.4540128*^9, 4.19}, {3.4618752*^9, - 4.3}, {3.4697376*^9, 4.41}, {3.4776*^9, 4.5}, { - 3.4854624*^9, 4.59}, {3.4933248*^9, 4.67}, {3.5011872*^9, - 4.75}, {3.5090496*^9, 4.81}, {3.516912*^9, 4.88}, { - 3.5253792*^9, 4.95}, {3.5332416*^9, 5.01}, {3.541104*^9, - 5.06}, {3.5489664*^9, 5.11}, {3.5568288*^9, 5.16}, { - 3.5646912*^9, 5.22}, {3.5725536*^9, 5.25}, {3.580416*^9, - 5.29}, {3.5882784*^9, 5.33}, {3.5961408*^9, 5.38}, { - 3.6040032*^9, 5.41}, {3.6118656*^9, 5.45}, {3.619728*^9, - 5.48}, {3.6275904*^9, 5.52}, {3.6354528*^9, 5.54}, { - 3.6433152*^9, 5.57}, {3.6511776*^9, 5.6}, {3.65904*^9, - 5.63}, {3.6669024*^9, 5.65}, {3.6747648*^9, 5.67}, { - 3.683232*^9, 5.69}, {3.6910944*^9, 5.72}, {3.698352*^9, - 5.74}, {3.7068192*^9, 5.75}, {3.7146816*^9, 5.76}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"02 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 110-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.91}, {3.4068384*^9, 4.85}, { - 3.4092576*^9, 4.65}, {3.4147008*^9, 4.39}, {3.4225632*^9, - 4.2}, {3.4304256*^9, 4.1}, {3.438288*^9, 4.09}, { - 3.4461504*^9, 4.14}, {3.4540128*^9, 4.25}, {3.4618752*^9, - 4.36}, {3.4697376*^9, 4.47}, {3.4776*^9, 4.56}, { - 3.4854624*^9, 4.64}, {3.4933248*^9, 4.72}, {3.5011872*^9, - 4.8}, {3.5090496*^9, 4.86}, {3.516912*^9, 4.93}, { - 3.5253792*^9, 5.}, {3.5332416*^9, 5.06}, {3.541104*^9, - 5.11}, {3.5489664*^9, 5.16}, {3.5568288*^9, 5.21}, { - 3.5646912*^9, 5.27}, {3.5725536*^9, 5.3}, {3.580416*^9, - 5.34}, {3.5882784*^9, 5.38}, {3.5961408*^9, 5.43}, { - 3.6040032*^9, 5.46}, {3.6118656*^9, 5.5}, {3.619728*^9, - 5.53}, {3.6275904*^9, 5.57}, {3.6354528*^9, 5.59}, { - 3.6433152*^9, 5.62}, {3.6511776*^9, 5.65}, {3.65904*^9, - 5.68}, {3.6669024*^9, 5.7}, {3.6747648*^9, 5.72}, { - 3.683232*^9, 5.74}, {3.6910944*^9, 5.77}, {3.698352*^9, - 5.79}, {3.7068192*^9, 5.8}, {3.7146816*^9, 5.81}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"05 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 111-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.91}, {3.4068384*^9, 4.86}, { - 3.4092576*^9, 4.66}, {3.4147008*^9, 4.41}, {3.4225632*^9, - 4.22}, {3.4304256*^9, 4.12}, {3.438288*^9, 4.1}, { - 3.4461504*^9, 4.16}, {3.4540128*^9, 4.27}, {3.4618752*^9, - 4.39}, {3.4697376*^9, 4.51}, {3.4776*^9, 4.61}, { - 3.4854624*^9, 4.7}, {3.4933248*^9, 4.78}, {3.5011872*^9, - 4.86}, {3.5090496*^9, 4.93}, {3.516912*^9, 5.}, { - 3.5253792*^9, 5.06}, {3.5332416*^9, 5.13}, {3.541104*^9, - 5.18}, {3.5489664*^9, 5.23}, {3.5568288*^9, 5.28}, { - 3.5646912*^9, 5.34}, {3.5725536*^9, 5.37}, {3.580416*^9, - 5.41}, {3.5882784*^9, 5.45}, {3.5961408*^9, 5.5}, { - 3.6040032*^9, 5.53}, {3.6118656*^9, 5.57}, {3.619728*^9, - 5.6}, {3.6275904*^9, 5.64}, {3.6354528*^9, 5.66}, { - 3.6433152*^9, 5.69}, {3.6511776*^9, 5.72}, {3.65904*^9, - 5.75}, {3.6669024*^9, 5.77}, {3.6747648*^9, 5.79}, { - 3.683232*^9, 5.81}, {3.6910944*^9, 5.84}, {3.698352*^9, - 5.86}, {3.7068192*^9, 5.87}, {3.7146816*^9, 5.88}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"06 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 112-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.87}, {3.4068384*^9, 4.82}, { - 3.4092576*^9, 4.62}, {3.4147008*^9, 4.38}, {3.4225632*^9, - 4.17}, {3.4304256*^9, 4.07}, {3.438288*^9, 4.05}, { - 3.4461504*^9, 4.11}, {3.4540128*^9, 4.23}, {3.4618752*^9, - 4.36}, {3.4697376*^9, 4.48}, {3.4776*^9, 4.58}, { - 3.4854624*^9, 4.68}, {3.4933248*^9, 4.76}, {3.5011872*^9, - 4.85}, {3.5090496*^9, 4.92}, {3.516912*^9, 4.99}, { - 3.5253792*^9, 5.06}, {3.5332416*^9, 5.13}, {3.541104*^9, - 5.18}, {3.5489664*^9, 5.23}, {3.5568288*^9, 5.29}, { - 3.5646912*^9, 5.34}, {3.5725536*^9, 5.38}, {3.580416*^9, - 5.42}, {3.5882784*^9, 5.46}, {3.5961408*^9, 5.51}, { - 3.6040032*^9, 5.54}, {3.6118656*^9, 5.58}, {3.619728*^9, - 5.61}, {3.6275904*^9, 5.65}, {3.6354528*^9, 5.67}, { - 3.6433152*^9, 5.7}, {3.6511776*^9, 5.73}, {3.65904*^9, - 5.76}, {3.6669024*^9, 5.78}, {3.6747648*^9, 5.81}, { - 3.683232*^9, 5.83}, {3.6910944*^9, 5.86}, {3.698352*^9, - 5.88}, {3.7068192*^9, 5.89}, {3.7146816*^9, 5.9}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"07 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 113-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.82}, {3.4068384*^9, 4.75}, { - 3.4092576*^9, 4.55}, {3.4147008*^9, 4.28}, {3.4225632*^9, - 4.03}, {3.4304256*^9, 3.92}, {3.438288*^9, 3.92}, { - 3.4461504*^9, 4.}, {3.4540128*^9, 4.13}, {3.4618752*^9, - 4.26}, {3.4697376*^9, 4.39}, {3.4776*^9, 4.5}, { - 3.4854624*^9, 4.6}, {3.4933248*^9, 4.69}, {3.5011872*^9, - 4.79}, {3.5090496*^9, 4.87}, {3.516912*^9, 4.95}, { - 3.5253792*^9, 5.03}, {3.5332416*^9, 5.1}, {3.541104*^9, - 5.16}, {3.5489664*^9, 5.22}, {3.5568288*^9, 5.28}, { - 3.5646912*^9, 5.34}, {3.5725536*^9, 5.38}, {3.580416*^9, - 5.42}, {3.5882784*^9, 5.47}, {3.5961408*^9, 5.53}, { - 3.6040032*^9, 5.56}, {3.6118656*^9, 5.6}, {3.619728*^9, - 5.64}, {3.6275904*^9, 5.68}, {3.6354528*^9, 5.7}, { - 3.6433152*^9, 5.73}, {3.6511776*^9, 5.76}, {3.65904*^9, - 5.79}, {3.6669024*^9, 5.82}, {3.6747648*^9, 5.84}, { - 3.683232*^9, 5.87}, {3.6910944*^9, 5.9}, {3.698352*^9, - 5.92}, {3.7068192*^9, 5.93}, {3.7146816*^9, 5.94}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"08 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 114-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.84}, {3.4068384*^9, 4.73}, { - 3.4092576*^9, 4.53}, {3.4122816*^9, 4.34}, {3.4147008*^9, - 4.23}, {3.4225632*^9, 4.}, {3.4304256*^9, 3.89}, { - 3.438288*^9, 3.9}, {3.4461504*^9, 3.98}, {3.4540128*^9, - 4.11}, {3.4618752*^9, 4.24}, {3.4697376*^9, 4.36}, { - 3.4776*^9, 4.46}, {3.4854624*^9, 4.55}, {3.4933248*^9, - 4.64}, {3.5011872*^9, 4.74}, {3.5090496*^9, 4.81}, { - 3.516912*^9, 4.89}, {3.5253792*^9, 4.96}, {3.5332416*^9, - 5.03}, {3.541104*^9, 5.09}, {3.5489664*^9, 5.15}, { - 3.5568288*^9, 5.21}, {3.5646912*^9, 5.27}, {3.5725536*^9, - 5.31}, {3.580416*^9, 5.35}, {3.5882784*^9, 5.4}, { - 3.5961408*^9, 5.46}, {3.6040032*^9, 5.49}, {3.6118656*^9, - 5.53}, {3.619728*^9, 5.57}, {3.6275904*^9, 5.61}, { - 3.6354528*^9, 5.63}, {3.6433152*^9, 5.66}, {3.6511776*^9, - 5.69}, {3.65904*^9, 5.72}, {3.6669024*^9, 5.75}, { - 3.6747648*^9, 5.77}, {3.683232*^9, 5.8}, {3.6910944*^9, - 5.83}, {3.698352*^9, 5.85}, {3.7068192*^9, 5.86}, { - 3.7146816*^9, 5.87}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"09 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 115-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.84}, {3.4068384*^9, 4.73}, { - 3.4092576*^9, 4.53}, {3.4122816*^9, 4.34}, {3.4147008*^9, - 4.23}, {3.4225632*^9, 4.}, {3.4304256*^9, 3.89}, { - 3.438288*^9, 3.9}, {3.4461504*^9, 3.98}, {3.4540128*^9, - 4.11}, {3.4618752*^9, 4.24}, {3.4697376*^9, 4.36}, { - 3.4776*^9, 4.46}, {3.4854624*^9, 4.55}, {3.4933248*^9, - 4.64}, {3.5011872*^9, 4.74}, {3.5090496*^9, 4.81}, { - 3.516912*^9, 4.89}, {3.5253792*^9, 4.96}, {3.5332416*^9, - 5.03}, {3.541104*^9, 5.09}, {3.5489664*^9, 5.15}, { - 3.5568288*^9, 5.21}, {3.5646912*^9, 5.27}, {3.5725536*^9, - 5.31}, {3.580416*^9, 5.35}, {3.5882784*^9, 5.4}, { - 3.5961408*^9, 5.46}, {3.6040032*^9, 5.49}, {3.6118656*^9, - 5.53}, {3.619728*^9, 5.57}, {3.6275904*^9, 5.61}, { - 3.6354528*^9, 5.63}, {3.6433152*^9, 5.66}, {3.6511776*^9, - 5.69}, {3.65904*^9, 5.72}, {3.6669024*^9, 5.75}, { - 3.6747648*^9, 5.77}, {3.683232*^9, 5.8}, {3.6910944*^9, - 5.83}, {3.698352*^9, 5.85}, {3.7068192*^9, 5.86}, { - 3.7146816*^9, 5.87}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"12 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 116-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.85}, {3.4068384*^9, 4.77}, { - 3.4092576*^9, 4.58}, {3.4122816*^9, 4.41}, {3.4147008*^9, - 4.29}, {3.41712*^9, 4.2}, {3.4225632*^9, 4.07}, { - 3.4304256*^9, 3.96}, {3.438288*^9, 3.96}, {3.4461504*^9, - 4.03}, {3.4540128*^9, 4.16}, {3.4618752*^9, 4.28}, { - 3.4697376*^9, 4.4}, {3.4776*^9, 4.49}, {3.4854624*^9, - 4.59}, {3.4933248*^9, 4.68}, {3.5011872*^9, 4.77}, { - 3.5090496*^9, 4.84}, {3.516912*^9, 4.92}, {3.5253792*^9, - 4.99}, {3.5332416*^9, 5.06}, {3.541104*^9, 5.12}, { - 3.5489664*^9, 5.18}, {3.5568288*^9, 5.24}, {3.5646912*^9, - 5.3}, {3.5725536*^9, 5.34}, {3.580416*^9, 5.38}, { - 3.5882784*^9, 5.43}, {3.5961408*^9, 5.49}, {3.6040032*^9, - 5.52}, {3.6118656*^9, 5.56}, {3.619728*^9, 5.6}, { - 3.6275904*^9, 5.64}, {3.6354528*^9, 5.66}, {3.6433152*^9, - 5.69}, {3.6511776*^9, 5.72}, {3.65904*^9, 5.75}, { - 3.6669024*^9, 5.77}, {3.6747648*^9, 5.79}, {3.683232*^9, - 5.82}, {3.6910944*^9, 5.85}, {3.698352*^9, 5.87}, { - 3.7068192*^9, 5.88}, {3.7146816*^9, 5.89}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"13 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 117-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.89}, {3.4068384*^9, 4.81}, { - 3.4092576*^9, 4.61}, {3.4122816*^9, 4.44}, {3.4147008*^9, - 4.32}, {3.41712*^9, 4.21}, {3.4225632*^9, 4.08}, { - 3.4304256*^9, 3.97}, {3.438288*^9, 3.97}, {3.4461504*^9, - 4.05}, {3.4540128*^9, 4.18}, {3.4618752*^9, 4.3}, { - 3.4697376*^9, 4.42}, {3.4776*^9, 4.51}, {3.4854624*^9, - 4.6}, {3.4933248*^9, 4.69}, {3.5011872*^9, 4.78}, { - 3.5090496*^9, 4.85}, {3.516912*^9, 4.92}, {3.5253792*^9, - 4.99}, {3.5332416*^9, 5.06}, {3.541104*^9, 5.11}, { - 3.5489664*^9, 5.17}, {3.5568288*^9, 5.23}, {3.5646912*^9, - 5.28}, {3.5725536*^9, 5.32}, {3.580416*^9, 5.37}, { - 3.5882784*^9, 5.41}, {3.5961408*^9, 5.47}, {3.6040032*^9, - 5.5}, {3.6118656*^9, 5.54}, {3.619728*^9, 5.58}, { - 3.6275904*^9, 5.62}, {3.6354528*^9, 5.64}, {3.6433152*^9, - 5.67}, {3.6511776*^9, 5.7}, {3.65904*^9, 5.73}, { - 3.6669024*^9, 5.75}, {3.6747648*^9, 5.77}, {3.683232*^9, - 5.8}, {3.6910944*^9, 5.83}, {3.698352*^9, 5.85}, { - 3.7068192*^9, 5.86}, {3.7146816*^9, 5.87}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"14 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 118-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.95}, {3.4068384*^9, 4.88}, { - 3.4092576*^9, 4.62}, {3.4122816*^9, 4.41}, {3.4147008*^9, - 4.23}, {3.41712*^9, 4.05}, {3.4225632*^9, 3.92}, { - 3.4304256*^9, 3.79}, {3.438288*^9, 3.77}, {3.4461504*^9, - 3.85}, {3.4540128*^9, 3.98}, {3.4618752*^9, 4.11}, { - 3.4697376*^9, 4.24}, {3.4776*^9, 4.35}, {3.4854624*^9, - 4.45}, {3.4933248*^9, 4.55}, {3.5011872*^9, 4.65}, { - 3.5090496*^9, 4.73}, {3.516912*^9, 4.81}, {3.5253792*^9, - 4.88}, {3.5332416*^9, 4.95}, {3.541104*^9, 5.01}, { - 3.5489664*^9, 5.07}, {3.5568288*^9, 5.13}, {3.5646912*^9, - 5.19}, {3.5725536*^9, 5.23}, {3.580416*^9, 5.28}, { - 3.5882784*^9, 5.33}, {3.5961408*^9, 5.39}, {3.6040032*^9, - 5.42}, {3.6118656*^9, 5.46}, {3.619728*^9, 5.5}, { - 3.6275904*^9, 5.54}, {3.6354528*^9, 5.57}, {3.6433152*^9, - 5.6}, {3.6511776*^9, 5.62}, {3.65904*^9, 5.65}, { - 3.6669024*^9, 5.67}, {3.6747648*^9, 5.7}, {3.683232*^9, - 5.72}, {3.6910944*^9, 5.75}, {3.698352*^9, 5.77}, { - 3.7068192*^9, 5.79}, {3.7146816*^9, 5.8}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"15 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 119-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4044192*^9, 4.97}, {3.4068384*^9, 4.88}, { - 3.4092576*^9, 4.63}, {3.4122816*^9, 4.43}, {3.4147008*^9, - 4.26}, {3.41712*^9, 4.05}, {3.4225632*^9, 3.92}, { - 3.4304256*^9, 3.77}, {3.438288*^9, 3.75}, {3.4461504*^9, - 3.83}, {3.4540128*^9, 3.97}, {3.4618752*^9, 4.1}, { - 3.4697376*^9, 4.23}, {3.4776*^9, 4.34}, {3.4854624*^9, - 4.45}, {3.4933248*^9, 4.54}, {3.5011872*^9, 4.64}, { - 3.5090496*^9, 4.72}, {3.516912*^9, 4.81}, {3.5253792*^9, - 4.88}, {3.5332416*^9, 4.96}, {3.541104*^9, 5.01}, { - 3.5489664*^9, 5.07}, {3.5568288*^9, 5.13}, {3.5646912*^9, - 5.19}, {3.5725536*^9, 5.24}, {3.580416*^9, 5.29}, { - 3.5882784*^9, 5.33}, {3.5961408*^9, 5.39}, {3.6040032*^9, - 5.43}, {3.6118656*^9, 5.47}, {3.619728*^9, 5.5}, { - 3.6275904*^9, 5.55}, {3.6354528*^9, 5.57}, {3.6433152*^9, - 5.6}, {3.6511776*^9, 5.63}, {3.65904*^9, 5.66}, { - 3.6669024*^9, 5.68}, {3.6747648*^9, 5.7}, {3.683232*^9, - 5.73}, {3.6910944*^9, 5.76}, {3.698352*^9, 5.78}, { - 3.7068192*^9, 5.79}, {3.7146816*^9, 5.8}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"16 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 120-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.89}, {3.4092576*^9, 4.65}, { - 3.4122816*^9, 4.45}, {3.4147008*^9, 4.29}, {3.41712*^9, - 4.16}, {3.4225632*^9, 3.92}, {3.4304256*^9, 3.73}, { - 3.438288*^9, 3.68}, {3.4461504*^9, 3.74}, {3.4540128*^9, - 3.87}, {3.4618752*^9, 4.}, {3.4697376*^9, 4.14}, { - 3.4776*^9, 4.26}, {3.4854624*^9, 4.37}, {3.4933248*^9, - 4.47}, {3.5011872*^9, 4.57}, {3.5090496*^9, 4.66}, { - 3.516912*^9, 4.75}, {3.5253792*^9, 4.83}, {3.5332416*^9, - 4.91}, {3.541104*^9, 4.97}, {3.5489664*^9, 5.03}, { - 3.5568288*^9, 5.09}, {3.5646912*^9, 5.16}, {3.5725536*^9, - 5.21}, {3.580416*^9, 5.26}, {3.5882784*^9, 5.31}, { - 3.5961408*^9, 5.37}, {3.6040032*^9, 5.41}, {3.6118656*^9, - 5.45}, {3.619728*^9, 5.48}, {3.6275904*^9, 5.53}, { - 3.6354528*^9, 5.56}, {3.6433152*^9, 5.59}, {3.6511776*^9, - 5.61}, {3.65904*^9, 5.64}, {3.6669024*^9, 5.67}, { - 3.6747648*^9, 5.69}, {3.683232*^9, 5.72}, {3.6910944*^9, - 5.75}, {3.698352*^9, 5.77}, {3.7068192*^9, 5.78}, { - 3.7146816*^9, 5.79}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"19 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 121-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.86}, {3.4092576*^9, 4.62}, { - 3.4122816*^9, 4.45}, {3.4147008*^9, 4.3}, {3.41712*^9, - 4.17}, {3.4225632*^9, 3.93}, {3.4304256*^9, 3.73}, { - 3.438288*^9, 3.67}, {3.4461504*^9, 3.73}, {3.4540128*^9, - 3.86}, {3.4618752*^9, 4.}, {3.4697376*^9, 4.14}, { - 3.4776*^9, 4.27}, {3.4854624*^9, 4.38}, {3.4933248*^9, - 4.49}, {3.5011872*^9, 4.6}, {3.5090496*^9, 4.68}, { - 3.516912*^9, 4.78}, {3.5253792*^9, 4.86}, {3.5332416*^9, - 4.95}, {3.541104*^9, 5.01}, {3.5489664*^9, 5.08}, { - 3.5568288*^9, 5.14}, {3.5646912*^9, 5.2}, {3.5725536*^9, - 5.25}, {3.580416*^9, 5.31}, {3.5882784*^9, 5.35}, { - 3.5961408*^9, 5.41}, {3.6040032*^9, 5.45}, {3.6118656*^9, - 5.49}, {3.619728*^9, 5.53}, {3.6275904*^9, 5.57}, { - 3.6354528*^9, 5.6}, {3.6433152*^9, 5.63}, {3.6511776*^9, - 5.66}, {3.65904*^9, 5.69}, {3.6669024*^9, 5.71}, { - 3.6747648*^9, 5.74}, {3.683232*^9, 5.76}, {3.6910944*^9, - 5.79}, {3.698352*^9, 5.81}, {3.7068192*^9, 5.83}, { - 3.7146816*^9, 5.84}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"20 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 122-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.79}, {3.4092576*^9, 4.54}, { - 3.4122816*^9, 4.34}, {3.4147008*^9, 4.17}, {3.41712*^9, - 4.05}, {3.4225632*^9, 3.81}, {3.4304256*^9, 3.62}, { - 3.438288*^9, 3.58}, {3.4461504*^9, 3.64}, {3.4540128*^9, - 3.76}, {3.4618752*^9, 3.91}, {3.4697376*^9, 4.06}, { - 3.4776*^9, 4.2}, {3.4854624*^9, 4.32}, {3.4933248*^9, - 4.44}, {3.5011872*^9, 4.56}, {3.5090496*^9, 4.65}, { - 3.516912*^9, 4.75}, {3.5253792*^9, 4.84}, {3.5332416*^9, - 4.93}, {3.541104*^9, 5.}, {3.5489664*^9, 5.07}, { - 3.5568288*^9, 5.14}, {3.5646912*^9, 5.21}, {3.5725536*^9, - 5.26}, {3.580416*^9, 5.32}, {3.5882784*^9, 5.37}, { - 3.5961408*^9, 5.43}, {3.6040032*^9, 5.47}, {3.6118656*^9, - 5.51}, {3.619728*^9, 5.54}, {3.6275904*^9, 5.59}, { - 3.6354528*^9, 5.62}, {3.6433152*^9, 5.65}, {3.6511776*^9, - 5.67}, {3.65904*^9, 5.71}, {3.6669024*^9, 5.73}, { - 3.6747648*^9, 5.76}, {3.683232*^9, 5.78}, {3.6910944*^9, - 5.81}, {3.698352*^9, 5.83}, {3.7068192*^9, 5.85}, { - 3.7146816*^9, 5.86}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"21 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 123-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.81}, {3.4092576*^9, 4.55}, { - 3.4122816*^9, 4.35}, {3.4147008*^9, 4.18}, {3.41712*^9, - 4.05}, {3.4225632*^9, 3.81}, {3.4304256*^9, 3.62}, { - 3.438288*^9, 3.58}, {3.4461504*^9, 3.63}, {3.4540128*^9, - 3.75}, {3.4618752*^9, 3.88}, {3.4697376*^9, 4.03}, { - 3.4776*^9, 4.16}, {3.4854624*^9, 4.28}, {3.4933248*^9, - 4.39}, {3.5011872*^9, 4.5}, {3.5090496*^9, 4.59}, { - 3.516912*^9, 4.69}, {3.5253792*^9, 4.77}, {3.5332416*^9, - 4.86}, {3.541104*^9, 4.92}, {3.5489664*^9, 4.99}, { - 3.5568288*^9, 5.06}, {3.5646912*^9, 5.13}, {3.5725536*^9, - 5.18}, {3.580416*^9, 5.24}, {3.5882784*^9, 5.29}, { - 3.5961408*^9, 5.34}, {3.6040032*^9, 5.38}, {3.6118656*^9, - 5.42}, {3.619728*^9, 5.46}, {3.6275904*^9, 5.5}, { - 3.6354528*^9, 5.53}, {3.6433152*^9, 5.56}, {3.6511776*^9, - 5.59}, {3.65904*^9, 5.62}, {3.6669024*^9, 5.65}, { - 3.6747648*^9, 5.67}, {3.683232*^9, 5.7}, {3.6910944*^9, - 5.73}, {3.698352*^9, 5.75}, {3.7068192*^9, 5.76}, { - 3.7146816*^9, 5.77}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"23 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 124-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.82}, {3.4092576*^9, 4.52}, { - 3.4122816*^9, 4.29}, {3.4147008*^9, 4.12}, {3.41712*^9, - 3.9}, {3.4225632*^9, 3.66}, {3.4304256*^9, 3.44}, { - 3.438288*^9, 3.38}, {3.4461504*^9, 3.42}, {3.4540128*^9, - 3.53}, {3.4618752*^9, 3.67}, {3.4697376*^9, 3.81}, { - 3.4776*^9, 3.94}, {3.4854624*^9, 4.06}, {3.4933248*^9, - 4.17}, {3.5011872*^9, 4.28}, {3.5090496*^9, 4.37}, { - 3.516912*^9, 4.46}, {3.5253792*^9, 4.54}, {3.5332416*^9, - 4.63}, {3.541104*^9, 4.69}, {3.5489664*^9, 4.76}, { - 3.5568288*^9, 4.82}, {3.5646912*^9, 4.89}, {3.5725536*^9, - 4.94}, {3.580416*^9, 5.}, {3.5882784*^9, 5.04}, { - 3.5961408*^9, 5.1}, {3.6040032*^9, 5.14}, {3.6118656*^9, - 5.18}, {3.619728*^9, 5.21}, {3.6275904*^9, 5.25}, { - 3.6354528*^9, 5.28}, {3.6433152*^9, 5.31}, {3.6511776*^9, - 5.34}, {3.65904*^9, 5.37}, {3.6669024*^9, 5.4}, { - 3.6747648*^9, 5.42}, {3.683232*^9, 5.44}, {3.6910944*^9, - 5.47}, {3.698352*^9, 5.49}, {3.7068192*^9, 5.51}, { - 3.7146816*^9, 5.52}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"26 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 125-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.86}, {3.4092576*^9, 4.59}, { - 3.4122816*^9, 4.37}, {3.4147008*^9, 4.22}, {3.41712*^9, - 4.03}, {3.4225632*^9, 3.79}, {3.4304256*^9, 3.56}, { - 3.438288*^9, 3.49}, {3.4461504*^9, 3.52}, {3.4540128*^9, - 3.63}, {3.4618752*^9, 3.76}, {3.4697376*^9, 3.9}, { - 3.4776*^9, 4.03}, {3.4854624*^9, 4.15}, {3.4933248*^9, - 4.25}, {3.5011872*^9, 4.36}, {3.5090496*^9, 4.44}, { - 3.516912*^9, 4.53}, {3.5253792*^9, 4.61}, {3.5332416*^9, - 4.69}, {3.541104*^9, 4.75}, {3.5489664*^9, 4.82}, { - 3.5568288*^9, 4.89}, {3.5646912*^9, 4.96}, {3.5725536*^9, - 5.01}, {3.580416*^9, 5.06}, {3.5882784*^9, 5.11}, { - 3.5961408*^9, 5.17}, {3.6040032*^9, 5.21}, {3.6118656*^9, - 5.25}, {3.619728*^9, 5.28}, {3.6275904*^9, 5.33}, { - 3.6354528*^9, 5.36}, {3.6433152*^9, 5.39}, {3.6511776*^9, - 5.41}, {3.65904*^9, 5.45}, {3.6669024*^9, 5.48}, { - 3.6747648*^9, 5.5}, {3.683232*^9, 5.52}, {3.6910944*^9, - 5.55}, {3.698352*^9, 5.57}, {3.7068192*^9, 5.59}, { - 3.7146816*^9, 5.6}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"27 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 126-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.86}, {3.4092576*^9, 4.61}, { - 3.4122816*^9, 4.4}, {3.4147008*^9, 4.25}, {3.41712*^9, - 4.11}, {3.420144*^9, 3.96}, {3.4225632*^9, 3.84}, { - 3.4304256*^9, 3.63}, {3.438288*^9, 3.56}, {3.4461504*^9, - 3.59}, {3.4540128*^9, 3.69}, {3.4618752*^9, 3.82}, { - 3.4697376*^9, 3.96}, {3.4776*^9, 4.09}, {3.4854624*^9, - 4.21}, {3.4933248*^9, 4.32}, {3.5011872*^9, 4.42}, { - 3.5090496*^9, 4.51}, {3.516912*^9, 4.6}, {3.5253792*^9, - 4.68}, {3.5332416*^9, 4.76}, {3.541104*^9, 4.82}, { - 3.5489664*^9, 4.88}, {3.5568288*^9, 4.94}, {3.5646912*^9, - 5.}, {3.5725536*^9, 5.05}, {3.580416*^9, 5.1}, { - 3.5882784*^9, 5.14}, {3.5961408*^9, 5.2}, {3.6040032*^9, - 5.24}, {3.6118656*^9, 5.28}, {3.619728*^9, 5.32}, { - 3.6275904*^9, 5.37}, {3.6354528*^9, 5.4}, {3.6433152*^9, - 5.43}, {3.6511776*^9, 5.46}, {3.65904*^9, 5.5}, { - 3.6669024*^9, 5.53}, {3.6747648*^9, 5.55}, {3.683232*^9, - 5.57}, {3.6910944*^9, 5.61}, {3.698352*^9, 5.63}, { - 3.7068192*^9, 5.64}, {3.7146816*^9, 5.66}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"28 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 127-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.85}, {3.4092576*^9, 4.58}, { - 3.4122816*^9, 4.36}, {3.4147008*^9, 4.19}, {3.41712*^9, - 4.01}, {3.420144*^9, 3.86}, {3.4225632*^9, 3.74}, { - 3.4304256*^9, 3.52}, {3.438288*^9, 3.45}, {3.4461504*^9, - 3.48}, {3.4540128*^9, 3.59}, {3.4618752*^9, 3.73}, { - 3.4697376*^9, 3.87}, {3.4776*^9, 4.}, {3.4854624*^9, - 4.12}, {3.4933248*^9, 4.23}, {3.5011872*^9, 4.33}, { - 3.5090496*^9, 4.41}, {3.516912*^9, 4.5}, {3.5253792*^9, - 4.58}, {3.5332416*^9, 4.65}, {3.541104*^9, 4.71}, { - 3.5489664*^9, 4.78}, {3.5568288*^9, 4.84}, {3.5646912*^9, - 4.9}, {3.5725536*^9, 4.94}, {3.580416*^9, 5.}, { - 3.5882784*^9, 5.04}, {3.5961408*^9, 5.1}, {3.6040032*^9, - 5.14}, {3.6118656*^9, 5.19}, {3.619728*^9, 5.22}, { - 3.6275904*^9, 5.27}, {3.6354528*^9, 5.3}, {3.6433152*^9, - 5.34}, {3.6511776*^9, 5.36}, {3.65904*^9, 5.4}, { - 3.6669024*^9, 5.43}, {3.6747648*^9, 5.46}, {3.683232*^9, - 5.48}, {3.6910944*^9, 5.51}, {3.698352*^9, 5.53}, { - 3.7068192*^9, 5.55}, {3.7146816*^9, 5.56}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"29 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 128-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.84}, {3.4092576*^9, 4.57}, { - 3.4122816*^9, 4.33}, {3.4147008*^9, 4.17}, {3.41712*^9, - 4.}, {3.420144*^9, 3.85}, {3.4225632*^9, 3.73}, { - 3.4304256*^9, 3.5}, {3.438288*^9, 3.43}, {3.4461504*^9, - 3.46}, {3.4540128*^9, 3.57}, {3.4618752*^9, 3.7}, { - 3.4697376*^9, 3.85}, {3.4776*^9, 3.98}, {3.4854624*^9, - 4.1}, {3.4933248*^9, 4.21}, {3.5011872*^9, 4.32}, { - 3.5090496*^9, 4.4}, {3.516912*^9, 4.49}, {3.5253792*^9, - 4.57}, {3.5332416*^9, 4.65}, {3.541104*^9, 4.72}, { - 3.5489664*^9, 4.79}, {3.5568288*^9, 4.85}, {3.5646912*^9, - 4.92}, {3.5725536*^9, 4.97}, {3.580416*^9, 5.02}, { - 3.5882784*^9, 5.07}, {3.5961408*^9, 5.13}, {3.6040032*^9, - 5.17}, {3.6118656*^9, 5.22}, {3.619728*^9, 5.25}, { - 3.6275904*^9, 5.3}, {3.6354528*^9, 5.33}, {3.6433152*^9, - 5.37}, {3.6511776*^9, 5.39}, {3.65904*^9, 5.44}, { - 3.6669024*^9, 5.47}, {3.6747648*^9, 5.49}, {3.683232*^9, - 5.51}, {3.6910944*^9, 5.55}, {3.698352*^9, 5.57}, { - 3.7068192*^9, 5.59}, {3.7146816*^9, 5.6}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"30 Nov 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 129-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.91}, {3.4092576*^9, 4.62}, { - 3.4122816*^9, 4.38}, {3.4147008*^9, 4.2}, {3.41712*^9, - 4.03}, {3.420144*^9, 3.84}, {3.4225632*^9, 3.72}, { - 3.4304256*^9, 3.46}, {3.438288*^9, 3.36}, {3.4461504*^9, - 3.36}, {3.4540128*^9, 3.45}, {3.4618752*^9, 3.58}, { - 3.4697376*^9, 3.73}, {3.4776*^9, 3.86}, {3.4854624*^9, - 3.99}, {3.4933248*^9, 4.1}, {3.5011872*^9, 4.21}, { - 3.5090496*^9, 4.29}, {3.516912*^9, 4.39}, {3.5253792*^9, - 4.47}, {3.5332416*^9, 4.55}, {3.541104*^9, 4.62}, { - 3.5489664*^9, 4.69}, {3.5568288*^9, 4.75}, {3.5646912*^9, - 4.83}, {3.5725536*^9, 4.88}, {3.580416*^9, 4.94}, { - 3.5882784*^9, 4.99}, {3.5961408*^9, 5.06}, {3.6040032*^9, - 5.1}, {3.6118656*^9, 5.14}, {3.619728*^9, 5.18}, { - 3.6275904*^9, 5.23}, {3.6354528*^9, 5.26}, {3.6433152*^9, - 5.3}, {3.6511776*^9, 5.33}, {3.65904*^9, 5.37}, { - 3.6669024*^9, 5.4}, {3.6747648*^9, 5.43}, {3.683232*^9, - 5.45}, {3.6910944*^9, 5.49}, {3.698352*^9, 5.51}, { - 3.7068192*^9, 5.53}, {3.7146816*^9, 5.55}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"03 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 130-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.9}, {3.4092576*^9, 4.61}, { - 3.4122816*^9, 4.36}, {3.4147008*^9, 4.18}, {3.41712*^9, - 4.03}, {3.420144*^9, 3.84}, {3.4225632*^9, 3.72}, { - 3.4304256*^9, 3.46}, {3.438288*^9, 3.35}, {3.4461504*^9, - 3.35}, {3.4540128*^9, 3.45}, {3.4618752*^9, 3.58}, { - 3.4697376*^9, 3.74}, {3.4776*^9, 3.87}, {3.4854624*^9, - 4.01}, {3.4933248*^9, 4.11}, {3.5011872*^9, 4.22}, { - 3.5090496*^9, 4.31}, {3.516912*^9, 4.41}, {3.5253792*^9, - 4.49}, {3.5332416*^9, 4.58}, {3.541104*^9, 4.65}, { - 3.5489664*^9, 4.72}, {3.5568288*^9, 4.79}, {3.5646912*^9, - 4.87}, {3.5725536*^9, 4.93}, {3.580416*^9, 4.99}, { - 3.5882784*^9, 5.04}, {3.5961408*^9, 5.1}, {3.6040032*^9, - 5.15}, {3.6118656*^9, 5.2}, {3.619728*^9, 5.24}, { - 3.6275904*^9, 5.29}, {3.6354528*^9, 5.33}, {3.6433152*^9, - 5.36}, {3.6511776*^9, 5.39}, {3.65904*^9, 5.44}, { - 3.6669024*^9, 5.47}, {3.6747648*^9, 5.5}, {3.683232*^9, - 5.52}, {3.6910944*^9, 5.56}, {3.698352*^9, 5.58}, { - 3.7068192*^9, 5.6}, {3.7146816*^9, 5.62}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"04 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 131-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.9}, {3.4092576*^9, 4.61}, { - 3.4122816*^9, 4.37}, {3.4147008*^9, 4.2}, {3.41712*^9, - 4.03}, {3.420144*^9, 3.84}, {3.4225632*^9, 3.72}, { - 3.4304256*^9, 3.46}, {3.438288*^9, 3.35}, {3.4461504*^9, - 3.34}, {3.4540128*^9, 3.44}, {3.4618752*^9, 3.57}, { - 3.4697376*^9, 3.72}, {3.4776*^9, 3.86}, {3.4854624*^9, - 3.99}, {3.4933248*^9, 4.1}, {3.5011872*^9, 4.21}, { - 3.5090496*^9, 4.3}, {3.516912*^9, 4.4}, {3.5253792*^9, - 4.49}, {3.5332416*^9, 4.58}, {3.541104*^9, 4.65}, { - 3.5489664*^9, 4.72}, {3.5568288*^9, 4.79}, {3.5646912*^9, - 4.87}, {3.5725536*^9, 4.93}, {3.580416*^9, 5.}, { - 3.5882784*^9, 5.05}, {3.5961408*^9, 5.12}, {3.6040032*^9, - 5.16}, {3.6118656*^9, 5.21}, {3.619728*^9, 5.25}, { - 3.6275904*^9, 5.31}, {3.6354528*^9, 5.34}, {3.6433152*^9, - 5.38}, {3.6511776*^9, 5.41}, {3.65904*^9, 5.47}, { - 3.6669024*^9, 5.5}, {3.6747648*^9, 5.53}, {3.683232*^9, - 5.55}, {3.6910944*^9, 5.59}, {3.698352*^9, 5.61}, { - 3.7068192*^9, 5.63}, {3.7146816*^9, 5.65}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"05 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 132-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.94}, {3.4092576*^9, 4.66}, { - 3.4122816*^9, 4.44}, {3.4147008*^9, 4.29}, {3.41712*^9, - 4.12}, {3.420144*^9, 3.93}, {3.4225632*^9, 3.81}, { - 3.4304256*^9, 3.56}, {3.438288*^9, 3.47}, {3.4461504*^9, - 3.47}, {3.4540128*^9, 3.56}, {3.4618752*^9, 3.69}, { - 3.4697376*^9, 3.83}, {3.4776*^9, 3.96}, {3.4854624*^9, - 4.1}, {3.4933248*^9, 4.2}, {3.5011872*^9, 4.31}, { - 3.5090496*^9, 4.39}, {3.516912*^9, 4.49}, {3.5253792*^9, - 4.57}, {3.5332416*^9, 4.66}, {3.541104*^9, 4.73}, { - 3.5489664*^9, 4.8}, {3.5568288*^9, 4.87}, {3.5646912*^9, - 4.95}, {3.5725536*^9, 5.01}, {3.580416*^9, 5.08}, { - 3.5882784*^9, 5.13}, {3.5961408*^9, 5.2}, {3.6040032*^9, - 5.24}, {3.6118656*^9, 5.29}, {3.619728*^9, 5.33}, { - 3.6275904*^9, 5.39}, {3.6354528*^9, 5.42}, {3.6433152*^9, - 5.46}, {3.6511776*^9, 5.49}, {3.65904*^9, 5.55}, { - 3.6669024*^9, 5.58}, {3.6747648*^9, 5.61}, {3.683232*^9, - 5.63}, {3.6910944*^9, 5.67}, {3.698352*^9, 5.69}, { - 3.7068192*^9, 5.71}, {3.7146816*^9, 5.73}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"06 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 133-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.98}, {3.4092576*^9, 4.72}, { - 3.4122816*^9, 4.52}, {3.4147008*^9, 4.4}, {3.41712*^9, - 4.26}, {3.420144*^9, 4.06}, {3.4225632*^9, 3.94}, { - 3.4304256*^9, 3.71}, {3.438288*^9, 3.62}, {3.4461504*^9, - 3.63}, {3.4540128*^9, 3.73}, {3.4618752*^9, 3.86}, { - 3.4697376*^9, 4.01}, {3.4776*^9, 4.14}, {3.4854624*^9, - 4.28}, {3.4933248*^9, 4.39}, {3.5011872*^9, 4.5}, { - 3.5090496*^9, 4.59}, {3.516912*^9, 4.69}, {3.5253792*^9, - 4.78}, {3.5332416*^9, 4.87}, {3.541104*^9, 4.94}, { - 3.5489664*^9, 5.01}, {3.5568288*^9, 5.08}, {3.5646912*^9, - 5.16}, {3.5725536*^9, 5.22}, {3.580416*^9, 5.29}, { - 3.5882784*^9, 5.34}, {3.5961408*^9, 5.41}, {3.6040032*^9, - 5.45}, {3.6118656*^9, 5.5}, {3.619728*^9, 5.54}, { - 3.6275904*^9, 5.6}, {3.6354528*^9, 5.63}, {3.6433152*^9, - 5.67}, {3.6511776*^9, 5.7}, {3.65904*^9, 5.76}, { - 3.6669024*^9, 5.79}, {3.6747648*^9, 5.82}, {3.683232*^9, - 5.84}, {3.6910944*^9, 5.88}, {3.698352*^9, 5.9}, { - 3.7068192*^9, 5.92}, {3.7146816*^9, 5.94}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"07 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 134-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.96}, {3.4092576*^9, 4.72}, { - 3.4122816*^9, 4.53}, {3.4147008*^9, 4.42}, {3.41712*^9, - 4.27}, {3.420144*^9, 4.1}, {3.4225632*^9, 3.98}, { - 3.4304256*^9, 3.75}, {3.438288*^9, 3.67}, {3.4461504*^9, - 3.69}, {3.4540128*^9, 3.8}, {3.4618752*^9, 3.94}, { - 3.4697376*^9, 4.08}, {3.4776*^9, 4.21}, {3.4854624*^9, - 4.35}, {3.4933248*^9, 4.46}, {3.5011872*^9, 4.56}, { - 3.5090496*^9, 4.65}, {3.516912*^9, 4.74}, {3.5253792*^9, - 4.83}, {3.5332416*^9, 4.92}, {3.541104*^9, 4.98}, { - 3.5489664*^9, 5.06}, {3.5568288*^9, 5.13}, {3.5646912*^9, - 5.2}, {3.5725536*^9, 5.26}, {3.580416*^9, 5.33}, { - 3.5882784*^9, 5.38}, {3.5961408*^9, 5.45}, {3.6040032*^9, - 5.49}, {3.6118656*^9, 5.54}, {3.619728*^9, 5.58}, { - 3.6275904*^9, 5.64}, {3.6354528*^9, 5.67}, {3.6433152*^9, - 5.71}, {3.6511776*^9, 5.74}, {3.65904*^9, 5.8}, { - 3.6669024*^9, 5.83}, {3.6747648*^9, 5.86}, {3.683232*^9, - 5.88}, {3.6910944*^9, 5.92}, {3.698352*^9, 5.94}, { - 3.7068192*^9, 5.96}, {3.7146816*^9, 5.98}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"10 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 135-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 5.07}, {3.4092576*^9, 4.79}, { - 3.4122816*^9, 4.57}, {3.4147008*^9, 4.44}, {3.41712*^9, - 4.29}, {3.420144*^9, 4.04}, {3.4225632*^9, 3.92}, { - 3.4304256*^9, 3.62}, {3.438288*^9, 3.49}, {3.4461504*^9, - 3.49}, {3.4540128*^9, 3.59}, {3.4618752*^9, 3.73}, { - 3.4697376*^9, 3.88}, {3.4776*^9, 4.02}, {3.4854624*^9, - 4.16}, {3.4933248*^9, 4.27}, {3.5011872*^9, 4.38}, { - 3.5090496*^9, 4.47}, {3.516912*^9, 4.57}, {3.5253792*^9, - 4.66}, {3.5332416*^9, 4.75}, {3.541104*^9, 4.82}, { - 3.5489664*^9, 4.9}, {3.5568288*^9, 4.97}, {3.5646912*^9, - 5.04}, {3.5725536*^9, 5.1}, {3.580416*^9, 5.17}, { - 3.5882784*^9, 5.22}, {3.5961408*^9, 5.29}, {3.6040032*^9, - 5.33}, {3.6118656*^9, 5.38}, {3.619728*^9, 5.42}, { - 3.6275904*^9, 5.48}, {3.6354528*^9, 5.51}, {3.6433152*^9, - 5.55}, {3.6511776*^9, 5.58}, {3.65904*^9, 5.64}, { - 3.6669024*^9, 5.67}, {3.6747648*^9, 5.7}, {3.683232*^9, - 5.72}, {3.6910944*^9, 5.76}, {3.698352*^9, 5.78}, { - 3.7068192*^9, 5.8}, {3.7146816*^9, 5.82}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"11 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 136-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.93}, {3.4092576*^9, 4.68}, { - 3.4122816*^9, 4.44}, {3.4147008*^9, 4.33}, {3.41712*^9, - 4.19}, {3.420144*^9, 4.04}, {3.4225632*^9, 3.89}, { - 3.4304256*^9, 3.65}, {3.438288*^9, 3.56}, {3.4461504*^9, - 3.57}, {3.4540128*^9, 3.67}, {3.4618752*^9, 3.81}, { - 3.4697376*^9, 3.94}, {3.4776*^9, 4.07}, {3.4854624*^9, - 4.2}, {3.4933248*^9, 4.31}, {3.5011872*^9, 4.42}, { - 3.5090496*^9, 4.5}, {3.516912*^9, 4.6}, {3.5253792*^9, - 4.68}, {3.5332416*^9, 4.77}, {3.541104*^9, 4.83}, { - 3.5489664*^9, 4.91}, {3.5568288*^9, 4.98}, {3.5646912*^9, - 5.05}, {3.5725536*^9, 5.11}, {3.580416*^9, 5.18}, { - 3.5882784*^9, 5.23}, {3.5961408*^9, 5.3}, {3.6040032*^9, - 5.34}, {3.6118656*^9, 5.39}, {3.619728*^9, 5.43}, { - 3.6275904*^9, 5.49}, {3.6354528*^9, 5.52}, {3.6433152*^9, - 5.56}, {3.6511776*^9, 5.59}, {3.65904*^9, 5.64}, { - 3.6669024*^9, 5.67}, {3.6747648*^9, 5.7}, {3.683232*^9, - 5.73}, {3.6910944*^9, 5.77}, {3.698352*^9, 5.79}, { - 3.7068192*^9, 5.81}, {3.7146816*^9, 5.83}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"12 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 137-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.95}, {3.4092576*^9, 4.71}, { - 3.4122816*^9, 4.48}, {3.4147008*^9, 4.39}, {3.41712*^9, - 4.26}, {3.420144*^9, 4.11}, {3.4225632*^9, 3.97}, { - 3.4304256*^9, 3.74}, {3.438288*^9, 3.65}, {3.4461504*^9, - 3.66}, {3.4540128*^9, 3.76}, {3.4618752*^9, 3.89}, { - 3.4697376*^9, 4.02}, {3.4776*^9, 4.14}, {3.4854624*^9, - 4.28}, {3.4933248*^9, 4.39}, {3.5011872*^9, 4.49}, { - 3.5090496*^9, 4.58}, {3.516912*^9, 4.67}, {3.5253792*^9, - 4.76}, {3.5332416*^9, 4.84}, {3.541104*^9, 4.91}, { - 3.5489664*^9, 4.98}, {3.5568288*^9, 5.05}, {3.5646912*^9, - 5.13}, {3.5725536*^9, 5.19}, {3.580416*^9, 5.25}, { - 3.5882784*^9, 5.3}, {3.5961408*^9, 5.37}, {3.6040032*^9, - 5.42}, {3.6118656*^9, 5.47}, {3.619728*^9, 5.51}, { - 3.6275904*^9, 5.56}, {3.6354528*^9, 5.6}, {3.6433152*^9, - 5.64}, {3.6511776*^9, 5.67}, {3.65904*^9, 5.72}, { - 3.6669024*^9, 5.75}, {3.6747648*^9, 5.78}, {3.683232*^9, - 5.8}, {3.6910944*^9, 5.84}, {3.698352*^9, 5.86}, { - 3.7068192*^9, 5.88}, {3.7146816*^9, 5.9}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"13 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 138-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.93}, {3.4092576*^9, 4.7}, { - 3.4122816*^9, 4.52}, {3.4147008*^9, 4.43}, {3.41712*^9, - 4.36}, {3.420144*^9, 4.21}, {3.4225632*^9, 4.06}, { - 3.4304256*^9, 3.85}, {3.438288*^9, 3.76}, {3.4461504*^9, - 3.77}, {3.4540128*^9, 3.88}, {3.4618752*^9, 4.01}, { - 3.4697376*^9, 4.14}, {3.4776*^9, 4.26}, {3.4854624*^9, - 4.39}, {3.4933248*^9, 4.5}, {3.5011872*^9, 4.6}, { - 3.5090496*^9, 4.68}, {3.516912*^9, 4.77}, {3.5253792*^9, - 4.86}, {3.5332416*^9, 4.94}, {3.541104*^9, 5.}, { - 3.5489664*^9, 5.08}, {3.5568288*^9, 5.15}, {3.5646912*^9, - 5.22}, {3.5725536*^9, 5.27}, {3.580416*^9, 5.33}, { - 3.5882784*^9, 5.38}, {3.5961408*^9, 5.45}, {3.6040032*^9, - 5.49}, {3.6118656*^9, 5.54}, {3.619728*^9, 5.58}, { - 3.6275904*^9, 5.63}, {3.6354528*^9, 5.66}, {3.6433152*^9, - 5.7}, {3.6511776*^9, 5.73}, {3.65904*^9, 5.77}, { - 3.6669024*^9, 5.8}, {3.6747648*^9, 5.83}, {3.683232*^9, - 5.86}, {3.6910944*^9, 5.89}, {3.698352*^9, 5.91}, { - 3.7068192*^9, 5.93}, {3.7146816*^9, 5.95}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"14 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 139-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.72}, {3.4122816*^9, 4.52}, { - 3.4147008*^9, 4.42}, {3.41712*^9, 4.3}, {3.420144*^9, - 4.16}, {3.4225632*^9, 4.04}, {3.4304256*^9, 3.8}, { - 3.438288*^9, 3.69}, {3.4461504*^9, 3.7}, {3.4540128*^9, - 3.81}, {3.4618752*^9, 3.94}, {3.4697376*^9, 4.07}, { - 3.4776*^9, 4.2}, {3.4854624*^9, 4.33}, {3.4933248*^9, - 4.44}, {3.5011872*^9, 4.55}, {3.5090496*^9, 4.63}, { - 3.516912*^9, 4.72}, {3.5253792*^9, 4.8}, {3.5332416*^9, - 4.88}, {3.541104*^9, 4.95}, {3.5489664*^9, 5.02}, { - 3.5568288*^9, 5.09}, {3.5646912*^9, 5.16}, {3.5725536*^9, - 5.22}, {3.580416*^9, 5.28}, {3.5882784*^9, 5.33}, { - 3.5961408*^9, 5.39}, {3.6040032*^9, 5.44}, {3.6118656*^9, - 5.48}, {3.619728*^9, 5.52}, {3.6275904*^9, 5.57}, { - 3.6354528*^9, 5.61}, {3.6433152*^9, 5.64}, {3.6511776*^9, - 5.67}, {3.65904*^9, 5.72}, {3.6669024*^9, 5.75}, { - 3.6747648*^9, 5.78}, {3.683232*^9, 5.8}, {3.6910944*^9, - 5.84}, {3.698352*^9, 5.86}, {3.7068192*^9, 5.88}, { - 3.7146816*^9, 5.9}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"17 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 140-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.67}, {3.4122816*^9, 4.45}, { - 3.4147008*^9, 4.34}, {3.41712*^9, 4.21}, {3.420144*^9, - 4.05}, {3.4225632*^9, 3.93}, {3.4304256*^9, 3.69}, { - 3.438288*^9, 3.59}, {3.4461504*^9, 3.6}, {3.4540128*^9, - 3.7}, {3.4618752*^9, 3.84}, {3.4697376*^9, 3.97}, { - 3.4776*^9, 4.09}, {3.4854624*^9, 4.23}, {3.4933248*^9, - 4.34}, {3.5011872*^9, 4.44}, {3.5090496*^9, 4.52}, { - 3.516912*^9, 4.61}, {3.5253792*^9, 4.69}, {3.5332416*^9, - 4.77}, {3.541104*^9, 4.83}, {3.5489664*^9, 4.91}, { - 3.5568288*^9, 4.97}, {3.5646912*^9, 5.04}, {3.5725536*^9, - 5.1}, {3.580416*^9, 5.16}, {3.5882784*^9, 5.21}, { - 3.5961408*^9, 5.27}, {3.6040032*^9, 5.32}, {3.6118656*^9, - 5.36}, {3.619728*^9, 5.4}, {3.6275904*^9, 5.45}, { - 3.6354528*^9, 5.48}, {3.6433152*^9, 5.52}, {3.6511776*^9, - 5.55}, {3.65904*^9, 5.59}, {3.6669024*^9, 5.62}, { - 3.6747648*^9, 5.65}, {3.683232*^9, 5.68}, {3.6910944*^9, - 5.71}, {3.698352*^9, 5.73}, {3.7068192*^9, 5.75}, { - 3.7146816*^9, 5.77}, {3.722544*^9, 5.81}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"18 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 141-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4068384*^9, 4.94}, {3.4092576*^9, 4.66}, { - 3.4122816*^9, 4.43}, {3.4147008*^9, 4.31}, {3.41712*^9, - 4.15}, {3.420144*^9, 3.98}, {3.4225632*^9, 3.85}, { - 3.4304256*^9, 3.61}, {3.438288*^9, 3.5}, {3.4461504*^9, - 3.51}, {3.4540128*^9, 3.62}, {3.4618752*^9, 3.75}, { - 3.4697376*^9, 3.88}, {3.4776*^9, 4.01}, {3.4854624*^9, - 4.15}, {3.4933248*^9, 4.26}, {3.5011872*^9, 4.37}, { - 3.5090496*^9, 4.45}, {3.516912*^9, 4.54}, {3.5253792*^9, - 4.63}, {3.5332416*^9, 4.71}, {3.541104*^9, 4.77}, { - 3.5489664*^9, 4.84}, {3.5568288*^9, 4.91}, {3.5646912*^9, - 4.98}, {3.5725536*^9, 5.03}, {3.580416*^9, 5.09}, { - 3.5882784*^9, 5.14}, {3.5961408*^9, 5.21}, {3.6040032*^9, - 5.25}, {3.6118656*^9, 5.3}, {3.619728*^9, 5.34}, { - 3.6275904*^9, 5.39}, {3.6354528*^9, 5.42}, {3.6433152*^9, - 5.45}, {3.6511776*^9, 5.48}, {3.65904*^9, 5.53}, { - 3.6669024*^9, 5.56}, {3.6747648*^9, 5.59}, {3.683232*^9, - 5.61}, {3.6910944*^9, 5.65}, {3.698352*^9, 5.67}, { - 3.7068192*^9, 5.69}, {3.7146816*^9, 5.71}, {3.722544*^9, - 5.74}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"19 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 142-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.65}, {3.4122816*^9, 4.42}, { - 3.4147008*^9, 4.29}, {3.41712*^9, 4.13}, {3.420144*^9, - 3.94}, {3.4225632*^9, 3.8}, {3.4304256*^9, 3.54}, { - 3.438288*^9, 3.42}, {3.4461504*^9, 3.43}, {3.4540128*^9, - 3.54}, {3.4618752*^9, 3.67}, {3.4697376*^9, 3.81}, { - 3.4776*^9, 3.94}, {3.4854624*^9, 4.09}, {3.4933248*^9, - 4.21}, {3.5011872*^9, 4.32}, {3.5090496*^9, 4.41}, { - 3.516912*^9, 4.51}, {3.5253792*^9, 4.59}, {3.5332416*^9, - 4.68}, {3.541104*^9, 4.74}, {3.5489664*^9, 4.82}, { - 3.5568288*^9, 4.89}, {3.5646912*^9, 4.96}, {3.5725536*^9, - 5.02}, {3.580416*^9, 5.08}, {3.5882784*^9, 5.14}, { - 3.5961408*^9, 5.21}, {3.6040032*^9, 5.26}, {3.6118656*^9, - 5.3}, {3.619728*^9, 5.34}, {3.6275904*^9, 5.39}, { - 3.6354528*^9, 5.42}, {3.6433152*^9, 5.46}, {3.6511776*^9, - 5.49}, {3.65904*^9, 5.53}, {3.6669024*^9, 5.56}, { - 3.6747648*^9, 5.59}, {3.683232*^9, 5.62}, {3.6910944*^9, - 5.65}, {3.698352*^9, 5.67}, {3.7068192*^9, 5.69}, { - 3.7146816*^9, 5.71}, {3.722544*^9, 5.75}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"20 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 143-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.67}, {3.4122816*^9, 4.45}, { - 3.4147008*^9, 4.33}, {3.41712*^9, 4.17}, {3.420144*^9, - 4.01}, {3.4225632*^9, 3.87}, {3.4304256*^9, 3.65}, { - 3.438288*^9, 3.56}, {3.4461504*^9, 3.59}, {3.4540128*^9, - 3.72}, {3.4618752*^9, 3.86}, {3.4697376*^9, 4.}, { - 3.4776*^9, 4.13}, {3.4854624*^9, 4.27}, {3.4933248*^9, - 4.39}, {3.5011872*^9, 4.5}, {3.5090496*^9, 4.59}, { - 3.516912*^9, 4.69}, {3.5253792*^9, 4.77}, {3.5332416*^9, - 4.86}, {3.541104*^9, 4.92}, {3.5489664*^9, 5.}, { - 3.5568288*^9, 5.07}, {3.5646912*^9, 5.14}, {3.5725536*^9, - 5.2}, {3.580416*^9, 5.26}, {3.5882784*^9, 5.32}, { - 3.5961408*^9, 5.39}, {3.6040032*^9, 5.44}, {3.6118656*^9, - 5.48}, {3.619728*^9, 5.52}, {3.6275904*^9, 5.57}, { - 3.6354528*^9, 5.6}, {3.6433152*^9, 5.64}, {3.6511776*^9, - 5.67}, {3.65904*^9, 5.71}, {3.6669024*^9, 5.74}, { - 3.6747648*^9, 5.77}, {3.683232*^9, 5.8}, {3.6910944*^9, - 5.83}, {3.698352*^9, 5.85}, {3.7068192*^9, 5.87}, { - 3.7146816*^9, 5.89}, {3.722544*^9, 5.93}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"21 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 144-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.68}, {3.4122816*^9, 4.46}, { - 3.4147008*^9, 4.34}, {3.41712*^9, 4.19}, {3.420144*^9, - 4.02}, {3.4225632*^9, 3.89}, {3.4304256*^9, 3.67}, { - 3.438288*^9, 3.59}, {3.4461504*^9, 3.63}, {3.4540128*^9, - 3.77}, {3.4618752*^9, 3.92}, {3.4697376*^9, 4.08}, { - 3.4776*^9, 4.21}, {3.4854624*^9, 4.35}, {3.4933248*^9, - 4.48}, {3.5011872*^9, 4.59}, {3.5090496*^9, 4.68}, { - 3.516912*^9, 4.77}, {3.5253792*^9, 4.86}, {3.5332416*^9, - 4.94}, {3.541104*^9, 5.01}, {3.5489664*^9, 5.08}, { - 3.5568288*^9, 5.15}, {3.5646912*^9, 5.23}, {3.5725536*^9, - 5.29}, {3.580416*^9, 5.35}, {3.5882784*^9, 5.41}, { - 3.5961408*^9, 5.47}, {3.6040032*^9, 5.52}, {3.6118656*^9, - 5.57}, {3.619728*^9, 5.61}, {3.6275904*^9, 5.66}, { - 3.6354528*^9, 5.69}, {3.6433152*^9, 5.72}, {3.6511776*^9, - 5.75}, {3.65904*^9, 5.8}, {3.6669024*^9, 5.83}, { - 3.6747648*^9, 5.86}, {3.683232*^9, 5.88}, {3.6910944*^9, - 5.92}, {3.698352*^9, 5.94}, {3.7068192*^9, 5.96}, { - 3.7146816*^9, 5.98}, {3.722544*^9, 6.01}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"24 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 145-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.67}, {3.4122816*^9, 4.45}, { - 3.4147008*^9, 4.37}, {3.41712*^9, 4.22}, {3.420144*^9, - 4.05}, {3.4225632*^9, 3.93}, {3.4304256*^9, 3.71}, { - 3.438288*^9, 3.63}, {3.4461504*^9, 3.68}, {3.4540128*^9, - 3.83}, {3.4618752*^9, 4.}, {3.4697376*^9, 4.16}, { - 3.4776*^9, 4.29}, {3.4854624*^9, 4.43}, {3.4933248*^9, - 4.55}, {3.5011872*^9, 4.66}, {3.5090496*^9, 4.75}, { - 3.516912*^9, 4.85}, {3.5253792*^9, 4.93}, {3.5332416*^9, - 5.01}, {3.541104*^9, 5.07}, {3.5489664*^9, 5.15}, { - 3.5568288*^9, 5.22}, {3.5646912*^9, 5.29}, {3.5725536*^9, - 5.35}, {3.580416*^9, 5.41}, {3.5882784*^9, 5.47}, { - 3.5961408*^9, 5.53}, {3.6040032*^9, 5.58}, {3.6118656*^9, - 5.62}, {3.619728*^9, 5.66}, {3.6275904*^9, 5.71}, { - 3.6354528*^9, 5.74}, {3.6433152*^9, 5.77}, {3.6511776*^9, - 5.8}, {3.65904*^9, 5.84}, {3.6669024*^9, 5.87}, { - 3.6747648*^9, 5.9}, {3.683232*^9, 5.92}, {3.6910944*^9, - 5.96}, {3.698352*^9, 5.97}, {3.7068192*^9, 5.99}, { - 3.7146816*^9, 6.01}, {3.722544*^9, 6.04}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"26 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 146-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.65}, {3.4122816*^9, 4.44}, { - 3.4147008*^9, 4.34}, {3.41712*^9, 4.19}, {3.420144*^9, - 4.03}, {3.4225632*^9, 3.9}, {3.4304256*^9, 3.67}, { - 3.438288*^9, 3.57}, {3.4461504*^9, 3.6}, {3.4540128*^9, - 3.73}, {3.4618752*^9, 3.89}, {3.4697376*^9, 4.06}, { - 3.4776*^9, 4.21}, {3.4854624*^9, 4.36}, {3.4933248*^9, - 4.48}, {3.5011872*^9, 4.6}, {3.5090496*^9, 4.69}, { - 3.516912*^9, 4.78}, {3.5253792*^9, 4.86}, {3.5332416*^9, - 4.95}, {3.541104*^9, 5.01}, {3.5489664*^9, 5.08}, { - 3.5568288*^9, 5.15}, {3.5646912*^9, 5.22}, {3.5725536*^9, - 5.28}, {3.580416*^9, 5.34}, {3.5882784*^9, 5.4}, { - 3.5961408*^9, 5.47}, {3.6040032*^9, 5.51}, {3.6118656*^9, - 5.55}, {3.619728*^9, 5.59}, {3.6275904*^9, 5.64}, { - 3.6354528*^9, 5.67}, {3.6433152*^9, 5.7}, {3.6511776*^9, - 5.73}, {3.65904*^9, 5.77}, {3.6669024*^9, 5.8}, { - 3.6747648*^9, 5.83}, {3.683232*^9, 5.85}, {3.6910944*^9, - 5.89}, {3.698352*^9, 5.9}, {3.7068192*^9, 5.92}, { - 3.7146816*^9, 5.94}, {3.722544*^9, 5.97}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"27 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 147-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.6}, {3.4122816*^9, 4.38}, { - 3.4147008*^9, 4.27}, {3.41712*^9, 4.11}, {3.420144*^9, - 3.94}, {3.4225632*^9, 3.8}, {3.4304256*^9, 3.55}, { - 3.438288*^9, 3.43}, {3.4461504*^9, 3.44}, {3.4540128*^9, - 3.56}, {3.4618752*^9, 3.73}, {3.4697376*^9, 3.9}, { - 3.4776*^9, 4.06}, {3.4854624*^9, 4.21}, {3.4933248*^9, - 4.34}, {3.5011872*^9, 4.45}, {3.5090496*^9, 4.54}, { - 3.516912*^9, 4.63}, {3.5253792*^9, 4.7}, {3.5332416*^9, - 4.78}, {3.541104*^9, 4.84}, {3.5489664*^9, 4.91}, { - 3.5568288*^9, 4.98}, {3.5646912*^9, 5.06}, {3.5725536*^9, - 5.12}, {3.580416*^9, 5.18}, {3.5882784*^9, 5.24}, { - 3.5961408*^9, 5.3}, {3.6040032*^9, 5.35}, {3.6118656*^9, - 5.39}, {3.619728*^9, 5.42}, {3.6275904*^9, 5.47}, { - 3.6354528*^9, 5.51}, {3.6433152*^9, 5.54}, {3.6511776*^9, - 5.57}, {3.65904*^9, 5.61}, {3.6669024*^9, 5.64}, { - 3.6747648*^9, 5.67}, {3.683232*^9, 5.7}, {3.6910944*^9, - 5.73}, {3.698352*^9, 5.75}, {3.7068192*^9, 5.77}, { - 3.7146816*^9, 5.78}, {3.722544*^9, 5.82}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"28 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 148-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.59}, {3.4122816*^9, 4.36}, { - 3.4147008*^9, 4.23}, {3.41712*^9, 4.06}, {3.420144*^9, - 3.88}, {3.4225632*^9, 3.74}, {3.4304256*^9, 3.49}, { - 3.438288*^9, 3.37}, {3.4461504*^9, 3.37}, {3.4540128*^9, - 3.49}, {3.4618752*^9, 3.65}, {3.4697376*^9, 3.82}, { - 3.4776*^9, 3.97}, {3.4854624*^9, 4.13}, {3.4933248*^9, - 4.26}, {3.5011872*^9, 4.37}, {3.5090496*^9, 4.45}, { - 3.516912*^9, 4.54}, {3.5253792*^9, 4.62}, {3.5332416*^9, - 4.7}, {3.541104*^9, 4.76}, {3.5489664*^9, 4.83}, { - 3.5568288*^9, 4.9}, {3.5646912*^9, 4.97}, {3.5725536*^9, - 5.03}, {3.580416*^9, 5.09}, {3.5882784*^9, 5.15}, { - 3.5961408*^9, 5.22}, {3.6040032*^9, 5.26}, {3.6118656*^9, - 5.31}, {3.619728*^9, 5.34}, {3.6275904*^9, 5.4}, { - 3.6354528*^9, 5.43}, {3.6433152*^9, 5.47}, {3.6511776*^9, - 5.5}, {3.65904*^9, 5.54}, {3.6669024*^9, 5.57}, { - 3.6747648*^9, 5.6}, {3.683232*^9, 5.63}, {3.6910944*^9, - 5.66}, {3.698352*^9, 5.68}, {3.7068192*^9, 5.7}, { - 3.7146816*^9, 5.72}, {3.722544*^9, 5.75}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"31 Dec 2007\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 149-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.54}, {3.4122816*^9, 4.27}, { - 3.4147008*^9, 4.1}, {3.41712*^9, 3.94}, {3.420144*^9, - 3.75}, {3.4225632*^9, 3.6}, {3.4304256*^9, 3.32}, { - 3.438288*^9, 3.2}, {3.4461504*^9, 3.19}, {3.4540128*^9, - 3.3}, {3.4618752*^9, 3.44}, {3.4697376*^9, 3.61}, { - 3.4776*^9, 3.78}, {3.4854624*^9, 3.95}, {3.4933248*^9, - 4.09}, {3.5011872*^9, 4.21}, {3.5090496*^9, 4.3}, { - 3.516912*^9, 4.39}, {3.5253792*^9, 4.47}, {3.5332416*^9, - 4.55}, {3.541104*^9, 4.62}, {3.5489664*^9, 4.69}, { - 3.5568288*^9, 4.76}, {3.5646912*^9, 4.84}, {3.5725536*^9, - 4.91}, {3.580416*^9, 4.98}, {3.5882784*^9, 5.04}, { - 3.5961408*^9, 5.11}, {3.6040032*^9, 5.16}, {3.6118656*^9, - 5.21}, {3.619728*^9, 5.26}, {3.6275904*^9, 5.32}, { - 3.6354528*^9, 5.36}, {3.6433152*^9, 5.4}, {3.6511776*^9, - 5.44}, {3.65904*^9, 5.49}, {3.6669024*^9, 5.52}, { - 3.6747648*^9, 5.56}, {3.683232*^9, 5.59}, {3.6910944*^9, - 5.63}, {3.698352*^9, 5.65}, {3.7068192*^9, 5.68}, { - 3.7146816*^9, 5.7}, {3.722544*^9, 5.74}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"02 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 150-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.52}, {3.4122816*^9, 4.24}, { - 3.4147008*^9, 4.09}, {3.41712*^9, 3.91}, {3.420144*^9, - 3.72}, {3.4225632*^9, 3.57}, {3.4304256*^9, 3.31}, { - 3.438288*^9, 3.18}, {3.4461504*^9, 3.17}, {3.4540128*^9, - 3.27}, {3.4618752*^9, 3.41}, {3.4697376*^9, 3.57}, { - 3.4776*^9, 3.73}, {3.4854624*^9, 3.91}, {3.4933248*^9, - 4.06}, {3.5011872*^9, 4.19}, {3.5090496*^9, 4.28}, { - 3.516912*^9, 4.38}, {3.5253792*^9, 4.46}, {3.5332416*^9, - 4.55}, {3.541104*^9, 4.62}, {3.5489664*^9, 4.7}, { - 3.5568288*^9, 4.78}, {3.5646912*^9, 4.86}, {3.5725536*^9, - 4.93}, {3.580416*^9, 5.01}, {3.5882784*^9, 5.08}, { - 3.5961408*^9, 5.15}, {3.6040032*^9, 5.21}, {3.6118656*^9, - 5.26}, {3.619728*^9, 5.31}, {3.6275904*^9, 5.38}, { - 3.6354528*^9, 5.42}, {3.6433152*^9, 5.47}, {3.6511776*^9, - 5.51}, {3.65904*^9, 5.56}, {3.6669024*^9, 5.6}, { - 3.6747648*^9, 5.64}, {3.683232*^9, 5.67}, {3.6910944*^9, - 5.71}, {3.698352*^9, 5.73}, {3.7068192*^9, 5.76}, { - 3.7146816*^9, 5.78}, {3.722544*^9, 5.82}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"03 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 151-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.46}, {3.4122816*^9, 4.16}, { - 3.4147008*^9, 3.97}, {3.41712*^9, 3.8}, {3.420144*^9, - 3.62}, {3.4225632*^9, 3.48}, {3.4304256*^9, 3.21}, { - 3.438288*^9, 3.08}, {3.4461504*^9, 3.06}, {3.4540128*^9, - 3.13}, {3.4618752*^9, 3.26}, {3.4697376*^9, 3.41}, { - 3.4776*^9, 3.58}, {3.4854624*^9, 3.76}, {3.4933248*^9, - 3.92}, {3.5011872*^9, 4.06}, {3.5090496*^9, 4.17}, { - 3.516912*^9, 4.27}, {3.5253792*^9, 4.37}, {3.5332416*^9, - 4.47}, {3.541104*^9, 4.55}, {3.5489664*^9, 4.64}, { - 3.5568288*^9, 4.72}, {3.5646912*^9, 4.82}, {3.5725536*^9, - 4.89}, {3.580416*^9, 4.97}, {3.5882784*^9, 5.04}, { - 3.5961408*^9, 5.12}, {3.6040032*^9, 5.18}, {3.6118656*^9, - 5.24}, {3.619728*^9, 5.29}, {3.6275904*^9, 5.35}, { - 3.6354528*^9, 5.4}, {3.6433152*^9, 5.44}, {3.6511776*^9, - 5.48}, {3.65904*^9, 5.54}, {3.6669024*^9, 5.58}, { - 3.6747648*^9, 5.62}, {3.683232*^9, 5.65}, {3.6910944*^9, - 5.69}, {3.698352*^9, 5.72}, {3.7068192*^9, 5.74}, { - 3.7146816*^9, 5.77}, {3.722544*^9, 5.81}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"04 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 152-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.43}, {3.4122816*^9, 4.1}, { - 3.4147008*^9, 3.94}, {3.41712*^9, 3.78}, {3.420144*^9, - 3.61}, {3.4225632*^9, 3.48}, {3.4304256*^9, 3.23}, { - 3.438288*^9, 3.11}, {3.4461504*^9, 3.09}, {3.4540128*^9, - 3.16}, {3.4618752*^9, 3.27}, {3.4697376*^9, 3.41}, { - 3.4776*^9, 3.56}, {3.4854624*^9, 3.74}, {3.4933248*^9, - 3.89}, {3.5011872*^9, 4.03}, {3.5090496*^9, 4.13}, { - 3.516912*^9, 4.24}, {3.5253792*^9, 4.34}, {3.5332416*^9, - 4.44}, {3.541104*^9, 4.52}, {3.5489664*^9, 4.61}, { - 3.5568288*^9, 4.69}, {3.5646912*^9, 4.79}, {3.5725536*^9, - 4.86}, {3.580416*^9, 4.94}, {3.5882784*^9, 5.01}, { - 3.5961408*^9, 5.09}, {3.6040032*^9, 5.15}, {3.6118656*^9, - 5.21}, {3.619728*^9, 5.26}, {3.6275904*^9, 5.32}, { - 3.6354528*^9, 5.37}, {3.6433152*^9, 5.41}, {3.6511776*^9, - 5.45}, {3.65904*^9, 5.51}, {3.6669024*^9, 5.55}, { - 3.6747648*^9, 5.58}, {3.683232*^9, 5.61}, {3.6910944*^9, - 5.66}, {3.698352*^9, 5.68}, {3.7068192*^9, 5.7}, { - 3.7146816*^9, 5.73}, {3.722544*^9, 5.77}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"07 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 153-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.4}, {3.4122816*^9, 4.09}, { - 3.4147008*^9, 3.92}, {3.41712*^9, 3.77}, {3.420144*^9, - 3.59}, {3.4225632*^9, 3.46}, {3.4304256*^9, 3.22}, { - 3.438288*^9, 3.11}, {3.4461504*^9, 3.1}, {3.4540128*^9, - 3.17}, {3.4618752*^9, 3.28}, {3.4697376*^9, 3.41}, { - 3.4776*^9, 3.55}, {3.4854624*^9, 3.72}, {3.4933248*^9, - 3.87}, {3.5011872*^9, 4.}, {3.5090496*^9, 4.11}, { - 3.516912*^9, 4.22}, {3.5253792*^9, 4.32}, {3.5332416*^9, - 4.42}, {3.541104*^9, 4.5}, {3.5489664*^9, 4.59}, { - 3.5568288*^9, 4.67}, {3.5646912*^9, 4.77}, {3.5725536*^9, - 4.84}, {3.580416*^9, 4.92}, {3.5882784*^9, 4.99}, { - 3.5961408*^9, 5.07}, {3.6040032*^9, 5.13}, {3.6118656*^9, - 5.19}, {3.619728*^9, 5.24}, {3.6275904*^9, 5.31}, { - 3.6354528*^9, 5.35}, {3.6433152*^9, 5.4}, {3.6511776*^9, - 5.44}, {3.65904*^9, 5.49}, {3.6669024*^9, 5.53}, { - 3.6747648*^9, 5.57}, {3.683232*^9, 5.6}, {3.6910944*^9, - 5.65}, {3.698352*^9, 5.67}, {3.7068192*^9, 5.69}, { - 3.7146816*^9, 5.72}, {3.722544*^9, 5.76}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"08 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 154-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.33}, {3.4122816*^9, 4.02}, { - 3.4147008*^9, 3.83}, {3.41712*^9, 3.67}, {3.420144*^9, - 3.49}, {3.4225632*^9, 3.37}, {3.4304256*^9, 3.15}, { - 3.438288*^9, 3.06}, {3.4461504*^9, 3.06}, {3.4540128*^9, - 3.13}, {3.4618752*^9, 3.24}, {3.4697376*^9, 3.37}, { - 3.4776*^9, 3.5}, {3.4854624*^9, 3.67}, {3.4933248*^9, - 3.81}, {3.5011872*^9, 3.95}, {3.5090496*^9, 4.06}, { - 3.516912*^9, 4.17}, {3.5253792*^9, 4.27}, {3.5332416*^9, - 4.37}, {3.541104*^9, 4.45}, {3.5489664*^9, 4.54}, { - 3.5568288*^9, 4.63}, {3.5646912*^9, 4.73}, {3.5725536*^9, - 4.8}, {3.580416*^9, 4.88}, {3.5882784*^9, 4.95}, { - 3.5961408*^9, 5.04}, {3.6040032*^9, 5.1}, {3.6118656*^9, - 5.16}, {3.619728*^9, 5.21}, {3.6275904*^9, 5.28}, { - 3.6354528*^9, 5.33}, {3.6433152*^9, 5.37}, {3.6511776*^9, - 5.42}, {3.65904*^9, 5.47}, {3.6669024*^9, 5.51}, { - 3.6747648*^9, 5.55}, {3.683232*^9, 5.59}, {3.6910944*^9, - 5.63}, {3.698352*^9, 5.66}, {3.7068192*^9, 5.68}, { - 3.7146816*^9, 5.7}, {3.722544*^9, 5.74}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"09 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 155-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.29}, {3.4122816*^9, 3.96}, { - 3.4147008*^9, 3.76}, {3.41712*^9, 3.6}, {3.420144*^9, - 3.43}, {3.4225632*^9, 3.31}, {3.4304256*^9, 3.12}, { - 3.438288*^9, 3.06}, {3.4461504*^9, 3.08}, {3.4540128*^9, - 3.17}, {3.4618752*^9, 3.29}, {3.4697376*^9, 3.42}, { - 3.4776*^9, 3.56}, {3.4854624*^9, 3.73}, {3.4933248*^9, - 3.88}, {3.5011872*^9, 4.02}, {3.5090496*^9, 4.13}, { - 3.516912*^9, 4.25}, {3.5253792*^9, 4.35}, {3.5332416*^9, - 4.46}, {3.541104*^9, 4.55}, {3.5489664*^9, 4.64}, { - 3.5568288*^9, 4.74}, {3.5646912*^9, 4.84}, {3.5725536*^9, - 4.91}, {3.580416*^9, 5.}, {3.5882784*^9, 5.07}, { - 3.5961408*^9, 5.16}, {3.6040032*^9, 5.22}, {3.6118656*^9, - 5.29}, {3.619728*^9, 5.35}, {3.6275904*^9, 5.42}, { - 3.6354528*^9, 5.47}, {3.6433152*^9, 5.52}, {3.6511776*^9, - 5.56}, {3.65904*^9, 5.62}, {3.6669024*^9, 5.67}, { - 3.6747648*^9, 5.71}, {3.683232*^9, 5.74}, {3.6910944*^9, - 5.79}, {3.698352*^9, 5.82}, {3.7068192*^9, 5.84}, { - 3.7146816*^9, 5.86}, {3.722544*^9, 5.9}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"10 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 156-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.16}, {3.4122816*^9, 3.78}, { - 3.4147008*^9, 3.57}, {3.41712*^9, 3.42}, {3.420144*^9, - 3.26}, {3.4225632*^9, 3.14}, {3.4304256*^9, 2.95}, { - 3.438288*^9, 2.9}, {3.4461504*^9, 2.92}, {3.4540128*^9, - 3.02}, {3.4618752*^9, 3.15}, {3.4697376*^9, 3.3}, { - 3.4776*^9, 3.46}, {3.4854624*^9, 3.63}, {3.4933248*^9, - 3.79}, {3.5011872*^9, 3.92}, {3.5090496*^9, 4.04}, { - 3.516912*^9, 4.16}, {3.5253792*^9, 4.27}, {3.5332416*^9, - 4.38}, {3.541104*^9, 4.47}, {3.5489664*^9, 4.56}, { - 3.5568288*^9, 4.66}, {3.5646912*^9, 4.77}, {3.5725536*^9, - 4.85}, {3.580416*^9, 4.94}, {3.5882784*^9, 5.02}, { - 3.5961408*^9, 5.11}, {3.6040032*^9, 5.18}, {3.6118656*^9, - 5.24}, {3.619728*^9, 5.31}, {3.6275904*^9, 5.39}, { - 3.6354528*^9, 5.44}, {3.6433152*^9, 5.48}, {3.6511776*^9, - 5.53}, {3.65904*^9, 5.59}, {3.6669024*^9, 5.64}, { - 3.6747648*^9, 5.68}, {3.683232*^9, 5.71}, {3.6910944*^9, - 5.76}, {3.698352*^9, 5.79}, {3.7068192*^9, 5.81}, { - 3.7146816*^9, 5.83}, {3.722544*^9, 5.87}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"11 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 157-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4122816*^9, 3.69}, {3.4147008*^9, 3.53}, { - 3.41712*^9, 3.37}, {3.420144*^9, 3.2}, {3.4225632*^9, - 3.08}, {3.4304256*^9, 2.91}, {3.438288*^9, 2.86}, { - 3.4461504*^9, 2.89}, {3.4540128*^9, 3.}, {3.4618752*^9, - 3.15}, {3.4697376*^9, 3.3}, {3.4776*^9, 3.46}, { - 3.4854624*^9, 3.63}, {3.4933248*^9, 3.79}, {3.5011872*^9, - 3.92}, {3.5090496*^9, 4.03}, {3.516912*^9, 4.15}, { - 3.5253792*^9, 4.26}, {3.5332416*^9, 4.37}, {3.541104*^9, - 4.46}, {3.5489664*^9, 4.55}, {3.5568288*^9, 4.65}, { - 3.5646912*^9, 4.75}, {3.5725536*^9, 4.83}, {3.580416*^9, - 4.92}, {3.5882784*^9, 5.}, {3.5961408*^9, 5.1}, { - 3.6040032*^9, 5.16}, {3.6118656*^9, 5.23}, {3.619728*^9, - 5.29}, {3.6275904*^9, 5.37}, {3.6354528*^9, 5.42}, { - 3.6433152*^9, 5.47}, {3.6511776*^9, 5.51}, {3.65904*^9, - 5.57}, {3.6669024*^9, 5.62}, {3.6747648*^9, 5.66}, { - 3.683232*^9, 5.69}, {3.6910944*^9, 5.74}, {3.698352*^9, - 5.77}, {3.7068192*^9, 5.79}, {3.7146816*^9, 5.81}, { - 3.722544*^9, 5.85}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"14 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 158-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4122816*^9, 3.73}, {3.4147008*^9, 3.57}, { - 3.41712*^9, 3.41}, {3.420144*^9, 3.2}, {3.4225632*^9, - 3.08}, {3.4304256*^9, 2.89}, {3.438288*^9, 2.82}, { - 3.4461504*^9, 2.83}, {3.4540128*^9, 2.92}, {3.4618752*^9, - 3.05}, {3.4697376*^9, 3.21}, {3.4776*^9, 3.35}, { - 3.4854624*^9, 3.52}, {3.4933248*^9, 3.67}, {3.5011872*^9, - 3.8}, {3.5090496*^9, 3.91}, {3.516912*^9, 4.03}, { - 3.5253792*^9, 4.14}, {3.5332416*^9, 4.25}, {3.541104*^9, - 4.34}, {3.5489664*^9, 4.43}, {3.5568288*^9, 4.53}, { - 3.5646912*^9, 4.63}, {3.5725536*^9, 4.71}, {3.580416*^9, - 4.8}, {3.5882784*^9, 4.88}, {3.5961408*^9, 4.98}, { - 3.6040032*^9, 5.04}, {3.6118656*^9, 5.11}, {3.619728*^9, - 5.17}, {3.6275904*^9, 5.25}, {3.6354528*^9, 5.3}, { - 3.6433152*^9, 5.35}, {3.6511776*^9, 5.39}, {3.65904*^9, - 5.45}, {3.6669024*^9, 5.5}, {3.6747648*^9, 5.54}, { - 3.683232*^9, 5.57}, {3.6910944*^9, 5.62}, {3.698352*^9, - 5.65}, {3.7068192*^9, 5.67}, {3.7146816*^9, 5.7}, { - 3.722544*^9, 5.74}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"15 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 159-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4122816*^9, 3.72}, {3.4147008*^9, 3.58}, { - 3.41712*^9, 3.43}, {3.420144*^9, 3.23}, {3.4225632*^9, - 3.09}, {3.4304256*^9, 2.89}, {3.438288*^9, 2.82}, { - 3.4461504*^9, 2.81}, {3.4540128*^9, 2.89}, {3.4618752*^9, - 3.02}, {3.4697376*^9, 3.17}, {3.4776*^9, 3.33}, { - 3.4854624*^9, 3.51}, {3.4933248*^9, 3.67}, {3.5011872*^9, - 3.82}, {3.5090496*^9, 3.94}, {3.516912*^9, 4.07}, { - 3.5253792*^9, 4.19}, {3.5332416*^9, 4.31}, {3.541104*^9, - 4.41}, {3.5489664*^9, 4.51}, {3.5568288*^9, 4.61}, { - 3.5646912*^9, 4.72}, {3.5725536*^9, 4.8}, {3.580416*^9, - 4.89}, {3.5882784*^9, 4.97}, {3.5961408*^9, 5.06}, { - 3.6040032*^9, 5.13}, {3.6118656*^9, 5.19}, {3.619728*^9, - 5.26}, {3.6275904*^9, 5.33}, {3.6354528*^9, 5.38}, { - 3.6433152*^9, 5.43}, {3.6511776*^9, 5.47}, {3.65904*^9, - 5.53}, {3.6669024*^9, 5.58}, {3.6747648*^9, 5.62}, { - 3.683232*^9, 5.65}, {3.6910944*^9, 5.7}, {3.698352*^9, - 5.73}, {3.7068192*^9, 5.75}, {3.7146816*^9, 5.78}, { - 3.722544*^9, 5.81}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"16 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 160-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4122816*^9, 3.71}, {3.4147008*^9, 3.55}, { - 3.41712*^9, 3.37}, {3.420144*^9, 3.15}, {3.4225632*^9, - 3.}, {3.4304256*^9, 2.79}, {3.438288*^9, 2.72}, { - 3.4461504*^9, 2.72}, {3.4540128*^9, 2.81}, {3.4618752*^9, - 2.95}, {3.4697376*^9, 3.11}, {3.4776*^9, 3.26}, { - 3.4854624*^9, 3.44}, {3.4933248*^9, 3.6}, {3.5011872*^9, - 3.74}, {3.5090496*^9, 3.86}, {3.516912*^9, 3.99}, { - 3.5253792*^9, 4.11}, {3.5332416*^9, 4.23}, {3.541104*^9, - 4.32}, {3.5489664*^9, 4.42}, {3.5568288*^9, 4.52}, { - 3.5646912*^9, 4.62}, {3.5725536*^9, 4.7}, {3.580416*^9, - 4.79}, {3.5882784*^9, 4.87}, {3.5961408*^9, 4.97}, { - 3.6040032*^9, 5.03}, {3.6118656*^9, 5.1}, {3.619728*^9, - 5.16}, {3.6275904*^9, 5.24}, {3.6354528*^9, 5.29}, { - 3.6433152*^9, 5.33}, {3.6511776*^9, 5.38}, {3.65904*^9, - 5.44}, {3.6669024*^9, 5.48}, {3.6747648*^9, 5.52}, { - 3.683232*^9, 5.55}, {3.6910944*^9, 5.6}, {3.698352*^9, - 5.63}, {3.7068192*^9, 5.65}, {3.7146816*^9, 5.68}, { - 3.722544*^9, 5.71}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"17 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None], 161-> - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4122816*^9, 3.66}, {3.4147008*^9, 3.49}, { - 3.41712*^9, 3.28}, {3.420144*^9, 3.07}, {3.4225632*^9, - 2.92}, {3.4304256*^9, 2.71}, {3.438288*^9, 2.66}, { - 3.4461504*^9, 2.68}, {3.4540128*^9, 2.77}, {3.4618752*^9, - 2.91}, {3.4697376*^9, 3.06}, {3.4776*^9, 3.22}, { - 3.4854624*^9, 3.4}, {3.4933248*^9, 3.57}, {3.5011872*^9, - 3.72}, {3.5090496*^9, 3.85}, {3.516912*^9, 3.99}, { - 3.5253792*^9, 4.11}, {3.5332416*^9, 4.24}, {3.541104*^9, - 4.34}, {3.5489664*^9, 4.44}, {3.5568288*^9, 4.55}, { - 3.5646912*^9, 4.66}, {3.5725536*^9, 4.74}, {3.580416*^9, - 4.83}, {3.5882784*^9, 4.92}, {3.5961408*^9, 5.01}, { - 3.6040032*^9, 5.08}, {3.6118656*^9, 5.15}, {3.619728*^9, - 5.21}, {3.6275904*^9, 5.29}, {3.6354528*^9, 5.34}, { - 3.6433152*^9, 5.39}, {3.6511776*^9, 5.44}, {3.65904*^9, - 5.5}, {3.6669024*^9, 5.54}, {3.6747648*^9, 5.58}, { - 3.683232*^9, 5.61}, {3.6910944*^9, 5.66}, {3.698352*^9, - 5.69}, {3.7068192*^9, 5.71}, {3.7146816*^9, 5.74}, { - 3.722544*^9, 5.77}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3386966400, 3.}, {3.3869664*^9, 3.}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox[ - StyleBox[ - "\"18 Jan 2008\"", FontFamily -> "Courier", Bold, Italic, - StripOnInput -> False], TraditionalForm], - - PlotRange-> - NCache[{{3386966400, 3728851200}, {2.5, 6.5}}, {{ - 3.3869664*^9, 3.7288512*^9}, {2.5, 6.5}}], - PlotRangeClipping->True, - PlotRangePadding->{Automatic, Automatic}, - Ticks->None]}, Dynamic[$CellContext`i3$$], - Alignment->Automatic, - ImageSize->All], - Identity, - Editable->True, - Selectable->True]], - ScriptLevel->0, - Background->GrayLevel[1]], - ImageMargins->10], - Deployed->False, - StripOnInput->False, - GraphicsBoxOptions->{PreserveImageOptions->True}, - Graphics3DBoxOptions->{PreserveImageOptions->True}], - Identity, - Editable->False, - Selectable->False], - Alignment->{Left, Center}, - Background->GrayLevel[1], - Frame->1, - FrameStyle->GrayLevel[0, 0.2], - StripOnInput->False]} - }, - ColumnsEqual->False, - GridBoxAlignment->{ - "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Top}}, - "RowsIndexed" -> {}}, - GridBoxDividers->{ - "Columns" -> {{False}}, "ColumnsIndexed" -> {}, "Rows" -> {{False}}, - "RowsIndexed" -> {}}, - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.7], { - Offset[0.5599999999999999]}, - Offset[0.7]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.4], { - Offset[0.8]}, - Offset[0.4]}, "RowsIndexed" -> {}}, - RowsEqual->False], - "Grid"], If[ - CurrentValue["SelectionOver"], - Manipulate`Dump`ReadControllerState[ - Map[Manipulate`Dump`updateOneVar[#, - CurrentValue["PreviousFormatTime"], - CurrentValue["CurrentFormatTime"]]& , { - - Manipulate`Dump`controllerLink[{$CellContext`i3$$, \ -$CellContext`i3$19001$$}, "X1", - If["DefaultAbsolute", True, "JB1"], False, {1, 161, 1}, 161, - 1.]}], - CurrentValue[{ - "ControllerData", { - "Gamepad", "Joystick", "Multi-Axis Controller"}}], {}]], - ImageSizeCache->{480., {183.5, 190.5}}], - DefaultBaseStyle->{}, - FrameMargins->{{5, 5}, {5, 5}}], - BaselinePosition->Automatic, - ImageMargins->0], - Deinitialization:>None, - DynamicModuleValues:>{}, - SynchronousInitialization->True, - UnsavedVariables:>{Typeset`initDone$$}, - UntrackedVariables:>{Typeset`size$$}], "Manipulate", - Deployed->True, - StripOnInput->False], - Manipulate`InterpretManipulate[1]]], "Output", - CellChangeTimes->{{3.4112375431875*^9, 3.411237549640625*^9}, { - 3.41123764946875*^9, 3.411237653484375*^9}, {3.41123778334375*^9, - 3.4112377916875*^9}, {3.4112378274375*^9, 3.411237832*^9}, { - 3.41123791025*^9, 3.411237918171875*^9}, {3.4112379524375*^9, - 3.411237967015625*^9}, {3.411238021328125*^9, 3.411238083609375*^9}, { - 3.41123990209375*^9, 3.41123993071875*^9}, {3.411249538609375*^9, - 3.411249546359375*^9}, 3.41124962440625*^9, 3.41124965965625*^9, { - 3.41124971146875*^9, 3.41124972628125*^9}, {3.411250103375*^9, - 3.411250127859375*^9}, {3.41125018640625*^9, 3.411250187453125*^9}, { - 3.411250388296875*^9, 3.4112504060625*^9}, {3.411252900203125*^9, - 3.4112529018125*^9}, 3.4112814265625*^9, 3.411281469375*^9, { - 3.4112815370625*^9, 3.411281561953125*^9}, {3.411286607875*^9, - 3.4112866103125*^9}, {3.4112886257385283`*^9, 3.4112886454756355`*^9}, - 3.4113650891875*^9, {3.411365125484375*^9, 3.411365128515625*^9}, { - 3.4114806050833063`*^9, 3.411480606330186*^9}, {3.4114817432821283`*^9, - 3.411481750841338*^9}}] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Export database", "Section", - CellChangeTimes->{{3.41148166164266*^9, 3.411481664697516*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ExportFuturesRates", "[", - RowBox[{ - RowBox[{"ToFileName", "[", - RowBox[{ - RowBox[{"{", "$CMEEuroDollarDataDirectory", "}"}], ",", - "\"\<eurodollardata.mef\>\""}], "]"}], ",", "tempdata1"}], - "]"}]], "Input", - CellChangeTimes->{{3.4114816668795557`*^9, 3.411481711377586*^9}, { - 3.4114817615956783`*^9, 3.411481767845664*^9}, {3.411483782375658*^9, - 3.411483797811351*^9}}], - -Cell[BoxData["\<\"O:\\\\cme_pdfs\\\\eurodollardata.mef\"\>"], "Output", - CellChangeTimes->{3.411481714525958*^9, 3.4114837999538937`*^9, - 3.4114840926223154`*^9}] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Download PDFs from CME website", "Section", - CellChangeTimes->{{3.410366690859375*^9, 3.41036669496875*^9}, { - 3.4114817861124563`*^9, 3.411481794793858*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"MostRecentDay", "[", "cmedata", "]"}]], "Input", - CellChangeTimes->{{3.411165939890625*^9, 3.41116594234375*^9}, { - 3.4112153423672066`*^9, 3.411215343723189*^9}}], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"Most Recent Day:\"\>", " ", "\<\"25 Jan 2008\"\>", - " ", "\<\"Day\"\>", " ", "17"}], - Row[{"Most Recent Day:", "25 Jan 2008", "Day", 17}, " "]]], "Output", - CellChangeTimes->{ - 3.411165942765625*^9, 3.411166199328125*^9, 3.411214482440829*^9, - 3.411215273336813*^9, 3.4112153441907687`*^9, 3.4112210113672037`*^9, - 3.411235727890625*^9, {3.411365089046875*^9, 3.411365117765625*^9}, - 3.411371735578125*^9, 3.4114806292416058`*^9, 3.411480989761372*^9, - 3.411481731592628*^9, 3.4114818451366377`*^9, 3.411483825539298*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DateToCMEDay", "[", "]"}]], "Input", - CellChangeTimes->{{3.411481821617364*^9, 3.411481826043788*^9}}], - -Cell[BoxData["27"], "Output", - CellChangeTimes->{3.411481826168476*^9, 3.4114838271344757`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"days2008", "=", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{ - RowBox[{"cmedata", "[", - RowBox[{"[", - RowBox[{ - RowBox[{"-", "1"}], ",", "2"}], "]"}], "]"}], "+", "1"}], ",", - RowBox[{ - RowBox[{"DateToCMEDay", "[", "]"}], "-", "1"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.41036811121875*^9, 3.410368145046875*^9}, { - 3.4103682569375*^9, 3.410368261453125*^9}, {3.411481853475148*^9, - 3.411481896476922*^9}, {3.4114820337895823`*^9, 3.4114820341792316`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "18", ",", "19", ",", "20", ",", "21", ",", "22", ",", "23", ",", "24", ",", - "25", ",", "26"}], "}"}]], "Output", - CellChangeTimes->{ - 3.41036856228125*^9, {3.41148186215655*^9, 3.411481897053604*^9}, - 3.411482034397436*^9, 3.41148382879221*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"temp", "=", - RowBox[{"Monitor", "[", - RowBox[{ - RowBox[{"Table", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"url", "=", - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"52", ",", - RowBox[{"{", - RowBox[{"2008", ",", "day"}], "}"}]}], "]"}]}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"Export", "[", - RowBox[{ - RowBox[{ - RowBox[{"StringSplit", "[", - RowBox[{"url", ",", "\"\</\>\""}], "]"}], "[", - RowBox[{"[", - RowBox[{"-", "1"}], "]"}], "]"}], ",", - RowBox[{"Import", "[", - RowBox[{"url", ",", "\"\<Binary\>\""}], "]"}], ",", - "\"\<Binary\>\""}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"day", ",", "days2008"}], "}"}]}], "]"}], ",", "day"}], - "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.410366723515625*^9, 3.4103667253125*^9}, { - 3.4103669039375*^9, 3.410366929109375*^9}, {3.410367131640625*^9, - 3.410367132515625*^9}, {3.410367192796875*^9, 3.410367193640625*^9}, { - 3.410367246546875*^9, 3.410367334734375*^9}, {3.410367364828125*^9, - 3.410367406828125*^9}, {3.41036743975*^9, 3.4103674706875*^9}, { - 3.410367583859375*^9, 3.4103676405*^9}, {3.410367672875*^9, - 3.410367679046875*^9}, {3.41036815334375*^9, 3.4103681778125*^9}, { - 3.41036855815625*^9, 3.410368568328125*^9}, {3.410368949015625*^9, - 3.410368952703125*^9}, {3.410369223484375*^9, 3.41036922371875*^9}, { - 3.4114819198715076`*^9, 3.4114819281320877`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"FetchURL", "::", "\<\"conopen\"\>"}], ":", - " ", "\<\"The connection to URL \ -\\!\\(\\\"http://www.cmegroup.com/daily_bulletin/Section52_Euro_Dollar_Put_\ -Options_2007253.pdf\\\"\\) cannot be opened. If the URL is correct, you might \ -need to configure your firewall program, or you might need to set a proxy in \ -the Internet Connectivity tab of the Preferences dialog (or by calling \ -SetInternetProxy).\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4103691716875*^9, 3.41036952459375*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"BinaryWrite", "::", "\<\"nocoerce\"\>"}], ":", - " ", "\<\"\\!\\($Failed\\) cannot be coerced to the specified format. \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ -ButtonFrame->None, ButtonData:>\\\"paclet:ref/BinaryWrite\\\", ButtonNote -> \ -\\\"BinaryWrite::nocoerce\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4103691716875*^9, 3.410369524625*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"WritePDFToDirectory", "[", - RowBox[{"section_", ",", - RowBox[{"{", - RowBox[{"year_", ",", "day_"}], "}"}]}], "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"url", "=", - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"9", ",", - RowBox[{"{", - RowBox[{"year", ",", "day"}], "}"}]}], "]"}]}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"Export", "[", - RowBox[{ - RowBox[{"ToFileName", "[", - RowBox[{ - RowBox[{"{", "$CMEEuroDollarSection09Directory", "}"}], ",", - RowBox[{ - RowBox[{"StringSplit", "[", - RowBox[{"url", ",", "\"\</\>\""}], "]"}], "[", - RowBox[{"[", - RowBox[{"-", "1"}], "]"}], "]"}]}], "]"}], ",", - RowBox[{"Import", "[", - RowBox[{"url", ",", "\"\<Binary\>\""}], "]"}], ",", "\"\<Binary\>\""}], - "]"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.411482053490286*^9, 3.411482152648418*^9}, { - 3.411482198330984*^9, 3.411482205578474*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"WritePDFToDirectory", "[", - RowBox[{"9", ",", - RowBox[{"{", - RowBox[{"2008", ",", "day"}], "}"}]}], "]"}], ",", - RowBox[{"{", - RowBox[{"day", ",", "days2008"}], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.411482134256938*^9, 3.4114821556253443`*^9}, { - 3.4114835487431593`*^9, 3.4114835494015684`*^9}, {3.4114839526676426`*^9, - 3.4114839684735155`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008018.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008019.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008020.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008021.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008022.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008023.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008024.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008025.pdf\"\>", - ",", "\<\"O:\\\\cme_pdfs\\\\Section09\\\\Section09_Interest_Rate_And_\ -Energy_Futures_2008026.pdf\"\>"}], "}"}]], "Output", - CellChangeTimes->{3.411482156685192*^9, 3.411482231420062*^9, - 3.411483550138359*^9, 3.4114839742424245`*^9}] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Find PDFs not in database", "Section", - CellChangeTimes->{{3.411482302289604*^9, 3.411482308742208*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"CMEPDFFileName", "[", - RowBox[{"section_", ",", - RowBox[{"{", - RowBox[{"year_", ",", "day_"}], "}"}]}], "]"}], ":=", - RowBox[{ - RowBox[{"StringSplit", "[", - RowBox[{ - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"9", ",", - RowBox[{"{", - RowBox[{"year", ",", "day"}], "}"}]}], "]"}], ",", "\"\</\>\""}], - "]"}], "[", - RowBox[{"[", - RowBox[{"-", "1"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.4114826862039557`*^9, 3.411482792422546*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Complement", "[", - RowBox[{ - RowBox[{"CMEEurodollarSection09PDFs", "[", "]"}], ",", " ", - RowBox[{"Union", "[", - RowBox[{"dateDay", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"{", - RowBox[{"1", ",", - RowBox[{"-", "1"}]}], "}"}]}], "]"}], "]"}], "]"}]}], "]"}]], "Input",\ - - CellChangeTimes->{{3.41148234165984*^9, 3.4114823644154*^9}, { - 3.41148253001665*^9, 3.411482546600154*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "16"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "18"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "20"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "21"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "22"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "23"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "24"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "25"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "26"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{ - 3.411482321803276*^9, {3.4114825328065443`*^9, 3.41148254700539*^9}, - 3.4114839816059914`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"CMEPDFFileName", "[", - RowBox[{"9", ",", "#"}], "]"}], "&"}], "/@", "%"}]], "Input", - CellChangeTimes->{{3.4114827702748404`*^9, 3.41148278282157*^9}, { - 3.4114839850454493`*^9, 3.4114839853268595`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"\<\"Section09_Interest_Rate_And_Energy_Futures_2008016.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008018.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008019.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008020.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008021.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008022.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008023.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008024.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008025.pdf\"\>", - ",", "\<\"Section09_Interest_Rate_And_Energy_Futures_2008026.pdf\"\>"}], - "}"}]], "Output", - CellChangeTimes->{{3.411482776758616*^9, 3.411482794963064*^9}, - 3.411483201548436*^9, 3.4114839859365816`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"Section09DataForDataBase", "[", - RowBox[{"ToFileName", "[", - RowBox[{ - RowBox[{"{", "$CMEEuroDollarSection09Directory", "}"}], ",", "#"}], - "]"}], "]"}], "&"}], "/@", "%"}], ",", "1"}], "]"}]], "Input", - CellChangeTimes->{{3.411483181822936*^9, 3.4114831847738714`*^9}, { - 3.411483302148486*^9, 3.411483332462635*^9}, {3.4114837135178003`*^9, - 3.4114837170136375`*^9}, {3.411483991893098*^9, 3.411483999850753*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Import", "::", "\<\"general\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\(\\\"Expected PDF object\\\"\\) \\!\\(\\*ButtonBox[\\\ -\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/Import\\\", ButtonNote -> \\\"Import::general\\\"]\ -\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Import", "::", "\<\"general\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\(\\\"Exepcted array operator argument\\\"\\) \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ -ButtonFrame->None, ButtonData:>\\\"paclet:ref/Import\\\", ButtonNote -> \ -\\\"Import::general\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Import", "::", "\<\"general\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\(\\\"Could not draw page 1 stream 7\\\"\\) \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ -ButtonFrame->None, ButtonData:>\\\"paclet:ref/Import\\\", ButtonNote -> \ -\\\"Import::general\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"General", "::", "\<\"stop\"\>"}], - RowBox[{ - ":", " "}], "\<\"Further output of \\!\\(Import :: \\\"general\\\"\\) will \ -be suppressed during this calculation. \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ -ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/stop\\\", \ -ButtonNote -> \\\"General::stop\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Part", "::", "\<\"partw\"\>"}], - RowBox[{ - ":", " "}], "\<\"Part \\!\\(2\\) of \\!\\(ExtractDataFromCMEString[$Failed]\ -\\) does not exist. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \ -\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Part", "::", "\<\"partd\"\>"}], - RowBox[{ - ":", " "}], "\<\"Part specification \ -\\!\\(\\(\\(ExtractDataFromCMEString[$Failed]\\)\\) \[LeftDoubleBracket] \ -\\(\\(1, \\(\\({3, 2}\\)\\)\\)\\) \[RightDoubleBracket]\\) is longer than \ -depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\ -\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \ -\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Join", "::", "\<\"heads\"\>"}], - RowBox[{ - ":", " "}], "\<\"Heads \\!\\(Part\\) and \\!\\(ExtractDataFromCMEString\\) \ -at positions \\!\\(1\\) and \\!\\(2\\) are expected to be the same. \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ -ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/heads\\\", \ -ButtonNote -> \\\"Join::heads\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Join", "::", "\<\"headsd\"\>"}], - RowBox[{ - ":", " "}], "\<\"Expression \ -\\!\\(\\(\\(ExtractDataFromCMEString[$Failed]\\)\\) \[LeftDoubleBracket] \ -\\(\\(1, \\(\\({3, 2}\\)\\)\\)\\) \[RightDoubleBracket]\\) at position \ -\\!\\(1\\) is expected to have head \\!\\(Part\\) for all subexpressions \ -through level \\!\\(2\\). \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, ButtonData:>\\\"paclet:ref/Join\ -\\\", ButtonNote -> \\\"Join::headsd\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Part", "::", "\<\"pspec\"\>"}], - RowBox[{ - ":", " "}], "\<\"Part specification \ -\\!\\(Join[\\(\\(\\(\\(\\(\\(ExtractDataFromCMEString[$Failed]\\)\\) \ -\[LeftDoubleBracket] \\(\\(1, \\(\\({3, 2}\\)\\)\\)\\) \ -\[RightDoubleBracket]\\)\\), 2\\)\\)]\\) is neither an integer nor a list of \ -integers. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/message/General/pspec\\\", ButtonNote -> \ -\\\"Part::pspec\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840006949835`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"LinkObject", "::", "\<\"linkd\"\>"}], - RowBox[{ - ":", " "}], "\<\"Unable to communicate with closed link \ -\\!\\(LinkObject[\\(\\(\\(\\(\\\"\\\\\\\"C:\\\\\\\\Program \ -Files\\\\\\\\Wolfram Research\\\\\\\\Mat\\\" \[Ellipsis] \ -\\\"es\\\\\\\\Converters\\\\\\\\Binaries\\\\\\\\Windows\\\\\\\\PDF.exe\\\\\\\"\ -\\\"\\)\\), 19, 7\\)\\)]\\). \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/message/LinkObject/linkd\\\", ButtonNote -> \ -\\\"LinkObject::linkd\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.411484015406483*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Part", "::", "\<\"partw\"\>"}], - RowBox[{ - ":", " "}], "\<\"Part \\!\\(2\\) of \\!\\(ExtractDataFromCMEString[$Failed]\ -\\) does not exist. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/message/General/partw\\\", ButtonNote -> \ -\\\"Part::partw\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.411484015453385*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Part", "::", "\<\"partd\"\>"}], - RowBox[{ - ":", " "}], "\<\"Part specification \ -\\!\\(\\(\\(ExtractDataFromCMEString[$Failed]\\)\\) \[LeftDoubleBracket] \ -\\(\\(1, \\(\\({3, 2}\\)\\)\\)\\) \[RightDoubleBracket]\\) is longer than \ -depth of object. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\ -\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/message/General/partd\\\", ButtonNote -> \ -\\\"Part::partd\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840154846525`*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Join", "::", "\<\"heads\"\>"}], - RowBox[{ - ":", " "}], "\<\"Heads \\!\\(Part\\) and \\!\\(ExtractDataFromCMEString\\) \ -at positions \\!\\(1\\) and \\!\\(2\\) are expected to be the same. \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ -ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/heads\\\", \ -ButtonNote -> \\\"Join::heads\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.411484015531554*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Join", "::", "\<\"headsd\"\>"}], - RowBox[{ - ":", " "}], "\<\"Expression \ -\\!\\(\\(\\(ExtractDataFromCMEString[$Failed]\\)\\) \[LeftDoubleBracket] \ -\\(\\(1, \\(\\({3, 2}\\)\\)\\)\\) \[RightDoubleBracket]\\) at position \ -\\!\\(1\\) is expected to have head \\!\\(Part\\) for all subexpressions \ -through level \\!\\(2\\). \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, ButtonData:>\\\"paclet:ref/Join\ -\\\", ButtonNote -> \\\"Join::headsd\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.411484015578456*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Part", "::", "\<\"pspec\"\>"}], - RowBox[{ - ":", " "}], "\<\"Part specification \ -\\!\\(Join[\\(\\(\\(\\(\\(\\(ExtractDataFromCMEString[$Failed]\\)\\) \ -\[LeftDoubleBracket] \\(\\(1, \\(\\({3, 2}\\)\\)\\)\\) \ -\[RightDoubleBracket]\\)\\), 2\\)\\)]\\) is neither an integer nor a list of \ -integers. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/message/General/pspec\\\", ButtonNote -> \ -\\\"Part::pspec\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4114840156253576`*^9}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{ - RowBox[{"Join", "[", - RowBox[{ - RowBox[{ - RowBox[{"ExtractDataFromCMEString", "[", "$Failed", "]"}], - "\[LeftDoubleBracket]", - RowBox[{"1", ",", - RowBox[{"{", - RowBox[{"3", ",", "2"}], "}"}]}], "\[RightDoubleBracket]"}], ",", - RowBox[{"ExtractDataFromCMEString", "[", "$Failed", "]"}]}], "]"}], - "\[LeftDoubleBracket]", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{ - RowBox[{"ExtractDataFromCMEString", "[", "$Failed", "]"}], - "\[LeftDoubleBracket]", - RowBox[{"1", ",", - RowBox[{"{", - RowBox[{"3", ",", "2"}], "}"}]}], "\[RightDoubleBracket]"}], ",", - "2"}], "]"}], "\[RightDoubleBracket]"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.1`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "3.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.87`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.51`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.16`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.3`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.46`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.87`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.25`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.46`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.68`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "4.94`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.11`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.19`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.25`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.38`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.62`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.66`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.71`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.82`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "3.03`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.62`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.79`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.1`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.24`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.52`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.8`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.91`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.17`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.29`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.39`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.7`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "4.97`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.06`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.27`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.4`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.5`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.63`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.79`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.83`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.06`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.55`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.53`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.82`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "3.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.18`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.34`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.8`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.94`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "4.05`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.18`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.31`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.53`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.63`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "5.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.11`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.2`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.27`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.7`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.97`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.03`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.1`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.26`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.71`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.07`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.2`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.32`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.51`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.62`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.8`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "4.99`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.08`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.15`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.23`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.29`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.42`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.47`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.52`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{ - RowBox[{"Join", "[", - RowBox[{ - RowBox[{ - RowBox[{"ExtractDataFromCMEString", "[", "$Failed", "]"}], - "\[LeftDoubleBracket]", - RowBox[{"1", ",", - RowBox[{"{", - RowBox[{"3", ",", "2"}], "}"}]}], "\[RightDoubleBracket]"}], ",", - RowBox[{"ExtractDataFromCMEString", "[", "$Failed", "]"}]}], "]"}], - "\[LeftDoubleBracket]", - RowBox[{"Join", "[", - RowBox[{ - RowBox[{ - RowBox[{"ExtractDataFromCMEString", "[", "$Failed", "]"}], - "\[LeftDoubleBracket]", - RowBox[{"1", ",", - RowBox[{"{", - RowBox[{"3", ",", "2"}], "}"}]}], "\[RightDoubleBracket]"}], ",", - "2"}], "]"}], "\[RightDoubleBracket]"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.12`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.99`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.47`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.5`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "2.96`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.15`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.32`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.66`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.07`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.2`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.32`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.42`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.66`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.29`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.68`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.83`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.09`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "2.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.08`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.26`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.27`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.91`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.09`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.17`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.24`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.31`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.38`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.5`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.55`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.68`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.79`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.03`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.5`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.7`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "2.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.09`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.26`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.17`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.3`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.53`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.28`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.42`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.82`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.4`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.39`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.91`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "4.05`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.19`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.46`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "5.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "5.11`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.2`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.3`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.51`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.7`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.98`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "6.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "6.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "6.05`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "6.09`"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{ - 3.4114831880246334`*^9, {3.411483319727852*^9, 3.4114833361552486`*^9}, - 3.411483718738041*^9, 3.411484017345087*^9}] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Cases", "[", - RowBox[{"%", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"_", ",", "_", ",", "_"}], "}"}], ",", "__"}], "}"}]}], - "]"}]], "Input", - CellChangeTimes->{{3.411484051239382*^9, 3.4114840603695793`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.1`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "3.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.87`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.51`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.16`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.3`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.46`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.87`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.25`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.46`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.68`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "4.94`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.11`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.19`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.25`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.38`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.62`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.66`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.71`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "28"}], "}"}], ",", "18", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.82`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "3.03`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.62`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.79`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.1`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.24`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.52`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.8`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.91`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.17`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.29`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.39`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.7`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "4.97`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.06`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.27`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.4`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.5`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.63`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.79`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "29"}], "}"}], ",", "19", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.83`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.06`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.55`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.53`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.82`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "3.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.18`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.34`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.8`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.94`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "4.05`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.18`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.31`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.53`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.63`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "5.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.11`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.2`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.27`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.7`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "30"}], "}"}], ",", "20", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.97`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.03`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.1`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.26`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.71`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.07`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.2`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.32`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.51`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.62`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.8`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "4.99`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.08`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.15`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.23`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.29`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.42`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.47`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.52`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}], ",", "21", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.12`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.99`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.47`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.5`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.78`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "2.96`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.15`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.32`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.66`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.07`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.2`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.32`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.42`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.66`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.29`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.68`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.83`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "4"}], "}"}], ",", "23", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.09`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "2.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.08`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.26`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.43`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.27`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.49`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.91`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.09`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.17`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.24`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.31`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.38`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.5`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.55`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.68`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.79`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "5"}], "}"}], ",", "24", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.03`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.5`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.7`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "2.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.09`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.26`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.61`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "3.9`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.17`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.3`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.53`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "4.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "4.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.28`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.42`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.82`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.84`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "6"}], "}"}], ",", "25", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "3.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "2.88`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "2.73`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "2.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "2.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "2.35`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "2.4`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "2.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "2.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "3.21`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "3.39`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "3.58`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "3.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "3.91`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "4.05`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.19`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.46`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "4.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "4.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "4.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "5.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "5.11`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.2`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.3`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.37`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.51`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.7`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.93`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.98`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "6.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "6.02`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "6.05`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}], ",", "26", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "6.09`"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.411484060963668*^9}] -}, Closed]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"tempdata1", "=", - RowBox[{"Join", "[", - RowBox[{"cmedata", ",", "%"}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.411483743231241*^9, 3.411483761137896*^9}, - 3.4114840826009855`*^9}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"tempdata1", "\[Equal]", - RowBox[{"Union", "[", "tempdata1", "]"}]}]], "Input", - CellChangeTimes->{{3.4114837629051027`*^9, 3.411483771616026*^9}}], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{3.411483772194669*^9, 3.4114840853838196`*^9}] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Extract data for use", "Section", - CellChangeTimes->{{3.4114841709523654`*^9, 3.4114841766081085`*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CurrentDate", "=", - RowBox[{"cmedata", "[", - RowBox[{"[", - RowBox[{ - RowBox[{"-", "1"}], ",", "1"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.4114844976160727`*^9, 3.4114845084875927`*^9}, { - 3.411484719576273*^9, 3.4114847234812727`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "7"}], "}"}]], "Output", - CellChangeTimes->{ - 3.411484508878093*^9, {3.411484720216693*^9, 3.4114847238405333`*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"LastFOMCDate", "=", - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}]}]], "Input", - CellChangeTimes->{{3.411484306283989*^9, 3.4114843312348776`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "31"}], "}"}]], "Output", - CellChangeTimes->{3.41148433215667*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"legend", "=", - RowBox[{"ColorLegendGrid", "[", - RowBox[{ - RowBox[{"Date2String", "/@", - RowBox[{"{", - RowBox[{"CurrentDate", ",", "LastFOMCDate"}], "}"}]}], ",", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{ - RowBox[{"ColorData", "[", "1", "]"}], "[", "i", "]"}], ",", - RowBox[{"{", - RowBox[{"i", ",", "2"}], "}"}]}], "]"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.411484467078973*^9, 3.411484488697053*^9}, { - 3.4114845243106527`*^9, 3.4114845687495527`*^9}}], - -Cell[BoxData[ - TagBox[GridBox[{ - { - GraphicsBox[ - {RGBColor[0.24720000000000014`, 0.24, 0.6], - StyleBox[InsetBox["\<\"\[FilledSquare]\"\>", {0, 0}], - StripOnInput->False, - FontSize->12]}, - ImageSize->12], - StyleBox[ - InterpretationBox[Cell[BoxData["\<\"2008-02-07\"\>"], "Text", "TR"], - Text["2008-02-07"]], - StripOnInput->False, - FontSize->12]}, - { - GraphicsBox[ - {RGBColor[0.6, 0.24, 0.4428931686004542], - StyleBox[InsetBox["\<\"\[FilledSquare]\"\>", {0, 0}], - StripOnInput->False, - FontSize->12]}, - ImageSize->12], - StyleBox[ - InterpretationBox[Cell[BoxData["\<\"2008-01-31\"\>"], "Text", "TR"], - Text["2008-01-31"]], - StripOnInput->False, - FontSize->12]} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - GridBoxFrame->{"ColumnsIndexed" -> {{{1, -1}, {1, -1}} -> True}}, - GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Grid"]], "Output", - CellChangeTimes->{{3.4114845399150333`*^9, 3.4114845692650127`*^9}}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"CurrentData", "=", - RowBox[{"Cases", "[", - RowBox[{"cmedata", ",", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"d", ":", "CurrentDate"}], ",", "_", ",", "m_", ",", "r_"}], - "}"}], "\[RuleDelayed]", - RowBox[{"{", - RowBox[{"d", ",", "m", ",", "r"}], "}"}]}]}], "]"}]}], ";"}]], "Input",\ - - CellChangeTimes->{{3.4114841897319326`*^9, 3.411484277911531*^9}, - 3.411484456379273*^9, {3.411484514610633*^9, 3.411484516969253*^9}, { - 3.411484731478713*^9, 3.411484734087253*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"LastFOMCData", "=", - RowBox[{"Cases", "[", - RowBox[{"cmedata", ",", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"d", ":", "LastFOMCDate"}], ",", "_", ",", "m_", ",", "r_"}], - "}"}], "\[RuleDelayed]", - RowBox[{"{", - RowBox[{"d", ",", "m", ",", "r"}], "}"}]}]}], "]"}]}], ";"}]], "Input",\ - - CellChangeTimes->{{3.411484262850381*^9, 3.411484303534235*^9}, - 3.411484445865231*^9, {3.411484736399013*^9, 3.411484739116893*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DateListPlot", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"CurrentData", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"{", - RowBox[{"2", ",", "3"}], "}"}]}], "]"}], "]"}], ",", - RowBox[{"LastFOMCData", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"{", - RowBox[{"2", ",", "3"}], "}"}]}], "]"}], "]"}]}], "}"}], ",", - RowBox[{"Joined", "\[Rule]", "True"}], ",", - RowBox[{"Frame", "\[Rule]", - RowBox[{"{", - RowBox[{"True", ",", "True", ",", "False", ",", "False"}], "}"}]}], ",", - - RowBox[{"Epilog", "\[Rule]", - RowBox[{"Inset", "[", - RowBox[{"legend", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2016", ",", "1", ",", "1"}], "}"}], ",", "4"}], "}"}], ",", - - RowBox[{"Background", "\[Rule]", "White"}]}], "]"}]}], ",", - RowBox[{"PlotLabel", "\[Rule]", "\"\<Eurodollar Futures Rates\>\""}]}], - "]"}]], "Input", - CellChangeTimes->{{3.4114843460929213`*^9, 3.411484381417881*^9}, { - 3.4114844214455442`*^9, 3.411484430038524*^9}, {3.4114845727326527`*^9, - 3.411484649161313*^9}, {3.411484743381153*^9, 3.411484750269573*^9}}], - -Cell[BoxData[ - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4122816*^9, 3.02}, {3.4147008*^9, 2.88}, {3.41712*^9, 2.73}, { - 3.420144*^9, 2.56}, {3.4225632*^9, 2.45}, {3.4304256*^9, 2.35}, { - 3.438288*^9, 2.4}, {3.4461504*^9, 2.54}, {3.4540128*^9, 2.77}, { - 3.4618752*^9, 3.}, {3.4697376*^9, 3.21}, {3.4776*^9, 3.39}, { - 3.4854624*^9, 3.58}, {3.4933248*^9, 3.75}, {3.5011872*^9, 3.91}, { - 3.5090496*^9, 4.05}, {3.516912*^9, 4.19}, {3.5253792*^9, 4.33}, { - 3.5332416*^9, 4.46}, {3.541104*^9, 4.57}, {3.5489664*^9, 4.69}, { - 3.5568288*^9, 4.81}, {3.5646912*^9, 4.92}, {3.5725536*^9, 5.02}, { - 3.580416*^9, 5.11}, {3.5882784*^9, 5.2}, {3.5961408*^9, 5.3}, { - 3.6040032*^9, 5.37}, {3.6118656*^9, 5.45}, {3.619728*^9, 5.51}, { - 3.6275904*^9, 5.59}, {3.6354528*^9, 5.65}, {3.6433152*^9, 5.7}, { - 3.6511776*^9, 5.75}, {3.65904*^9, 5.81}, {3.6669024*^9, 5.85}, { - 3.6747648*^9, 5.89}, {3.683232*^9, 5.93}, {3.6910944*^9, 5.98}, { - 3.698352*^9, 6.}, {3.7068192*^9, 6.02}, {3.7146816*^9, 6.05}, { - 3.722544*^9, 6.09}}]}, - {Hue[0.9060679774997897, 0.6, 0.6], - LineBox[{{3.4122816*^9, 3.03}, {3.4147008*^9, 2.9}, {3.41712*^9, 2.76}, { - 3.420144*^9, 2.6}, {3.4225632*^9, 2.49}, {3.4304256*^9, 2.44}, { - 3.438288*^9, 2.56}, {3.4461504*^9, 2.73}, {3.4540128*^9, 2.93}, { - 3.4618752*^9, 3.1}, {3.4697376*^9, 3.26}, {3.4776*^9, 3.41}, { - 3.4854624*^9, 3.57}, {3.4933248*^9, 3.71}, {3.5011872*^9, 3.84}, { - 3.5090496*^9, 3.95}, {3.516912*^9, 4.07}, {3.5253792*^9, 4.2}, { - 3.5332416*^9, 4.32}, {3.541104*^9, 4.41}, {3.5489664*^9, 4.51}, { - 3.5568288*^9, 4.62}, {3.5646912*^9, 4.72}, {3.5725536*^9, 4.8}, { - 3.580416*^9, 4.9}, {3.5882784*^9, 4.99}, {3.5961408*^9, 5.08}, { - 3.6040032*^9, 5.15}, {3.6118656*^9, 5.23}, {3.619728*^9, 5.29}, { - 3.6275904*^9, 5.37}, {3.6354528*^9, 5.42}, {3.6433152*^9, 5.47}, { - 3.6511776*^9, 5.52}, {3.65904*^9, 5.58}, {3.6669024*^9, 5.61}, { - 3.6747648*^9, 5.65}, {3.683232*^9, 5.69}, {3.6910944*^9, 5.74}, { - 3.698352*^9, 5.76}, {3.7068192*^9, 5.78}, {3.7146816*^9, 5.81}, { - 3.722544*^9, 5.85}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3412281600, 2.5}, {3.4122816*^9, 2.5}], - Epilog->InsetBox[ - BoxData[ - FormBox[ - TagBox[ - GridBox[{{ - GraphicsBox[{ - RGBColor[0.24720000000000014`, 0.24, 0.6], - StyleBox[ - InsetBox[ - FormBox["\"\[FilledSquare]\"", TraditionalForm], {0, 0}], 12, - StripOnInput -> False]}, ImageSize -> 12], - StyleBox[ - InterpretationBox[ - Cell[ - BoxData[ - FormBox["\"2008-02-07\"", TraditionalForm]], "Text", "TR"], - Text["2008-02-07"]], 12, StripOnInput -> False]}, { - GraphicsBox[{ - RGBColor[0.6, 0.24, 0.4428931686004542], - StyleBox[ - InsetBox[ - FormBox["\"\[FilledSquare]\"", TraditionalForm], {0, 0}], 12, - StripOnInput -> False]}, ImageSize -> 12], - StyleBox[ - InterpretationBox[ - Cell[ - BoxData[ - FormBox["\"2008-01-31\"", TraditionalForm]], "Text", "TR"], - Text["2008-01-31"]], 12, StripOnInput -> False]}}, - GridBoxAlignment -> {"Columns" -> {{Left}}}, - GridBoxFrame -> {"ColumnsIndexed" -> {{{1, -1}, {1, -1}} -> True}}, - GridBoxItemSize -> { - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, ColumnsEqual -> - False, RowsEqual -> False], "Grid"], TraditionalForm]], - NCache[{3660595200, 4}, {3.6605952*^9, 4}], Background -> GrayLevel[1]], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotLabel->FormBox["\"Eurodollar Futures Rates\"", TraditionalForm], - PlotRange->{{3.4122816*^9, 3.722544*^9}, {2.35, 6.09}}, - PlotRangeClipping->True, - PlotRangePadding->{ - Scaled[0.02], - Scaled[0.02]}, - Ticks->None]], "Output", - CellChangeTimes->{{3.41148435676384*^9, 3.4114843819022126`*^9}, - 3.4114844305228558`*^9, {3.411484615859473*^9, 3.411484649676773*^9}, - 3.411484750785033*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{"PagePrint", "[", "%348", "]"}]], "Input", - CellChangeTimes->{{3.411484658345873*^9, 3.411484687430313*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CommonContracts", "=", - RowBox[{"Intersection", "[", - RowBox[{ - RowBox[{"CurrentData", "[", - RowBox[{"[", - RowBox[{"All", ",", "2"}], "]"}], "]"}], ",", - RowBox[{"LastFOMCData", "[", - RowBox[{"[", - RowBox[{"All", ",", "2"}], "]"}], "]"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.411484709485753*^9, 3.411484715218293*^9}, { - 3.4114847647014494`*^9, 3.411484794392408*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}]}], "}"}]], "Output", - CellChangeTimes->{{3.411484713312653*^9, 3.4114847156087933`*^9}, { - 3.4114847549710617`*^9, 3.41148479492344*^9}}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"DifferenceData", "=", - RowBox[{"Transpose", "[", - RowBox[{"{", - RowBox[{"CommonContracts", ",", - RowBox[{ - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{"CurrentData", ",", - RowBox[{"{", - RowBox[{"_", ",", - RowBox[{"Alternatives", "@@", "CommonContracts"}], ",", "_"}], - "}"}]}], "]"}], "[", - RowBox[{"[", - RowBox[{"All", ",", "3"}], "]"}], "]"}], "-", - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{"LastFOMCData", ",", - RowBox[{"{", - RowBox[{"_", ",", - RowBox[{"Alternatives", "@@", "CommonContracts"}], ",", "_"}], - "}"}]}], "]"}], "[", - RowBox[{"[", - RowBox[{"All", ",", "3"}], "]"}], "]"}]}]}], "}"}], "]"}]}], - ";"}]], "Input", - CellChangeTimes->{{3.411484799140462*^9, 3.4114849196595335`*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DateListPlot", "[", - RowBox[{"DifferenceData", ",", - RowBox[{"Joined", "\[Rule]", "True"}], ",", - RowBox[{"Frame", "\[Rule]", - RowBox[{"{", - RowBox[{"True", ",", "True", ",", "False", ",", "False"}], "}"}]}], ",", - - RowBox[{"GridLines", "\[Rule]", - RowBox[{"{", - RowBox[{"Automatic", ",", - RowBox[{"Range", "[", - RowBox[{ - RowBox[{"-", ".25"}], ",", ".25", ",", ".25"}], "]"}]}], "}"}]}], ",", - - RowBox[{"PlotRange", "\[Rule]", - RowBox[{"{", - RowBox[{"Automatic", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", ".25"}], ",", ".25"}], "}"}]}], "}"}]}], ",", - RowBox[{"PlotRangePadding", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"Scaled", "[", ".01", "]"}], ",", - RowBox[{"Scaled", "[", ".05", "]"}]}], "}"}]}], ",", - RowBox[{ - "PlotLabel", "\[Rule]", - "\"\<Change in Eurodollar Futures Rates Since Last FOMC\>\""}]}], - "]"}]], "Input", - CellChangeTimes->{{3.4114848926160593`*^9, 3.4114850629930954`*^9}}], - -Cell[BoxData[ - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4122816*^9, -0.009999999999999787}, { - 3.4147008*^9, -0.020000000000000018`}, { - 3.41712*^9, -0.029999999999999805`}, { - 3.420144*^9, -0.040000000000000036`}, { - 3.4225632*^9, -0.040000000000000036`}, { - 3.4304256*^9, -0.08999999999999986}, { - 3.438288*^9, -0.16000000000000014`}, { - 3.4461504*^9, -0.18999999999999995`}, { - 3.4540128*^9, -0.16000000000000014`}, { - 3.4618752*^9, -0.10000000000000009`}, { - 3.4697376*^9, -0.04999999999999982}, { - 3.4776*^9, -0.020000000000000018`}, {3.4854624*^9, - 0.010000000000000231`}, {3.4933248*^9, 0.040000000000000036`}, { - 3.5011872*^9, 0.07000000000000028}, {3.5090496*^9, - 0.09999999999999964}, {3.516912*^9, 0.1200000000000001}, {3.5253792*^9, - 0.1299999999999999}, {3.5332416*^9, 0.13999999999999968`}, {3.541104*^9, - 0.16000000000000014`}, {3.5489664*^9, 0.1800000000000006}, {3.5568288*^9, - 0.1899999999999995}, {3.5646912*^9, 0.20000000000000018`}, { - 3.5725536*^9, 0.21999999999999975`}, {3.580416*^9, - 0.20999999999999996`}, {3.5882784*^9, 0.20999999999999996`}, { - 3.5961408*^9, 0.21999999999999975`}, {3.6040032*^9, - 0.21999999999999975`}, {3.6118656*^9, 0.21999999999999975`}, { - 3.619728*^9, 0.21999999999999975`}, {3.6275904*^9, - 0.21999999999999975`}, {3.6354528*^9, 0.23000000000000043`}, { - 3.6433152*^9, 0.23000000000000043`}, {3.6511776*^9, - 0.23000000000000043`}, {3.65904*^9, 0.22999999999999954`}, {3.6669024*^9, - 0.23999999999999932`}, {3.6747648*^9, 0.23999999999999932`}, { - 3.683232*^9, 0.23999999999999932`}, {3.6910944*^9, 0.2400000000000002}, { - 3.698352*^9, 0.2400000000000002}, {3.7068192*^9, 0.23999999999999932`}, { - 3.7146816*^9, 0.2400000000000002}, {3.722544*^9, 0.2400000000000002}}]}}, - - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3412281600, 0}, {3.4122816*^9, 0}], - Frame->{True, True, False, False}, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, {-0.25, 0., 0.25}}, {{{3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, {-0.25, 0., 0.25}}], - PlotLabel->FormBox[ - "\"Change in Eurodollar Futures Rates Since Last FOMC\"", TraditionalForm], - - PlotRange->{{3.4122816*^9, 3.722544*^9}, {-0.25, 0.25}}, - PlotRangeClipping->True, - PlotRangePadding->{ - Scaled[0.01], - Scaled[0.05]}, - Ticks->None]], "Output", - CellChangeTimes->{{3.4114849844157295`*^9, 3.4114850183776674`*^9}, { - 3.411485055790958*^9, 3.4114850635446815`*^9}}] -}, Open ]], - -Cell[BoxData[ - RowBox[{"PagePrint", "[", "%", "]"}]], "Input", - CellChangeTimes->{{3.411485068824147*^9, 3.4114850705892224`*^9}}] -}, Open ]] -}, Open ]] -}, -WindowSize->{890, 843}, -WindowMargins->{{Automatic, -1272}, {Automatic, -32}}, -ShowSelection->True, -FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{} -*) -(*CellTagsIndex -CellTagsIndex->{} -*) -(*NotebookFileOutline -Notebook[{ -Cell[CellGroupData[{ -Cell[590, 23, 100, 1, 103, "Title"], -Cell[693, 26, 116, 1, 62, "Subtitle"], -Cell[CellGroupData[{ -Cell[834, 31, 92, 1, 88, "Section"], -Cell[929, 34, 68, 1, 35, "Input"], -Cell[1000, 37, 120, 2, 52, "Input"], -Cell[CellGroupData[{ -Cell[1145, 43, 273, 6, 52, "Input"], -Cell[1421, 51, 141, 1, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[1599, 57, 169, 3, 52, "Input"], -Cell[1771, 62, 119, 1, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[1927, 68, 234, 4, 52, "Input"], -Cell[2164, 74, 131, 1, 52, "Output"] -}, Open ]], -Cell[2310, 78, 176, 6, 35, "Input", - Evaluatable->False] -}, Open ]], -Cell[CellGroupData[{ -Cell[2523, 89, 102, 1, 88, "Section"], -Cell[CellGroupData[{ -Cell[2650, 94, 590, 14, 97, "Input"], -Cell[3243, 110, 230, 4, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[3510, 119, 298, 7, 52, "Input"], -Cell[3811, 128, 525, 8, 52, "Output"] -}, Open ]], -Cell[4351, 139, 359, 11, 52, "Input"], -Cell[CellGroupData[{ -Cell[4735, 154, 167, 3, 52, "Input"], -Cell[4905, 159, 2473, 72, 116, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[7415, 236, 188, 3, 52, "Input"], -Cell[7606, 241, 2427, 61, 230, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[10070, 307, 188, 3, 52, "Input"], -Cell[10261, 312, 591, 10, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[10889, 327, 196, 3, 52, "Input"], -Cell[11088, 332, 278, 4, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[11403, 341, 2489, 67, 207, "Input"], -Cell[13895, 410, 870605, 14838, 430, "Output"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[884549, 15254, 99, 1, 88, "Section"], -Cell[CellGroupData[{ -Cell[884673, 15259, 419, 10, 75, "Input"], -Cell[885095, 15271, 164, 2, 52, "Output"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[885308, 15279, 165, 2, 88, "Section"], -Cell[CellGroupData[{ -Cell[885498, 15285, 188, 3, 52, "Input"], -Cell[885689, 15290, 591, 10, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[886317, 15305, 126, 2, 52, "Input"], -Cell[886446, 15309, 95, 1, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[886578, 15315, 526, 13, 52, "Input"], -Cell[887107, 15330, 295, 7, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[887439, 15342, 1691, 38, 102, "Input"], -Cell[889133, 15382, 530, 9, 94, "Message"], -Cell[889666, 15393, 429, 7, 27, "Message"] -}, Open ]], -Cell[890110, 15403, 1076, 30, 119, "Input"], -Cell[CellGroupData[{ -Cell[891211, 15437, 443, 11, 52, "Input"], -Cell[891657, 15450, 1134, 21, 229, "Output"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[892840, 15477, 110, 1, 88, "Section"], -Cell[892953, 15480, 532, 16, 75, "Input"], -Cell[CellGroupData[{ -Cell[893510, 15500, 459, 13, 52, "Input"], -Cell[893972, 15515, 803, 25, 75, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[894812, 15545, 255, 6, 52, "Input"], -Cell[895070, 15553, 918, 14, 251, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[896025, 15572, 535, 12, 97, "Input"], -Cell[896563, 15586, 387, 8, 27, "Message"], -Cell[896953, 15596, 400, 8, 27, "Message"], -Cell[897356, 15606, 398, 8, 27, "Message"], -Cell[897757, 15616, 459, 9, 27, "Message"], -Cell[898219, 15627, 437, 9, 27, "Message"], -Cell[898659, 15638, 546, 11, 27, "Message"], -Cell[899208, 15651, 485, 9, 27, "Message"], -Cell[899696, 15662, 602, 11, 50, "Message"], -Cell[900301, 15675, 595, 12, 50, "Message"], -Cell[900899, 15689, 640, 12, 50, "Message"], -Cell[901542, 15703, 435, 9, 27, "Message"], -Cell[901980, 15714, 546, 11, 27, "Message"], -Cell[902529, 15727, 483, 9, 27, "Message"], -Cell[903015, 15738, 600, 11, 50, "Message"], -Cell[903618, 15751, 595, 12, 50, "Message"], -Cell[904216, 15765, 77879, 2453, 3947, "Output"] -}, Closed]], -Cell[CellGroupData[{ -Cell[982132, 18223, 265, 8, 44, "Input"], -Cell[982400, 18233, 76328, 2411, 3815, "Output"] -}, Closed]], -Cell[1058743, 20647, 232, 6, 44, "Input"], -Cell[CellGroupData[{ -Cell[1059000, 20657, 172, 3, 52, "Input"], -Cell[1059175, 20662, 97, 1, 52, "Output"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[1059321, 20669, 109, 1, 88, "Section"], -Cell[CellGroupData[{ -Cell[1059455, 20674, 284, 7, 52, "Input"], -Cell[1059742, 20683, 179, 4, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[1059958, 20692, 189, 4, 52, "Input"], -Cell[1060150, 20698, 128, 3, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[1060315, 20706, 537, 14, 75, "Input"], -Cell[1060855, 20722, 1120, 33, 84, "Output"] -}, Open ]], -Cell[1061990, 20758, 561, 15, 52, "Input"], -Cell[1062554, 20775, 511, 14, 52, "Input"], -Cell[CellGroupData[{ -Cell[1063090, 20793, 1221, 33, 119, "Input"], -Cell[1064314, 20828, 6642, 139, 340, "Output"] -}, Open ]], -Cell[1070971, 20970, 131, 2, 52, "Input"], -Cell[CellGroupData[{ -Cell[1071127, 20976, 434, 11, 52, "Input"], -Cell[1071564, 20989, 3320, 90, 229, "Output"] -}, Open ]], -Cell[1074899, 21082, 913, 26, 141, "Input"], -Cell[CellGroupData[{ -Cell[1075837, 21112, 1048, 30, 119, "Input"], -Cell[1076888, 21144, 4685, 99, 331, "Output"] -}, Open ]], -Cell[1081588, 21246, 130, 2, 52, "Input"] -}, Open ]] -}, Open ]] -} -] -*) - -(* End of internal cache information *) diff --git a/MathematicaFiles/Applications/EurodollarDataFunctions.m b/MathematicaFiles/Applications/EurodollarDataFunctions.m deleted file mode 100755 index c37a26c39ee14c635a92ae0888ea7bae78056395..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/EurodollarDataFunctions.m +++ /dev/null @@ -1,281 +0,0 @@ -(* wolfram packages *) -<<Calendar` -(* my packages *) -<<ImportExportBinary` -<<OddsandEnds` - -(* In order for DateToCMEDay to work properly for a given year, - we need Holidays[year] to be properly defined. So far, this has - only been done for 2008. *) - -ExportFuturesRates::usage = "ExportFuturesRates[filename, \ -data] exports the data using ExportBinary with $Description \ -and $ColumnHeadings." - -ImportFuturesRates::usage = "ImportFuturesRates[filename] \ -uses ImportBinary and returns {description, headings, data}." - -GetFuturesRates::usage = "GetFuturesRates[filename] \ -imports the legacy version of the eurodollar future rates \ -file." - -EurodollarExpirationDate::usage = -"EurodollarExpirationDate[{year, month}] returns the expiration \ -date {year, month, day} for the given contract." - -MissingCMEDays::usage = -"MissingCMEDays[database] returns a report of the days missing from the \ -database." - -MostRecentDay::usage = -"MostRecentDay[database] returns a report of the most recent day in the \ -database." - -CMEDayToDate::usage = -"CMEDayToDate[year, dayNumber] returns the corresponding date." - -DateToCMEDay::usage = -"DateToCMEDay[{year,month,day}] returns the corresponding CME day number. \ -DateToCMEDay[] returns today's CME day number." - -DateToCMEDay::baddate = "Not a valid EuroDollar date." - -CMEDayToDate::badday = "Not a valid EuroDollar day." - -URLforPDFfromCME::usage = -"URLforPDFfromCME[section, {year, day}] generates the URL for the Section \ -data for the date specified. The arguments section, year, and day should \ -all be integers." - -ImportSectionPDFfromCME::usage = -"ImportSectionPDFfromCME[section, {year, day}] imports the section \ -data from the CME website and returns a string. The \ -arguments section, year, and day should all be integers." - -ImportSectionPDFfromCMEandWriteToFile::usage = -"ImportSectionPDFfromCMEandWriteToFile[section, {year, day}] \ -imports the section data from the CME website and writes a .txt \ -file to the current directory. The arguments section, year, and \ -day should all be integers." - -ExtractDataFromCMEString::usage = -"ExtractDataFromCMEString[instring] extracts the data from the given \ -input string, itself obtained from a CME pdf." - -ReadDataFromCMEPDF::usage = -"ReadDataFromCMEPDF[filename] returns the data extracted from the CME pdf \ -with the given filename."; - - -$Description = "Eurodollar Futures Rates: Daily" - -$ColumnHeadings = { - "Quote date: Year", - "Quote date: Month", - "Quote date: Day", - "CME day number", - "Maturity date: Year", - "Maturity date: Month", - "Maturity date: Day", - "Futures rate" - } - -Holidays[2008] = { - {2008, 1, 1}, {2008, 1, 21}, {2008, 2, 18}, {2008, 3, 21}, - {2008, 5, 26}, {2008, 7, 4}, {2008, 9, 1}, {2008, 10, 13}, - {2008, 11, 11}, {2008, 11, 27}, {2008, 12, 25} - } - -ExportFuturesRates[filename_String, data_] := - ExportBinary[filename, - Flatten /@ Union[data], - Description -> $Description, - ColumnHeadings -> $ColumnHeadings - ] - -ImportFuturesRates[filename_String] := - Module[{desc, headings, data, group}, - {desc, headings, data} = ImportBinary[filename]; - group = {#[[{1,2,3}]], #[[4]], #[[{5,6,7}]], #[[8]]}&; - {desc, group[headings], group /@ data} - ] - -GetFuturesRates[filename_String] := { - ToExpression[StringSplit[#1, "/"]], #2, - ToExpression[StringSplit[#3, "/"]], #4, #5, #6, #7 - } & @@@ Import[filename] - -EurodollarExpirationDate[{year_, month_}] := - {year, month, - Switch[DayOfWeek[{year, month, 15}], - Wednesday, 13, - Tuesday, 14, - Monday, 15, - Sunday, 16, - Saturday, 17, - Friday, 18, - Thursday, 19]} - -MissingCMEDays[cmedata_] := - Module[{ - dateDay = Flatten /@ Union[cmedata[[All,{1, 2}]]], - missinglist - }, - missinglist = - MapThread[Prepend, { - With[{split = Split[dateDay[[All,-1]], #1 < #2 & ]}, - MapThread[Complement, {Apply[Range, split[[All,{1, -1}]], {1}], split}]], - Union[dateDay[[All, 1]]] - } - ]; - Labeled[Framed[ - Grid[missinglist, Dividers -> {{False, True, False}, None}, Alignment -> Right]], - "Missing CME Days (by year)", Top] - ] - -MostRecentDay[cmedata_] := - Row[{ - "Most Recent Day:", - DateString[cmedata[[-1,1]], {"Day", " ", "MonthNameShort", " ", "Year"}], - "Day", - cmedata[[-1,2]] - }, " "] - -Weekdays[year_] := Weekdays[year] = - Pick[#1, DayOfWeek /@ #1, Monday | Tuesday |Wednesday | Thursday | Friday]& @ - Table[DatePlus[{year - 1, 12, 31}, i], {i, If[LeapYearQ[year], 366, 365]}] - -CMEDays[year_] := CMEDays[year] = - DeleteCases[Weekdays[year], Alternatives @@ Holidays[year]] - -DateToCMEDay[{year_, month_, day_, ___}] := - Module[{pos = Position[CMEDays[year], {year, month, day}]}, - If[pos === {}, - Message[DateToCMEDay::baddate]; $Failed, - pos[[1,1]]] - ] - -DateToCMEDay[] := DateToCMEDay[Date[]] - -CMEDayToDate[year_, day_] := - If[0 < day < Length[CMEDays[year]], - CMEDays[year][[day]], - Message[CMEDayToDate::badday]; $Failed - ] - -myDateDifference[d1:{_, _, _}, d2:{_, _, _}] := - (AbsoluteTime[d2] - AbsoluteTime[d1])/86400 - -MaturityInDays[cmedata_] := - Apply[myDateDifference, cmedata[[All,{1, 3}]], {1}] - -CMEHeaderReport[desc_, headings_] := - Framed[Column[{desc, Row[headings /. d:{_, _, _} :> Column[d], Spacer[12]]}, - Dividers -> Center] - ] - -GetEuroDollarData[date:{_Integer, _Integer, _Integer, ___}] := - Cases[cmedata, {date, _, m_, v_} :> {myDateDifference[date, m]/365.25, v}] - -SectionList = {9, 51, 52} - -SectionLookupTable = - {{9, "_Interest_Rate_And_Energy_Futures_"}, - {51, "_Euro_Dollar_Call_Options_"}, - {52, "_Euro_Dollar_Put_Options_"}} - -URLforPDFfromCME[ - section_Integer /; MemberQ[SectionList, section], - {year_Integer, day_Integer} - ] := - StringJoin[ - "http://www.cmegroup.com/daily_bulletin/Section", - IntegerString[section, 10, 2], - Cases[SectionLookupTable, {section, string_} -> string][[1]], - IntegerString[year, 10, 4], - IntegerString[day, 10, 3], - ".pdf" - ] - -URLforPDFfromCME[section_, {year_, month_, day_}] := - With[{cmeday = DateToCMEDay[{year, month, day}]}, - If[cmeday === $Failed, - $Failed, - URLforPDFfromCME[section, {year, cmeday}] - ] - ] - -URLforPDFfromCME[__] := $Failed - -ImportSectionPDFfromCME[section_Integer, {year_Integer, day_Integer}] := - With[{url = URLforPDFfromCME[section, {year, day}]}, - Switch[url, - $Failed, $Failed, - _, Import[url, "Plaintext"] - ] - ] - -ImportSectionPDFfromCMEandWriteToFile[ - section_Integer, - {year_Integer, day_Integer} - ] := - With[{url = URLforPDFfromCME[section, {year, day}]}, - Switch[url, - $Failed, $Failed, - _, Export[ - StringJoin[StringSplit[url, {"/", "."}][[-2]], ".txt"], - Import[url, "Plaintext"] - ] - ] - ] - -LineNumber[startString_String, lines_] := - Position[Length /@ - StringCases[lines, StringExpression[StartOfString, startString]], 1][[1,1]] - -ExtractDataFromCMEString[instring_String] := - Module[{lines, dateline, quotedate, pagenumber, daynumber, fixline, - bbafix, datalines, contracts, contractmonths, contractmaturities}, - lines = DeleteCases[ImportString[instring, "Lines"], ""]; - dateline = lines[[LineNumber["PG", lines]]]; - quotedate = DateList[StringTake[dateline, {118, 129}]][[1 ;; 3]]; - {pagenumber, daynumber} = - ToExpression[StringCases[dateline, NumberString][[{1, 2}]]]; - fixline = lines[[LineNumber["U.S.", lines]]]; - bbafix = ToExpression[StringCases[fixline, NumberString][[-1]]]; - datalines = lines[[ - LineNumber["EURO DLR FUT", lines] + 1 ;; LineNumber["TOTAL", lines] - 1 - ]]; - contracts = StringTake[datalines, 5]; - contractmonths = - (DateList[{StringInsert[#1, " ", 4], {"MonthName", "YearShort"}}]& /@ - contracts)[[All,{1, 2}]]; - contractmaturities = EurodollarExpirationDate /@ contractmonths; - rates = Flatten[ - StringCases[datalines, StringExpression[r:NumberString, ")"] :> ToExpression[r]]]; - { - {pagenumber, daynumber, quotedate, bbafix}, - Sort[Transpose[{contractmaturities, rates}]] - } - ] - -ReadDataFromCMEPDF[filename_String] := - ExtractDataFromCMEString[Import[filename, "Plaintext"]] - -Section09DataForDatabase[filename_String] := - With[{data = ExtractDataFromCMEString[Import[filename, "Plaintext"]]}, - (Join[data[[1,{3, 2}]], #1] & ) /@ data[[2]] - ] - -Section09DataForDatabase[{year_, cmeday_}] := {} - - -CMEEurodollarSection09PDFs[] := - ToExpression[ - StringTake[#, {{1, 4}, {5, 7}}] & /@ - StringTake[ - StringSplit[FileNames["*.pdf", $CMEEuroDollarSection09Directory], - {"\\", "."}][[All, -2]], -7] - ] - - diff --git a/MathematicaFiles/Applications/GaussianKernel.m b/MathematicaFiles/Applications/GaussianKernel.m deleted file mode 100755 index 0050470b0ba13485fbf7d63922eba466a85c4161..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/GaussianKernel.m +++ /dev/null @@ -1,118 +0,0 @@ -(* Gaussian kernel density and regression *) - -(* wrapper functions *) - -GaussianDensity::usage = "GaussianDensity[data][h][x] returns the the -Gaussian kernel density evaluated at x (given the bandwidth h). If x -is a vector, a list of pairs is returned. GaussianDensity[data][h1, -h2][{x1, x2}] returns the Gaussian kernel density evaluated at {x1, -x2} (given the bandwidths h1 and h2). An optional h12 can be used to -control the correlation between the two dimensions. If x1 and x2 are -vectors then a list of triples is returned." - -GaussianRegress::usage = "GaussianRegress[data][h][x] returns the -value of the kernel regression at x given the bandwidth h. If x is a -vector, a list of pairs is returned." - -GaussianDensity[data_?(VectorQ[#, NumericQ] &)][h_?NumericQ][z_?NumericQ] := - $GaussKernel1[h, z, data] - -GaussianDensity[data_?(MatrixQ[#, NumericQ] &)][ - h1_?NumericQ, h2_?NumericQ, h12_:0][{z1_?NumericQ, z2_?NumericQ}] := - $GaussKernel2[h1, h2, h12, z1, z2, data] - -GaussianDensity[data_?(MatrixQ[#, NumericQ] &)][ - h1_?NumericQ, h2_?NumericQ, h12_:0][z1_?NumericQ, z2_?NumericQ] := - $GaussKernel2[h1, h2, h12, z1, z2, data] - -GaussianRegress[data_?(MatrixQ[#, NumericQ] &)][h_?NumericQ][z_?NumericQ] := - $GaussKernelRegress[h, z, data] - -(* "listable" versions *) -GaussianDensity[data_?(VectorQ[#, NumericQ] &)][h_?NumericQ][ - z_?(VectorQ[#, NumericQ] &)] := $ListGaussKernel1[h, z, data] - -GaussianDensity[data_?(MatrixQ[#, NumericQ] &)][ - h1_?NumericQ, h2_?NumericQ, h12_:0][ - {z1_?(VectorQ[#, NumericQ]&), z2_?(VectorQ[#, NumericQ]&)}] := - With[{z = Transpose[Flatten[Outer[List, z1, z2], 1]]}, - $ListGaussKernel2[h1, h2, h12, z[[1]], z[[2]], data] - ] - -GaussianDensity[data_?(MatrixQ[#, NumericQ] &)][ - {h1_?NumericQ, h2_?NumericQ}][ - {z1_?(VectorQ[#, NumericQ]&), z2_?(VectorQ[#, NumericQ]&)}] := - GaussianDensity[data][h1, h2][{z1, z2}] - -GaussianDensity[data_?(MatrixQ[#, NumericQ] &)][ - {h1_?NumericQ, h2_?NumericQ, h3_?NumericQ}][ - {z1_?(VectorQ[#, NumericQ]&), z2_?(VectorQ[#, NumericQ]&), - z3_?(VectorQ[#, NumericQ]&)}] := - With[{z = Transpose[Flatten[Outer[List, z1, z2, z3], 2]]}, - $ListGaussKernel3[h1, h2, h3, z[[1]], z[[2]], z[[3]], data] - ] - -GaussianRegress[data_?(MatrixQ[#, NumericQ] &)][h_?NumericQ][ - z_?(VectorQ[#, NumericQ] &)] := - $ListGaussKernelRegress[h, z, data] - -(* compile the guts *) - -(* 1-dimensional density kernel *) -$GaussKernel1 = - Compile[{h, z, {d, _Real, 1}}, - Tr[1/(E^((d - z)^2/(2*h^2))*(h*Sqrt[2*Pi]))]/Length[d] - ]; - -(* "listable" version *) -$ListGaussKernel1 = - Compile[{h, {z, _Real, 1}, {d, _Real, 1}}, - ({#1, Tr[1/(E^((d - #1)^2/(2*h^2))*(h*Sqrt[2*Pi]))]/Length[d]} &) /@ z - ]; - -(* 2-dimensional density kernel *) -$GaussKernel2 = - Compile[{h1, h2, h12, z1, z2, {d, _Real, 2}}, - Tr[E^((h2*(d[[All, 1]] - z1)^2 - - 2*h12*(d[[All, 1]] - z1)*(d[[All, 2]] - z2) + - h1*(d[[All, 2]] - z2)^2)/(2*h12^2 - 2*h1*h2))/(2* - Sqrt[-h12^2 + h1*h2]*Pi)]/Length[d] - ]; - -(* "listable" version *) -$ListGaussKernel2 = - Compile[{h1, h2, h12, {z1, _Real, 1}, {z2, _Real, 1}, {d, _Real, 2}}, - MapThread[ - {#1, #2, - Tr[E^((h2*(d[[All, 1]] - #1)^2 - - 2*h12*(d[[All, 1]] - #1)*(d[[All, 2]] - #2) + - h1*(d[[All, 2]] - #2)^2)/(2*h12^2 - 2*h1*h2))/(2* - Sqrt[-h12^2 + h1*h2]*Pi)]/Length[d]}&, - {z1, z2}] - ]; - -(* "listable" 3-d gaussian density *) -$ListGaussKernel3 = - Compile[{h1, h2, h3, {z1, _Real, 1}, {z2, _Real, 1}, {z3, _Real, 1}, - {d, _Real, 2}}, - MapThread[ - {#1, #2, #3, - Tr[E^((-((d[[All,1]] - #1)^2/h1) - (d[[All,2]] - #2)^2/h2 - - (d[[All,3]] - #3)^2/h3)/2)/(2*Sqrt[2*h1*h2*h3]*Pi^(3/2))]/Length[d]}&, - {z1, z2, z3}] - ]; - -(* regression kernel *) -$GaussKernelRegress = - Compile[{h, z, {d, _Real, 2}}, - With[{v = 1/(E^((d[[All, 1]] - z)^2/(2*h^2))*(h*Sqrt[2*Pi]))}, - v.d[[All, 2]]/Tr[v]] - ]; - -(* "listable" regression version *) -$ListGaussKernelRegress = - Compile[{h, {z, _Real, 1}, {d, _Real, 2}}, - {#, With[{v = 1/(E^((d[[All, 1]] - #)^2/(2*h^2))*(h*Sqrt[2*Pi]))}, - v.d[[All, 2]]/Tr[v]]}& /@ z - ]; - diff --git a/MathematicaFiles/Applications/GenSys.m b/MathematicaFiles/Applications/GenSys.m deleted file mode 100755 index f40e69cbb80aec5945f3c3dfdda3f28a5005eded..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/GenSys.m +++ /dev/null @@ -1,358 +0,0 @@ -(* :Author: (of Mathematica code) Mark Fisher *) - -(* :Date: January 2006 - November 2008 (updated for Version 7) -*) - -(* :Mathematica Version: 7.0 - Required for generalized SchurDecomposition *) - -(* :References: - QZSwitch and GenSys is transcribed from Chris Sims' matlab and R code, - available at: http://sims.princeton.edu/yftp/gensys/ - *) - -(* :Discussion: - -*) - - -(* usage messages *) -QZSwitch::usage = "QZSwitch[i, {A,B,Q,Z}] takes upper triangular matrices A \ -and B, orthonormal matrices Q and Z, interchanges diagonal elements i and \ -i+1 of both A and B while maintaining Q.A.Z\[HermitianConjugate] and \ -Q.B.Z\[HermitianConjugate] unchanged." - -QZDecomposition::usage = "QZDecomposition[{a,b}] returns {A,B,Q,Z} where A \ -and B are upper triangular, Q and Z are unitary, a = \ -Q\[HermitianConjugate].A.Z\[HermitianConjugate] and b = \ -Q\[HermitianConjugate].B.Z\[HermitianConjugate]. (Note Q is in \"matlab\" \ -form.)" - -QZSort::usage = "QZSort[{A,B,Q,Z}] takes upper triangular \ -matrices A and B, orthonormal matrices Q and Z, and returns same sorted by \ -the generalized eigenvalues of {A,B}." - -GeneralizedEigenvalues::usage = "GeneralizedEigenvalues[{A,B}] takes \ -upper triangular matrices {A,B} and returns the generalized eigenvalues \ -Abs[Transpose[B, {1,1}]/Transpose[A, {1,1}]]." - -GenSys::usage = "GenSys[{g0, g1, c, psi, pi}] implements Chris Sims' code \ -and returns {a, b0, b, Cs}. Parameters that do not appear in neither g0 nor \ -g1 may be symbolic." - -CanonicalForm::usage = "CanonicalForm[equations, y0, z0, eta, (t)] takes a \ -list of equations and three lists of symbols, the contemporaneous \ -endogenous variables y0, the contemporaneous exogenous variables z0, and \ -the endogenous forcast errors eta, and returns the model in canonical form: \ -{{g0, g1, c, psi, pi}, {y0, y1, z, eta} }}, where y1 is the list of lagged \ -endogenous variables and z includes lagged exogenous variables. A final \ -argument to CanonicalForm is the symbol to use for time in the equations. \ -When the argument is omitted, it defaults to the Global symbol t. \ -CanonicalForm takes the option SolveForReducedForm which is set to True by \ -default." - -ProcessCanonicalForm::usage = "ProcessCanonicalForm[{g0, g1, c, psi, pi}, \ -k] takes the output from CanonicalForm and an integer k that specifies the \ -number of rows in the first block and sets a number of global variables: \ -{P, \[CapitalOmega], Q, Q1} and more." - -CanonicalSolutions::usage = "CanonicalSolutions[{A, B0, B}, {y0, y1, z}, \ -(t)] computes global variables soln and soln1 and returns a tabular \ -representation of the solution (all of which exclude the forward \ -component)." - -PermutationMatrix::usage = "PermutationMatrix[rules, n] take a list of \ -rules that indicate which positions of a diagonal matrix to swap and \ -an interger that indicates the size of the matrix." - -(* code starts here *) - -realform = RealBlockDiagonalForm - -Which[ - $VersionNumber < 5.0, - Print["Warning: Version 5.0 or greater is required."], - $VersionNumber < 7.0, - realform = RealBlockForm - ] - -PermutationMatrix[r : {__Rule}, n_Integer?Positive] := - Module[{one, two}, - one = Thread[Flatten[r /. (x_ -> y_) :> {{x, y}, {y, x}}, 1] -> 1]; - two = {#, #} -> 1 & /@ Complement[Range[n], r /. Rule -> Sequence]; - Normal @ SparseArray[Join[one, two]] - ] - -GeneralizedEigenvalues[{A_, B_}] := Transpose[B, {1,1}]/Transpose[A, {1,1}] - -(* Q is in matlab form *) -QZDecomposition[{a_, b_}] := - MapAt[ConjugateTranspose, - SchurDecomposition[{a, b}//N, realform -> False][[{2,4,1,3}]], - 3] - -QZSort[{Ap_, Bp_, Qp_, Zp_}] := - Module[{A = Ap, B = Bp, Q = Qp, Z = Zp, roots}, - roots = Abs @ GeneralizedEigenvalues[{A, B}]; - (* bubble sort the roots *) - For[i = Length[roots], i >= 1, i--, - For[j = 1, j <= i - 1, j++, - If[roots[[j]] > roots[[j + 1]], - (* then swap *) - roots[[{j, j + 1}]] = roots[[{j + 1, j}]]; - {A, B, Q, Z} = QZSwitch[j, {A, B, Q, Z}] - ] - ] - ]; - {A, B, Q, Z} - ] - -Options[QZSwitch] = {Tolerance -> 1. * 10^(-12)} - -QZSwitch[i_Integer?Positive, {Ap_, Bp_, Qp_, Zp_}, opts___?OptionQ] /; - i <= (Length[Ap] - 1) := - Module[{A = Ap, B = Bp, Q = Qp, Z = Zp, - a, b, c, d, e, f, wz, xy, n, m, realsmall}, - a = A[[i,i]]; - b = A[[i,i+1]]; - c = A[[i+1,i+1]]; - d = B[[i,i]]; - e = B[[i,i+1]]; - f = B[[i+1,i+1]]; - (* special cases involve coincident zeros *) - (* I'm not sure what the implications are for QZSort - of the output produced by the special cases *) - (* Sims uses 10^(-7) here *) - realsmall = Tolerance /. {opts} /. Options[QZSwitch]; - Which[ - Abs[c] < realsmall && Abs[f] < realsmall, - If[Abs[a] < realsmall, - (* l.r. coincident zeros with u.l. of A=0; do nothing *) - Return[{A, B, Q, Z}], - (* l.r. coincident zeros; put 0 in u.l. of A *) - wz = {b, -a}; - wz = wz/Norm[wz]; - wz = {wz, {Conjugate[wz[[2]]], -Conjugate[wz[[1]]]}}; - xy = IdentityMatrix[2] - ], - Abs[a] < realsmall && Abs[d] < realsmall, - If[Abs[c] < realsmall, - (* u.l. coincident zeros with l.r. of A=0; do nothing *) - Return[{A, B, Q, Z}], - (* u.l. coincident zeros; put 0 in l.r. of A *) - wz = IdentityMatrix[2]; - xy = {c, -b}; - xy = xy/Norm[xy]; - xy = {{Conjugate[xy[[2]]], -Conjugate[xy[[1]]]}, xy}; - ], - True, - (* usual case *) - wz = {c*e-f*b, Conjugate[c*d-f*a]}; - xy = {Conjugate[b*d-e*a], Conjugate[c*d-f*a]}; - n = Norm[wz]; - m = Norm[xy]; - If[m < realsmall, (* Sims uses 10^(-10) here *) - (* all elements of A and B are proportional *) - Return[{A, B, Q, Z}]]; - wz = wz/n; - xy = xy/m; - wz = {wz, {-Conjugate[wz[[2]]], Conjugate[wz[[1]]]}}; - xy = {xy, {-Conjugate[xy[[2]]], Conjugate[xy[[1]]]}} - ]; - A[[{i,i+1}]] = xy.A[[{i,i+1}]]; - B[[{i,i+1}]] = xy.B[[{i,i+1}]]; - Q[[{i,i+1}]] = xy.Q[[{i,i+1}]]; - A[[All,{i,i+1}]] = A[[All,{i,i+1}]].wz; - B[[All,{i,i+1}]] = B[[All,{i,i+1}]].wz; - Z[[All,{i,i+1}]] = Z[[All,{i,i+1}]].wz; - {A, B, Q, Z} - ] - -(* no error checking yet *) -GenSys[{g0_, g1_, c_, psi_, pi_}, div_:1, s_:s] := - Module[{A, B, Q, Z, gev, agev, k, n, r1, r2, Q1, Q2, Z1, - A11, A12, A22, B11, B12, B22, phi, invAll, invB22, - H, a, b0, b, Cy, Cf, Cz, X, R, W}, - {A, B, Q, Z} = QZSort @ QZDecomposition[{g0, g1}]; - gev = GeneralizedEigenvalues[{A, B}]//Chop; - agev = Abs[gev]; - Print[StringForm["Absolute value of generalized eigenvalues: ``", - agev]]; - If[agev[[-1]] <= div, Return[gev]]; - k = Position[Thread[agev > div], True, 1, 1][[1, 1]] - 1; - n = Length[g0]; - r1 = Range[1, k]; - r2 = Range[k + 1, n]; - Q1 = Q[[ r1 ]]; - Q2 = Q[[ r2 ]]; - Z1 = Z[[ All, r1 ]]; - A11 = A[[ r1, r1 ]]; - A12 = A[[ r1, r2 ]]; - A22 = A[[ r2, r2 ]]; - B11 = B[[ r1, r1 ]]; - B12 = B[[ r1, r2 ]]; - B22 = B[[ r2, r2 ]]; - invA11 = Inverse[A11]; - invB22 = Inverse[B22]; - X = Q2.pi; - R = (IdentityMatrix[n-k] - X.PseudoInverse[X]); - (* - rank = MatrixRank[X]; - dim = Dimensions[X]; - svd = SingularValueDecomposition[X]//Chop; - Print[{dim, rank}]; - Print[svd]; - *) - (* - If[Union[Flatten[Chop[R.Q2.psi]]] != {0}, - Print["No solutions exist."]; - Return[Chop[R.Q2.psi]] - ]; - *) - W = Table[B22.MatrixPower[invB22.A22, s-1].invB22.Q2.psi, {s, 1, n - k}]; - W = Transpose[Join @@ (Transpose /@ W)]; - If[Union[Flatten[Chop[R.W]]] != {0}, - Print["No solutions exist."]; - Return[Chop[R.W]] - ]; - If[Dimensions[R][[2]] == Dimensions[Q1.pi][[2]], - If[Union[Flatten[Chop[R.Transpose[Q1.pi]]]] != {0}, - Print["The solution is not unique."]; - Print[Chop[R.Transpose[Q1.pi]]] - ], - Print["The solution is not unique."] - ]; - (* existence *) - (* - eu = {0, 0}; - nunstab = n - k; - etawt = Q2.pi; - neta = Dimensions[pi][[2]]; - ndeta = Min[nunstab, neta]; - If[ndeta == 0, - (* then *) - ueta = Table[]; - (* else *) - - ]; - *) - (* uniqueness *) - - - phi = Q1.pi.PseudoInverse[Q2.pi]; - H = Z.Join[ - MapThread[Join, {invA11, -invA11.(A12 - phi.A22)}], - MapThread[Join, {Table[0, {n-k}, {k}], IdentityMatrix[n - k]}] - ]; - a = Z1.invA11.MapThread[Join, {B11, B12 - phi.B22}]. - ConjugateTranspose[Z]; - b0 = H.Join[Q1 - phi.Q2, Inverse[B22 - A22].Q2].c; - b = H.Join[Q1 - phi.Q2, Table[0, {n - k}, {n}]].psi; - Cy = -H[[ All, r2 ]]; - Cf = invB22.A22; - Cz = invB22.Q2.psi; - Cs = Cy.MatrixPower[Cf, s-1].Cz // Simplify; - {a, b0, b, Cs} // Chop - ] - -Options[CanonicalForm] = {SolveForReducedForm -> True} - -CanonicalForm[equations:{__Equal}, y0_List, z0_List, eta_List, - t_:t, opts___?OptionQ] := - Module[{solve, y1, z1, z, eqns, resid, g0, g1, psi, pi, c}, - solve = SolveForReducedForm /. {opts} /. Options[CanonicalForm]; - y1 = y0 /. t -> t-1; - z1 = Union[Cases[equations, Alternatives @@ (z0 /. t -> t - 1), Infinity]]; - z = Join[z0, z1]; - If[solve, - eqns = Thread[y0 == (y0 /. Solve[equations, y0][[1]])], - eqns = equations - ]; - {resid, g0} = Normal[CoefficientArrays[eqns, y0]]; - resid = -resid; - {g1, psi, pi} = Normal[CoefficientArrays[resid, #][[2]] & /@ {y1, z, eta}]; - c = resid - (g1.y1 + psi.z + pi.eta) // Simplify; - {{g0, g1, c, psi, pi}, {y0, y1, z, eta}} - ] - -ProcessCanonicalForm[{g0_, g1_, c_, psi_, pi_}, k_Integer?Positive, - permList:{__Rule}] := - Module[{n, pmat, R1, R2, G, H, AB}, - {P, \[CapitalOmega]} = JordanDecomposition[g1] // Simplify; - n = Length[g1]; - pmat = PermutationMatrix[permList,n]; - \[CapitalOmega] = pmat.\[CapitalOmega].Transpose[pmat]; - P = P.Transpose[pmat]; - Q = Inverse[P] // Simplify; - R1 = Range[1, k]; - R2 = Range[k + 1, n]; - Q1 = Q[[R1]]; - Q2 = Q[[R2]]; - \[CapitalOmega]11 = \[CapitalOmega][[R1, R1]]; - \[CapitalOmega]12 = \[CapitalOmega][[R1, R2]]; - \[CapitalOmega]21 = \[CapitalOmega][[R2, R1]]; - \[CapitalOmega]22 = \[CapitalOmega][[R2, R2]]; - P1 = P[[All, R1]]; - P2 = P[[All, R2]]; - X = Q2.pi // Simplify; - pseudoinv = Inverse[Transpose[X].X].Transpose[X] // Simplify; - \[CapitalPhi] = Q1.pi.pseudoinv // Simplify; - G = P1.(Q1 - \[CapitalPhi].Q2) // Simplify; - H = (P1.\[CapitalPhi] + P2) // Simplify; - AB = {P1.(\[CapitalOmega]11.Q1 - \[CapitalPhi].\[CapitalOmega]22.Q2), - G.psi}; - {A, B} = Map[FullSimplify, AB, {3}]; - Cs = -H.MatrixPower[\[CapitalOmega]22, -s].Q2.psi // PowerExpand - // Simplify; - B0 = (G + H.Inverse[IdentityMatrix[n - k] - \[CapitalOmega]22].Q2).c - // Simplify; - {A, B0, B, Cs} - ] - -ProcessCanonicalForm[{g0_, g1_, c_, psi_, pi_}, k_Integer?Positive, - sym_:\[Phi]] := - Module[{n, pmat, R1, R2, G, H, AB}, - {P, \[CapitalOmega]} = JordanDecomposition[g1] // Simplify; - n = Length[g1]; - If[!FreeQ[\[CapitalOmega], sym], - sympos = Position[Transpose[\[CapitalOmega], {1, 1}], sym][[1, 1]]; - If[sympos != n, - pmat = SparseArray[Thread[Table[Which[i == sympos, {sympos, n}, - i == n, {n, sympos}, True, {i, i}], {i, n}] -> Table[1, {n}]]]; - \[CapitalOmega] = pmat.\[CapitalOmega].Transpose[pmat]; - P = P.Transpose[pmat] - ] - ]; - Q = Inverse[P] // Simplify; - R1 = Range[1, k]; - R2 = Range[k + 1, n]; - Q1 = Q[[R1]]; - Q2 = Q[[R2]]; - \[CapitalOmega]11 = \[CapitalOmega][[R1, R1]]; - \[CapitalOmega]12 = \[CapitalOmega][[R1, R2]]; - \[CapitalOmega]21 = \[CapitalOmega][[R2, R1]]; - \[CapitalOmega]22 = \[CapitalOmega][[R2, R2]]; - P1 = P[[All, R1]]; - P2 = P[[All, R2]]; - X = Q2.pi // Simplify; - pseudoinv = Inverse[Transpose[X].X].Transpose[X] // Simplify; - \[CapitalPhi] = Q1.pi.pseudoinv // Simplify; - G = P1.(Q1 - \[CapitalPhi].Q2) // Simplify; - H = (P1.\[CapitalPhi] + P2) // Simplify; - AB = {P1.(\[CapitalOmega]11.Q1 - \[CapitalPhi].\[CapitalOmega]22.Q2), - G.psi}; - {A, B} = Map[FullSimplify, AB, {3}]; - Cs = -H.MatrixPower[\[CapitalOmega]22, -s].Q2.psi // PowerExpand - // Simplify; - B0 = (G + H.Inverse[IdentityMatrix[n - k] - \[CapitalOmega]22].Q2).c - // Simplify; - {A, B0, B, Cs} - ] - -CanonicalSolutions[{A_, B0_, B_}, {y0_, y1_, z_}, t_:t] := - Module[{}, - soln = Thread[y0 -> A.y1 + B0 + B.z]; - soln1 = soln /. t -> t - 1; - TableForm[Thread[y0 == (A.y1 + B0 + B.z // Simplify)]] - ] \ No newline at end of file diff --git a/MathematicaFiles/Applications/HierarchicalMetropolis.m b/MathematicaFiles/Applications/HierarchicalMetropolis.m deleted file mode 100755 index f6a08d97bf1bc72a0279c2181c0dcf5ade45d309..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/HierarchicalMetropolis.m +++ /dev/null @@ -1,94 +0,0 @@ -(* HierarchicalMetropolis *) - -HierarchicalMetropolis::usage = "HierarchicalMetropolis[HyperPriorFunction, \ -EntityPriorFunction, LikelihoodFunctions, hyperStart, entityStart, hyperCovMat, \ -entityCovMat, nreps, (opts)]. HyperPriorFunction is a function of the \ -hyperparameters, EntityPriorFunction is a function of the (joined sequence \ -of) entity parameters and hyparameters, while the LikelihoodFunctions are \ -functions on the (sequence of) entity parameters only. Starting values are \ -given by the vector hyperStart and the matrix entityStart. (All of \ -HyperPriorFunction, \ -EntityPriorFunction and LikelihoodFunctions must return log values.) The scale of \ -the random normal draws is controlled by hyperCovMat and entityCovMat. The \ -number of repetitions is given by nrep. The options \ -EntityParametersInBoundsQ and HyperParametersInBoundsQ are used to specify \ -the relavant support. The option ReturnEntityParameterHistory can \ -be used to return the history of the entity parameters in addition to the \ -history of the hyperparameters." - -Options[HierarchicalMetropolis] = { - EntityParametersInBoundsQ -> (True&), - HyperParametersInBoundsQ -> (True&), - ReturnEntityParameterHistory -> False, - ReportProgress -> True, - HyperParameterSkipNumber -> 0} - -HierarchicalMetropolis[ - HyperPriorFunction_, - EntityPriorFunction_, - LikelihoodFunctions_List, - hyperStart_?(VectorQ[#, NumericQ]&), - entityStart_?(MatrixQ[#, NumericQ]&), - hyperCovMat_, - entityCovMat_, - nreps_Integer?Positive, - opts___?OptionQ - ] := - Module[{entityInBoundsQ, hyperInBoundsQ, return, report, entityNum, - entityparmsNum, hyperparmsNum, hyperparms, entityparms, - Lvals, Pvals, PHval, entitychol, hyperchol, entityshocks, x1, - L1, P1, z1, Pz, PHz}, - {entityInBoundsQ, hyperInBoundsQ, return, report} = - {EntityParametersInBoundsQ, HyperParametersInBoundsQ, - ReturnEntityParameterHistory, ReportProgress} /. {opts} /. - Options[HierarchicalMetropolis]; - {entityNum, entityparmsNum} = Dimensions[entityStart]; - hyperparmsNum = Length[hyperStart]; - hyperparms = hyperStart; - entityparms = entityStart; - Lvals = MapThread[Apply, {LikelihoodFunctions, entityparms}]; - Pvals = (EntityPriorFunction @@ Join[#1, hyperparms])& /@ entityparms; - PHval = HyperPriorFunction @@ hyperparms; - {entitychol, hyperchol} = CholeskyDecomposition[(Transpose[#]+#)/2]& /@ - {entityCovMat, hyperCovMat}; - If[report, - Function[{x}, Monitor[x, ProgressIndicator[j, {0, nreps}]], HoldAll], - Identity] @ - Table[ (* hyperparameter loop *) - x1 = entityparms + Transpose[RandomReal[NormalDistribution[0,1], - {entityparmsNum, entityNum}].entitychol]; - Table[ (* entity subloop *) - If[entityInBoundsQ @@ x1[[i]], - (* then *) - L1 = LikelihoodFunctions[[i]] @@ x1[[i]]; - P1 = EntityPriorFunction @@ Join[x1[[i]], hyperparms]; - If[L1 + P1 >= Lvals[[i]] + Pvals[[i]] + Log[RandomReal[]], - (* then, update *) - entityparms[[i]] = x1[[i]]; - Lvals[[i]] = L1; - Pvals[[i]] = P1 - (* else, do nothing *) - ] - (* else, do nothing *) - ], - {i, entityNum}]; (* end of subloop *) - z1 = hyperparms + - RandomReal[NormalDistribution[0,1], hyperparmsNum].hyperchol; - If[hyperInBoundsQ @@ z1, - (* then *) - Pz = (EntityPriorFunction @@ Join[#1, z1])& /@ entityparms; - PHz = HyperPriorFunction @@ z1; - If[Tr[Pz] + PHz >= Tr[Pvals] + PHval + Log[RandomReal[]], - Pvals = Pz; - PHval = PHz; - hyperparms = z1 - (* else, do nothing *) - ] - (* else, do nothing *) - ]; - If[return, {hyperparms, entityparms}, hyperparms], - {j, nreps}] (* end of hyperparameter loop *) - ] - - - diff --git a/MathematicaFiles/Applications/ImportExportBinary.m b/MathematicaFiles/Applications/ImportExportBinary.m deleted file mode 100755 index 30e9fe20bbc8976c6164af21f17d203730a79178..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/ImportExportBinary.m +++ /dev/null @@ -1,138 +0,0 @@ -(* export and import binary files *) - -ExportBinary::usage = -"ExportBinary[file, data] or ExportBinary[file, data, typelist]. \ -ExportBinary takes the options ColumnHeads (a list of strings) \ -and Description (a string). If the typelist is not specified, \ -a typelist composed from \"Integer64\", \"Real64\", and \"TerminatedString\" \ -is inferred from the first row of the data"; - -ImportBinary::usage = "ImportBinary[file] imports a binary file\ -written via ExportBinary."; - -ExportBinary::baddim = "The length of the typelist does not match\ -the number of columns of the data."; - -ExportBinary::badtype = "The typelist includes an invalid type. \ -Valid types are given by $BinaryTypes."; - -Options[ExportBinary] = {ColumnHeadings -> None, Description -> None} - -ExportBinary[file_String, data_, typelist:{__String}, opts:OptionsPattern[]] := - Module[{n, d, desc, m, headings, h, str}, - {n, d} = Dimensions[data]; - If[d != Length[typelist], - Message[ExportBinary::baddim]; - Return[$Failed] - ]; - If[Complement[typelist, $BinaryTypes] != {}, - Message[ExportBinary::badtype]; - Return[$Failed] - ]; - desc = OptionValue[Description]; - m = If[desc === None || Not[StringQ[desc]], 0, 1]; - headings = OptionValue[ColumnHeadings]; - h = If[headings === None, 0, Length[headings]]; - str = OpenWrite[file, BinaryFormat -> True]; - BinaryWrite[str, $ImportExportBinaryHeader, "TerminatedString"]; - BinaryWrite[str, {n, d, m, h}, "Integer32"]; - BinaryWrite[str, typelist, "TerminatedString"]; - If[m == 1, BinaryWrite[str, desc, "TerminatedString"]]; - If[h > 0, BinaryWrite[str, headings, "TerminatedString"]]; - MapThread[BinaryWrite[str, #1, #2]&, {Transpose[data], typelist}]; - Close[str] - ] - -ExportBinary[file_String, data_, opts:OptionsPattern[]] := - Module[{typelist}, - mat = If[VectorQ[data], Partition[data, 1], data]; - typelist = (Head /@ First[mat]) /. - {Integer -> "Integer64", Real -> "Real64", String -> "TerminatedString"}; - ExportBinary[file, mat, typelist, opts] - ] - -ImportBinary[file_String] := - Module[{str, n, d, m, h, typelist, desc, headings, data}, - str = Check[OpenRead[file, BinaryFormat -> True], Return[$Failed]]; - BinaryRead[str, "TerminatedString"]; - {n, d, m, h} = BinaryReadList[str, "Integer32", 4]; - typelist = BinaryReadList[str, "TerminatedString", d]; - If[m == 1, desc = BinaryRead[str, "TerminatedString"]]; - If[h > 0, headings = BinaryReadList[str, "TerminatedString", h]]; - data = Transpose[BinaryReadList[str, #, n] & /@ typelist]; - Close[str]; - Switch[{m, h}, - {0, 0}, data, - {0, _}, {headings, data}, - {1, 0}, {desc, data}, - {1, _}, {desc, headings, data} - ] - ] - -(* check against this list for valid types *) -$BinaryTypes = { - "Byte", - "Character8", - "Character16", - "Complex64", - "Complex128", - "Complex256", - "Integer8", - "Integer16", - "Integer24", - "Integer32", - "Integer64", - "Integer128", - "Real32", - "Real64", - "Real128", - "TerminatedString", - "UnsignedInteger8", - "UnsignedInteger16", - "UnsignedInteger24", - "UnsignedInteger32", - "UnsignedInteger64", - "UnsignedInteger128" - }; - -(* put this at the start of the file *) -$ImportExportBinaryHeader = -"This is a binary file. Following the header information,\n\ -a data matrix of n rows and d columns is stored by columns:\n\ - n of the 1st data type, followed by n of the 2nd data type, etc.\n\ -Here is the format of the header information:\n\ - 1 \"TerminatedString\" (this message)\n\ - 4 \"Integer32\" (n, d, m, h)\n\ - d \"TerminatedString\" (data types, d>=1)\n\ - m \"TerminatedString\" (description, m=0 or m=1)\n\ - h \"TerminatedString\" (column headings, h>=0)\n"; - -(* -ExportBinary[file_String, data_, typelist:{__String}, opts:OptionsPattern[]] := - Module[{n, d, str}, - {n, d} = Dimensions[data]; - If[d != Length[typelist], - Message[ExportBinary::baddim]; - Return[$Failed] - ]; - If[Complement[typelist, $BinaryTypes] != {}, - Message[ExportBinary::badtype]; - Return[$Failed] - ]; - str = OpenWrite[file, BinaryFormat -> True]; - BinaryWrite[str, {n, d}, "Integer32"]; - BinaryWrite[str, typelist, "TerminatedString"]; - MapThread[BinaryWrite[str, #1, #2]&, {Transpose[data], typelist}]; - Close[str] - ] - -ImportBinary[file_String] := - Module[{str, n, d, typelist, data}, - str = OpenRead[file, BinaryFormat -> True]; - {n, d} = Table[BinaryRead[str, "Integer32"], {2}]; - typelist = Table[BinaryRead[str, "TerminatedString"], {d}]; - data = Transpose[BinaryReadList[str, #, n] & /@ typelist]; - Close[str]; - If[d == 1, Flatten[data], data] - ] -*) diff --git a/MathematicaFiles/Applications/ItosLemma.m b/MathematicaFiles/Applications/ItosLemma.m deleted file mode 100755 index 9a341c305547de4f2f90c0bbcaeeea362cbd2da2..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/ItosLemma.m +++ /dev/null @@ -1,365 +0,0 @@ -(* :Title: Ito's Lemma *) - -(* :Author: Mark Fisher *) - -(* :Context: ItosLemma` *) - -(* :Mathematica Version: 3.0 *) - -(* :History: Version 1.0, June 1999. - Version 1.1, June 2000. - Simplified ItoD. - Added option Scalarize to Diffusion. - Added new versions of ItoMake for simplified entry that - use new global symbols DriftSymbol and DiffusionSymbol. - Version 1.1.1, April 2003. Minor changes. - October 2006. Fix OverTilde for Version 6. - (OverTilde moved from Global` to System` context.) -*) - -(* :Sources: -A preliminary version was inspired by the package "Diffusion" written -by Steele and Stine (described in "Mathematica and Diffusions", -chapter 9 of "Economic and Financial Modeling with Mathematica", 1993, -Springer-Verlag, edited by Hal R. Varian). - -For an introduction to stochastic differential equations and Ito's lemma, -see Bernt �ksendal, Stochastic Differential Equations: An Introduction with -Applications, Springer-Verlag (currently in its 5th edition). -*) - -(* :Keywords: Ito's lemma, stochastic calculus, stochastic differential -equations, Brownian motion *) - -(* :Summary: -This package implements Ito's lemma for any number of Ito processes -with any number of arbitrarily-correlated Brownian motions. - -There are two main functions in this package: ItoMake and ItoD. ItoMake -should be used to declare an Ito process prior to using ItoD to compute the -stochastic derivative. For example (assuming the global symbols have been -set as in the housekeeping example below), ItoMake[x[t], \[Mu], \[Sigma]] -creates the global rule x[t + dt] -> x[t] + \[Mu] dt + \[Sigma] Subscript[dB, 1]. -ItoD[f[x[t], t]] constructs a Taylor series for f[x[t + dt], t + dt] around -dt = 0 and Subscript[dB, 1] = 0. The series is first-order in dt and -second-order in Subscript[dB, 1], where "Ito multiplication rules" are -applied to the second-order term. - -The functions Drift and Diffusion can be used to extract the drift and -diffusion from the output of ItoD. - -(***** Housekeeping Notice *****) - -The package relies on six global symbols: TimeSymbol, TimeIncrement, -BrownianIncrement, CorrelationSymbol, DriftSymbol, and DiffusionSymbol. -They can be set at the beginning of each session (after loading ItosLemma) -to more convenient symbols. Here is an example: - -Clear[t, dt, dB, \[Rho], \[Mu], \[Sigma]] -{TimeSymbol, TimeIncrement, BrownianIncrement, - CorrelationSymbol, DriftSymbol, DiffusionSymbol} = - {t, dt, dB, \[Rho], \[Mu], \[Sigma]} - -One way to make these assignments automatic is to copy the preceding -code to the bottom of this file, after the EndPackage[] statement. - -There is a "brief explanation to the code" in the Notebook ItosLemma.nb. - -*) - -(* :Examples: Supplied in the Notebook ItosLemma.nb. *) - -BeginPackage["ItosLemma`"] - -ItosLemma::usage = "ItosLemma.m is a package that implements Ito's Lemma. -The package uses six global symbols: TimeSymbol, TimeIncrement, -BrownianIncrement, CorrelationSymbol, DriftSymbol, and DiffusionSymbol. -They can be defined in terms of more convenient symbols.\n -Example:\n -Clear[t, dt, dB, \[Rho], \[Mu], \[Sigma]];\n -{TimeSymbol, TimeIncrement, BrownianIncrement, CorrelationSymbol, - DriftSymbol, DiffusionSymbol} = {t, dt, dB, \[Rho], \[Mu], \[Sigma]}" - -TimeSymbol::usage = "TimeSymbol is the symbol that represents time." - -TimeIncrement::usage = "TimeIncrement is the symbol that represents an -infinitesimal change in time." - -BrownianIncrement::usage = "BrownianIncrement is the symbol that -represents an infinitesimal change in a Brownian motion." - -CorrelationSymbol::usage = "CorrelationSymbol is the symbol that -represents the correlation between Brownian motions." - -DriftSymbol::usage = "DriftSymbol is the symbol that represents the -drift." - -DiffusionSymbol::usage = "DiffusionSymbol is the symbol that represents -the diffusion." - -ItoD::usage = "ItoD[expr] applies Ito's lemma to expr. ItoD takes the -option OrthogonalBrownians." - -RelativeItoD::usage = "RelativeItoD[expr] computes ItoD[expr]/expr." - -OrthogonalBrownians::usage = "OrthogonalBrownians is an option for ItoD. The -default setting is OrthogonalBrownians -> True." - -SuppressTime::usage = "SuppressTime is an option for ItoD that specifies -whether to suppress the dependence on time in the output. The default -setting is SuppressTime -> True." - -ItoMake::usage = "ItoMake[x[args], mu, sigma] associates a rule with the -(ultimate) head of the x[args]. The TimeSymbol should be one of the -arguments; for example, ItoMake[x[t], \[Mu], \[Sigma]]. For multiple -Brownians, sigma may be a list." - -ItoMakeFromItoD::usage = "ItoMakeFromItoD[name, expr] calls -ItoMake[x[args], Drift[dx], Diffusion[dx]], where dx is the output from -ItoD. ItoMakeFromItoD passes the option BrownianList to Diffusion." - -IncludeArguments::usage = "IncludeArguments is an option for ItoMake (and -related functions) that specifies whether to include the arguments in the -drift and diffusion specifications. IncludeArguments is only used in -vector versions of ItoMake-related functions." - -RelativeItoMake::usage = "RelativeItoMake[name, mu, sigma] calls -ItoMake[name, name mu, name sigma]." - -RelativeItoMakeFromItoD::usage = "RelativeItoMakeFromItoD[name, expr] calls -ItoMake[name, name Drift[expr], name Diffusion[expr]]. RelativeItoMakeFromItoD -passes the option BrownianList to Diffusion." - -ExponentialItoMake::usage = "ExponentialItoMake[name, mu, sigma] calls -ItoMake[name, name (mu + sigma^2/2), name sigma]." - -ExponentialItoMakeFromItoD::usage = "ExponentialItoMakeFromItoD[name, expr] -calls ItoMake[name (Drift[expr] + (1/2)Diffusion[expr].Diffusion[expr]), -Diffusion[expr]]. ExponentialItoMakeFromItoD passes the option BrownianList -to Diffusion." - -VectorItoMake::usage = "VectorItoMake[name, n] makes a vector of n Ito -processes." - -Drift::usage = "Drift[expr] returns the drift of an Ito process." - -Diffusion::usage = "Diffusion[expr] returns the diffusion of an Ito -process. Diffusion takes the options BrownianList and Scalarize." - -BrownianList::usage = "BrownianList is an option for Diffusion. The default -setting is BrownianList -> Automatic." - -Scalarize::usage = "Scalarize is an option for Diffusion. The default -setting is Scalarize -> True, which specifies that a length-one Diffusion -should be returned as a scalar." - -(* Version 6 fix: - Put OverTilde in ItosLemma` context if not in System` context. *) -OverTilde - -Begin["`Private`"] -(***************** code starts here **********************) - -(***** main engine *****) - -Options[ItoD] = {OrthogonalBrownians -> True, SuppressTime -> True} - -SetAttributes[ItoD, Listable] - -ItoD[expr_, opts___?OptionQ] := - Module[{t, dt, dB, rho, suppress, ortho, zerorule, - dtexpr, brownians, dtime, dbrown, d2brown, timedrift, - diffusion, jensen}, - (* get the global values for these symbols *) - {t, dt, dB, rho} = {TimeSymbol, TimeIncrement, BrownianIncrement, - CorrelationSymbol}; - {suppress, ortho} = {SuppressTime, OrthogonalBrownians} /. - {opts} /. Options[ItoD]; - zerorule = Subscript[dB, _] | dt -> 0; - (* identify the Ito processes *) - dtexpr = expr /. t -> t + dt; - (* find the brownians *) - (* if there are no brownians, make one up *) - brownians = Union[Cases[dtexpr, Subscript[dB, _], {0, Infinity}]]; - If[brownians === {}, brownians = {Subscript[dB, 1]}]; - (* compute the derivatives *) - dtime = D[dtexpr, dt]; - dbrown = D[dtexpr, #]& /@ brownians; - d2brown = D[dbrown, #]& /@ brownians; - (* compute the "ito-taylor series" *) - timedrift = (dtime /. zerorule) dt; - diffusion = (dbrown /. zerorule) . brownians; - jensen = (1/2) * - Expand[brownians . (d2brown /. zerorule) . brownians] /. - {Subscript[dB, _]^2 -> dt, - Subscript[dB, i_] Subscript[dB, j_] -> - If[TrueQ[ortho], - 0, - Subscript[rho, i, j] dt]}; - (* assemble the parts *) - (diffusion + Collect[timedrift + jensen, dt]) /. - If[TrueQ[suppress], f_[t] -> f, {}] - ] - -(* related function to simplify output in special cases *) - -RelativeItoD[expr_, opts___?OptionQ] := - Collect[ItoD[expr, opts]/expr /. - If[TrueQ[SuppressTime /. {opts} /. Options[ItoD]], - (* then *) - f_[TimeSymbol] -> f, - (* else *) - {}], - TimeIncrement, Simplify] - -(***** extractors *****) - -Drift[expr_] := Coefficient[expr, TimeIncrement] - -Diffusion::lost = "BrownianList omitted ``." - -Options[Diffusion] = {BrownianList -> Automatic, Scalarize -> True} - -Diffusion[expr_, opts___?OptionQ] := - Module[{dB, blist, scalar, found, brownians, lost}, - (* get the global value for this symbol *) - dB = BrownianIncrement; - {blist, scalar} = {BrownianList, Scalarize} /. {opts} /. - Options[Diffusion]; - found = Union[Cases[expr, Subscript[dB, _], {0, Infinity}]]; - If[TrueQ[blist === Automatic], - (* then *) - brownians = found, - (* else *) - brownians = blist; - lost = Complement[found, blist]; - If[lost =!= {}, Message[Diffusion::lost, lost]]]; - If[TrueQ[scalar] && Length[brownians] === 1, - (* then *) - Coefficient[expr, First @ brownians], - (* else *) - Coefficient[expr, #]& /@ brownians] - ] - -(***** constructor *****) - -ItoMake::notime = "TimeSymbol `1` does not appear as an argument in `2`." -ItoMake::badhead = "The Head of `1` matches one of `2`, `3`, or `4`." -ItoMake::badarg = "One or more arguments of `1` matches either `2` or `3`." - -(* only used in vector functions (see below) *) -Options[ItoMake] = {IncludeArguments -> False} - -ItoMake[x_[args__], mu_, sig_] := - Module[{t, dt, dB, diffusion, head, lhs}, - (* get the global values for these symbols *) - {t, dt, dB} = {TimeSymbol, TimeIncrement, BrownianIncrement}; - If[FreeQ[{args}, t], - Message[ItoMake::notime, t, x[args]]; Return[$Failed]]; - If[MatchQ[x, t | dt | dB], - Message[ItoMake::badhead, x[args], t, dt, dB]; Return[$Failed]]; - If[MemberQ[{args}, dt | dB, Infinity], - Message[ItoMake::badarg, x[args], dt, dB]; Return[$Failed]]; - diffusion = Switch[sig, - _List, sig . Array[Subscript[dB, #]&, Length[sig]], - _, sig Subscript[dB, 1]]; - (* find the ultimate Head *) - head = FixedPointList[Head, x][[-3]]; - lhs = Block[Evaluate[{head}], - (* construct the pattern and Hold it *) - Hold @ Evaluate[ - If[# === t, # + dt, Pattern[#, Blank[]]]& /@ x[args] - ]]; - (* define the rule and return the SDE *) - (Set @@ Append[lhs, x[args] + mu dt + diffusion]) - x[args] - ] - -(*****************************************************************) -(* ItoMake-related functions to simplify input for special cases *) -(*****************************************************************) - -RelativeItoMake[x_[args__], mu_, sig_] := - ItoMake[x[args], x[args] mu, x[args] sig] - -ExponentialItoMake[x_[args__], mu_, sig_]:= - ItoMake[x[args], x[args] (mu + sig.sig/2) /. Dot -> Times, x[args] sig] - -(* make Ito process from output of ItoD *) - -ItoMakeFromItoD[x_[args__], expr_, opts___?OptionQ] := - With[{diff = Diffusion[expr, opts]}, - ItoMake[x[args], Drift[expr], If[diff === {}, {0}, diff]] - ] - -RelativeItoMakeFromItoD[x_[args__], expr_, opts___?OptionQ] := - ItoMake[x[args], x[args] Drift[expr], - x[args] Diffusion[expr, opts]] - -ExponentialItoMakeFromItoD[x_[args__], expr_, opts___?OptionQ] := - With[{diff = Diffusion[expr, Scalarize -> False, opts]}, - ItoMake[x[args], x[args] (Drift[expr] + (1/2) diff.diff), - x[args] diff] - ] - -(* scalar process with vector browians *) - -ItoMake[x_[args__], mu_, sig_, n_Integer, opts___?OptionQ] := - ItoMake[x[args], ##]& @@ makeargs[x[args], mu, sig, n, opts] - -RelativeItoMake[x_[args__], mu_, sig_, n_Integer, opts___?OptionQ] := - RelativeItoMake[x[args], ##]& @@ makeargs[x[args], mu, sig, n, opts] - -ExponentialItoMake[x_[args__], mu_, sig_, n_Integer, opts___?OptionQ] := - ExponentialItoMake[x[args], ##]& @@ makeargs[x[args], mu, sig, n, opts] - -(* auxiliary function *) -makeargs[x_[args__], mu_, sig_, n_, opts___?OptionQ] := - {mu[x][args], Array[Subscript[sig, #][x][args]&, n]} /. - If[TrueQ[IncludeArguments /. {opts} /. Options[ItoMake]], {}, - f_[x][args] :> f[x]] - -(* vector Ito processes *) - -(* n Brownian motion processes *) -VectorItoMake[x_[args__], 0, 1, n_Integer] := - Table[ItoMake[Subscript[x, i][args], 0, - Table[If[i == j, 1, 0], {j, n}]], {i, n}] - -(* n Ito processes, n Brownians *) -VectorItoMake[x_[args__], mu_, sig_, n_Integer, opts___?OptionQ] := - Table[ItoMake[Subscript[x, i][args], mu, sig, n, opts], {i, n}] - -(* m Ito processes, n Brownians *) -VectorItoMake[x_[args__], mu_, sig_, {m_Integer, n_Integer}, - opts___?OptionQ] := - Table[ItoMake[Subscript[x, i][args], mu, sig, n, opts], {i, m}] - -(* use default symbols for drift and diffusion *) - -(#[x_[args__]] := #[x[args], - Subscript[DriftSymbol, x], Subscript[DiffusionSymbol, x]])& /@ - {ItoMake, RelativeItoMake} - -Options[ExponentialItoMake] = {OverTilde -> True} - -ExponentialItoMake[x_[args__], opts___?OptionQ] := - Module[{tilde, fun}, - tilde = OverTilde /. {opts} /. Options[ExponentialItoMake]; - fun = If[TrueQ[tilde], OverTilde, Identity]; - ExponentialItoMake[x[args], - Subscript[fun[DriftSymbol], x], - Subscript[DiffusionSymbol, x]] - ] - -(#[x_[args__], n_Integer, opts___?OptionQ] := #[x[args], - DriftSymbol, DiffusionSymbol, n, opts])& /@ - {ItoMake, RelativeItoMake, ExponentialItoMake} - -VectorItoMake[x_[args__], n_Integer, opts___?OptionQ] := - VectorItoMake[x[args], DriftSymbol, DiffusionSymbol, n, opts] - -VectorItoMake[x_[args__], {m_Integer, n_Integer}, opts___?OptionQ] := - VectorItoMake[x[args], DriftSymbol, DiffusionSymbol, {m, n}, opts] - -End[] -EndPackage[] diff --git a/MathematicaFiles/Applications/KalmanFilter.m b/MathematicaFiles/Applications/KalmanFilter.m deleted file mode 100755 index 7555e8b99b5fe75b9697f24a977ced71a42d3c32..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/KalmanFilter.m +++ /dev/null @@ -1,65 +0,0 @@ -(* Kalman Filter *) - -(* - transition and measurement equations: - x10 = a + F.x0 + w, where w \sim N(0, Q) - y = b + H.x10 + v, where v \sim N(0, R) - - initialize with prior mean, covariance, and loglikelihood: (m0, P0, LL0) - - predict: - m10 = a + F.m0; - P10 = F.P0.Transpose[F] + Q; - - update: - z = y - (b + H.m10); - Sinv = Inverse[H.P10.Transpose[H] + R]; - K = P10.H.Sinv; - m11 = m10 + K.z; - P11 = P10 - K.(H.P10); - - loglikelihood: - LL1 = LL0 -.5(1/Det[Sinv] + z.Sinv.z) - - *) - -KalmanFilter::usage = "KalmanFilter[{m0, P0}, y, \ -{{a,F},{b,H}}, {Q,R}] returns the list {{m0,P0}, {m1, P1}, ...} \ -with the default setting ComputeLogLikelihood -> False, where \ -{mi, Pi} are the mean (vector) and covariance (matrix) of the \ -state conditional on the data y (a matrix; the list of observations) \ -up through yi. By setting ComputeLogLikelihood -> True, KalmanFilter \ -returns the loglikelihood." - -Options[KalmanFilter] = {ComputeLogLikelihood -> False} - -KalmanFilter[ - {m0_, P0_}, - y_?MatrixQ, - {{a_, F_}, {b_, H_}}, - {Q_, R_}, - opts:OptionsPattern[]] := - If[OptionValue[ComputeLogLikelihood], - Fold[KalmanFilter[##, {{a, F}, {b, H}}, {Q, R}]&, {m0, P0, 0}, y][[-1]] - - (1/2) * Log[2 Pi] * (Times @@ Dimensions[y]), - FoldList[KalmanFilter[##, {{a, F}, {b, H}}, {Q, R}]&, {m0, P0}, y] - ] - -KalmanFilter[{m0_, P0_, LL0_}, y_?VectorQ, {{a_, F_}, {b_, H_}}, {Q_, R_}] := - Module[{m10, P10, z, Sinv, K}, - m10 = a + F.m0; - P10 = F.P0.Transpose[F] + Q; - z = y - (b + H.m10); - Sinv = Inverse[H.P10.Transpose[H] + R]; - K = P10.H.Sinv; - {m10, P10, LL0} + {K.z, -K.(H.P10), (1/2) * (Log[Det[Sinv]] - z.Sinv.z)} - ] - -KalmanFilter[{m0_, P0_}, y_?VectorQ, {{a_, F_}, {b_, H_}}, {Q_, R_}] := - Module[{m10, P10, K}, - m10 = a + F.m0; - P10 = F.P0.Transpose[F] + Q; - K = P10.H.Inverse[H.P10.Transpose[H] + R]; - {m10 + K.(y - (b + H.m10)), P10 - K.(H.P10)} - ] - diff --git a/MathematicaFiles/Applications/Kernel Configuration.nb b/MathematicaFiles/Applications/Kernel Configuration.nb deleted file mode 100755 index 92c93189e54a0fde55aa22e78293bc59e2bba26f..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/Kernel Configuration.nb +++ /dev/null @@ -1,542 +0,0 @@ -(* Content-type: application/mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 6.0' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 145, 7] -NotebookDataLength[ 18827, 533] -NotebookOptionsPosition[ 17579, 485] -NotebookOutlinePosition[ 17939, 501] -CellTagsIndexPosition[ 17896, 498] -WindowFrame->Normal -ContainsDynamic->False*) - -(* Beginning of Notebook Content *) -Notebook[{ - -Cell[CellGroupData[{ -Cell["Setup", "Section", - CellChangeTimes->{{3.411637868640625*^9, 3.41163786978125*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"RemoteKernel", "[", - RowBox[{ - RowBox[{"node_Integer", "?", "Positive"}], ",", - RowBox[{"number_:", "1"}]}], "]"}], ":=", "\[IndentingNewLine]", - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"n", "=", - RowBox[{"ToString", "[", "node", "]"}]}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{ - RowBox[{"\"\<Remote-\>\"", " ", "<>", "n", "<>", "\"\<-\>\"", "<>", - RowBox[{"ToString", "[", "number", "]"}]}], "\[Rule]", - RowBox[{"{", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"\"\<AppendNameToCellLabel\>\"", "\[Rule]", "True"}], ",", - "\[IndentingNewLine]", - RowBox[{"\"\<AutoStartOnLaunch\>\"", "\[Rule]", "False"}], ",", - RowBox[{ - "\"\<MLOpenArguments\>\"", "\[Rule]", - "\"\<-LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract\ -\>\""}], ",", "\[IndentingNewLine]", - RowBox[{"\"\<LoginScript\>\"", "\[Rule]", - RowBox[{ - "\"\<\\\"`java`\\\" -jar \\\"`mathssh`\\\" f1mef14@192.168.2.\>\"", "<>", - "n", "<>", - "\"\< math -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName \ -\\\"`linkname`\\\" -LinkHost `ipaddress`\>\""}]}]}], "\[IndentingNewLine]", - "}"}]}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.411634633125*^9, 3.411634807734375*^9}, { - 3.41163483990625*^9, 3.41163487059375*^9}, {3.4116349413125*^9, - 3.411635052734375*^9}, {3.411636412890625*^9, 3.411636523328125*^9}, { - 3.411637914078125*^9, 3.411637927171875*^9}, {3.41164245039625*^9, - 3.41164245189625*^9}, {3.411642779786875*^9, 3.411642802911875*^9}, { - 3.4117211805754924`*^9, 3.4117211839433427`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"RemoteKernel", "[", "___", "]"}], ":=", - RowBox[{"{", "}"}]}]], "Input", - CellChangeTimes->{{3.411636201078125*^9, 3.411636216515625*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Execute", "Section", - CellChangeTimes->{{3.41163787425*^9, 3.41163787621875*^9}}], - -Cell[BoxData[{ - RowBox[{ - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"n", "=", "4"}], "}"}], ",", - RowBox[{"(*", " ", - RowBox[{ - "set", " ", "this", " ", "for", " ", "the", " ", "number", " ", "of", - " ", "local", " ", "kernels"}], " ", "*)"}], "\[IndentingNewLine]", - RowBox[{"$LocalEvaluatorNames", "=", "\[IndentingNewLine]", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{ - RowBox[{"\"\<Local-\>\"", "<>", - RowBox[{"ToString", "[", "i", "]"}]}], "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\"\<AppendNameToCellLabel\>\"", "\[Rule]", "True"}], ",", - RowBox[{"\"\<AutoStartOnLaunch\>\"", "\[Rule]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"i", "\[Equal]", "1"}], ",", "True", ",", "False"}], - "]"}]}]}], "}"}]}], ",", - RowBox[{"{", - RowBox[{"i", ",", "n"}], "}"}]}], "]"}]}]}], "]"}], ";"}], "\n", - RowBox[{ - RowBox[{"$RemoteEvaluatorNames", "=", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"RemoteKernel", "[", "n", "]"}], ",", - RowBox[{"{", - RowBox[{"n", ",", - RowBox[{"{", - RowBox[{"3", ",", "4", ",", "5", ",", "7", ",", "9", ",", "10"}], - "}"}]}], "}"}]}], "]"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"$EvaluatorNames", "=", - RowBox[{"Join", "[", - RowBox[{"$LocalEvaluatorNames", ",", "$RemoteEvaluatorNames"}], "]"}]}], - ";"}]}], "Input", - CellChangeTimes->{{3.4116353105*^9, 3.411635337125*^9}, - 3.41163537509375*^9, {3.411637895125*^9, 3.41163790490625*^9}, - 3.411638998828125*^9, {3.41164218077125*^9, 3.411642186615*^9}, { - 3.4117199701068263`*^9, 3.411720120001479*^9}, {3.4117211680707884`*^9, - 3.4117211684138107`*^9}, {3.4132829865224905`*^9, 3.4132829997768354`*^9}}],\ - - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Labeled", "[", - RowBox[{ - RowBox[{"Framed", "[", - RowBox[{"Column", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"Column", "[", - RowBox[{"$LocalEvaluatorNames", "[", - RowBox[{"[", - RowBox[{"All", ",", "1"}], "]"}], "]"}], "]"}], ",", - RowBox[{"Column", "[", - RowBox[{"$RemoteEvaluatorNames", "[", - RowBox[{"[", - RowBox[{"All", ",", "1"}], "]"}], "]"}], "]"}]}], "}"}], ",", - RowBox[{"Dividers", "\[Rule]", "Center"}]}], "]"}], "]"}], ",", - "\"\<kernels\>\"", ",", "Top"}], "]"}]], "Input", - CellChangeTimes->{{3.411711718984375*^9, 3.4117117889375*^9}}], - -Cell[BoxData[ - InterpretationBox[GridBox[{ - { - TagBox["\<\"kernels\"\>", - "Labeled", - Editable->True, - Selectable->True]}, - { - TagBox[ - TagBox[ - FrameBox[ - TagBox[GridBox[{ - { - TagBox[GridBox[{ - {"\<\"Local-1\"\>"}, - {"\<\"Local-2\"\>"}, - {"\<\"Local-3\"\>"}, - {"\<\"Local-4\"\>"} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Column"]}, - { - TagBox[GridBox[{ - {"\<\"Remote-3-1\"\>"}, - {"\<\"Remote-4-1\"\>"}, - {"\<\"Remote-5-1\"\>"}, - {"\<\"Remote-7-1\"\>"}, - {"\<\"Remote-9-1\"\>"}, - {"\<\"Remote-10-1\"\>"} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Column"]} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - - GridBoxDividers->{ - "Columns" -> {False, {True}, False}, - "Rows" -> {False, {True}, False}}, - - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - RowsEqual->False], - "Column"], - StripOnInput->False], - "Labeled", - Editable->True, - Selectable->True], - "SkipImageSizeLevel"]} - }, - BaselinePosition->{2, 1}, - GridBoxAlignment->{ - "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Center}}, - "RowsIndexed" -> {}}, - GridBoxItemSize->{ - "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, - "RowsIndexed" -> {}}], - Labeled[ - Framed[ - Column[{ - Column[{"Local-1", "Local-2", "Local-3", "Local-4"}], - Column[{ - "Remote-3-1", "Remote-4-1", "Remote-5-1", "Remote-7-1", "Remote-9-1", - "Remote-10-1"}]}, Dividers -> Center]], "kernels", Top], - Editable->False, - Selectable->False]], "Output", - CellChangeTimes->{{3.41171172759375*^9, 3.411711789359375*^9}, - 3.4117197073189096`*^9, 3.4117201430453815`*^9, 3.4117211894628754`*^9, - 3.4132830024779577`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"$LocalEvaluatorNames", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]], "Input", - CellChangeTimes->{{3.4117213327756743`*^9, 3.4117213419316416`*^9}}], - -Cell[BoxData["\<\"Local-1\"\>"], "Output", - CellChangeTimes->{{3.411721338250537*^9, 3.411721342305991*^9}, - 3.413283010220128*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{"SetOptions", "[", - RowBox[{"$FrontEnd", ",", - RowBox[{"EvaluatorNames", "\[Rule]", "$EvaluatorNames"}], ",", - RowBox[{"Evaluator", "\[Rule]", - RowBox[{"$LocalEvaluatorNames", "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}]}], "]"}]], "Input", - CellChangeTimes->{{3.41163507884375*^9, 3.411635098296875*^9}, { - 3.4116353820625*^9, 3.411635392546875*^9}, {3.4116389860625*^9, - 3.411638987765625*^9}, {3.411719686944728*^9, 3.4117196930647883`*^9}, - 3.411721348560749*^9}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Row", "[", - RowBox[{"{", - RowBox[{"\"\<Default kernel: \>\"", ",", - RowBox[{"Evaluator", "/.", - RowBox[{"Options", "[", - RowBox[{"$FrontEnd", ",", "Evaluator"}], "]"}]}]}], "}"}], - "]"}]], "Input", - CellChangeTimes->{{3.411711404875*^9, 3.411711409171875*^9}, { - 3.411711819984375*^9, 3.411711851078125*^9}}], - -Cell[BoxData[ - InterpretationBox[ - RowBox[{"\<\"Default kernel: \"\>", - "\[InvisibleSpace]", "\<\"Local-1\"\>"}], - Row[{"Default kernel: ", "Local-1"}]]], "Output", - CellChangeTimes->{ - 3.411711409671875*^9, {3.411711833890625*^9, 3.411711851625*^9}, - 3.4117197177948303`*^9, 3.4117201658082604`*^9, 3.4117213544255595`*^9, - 3.4117214639852095`*^9, 3.4132830147743464`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Column", "[", - RowBox[{ - RowBox[{"EvaluatorNames", "/.", - RowBox[{"Options", "[", - RowBox[{"$FrontEnd", ",", "EvaluatorNames"}], "]"}]}], ",", - RowBox[{"Dividers", "\[Rule]", "All"}], ",", - RowBox[{"Spacings", "\[Rule]", "2"}]}], "]"}]], "Input", - CellChangeTimes->{{3.411721517938345*^9, 3.4117215356575594`*^9}}], - -Cell[BoxData[ - TagBox[GridBox[{ - { - RowBox[{"\<\"Local-1\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "True"}]}], "}"}]}]}, - { - RowBox[{"\<\"Local-2\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}]}], - "}"}]}]}, - { - RowBox[{"\<\"Local-3\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}]}], - "}"}]}]}, - { - RowBox[{"\<\"Local-4\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}]}], - "}"}]}]}, - { - RowBox[{"\<\"Remote-3-1\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}], ",", - RowBox[{"\<\"MLOpenArguments\"\>", - "\[Rule]", "\<\"-LinkMode Listen -LinkProtocol TCPIP -LinkOptions \ -MLDontInteract\"\>"}], ",", - RowBox[{"\<\"LoginScript\"\>", - "\[Rule]", "\<\"\\\"`java`\\\" -jar \\\"`mathssh`\\\" \ -f1mef14@192.168.2.3 math -mathlink -LinkMode Connect -LinkProtocol TCPIP \ --LinkName \\\"`linkname`\\\" -LinkHost `ipaddress`\"\>"}]}], "}"}]}]}, - { - RowBox[{"\<\"Remote-4-1\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}], ",", - RowBox[{"\<\"MLOpenArguments\"\>", - "\[Rule]", "\<\"-LinkMode Listen -LinkProtocol TCPIP -LinkOptions \ -MLDontInteract\"\>"}], ",", - RowBox[{"\<\"LoginScript\"\>", - "\[Rule]", "\<\"\\\"`java`\\\" -jar \\\"`mathssh`\\\" \ -f1mef14@192.168.2.4 math -mathlink -LinkMode Connect -LinkProtocol TCPIP \ --LinkName \\\"`linkname`\\\" -LinkHost `ipaddress`\"\>"}]}], "}"}]}]}, - { - RowBox[{"\<\"Remote-5-1\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}], ",", - RowBox[{"\<\"MLOpenArguments\"\>", - "\[Rule]", "\<\"-LinkMode Listen -LinkProtocol TCPIP -LinkOptions \ -MLDontInteract\"\>"}], ",", - RowBox[{"\<\"LoginScript\"\>", - "\[Rule]", "\<\"\\\"`java`\\\" -jar \\\"`mathssh`\\\" \ -f1mef14@192.168.2.5 math -mathlink -LinkMode Connect -LinkProtocol TCPIP \ --LinkName \\\"`linkname`\\\" -LinkHost `ipaddress`\"\>"}]}], "}"}]}]}, - { - RowBox[{"\<\"Remote-7-1\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}], ",", - RowBox[{"\<\"MLOpenArguments\"\>", - "\[Rule]", "\<\"-LinkMode Listen -LinkProtocol TCPIP -LinkOptions \ -MLDontInteract\"\>"}], ",", - RowBox[{"\<\"LoginScript\"\>", - "\[Rule]", "\<\"\\\"`java`\\\" -jar \\\"`mathssh`\\\" \ -f1mef14@192.168.2.7 math -mathlink -LinkMode Connect -LinkProtocol TCPIP \ --LinkName \\\"`linkname`\\\" -LinkHost `ipaddress`\"\>"}]}], "}"}]}]}, - { - RowBox[{"\<\"Remote-9-1\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}], ",", - RowBox[{"\<\"MLOpenArguments\"\>", - "\[Rule]", "\<\"-LinkMode Listen -LinkProtocol TCPIP -LinkOptions \ -MLDontInteract\"\>"}], ",", - RowBox[{"\<\"LoginScript\"\>", - "\[Rule]", "\<\"\\\"`java`\\\" -jar \\\"`mathssh`\\\" \ -f1mef14@192.168.2.9 math -mathlink -LinkMode Connect -LinkProtocol TCPIP \ --LinkName \\\"`linkname`\\\" -LinkHost `ipaddress`\"\>"}]}], "}"}]}]}, - { - RowBox[{"\<\"Remote-10-1\"\>", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"AppendNameToCellLabel\"\>", "\[Rule]", "True"}], ",", - RowBox[{"\<\"AutoStartOnLaunch\"\>", "\[Rule]", "False"}], ",", - RowBox[{"\<\"MLOpenArguments\"\>", - "\[Rule]", "\<\"-LinkMode Listen -LinkProtocol TCPIP -LinkOptions \ -MLDontInteract\"\>"}], ",", - RowBox[{"\<\"LoginScript\"\>", - "\[Rule]", "\<\"\\\"`java`\\\" -jar \\\"`mathssh`\\\" \ -f1mef14@192.168.2.10 math -mathlink -LinkMode Connect -LinkProtocol TCPIP \ --LinkName \\\"`linkname`\\\" -LinkHost `ipaddress`\"\>"}]}], "}"}]}]} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - GridBoxDividers->{"Columns" -> {{True}}, "Rows" -> {{True}}}, - GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - GridBoxSpacings->{"Columns" -> {{Automatic}}, "Rows" -> {{2}}}, - RowsEqual->False], - "Column"]], "Output", - CellChangeTimes->{{3.411721523615981*^9, 3.411721547215604*^9}, - 3.413283016501808*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Column", "[", - RowBox[{ - RowBox[{"Options", "[", - RowBox[{"EvaluationNotebook", "[", "]"}], "]"}], ",", - RowBox[{"Dividers", "\[Rule]", "All"}], ",", - RowBox[{"Spacings", "\[Rule]", "2"}]}], "]"}]], "Input", - CellChangeTimes->{{3.4117209304315224`*^9, 3.411720938955881*^9}, { - 3.411721003806344*^9, 3.4117210062329865`*^9}}], - -Cell[BoxData[ - TagBox[GridBox[{ - { - RowBox[{ - "FrontEndVersion", - "\[Rule]", "\<\"6.0 for Microsoft Windows (32-bit) (June 19, \ -2007)\"\>"}]}, - { - RowBox[{"ShowSelection", "\[Rule]", "True"}]}, - { - RowBox[{"StyleDefinitions", "\[Rule]", "\<\"Default.nb\"\>"}]}, - { - RowBox[{"WindowMargins", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"0", ",", "Automatic"}], "}"}], ",", - RowBox[{"{", - RowBox[{"Automatic", ",", "0"}], "}"}]}], "}"}]}]}, - { - RowBox[{"WindowSize", "\[Rule]", - RowBox[{"{", - RowBox[{"869", ",", "885"}], "}"}]}]} - }, - ColumnsEqual->False, - GridBoxAlignment->{"Columns" -> {{Left}}}, - GridBoxDividers->{"Columns" -> {{True}}, "Rows" -> {{True}}}, - GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, - GridBoxSpacings->{"Columns" -> {{Automatic}}, "Rows" -> {{2}}}, - RowsEqual->False], - "Column"]], "Output", - CellChangeTimes->{{3.4117209255782375`*^9, 3.411720939484765*^9}, - 3.4117210063263187`*^9, 3.4117213576855206`*^9, 3.4117215494149075`*^9, - 3.41328302099321*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Example: Create notebook with given kernel", "Subsection", - CellChangeTimes->{{3.4116379764375*^9, 3.41163799096875*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"CreateDocument", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"Evaluator", "\[Rule]", "\"\<Remote-3-1\>\""}]}], "]"}], - ";"}]], "Input", - CellChangeTimes->{{3.4116428281775*^9, 3.411642831724375*^9}, - 3.4117116316875*^9, 3.4117208425435123`*^9, {3.411721424101379*^9, - 3.4117214260043225`*^9}, {3.4132830347500887`*^9, 3.413283035299736*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"CreateDocument", "[", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"Evaluator", "\[Rule]", "\"\<Local-1\>\""}]}], "]"}], - ";"}]], "Input", - CellChangeTimes->{{3.4116428281775*^9, 3.411642831724375*^9}, { - 3.4117116316875*^9, 3.411711652359375*^9}, {3.4117214288119445`*^9, - 3.4117214291706963`*^9}}] -}, Open ]] -}, Open ]] -}, -WindowSize->{869, 885}, -WindowMargins->{{0, Automatic}, {Automatic, 0}}, -ShowSelection->True, -FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{} -*) -(*CellTagsIndex -CellTagsIndex->{} -*) -(*NotebookFileOutline -Notebook[{ -Cell[CellGroupData[{ -Cell[590, 23, 89, 1, 88, "Section"], -Cell[682, 26, 1682, 36, 295, "Input"], -Cell[2367, 64, 175, 4, 52, "Input"] -}, Open ]], -Cell[CellGroupData[{ -Cell[2579, 73, 87, 1, 88, "Section"], -Cell[2669, 76, 1820, 45, 185, "Input"], -Cell[CellGroupData[{ -Cell[4516, 126, 689, 18, 119, "Input"], -Cell[5208, 146, 2521, 78, 231, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[7766, 229, 190, 4, 52, "Input"], -Cell[7959, 235, 134, 2, 52, "Output"] -}, Open ]], -Cell[8108, 240, 536, 11, 75, "Input"], -Cell[CellGroupData[{ -Cell[8669, 255, 355, 9, 52, "Input"], -Cell[9027, 266, 385, 8, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[9449, 279, 357, 8, 75, "Input"], -Cell[9809, 289, 5274, 116, 1090, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[15120, 410, 364, 8, 52, "Input"], -Cell[15487, 420, 1145, 33, 224, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[16669, 458, 127, 1, 46, "Subsection"], -Cell[16799, 461, 400, 9, 52, "Input"], -Cell[17202, 472, 349, 9, 35, "Input"] -}, Open ]] -}, Open ]] -} -] -*) - -(* End of internal cache information *) diff --git a/MathematicaFiles/Applications/MaxEntSimplexDistribution.m b/MathematicaFiles/Applications/MaxEntSimplexDistribution.m deleted file mode 100755 index 15b4cc2f37fddfe3482ecc4bc403a81bf6e91d27..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/MaxEntSimplexDistribution.m +++ /dev/null @@ -1,350 +0,0 @@ -(* :Title: MaxEntSimplexDistribution *) - -(* :Author: Mark Fisher *) - -(* :Version: 0.1 November 2005 *) - -(* :Mathematica Version: 5.0 - I use "f @@@ expr" syntax for "Apply[f, expr, {1}]". - Maybe other things as well. *) - -(* :Summary: Maximum entropy distribution on a simplex *) - -(* :References: - Mark Fisher (2005) Maximum Entropy on a Simplex: An Expository Note. - Unpublished - E. T. Jaynes (2003) Probability Theory: The Logic of Science. - Cambridge University Press. -*) - -(* :Notes: - There are a few tricky issues regarding LambdaOK and LambdaLimit dealing - with precision. As a consequence, PartitionFunction[{1, 1.}] returns an - infinite-precision result while PartitionFunction[{1., 1}] a machine- - precision result. - - At some point I might try to compile - Mean[MaxEntSimplexDistribution[lambda]] for cases that fail LambdaOK. - *) - -BeginPackage["MaxEntSimplexDistribution`", { - "Utilities`FilterOptions`"}] - -MaxEntSimplexDistribution::usage = "MaxEntSimplexDistribution[\[Lambda]] -represents the maximum entropy distribution on a simplex given the -parameter vector \[Lambda]. PDF[MaxEntSimplexDistribution[\[Lambda]], x] -returns the PDF, where x is a vector of the same length as \[Lambda]. -PDF[MaxEntSimplexDistribution[\[Lambda]], x, pos] returns the marginal PDF -for x[[pos]], where pos is a list of positions and \[Lambda] and x are from -the joint distribution. PDF[MaxEntSimplexDistribution[\[Lambda]], x, sum] -returns the conditional PDF for x (and its associated \[Lambda]), given the -sum of conditioning variables. Mean, Covariance, Variance, -StandardDeviation, and Entropy are defined for -MaxEntSimplexDistribution[\[Lambda]], as are Random and RandomArray. If -Length[\[Lambda]] > 1, then Random calls MaxEntSimplexGibbs[\[Lambda], 2 * -Length[\[Lambda]]] and returns the last draw; otherwise, Random computes -iid draws directly." - -PartitionFunction::usage = "PartitionFunction[\[Lambda]] returns the -partition function given the vector lambda. PartitionFunction[b][\[Lambda]] -computes the partition function with an upper bound of b. PartitionFunction -is the normalization factor for PDF[MaxEntSimplexDistribution[\[Lambda]], -x]." - -MaxEntSimplexGibbs::usage = "MaxEntSimplexGibbs[\[Lambda], n] returns n -draws from the Gibbs sampler for the maximum entropy distribution on a -simplex given the vector lambda. The sampler is initialized with -Mean[MaxEntSimplexDistribution[\[Lambda]]]. If Length[\[Lambda]] == 1, then -the draws are iid from the univariate distribution." - -MaxEntSimplexInvertMean::usage = "MaxEntSimplexInvertMean[mean] returns the -\[Lambda] vector associated with the given mean. Options can be passed to -FindRoot, which MaxEntSimplexInvertMean calls. In addition, -MaxEntSimplexInvertMean takes the option StartingValues which can be used -to pass a list of starting values to FindRoot. The default setting is -StartingValues -> Automatic." - -Entropy::usage = "Entropy[MaxEntSimplexDistribution[\[Lambda]]] returns the -entropy of the given distribution, where \[Lambda] is a vector." - -LambdaOK::usage = "LambdaOK[\[Lambda]] returns True if no component of -\[Lambda] is zero and if no two components are equal. LambdaOK is used to -trap arguments to a number of functions related to maximum entropy." - -LambdaLimit::usage = "LambdaLimit[\[Lambda], fun] computes the limit for -fun[\[Lambda]], where fun is typically PartitionFunction or its gradient or -Hessian." - -MeanOK::usage = "MeanOK[mean] returns True if no component of mean equals -(1 - Tr[mean]) and if no two components are equal. MeanOK is used to trap -arguments to MaxEntSimplexInvertMean." - -MeanLimit::usage = "MeanLimit[mean] computes the limit for when mean fails -MeanOK. MeanLimit is called by MaxEntSimplexInvertMean." - -StartingValues::usage = "StartingValues is an option for -MaxEntSimplexInvertMean. The default value is StartingValues -> Automatic, -which produces Range[Length[num]] where num is the number of paramters to -estimated." - -Begin["`Private`"] - -(* PartitionFunction, LambdaOK, and LambdaLimit *) - -PartitionFunction[b_][lambda_List?LambdaOK] := - With[{n = Length[lambda]}, - 1/Product[lambda[[i]], {i, n}] - - Sum[Exp[-b lambda[[i]]]/ - (lambda[[i]] * - Product[If[j==i, 1, (lambda[[j]] - lambda[[i]])], {j, n}]), - {i, n}] - ] - -PartitionFunction[b_][lambda:{0 ..}] := - With[{n = Length[lambda]}, - b^n/n! - ] - -PartitionFunction[b_][lambda_List] := - LambdaLimit[lambda, PartitionFunction[b]] - -PartitionFunction[lambda_List] := PartitionFunction[1][lambda] - -PartitionFunction[_][__] := $Failed - -LambdaOK[lambda_] := - With[{u = Union[lambda, SameTest -> Equal]}, - Length[u] == Length[lambda] && - FreeQ[Thread[u == 0], True] - ] - -(* this function takes care of LambdaOK exceptions *) -LambdaLimit[lambda_List, fun_] := - Module[{lam, x, ulam, upos, groups, rules, zpos}, - lam = Array[x, Length[lambda]]; - ulam = Union[lambda, SameTest -> Equal]; - upos = Function[u, Flatten[Position[lambda, _?(#==u&)]]] /@ ulam; - groups = Map[x, DeleteCases[{Rest[#], First[#]} & /@ upos, {_, {}}], {-1}]; - rules = (Rule @@@ Flatten[(Thread /@ groups), 1]); - zpos = Position[ulam, _?(# == 0&)]; - If[zpos != {}, AppendTo[rules, lam[[ upos[[ zpos[[1, 1]] ]][[1]] ]] -> 0]]; - Fold[Limit[#1, #2] &, fun[lam], rules] /. Thread[lam -> lambda] - ] - -(* PDF: joint, conditional, and marginal *) - -MaxEntSimplexDistribution /: -PDF[MaxEntSimplexDistribution[lambda_List], x_List] /; - Length[lambda] == Length[x] := - Exp[-lambda.x]/PartitionFunction[lambda] - -(* marginal distribution of x[[pos]] *) -MaxEntSimplexDistribution /: -PDF[MaxEntSimplexDistribution[lambda_List?LambdaOK], x_List, pos_List] /; - Length[lambda] == Length[x] := - Exp[-lambda[[pos]].x[[pos]]] * - PartitionFunction[1 - Tr[x[[pos]]]][ Complement[lambda, lambda[[pos]]] ] / - PartitionFunction[lambda] - -MaxEntSimplexDistribution /: -PDF[MaxEntSimplexDistribution[lambda_List], x_List, pos_List] /; - Length[lambda] == Length[x] := - Exp[-lambda[[pos]].x[[pos]]] * - LambdaLimit[lambda, - PartitionFunction[1 - Tr[x[[pos]]]][ Complement[#, #[[pos]]] ] / - PartitionFunction[#]&] - -(* conditional on the sum of the conditioning variables *) -MaxEntSimplexDistribution /: -PDF[MaxEntSimplexDistribution[lambda_List], x_List, sum_] /; - Length[lambda] == Length[x] := - Exp[-lambda.x]/PartitionFunction[1 - sum][lambda] - -MaxEntSimplexDistribution /: -PDF[MaxEntSimplexDistribution[__], __] := $Failed - - -(* Mean, Covariance, Variance, StandardDeviation, Entropy *) - -MaxEntSimplexDistribution /: -Mean[MaxEntSimplexDistribution[{}]] := {} - -MaxEntSimplexDistribution /: -Mean[MaxEntSimplexDistribution[lambda_List?LambdaOK]] := - Module[{lam, x}, - lam = Array[x, Length[lambda]]; - -D[Log[PartitionFunction[lam]], {lam}] /. Thread[lam -> lambda] - ] - -MaxEntSimplexDistribution /: -Mean[MaxEntSimplexDistribution[lambda_List]] := - LambdaLimit[lambda, -D[Log[PartitionFunction[#]], {#}]&] - -(* compiled for machine precision lambda *) -MaxEntSimplexDistribution /: -Mean[MaxEntSimplexDistribution[lambda_List?LambdaOK]] /; - VectorQ[lambda, NumericQ] && - Precision[lambda] == MachinePrecision := - compiledmean[Length[lambda]] @@ lambda - -MaxEntSimplexDistribution /: -Covariance[MaxEntSimplexDistribution[lambda_List?LambdaOK]] := - Module[{lam, x}, - lam = Array[x, Length[lambda]]; - D[Log[PartitionFunction[lam]], {lam}, {lam}] /. Thread[lam -> lambda] - ] - -MaxEntSimplexDistribution /: -Covariance[MaxEntSimplexDistribution[lambda_List]] := - LambdaLimit[lambda, D[Log[PartitionFunction[#]], {#}, {#}]&] - -MaxEntSimplexDistribution /: -Variance[MaxEntSimplexDistribution[lambda_List]] := - Transpose[Covariance[MaxEntSimplexDistribution[lambda]], {1,1}] - -MaxEntSimplexDistribution /: -StandardDeviation[MaxEntSimplexDistribution[lambda_List]] := - Sqrt[Variance[MaxEntSimplexDistribution[lambda]]] - -MaxEntSimplexDistribution /: -Entropy[MaxEntSimplexDistribution[lambda_List]] := - lambda.Mean[MaxEntSimplexDistribution[lambda]] + - Log[PartitionFunction[lambda]] - -MaxEntSimplexDistribution /: -(Mean | Covariance | Variance | StandardDeviation | - Entropy)[MaxEntSimplexDistribution[__]] := $Failed - -(* MaxEntSimplexInvertMean *) - -(* numerically solve for lambda given the mean vector *) -Options[MaxEntSimplexInvertMean] = {StartingValues -> Automatic} - -MaxEntSimplexInvertMean[{}, ___] := {} - -MaxEntSimplexInvertMean[mean_?(VectorQ[#, NumericQ]&), opts___?OptionQ] /; - MeanOK[mean] := - Module[{len = Length[mean], lam, x, fropts, start}, - fropts = FilterOptions[FindRoot, opts]; - start = StartingValues /. {opts} /. Options[MaxEntSimplexInvertMean]; - If[start == Automatic, start = Range[len]]; - If[Length[start] != len, Return[$Failed]]; - lam = Array[x, len]; - lam /. FindRoot[ - Mean[MaxEntSimplexDistribution[lam]] - mean, - Evaluate[Sequence @@ Transpose[{lam, start}], fropts] - ] - ] - -MaxEntSimplexInvertMean[mean_?(VectorQ[#, NumericQ]&), opts___?OptionQ] := - MeanLimit[mean, opts] - -MeanLimit[mean_List, opts___?OptionQ] := - Module[{lam, x, umean, upos, groups, rules, zpos, temp, - utemp, frpos, len, fropts, start, meanexpr, meandiff}, - lam = Array[x, Length[mean]]; - umean = Union[mean, SameTest -> Equal]; - upos = Function[u, Flatten[Position[mean, _?(#==u&)]]] /@ umean; - groups = Map[x, DeleteCases[{Rest[#], First[#]} & /@ upos, {_, {}}], {-1}]; - rules = (Rule @@@ Flatten[(Thread /@ groups), 1]); - zpos = Position[umean, _?(# == 1-Tr[mean]&)]; - If[zpos != {}, AppendTo[rules, lam[[ upos[[ zpos[[1, 1]] ]][[1]] ]] -> 0]]; - temp = lam //. rules; - utemp = Union[DeleteCases[temp, 0]]; - frpos = utemp /. x[i_] -> i; - If[frpos == {}, - (* then *) - temp, - (* else *) - len = Length[utemp]; - fropts = FilterOptions[FindRoot, opts]; - start = StartingValues /. {opts} /. Options[MaxEntSimplexInvertMean]; - If[start == Automatic, start = Range[len]]; - If[Length[start] != len, Return[$Failed]]; - meanexpr = Fold[Limit[#1, #2] &, - -D[Log[PartitionFunction[lam]], {lam}], rules]/. Thread[lam -> temp]; - meandiff = meanexpr - mean; - temp /. FindRoot[Evaluate @ meandiff[[frpos]], - Evaluate @ Transpose[{utemp, start}], Evaluate @ fropts] - ] - ] - -MaxEntSimplexInvertMean[__] := $Failed - -MeanOK[mean_] := - With[{u = Union[mean, SameTest -> Equal]}, - Length[u] == Length[mean] && - FreeQ[Thread[u == (1 - Tr[mean])], True] - ] - -(* RandomReal, Gibbs sampler *) - -(* univariate *) -MaxEntSimplexGibbs[{lambda_?NumericQ}, n_Integer?Positive] := - Table[maxent[lambda], {n}] - -MaxEntSimplexDistribution /: -RandomReal[MaxEntSimplexDistribution[{lambda_?NumericQ}]] := - maxent[lambda] - -MaxEntSimplexDistribution /: -RandomReal[MaxEntSimplexDistribution[{lambda_?NumericQ}], b_] := - maxentb[lambda, 1-b] - -MaxEntSimplexDistribution /: -RandomReal[MaxEntSimplexDistribution[{lambda_?NumericQ}], n_Integer?Positive] := - Table[maxent[lambda], {n}] - -(* multivariate; initialized with - Mean[MaxEntSimplexDistribution[lambda]] *) -MaxEntSimplexGibbs[lambda_?(VectorQ[#, NumericQ]&), n_Integer?Positive] /; - LambdaOK[lambda] := - Module[{slist, rmat, len}, - len = Length[lambda]; - (* used compiled version for efficiency *) - slist = compiledmean[len] @@ lambda; - rmat = Table[If[i == j, 0, 1], {i, len}, {j, len}]; - Table[ - slist[[i]] = maxentb[lambda[[i]], 1 - slist . rmat[[i]]], - {n}, {i, len}] - ] /; Length[lambda] > 1 - -MaxEntSimplexGibbs[__] := $Failed - -(* calls MaxEntSimplexGibbs 2* Length[lambda] times - and returns the last one *) -MaxEntSimplexDistribution /: -RandomReal[MaxEntSimplexDistribution[lambda_?(VectorQ[#, NumericQ]&)]] := - Last @ MaxEntSimplexGibbs[lambda, 2 * Length[lambda]] - -MaxEntSimplexDistribution /: -RandomReal[MaxEntSimplexDistribution[lambda_?(VectorQ[#, NumericQ]&)], - n_Integer?Positive] := - Table[Last @ MaxEntSimplexGibbs[lambda, 2 * Length[lambda]], {n}] - -maxent = Compile[{lam}, - With[{u = Random[]}, - If[Abs[lam] < 0.0001, - u - 0.5 * u * (1 - u) * lam, - -(Log[1 + (E^(-lam) - 1) * u]/lam) - ] - ]] - -maxentb = Compile[{lam, b}, - With[{u = Random[]}, - If[Abs[lam] < 0.0001, - b * u - 0.5 * b^2 * u * (1 - u) * lam, - -(Log[1 + (E^(-b * lam) - 1) * u]/lam) - ] - ]] - -(* for numerical efficiency *) -compiledmean[i_Integer?Positive] := - compiledmean[i] = (* memoize *) - Block[{x}, - Compile @@ {Array[x, i], - Mean[MaxEntSimplexDistribution[Array[x, i]]]} - ] - -End[] -EndPackage[] diff --git a/MathematicaFiles/Applications/Metropolis.m b/MathematicaFiles/Applications/Metropolis.m deleted file mode 100755 index 60e44137732458e4ce7cacf2eb22820f3aa5e418..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/Metropolis.m +++ /dev/null @@ -1,69 +0,0 @@ -(* :Mathematica Version: 6 *) - -(* need UnevenPartition *) -<<Version6`OddsandEnds` - -(* this allows for earlier versions *) -If[$VersionNumber >= 6, - (* then *) - randomNormal[n_] := RandomReal[NormalDistribution[], n]; - randomUniform[] := RandomReal[], - (* else *) - randomNormal[n_] := RandomArray[NormalDistribution[0,1], n]; - randomUniform[] := Random[] - ] - -Options[Metropolis] = { - RegionFunction -> (True &), - LogLikelihood -> True, - DiscardValues -> True - } - -Metropolis::badblocks = "The dimensions of the covariance \ -blocks are not consistent with the length of the argument vector." - -Metropolis::usage = "Metropolis[kernelfun, x0, covarianceblocks, n]. \ -Options include RegionFunction, Loglikelihood, and DiscardValues." - -Metropolis[ - kernelfun_, - x_List, - covarianceblocks:{__List}, - n_Integer?Positive, - opts___?OptionQ - ] := - Module[{blocklengths, x0, v0, choleskyblocks, - regionfun, notloglike, discard, x1, v1, fx1}, - blocklengths = Length /@ covarianceblocks; - If[Length[x] != Plus @@ blocklengths, - Message[Metropolis::badblocks]; Return[$Failed] - ]; - x0 = UnevenPartition[x, blocklengths]; - v0 = kernelfun[x]; - choleskyblocks = CholeskyDecomposition[(Transpose[#]+#)/2]& /@ - covarianceblocks; - regionfun = RegionFunction /. {opts} /. Options[Metropolis]; - notloglike = ! TrueQ[LogLikelihood /. {opts} /. Options[Metropolis]]; - discard = TrueQ[DiscardValues /. {opts} /. Options[Metropolis]]; - Table[ - Table[ - x1 = x0; - x1[[j]] += (randomNormal[blocklengths[[j]]].choleskyblocks[[j]]); - fx1 = Flatten[x1]; - If[TrueQ[regionfun[fx1]], - (* then inbounds *) - v1 = kernelfun[fx1]; - If[notloglike, v1 = Log[v1]]; - If[v1 >= Log[randomUniform[]] + v0, - (* then accept new point *) - x0 = x1; v0 = v1 - ] - ], - {j, Length[choleskyblocks]}]; - If[discard, Flatten[x0], {Flatten[x0], v0}], - {n}] - ] - -AcceptanceRates[mc_?MatrixQ] := - N[ (Length[Split[#1]]& /@ Transpose[mc])/Length[mc] ] - diff --git a/MathematicaFiles/Applications/MetropolisMCMC.m b/MathematicaFiles/Applications/MetropolisMCMC.m deleted file mode 100755 index 10130b7c6eda3e7f5fdb2c409e5e6aed5c670ac5..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/MetropolisMCMC.m +++ /dev/null @@ -1,545 +0,0 @@ -(* :Title: RandomWalkMetropolis *) - -(* :Author: Mark Fisher *) - -(* :Date: June 2007 *) - -(* :Mathematica Version: 6 *) - -(* :Package Version: 2.0 - Modified for Version 6.0 June 2007, completely revamped. -*) - -(* :Summary: -This package implements the (random-walk) Metropolis version of the Markov -Chain Monte Carlo (MCMC) algorithm. MCMC algorithms are used to draw from -probability distributions. The function BridgeEstimate can be used to compute -the normalizing constant. -*) - -(* :Discussion: -The Markov Chain is implemented via NestList. The "state" vector is the -parameter vector with the function value appended. The iterated function -generates a proposal and returns the proposal (and its value) if its value -is greater than a random fraction of the current state value. Otherwise -the current state is returned. Proposals are generated by random-walk -Gaussian or T-distributions. -*) - -(* :References: - RandomWalkMetropolis implements Agorithm A.29 (p. 288) in - Robert, Christian P. and George Casella (2004) Monte Carlo - Statistical Methods, Second Edition, Springer. - - For the Gelfand-Dey method of marginal likelihood estimation, see - Koop, Gary (2003) Bayesian Econometrics, John Wiley & Sons, - pp. 104-106. - For additional details, Koop refers the reader to - Geweke, John (1999) Using Simulation Methods for Bayesian Econometric - Models: Inference, Development, and Communication (with discussion - and rejoinder), Econometric Reviews, 18, pp. 1-126. -*) - -BeginPackage["RandomWalkMetropolis`", - {"Utilities`FilterOptions`", "MultivariateStatistics`"}] - -RandomWalkMetropolis::usage = -"RandomWalkMetropolis[f, x0, step, nDraws, nThin, nBurn] \ -returns nDraws steps of a Markov Chain Monte Carlo (MCMC) simulation from \ -the function f computed via the random-walk Metropolis algorithm, \ -beginning at the vector x0 of starting values, where step is a scalar or \ -vector (with the same dimension as start) that represents standard \ -deviations. Alternatively, step can be a covariance matrix. \ -nThin specifies the amount of \"thinning\" to do, outputing every \ -nThin-th draw. nBurn specifies the number of draws to discard \ -from the beginning during the \"burn-in\" period. (Thus the total number \ -of function evaluations is nBurn + nThin * nDraws.) The function \ -f must have the head Function and take a single vector argument; \ -in addition, it should return the log of the kernel value unless the \ -option LogLikelihood is set to False. MetropolisMCMC also takes the \ -options DiscardValues and BooleanFunction. (See the usage notes.)" - -LogLikelihood::usage = -"LogLikelihood is an option for RandomWalkMetropolis that \ -specifies whether the function returns values proportional to the \ -likelihood or to the loglikelihood. The default setting is \ -LogLikelihood -> True." - -BooleanFunction::usage = -"BooleanFunction is an option for RandomWalkMetropolis \ -that specifies a function that returns True of False to be applied to the \ -proposal prior to evaluating the likelihood function. For example, \ -BooleanFunction -> (And@@Thread[#>=0]&). The default setting is \ -BooleanFunction -> (True&). The option BooleanFunction is provided for \ -use with LogLikelihood -> True, in order to avoid taking the log of zero." - -RegroupOutput::usage = -"RegroupOutput is an option for RandomWalkMetropolis \ -which specifies whether to regroup each row of the output from {x__, v_} \ -to {{x}, v}. The default is RegroupOutput -> True." - -DiscardValues::usage = -"DiscardValues is an option for RandomWalkMetropolis \ -which specifies whether to discard the appended values. The default \ -setting is DiscardValues -> True." - -CompilePatterns::usage = -"CompilePatterns is an option for \ -RandomWalkMetropolis which specifies the list of patterns supplied to \ -Compile (as its third argument). These patterns specify the return types \ -of external calls. The default setting is CompilePatterns -> {}." - -DegreesOfFreedom::usage = -"DegreesOfFreedom is an option for \ -RandomWalkMetropolis which specifies the number of degrees of freedom for \ -the proposal distribution. The default setting is DegreesOfFreedom -> \ -\[Infinity] which specifies the Gaussian distribution. Additional valid \ -settings are any positive integer. For example, DegreesOfFreedom -> 1 \ -specifies the Cauchy distribtuion (i.e., t distribtion with 1 degree of \ -freedom)." - -AcceptanceRate::usage = -"AcceptanceRate[mc] computes, the fraction of times \ -the proposal is accepted; namely, N[Length[Split[mc]]/Length[mc]]." - -MHMFunction::usage = -"MHMFunction[mean, cov, p] returns a function that \ -can be used to compute the normalization constant where mean is the \ -vector of means of the MCMC parameter matrix from a \ -Markov Chain Monte Carlo simulation and cov is the covariance matrix. \ -The third argument p specifies \ -the truncation for the Gaussian in terms of a p-value. Alternatively, one \ -may specify MHMFunction[mcmc, p], where mcmc is the MCMC parameter matrix \ -of parameters." - -MHMEstimate::usage = -"MHMEstimate[mcmcdata, p] returns the Gelfand-Dey estimate of the \ -normalization constant given the Markov Chain Monte Carlo simulation, \ -where mcmcdata is produced by MetropolisMCMC with the option \ -DiscardValues -> False and where the truncation point is controlled \ -by the \"p-value\" p. MHMEsitmate takes the option LogLikelihood, \ -which specifies whether the likelihood values are in logs. \ -The default value is LogLikelihood -> False. If the option is \ -specified the value for p must also be specified." - -MarginalLikelihoodMuller::usage = "MarginalLikelihoodMuller[mc, fun, {m, \ -V}, n (,opts)] computes the log of the marginal likelihood from the MCMC \ -output mc generated from the kernel fun using n draws from a Gaussian \ -weighting distribution with mean m and covariance matrix V. (The method is \ -due to Ulrich K. M�ller.) Since the draws from the Gaussian distribution \ -are independent, n can be substantially less than the length of mc. Each \ -row of mc output contains the draw and the associated kernel value. (The \ -kernel values are assumed to be in logs unless the option LogLikelihood -> \ -False is specified.) A function (returning True|False) that determines the \ -bounds of the parameter space can be specified via the option \ -BooleanFunction." - -MullerFunction::usage = "MullerFunction[rf, rg][logC] is a helper function \ -called by MarginalLikelihoodMuller. MullerFunction calls the compiled \ -ComputeListSum." - -MarginalLikelihoodMuller::badbounds = "The interval `1` does not contain -zero. Returning the value closest to zero. Try using a larger number of -draws from the weighting distribution." - -MarginalLikelihoodCJ::usage = "MarginalLikelihoodCJ[mc, f, V, xstar, n] \ -computes the log of the marginal likelihood of the data given the \ -Metropolis output mc according to Chib-Jeliazkov method, where f is the \ -kernel of the posterior, V is the covariance matrix of the random-walk \ -Gaussian proposal density, xstar is the point at which to estimate the \ -density of the poseterior, and n is the number of draws of the Gaussian \ -weighting function." - -BridgeEstimate::usage = "BridgeEstimate[{f1, f2}, {draws1, draws2}, psi] \ -computes the bridge estimate of Log[c1/c2] where ci is the normalizing \ -constant for the kernel Exp[fi] given the draws from the two distributions. \ -The parameter psi should be set the the ratio of the number of \ -\"independent\" draws in draws1 relative to the number of independent draws \ -in draws2. (When in doubt, set it to 1.) BridgeEstimate[mc, fun, {m, V}, \ -{n, psi}] computes the bridge estimate of the log of the marginal \ -likelihood given the posterior kernel fun using the MCMC output mc; n draws \ -are made from the Gaussian weighting function which is centered at m with \ -covariance matrix V." - -BridgeEstimate::badbounds = "The interval `1` does not contain zero. -Returning the value closest to zero. Try using a larger number of draws -from the weighting distribution." - -BridgeEstimate::nodraws = "There are no draws from test distribution in -bounds." - -BridgeEstimate::ndraws = "There are `1` draws from test distribution in -bounds." - -BridgeEstimatePowerFamily::usage = "BridgeEstimatePowerFamily[{z1, z2}, {k, \ -A}] returns the bridge estimate of the log of the ratio of normalizing \ -constants given the lists of log differences z1 and z2 and the power family \ -parameters k and A." - -BridgeEstimateFromMetropolis::usage = "BridgeEstimateFromMetropolis[{fun, \ -start, stepsize, mcsteps}, {m, V}, {n, psi} (, opts)]." - -ForceDraws::usage = "ForceDraws is an option for BridgeEstimate which \ -specifies whether to enforce the number of draws from the Gaussian \ -to equal the number specified. This is an issue if draws can be \ -discarded as out-of-bounds. With the default setting ForceDraws -> \ -True, successive draws are made until the number specified are obtained." - -Begin["Private`"] - -AcceptanceRate[mc_List] := N[Length[Split[mc]]/Length[mc]] - -RandomWalkMetropolis::baddf = "DegreesOfFreedom must be either a positive \ -integer or \[Infinity]." - -Options[RandomWalkMetropolis] = { - LogLikelihood -> True, - BooleanFunction -> (True&), - DiscardValues -> True, - RegroupOutput -> True, - DegreesOfFreedom -> \[Infinity], - CompilePatterns -> {} - } - -RandomWalkMetropolis[ - fun_Function, - start_?(VectorQ[#, NumericQ]&), - stepSize_, - nDraws_Integer?Positive, - nThin_Integer:1, - nBurn_Integer:0, - opts___?OptionQ] := - Module[{log, discard, regroup, patt, df, boole, - k, chol, logfun, sfun, nfun, sv, mc}, - {log, discard, regroup, patt, df, boole} = {LogLikelihood, DiscardValues, - RegroupOutput, CompilePatterns, DegreesOfFreedom, BooleanFunction} /. - {opts} /. Options[RandomWalkMetropolis]; - If[Not[(IntegerQ[df] && df > 0) || df === Infinity], - Message[RandomWalkMetropolis::baddf, df]; Return[$Failed]]; - k = Length[start]; - chol = CholeskyDecomposition[ - Switch[ - TensorRank[stepSize], - 0, stepSize^2 * IdentityMatrix[k], - 1, DiagonalMatrix[stepSize^2], - 2, stepsize (* covariance matrix *) - ]]; - sfun = AssembleStepFunction[chol, k, df]; - logfun = If[TrueQ[log], fun, Log[fun[#]]&]; - nfun = AssembleNestFunction[logfun, boole, sfun]; - sv = Append[start, logfun[start]]; - mc = CompileNestFunction[nfun, sv, nDraws, nThin, nBurn, patt][]; - If[TrueQ[discard], mc[[All, ;;-2]], - If[TrueQ[regroup], Through[{Most, Last}[#]] & /@ mc, mc] - ] - ] - -RandomWalkMetropolis[__] := $Failed - -AssembleStepFunction[chol_, k_, df_] := - Switch[df, - Infinity, (* normal proposal *) - Function[{}, - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {k}].chol - ], - _, (* t proposal *) - Function[{}, - (1/Sqrt[(#.#)&[ - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {df}]]/df] * - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {k}]).chol - ] - ] - -AssembleNestFunction[vfun_, bfun_, sfun_] := - Function[sv, - Module[{p, pval}, - p = Most[sv] + sfun[]; - If[bfun[p], - pval = vfun[p]; - If[pval >= Last[sv] + Log[RandomReal[]], - Append[p, pval], - sv], - sv] - ]] - -CompileNestFunction[nfun_, start_, nDraws_, nThin_, nBurn_, patt_] := - Compile[{}, (* no args *) - Rest @ - NestList[ - Nest[nfun, #, nThin]&, - Nest[nfun, start, nBurn], - nDraws], - patt] - - -(***** BridgeEstimate *****) - -Options[BridgeEstimate] = { - BooleanFunction -> (True &), - LogLikelihood -> True, - ForceDraws -> True - } - -BridgeEstimate[mc_, fun_, {m_List, V_List}, {n_Integer, psi_?NumericQ}, - opts___?OptionQ] /; - (Dimensions[mc][[-1]] == 2 && - MatrixQ[mc[[All, 1]], NumericQ] && - VectorQ[mc[[All, 2]], NumericQ]) := - Module[{bfun, loglike, force, k, t, ran, logf, logg, - fOnMC, gOnMC, fOnRan, gOnRan, z1, z2}, - bfun = BooleanFunction /. {opts} /. Options[BridgeEstimate]; - loglike = TrueQ[LogLikelihood /. {opts} /. Options[BridgeEstimate]]; - force = TrueQ[ForceDraws /. {opts} /. Options[BridgeEstimate]]; - If[force, - (* then *) - ran = Table[ - While[ - t = RandomReal[MultinormalDistribution[m, V]]; - !bfun[t]]; - t, - {n}], - (* else *) - ran = Select[RandomReal[MultinormalDistribution[m, V], n], bfun[#]&]; - If[Length[ran] == 0, Message[BridgeEstimate::nodraws]; Return[$Failed]]; - Message[BridgeEstimate::ndraws, Length[ran]]; - ]; - logf = If[loglike, fun, Log[fun[#]] &]; - k = Length[m]; - logg = With[{S = Inverse[V], const = -Log[(2Pi)^(k/2)Sqrt[Det[V]]]}, - Compile[{{z, _Real, 1}}, const - (z - m).S.(z - m)/2] - ]; - fOnMC = If[loglike, mc[[All, 2]], Log[mc[[All, 2]]]]; - gOnMC = logg /@ mc[[All, 1]]; - fOnRan = If[bfun @ #, logf @ #, -$MaxMachineNumber] & /@ ran; - gOnRan = logg /@ ran; - z1 = fOnMC - gOnMC; - z2 = gOnRan - fOnRan; - BridgeEstimate[{z1, z2}, psi, opts] - ] - -BridgeEstimate[{f1_, f2_}, {draws1_List, draws2_List}, psi_?NumericQ, - opts___?OptionQ] := - With[{ - z1 = (f1[#] - f2[#])& /@ draws1, - z2 = (f2[#] - f1[#])& /@ draws2 - }, - BridgeEstimate[{z1, z2}, psi, opts] - ] - -BridgeEstimate[{z1_List, z2_List}, psi_?NumericQ, opts___?OptionQ] := - Block[{x}, - {w1, w2} = {z1, z2}; - (* Print[StringForm["Starting value: `1`", - NumberForm[LogRatioStartingValue[z1, z2], {6,4}]]]; *) - x /. FindRoot[ - BridgeFunction[z1, z2, psi][x], - {x, LogRatioStartingValue[z1, z2]}, - FilterOptions[FindRoot, opts] // Evaluate] - ] - -BridgeFunction[z1_, z2_, psi_][x_?NumericQ] := - BridgeFunctionCompiled[x, psi, z1, z2] - -(* trap for non machine precsion numbers *) -BridgeFunctionCompiled = - With[{max = Log[$MaxMachineNumber]}, - Compile[{ - {x, _Real, 0}, - {psi, _Real, 0}, - {z1, _Real, 1}, - {z2, _Real, 1}}, - Module[{ - len1 = Length[z1], - len2 = Length[z2], - t = 0. - }, - Sum[ - t = z2[[j]] - x; - If[t < max, - 1/(psi + Exp[t]), - 0], - {j, len2}]/len2 - - Sum[ - t = z1[[j]] + x; - If[t < max, - 1/(1 + psi * Exp[t]), - 0], - {j, len1}]/len1 - ]]] - -(* provide starting value for FindRoot *) -LogRatioStartingValue[z1_, z2_] := - BridgeEstimatePowerFamily[{z1, z2}, {1, 1}] - -BridgeEstimatePowerFamily[{z1_, z2_}, {k_, A_}] := - With[{t = A^(1/k)}, - Log[Mean[(t + Exp[#/k])^(-k)& /@ z1]/ - Mean[(1 + t * Exp[#/k])^(-k)& /@ z2]] - ] - -BridgeEstimateFromMetropolis[ - {fun_, start_, stepsize_, mcsteps_}, - {m_, V_}, {n_, psi_}, opts___] := - Module[{mc}, - mc = MetropolisMCMC[fun, start, stepsize, mcsteps, opts, - LogLikelihood -> True, ReturnValues -> True]; - (* Print[StringForm["Acceptance Rate: `1`", - NumberForm[AcceptanceRate[mc], {3,3}]]]; *) - BridgeEstimate[mc, fun, {m, V}, {n, psi}, opts, LogLikelihood -> True] - ] - -(* Modified Harnomonic Mean (a.k.a. Gelfand-Dey) *) - -MHMEstimate[mc_, p_:(.01)] /; - (Dimensions[mc][[-1]] == 2 && - MatrixQ[mc[[All, 1]], NumericQ] && (* parameters *) - VectorQ[mc[[All, 2]], NumericQ]) := (* values *) - 1/Mean[ - (MHMFunction[mc[[All, 1]], p] /@ mc[[All, 1]])/mc[[All, 2]] - ] - -Options[MHMEstimate] = {LogLikelihood -> False} - -MHMEstimate[mc_, p_:(.01), opts___?OptionQ] /; - (Dimensions[mc][[-1]] == 2 && - MatrixQ[mc[[All, 1]], NumericQ] && (* parameters *) - VectorQ[mc[[All, 2]], NumericQ]) := (* values *) - With[{vals = If[ - TrueQ[LogLikelihood /. {opts} /. Options[MHMEstimate]], - Exp[mc[[All, 2]]], - mc[[All, 2]]]}, - 1/Mean[ - (MHMFunction[mc[[All, 1]], p] /@ mc[[All, 1]])/vals - ] - ] - -MHMFunction[mc_?(MatrixQ[#, NumericQ]&), p_:(.01)] := - MakeMHMFunction[##, p]& @@ MCMeanAndCovariance[mc] - -MHMFunction[___] := $Failed - -MHMEstimate[___] := $Failed - -MCMeanAndCovariance[mc_?(MatrixQ[#, NumericQ]&)] := - {First[#], Rest[#]}& @ MCMeanCov[mc] - -MCMeanCov = Compile[{{mc, _Real, 2}}, - Module[{ - len = Length[mc], - data = Transpose[mc], - mean = {1.}, - centered = {{1.}}, - cov = {{1.}} - }, - mean = (Plus @@@ data)/len; - centered = data - mean; - cov = (centered.Transpose[centered])/len; - cov = (cov + Transpose[cov])/2; - Prepend[cov, mean] - ]]; - -MakeMHMFunction[mean_, cov_, p_:(.01)] := - With[{ - n = Length[mean], - inv = Inverse[cov] - }, - With[{ - const = N @ 1/(Sqrt[(2*Pi)^n * Det[cov]] * (1-p)), - invGamma = N @ 2*InverseGammaRegularized[n/2, 0, 1 - p] - }, - Compile[{{vec, _Real, 1}}, - With[{ - quad = (mean - vec).inv.(mean - vec) - }, - If[quad <= invGamma, Exp[-quad/2]const, 0] - ]]]] - -(***** MarginalLikelihoodMuller *****) -(* Ulrich K. M�ller's method for computing the constant of integration *) - -Options[MarginalLikelihoodMuller] = - {BooleanFunction -> (True &), LogLikelihood -> True} - -MarginalLikelihoodMuller[mc_, fun_, {m_, V_}, n_Integer, opts___?OptionQ] /; - (Dimensions[mc][[-1]] == 2 && - MatrixQ[mc[[All, 1]], NumericQ] && - VectorQ[mc[[All, 2]], NumericQ]) := - Module[{fropts, bfun, loglike, k, ran, logf, logg, - fOnMC, gOnMC, fOnRan, gOnRan, rf, rg, lo, hi, mlo, mhi, cf}, - fropts = FilterOptions[FindRoot, opts]; - bfun = BooleanFunction /. {opts} /. Options[MarginalLikelihoodMuller]; - loglike = TrueQ[LogLikelihood /. {opts} /. Options[MarginalLikelihoodMuller]]; - k = Length[m]; - ran = RandomArray[MultinormalDistribution[m, V], n]; - logf = If[loglike, fun, Log[fun[#]] &]; - logg = With[{S = Inverse[V], const = -Log[(2Pi)^(k/2)Sqrt[Det[V]]]}, - Compile[{{z, _Real, 1}}, const - (z - m).S.(z - m)/2] - ]; - fOnMC = If[loglike, mc[[All, 2]], Log[mc[[All, 2]]]]; - gOnMC = logg /@ mc[[All, 1]]; - fOnRan = If[bfun @ #, logf @ #, -$MaxMachineNumber] & /@ ran; - gOnRan = logg /@ ran; - rf = Sort[gOnMC - fOnMC]; - rg = Sort[fOnRan - gOnRan]; - lo = -rf[[-1]]; - hi = rg[[-1]]; - {mlo, mhi} = MullerFunction[rf, rg] /@ {lo, hi}; - If[mlo <= 0 <= mhi, - (* then: zero is in bounds *) - Block[{x}, x /. FindRoot[ - MullerFunction[rf, rg][x], - {x, .45*lo + .55*hi, .55*lo + .45*hi, lo, hi}, - fropts // Evaluate]], - (* else: zero is out of bounds *) - Message[MarginalLikelihoodMuller::badbounds, {mlo, mhi}]; - If[mlo > 0, lo, hi]] - ] - -(* rf and rg are sorted logs of ratios *) -MullerFunction[rf_, rg_][x_?NumericQ] := - ComputeListSum[-x, rg] - ComputeListSum[x, rf] - -(* the list is in logs and has been sorted *) -ComputeListSum = - Compile[{ - {x, _Real, 0}, - {list, _Real, 1}}, - Module[{ - t = 0., - sum = 0., - len = Length[list] - }, - Catch[ - Do[ - t = list[[i]] + x; - If[t < 0, - sum += 1 - Exp[t], - Throw[sum/len] - ], - {i, len}]; - sum/len] - ]]; - - -(***** Chib-Jeliazkov method *****) - -MarginalLikelihoodCJ[mc_, fun_, V_, xstar_, n_] := - Module[{ran, valstar, alphavals, qfun, qvals, num, den}, - ran = RandomArray[MultinormalDistribution[xstar, V], n]; - valstar = fun[xstar]; - alphavals = Min[0, valstar - #] & /@ mc[[All, 2]]; - qfun = With[{ - m = xstar, - S = Inverse[V], - const = -Log[(2Pi)^(Length[xstar]/2)Sqrt[Det[V]]]}, - Compile[{{z, _Real, 1}}, const - (z - m).S.(z - m)/2] - ]; - qvals = qfun /@ mc[[All, 1]]; - num = Mean[Exp[alphavals + qvals]]; - den = Mean[Exp[Min[0, fun[#] - valstar] & /@ ran]]; - valstar - Log[num/den] - ] - - -End[] -EndPackage[] \ No newline at end of file diff --git a/MathematicaFiles/Applications/MetropolisStep.nb b/MathematicaFiles/Applications/MetropolisStep.nb deleted file mode 100755 index 2a4a17e3fb4268bcba8dbc40a07f5c398f42080f..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/MetropolisStep.nb +++ /dev/null @@ -1,1221 +0,0 @@ -(* Content-type: application/mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 6.0' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 145, 7] -NotebookDataLength[ 54664, 1212] -NotebookOptionsPosition[ 52862, 1148] -NotebookOutlinePosition[ 53379, 1170] -CellTagsIndexPosition[ 53293, 1165] -WindowFrame->Normal -ContainsDynamic->False*) - -(* Beginning of Notebook Content *) -Notebook[{ -Cell[BoxData[ - RowBox[{"<<", "Version6`Metropolis`"}]], "Input", - CellChangeTimes->{{3.37616950425*^9, 3.376169514546875*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"?", "Metropolis"}]], "Input", - CellChangeTimes->{{3.37616951653125*^9, 3.37616951925*^9}}], - -Cell[BoxData[ - RowBox[{ - StyleBox["\<\"Metropolis[kernelfun, x0, covarianceblocks, n]. Options \ -include RegionFunction, Loglikelihood, and DiscardValues.\"\>", "MSG"], " ", - ButtonBox[ - StyleBox["\[RightSkeleton]", "SR"], - Active->True, - BaseStyle->"Link", - ButtonData->"paclet:Global/ref/Metropolis"]}]], "Print", "PrintUsage", - CellChangeTimes->{3.376249446046875*^9}, - CellTags->"Info3376231445-5207814"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"<<", "BinnedKernelDensity`"}]], "Input", - CellChangeTimes->{{3.37613255946875*^9, 3.37613256584375*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"General", "::", "\<\"obspkg\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\(\\\"Statistics`DataManipulation`\\\"\\) is now \ -obsolete. The legacy version being loaded may conflict with current \ -Mathematica functionality. See the Compatibility Guide for updating \ -information. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"MessageLink\\\", ButtonFrame->None, ButtonData:>{\\\"System`\ -\\\", \\\"General\\\", \\\"obspkg\\\"}, ButtonNote -> \ -\\\"General::obspkg\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.376132566234375*^9, 3.376137028421875*^9, - 3.3762935423125*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Graphics", "::", "\<\"obspkg\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\(\\\"Graphics`Graphics`\\\"\\) is now obsolete. The \ -legacy version being loaded may conflict with current Mathematica \ -functionality. See the Compatibility Guide for updating information. \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"MessageLink\\\", ButtonFrame->None, ButtonData:>{\\\"System`\ -\\\", \\\"Graphics\\\", \\\"obspkg\\\"}, ButtonNote -> \\\"Graphics::obspkg\\\ -\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.376132566234375*^9, 3.376137028421875*^9, - 3.376293542328125*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Colors", "::", "\<\"obspkg\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\(\\\"Graphics`Colors`\\\"\\) is now obsolete. The \ -legacy version being loaded may conflict with current Mathematica \ -functionality. See the Compatibility Guide for updating information. \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"MessageLink\\\", ButtonFrame->None, \ -ButtonData:>{\\\"Graphics`Colors`\\\", \\\"Colors\\\", \\\"obspkg\\\"}, \ -ButtonNote -> \\\"Graphics`Colors`Colors::obspkg\\\"]\\)\"\>"}]], "Message", \ -"MSG", - CellChangeTimes->{3.376132566234375*^9, 3.376137028421875*^9, - 3.3762935425625*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ContourPlot3D", "::", "\<\"obslt\"\>"}], - RowBox[{ - ":", " "}], "\<\"The functionality previously provided by ContourPlot3D.m \ -is now superseded by the ContourPlot3D and ListContourPlot3D kernel \ -functions. The package Graphics`ContourPlot3D` is obsolete. Note the use of \ -DataRange in the place of old MeshRange functionality and the new default \ -setting of Contours -> 3. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"MessageLink\\\", ButtonFrame->None, \ -ButtonData:>{\\\"System`.`\\\", \\\"ContourPlot3D\\\", \\\"obslt\\\"}, \ -ButtonNote -> \\\"ContourPlot3D::obslt\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.376132566234375*^9, 3.376137028421875*^9, - 3.37629354315625*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"General", "::", "\<\"obspkg\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\(\\\"Statistics`DescriptiveStatistics`\\\"\\) is now \ -obsolete. The legacy version being loaded may conflict with current \ -Mathematica functionality. See the Compatibility Guide for updating \ -information. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"MessageLink\\\", ButtonFrame->None, ButtonData:>{\\\"System`\ -\\\", \\\"General\\\", \\\"obspkg\\\"}, ButtonNote -> \ -\\\"General::obspkg\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.376132566234375*^9, 3.376137028421875*^9, - 3.376293543171875*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"CoefficientOfVariation", "::", "\<\"shdw\"\>"}], - RowBox[{ - ":", " "}], "\<\"Symbol \\!\\(\\\"CoefficientOfVariation\\\"\\) appears in \ -multiple contexts \\!\\({\\\"Statistics`DescriptiveStatistics`\\\", \ -\\\"RegressionCommon`\\\"}\\); definitions in context \ -\\!\\(\\\"Statistics`DescriptiveStatistics`\\\"\\) may shadow or be shadowed \ -by other definitions. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"MessageLink\\\", ButtonFrame->None, \ -ButtonData:>{\\\"Statistics`DescriptiveStatistics`\\\", \ -\\\"CoefficientOfVariation\\\", \\\"shdw\\\"}, ButtonNote -> \ -\\\"Statistics`DescriptiveStatistics`CoefficientOfVariation::shdw\\\"]\\)\"\>\ -"}]], "Message", "MSG", - CellChangeTimes->{3.376132566234375*^9, 3.376137028421875*^9, - 3.3762935431875*^9}] -}, Closed]], - -Cell[BoxData[ - RowBox[{"<<", "MultivariateStatistics`"}]], "Input", - CellChangeTimes->{{3.376091144421875*^9, 3.376091246734375*^9}, { - 3.376091312703125*^9, 3.376091316515625*^9}}], - -Cell[BoxData[ - RowBox[{"Clear", "[", "kernelfun", "]"}]], "Input", - CellChangeTimes->{{3.376249915984375*^9, 3.376249919375*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"kernelfun", "=", - RowBox[{ - RowBox[{ - RowBox[{"-", - RowBox[{"#", ".", "#"}]}], "/", "2"}], "&"}]}]], "Input", - CellChangeTimes->{{3.376131080796875*^9, 3.3761311766875*^9}, { - 3.376132495921875*^9, 3.376132503140625*^9}, {3.376132941046875*^9, - 3.3761329428125*^9}, {3.37613317390625*^9, 3.376133186546875*^9}, { - 3.376150801765625*^9, 3.37615080340625*^9}, {3.376151587375*^9, - 3.3761515888125*^9}, {3.376249913859375*^9, 3.376249924984375*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"-", - FractionBox[ - RowBox[{"#1", ".", "#1"}], "2"]}], "&"}]], "Output", - CellChangeTimes->{{3.376131134359375*^9, 3.376131177203125*^9}, { - 3.376132498625*^9, 3.376132503546875*^9}, 3.376132943453125*^9, - 3.376133190890625*^9, 3.376137030578125*^9, 3.376150804*^9, - 3.376151589203125*^9, 3.376249450265625*^9, {3.376249923484375*^9, - 3.376249925421875*^9}}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"covblocks", "=", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", ".5"}], "}"}], ",", - RowBox[{"{", - RowBox[{".5", ",", "1"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2", ",", - RowBox[{"-", ".8"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"-", ".8"}], ",", "1"}], "}"}]}], "}"}], ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"1", ",", "0", ",", ".2"}], "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "2", ",", "0"}], "}"}], ",", - RowBox[{"{", - RowBox[{".2", ",", "0", ",", "2"}], "}"}]}], "}"}]}], "}"}]}], - ";"}]], "Input", - CellChangeTimes->{{3.37613371434375*^9, 3.376133728140625*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"covblocks", "=", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"{", "1", "}"}], "}"}], ",", - RowBox[{"{", "100", "}"}]}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.376166568328125*^9, 3.376166601828125*^9}, { - 3.376167701125*^9, 3.37616770203125*^9}, {3.376292527390625*^9, - 3.376292539171875*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"covblocks", "=", - RowBox[{"{", - RowBox[{"IdentityMatrix", "[", "100", "]"}], "}"}]}], ";"}]], "Input", - CellChangeTimes->{{3.37629254075*^9, 3.376292555203125*^9}, { - 3.376308788796875*^9, 3.37630878909375*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"blocklengths", "=", - RowBox[{"Length", "/@", "covblocks"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"x0", "=", - RowBox[{"RandomReal", "[", - RowBox[{ - RowBox[{"NormalDistribution", "[", "]"}], ",", - RowBox[{"Tr", "[", "blocklengths", "]"}]}], "]"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"v0", "=", - RowBox[{"kernelfun", "[", "x0", "]"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"regionfun", "=", - RowBox[{"True", "&"}]}], ";"}], "\[IndentingNewLine]", - RowBox[{"regionfun", "[", "x0", "]"}]}], "Input", - CellChangeTimes->{{3.3761312244375*^9, 3.376131241328125*^9}, { - 3.3761316039375*^9, 3.37613160959375*^9}, {3.376131646203125*^9, - 3.376131652734375*^9}, 3.376131730890625*^9, {3.376132097703125*^9, - 3.376132113640625*^9}, {3.376132257859375*^9, 3.376132266078125*^9}, { - 3.37613234153125*^9, 3.37613236353125*^9}, {3.37613240096875*^9, - 3.3761324093125*^9}, 3.37613315446875*^9, {3.376133215765625*^9, - 3.376133251375*^9}, {3.376133721828125*^9, 3.376133723765625*^9}, { - 3.376148188625*^9, 3.376148200703125*^9}, {3.376148647890625*^9, - 3.376148654890625*^9}, {3.376150807203125*^9, 3.37615080803125*^9}, { - 3.37615155334375*^9, 3.37615159128125*^9}, 3.37615163178125*^9, { - 3.376167743375*^9, 3.3761677551875*^9}, {3.376234604203125*^9, - 3.37623460940625*^9}, {3.376234945734375*^9, 3.376234948640625*^9}, { - 3.376249417421875*^9, 3.376249424328125*^9}}], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{ - 3.376148655796875*^9, 3.3761500781875*^9, {3.376150366953125*^9, - 3.376150384*^9}, 3.3761508095625*^9, 3.37615159353125*^9, - 3.376151636703125*^9, {3.376166595421875*^9, 3.37616660390625*^9}, - 3.376167704765625*^9, 3.37616775575*^9, 3.376234579203125*^9, - 3.376234612734375*^9, 3.376234949*^9, 3.376249454328125*^9, - 3.376249928265625*^9, 3.376250030625*^9, 3.37629255734375*^9, - 3.376308770421875*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[{ - RowBox[{ - RowBox[{"(", - RowBox[{ - RowBox[{"mc", "=", - RowBox[{"Metropolis", "[", - RowBox[{"kernelfun", ",", "x0", ",", "covblocks", ",", - SuperscriptBox["10", "3"]}], "]"}]}], ";"}], ")"}], "//", - "Timing"}], "\[IndentingNewLine]", - RowBox[{"AcceptanceRates", "[", "mc", "]"}]}], "Input", - CellChangeTimes->{{3.376154138734375*^9, 3.376154157328125*^9}, { - 3.37615421221875*^9, 3.376154214828125*^9}, {3.376154311390625*^9, - 3.376154322875*^9}, {3.376154671890625*^9, 3.3761548241875*^9}, { - 3.376165173375*^9, 3.37616517709375*^9}, {3.376165279390625*^9, - 3.376165282796875*^9}, {3.3761664210625*^9, 3.376166431484375*^9}, { - 3.376166498375*^9, 3.376166509453125*^9}, {3.376166613546875*^9, - 3.376166613875*^9}, {3.3761670356875*^9, 3.37616704278125*^9}, - 3.376167715390625*^9, {3.37616777903125*^9, 3.37616778225*^9}, { - 3.376167819625*^9, 3.376167827984375*^9}, {3.37623462365625*^9, - 3.376234645859375*^9}, {3.376234911765625*^9, 3.376234912765625*^9}, { - 3.376235233671875*^9, 3.376235235171875*^9}, {3.376249412703125*^9, - 3.3762494133125*^9}, 3.376249560171875*^9, 3.376249779734375*^9, - 3.3762499426875*^9, 3.3762502816875*^9, {3.37625031396875*^9, - 3.376250322578125*^9}, 3.376308935265625*^9}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"4.297000000000004`", ",", "Null"}], "}"}]], "Output", - CellChangeTimes->{ - 3.37616528346875*^9, {3.3761664268125*^9, 3.376166433046875*^9}, - 3.376166511328125*^9, 3.376166617609375*^9, {3.37616703975*^9, - 3.37616704621875*^9}, 3.376167715703125*^9, {3.3761677685*^9, - 3.37616778725*^9}, 3.37616787496875*^9, 3.376234582203125*^9, { - 3.376234617359375*^9, 3.376234648046875*^9}, 3.3762349145625*^9, - 3.376234954609375*^9, {3.376235237*^9, 3.376235243328125*^9}, - 3.376249460890625*^9, 3.376249506640625*^9, 3.3762495603125*^9, - 3.37624959778125*^9, 3.376249719625*^9, 3.37624978015625*^9, - 3.376249855078125*^9, {3.376249936671875*^9, 3.376249960296875*^9}, { - 3.3762500325625*^9, 3.376250052296875*^9}, {3.376250246453125*^9, - 3.376250324203125*^9}, 3.376292560125*^9, {3.37629264896875*^9, - 3.37629265128125*^9}, 3.3763088188125*^9, {3.376308935796875*^9, - 3.376308945390625*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "0.713`", ",", "0.702`", ",", "0.728`", ",", "0.718`", ",", "0.702`", ",", - "0.674`", ",", "0.686`", ",", "0.712`", ",", "0.711`", ",", "0.704`", ",", - "0.727`", ",", "0.691`", ",", "0.698`", ",", "0.7`", ",", "0.705`", ",", - "0.717`", ",", "0.706`", ",", "0.707`", ",", "0.697`", ",", "0.692`", ",", - "0.715`", ",", "0.695`", ",", "0.688`", ",", "0.712`", ",", "0.698`", ",", - "0.685`", ",", "0.696`", ",", "0.704`", ",", "0.692`", ",", "0.716`", ",", - "0.701`", ",", "0.707`", ",", "0.714`", ",", "0.692`", ",", "0.722`", ",", - "0.719`", ",", "0.725`", ",", "0.708`", ",", "0.709`", ",", "0.704`", ",", - "0.7`", ",", "0.69`", ",", "0.706`", ",", "0.696`", ",", "0.697`", ",", - "0.71`", ",", "0.701`", ",", "0.702`", ",", "0.707`", ",", "0.695`", ",", - "0.697`", ",", "0.709`", ",", "0.708`", ",", "0.714`", ",", "0.683`", ",", - "0.709`", ",", "0.705`", ",", "0.701`", ",", "0.698`", ",", "0.704`", ",", - "0.71`", ",", "0.698`", ",", "0.701`", ",", "0.689`", ",", "0.718`", ",", - "0.718`", ",", "0.707`", ",", "0.71`", ",", "0.73`", ",", "0.723`", ",", - "0.687`", ",", "0.72`", ",", "0.709`", ",", "0.7`", ",", "0.73`", ",", - "0.686`", ",", "0.686`", ",", "0.708`", ",", "0.72`", ",", "0.728`", ",", - "0.689`", ",", "0.712`", ",", "0.704`", ",", "0.699`", ",", "0.699`", ",", - "0.727`", ",", "0.706`", ",", "0.701`", ",", "0.697`", ",", "0.721`", ",", - "0.726`", ",", "0.729`", ",", "0.711`", ",", "0.692`", ",", "0.729`", ",", - "0.717`", ",", "0.706`", ",", "0.728`", ",", "0.713`", ",", "0.704`"}], - "}"}]], "Output", - CellChangeTimes->{ - 3.37616528346875*^9, {3.3761664268125*^9, 3.376166433046875*^9}, - 3.376166511328125*^9, 3.376166617609375*^9, {3.37616703975*^9, - 3.37616704621875*^9}, 3.376167715703125*^9, {3.3761677685*^9, - 3.37616778725*^9}, 3.37616787496875*^9, 3.376234582203125*^9, { - 3.376234617359375*^9, 3.376234648046875*^9}, 3.3762349145625*^9, - 3.376234954609375*^9, {3.376235237*^9, 3.376235243328125*^9}, - 3.376249460890625*^9, 3.376249506640625*^9, 3.3762495603125*^9, - 3.37624959778125*^9, 3.376249719625*^9, 3.37624978015625*^9, - 3.376249855078125*^9, {3.376249936671875*^9, 3.376249960296875*^9}, { - 3.3762500325625*^9, 3.376250052296875*^9}, {3.376250246453125*^9, - 3.376250324203125*^9}, 3.376292560125*^9, {3.37629264896875*^9, - 3.37629265128125*^9}, 3.3763088188125*^9, {3.376308935796875*^9, - 3.3763089454375*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Show", "[", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"Histogram", "[", - RowBox[{ - RowBox[{"mc", "[", - RowBox[{"[", - RowBox[{"All", ",", "i"}], "]"}], "]"}], ",", "40", ",", - RowBox[{"AspectRatio", "\[Rule]", ".6"}]}], "]"}], ",", - RowBox[{"{", - RowBox[{"i", ",", - RowBox[{"Length", "[", "x0", "]"}]}], "}"}]}], "]"}], "]"}]], "Input", - CellChangeTimes->{{3.376166629796875*^9, 3.376166684734375*^9}, { - 3.376167062078125*^9, 3.376167067890625*^9}, {3.37616788184375*^9, - 3.376167888640625*^9}, {3.37623465378125*^9, 3.376234661671875*^9}, - 3.376235247671875*^9, {3.376235362046875*^9, 3.376235380546875*^9}}], - -Cell[BoxData[ - GraphicsBox[{{ - LineBox[{{-3.1989984901846467`, 0}, {-3.1989984901846467`, - 0.008957038432445741}, {-3.042712456072324, - 0.008957038432445741}, {-3.042712456072324, - 0.0019193653783812303`}, {-2.8864264219600013`, - 0.0019193653783812303`}, {-2.8864264219600013`, - 0.012155980729747792`}, {-2.730140387847679, - 0.012155980729747792`}, {-2.730140387847679, - 0.010876403810826971`}, {-2.573854353735356, - 0.010876403810826971`}, {-2.573854353735356, - 0.023032384540574765`}, {-2.4175683196230335`, - 0.023032384540574765`}, {-2.4175683196230335`, - 0.028150692216258044`}, {-2.2612822855107106`, - 0.028150692216258044`}, {-2.2612822855107106`, - 0.04862392291899117}, {-2.104996251398388, - 0.04862392291899117}, {-2.104996251398388, - 0.03966688448654543}, {-1.9487102172860655`, - 0.03966688448654543}, {-1.9487102172860655`, - 0.09148974970283864}, {-1.7924241831737429`, - 0.09148974970283864}, {-1.7924241831737429`, - 0.09276932662175946}, {-1.6361381490614202`, - 0.09276932662175946}, {-1.6361381490614202`, - 0.1202802303785571}, {-1.4798521149490975`, - 0.1202802303785571}, {-1.4798521149490975`, - 0.18489886478405854`}, {-1.323566080836775, - 0.18489886478405854`}, {-1.323566080836775, - 0.15674817256780046`}, {-1.1672800467244522`, - 0.15674817256780046`}, {-1.1672800467244522`, - 0.19449569167596467`}, {-1.0109940126121297`, - 0.19449569167596467`}, {-1.0109940126121297`, - 0.3045393067031552}, {-0.8547079784998068, - 0.3045393067031552}, {-0.8547079784998068, - 0.3813139218384044}, {-0.6984219443874844, - 0.3813139218384044}, {-0.6984219443874844, - 0.32629211432480915`}, {-0.542135910275162, - 0.32629211432480915`}, {-0.542135910275162, - 0.3346093642977945}, {-0.38584987616283906`, - 0.3346093642977945}, {-0.38584987616283906`, - 0.3544428065410672}, {-0.2295638420505166, - 0.3544428065410672}, {-0.2295638420505166, - 0.46256705618987654`}, {-0.07327780793819372, - 0.46256705618987654`}, {-0.07327780793819372, 0.41522271018980617`}, { - 0.08300822617412873, 0.41522271018980617`}, {0.08300822617412873, - 0.37107730648703785`}, {0.23929426028645162`, 0.37107730648703785`}, { - 0.23929426028645162`, 0.42481953708171233`}, {0.39558029439877407`, - 0.42481953708171233`}, {0.39558029439877407`, 0.35764174883836924`}, { - 0.5518663285110965, 0.35764174883836924`}, {0.5518663285110965, - 0.20281294164895}, {0.7081523626234194, 0.20281294164895}, { - 0.7081523626234194, 0.26743157605445145`}, {0.8644383967357423, - 0.26743157605445145`}, {0.8644383967357423, 0.3090178259193781}, { - 1.0207244308480647`, 0.3090178259193781}, {1.0207244308480647`, - 0.22456574927060394`}, {1.1770104649603872`, 0.22456574927060394`}, { - 1.1770104649603872`, 0.1951354801354251}, {1.3332964990727096`, - 0.1951354801354251}, {1.3332964990727096`, 0.15035028797319638`}, { - 1.489582533185033, 0.15035028797319638`}, {1.489582533185033, - 0.08573165356769495}, {1.6458685672973554`, 0.08573165356769495}, { - 1.6458685672973554`, 0.05118307675683281}, {1.8021546014096779`, - 0.05118307675683281}, {1.8021546014096779`, 0.058220749810897324`}, { - 1.9584406355220003`, 0.058220749810897324`}, {1.9584406355220003`, - 0.008957038432445741}, {2.1147266696343228`, 0.008957038432445741}, { - 2.1147266696343228`, 0.03326899989194133}, {2.271012703746646, - 0.03326899989194133}, {2.271012703746646, 0.030709846054099686`}, { - 2.4272987378589685`, 0.030709846054099686`}, {2.4272987378589685`, - 0.015994711486510254`}, {2.583584771971291, 0.015994711486510254`}, { - 2.583584771971291, 0.005758096135143691}, {2.7398708060836134`, - 0.005758096135143691}, {2.7398708060836134`, 0.010876403810826971`}, { - 2.8961568401959368`, 0.010876403810826971`}, {2.8961568401959368`, - 0.0019193653783812303`}, {3.0524428743082592`, - 0.0019193653783812303`}, {3.0524428743082592`, 0}}], {}, {}}, { - LineBox[{{-3.209364762882553, 0}, {-3.209364762882553, - 0.0011671518676348125`}, {-3.0380245906691017`, - 0.0011671518676348125`}, {-3.0380245906691017`, - 0.010504366808713313`}, {-2.8666844184556504`, - 0.010504366808713313`}, {-2.8666844184556504`, - 0.0040850315367218434`}, {-2.6953442462421995`, - 0.0040850315367218434`}, {-2.6953442462421995`, - 0.01108794274253072}, {-2.524004074028748, - 0.01108794274253072}, {-2.524004074028748, - 0.04260104316867065}, {-2.1813237296018455`, - 0.04260104316867065}, {-2.1813237296018455`, - 0.03909958756576622}, {-2.009983557388394, - 0.03909958756576622}, {-2.009983557388394, - 0.06360977678609728}, {-1.838643385174943, - 0.06360977678609728}, {-1.838643385174943, - 0.09745718094750684}, {-1.6673032129614918`, - 0.09745718094750684}, {-1.6673032129614918`, - 0.093372149410785}, {-1.4959630407480407`, - 0.093372149410785}, {-1.4959630407480407`, - 0.15231331872634302`}, {-1.3246228685345893`, - 0.15231331872634302`}, {-1.3246228685345893`, - 0.24685262000476285`}, {-1.153282696321138, - 0.24685262000476285`}, {-1.153282696321138, - 0.24568546813712802`}, {-0.9819425241076867, - 0.24568546813712802`}, {-0.9819425241076867, - 0.26786135362218944`}, {-0.8106023518942358, - 0.26786135362218944`}, {-0.8106023518942358, - 0.2964565743792424}, {-0.6392621796807845, - 0.2964565743792424}, {-0.6392621796807845, - 0.36123350303297447`}, {-0.46792200746733315`, - 0.36123350303297447`}, {-0.46792200746733315`, - 0.30287590965123384`}, {-0.2965818352538818, - 0.30287590965123384`}, {-0.2965818352538818, - 0.3180488839304864}, {-0.1252416630404305, - 0.3180488839304864}, {-0.1252416630404305, 0.3851601163194881}, { - 0.046098509173020386`, 0.3851601163194881}, {0.046098509173020386`, - 0.3355561619450086}, {0.2174386813864717, 0.3355561619450086}, { - 0.2174386813864717, 0.4219254001499847}, {0.38877885359992304`, - 0.4219254001499847}, {0.38877885359992304`, 0.35014556029044375`}, { - 0.5601190258133744, 0.35014556029044375`}, {0.5601190258133744, - 0.3594827752315222}, {0.7314591980268257, 0.3594827752315222}, { - 0.7314591980268257, 0.26552704988691983`}, {0.902799370240277, - 0.26552704988691983`}, {0.902799370240277, 0.23926613286513657`}, { - 1.0741395424537283`, 0.23926613286513657`}, {1.0741395424537283`, - 0.22234243078443178`}, {1.2454797146671797`, 0.22234243078443178`}, { - 1.2454797146671797`, 0.19258005815974405`}, {1.41681988688063, - 0.19258005815974405`}, {1.41681988688063, 0.1587326539983345}, { - 1.5881600590940814`, 0.1587326539983345}, {1.5881600590940814`, - 0.07644844733008022}, {1.7595002313075327`, 0.07644844733008022}, { - 1.7595002313075327`, 0.06594408052136691}, {1.930840403520984, - 0.06594408052136691}, {1.930840403520984, 0.03559813196286178}, { - 2.1021805757344354`, 0.03559813196286178}, {2.1021805757344354`, - 0.04785322657302731}, {2.2735207479478867`, 0.04785322657302731}, { - 2.2735207479478867`, 0.02626091702178328}, {2.444860920161338, - 0.02626091702178328}, {2.444860920161338, 0.02451018922033106}, { - 2.6162010923747894`, 0.02451018922033106}, {2.6162010923747894`, - 0.01400582241161775}, {2.7875412645882407`, 0.01400582241161775}, { - 2.7875412645882407`, 0.00466860747053925}, {2.958881436801692, - 0.00466860747053925}, {2.958881436801692, 0.007586487139626281}, { - 3.1302216090151433`, 0.007586487139626281}, {3.1302216090151433`, - 0.0035014556029044374`}, {3.301561781228594, 0.0035014556029044374`}, { - 3.301561781228594, 0.0017507278014522187`}, {3.472901953442045, - 0.0017507278014522187`}, {3.472901953442045, 0.0005835759338174062}, { - 3.6442421256554964`, 0.0005835759338174062}, { - 3.6442421256554964`, 0}}], {}, {}}, { - LineBox[{{-4.175888454996922, 0}, {-4.175888454996922, - 0.0009209772376074258}, {-3.9587495357774625`, - 0.0009209772376074258}, {-3.9587495357774625`, 0}, {-3.524471697338543, - 0}, {-3.524471697338543, 0.009670260994877972}, {-3.3073327781190835`, - 0.009670260994877972}, {-3.3073327781190835`, - 0.005525863425644555}, {-3.0901938588996236`, - 0.005525863425644555}, {-3.0901938588996236`, - 0.0004604886188037129}, {-2.8730549396801637`, - 0.0004604886188037129}, {-2.8730549396801637`, - 0.010130749613681683`}, {-2.655916020460704, - 0.010130749613681683`}, {-2.655916020460704, - 0.008749283757270545}, {-2.4387771012412447`, - 0.008749283757270545}, {-2.4387771012412447`, - 0.030852737459848765`}, {-2.2216381820217848`, - 0.030852737459848765`}, {-2.2216381820217848`, - 0.04604886188037129}, {-2.004499262802325, - 0.04604886188037129}, {-2.004499262802325, - 0.06124498630089382}, {-1.7873603435828653`, - 0.06124498630089382}, {-1.7873603435828653`, - 0.07736208795902377}, {-1.5702214243634054`, - 0.07736208795902377}, {-1.5702214243634054`, - 0.11650362055733937`}, {-1.353082505143946, - 0.11650362055733937`}, {-1.353082505143946, - 0.16301297105651438`}, {-1.135943585924486, - 0.16301297105651438`}, {-1.135943585924486, - 0.20629890122406339`}, {-0.9188046667050265, - 0.20629890122406339`}, {-0.9188046667050265, - 0.25879460376768665`}, {-0.7016657474855665, - 0.25879460376768665`}, {-0.7016657474855665, - 0.3186581242121693}, {-0.4845268282661066, - 0.3186581242121693}, {-0.4845268282661066, - 0.39325728045837083`}, {-0.2673879090466471, - 0.39325728045837083`}, {-0.2673879090466471, - 0.3918758146019597}, {-0.050248989827187174`, - 0.3918758146019597}, {-0.050248989827187174`, 0.503774548971262}, { - 0.16688992939227276`, 0.503774548971262}, {0.16688992939227276`, - 0.40338803007205254`}, {0.3840288486117318, 0.40338803007205254`}, { - 0.3840288486117318, 0.3089878632172914}, {0.6011677678311917, - 0.3089878632172914}, {0.6011677678311917, 0.3697723608993815}, { - 0.8183066870506517, 0.3697723608993815}, {0.8183066870506517, - 0.25557118343606067`}, {1.0354456062701116`, 0.25557118343606067`}, { - 1.0354456062701116`, 0.18097202718985916`}, {1.2525845254895716`, - 0.18097202718985916`}, {1.2525845254895716`, 0.1178850864137505}, { - 1.4697234447090306`, 0.1178850864137505}, {1.4697234447090306`, - 0.09486065547356486}, {1.6868623639284905`, 0.09486065547356486}, { - 1.6868623639284905`, 0.08703234895390174}, {1.9040012831479505`, - 0.08703234895390174}, {1.9040012831479505`, 0.07966453105304233}, { - 2.1211402023674104`, 0.07966453105304233}, {2.1211402023674104`, - 0.0428254415487453}, {2.3382791215868695`, 0.0428254415487453}, { - 2.3382791215868695`, 0.013814658564111387`}, {2.5554180408063294`, - 0.013814658564111387`}, {2.5554180408063294`, 0.01611710165812995}, { - 2.7725569600257893`, 0.01611710165812995}, {2.7725569600257893`, - 0.010130749613681683`}, {2.9896958792452493`, 0.010130749613681683`}, { - 2.9896958792452493`, 0.008749283757270545}, {3.206834798464709, - 0.008749283757270545}, {3.206834798464709, 0.0023024430940185646`}, { - 3.4239737176841682`, 0.0023024430940185646`}, {3.4239737176841682`, - 0.0032234203316259904`}, {3.641112636903628, 0.0032234203316259904`}, { - 3.641112636903628, 0.0004604886188037129}, {3.858251556123088, - 0.0004604886188037129}, {3.858251556123088, 0.0013814658564111387`}, { - 4.075390475342548, 0.0013814658564111387`}, {4.075390475342548, - 0.0018419544752148517`}, {4.292529394562008, 0.0018419544752148517`}, { - 4.292529394562008, 0.0032234203316259904`}, {4.509668313781468, - 0.0032234203316259904`}, {4.509668313781468, 0}}], {}, {}}, { - LineBox[{{-3.7406783318115058`, 0}, {-3.7406783318115058`, - 0.0042794405491938465`}, {-3.5537567006300916`, - 0.0042794405491938465`}, {-3.5537567006300916`, - 0.002674650343246154}, {-3.179913438267264, - 0.002674650343246154}, {-3.179913438267264, - 0.008558881098387693}, {-2.9929918070858497`, - 0.008558881098387693}, {-2.9929918070858497`, - 0.01925748247137231}, {-2.8060701759044355`, - 0.01925748247137231}, {-2.8060701759044355`, - 0.005349300686492308}, {-2.6191485447230214`, - 0.005349300686492308}, {-2.6191485447230214`, - 0.03798003487409539}, {-2.4322269135416077`, - 0.03798003487409539}, {-2.4322269135416077`, - 0.011768461510283077`}, {-2.2453052823601936`, - 0.011768461510283077`}, {-2.2453052823601936`, - 0.03904989501139385}, {-2.0583836511787794`, - 0.03904989501139385}, {-2.0583836511787794`, - 0.05830737748276616}, {-1.8714620199973655`, - 0.05830737748276616}, {-1.8714620199973655`, - 0.07756485995413846}, {-1.6845403888159516`, - 0.07756485995413846}, {-1.6845403888159516`, - 0.09521755221956309}, {-1.4976187576345374`, - 0.09521755221956309}, {-1.4976187576345374`, - 0.18508580375263387`}, {-1.3106971264531233`, - 0.18508580375263387`}, {-1.3106971264531233`, - 0.14871055908448616`}, {-1.1237754952717096`, - 0.14871055908448616`}, {-1.1237754952717096`, - 0.18936524430182772`}, {-0.9368538640902955, - 0.18936524430182772`}, {-0.9368538640902955, - 0.2824430762467939}, {-0.7499322329088813, - 0.2824430762467939}, {-0.7499322329088813, - 0.2797684259035477}, {-0.5630106017274672, - 0.2797684259035477}, {-0.5630106017274672, - 0.3921037403198862}, {-0.37608897054605306`, - 0.3921037403198862}, {-0.37608897054605306`, - 0.3370059432490154}, {-0.18916733936463936`, - 0.3370059432490154}, {-0.18916733936463936`, - 0.3910338801825877}, {-0.0022457081832252257`, - 0.3910338801825877}, {-0.0022457081832252257`, 0.32684227194468}, { - 0.1846759229981889, 0.32684227194468}, {0.1846759229981889, - 0.4552254884204954}, {0.3715975541796026, 0.4552254884204954}, { - 0.3715975541796026, 0.34823947469064925`}, {0.5585191853610172, - 0.34823947469064925`}, {0.5585191853610172, 0.29153688741383077`}, { - 0.7454408165424309, 0.29153688741383077`}, {0.7454408165424309, - 0.2781636356976}, {0.9323624477238446, 0.2781636356976}, { - 0.9323624477238446, 0.2856526566586893}, {1.1192840789052592`, - 0.2856526566586893}, {1.1192840789052592`, 0.22039118828348309`}, { - 1.3062057100866729`, 0.22039118828348309`}, {1.3062057100866729`, - 0.16208381080071693`}, {1.4931273412680865`, 0.16208381080071693`}, { - 1.4931273412680865`, 0.12303391578932309`}, {1.6800489724495011`, - 0.12303391578932309`}, {1.6800489724495011`, 0.09468262215091386}, { - 1.8669706036309148`, 0.09468262215091386}, {1.8669706036309148`, - 0.06900597885575077}, {2.0538922348123294`, 0.06900597885575077}, { - 2.0538922348123294`, 0.05884230755141539}, {2.240813865993743, - 0.05884230755141539}, {2.240813865993743, 0.01979241254002154}, { - 2.427735497175157, 0.01979241254002154}, {2.427735497175157, - 0.02621157336381231}, {2.6146571283565714`, 0.02621157336381231}, { - 2.6146571283565714`, 0.006954090892440001}, {2.801578759537985, - 0.006954090892440001}, {2.801578759537985, 0.003209580411895385}, { - 2.9885003907193997`, 0.003209580411895385}, {2.9885003907193997`, - 0.004814370617843077}, {3.362343653082227, 0.004814370617843077}, { - 3.362343653082227, 0}, {3.5492652842636416`, 0}, {3.5492652842636416`, - 0.0021397202745969232`}, {3.7361869154450553`, - 0.0021397202745969232`}, {3.7361869154450553`, 0}}], {}, {}}, { - LineBox[{{-3.7693124213145928`, 0}, {-3.7693124213145928`, - 0.008253688035461944}, {-3.575479069590528, - 0.008253688035461944}, {-3.575479069590528, - 0.001031711004432743}, {-3.3816457178664634`, - 0.001031711004432743}, {-3.3816457178664634`, - 0.0005158555022163715}, {-3.1878123661423983`, - 0.0005158555022163715}, {-3.1878123661423983`, - 0.007221977031029201}, {-2.9939790144183336`, - 0.007221977031029201}, {-2.9939790144183336`, - 0.003095133013298229}, {-2.800145662694269, - 0.003095133013298229}, {-2.800145662694269, - 0.022181786595303975`}, {-2.606312310970204, - 0.022181786595303975`}, {-2.606312310970204, - 0.02011836458643849}, {-2.4124789592461395`, - 0.02011836458643849}, {-2.4124789592461395`, - 0.03610988515514601}, {-2.218645607522075, - 0.03610988515514601}, {-2.218645607522075, - 0.05725996074601724}, {-2.02481225579801, - 0.05725996074601724}, {-2.02481225579801, - 0.08408444686126856}, {-1.830978904073945, - 0.08408444686126856}, {-1.830978904073945, - 0.08924300188343227}, {-1.6371455523498804`, - 0.08924300188343227}, {-1.6371455523498804`, - 0.130511442060742}, {-1.4433122006258157`, - 0.130511442060742}, {-1.4433122006258157`, - 0.1537249396604787}, {-1.249478848901751, - 0.1537249396604787}, {-1.249478848901751, - 0.22697642097520349`}, {-1.0556454971776859`, - 0.22697642097520349`}, {-1.0556454971776859`, - 0.23626182001509816`}, {-0.8618121454536212, - 0.23626182001509816`}, {-0.8618121454536212, - 0.3244731108940977}, {-0.6679787937295565, - 0.3244731108940977}, {-0.6679787937295565, - 0.34975003050269987`}, {-0.4741454420054918, - 0.34975003050269987`}, {-0.4741454420054918, - 0.4111368352664481}, {-0.2803120902814271, - 0.4111368352664481}, {-0.2803120902814271, - 0.4023672917287698}, {-0.08647873855736199, - 0.4023672917287698}, {-0.08647873855736199, 0.3641939845647583}, { - 0.1073546131667027, 0.3641939845647583}, {0.1073546131667027, - 0.47974561706122554`}, {0.3011879648907674, 0.47974561706122554`}, { - 0.3011879648907674, 0.337369498449507}, {0.49502131661483206`, - 0.337369498449507}, {0.49502131661483206`, 0.2620545951259167}, { - 0.6888546683388967, 0.2620545951259167}, {0.6888546683388967, - 0.22491299896633798`}, {0.8826880200629614, 0.22491299896633798`}, { - 0.8826880200629614, 0.21717516643309243`}, {1.0765213717870261`, - 0.21717516643309243`}, {1.0765213717870261`, 0.20685805638876498`}, { - 1.2703547235110908`, 0.20685805638876498`}, {1.2703547235110908`, - 0.1470188181316659}, {1.4641880752351564`, 0.1470188181316659}, { - 1.4641880752351564`, 0.09027471288786502}, {1.658021426959221, - 0.09027471288786502}, {1.658021426959221, 0.08769543537678316}, { - 1.8518547786832857`, 0.08769543537678316}, {1.8518547786832857`, - 0.043331862186175206`}, {2.0456881304073504`, 0.043331862186175206`}, { - 2.0456881304073504`, 0.06241851576818096}, {2.239521482131415, - 0.06241851576818096}, {2.239521482131415, 0.038689162666227864`}, { - 2.43335483385548, 0.038689162666227864`}, {2.43335483385548, - 0.01650737607092389}, {2.6271881855795445`, 0.01650737607092389}, { - 2.6271881855795445`, 0.004642699519947344}, {3.014854889027674, - 0.004642699519947344}, {3.014854889027674, 0.0005158555022163715}, { - 3.2086882407517385`, 0.0005158555022163715}, {3.2086882407517385`, - 0.004642699519947344}, {3.402521592475803, 0.004642699519947344}, { - 3.402521592475803, 0.0005158555022163715}, {3.596354944199869, - 0.0005158555022163715}, {3.596354944199869, 0}, { - 3.7901882959239335`, 0}, {3.7901882959239335`, - 0.0015475665066491146`}, {3.984021647647998, 0.0015475665066491146`}, { - 3.984021647647998, 0}}], {}, {}}, { - LineBox[{{-3.383177766523831, 0}, {-3.383177766523831, - 0.0011589865912617786`}, {-3.2106304708885265`, - 0.0011589865912617786`}, {-3.2106304708885265`, - 0.002317973182523557}, {-3.038083175253222, - 0.002317973182523557}, {-3.038083175253222, - 0.009851386025725118}, {-2.865535879617917, - 0.009851386025725118}, {-2.865535879617917, - 0.011589865912617785`}, {-2.6929885839826126`, - 0.011589865912617785`}, {-2.6929885839826126`, - 0.01506682568640312}, {-2.520441288347308, - 0.01506682568640312}, {-2.520441288347308, - 0.02433871841649735}, {-2.3478939927120033`, - 0.02433871841649735}, {-2.3478939927120033`, - 0.028974664781544465`}, {-2.175346697076699, - 0.028974664781544465`}, {-2.175346697076699, - 0.06722122229318316}, {-2.0027994014413943`, - 0.06722122229318316}, {-2.0027994014413943`, - 0.03592858432911514}, {-1.8302521058060899`, - 0.03592858432911514}, {-1.8302521058060899`, - 0.054472369789303594`}, {-1.6577048101707852`, - 0.054472369789303594`}, {-1.6577048101707852`, - 0.09329842059657317}, {-1.4851575145354805`, - 0.09329842059657317}, {-1.4851575145354805`, - 0.141396364133937}, {-1.312610218900176, - 0.141396364133937}, {-1.312610218900176, - 0.19644822721887145`}, {-1.1400629232648716`, - 0.19644822721887145`}, {-1.1400629232648716`, - 0.25207958359943683`}, {-0.9675156276295667, - 0.25207958359943683`}, {-0.9675156276295667, - 0.3181418193013582}, {-0.7949683319942622, - 0.3181418193013582}, {-0.7949683319942622, - 0.3001775271368006}, {-0.6224210363589577, - 0.3001775271368006}, {-0.6224210363589577, - 0.329731685213976}, {-0.44987374072365327`, - 0.329731685213976}, {-0.44987374072365327`, - 0.3384240846484393}, {-0.2773264450883488, - 0.3384240846484393}, {-0.2773264450883488, - 0.361024323178044}, {-0.1047791494530439, - 0.361024323178044}, {-0.1047791494530439, 0.4154966929673476}, { - 0.06776814618226057, 0.4154966929673476}, {0.06776814618226057, - 0.3581268566998896}, {0.24031544181756503`, 0.3581268566998896}, { - 0.24031544181756503`, 0.4485278108183083}, {0.41286273745286994`, - 0.4485278108183083}, {0.41286273745286994`, 0.3830450684120178}, { - 0.5854100330881744, 0.3830450684120178}, {0.5854100330881744, - 0.26714640928583994`}, {0.7579573287234789, 0.26714640928583994`}, { - 0.7579573287234789, 0.314085366231942}, {0.9305046243587833, - 0.314085366231942}, {0.9305046243587833, 0.24512566405186617`}, { - 1.1030519199940878`, 0.24512566405186617`}, {1.1030519199940878`, - 0.19876620040139503`}, {1.2755992156293923`, 0.19876620040139503`}, { - 1.2755992156293923`, 0.1721095088023741}, {1.4481465112646976`, - 0.1721095088023741}, {1.4481465112646976`, 0.1344424445863663}, { - 1.620693806900002, 0.1344424445863663}, {1.620693806900002, - 0.06953919547570671}, {1.7932411025353066`, 0.06953919547570671}, { - 1.7932411025353066`, 0.0915599407096805}, {1.965788398170611, - 0.0915599407096805}, {1.965788398170611, 0.049836423424256475`}, { - 2.1383356938059155`, 0.049836423424256475`}, {2.1383356938059155`, - 0.017384798868926677`}, {2.31088298944122, 0.017384798868926677`}, { - 2.31088298944122, 0.027236184894651797`}, {2.4834302850765244`, - 0.027236184894651797`}, {2.4834302850765244`, 0.014487332390772233`}, { - 2.655977580711829, 0.014487332390772233`}, {2.655977580711829, - 0.002317973182523557}, {2.8285248763471333`, 0.002317973182523557}, { - 2.8285248763471333`, 0.0005794932956308893}, {3.0010721719824387`, - 0.0005794932956308893}, {3.0010721719824387`, 0.002317973182523557}, { - 3.173619467617743, 0.002317973182523557}, {3.173619467617743, 0}, { - 3.3461667632530476`, 0}, {3.3461667632530476`, - 0.0017384798868926678`}, {3.518714058888352, 0.0017384798868926678`}, { - 3.518714058888352, 0}}], {}, {}}, { - LineBox[{{-3.131715315237866, 0}, {-3.131715315237866, - 0.0017701613132522867`}, {-2.9622561813420005`, - 0.0017701613132522867`}, {-2.9622561813420005`, - 0.0029502688554204778`}, {-2.792797047446135, - 0.0029502688554204778`}, {-2.792797047446135, - 0.020651881987943346`}, {-2.62333791355027, - 0.020651881987943346`}, {-2.62333791355027, - 0.007670699024093243}, {-2.4538787796544046`, - 0.007670699024093243}, {-2.4538787796544046`, - 0.023602150843363822`}, {-2.2844196457585393`, - 0.023602150843363822`}, {-2.2844196457585393`, - 0.04425403283130717}, {-2.114960511862674, - 0.04425403283130717}, {-2.114960511862674, - 0.03658333380721392}, {-1.9455013779668087`, - 0.03658333380721392}, {-1.9455013779668087`, - 0.05605510825298908}, {-1.7760422440709434`, - 0.05605510825298908}, {-1.7760422440709434`, - 0.0672661299035869}, {-1.606583110175078, - 0.0672661299035869}, {-1.606583110175078, - 0.10089919485538033`}, {-1.4371239762792127`, - 0.10089919485538033`}, {-1.4371239762792127`, - 0.12568145324091234`}, {-1.2676648423833474`, - 0.12568145324091234`}, {-1.2676648423833474`, - 0.16521505590354676`}, {-1.0982057084874821`, - 0.16521505590354676`}, {-1.0982057084874821`, - 0.22068011038545174`}, {-0.9287465745916168, - 0.22068011038545174`}, {-0.9287465745916168, - 0.22717070186737678`}, {-0.7592874406957515, - 0.22717070186737678`}, {-0.7592874406957515, - 0.2537231215661611}, {-0.5898283067998862, - 0.2537231215661611}, {-0.5898283067998862, - 0.35226210133720504`}, {-0.42036917290402087`, - 0.35226210133720504`}, {-0.42036917290402087`, - 0.3959260803974281}, {-0.25091003900815556`, - 0.3959260803974281}, {-0.25091003900815556`, - 0.4372298443733148}, {-0.08145090511229025, - 0.4372298443733148}, {-0.08145090511229025, 0.42955914534922157`}, { - 0.08800822878357506, 0.42955914534922157`}, {0.08800822878357506, - 0.32334946655408436`}, {0.25746736267944037`, 0.32334946655408436`}, { - 0.25746736267944037`, 0.41716801615645555`}, {0.4269264965753057, - 0.41716801615645555`}, {0.4269264965753057, 0.41834812369862373`}, { - 0.596385630471171, 0.41834812369862373`}, {0.596385630471171, - 0.28912634783120683`}, {0.7658447643670363, 0.28912634783120683`}, { - 0.7658447643670363, 0.30269758456614104`}, {0.9353038982629016, - 0.30269758456614104`}, {0.9353038982629016, 0.21536962644569488`}, { - 1.1047630321587665`, 0.21536962644569488`}, {1.1047630321587665`, - 0.22894086318062906`}, {1.2742221660546322`, 0.22894086318062906`}, { - 1.2742221660546322`, 0.22835080940954497`}, {1.443681299950498, - 0.22835080940954497`}, {1.443681299950498, 0.12509139946982825`}, { - 1.6131404338463629`, 0.12509139946982825`}, {1.6131404338463629`, - 0.12273118438549188`}, {1.7825995677422277`, 0.12273118438549188`}, { - 1.7825995677422277`, 0.0654959685903346}, {1.9520587016380935`, - 0.0654959685903346}, {1.9520587016380935`, 0.07080645253009146}, { - 2.1215178355339592`, 0.07080645253009146}, {2.1215178355339592`, - 0.04543414037347536}, {2.290976969429824, 0.04543414037347536}, { - 2.290976969429824, 0.03835349512046621}, {2.460436103325689, - 0.03835349512046621}, {2.460436103325689, 0.019471774445775154`}, { - 2.6298952372215547`, 0.019471774445775154`}, {2.6298952372215547`, - 0.011801075421681911`}, {2.7993543711174205`, 0.011801075421681911`}, { - 2.7993543711174205`, 0.0005900537710840956}, {2.9688135050132853`, - 0.0005900537710840956}, {2.9688135050132853`, 0.00531048393975686}, { - 3.13827263890915, 0.00531048393975686}, {3.13827263890915, - 0.001180107542168191}, {3.307731772805016, 0.001180107542168191}, { - 3.307731772805016, 0.0017701613132522867`}, {3.4771909067008817`, - 0.0017701613132522867`}, {3.4771909067008817`, 0.0005900537710840956}, { - 3.6466500405967466`, 0.0005900537710840956}, { - 3.6466500405967466`, 0}}], {}, {}}}, - AspectRatio->0.6, - DisplayFunction->Identity, - Frame->{True, True, False, False}]], "Output", - CellChangeTimes->{ - 3.376235381140625*^9, {3.376293522296875*^9, 3.37629354728125*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Mean", "[", "mc", "]"}]], "Input", - CellChangeTimes->{{3.37623527084375*^9, 3.376235272203125*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"-", "0.003783856351946682`"}], ",", - RowBox[{"-", "0.07611147780847509`"}], ",", - RowBox[{"-", "0.024903464284182695`"}], ",", "0.030710327732062625`", ",", - "0.004799504733268179`", ",", - RowBox[{"-", "0.024149933377163944`"}], ",", - RowBox[{"-", "0.06361185419632617`"}]}], "}"}]], "Output", - CellChangeTimes->{3.376235272578125*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"MatrixForm", "@", - RowBox[{"Map", "[", - RowBox[{ - RowBox[{ - RowBox[{"PaddedForm", "[", - RowBox[{"#", ",", - RowBox[{"{", - RowBox[{"3", ",", "2"}], "}"}]}], "]"}], "&"}], ",", - RowBox[{"Covariance", "[", "mc", "]"}], ",", - RowBox[{"{", "2", "}"}]}], "]"}]}]], "Input", - CellChangeTimes->{{3.37623527509375*^9, 3.37623534*^9}}], - -Cell[BoxData[ - TagBox[ - RowBox[{"(", "\[NoBreak]", GridBox[{ - { - TagBox[ - InterpretationBox["\<\" 0.95\"\>", - 0.9537032729616703, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.04\"\>", - -0.04218458874966183, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.02\"\>", - -0.018135375467144554`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.01\"\>", - 0.00857840732473738, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.00\"\>", - -0.004443378873864716, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.02265469892070173, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.04\"\>", - 0.03829626532080443, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ]}, - { - TagBox[ - InterpretationBox["\<\"-0.04\"\>", - -0.04218458874966183, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 1.06\"\>", - 1.0558308870327595`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.06\"\>", - -0.05514977178294164, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.07\"\>", - 0.06517808013110833, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.10\"\>", - 0.09904157554935408, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.00\"\>", - 0.00268539712147848, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.03\"\>", - -0.0262222119921313, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ]}, - { - TagBox[ - InterpretationBox["\<\"-0.02\"\>", - -0.018135375467144554`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.06\"\>", - -0.05514977178294164, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 1.04\"\>", - 1.0375350649343276`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.019781296009935497`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.06\"\>", - -0.05618054541427067, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.03\"\>", - 0.03139845838514928, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.017878519632569333`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ]}, - { - TagBox[ - InterpretationBox["\<\" 0.01\"\>", - 0.00857840732473738, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.07\"\>", - 0.06517808013110833, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.019781296009935497`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 1.08\"\>", - 1.0838280887242027`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.01899393818193987, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.00\"\>", - -0.0014255670624039284`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.06\"\>", - 0.059347629057403754`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ]}, - { - TagBox[ - InterpretationBox["\<\"-0.00\"\>", - -0.004443378873864716, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.10\"\>", - 0.09904157554935408, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.06\"\>", - -0.05618054541427067, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.01899393818193987, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 1.06\"\>", - 1.0628823961568872`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.020889024403563255`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.00\"\>", - 0.0025342730516941603`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ]}, - { - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.02265469892070173, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.00\"\>", - 0.00268539712147848, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.03\"\>", - 0.03139845838514928, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.00\"\>", - -0.0014255670624039284`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.020889024403563255`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.97\"\>", - 0.9669643789988037, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.01\"\>", - 0.010467714020067942`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ]}, - { - TagBox[ - InterpretationBox["\<\" 0.04\"\>", - 0.03829626532080443, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\"-0.03\"\>", - -0.0262222119921313, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.02\"\>", - 0.017878519632569333`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.06\"\>", - 0.059347629057403754`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.00\"\>", - 0.0025342730516941603`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.01\"\>", - 0.010467714020067942`, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ], - TagBox[ - InterpretationBox["\<\" 0.98\"\>", - 0.982820578061231, - AutoDelete->True], - PaddedForm[#, {3, 2}]& ]} - }, - GridBoxAlignment->{ - "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], - Function[BoxForm`e$, - MatrixForm[BoxForm`e$]]]], "Output", - CellChangeTimes->{{3.37623527984375*^9, 3.37623534046875*^9}, - 3.3762935506875*^9}] -}, Open ]] -}, -WindowSize->{1098, 1002}, -WindowMargins->{{0, Automatic}, {Automatic, 0}}, -ShowSelection->True, -FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (October 10, 2006)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{ - "Info3376231445-5207814"->{ - Cell[836, 31, 419, 10, 60, "Print", - CellTags->"Info3376231445-5207814"]} - } -*) -(*CellTagsIndex -CellTagsIndex->{ - {"Info3376231445-5207814", 53191, 1159} - } -*) -(*NotebookFileOutline -Notebook[{ -Cell[568, 21, 126, 2, 39, "Input"], -Cell[CellGroupData[{ -Cell[719, 27, 114, 2, 39, "Input"], -Cell[836, 31, 419, 10, 60, "Print", - CellTags->"Info3376231445-5207814"] -}, Open ]], -Cell[CellGroupData[{ -Cell[1292, 46, 128, 2, 39, "Input"], -Cell[1423, 50, 633, 12, 82, "Message"], -Cell[2059, 64, 628, 12, 82, "Message"], -Cell[2690, 78, 645, 13, 57, "Message"], -Cell[3338, 93, 752, 13, 107, "Message"], -Cell[4093, 108, 640, 12, 82, "Message"], -Cell[4736, 122, 814, 15, 82, "Message"] -}, Closed]], -Cell[5565, 140, 182, 3, 32, "Input"], -Cell[5750, 145, 129, 2, 39, "Input"], -Cell[CellGroupData[{ -Cell[5904, 151, 488, 10, 39, "Input"], -Cell[6395, 163, 409, 9, 54, "Output"] -}, Open ]], -Cell[6819, 175, 856, 28, 39, "Input"], -Cell[7678, 205, 374, 10, 39, "Input"], -Cell[8055, 217, 254, 6, 39, "Input"], -Cell[CellGroupData[{ -Cell[8334, 227, 1460, 29, 147, "Input"], -Cell[9797, 258, 474, 8, 38, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[10308, 271, 1281, 23, 69, "Input"], -Cell[11592, 296, 956, 16, 38, "Output"], -Cell[12551, 314, 2482, 37, 238, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[15070, 356, 695, 16, 39, "Input"], -Cell[15768, 374, 28198, 466, 350, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[44003, 845, 123, 2, 39, "Input"], -Cell[44129, 849, 402, 9, 38, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[44568, 863, 389, 11, 39, "Input"], -Cell[44960, 876, 7886, 269, 166, "Output"] -}, Open ]] -} -] -*) - -(* End of internal cache information *) diff --git a/MathematicaFiles/Applications/Metropolis_working.m b/MathematicaFiles/Applications/Metropolis_working.m deleted file mode 100755 index 2eb25401110d69939bc27019a18cdb595c7a37f2..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/Metropolis_working.m +++ /dev/null @@ -1,68 +0,0 @@ -With[{ - bfun = (Min[#] > -1 &), - vfun = (-#.#/2 &), - k = 1, - chol = {{1}} - }, - metFun = Compile[{ - {start, _Real, 1}, - {nOuter, _Integer, 0}, - {nInner, _Integer, 0}, - {nDrop, _Integer, 0} - }, - Drop[ - NestList[ - Nest[ - Function[sv, - Module[{p, pval}, - p = Most[sv] + - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {k}].chol; - If[bfun[p], - (* then *) - pval = vfun[p]; - If[pval >= Last[sv] + Log[RandomReal[]], - Append[p, pval], - sv] - , - (* else *) - sv] - ]], #, nInner] &, - start, nOuter + nDrop], - nDrop + 1] - ] - ]; - -cholfun = Function[{v, k}, - CholeskyDecomposition[ - Switch[ - TensorRank[v], - 0, v * IdentityMatrix[k], - 1, DiagonalMatrix[v], - 2, v - ]]] - -CompileNestFunction[vfun_, bfun_, chol_] := - With[{k = Length[chol]}, - Compile[{ - {start, _Real, 1}, - {nOuter, _Integer, 0}, - {nInner, _Integer, 0}, - {nDrop, _Integer, 0} - }, - Drop[ - NestList[ - Nest[ - Function[sv, - Module[{p, pval}, - p = Most[sv] + - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {k}].chol; - If[bfun[p], - pval = vfun[p]; - If[pval >= Last[sv] + Log[RandomReal[]], - Append[p, pval], - sv], - sv] - ]], #, nInner] &, - start, nOuter + nDrop], - nDrop + 1] - ]] diff --git a/MathematicaFiles/Applications/OddsandEnds.m b/MathematicaFiles/Applications/OddsandEnds.m deleted file mode 100755 index 67803c79a747317aa448f35ce2663c01745b0aa3..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/OddsandEnds.m +++ /dev/null @@ -1,1298 +0,0 @@ -MoveFilesToDateBasedDirectories::usage = -"MoveFilesToDateBasedDirectories[holdingdirectory, \ -newparentdirectory]. The holdingdirectory is where the JPEGs and AVIs are \ -currently located and the newparentdirectory is where the date-based \ -subdirectories should be located. If only one directory is provided, \ -it is used for both directories." - -MoveFilesToDateBasedDirectories::nofiles = "There are no JPEGs or AVIs in `1`." - -MoveFilesToDateBasedDirectories[ - holdingdirectory_String, - newparentdirectory_String - ] := -Module[{oldnames, dates, newsubdirs, newnames}, - oldnames = FileNames[ - __ ~~ "." ~~ ("jpg" | "jpeg" | "avi"), - {holdingdirectory}, - IgnoreCase -> True]; - If[oldnames === {}, - Message[MoveJPEGsToDateBasedDirectories::nojpegs, holdingdirectory]; - Return[$Failed] - ]; - dates = (DateList /@ (Date /. FileInformation /@ oldnames))[[All, ;; 3]]; - newsubdirs = ToFileName[{ - newparentdirectory, - DateString[#, Riffle[{"Year", "Month", "Day"}, "-"]] - }] & /@ dates; - CreateDirectory /@ Union[newsubdirs]; - newnames = MapThread[ - ToFileName[{#1}, #2] &, - { - newsubdirs, - StringSplit[oldnames, "\\"][[All, -1]] - }]; - MapThread[RenameFile, {oldnames, newnames}] - ] - -MoveFilesToDateBasedDirectories[holdingdirectory_String] := - MoveFilesToDateBasedDirectories[holdingdirectory, holdingdirectory] - -ChineseRestaurantProcess::usage = "ChineseRestaurantProcess[\[Alpha], n] returns \ -a list of n patrons distributed among a random number of tables where the number \ -of tables is controlled by \[Alpha]. ChineseRestaurantProcess[\[Alpha], list] \ -returns a new list updated by one draw from the process." - -ChineseRestaurantProcess[ - a_ /; 0 <= a <= 1, - n_Integer?Positive - ] := - Module[{m, vec, r}, - m = 1; - vec[1] = 1; - Table[ - If[ - RandomReal[] < a, - (* then *) - vec[++m] = 1, - (* else *) - r = RandomInteger[{1, m}]; - ++vec[r] - ], - {n - 1} - ]; - Array[vec, m] - ] - -ChineseRestaurantProcess[a_, list:{}] := {1} - -(* -ChineseRestaurantProcess[a_, list:{__}] := - Module[{list1 = list, r}, - If[RandomReal[] < a, - (* then *) - Append[list1, 1], - (* else *) - r = RandomInteger[{1, Length[list]}]; - list1[[r]]++; - list1 - ] - ] -*) - -ChineseRestaurantProcess[a_, list:{__}] := - If[ - RandomReal[] < a, - Append[list, 1], - With[{r = RandomInteger[{1, Length[list]}]}, - ReplacePart[list, r -> list[[r]] + 1] - ] - ] - -RotateMatrix::usage = "RotateMatrix[matrix] rotates the matrix 90 degrees \ -clockwise. RotateMatrix[matrix, n] rotates the matrix n times. Negative n \ -produces counter-clockwise rotation." - -RotateMatrix[matrix_] := Table[Reverse@matrix[[All, i]], {i, Dimensions[matrix][[2]]}] - -RotateMatrix[matrix_, 1] := RotateMatrix[matrix] - -RotateMatrix[matrix_, -1] := Table[matrix[[All, i]], {i, Dimensions[matrix][[2]], 1, -1}] - -RotateMatrix[matrix_, n_Integer?Positive] := Nest[RotateMatrix, matrix, n] - -RotateMatrix[matrix_, n_Integer?Negative] := Nest[RotateMatrix[#, -1] &, matrix, -n] - -RotateMatrix[matrix_, 0] := matrix - -OpenURL::usage = "OpenURL[url] opens the url in the default browser." - -OpenURL[url_String] := NotebookLocate[{URL[url], None}] - -MinimumVarianceSampling::usage = -"MinimumVarianceSampling[weights -> x, n] returns a sample of size n \ -from x using the given weights (which need not be \ -normalized). It does so with a minimum of Monte Carlo \ -variance. For example, if the weights are all the same and \ -n == Length[weights], then x is returned. If n is omitted, \ -then a sample of Length[w] is returned. If x is omitted, then \ -Range[n] is used instead." - -MinimumVarianceSampling[w_List /; (Min[w] >= 0), n_Integer?Positive] := - mvsCompiled[w, n] - -MinimumVarianceSampling[w_List] := MinimumVarianceSampling[w, Length[w]] - -MinimumVarianceSampling[ - (w_List -> x_List) /; (Length[w]==Length[x] && Min[w] >= 0), - n_Integer?Positive] := x[[ mvsCompiled[w, n] ]] - -MinimumVarianceSampling[(w_List -> x_List)] := - MinimumVarianceSampling[w -> x, Length[w]] - -MinimumVarianceSampling[___] := $Failed - -(* c[[i]] is the number of children of the i-th parent - p[[j]] is the position of the parent of the j-th child - w is the list of nonnegative weights (need not be normalized) - M is the desired number of children - *) -mvsCompiled = Compile[{{w, _Real, 1}, {M, _Integer, 0}}, - Module[{ - c = (Rest[#] - Most[#])& @ - Floor[FoldList[Plus, 0, M * w/(Plus@@w)] - RandomReal[]], - p = Table[0, {M}], - j = 1}, - Do[ - Do[p[[j]] = i; j++, {c[[i]]}], - {i, Length[w]}]; - p - ]] - -LeapYearQ::usage = "LeapYearQ[year] returns True if the year is \ -a leap year and False otherwise." - -LeapYearQ[year_Integer|{year_Integer, ___}] := lyqCompiled[year] - -lyqCompiled = Compile[{{year, _Integer, 0}}, - Which[ - Mod[year, 400] == 0, True, - Mod[year, 100] == 0, False, - Mod[year, 4] == 0, True, - True,(* otherwise *) False - ] - ] - -DuplicateDittos::usage = "DuplicateDittos[data, dittomark] replaces \ -the dittomarks with values from \"above\". DuplicateDittos works on \ -vectors and matrices." - -DuplicateDittos[data_?VectorQ, ditto_] := - Rest@FoldList[If[#2 === ditto, #1, #2] &, 0, data] -DuplicateDittos[data_?MatrixQ, ditto_] := - Transpose[ DuplicateDittos[#, ditto] & /@ Transpose[data]] - -NormalizeSum::usage = "NormalizeSum[x] returns x/Plus@@x." - -NormalizeSum[x_] := x/(Plus @@ x) - -RunningMean::usage = "RunningMean[data] returns a list of \ -running means for the given data. RunningMean[data, k] \ -drops the first k values from the output." - -RunningMean[data_?(VectorQ[#, NumericQ] &), drop_:0] := - runningMeanCompiled[data, drop] - -runningMeanCompiled = Compile[{{data, _Real, 1}, {drop, _Integer, 0}}, - Module[{m = If[drop == 0, 0., Plus @@ Take[data, drop]/drop]}, - Table[ - m = (m (i - 1) + data[[i]])/i, - {i, drop + 1, Length[data]}] - ]]; - -MathematicaBook[] := - NotebookOpen[ - ToFileName[{$UserAddOnsDirectory, "Applications"}, - "The Virtual Mathematica Book (v6).nb"] - ] - -GetArguments::usage = "GetArguments[f] returns the list of dummy \ -arguments used in the definition of f." - -GetArguments[f_] := - Block[{x}, (* has no rules *) - Cases[DownValues[f] /. f -> x, x[args___] :> {args}[[All, 1]], Infinity] - ] - -StringHash::usage = "StringHash[string] returns the \"MD5\" hash \ -of the string without hashing the enclosing quotes. Other hash \ -types may be specified." - -StringHash[string_String, type_:"MD5"] := - Module[{stream, file, hash}, - stream = OpenWrite[]; - WriteString[stream, string]; - file = Close[stream]; - hash = FileHash[file, type]; - DeleteFile[file]; - hash - ] - -CheckSum::usage = "CheckSum[filename] prompts you for the MD5 checksum \ -in hexidecimal and returns True or False." - -CheckSum[file_String] := - IntegerString[FileHash[file, "MD5"], 16] === - InputString["Enter the hexidecimal MD5 checksum:"] - -FRBTextPoints::usage = "FRBTextPoints[list of strings]." - -FRBTextPoints[points:{__String}, opts:OptionsPattern[]] := - Graphics[ - {Inset[Text[Style[Grid[ - Transpose[{ - ConstantArray["\[FilledSmallCircle]", Length[points]], - points}], - Alignment -> Left, - ItemSize -> {{1, 15}, {1}}, - Spacings -> {0, 2}], 10]]] - }, - Frame -> {{True, True}, {True, True}}, - FrameTicks -> None, ImagePadding -> 20, - FrameStyle -> {{{}, {}}, {{Dashing[{0.1, 0.8, 0.1}]}, {Dashing[{0.1, 0.8, 0.1}]}}}, - opts - ] - -FRB::usage = "FRB[plotfun][args, opts] produces a plot that apes the \ -plots of the Federal Reserve Board. FRB takes the options FRBPlotLabel, \ -FRBPlotComment, and FRBPlotNote." - -Options[FRB] = { - FRBPlotLabel -> None, - FRBPlotComment -> None, - FRBPlotNote -> None - } - -FRB /: FRB[f_][args__, opts : OptionsPattern[]] := - Module[{plot, label, comment, note}, - {label, comment, note} = {FRBPlotLabel, FRBPlotComment, FRBPlotNote} /. - {opts} /. Options[FRB]; - plot = f[args, - Frame -> True, - FrameStyle -> {{}, {{}, {Dashing[{0.025, 0.95, 0.025}]}}}, - FrameTicks -> {{Automatic, Automatic}, {Automatic, None}}, - PlotRangeClipping -> False, - Evaluate[FilterRules[{opts}, Options[f]]] - ]; - Graphics[ - {plot[[1]], - If[label === None, {}, - Inset[Text[Style[label, 12]], Scaled[{0, 1}], {Left, Bottom}]], - If[comment === None, {}, - Inset[Text[Style[comment, 10]], Scaled[{1, 1}], {Right, Bottom}]], - If[note === None, {}, - Inset[Text[Style[Column[{"", "", note}], 8]], Scaled[{0, 0}], {Left, Top}]] - }, - PlotRange -> All, - plot[[2]] - ] - ] - -NormalizeOnObservation::usage = "NormalizeOnObservation[data, n] takes \ -a list of pairs and normalizes the second column using data[[2,n]]. If n \ -is omitted, then the first observation is used." - -NormalizeOnObservation[data : {{_, _} ..}, n_: 1] := - Transpose[{data[[All, 1]], data[[All, 2]]/data[[n, 2]]}] - -MapAtColumn::usage = "MapAtColumn[f, data, col] Maps f on data[[All, col]], \ -where col can be an integer or a list of integers. If f is a list and col is \ -a list of lists, then MapAtColumn Maps f[[1]] on columns col[[1]], etc." - -MapAtColumn[f_, data_, col_Integer] := - Transpose[MapAt[f /@ # &, Transpose[data], col]] - -MapAtColumn[f_, data_, cols:{__Integer}] := - Transpose[MapAt[f /@ # &, Transpose[data], Partition[cols, 1]]] - -MapAtColumn[f_List, data_, cols:{{__Integer}..}] := - Fold[MapAtColumn[ #2[[1]], #1, #2[[2]] ]&, data, Transpose[{f, cols}]] - -TicksFormat::usage = "TicksFormat[ticks, format] take a list \ -of ticks and a format function and returns an object suitable \ -for Ticks or FrameTicks. For example, \ -TicksFormat[Range[.03, .05, .0025], PaddedForm[100#, {3,2}]&]" - -TicksFormat[ticks_, format_] := Transpose[{ticks, format /@ ticks}] - -InnerJoin::usage = "InnerJoin[dataMain, dataAux, n] fills out the \ -dataMain with values from dataAux using the first n colums as the key." - -InnerJoin[dataMain_, dataAux_, n_] := - With[{i = Range[n]}, - Flatten[ - MapThread[ - Function[{x, y}, Join[#, x] & /@ y], - {SortBy[dataAux, #[[i]] &][[All, n + 1 ;;]], - Split[SortBy[dataMain, #[[i]] &], #1[[i]] == #2[[i]] &]} - ], - 1] - ] - -MergeByKey::usage = "MergeByKey[{data1, data2, ...}, n] merges \ -the datasets treating the first n columns of each dataset \ -as the key. If n is omitted, the first column is used as the key. \ -MergeByKey[datasets, list] uses the list of column numbers to \ -specify the key columns which are placed first in the merged dataset. \ -Only rows that have matching keys in all datasets appear in the \ -merged dataset. MergeByKey assumes there are no duplicate keys \ -in each of the datasets." - -MergeByKey[datalist:{__List}, n_:1] := - Module[{i, keylist, ikeys, poslist, dlist}, - i = Range[n]; - keylist = #[[All, i]] & /@ datalist; - ikeys = Intersection @@ keylist; - poslist = SubsetPosition[#, ikeys]& /@ keylist; - dlist = MapThread[#1[[#2, n + 1 ;;]] &, {datalist, poslist}]; - Join @@@ Transpose[Prepend[dlist, ikeys]] - ] - -MergeByKey[datalist:{__List}, index_List] := - Module[{orderlist}, - orderlist = - Flatten[Join[index, Complement[Range[Length[#[[1]]]], index]]]& /@ - datalist; - MergeByKey[MapThread[#1[[All, #2]]&, {datalist, orderlist}], Length[index]] - ] - -SubsetPosition::usage = "SubsetPosition[set, subset] returns the \ -positions of subset in the set, assuming both set and subset are \ -sorted and have no duplicates." - -SubsetPosition[superset:{__Integer}, subset:{__Integer}] := sspCompiled[superset, subset] - -SubsetPosition[superset_, subset_] := - Module[{i = 1}, - (While[superset[[i]] != #, i++]; i++) & /@ subset - ] - -sspCompiled = Compile[{ - {superset, _Integer, 1}, - {subset, _Integer, 1}}, - Module[{i = 1}, - (While[superset[[i]] != #, i++]; i++) & /@ subset - ]] - -SetSubtract::usage = "SetSubtract[s1, s2] removes elements of s2 \ -from s1, where s1 and s2 are lists." - -(* this is better than the rule-based version below *) -SetSubtract[s1_List, s2_List] := - Module[{t1, t2, n1, n2, i1, i2}, - {t1, t2} = Sort[Tally[#]] & /@ {s1, s2}; - {n1, n2} = Length /@ {t1, t2}; - i1 = i2 = 1; - While[ - i1 <= n1 && i2 <= n2, - Which[ - t1[[i1, 1]] === t2[[i2, 1]], - t1[[i1, 2]] -= t2[[i2, 2]]; - i1++; i2++, - OrderedQ[{t1[[i1, 1]], t2[[i2, 1]]}], - i1++, - True, - i2++ - ] - ]; - Flatten[Table[#[[1]], {#[[2]]}] & /@ Select[t1, #[[2]] > 0 &], 1] - ] - -(* modified code from Daniel, - using Tally which is very fast on integers - and with a different rule (Dan's didn't produce the correct result -SetSubtract1[a_List, b_List] := - Flatten@(Table[#[[1]], {#[[2]]}] & /@ - Select[ - ((Tally /@ {a, b}) //. - {{x1___, {x2_, x3_}, x4___}, {x5___, {x2_, x6_}, x7___}} :> - {{x1, {x2, x3 - x6}, x4}, {x5, x7}})[[1]], - #[[2]] > 0 &]) -*) - -HighestDensityRegion::usage = "HighestDensityRegion[distribution, p] \ -where distribution is a continuous univariate distribution and 0 <= p <= 1." - -HighestDensityRegion[distribution_, p_] := - Module[{x, y, x0, y0, min, max, mincond, maxcond}, - x0 = Quantile[distribution, 1/8]; - y0 = Quantile[distribution, 7/8]; - {min, max} = DistributionDomain[distribution][[1]]; - mincond = If[min == -Infinity, True, min <= x]; - maxcond = If[max == Infinity, True, y <= max]; - {x, y} /. FindMinimum[{ - y - x, - y - x > 0, - CDF[distribution, y] - CDF[distribution, x] == p, - mincond, - maxcond}, - {x, x0}, {y, y0}][[2]] - ] - -PickHighest::usage = "PickHighest[counts, fraction] takes a list of \ -bin counts and a fraction value between 0 and 1 and returns \ -the highest counts whose total equals the fraction." - -PickHighest[counts_, fraction_] := - Module[{v, c, o, r}, - v = counts[[All, -1]]; - c = fraction * Total[v]; - o = Ordering[v, All, Greater]; (* indices for reverse-order sort *) - r = Ordering[o]; (* indices to restore original order *) - Pick[counts, Thread[Accumulate[ v[[ o ]] ][[ r ]] <= c]] - ] - -Date2String::usage = "Date2String[{y, m, d}] or \ -Date2String[{{y1, m1, d1}, {y2, m2, d2}, ...}]." -String2Date::usage = "String2Date[\"yyyy-dd-mm\"] or \ -String2Date[{\"yyyy-dd-mm\", ...}]." - -Date2String[date:{_,_,_}] := - StringInsert[ToString @ (date.{10000, 100, 1}), "-", {5, 7}] - -Date2String[dates:{{_,_,_}..}] := - StringInsert[ToString /@ (dates.{10000, 100, 1}), "-", {5, 7}] - -String2Date[date_] := ToExpression @ StringSplit[date, "-"] - -String2Date[dates_] := ToExpression @ StringSplit[dates, "-"] - -ExportLines::usage = "ExportLines[filename, data] saves data to \ -an ASCII file. The data can be read with ImportLines[filename]." -ImportLines::usage = "ImportLines[filename] imports data saved \ -with ExportLines[filename, data]." - -ExportLines[filename_String, data_] := Export[filename, data, "Lines"] -ImportLines[filename_] := ToExpression[Import[filename, "Lines"]] - -SymmetricMatrixToVector::usage = "SymmetricMatrixToVector[mat] returns a \ -vector constructuced from the lower triangular part of the symmetric matrix \ -mat. See also VectorToSymmetricMatrix." - -VectorToSymmetricMatrix::usage = "VectorToSymmetricMatrix[vec] \ -returns a symmetric matrix constructed from the lower triangular \ -part stored in vec. See also SymmetricMatrixToVector." - -SymmetricMatrixToVector[mat_] := - Flatten[MapIndexed[Take[#1, #2[[1]]] &, mat]] - -(* the indexing trick is due to Ray Koopman *) -VectorToSymmetricMatrix[vec_] := - Module[{i, j, n}, - n = (Sqrt[1 + 8*Length[vec]] - 1)/2; - Table[ - vec[[ # (# - 1)/2 & @ Max[i, j] + Min[i, j] ]], - {i, n}, {j, n}] - ] - - -ColorLegendGrid::usage = "ColorLegendGrid[textlist, colorlist, (opts)] \ -returns a grid of colors and text which can be placed as a legend \ -in a graphic using Inset. ColorLegendGrid takes the options \ -FontSize and ColorPatchSize in addition to options to Grid." - -Options[ColorLegendGrid] := - Join[{FontSize -> 12, ColorPatchSize -> 12}, Options[Grid]] - - -ColorLegendGrid[textlist_, colorlist_, opts:OptionsPattern[]] := - With[{cps = OptionValue[ColorPatchSize]}, - Grid[ - MapThread[ - {Graphics[ - {#2, Style[Text["\[FilledSquare]"], cps]}, ImageSize -> cps - ], - Style[Text[#1], OptionValue[FontSize]]} & , - {textlist, colorlist} - ], - FilterRules[{opts}, Options[Grid]], - {Frame -> True, Alignment -> Left} - ]] - -PartsList::usage = "PartsList[z,n] takes a Symbol z and a positive \ -Integer n and returns of list of the form {z\[LeftDoubleBracket]1\ -\[RightDoubleBracket], ..., z\[LeftDoubleBracket]n\[RightDoubleBracket]}." - -PartsList[z_Symbol, n_Integer?Positive] := Quiet[Part[z, #] & /@ Range[n]] - -ArrayToParts::usage = "ArrayToParts[x, n] constructs Array[x, n] \ -and converts x[i] to x[[i]], where n is an integer or list of \ -integers." - -ArrayToParts[x_, n_] := Array[x, n] /. x[i__] :> x[[i]] //Quiet - -NestListNest::usage = "NestListNest[f, x0, nOuter, nInner] computes \ -NestList[f, x0, nInner * nOuter] and returns every nInner-th value." -FoldListFold::usage = "FoldListFold[f, x0, list, nInner] computes \ -FoldList[f, x0, list] and returns every nInner-th value." - -NestListNest[f_, x0_, nOuter_, nInner_] := - NestList[Nest[f, #, nInner] &, x0, nOuter] - -FoldListFold[f_, x0_, list_, nInner_] := - FoldList[Fold[f, ##] &, x0, Partition[list, nInner]] - -BrowseForFileName::usage = "BrowseForFileName[] opens a file browser \ -and returns the name of the selected file. BrowseForFileName[init] \ -uses init as the initial setting in the dialog." - -BrowseForDirectoryName::usage = "BrowseForDirectoryName[] opens a \ -directory browser and returns the name of the selected directory. \ -BrowseForDirectoryName[init] uses init as the initial setting in the \ -dialog." - -BrowseForDirectoryNameOfFile::usage = "BrowseForDirectoryNameOfFile[] \ -opens a file browser and returns the directory name of the selected file. \ -BrowseForDirectoryNameOfFile[init] uses init as the initial setting in the \ -dialog." - -BrowseForFileName[init___String] := - If[# === $Canceled, $Canceled, #]& @ SystemDialogInput["FileOpen", init] - -BrowseForDirectoryName[init___String] := - If[# === $Canceled, $Canceled, #]& @ SystemDialogInput["Directory", init] - -BrowseForDirectoryNameOfFile[init___String] := - If[# === $Canceled, $Canceled, DirectoryName[#]]& @ - SystemDialogInput["FileOpen", init] - -DaysInMonth::usage = "DaysInMonth[{year, month}] and \ -DaysInMonth[{year, month, day}] return the number of days in the \ -given month." - -DaysInMonth[{year_Integer?Positive, month_Integer?Positive, ___}] := - DateDifference[{year, month}, DatePlus[{year, month}, {1, "Month"}]] - -DaysInMonth[__] := $Failed - -randomChoice::usage = "randomChoice works the same as the built-in \ -function RandomChoice except that it allows for non-positive weights." - -randomChoice[w:{__?Positive} -> x_, n___] := RandomChoice[w -> x, n] - -randomChoice[w_ -> x_, n___] := - RandomChoice[Rule @@ Transpose[Pick[Transpose[{w, x}], w, _?Positive]], n] - -randomChoice[x___] := RandomChoice[x] - -BlockDiagonalMatrix::usage = "BlockDiagonalMatrix[listOfBlocks] returns a \ -block-diagonal matrix constructed from the given list of matrices." - -BlockDiagonalMatrix[blocks:{__?MatrixQ}] := - ArrayFlatten[ - MapThread[#1 /. #2 &, - {IdentityMatrix[Length[blocks]], Thread[1 -> blocks]} - ] - ] - -BlockDiagonalMatrix[___] := $Failed - -binnedDensityPlot::usage = "binnedDensityPlot[data, xbins, ybins]." - -Clear[binnedDensityPlot] - -binnedDensityPlot[ - data:{{_?NumericQ, _?NumericQ} ..}, - xbins:{{_?NumberQ ..}}, - ybins:{{_?NumberQ ..}}, - opts___?OptionQ - ] := - ListDensityPlot[ - Transpose[BinCounts[data, xbins, ybins]], - opts, - ColorFunction -> (GrayLevel[1 - #1^0.5] & ), - DataRange -> {xbins[[1,{1,-1}]], ybins[[1,{1,-1}]]}, - PlotRange -> All, - InterpolationOrder -> 0, - AspectRatio -> Automatic - ] - -binnedDensityPlot[ - data : {{_?NumericQ, _?NumericQ} ..}, - dx_?NumericQ, - dy_?NumericQ, - opts___?OptionQ - ] := - binnedDensityPlot[data, ##, opts]& @@ MapThread[ - {Range[Ceiling[Min[#1] - #2, #2], Floor[Max[#1] + #2, #2], #2]}&, - {Transpose[data], {dx, dy}} - ] - -binnedDensityPlot[ - data : {{_?NumericQ, _?NumericQ} ..}, - dx_?NumericQ, - opts___?OptionQ - ] := - binnedDensityPlot[data, dx, dx, opts] - -binnedDensityPlot[ - data : {{_?NumericQ, _?NumericQ} ..}, - xbins:{xmin_, xmax_, dx_}, - ybins:{ymin_, ymax_, dy_}, - opts___?OptionQ - ] := - binnedDensityPlot[data, {Range@@xbins}, {Range@@ybins}, opts] - -binnedDensityPlot[ - data : {{_?NumericQ, _?NumericQ} ..}, - xbins:{xmin_, xmax_, dx_}, - opts___?OptionQ - ] := - binnedDensityPlot[data, xbins, xbins, opts] - -binnedDensityPlot[ - data : {{_?NumericQ, _?NumericQ} ..}, - {nxbins_Integer?Positive}, - {nybins_Integer?Positive}, - opts___?OptionQ - ] := - binnedDensityPlot[data, ##, opts]& @@ MapThread[ - ((Max[#1] - Min[#1])/#2)&, - {Transpose[data], {nxbins, nybins}} - ] - -binnedDensityPlot[ - data : {{_?NumericQ, _?NumericQ} ..}, - {nxbins_Integer?Positive}, - opts___?OptionQ - ] := - binnedDensityPlot[data, {nxbins}, {nxbins}, opts] - -SequentialIntegerStrings::usage = -"SequentialIntegerStrings[n, start, digits] produces a list of n \ -sequential integers as strings. The starting number is 1 unless \ -otherwise specified by start. The total number of digits is determined \ -automatically unless specified by digits." - -SequentialIntegerStrings[n_Integer?Positive, start_:1, digits_:1] := - With[{ - len = Max[IntegerLength[n + start - 1], digits] - }, - Table[IntegerString[i, 10, len], {i, start, n + start - 1}] - ] - -SequentialFileNames::usage = -"SequentialFileNames[base, ext, n, start, digits] produces a list \ -of n sequential files names of the form baseXXX.ext, where base \ -and ext are Strings. The starting number is 1 unless otherwise \ -specified by start. The total number of digits is determined \ -automatically unless more digits are specified by digits." - -SequentialFileNames[base_String, extension_String, n_Integer?Positive, - start_:1, digits_:1] := - (base <> # <> "." <> extension & /@ SequentialIntegerStrings[n, start, digits]) - -SequentialSymbols::usage = "SequentialSymbols[x, n, start, digits] where x is a \ -symbol or a string and n is an integer returns a list of symbols of the form \ -{x1, x2, ..., xn}. The arguments start and digits are optional." - -SequentialSymbols[base_Symbol, n_Integer?Positive, start_:1, digits_:1] := - (Symbol[SymbolName[base] <> #]& /@ SequentialIntegerStrings[n, start, digits]) - -SequentialSymbols[base_String, n_Integer?Positive, start_:1, digits_:1] := - (Symbol[base <> #]& /@ SequentialIntegerStrings[n, start, digits]) - -SequentialSymbols[_, 0, ___] := {} - -$StandardPackages::usage = "$StandardPackages is a list of standard packages." - -$LegacyPackages::usage = "$LegacyPackages is a list of legacy packages." - -$StandardPackages := # <> "`" & /@ - StringSplit[ - FileNames["*", - ToFileName[{$InstallationDirectory, "AddOns", "Packages"}]], - $PathnameSeparator][[All, -1]] - -$LegacyPackages := (#1 <> "`" <> #2 <> "`") & @@@ - StringSplit[ - FileNames["*.m", - ToFileName[{$InstallationDirectory, "AddOns", "LegacyPackages"}], - 2], - {$PathnameSeparator, "."}][[All, {-3, -2}]] - -Ghost::usage = "Ghost[string] returns a list of letters that will \ -not form a word and the associated longer words." - -Ghost::wordalready = "`1` already contains a word with four or more characters." - -Ghost[str_String]:= - Module[{len, found, next, groups}, - len = StringLength[str]; - If[len > 3 && DictionaryLookup[Table[StringTake[str,i], {i,4,len}]] != {}, - Message[Ghost::wordalready, str]]; - found = DictionaryLookup[str~~a:_~~__ /; (a != "-" && DictionaryLookup[str<>a] == {})]; - next = StringCases[found, str~~a:_~~__ :> a][[All,1]]; - groups=Split[Transpose[{next,found}], #1[[1]]==#2[[1]]&][[All,All,2]]; - (* eliminate words with valid substrings *) - groups = Function[group, - With[{chars = Characters /@ group}, - Pick[group, - Function[word, Or @@ - ((Length[word] > Length[#] && Take[word, Length[#]] == #) & /@ chars)] /@ chars, - False]]] /@ groups; - If[next == {}, - words = DictionaryLookup[str~~_]; - If[words == {}, - Print["There are no valid words."], - Print["The only valid words are:"]; - Column[words] - ], - Grid[{Union[next], Column /@ groups}, Dividers->All, Alignment->Top] - ] - ] - -FixUsageMessages::usage = "FixUsageMessages[package] reads in the \ -package, appends \" \\\" to the ends on the lines of the usage \ -statements, and writes the package back out." - -FixUsageMessages[package_String] := - Module[{in, patts, newpatts}, - in = Import[package, "String"]; - patts = Flatten[ - StringCases[ - StringCases[in, Shortest["::usage" ~~ __ ~~ "\n\n"]], - Longest["\"" ~~ __ ~~ "\""]] - ]; - newpatts = StringReplace[patts, "\n" -> " \\\n"]; - Export[package, - StringReplace[in, Thread[patts -> newpatts]], - "String"] - ] - -GetStringsWithinText::usage = "GetStringsWithinText[text] extracts the \ -strings with the given text (string), ignoring quoted strings." - -RemoveEndLineSlashes::usage = "RemoveEndLineSlashes[text] removes \ -slashes at the ends of strings within the given text." - -InsertEndLineSlashes::usage = "InsertEndLineSlashes[text] inserts \ -slashes at the ends of strings within the given text." - -GetStringsWithinText[text_String] := - StringTake[text, - Partition[Complement[ - StringPosition[text, "\""][[All, 1]], StringPosition[text, "\\\""][[All, 2]]], - 2]] - -RemoveEndLineSlashes[text_String] := - With[{strings = GetStringsWithinText[text]}, - StringReplace[text, - Table[strings[[i]] -> StringReplace[strings[[i]], "\\\n" -> "\n"], - {i, Length[strings]}]] - ] - -InsertEndLineSlashes[text_String] := - With[{strings = GetStringsWithinText[text]}, - StringReplace[text, - Table[strings[[i]] -> StringReplace[strings[[i]], "\n" -> "\\\n"], - {i, Length[strings]}]] - ] - -IrregularTranspose::usage = "IrregularTranspose[lists] takes a list \ -of lists of possibly different lengths and \"transposes\" them. \ -As an example try IrregularTranspose[{{1},{2,3},{4,5,6}}]. \ -IrregularTranspose takes an optional second argument to change the \ -\"padding symbol\" from Null to something else if necessary." - -IrregularTranspose[lists_, null_: Null] := - DeleteCases[Transpose[PadRight[lists, Automatic, null]], null, {2}] - -(* try to fix windows path names *) -FixWindowsPathName::usage = "FixWindowsPathName[pathname] replaces \"\\x\" -with \"\\\\x\" everywhere in pathname. To use, paste a pathname between the -quotes in FixWindowsPathName[\"\"]. (If the last character in the pathname to -be pasted is \"\\\", remove it.) It may not work for \"\\.nn\" where nn is an -integer or other such sequences." - -FixWindowsPathName[pathname_String] := - StringReplace[pathname, - {"\b" -> "\\b", "\f" -> "\\f", "\n" -> "\\n", "\r" -> "\\r", "\t" -> "\\t"} - ] - -NProtect::usage = "NProtect[f[args]] returns f[args] if all the arguments \ -are numeric and otherwise returns unevaluated. NProtect[f[{args}]] works \ -similarly. This is useful in conjunction with functions like FindMaximum \ -and FindRoot." - -SetAttributes[NProtect, HoldAll] -NProtect[f_[{args__}]] := f[{args}] /; And @@ (NumericQ /@ {args}) -NProtect[f_[args__]] := f[args] /; And @@ (NumericQ /@ {args}) - -CheckCompiledFunction::usage = "CheckCompiledFunction[cf] returns a list of \ -non-numerical values in Flatten[cf[[4]]]." - -CheckCompiledFunction[cf_CompiledFunction] := - Cases[cf[[4]] // Flatten, _?(!NumericQ[#] &)] - -(* from Todd Gayley on mathgroup *) -(* give an explicit format to keep Import from getting confused *) -HttpImport[url_String, format_String] := - Module[{tempFile, result}, - tempFile = Utilities`URLTools`FetchURL[url, Close[OpenTemporary[]]]; - result = Import[tempFile, format]; - DeleteFile[tempFile]; - result - ] - -InterpolatingFunctionToPiecewiseFunction::usage = -"InterpolatingFunctionToPiecewiseFunction[ifun] returns a Piecewise wrapped \ -in a Function that evaluates to 0 outside the range of the (univariate) \ -InterpolatingFunction." - -InterpolatingFunctionToPiecewiseFunction[ - ifun : InterpolatingFunction[{{min_, max_}},__], val_:0] := - Block[{x}, Function @@ {x, Piecewise[{{ifun[x], min <= x <= max}, {val, True}}]}] - -FindBoundary::usage = "FindBoundary[tensor] takes a tensor of zeros and \ -ones (a List or a SparseArray), where the ones represent a region, and \ -returns a list of boundary points. Setting the option ReturnSparseArray -> \ -True causes FindBoundary to return a SparseArray object instead. To convert \ -a list of indices into tensor (for input), use SparseArray[Thread[indices \ --> 1], dimensions]." - -ReturnSparseArray::usage = "ReturnSparseArray is an option for FindBoundary \ -that specifies whether to return a SparseArray tensor representation of the -boundary instead of the indices." - -Options[FindBoundary] = {ReturnSparseArray -> False} - -FindBoundary[tensor_List, opts___?OptionQ] := - FindBoundary[SparseArray[tensor], opts] - -FindBoundary[tensor_SparseArray, opts___?OptionQ] := - Module[{rank, adj, indices, order, rules}, - rank = TensorRank[tensor]; - adj = Table[If[i == 1, 1, 0], {i, rank}]; - indices = Union @@ - Table[ - order = RotateLeft[Range[rank], i - 1]; - rules = Most @ - ArrayRules[(Rest[#] - Most[#])&[Transpose[tensor, order]]]; - Join[ Cases[rules, (x_ -> -1) :> x], - Cases[rules, (x_ -> 1) :> x + adj] ][[All, order]], - {i, rank}]; - If[TrueQ[ReturnSparseArray /. {opts} /. Options[FindBoundary]], - SparseArray[Thread[indices -> 1], Dimensions[tensor]], - indices] - ] /; (Union[ArrayRules[tensor][[All, 2]]] === {0, 1} && - Min[Dimensions[tensor]] > 1) - -FindBoundary[__] := $Failed - -SplitToWeights::usage = "SplitToWeights[x] computes Split[x] \ -and returns the first element in each group paired with its \"weight\" \ -(the length of the group divided by Length[x])." - -SplitToWeights[x_] := - With[{s = Split[x], n = N[Length[x]]}, - Transpose[{s[[All, 1]], (Length /@ s)/n}] - ] - -TallyToWeights::usage = "TallyToWeights[list] computes Tally[list] \ -but returns the counts normalized by Length[list]." - -TallyToWeights[list_] := - Transpose[MapAt[#/Length[list]&, Transpose[Tally[list]], 2]] - -ShowStatus::usage = "ShowStatus[expr] prints expr in the status line of \ -the notebook. (Note expr may be a sequence.)" -ShowStatus[x__] := - If[$FrontEnd === Null, - (* then: no front end, do nothing *) - Null, - (* else *) - LinkWrite[$ParentLink, - SetNotebookStatusLine[EvaluationNotebook[], - StringJoin @@ Map[ToString, {x}]] - ] - ] - -UnevenPartition::usage = "UnevenPartition[list, lengths] returns the list \ -partitioned into groups with the specified successive lengths." -UnevenPartition[list_List, lengths : {__Integer?Positive}] := - Take[list, {1, 0} + #] & /@ - Partition[ - TakeWhile[FoldList[Plus, 0, lengths], # <= Length[list]&], - 2, 1] - -(* older verion: -UnevenPartition[list_, lengths_] := First@Fold[Regroup, {{}, list}, lengths] - -Regroup[{a_, b_}, n_] := {Append[a, Take[b, n]], Drop[b, n]} -*) - -PartitionWithTail::usage = "PartitionWithTail[expr, n] partitions expr into subsets \ -of length n, expect possibly for the last subset, which can be less than n. \ -PartitionWithTail[expr, {n, m}] partitions expr into submatrices of \ -dimension n \[Times] m, except for the bottom-most and right-most blocks, \ -which may be smaller. To partition into blocks of m columns, use \ -PartitionWithTail[expr, {n, m}][[1]] where n is the number of rows in expr." - -PartitionWithOverhang::usage = "PartitionWithOverhang is the same as \ -PartitionWithTail (which see)." - -PartitionWithOverhang[x__] := PartitionWithTail[x] - -PartitionWithTail[expr_, n_Integer?Positive] := - Partition[expr, n, n, 1, {}] - -PartitionWithTail[expr_, {n_Integer?Positive, m_Integer?Positive}] := - (Transpose /@ PartitionWithTail[Transpose[#], m])& /@ - PartitionWithTail[expr, n] - -ExtendInterpolatingFunction::usage = -"ExtendInterpolatingFunction[ifun, val:0] returns a pure function that \ -extends to domain of the InterpolatingFunction ifun. The second \ -argument determines the value returned outside the original domain." - -ExtendInterpolatingFunction[ifun_, val_:0] := - With[{a = ifun[[1, All, 1]], b = ifun[[1, All, 2]]}, - Piecewise[{{ifun[##1], And @@ Thread[a <= {##1} <= b]}}, val]& - ] - -Duplicates::usage = "Duplicates[list] returns a sorted list of elements \ -that appear more than once in the given list." - -Duplicates[list_] := - Flatten[ - Reap[ - Scan[ - If[Length[#] > 1, Sow[First@#]]&, - Split[Sort[list]] - ] - ][[2]] - ] - -PointInPolygonQ::usage = "PointInPolygonQ[pt, poly] returns True \ -if the specified point is in the specified (closed) polygon and \ -False otherwise." - -PointInPolygonQ[pt:{x0_, y0_}, poly_?ClosedLineQ] := - Module[{poly1, one, two, dpp, Mx, my, d, dp}, - poly1 = Drop[poly, -1]; - one = Subtract @@@ Partition[poly, 2, 1]; - two = # - pt & /@ poly1; - dpp = Det /@ Transpose[{one, two}]; - Mx = Max[Abs[ poly1[[All, 1]] - x0 ]]; - my = Min[Select[ Abs[ poly1[[All, 2]] - y0], Positive]]; - {d, dp} = Map[Det[{{2 * Mx, my}, #}]&, {one, two}, {2}]; - OddQ @ Count[Transpose[{dp * (d - dp), dp * dpp}], - {_?Positive, _?Positive}] - ] - -PointInPolygonQ[pt:{x0_, y0_}, poly_?ClosedLineQ] := - If[poly === {{}}, False, pipQ[pt, poly]] - -pipQ = Compile[{{pt, _Real, 1}, {poly, _Real, 2}}, - Module[{poly1, ppoly, one, two, dpp, Mx, my, d, dp, vals}, - poly1 = Drop[poly, -1]; - ppoly = Partition[poly, 2, 1]; - one = #[[1]] - #[[2]] & /@ ppoly; - two = # - pt & /@ poly1; - dpp = #[[1, 1]]#[[2, 2]] - #[[1, 2]]#[[2, 1]] & /@ Transpose[{one, two}]; - Mx = Max[Abs[poly1[[All, 1]] - pt[[1]]]]; - my = Min[Select[Abs[poly1[[All, 2]] - pt[[2]]], Positive]]; - {d, dp} = Map[#[[1, 1]]#[[2, 2]] - #[[1, 2]]#[[2, 1]]& [{{2*Mx, my}, #}] &, - {one, two}, {2}]; - vals = Transpose[{dp*(d - dp), dp*dpp}]; - OddQ @ Tr[If[#[[1]] > 0 && #[[2]] > 0, 1, 0]& /@ vals] - ]] - -ClosedLineQ[line_] := - TrueQ[MatchQ[line, {{_,_}...} | {{}}] && line[[1]] == line[[-1]]] - -(* from Alan Hayes *) -ClosedLineArea[pts_] := - (#1.RotateLeft[#2] - RotateLeft[#1].#2)& @@ Transpose[pts]/2 - -GetContourLines::usage = "GetContourLines[g] returns a list of the closed -contour lines from the ContourGraphics object g." - -GetContourLines[g_ContourGraphics] := - Cases[Graphics[g], Line[x_?ClosedLineQ] -> x, Infinity] - -GroupContourLines::usage = "GroupContourLines[lines] takes a list of closed \ -contour lines (as produced by GetContourLines) and groups them by elevation. \ -For example, a bimodal distribution may produce two distinct contour \ -lines for the same elevation. The groups are sorted from smallest to largest \ -in area." - -GroupContourLines[g_ContourGraphics] := GroupContourLines[GetContourLines[g]] - -GroupContourLines[lines_] := - Module[{nullpoly, inlist, outlist, i}, - nullpoly = {{}}; - inlist = Reverse[ - Sort[Transpose[{ClosedLineArea /@ lines, lines}]][[All, 2]]]; - outlist = {{nullpoly}}; - While[Length[inlist] > 0, - i = 1; - While[ - Or @@ (PointInPolygonQ[First[inlist[[1]]], #] & /@ outlist[[i]]), - i++ - ]; - outlist = ReplacePart[outlist, Prepend[outlist[[i]], inlist[[1]]], i]; - If[Last[outlist] =!= {nullpoly}, - outlist = Append[outlist, {nullpoly}]]; - inlist = Rest[inlist] - ]; - Reverse[ Drop[Drop[#, -1]& /@ outlist, -1] ] (* smallest first *) - ] - -SelectPointsByContourGroups::usage = -"SelectPointsByContourGroups[points, groups] takes a list of points and -a list of grouped contour lines and returns the points grouped by the -contour regions." - -SelectPointsByContourGroups[pts_, groups_] := - Append[#1, #2]& @@ - Fold[ - Function[s, {Append[#1[[1]], s], Complement[#1[[2]], s]}] @ - Select[#1[[2]], Function[x, Or @@ (pipQ[x, #]& /@ #2)]]&, - {{}, pts}, - groups] - -CountPointsByContourGroups::usage = -"CountPointsByContourGroups[points, groups] takes a list of points and -a list of grouped contour lines and returns the number of points in each -contour region." - -CountPointsByContourGroups[pts_, groups_] := - Length /@ SelectPointsByContourGroups[pts, groups] - -SampleFromContourGroups::usage = "SampleFromContourGroups[points, groups, n] -samples from the specified points and returns a frequency list of the contours -the sampled points fall in." - -SampleFromContourGroups[pts_?MatrixQ, groups_List, n_Integer] := - Module[{len = Length[pts], tab}, - tab = Table[ - pt = pts[[ Random[Integer, {1, len}] ]]; - i = 1; - While[ - i <= Length[groups] && - Not[Or @@ (pipQ[pt, #] & /@ groups[[i]])], - i++]; - i, - {n}]; - RelativeFrequency[tab] - ] - -(* these assume one per group, flattened: -SelectPointsInContours[pts_, polys_] /; And@@(ClosedLineQ /@ polys) := - FoldList[ - Select[#1, Function[x, pipQ[x, #2]]]&, - pts, - Reverse[Sort[Transpose[{ClosedLineArea/@#, #}]][[All,2]]]& @ polys - ] - -CountPointsInContours[pts_, polys_] /; And@@(ClosedLineQ /@ polys) := - Length /@ SelectPointsInContours[pts, polys] -*) - -(* example: (requires Histogram) - -ran = RandomArray[MultinormalDistribution[{0, 0}, {{2, 1}, {1, 1}}], 10^4]; -bcp = BinnedContourPlot[ran, 12, Contours -> 9]; -groups = GroupContourLines[GetContourLines[bcp]]; -sel = SelectPointsByContourGroups[ran, groups]; -DotPlot[Length[#]/10^4 & /@ sel]; -Show[bcp, Graphics[Point /@ #], - PlotRange -> {Through[{Min, Max}[ran[[All, 1]]]], - Through[{Min, Max}[ran[[All, 2]]]]}] & /@ sel; - -*) - -(***** end of point in polygon stuff *****) - -(* PlayList usage: - ran = RandomArray[LogNormalDistribution[1, .2], 50]; - PlayList[ran,.1]; - *) - -PlayTone[tone_?NumericQ, duration_?NumericQ, opts___?OptionQ] := - Play[Sin[2 * Pi * tone * 256 * t], {t, 0, duration}, opts] - -PlayList[tones_List, duration_?NumericQ, opts___?OptionQ] := - Show[PlayTone[#, duration, opts, DisplayFunction -> Identity] & /@ tones, - DisplayFunction -> $SoundDisplayFunction] - -PlayList[tones_List, durations_List, opts___?OptionQ] := - Show[MapThread[PlayTone[#1, #2, opts, DisplayFunction -> Identity]&, - {tones, durations}], DisplayFunction -> $SoundDisplayFunction] - -NearestNeighborDensity::usage = "NearestNeighborDensity[x, data, k] -returns the value of the k-th nearest neighbor density estimate -of the data at x. Larger values of k produce smoother density estimates -(as a function of x). If k is omitted, the default value -Floor[Sqrt[Length[data]]] is used." - -NearestNeighborDensity[x_?NumericQ, data_List, k_Integer?Positive] := - k/(2Length[data]Sort[Abs[data - x]][[k]]) - -NearestNeighborDensity[x_?NumericQ, data_List] := - NearestNeighborDensity[x, data, Floor[Sqrt[Length[data]]]] - -NRound::usage = "NRound[x, n] returns N[Round[x, 10^-n]]. The \ -default value for n is 5." - -NRound[x_, n_:5] := N[Round[x * 10^n]/10^n] - -NRound[x_, n_:5] := N[Round[x, 10^-n]] - -(* An absolute value function that has a derivative, which equals - the sign function except at 0 where abs'[0] = 1 rather than 0. - After simplification, the derivative is (2 UnitStep[x] - 1). *) -abs[x_] := x * (2 UnitStep[x] - 1) -(* this imposes the simplification *) -Derivative[1][abs] = 2 UnitStep[#1] - 1 & - -(* -FindMaximum[f_, x__] := {-1, 1} * FindMinimum[-f, x] -*) - -GoldenString = (* a.k.a. Fibonacci String and Rabbit Sequence *) - Compile[{{n, _Integer}}, - Module[{i = 1}, - If[Length[#] > n, Drop[#, -1], #] & @ - NestWhile[ - Join[#, If[#[[ ++i ]] == 0, {1}, {1, 0}]] &, - {1, 0}, - Length[#] < n & - ] - ]] - -rab[0] := 0 -rab[1] := 1 -rab[n_] := {rab[n - 1], rab[n - 2]} -RabbitString[n_Integer /; n >= 2] := Flatten[rab[n]] - -(* Usage: NestPlot[4#(1-#)&, N[1/7, 100], 10, {x, 0, 1}] *) - -NestPlot[fun_, x0_, n_, {x_Symbol, xmin_:0, xmax_:1}, opts___OptionQ] := - Module[{list, s, path, pathplot, baseplot}, - list = Partition[Take[Flatten[Partition[NestList[fun, x0, n], 2, 1] /. - {a_, b_} -> {a, a, b, b}], {2, -2}], 2]; - s = list[[1, 1]]; - path = Join[{{s, s}}, list]; - pathplot = ListPlot[path, PlotJoined -> True, PlotStyle -> Red, - DisplayFunction -> Identity]; - baseplot = Plot[{x, fun[x]}, {x, xmin, xmax}, AspectRatio -> Automatic, - DisplayFunction -> Identity]; - Show[baseplot, pathplot, DisplayFunction -> $DisplayFunction] - ] - -UltimateHead[expr_] := NestWhile[Head, expr, # =!= Symbol &, 1, Infinity, -1] - -ListNest::usage = "ListNest[x] returns {x[[{1}]], x[[{1, 2}]], - x[[{1, 2, 3}]], ..., x}." - -ListNest[x_] := Table[Take[x, i], {i, Length[x]}] - -mySeries[expr_, ranges : {_, _, _} .., opts___?OptionQ] := - Module[{args, n, f}, - args = First /@ {ranges}; - n = Min[Last /@ {ranges}]; - Series[f @@ args, ranges, opts] /. - Derivative[d__][f] /; Plus[d] > n -> (0&) /. - f -> Function @@ {args, expr} - ] - -mySeriesCoefficients[expr_, ranges : {_, _, _} .., opts___?OptionQ] := - Module[{i, n, indices}, - n = Min[Last /@ {ranges}]; - indices = Array[i, Length[{ranges}]]; - Table[SeriesCoefficient[mySeries[expr, ranges, opts], indices], - Evaluate[Sequence@@Thread[{indices, 0, n}]]] - ] - -series[f_, v_List, v0_List, order_] := - Module[{t}, - Normal[Series[f /. Thread[v -> t*v + v0], {t, 0, order}]] /. - t -> 1 /. Thread[v -> v - v0] - ] - -(* this is due to someone else *) -(* replaces each occurence of a given value after the first with Sequence[] *) -UnsortedUnion[x_] := Module[{f}, f[y_] := (f[y] = Sequence[]; y); f /@ x] - -(* to combine and separate RGB triples *) -RGBCombine[rgb : {rMat_, gMat_, bMat_}] := Transpose[rgb, {3, 1, 2}] -RGBSeparate[rgbRaster_] := Transpose[rgbRaster, {2, 3, 1}] - - -(* NInvert and Invert adapted from Carl Woll's NInverse *) - -NInvert::usage = "Given f[x[y]] == y, what is x? Simply differentiate with -respect to the dependent variable (y) yielding f'[x[y]]x'[y] == 1. -NInvert[f, {x0, y0}, x, {y, ymin, ymax}] returns the output from NDSolve." - -NInvert[f_, {x0_?NumericQ, y0_?NumericQ}, x_Symbol, - {y_Symbol, ymin_?NumericQ, ymax_?NumericQ}, opts___?OptionQ] := - NDSolve[{f'[x[y]]x'[y] == 1, x[y0] == x0}, x, {y, ymin, ymax}, opts] - -Invert::usage = "Given f[x[y]] == y, what is x? Simply differentiate with -respect to the dependent variable (y) yielding f'[x[y]]x'[y] == 1. -Invert[f, {x0, y0}, x, y] returns the output from DSolve." - -Invert[f_, {x0_, y0_}, x_Symbol, y_Symbol] := - DSolve[{f'[x[y]]x'[y] == 1, x[y0] == x0}, x, y] - -(* to format TeXForm: -Unprotect[Times] -Format[a_*E^(b_),TeXForm]:= a HoldForm[e^b] -Protect[Times] -*) - -ConvertCPI::usage = "ConvertCPI[fromYear, toYear] returns how much a -fromYear dollar would be worth in the the toYear (according to the CPI)." - -ConvertCPI[fromYear_, toYear_] := - Cases[annualCPI, {toYear, cpi_} -> cpi][[1]]/ - Cases[annualCPI, {fromYear, cpi_} -> cpi][[1]] - -InflationRate[fromYear_, toYear_] := - Log[ConvertCPI[fromYear, toYear]]/(toYear - fromYear) - -InflationRate[year_] := InflationRate[year-1, year] - -annualCPI = -{{1947, 22.458}, {1948, 24.179}, {1949, 23.942}, - {1950, 24.197}, {1951, 26.122}, {1952, 26.717}, - {1953, 26.922}, {1954, 27.017}, {1955, 26.946}, - {1956, 27.346}, {1957, 28.272}, {1958, 29.046}, - {1959, 29.312}, {1960, 29.753}, {1961, 30.072}, - {1962, 30.424}, {1963, 30.805}, {1964, 31.213}, - {1965, 31.706}, {1966, 32.652}, {1967, 33.558}, - {1968, 34.983}, {1969, 36.883}, {1970, 39.042}, - {1971, 40.725}, {1972, 42.058}, {1973, 44.667}, - {1974, 49.583}, {1975, 54.125}, {1976, 57.25}, - {1977, 60.958}, {1978, 65.55}, {1979, 73.05}, - {1980, 82.9}, {1981, 91.4}, {1982, 96.883}, - {1983, 99.825}, {1984, 103.283}, {1985, 106.908}, - {1986, 108.575}, {1987, 112.492}, {1988, 116.95}, - {1989, 122.608}, {1990, 129.05}, {1991, 134.258}, - {1992, 138.15}, {1993, 142.067}, {1994, 145.642}, - {1995, 149.75}, {1996, 154.142}, {1997, 157.558}, - {1998, 159.667}, {1999, 163.225}, {2000, 168.892}, - {2001, 173.492}, {2002, 175.378}}; - -(* for PhotoShop Elements *) -PSEMargin::usage = "PSEMargin[d] returns the correct margin to use for -the HP DeskJet 720C when printing from PhotoShop Elements, where d is -measured in inches. In portrait orientation d is the height and the -margin is the top; in landscape orientation d is the width and the -margin is the left." - -PSEMargin[d_] := NRound[5.46 - .5d + 1/32, 2] - -RecursiveSolve[list_] := - Fold[Join[#1, First@Solve[#2 /. #1]] &, {}, list] -RecursiveSolve[list_, soln0:{Rule[_, _] ..}] := - Fold[Join[#1, First@Solve[#2 /. #1]] &, soln0, list] -RecursiveNSolve[list_] := - Fold[Join[#1, First@NSolve[#2 /. #1]] &, {}, list] -RecursiveNSolve[list_, soln0:{Rule[_, _] ..}] := - Fold[Join[#1, First@NSolve[#2 /. #1]] &, soln0, list] - -ResizeImage::usage = "ResizeImage[existingFileName, resizedFileName, size] -calls ImageMagick's convert routine." - -ResizeImage[originalFileName_, newFileName_, size_:600] := - Run[ToString[ - StringForm["convert `1` -resize `2` `3`", - originalFileName, size, newFileName] - ] - ] - diff --git a/MathematicaFiles/Applications/PagePrint.m b/MathematicaFiles/Applications/PagePrint.m deleted file mode 100755 index 406d7a85bf9eead250c96f52086e77d5a0632580..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/PagePrint.m +++ /dev/null @@ -1,143 +0,0 @@ -(* :Title: PagePrint *) - -(* :Author: Mark Fisher *) - -(* :Mathematica Version: 6.0 *) - -(* :History: Original version, December 2004 - June 2007 Updated for Version 6 with help from John Fultz -*) - -(* :References: Adapted from code written at my request by -John Fultz, jfultz@wolfram.com *) - -PagePrint::usage = -"PagePrint[graphic, opts] prints the graphic on a blank \ -page. The option LandscapeOrientation can be either True or False \ -(default). Run PagePrint[] to select which printer to use (if not \ -the default printer). The page orientation of the printer should be \ -portrait even if landscape orientation is desired. The \ -option PageMargins specifies the page margins in inches. The default is 1. \ -Horizontal and vertical page margins may be specified separately. \ -The image is resized to fill the space within the margins. The \ -option ImageDimensions is ignored with the default setting Automatic. \ -Setting ImageDimensions -> {w, h} overrides the PageMargins option and \ -places the image in a centered rectangle (w \[Times] h) inches. Setting \ -ImageDimensions -> w effectively specifies {w, w * ar}, where ar is the \ -aspect ratio of the graphic. The option PaperDimensions can be \ -used to specify the dimensions of the paper (in inches). The default is \ -PaperDimensions -> {8.5, 11}. The default behavior of opening the \ -print dialog box can be changed using OpenPrintDialog -> False. \ -The option MarginAdjustments may be used to correct for the fact that a \ -printer's margins are not the same left and right or bottom and top. The \ -default setting is MarginAdjustments -> {0, 0}. For example, setting \ -MarginAdjustments -> {1/8, 0} will shift the graphic 1/8 inch to the \ -right on the virtual page." - -PaperDimensions::usage = "PaperDimensions is an option for \ -PagePrint that specifies the dimensions of the paper in inches \ -(in portrait orientation). The default is PaperDimensions -> {8.5, 11}." - -LandscapeOrientation::usage = "LandscapeOrientation is an option for \ -PagePrint." - -PageMargins::usage = "PageMargins is an option for \ -PagePrint that specifies the page margins in inches. \ -Horizontal and vertical page margins may be specified separately. \ -The default is PageMargins -> 1." - -ImageDimensions::usage = "ImageDimensions is an option for \ -PagePrint. ImageDimensions specifies the dimensions of the \ -image in the page units (which is inches by default)." - -MarginAdjustments::usage = "MarginAdjustment is an Option for PagePrint \ -that can take account of the printer's margins by shifting the image on \ -the virtual page. The default is MarginAdjustments -> {0, 0}." - -OpenPrintDialog::usage = "OpenPrintDialog is an option for PagePrint \ -that specifies whether to open the print dialog box. The default \ -setting is OpenPrintDialog -> True." - -PrintFileName::usage = "PrintFileName is an option for \ -PagePrint that specifies a file to print to. to direct the page. The \ -default is PrintFileName -> None which directs the page to the \ -printer." - -PrintDirectory::usage = "PrintDirectory is an option \ -for PagePrint that specifies the directory in which to put the file when \ -printing to a file. The default setting is PrintDirectory :> \ -$UserDocumentsDirectory. To put the file in the current (working) \ -directory, use PrintDirectory -> Directory[]." - -PagePrintScale::usage = "PagePrintScale is an option for PagePrint \ -that determines the units used. The default setting is PagePrintScale \ --> 72, which specifies inches. To convert to millimeters, use \ -PagePrintScale -> 72/25.4 and then specify the PaperDimensions, \ -PageMargins, MarginAdjustments in millimeters." - -Options[PagePrint] = { - PagePrintScale -> 72, - PaperDimensions -> {8.5, 11}, - PageMargins -> 1, - MarginAdjustments -> {0, 0}, - LandscapeOrientation -> False, - ImageDimensions -> Automatic, - OpenPrintDialog -> True, - PrintFileName -> None, - PrintDirectory :> $UserDocumentsDirectory - } - -PagePrint[] := FrontEndTokenExecute["SystemPrintOptionsDialog"] - -PagePrint[x_, OptionsPattern[]] := - Module[{scale, pdim, marg, madj, land, idim, opd, fn, dir, - orient, size, xOnPage, nb}, - - {scale, pdim, marg, madj, land, imdim, opd, fn, dir} = - OptionValue[{PagePrintScale, PaperDimensions, PageMargins, - MarginAdjustments, LandscapeOrientation, ImageDimensions, - OpenPrintDialog, PrintFileName, PrintDirectory}]; - - (* setup the page *) - land = TrueQ[land]; - orient = If[land, {0, -1}, {1, 0}]; - If[imdim === Automatic, - size = If[land, Reverse[pdim], pdim] - 2 * marg * {1, 1}, - (* else use ImageDimensions *) - size = imdim {1, AspectRatio /. AbsoluteOptions[x, AspectRatio]} - ]; - xOnPage = Graphics[ - {White, - Rectangle[{0, 0}, pdim], - Inset[x, pdim/2 + madj, ImageScaled[{.5, .5}], size, orient] - }, - ImageSize -> scale * pdim, - PlotRangePadding -> 0 (* this is crucial *) - ]; - - (* setup the notebook *) - nb = NotebookCreate[ - Visible -> False, - PrintingOptions -> { - "FirstPageHeader" -> False, - "FirstPageFooter" -> False, - "RestPagesHeader" -> False, - "RestPagesFooter" -> False, - "PrintingMargins" -> {{0,0},{0,0}} - }]; - NotebookWrite[nb, - Cell[ - BoxData[ToBoxes[xOnPage]], (* thanks to John *) - "Graphics", - Magnification -> 1, (* this fixes the 80% problem *) - ImageMargins -> {{0,0},{0,0}}, - CellMargins -> {{0,0},{0,0}} - ] - ]; - If[fn === None, - NotebookPrint[nb, Interactive -> TrueQ[opd]], - NotebookPrint[nb, ToFileName[dir, fn]] - ]; - NotebookClose[nb] - ] - diff --git a/MathematicaFiles/Applications/Parallel Test.nb b/MathematicaFiles/Applications/Parallel Test.nb deleted file mode 100755 index 4273a9ace6fddcec83cb9ea6b2b3d77faade14b9..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/Parallel Test.nb +++ /dev/null @@ -1,591 +0,0 @@ -(* Content-type: application/mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 6.0' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 145, 7] -NotebookDataLength[ 19822, 582] -NotebookOptionsPosition[ 17456, 495] -NotebookOutlinePosition[ 17992, 516] -CellTagsIndexPosition[ 17949, 513] -WindowFrame->Normal -ContainsDynamic->False*) - -(* Beginning of Notebook Content *) -Notebook[{ - -Cell[CellGroupData[{ -Cell["Setup and launching", "Section"], - -Cell["Be sure to start OpenVPN before running LaunchSlave.", "Text"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"<<", "Parallel`"}]], "Input"], - -Cell[CellGroupData[{ - -Cell[BoxData["\<\"Parallel Computing Toolkit 2.1 (April 27, 2007)\"\>"], \ -"Print", - CellChangeTimes->{ - 3.396611101884366*^9, 3.3966111924945*^9, 3.398009752156452*^9, { - 3.403620104183251*^9, 3.403620119099053*^9}}], - -Cell[BoxData["\<\"Created by Roman E. Maeder\"\>"], "Print", - CellChangeTimes->{ - 3.396611101884366*^9, 3.3966111924945*^9, 3.398009752156452*^9, { - 3.403620104183251*^9, 3.403620119099053*^9}}] -}, Open ]] -}, Open ]], - -Cell["Use to ignore init.m", "Text"], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - "$RemoteCommand", "=", - "\"\<ssh `1` -x -f -l `3` \\\"math -mathlink -linkmode Connect `4` \ --linkname `2` -noinit </dev/null >& /dev/null &\\\"\>\""}], ";"}]], "Input"], - -Cell["Use to read init.m", "Text"], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - "$RemoteCommand", "=", "\[IndentingNewLine]", - "\"\<ssh `1` -x -f -l `3` \\\"math -mathlink -linkmode Connect `4` \ --linkname `2` </dev/null >& /dev/null &\\\"\>\""}], ";"}]], "Input"], - -Cell[BoxData[{ - RowBox[{ - RowBox[{"workingnodenumbers", "=", - RowBox[{"Complement", "[", - RowBox[{ - RowBox[{"Range", "[", "18", "]"}], ",", - RowBox[{"Range", "[", - RowBox[{"1", ",", "6"}], "]"}]}], "]"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"nodes", "=", - RowBox[{ - RowBox[{ - RowBox[{"ToString", "[", - RowBox[{"StringForm", "[", - RowBox[{"\"\<192.168.2.`1`\>\"", ",", "#"}], "]"}], "]"}], "&"}], "/@", - "workingnodenumbers"}]}], ";"}], "\n", - RowBox[{ - RowBox[{"$AvailableMachines", "=", - RowBox[{"RemoteMachine", "/@", "nodes"}]}], ";"}]}], "Input", - CellChangeTimes->{{3.3966111255221453`*^9, 3.396611129784439*^9}, { - 3.403620662800846*^9, 3.4036206766684494`*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData["$AvailableMachines"], "Input"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.7\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.8\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.9\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.10\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.11\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.12\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.13\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.14\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.15\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.16\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.17\"\>", "]"}], ",", - RowBox[{"RemoteMachine", "[", "\<\"192.168.2.18\"\>", "]"}]}], - "}"}]], "Output", - CellChangeTimes->{{3.3966111160451756`*^9, 3.396611132704033*^9}, - 3.396611209336292*^9, 3.398009782346534*^9, 3.4036201262062693`*^9, - 3.4036206810030565`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"LaunchSlaves", "[", - RowBox[{"Take", "[", - RowBox[{"$AvailableMachines", ",", "18"}], "]"}], "]"}]], "Input"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{ - SubscriptBox["\<\"slave\"\>", "1"], "[", "\<\"192.168.2.1\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "2"], "[", "\<\"192.168.2.2\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "3"], "[", "\<\"192.168.2.3\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "4"], "[", "\<\"192.168.2.4\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "5"], "[", "\<\"192.168.2.5\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "6"], "[", "\<\"192.168.2.6\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "7"], "[", "\<\"192.168.2.7\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "8"], "[", "\<\"192.168.2.8\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "9"], "[", "\<\"192.168.2.9\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "10"], "[", "\<\"192.168.2.10\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "11"], "[", "\<\"192.168.2.11\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "12"], "[", "\<\"192.168.2.12\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "13"], "[", "\<\"192.168.2.13\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "14"], "[", "\<\"192.168.2.14\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "15"], "[", "\<\"192.168.2.15\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "16"], "[", "\<\"192.168.2.16\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "17"], "[", "\<\"192.168.2.17\"\>", "]"}], - ",", - RowBox[{ - SubscriptBox["\<\"slave\"\>", "18"], "[", "\<\"192.168.2.18\"\>", "]"}]}], - "}"}]], "Output", - CellChangeTimes->{3.396611156466715*^9, 3.396611290943405*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Length", "[", "$Slaves", "]"}]], "Input"], - -Cell[BoxData["17"], "Output", - CellChangeTimes->{3.39661130107178*^9, 3.398010544350068*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CloseSlaves", "[", "]"}]], "Input"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.1\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.2\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.3\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.4\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.5\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.6\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.7\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.8\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.9\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.10\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.11\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.12\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.13\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.14\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.15\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.16\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.17\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.18\"\>", "]"}]}], - "}"}]], "Output", - CellChangeTimes->{3.3966114012893915`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"TableForm", "[", - RowBox[{ - RowBox[{"RemoteEvaluate", "[", - RowBox[{"{", - RowBox[{ - "$ProcessorID", ",", "$MachineName", ",", "$SystemID", ",", "$ProcessID", - ",", "$Version"}], "\[IndentingNewLine]", "}"}], "]"}], ",", " ", - RowBox[{"TableHeadings", "\[Rule]", - RowBox[{"{", - RowBox[{"None", ",", - RowBox[{"{", - RowBox[{ - "\"\<ID\>\"", ",", "\"\<host\>\"", ",", "\"\<OS\>\"", ",", - "\"\<process\>\"", ",", "\"\<Mathematica Version\>\""}], "}"}]}], - "}"}]}]}], "]"}]], "Input"], - -Cell[BoxData[ - TagBox[ - TagBox[GridBox[{ - { - TagBox["\<\"ID\"\>", - HoldForm], - TagBox["\<\"host\"\>", - HoldForm], - TagBox["\<\"OS\"\>", - HoldForm], - TagBox["\<\"process\"\>", - HoldForm], - TagBox["\<\"Mathematica Version\"\>", - HoldForm]}, - {"1", "\<\"n1-wulf\"\>", "\<\"Linux\"\>", - "3736", "\<\"6.0 for Linux x86 (32-bit) (June 19, 2007)\"\>"}, - {"2", "\<\"n7-wulf\"\>", "\<\"Linux-x86-64\"\>", - "10185", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"}, - {"3", "\<\"n8-wulf\"\>", "\<\"Linux-x86-64\"\>", - "9447", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"}, - {"4", "\<\"n9-wulf\"\>", "\<\"Linux-x86-64\"\>", - "7129", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"}, - {"5", "\<\"n10-wulf\"\>", "\<\"Linux-x86-64\"\>", - "20964", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"}, - {"6", "\<\"n11-wulf\"\>", "\<\"Linux\"\>", - "10214", "\<\"6.0 for Linux x86 (32-bit) (June 19, 2007)\"\>"}, - {"7", "\<\"n12-wulf\"\>", "\<\"Linux\"\>", - "1230", "\<\"6.0 for Linux x86 (32-bit) (June 19, 2007)\"\>"}, - {"8", "\<\"n13-wulf\"\>", "\<\"Linux\"\>", - "3106", "\<\"6.0 for Linux x86 (32-bit) (June 19, 2007)\"\>"}, - {"9", "\<\"n14-wulf\"\>", "\<\"Linux\"\>", - "3367", "\<\"6.0 for Linux x86 (32-bit) (June 19, 2007)\"\>"}, - {"10", "\<\"n15-wulf\"\>", "\<\"Linux-x86-64\"\>", - "26254", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"}, - {"11", "\<\"n16-wulf\"\>", "\<\"Linux-x86-64\"\>", - "22106", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"}, - {"12", "\<\"n17-wulf\"\>", "\<\"Linux-x86-64\"\>", - "12604", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"}, - {"13", "\<\"n18-wulf\"\>", "\<\"Linux-x86-64\"\>", - "11501", "\<\"6.0 for Linux x86 (64-bit) (June 19, 2007)\"\>"} - }, - GridBoxAlignment->{ - "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, - "RowsIndexed" -> {}}, - GridBoxDividers->{ - "Columns" -> {{False}}, "ColumnsIndexed" -> {}, - "Rows" -> {False, True, {False}, False}, "RowsIndexed" -> {}}, - GridBoxSpacings->{"Columns" -> { - Offset[0.27999999999999997`], { - Offset[0.7]}, - Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { - Offset[0.2], { - Offset[0.4]}, - Offset[0.2]}, "RowsIndexed" -> {}}], - {None, OutputFormsDump`HeadedColumns}], - Function[BoxForm`e$, - TableForm[ - BoxForm`e$, - TableHeadings -> { - None, {"ID", "host", "OS", "process", - "Mathematica Version"}}]]]], "Output", - CellChangeTimes->{3.396611303172713*^9, 3.398009982342003*^9, - 3.3980105759152946`*^9, 3.4036207198574743`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"CloseSlaves", "[", "]"}]], "Input"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.1\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.2\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.3\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.4\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.6\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.7\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.8\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.9\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.10\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.11\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.12\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.13\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.14\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.15\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.16\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.17\"\>", "]"}], ",", - RowBox[{"\<\"zombie\"\>", "[", "\<\"192.168.2.18\"\>", "]"}]}], - "}"}]], "Output", - CellChangeTimes->{3.398010624657355*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData["$InitCode"], "Input"], - -Cell[BoxData[ - RowBox[{"Hold", "[", - RowBox[{ - RowBox[{"$DisplayFunction", "=", "Identity"}], ";"}], "]"}]], "Output"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"processorindex", "=", - RowBox[{ - RowBox[{ - FractionBox["#", - RowBox[{"Min", "[", "#", "]"}]], "&"}], "@", - RowBox[{ - RowBox[{"RemoteEvaluate", "[", - RowBox[{ - RowBox[{"mat", "=", - RowBox[{"RandomReal", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}], ",", - RowBox[{"{", - RowBox[{"500", ",", "500"}], "}"}]}], "]"}]}], ";", - RowBox[{"Timing", "[", - RowBox[{ - RowBox[{"Eigensystem", "[", "mat", "]"}], ";"}], "]"}]}], "]"}], "[", - - RowBox[{"[", - RowBox[{"All", ",", "1"}], "]"}], "]"}]}]}]], "Input", - CellChangeTimes->{{3.3980101343498015`*^9, 3.3980101709031076`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "4.823835393365411`", ",", "1.0487255191565739`", ",", - "1.2053969191736678`", ",", "0.9999999999999999`", ",", - "1.1949013268875797`", ",", "3.890553142229933`", ",", - "3.6244356341814874`", ",", "3.600446994222513`", ",", - "3.5029967056480813`", ",", "2.2871056936657572`", ",", - "2.308094629021786`", ",", "2.2803580452212406`", ",", - "2.3095933567151845`"}], "}"}]], "Output", - CellChangeTimes->{{3.3980101386624837`*^9, 3.3980101808203773`*^9}, - 3.4036207529795303`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ListPlot", "[", "%", "]"}]], "Input", - CellChangeTimes->{{3.3980101439060974`*^9, 3.39801014645191*^9}}], - -Cell[BoxData[ - GraphicsBox[ - {Hue[0.67, 0.6, 0.6], - PointBox[{{1., 4.823835393365411}, {2., 1.0487255191565739`}, {3., - 1.2053969191736678`}, {4., 0.9999999999999999}, {5., - 1.1949013268875797`}, {6., 3.890553142229933}, {7., - 3.6244356341814874`}, {8., 3.600446994222513}, {9., - 3.5029967056480813`}, {10., 2.2871056936657572`}, {11., - 2.308094629021786}, {12., 2.2803580452212406`}, {13., - 2.3095933567151845`}}]}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - Frame->{True, True, False, False}, - PlotRange->Automatic, - PlotRangeClipping->True]], "Output", - CellChangeTimes->{{3.398010147059865*^9, 3.398010180896372*^9}, - 3.403620753058056*^9}] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Using", "Section"], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"RemoteEvaluate", "[", - RowBox[{"RandomReal", "[", - RowBox[{"NormalDistribution", "[", - RowBox[{"0", ",", "1"}], "]"}], "]"}], "]"}]], "Input", - CellChangeTimes->{{3.3980101953353076`*^9, 3.3980101972161694`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"1.0479788433903476`", ",", - RowBox[{"-", "1.7505149527774304`"}], ",", - RowBox[{"-", "0.5714992623515238`"}], ",", "0.9294308031610482`", ",", - RowBox[{"-", "0.08305441915167111`"}], ",", - RowBox[{"-", "0.4496085084095134`"}], ",", "1.7525031160071871`", ",", - "0.40303779494381126`", ",", "0.3143361014879913`", ",", - "0.4691141521604678`", ",", - RowBox[{"-", "0.0383159135795778`"}], ",", "0.014614071424194916`", ",", - RowBox[{"-", "0.6821805440481848`"}]}], "}"}]], "Output", - CellChangeTimes->{3.398010198109103*^9, 3.403620765308034*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"SetDirectory", "[", "\"\<x:\>\"", "]"}]], "Input"], - -Cell[BoxData[ - RowBox[{ - RowBox[{"SetDirectory", "::", "\<\"cdir\"\>"}], - RowBox[{ - ":", " "}], "\<\"Cannot set current directory to \\!\\(\\\"x:\\\"\\). \ -\\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", ButtonStyle->\\\"Link\\\", \ -ButtonFrame->None, ButtonData:>\\\"paclet:ref/message/General/cdir\\\", \ -ButtonNote -> \\\"SetDirectory::cdir\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.398010205898529*^9}], - -Cell[BoxData["$Failed"], "Output", - CellChangeTimes->{3.398010205898529*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"StringCases", "[", - RowBox[{ - RowBox[{"Flatten", "[", - RowBox[{ - RowBox[{ - RowBox[{"Pick", "[", - RowBox[{"#", ",", - RowBox[{"StringMatchQ", "[", - RowBox[{"#", ",", - RowBox[{"__", "~~", - RowBox[{"\"\<Mathematica\>\"", "~~", "__"}]}]}], "]"}]}], "]"}], - "&"}], "/@", - RowBox[{"RemoteEvaluate", "[", - RowBox[{"Import", "[", - RowBox[{"\"\<!ps -ef\>\"", ",", "\"\<Lines\>\""}], "]"}], "]"}]}], - "]"}], ",", "NumberString"}], "]"}], "[", - RowBox[{"[", - RowBox[{"All", ",", "3"}], "]"}], "]"}]], "Input"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"\<\"17848\"\>", ",", "\<\"19309\"\>", ",", "\<\"17696\"\>", - ",", "\<\"20055\"\>", ",", "\<\"15549\"\>", ",", "\<\"31585\"\>", - ",", "\<\"25914\"\>", ",", "\<\"14197\"\>", ",", "\<\"30340\"\>", - ",", "\<\"25210\"\>", ",", "\<\"15678\"\>", ",", "\<\"14508\"\>", - ",", "\<\"15016\"\>", ",", "\<\"662\"\>", ",", "\<\"28928\"\>", - ",", "\<\"21292\"\>", ",", "\<\"28066\"\>"}], "}"}]], "Output", - CellChangeTimes->{3.398010216176772*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"back", "=", - RowBox[{"RemoteEvaluate", "[", - RowBox[{"Import", "[", - RowBox[{"\"\<!free -m\>\"", ",", " ", "\"\<Lines\>\""}], "]"}], "]"}]}], - ";"}]], "Input"] -}, Open ]] -}, -WindowSize->{1184, 876}, -WindowMargins->{{Automatic, 22}, {Automatic, 13}}, -DockedCells->(FrontEndExecute[{ - FrontEnd`NotebookApply[ - FrontEnd`InputNotebook[], #, Placeholder]}]& ), -PrintingCopies->1, -PrintingPageRange->{Automatic, Automatic}, -ShowSelection->True, -FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{} -*) -(*CellTagsIndex -CellTagsIndex->{} -*) -(*NotebookFileOutline -Notebook[{ -Cell[CellGroupData[{ -Cell[590, 23, 38, 0, 88, "Section"], -Cell[631, 25, 68, 0, 34, "Text"], -Cell[CellGroupData[{ -Cell[724, 29, 53, 1, 52, "Input"], -Cell[CellGroupData[{ -Cell[802, 34, 220, 4, 27, "Print"], -Cell[1025, 40, 197, 3, 27, "Print"] -}, Open ]] -}, Open ]], -Cell[1249, 47, 36, 0, 34, "Text"], -Cell[1288, 49, 210, 5, 58, "Input"], -Cell[1501, 56, 34, 0, 34, "Text"], -Cell[1538, 58, 225, 5, 75, "Input"], -Cell[1766, 65, 724, 20, 97, "Input"], -Cell[CellGroupData[{ -Cell[2515, 89, 44, 0, 52, "Input"], -Cell[2562, 91, 1061, 18, 97, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[3660, 114, 138, 3, 35, "Input"], -Cell[3801, 119, 1880, 57, 102, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[5718, 181, 65, 1, 35, "Input"], -Cell[5786, 184, 92, 1, 35, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[5915, 190, 59, 1, 35, "Input"], -Cell[5977, 193, 1369, 22, 102, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[7383, 220, 568, 15, 75, "Input"], -Cell[7954, 237, 2773, 62, 286, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[10764, 304, 59, 1, 35, "Input"], -Cell[10826, 307, 1297, 21, 102, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[12160, 333, 35, 0, 35, "Input"], -Cell[12198, 335, 122, 3, 35, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[12357, 343, 718, 22, 70, "Input"], -Cell[13078, 367, 538, 11, 52, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[13653, 383, 128, 2, 52, "Input"], -Cell[13784, 387, 697, 15, 326, "Output"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[14530, 408, 24, 0, 88, "Section"], -Cell[CellGroupData[{ -Cell[14579, 412, 245, 5, 52, "Input"], -Cell[14827, 419, 607, 11, 75, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[15471, 435, 74, 1, 35, "Input"], -Cell[15548, 438, 421, 8, 27, "Message"], -Cell[15972, 448, 76, 1, 35, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[16085, 454, 642, 19, 80, "Input"], -Cell[16730, 475, 487, 8, 35, "Output"] -}, Open ]], -Cell[17232, 486, 208, 6, 35, "Input"] -}, Open ]] -} -] -*) - -(* End of internal cache information *) diff --git a/MathematicaFiles/Applications/Parse Eurodollar Data from PDF.nb b/MathematicaFiles/Applications/Parse Eurodollar Data from PDF.nb deleted file mode 100755 index e422c196beca902cc139695849dd61d632a82d83..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/Parse Eurodollar Data from PDF.nb +++ /dev/null @@ -1,1700 +0,0 @@ -(* Content-type: application/mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 6.0' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 145, 7] -NotebookDataLength[ 61052, 1691] -NotebookOptionsPosition[ 56916, 1553] -NotebookOutlinePosition[ 57948, 1589] -CellTagsIndexPosition[ 57736, 1581] -WindowFrame->Normal -ContainsDynamic->False*) - -(* Beginning of Notebook Content *) -Notebook[{ - -Cell[CellGroupData[{ -Cell["Setup", "Section", - CellChangeTimes->{{3.4102666123667607`*^9, 3.410266614053548*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"SectionList", "=", - RowBox[{"{", - RowBox[{"9", ",", "51", ",", "52"}], "}"}]}], ";"}]], "Input", - CellChangeTimes->{{3.410266255108037*^9, 3.4102662634171324`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"SectionLookupTable", "=", - RowBox[{"{", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"9", ",", "\"\<_Interest_Rate_And_Energy_Futures_\>\""}], "}"}], - ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"51", ",", "\"\<_Euro_Dollar_Call_Options_\>\""}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"52", ",", "\"\<_Euro_Dollar_Put_Options_\>\""}], "}"}]}], - "\[IndentingNewLine]", "}"}]}], ";"}]], "Input", - CellChangeTimes->{{3.410265885907361*^9, 3.410265933000059*^9}, { - 3.4102659745931897`*^9, 3.4102660289625807`*^9}, {3.410266117537362*^9, - 3.4102661247689133`*^9}}], - -Cell[BoxData[{ - RowBox[{ - RowBox[{ - RowBox[{"URLforPDFfromCME", "[", - RowBox[{ - RowBox[{"section_Integer", "/;", - RowBox[{"MemberQ", "[", - RowBox[{"SectionList", ",", "section"}], "]"}]}], ",", - RowBox[{"{", - RowBox[{"year_Integer", ",", "day_Integer"}], "}"}]}], "]"}], ":=", - RowBox[{"\"\<http://www.cmegroup.com/daily_bulletin/Section\>\"", "<>", - RowBox[{"IntegerString", "[", - RowBox[{"section", ",", "10", ",", "2"}], "]"}], "<>", - RowBox[{ - RowBox[{"Cases", "[", - RowBox[{"SectionLookupTable", ",", - RowBox[{ - RowBox[{"{", - RowBox[{"section", ",", "string_"}], "}"}], "\[Rule]", "string"}]}], - "]"}], "[", - RowBox[{"[", "1", "]"}], "]"}], "<>", " ", - RowBox[{"IntegerString", "[", - RowBox[{"year", ",", "10", ",", "4"}], "]"}], "<>", - RowBox[{"IntegerString", "[", - RowBox[{"day", ",", "10", ",", "3"}], "]"}], "<>", "\"\<.pdf\>\""}]}], - "\[IndentingNewLine]"}], "\n", - RowBox[{ - RowBox[{"URLforPDFfromCME", "[", "__", "]"}], ":=", "$Failed"}]}], "Input", - CellChangeTimes->{{3.410264626101692*^9, 3.4102648373632183`*^9}, { - 3.410265141575918*^9, 3.4102651417634964`*^9}, {3.410265945276514*^9, - 3.4102659623011155`*^9}, {3.4102660405049477`*^9, 3.4102660780215454`*^9}, { - 3.41026626700941*^9, 3.4102662713201437`*^9}, {3.410266602183564*^9, - 3.410266604213956*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ImportSectionPDFfromCME", "[", - RowBox[{"section_Integer", ",", - RowBox[{"{", - RowBox[{"year_Integer", ",", "day_Integer"}], "}"}]}], "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"url", "=", - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"section", ",", - RowBox[{"{", - RowBox[{"year", ",", "day"}], "}"}]}], "]"}]}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"Switch", "[", - RowBox[{ - "url", ",", "\[IndentingNewLine]", "$Failed", ",", "\[IndentingNewLine]", - "$Failed", ",", "\[IndentingNewLine]", "_", ",", "\[IndentingNewLine]", - - RowBox[{"Import", "[", - RowBox[{"url", ",", "\"\<Plaintext\>\""}], "]"}]}], - "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}]], "Input",\ - - CellChangeTimes->{{3.4102648684223413`*^9, 3.410264919405409*^9}, { - 3.4102663319359303`*^9, 3.41026646536563*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ImportSectionPDFfromCMEandWriteToFile", "[", - RowBox[{"section_Integer", ",", - RowBox[{"{", - RowBox[{"year_Integer", ",", "day_Integer"}], "}"}]}], "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"url", "=", - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"section", ",", - RowBox[{"{", - RowBox[{"year", ",", "day"}], "}"}]}], "]"}]}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"Switch", "[", - RowBox[{ - "url", ",", "\[IndentingNewLine]", "$Failed", ",", "\[IndentingNewLine]", - "$Failed", ",", "\[IndentingNewLine]", "_", ",", "\[IndentingNewLine]", - - RowBox[{"Export", "[", - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"StringSplit", "[", - RowBox[{"url", ",", - RowBox[{"{", - RowBox[{"\"\</\>\"", ",", "\"\<.\>\""}], "}"}]}], "]"}], "[", - RowBox[{"[", - RowBox[{"-", "2"}], "]"}], "]"}], "<>", "\"\<.txt\>\""}], ",", - "\[IndentingNewLine]", - RowBox[{"Import", "[", - RowBox[{"url", ",", "\"\<Plaintext\>\""}], "]"}]}], "]"}]}], - "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}]], "Input",\ - - CellChangeTimes->{{3.4102652424888577`*^9, 3.4102653915019855`*^9}, { - 3.4102655995836835`*^9, 3.4102656150007224`*^9}, {3.4102664716755447`*^9, - 3.4102665574368477`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"URLforPDFfromCME", "::", "usage"}], "=", - "\"\<URLforPDFfromCME[section, {year, day}] generates the URL for the \ -Section data for the date specified. The arguments section, year, and day \ -should all be integers.\>\""}], ";"}]], "Input", - CellChangeTimes->{{3.4102668503911767`*^9, 3.4102668712417407`*^9}, { - 3.4102669381353483`*^9, 3.410267003107892*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"ImportSectionPDFfromCME", "::", "usage"}], "=", - "\"\<ImportSectionPDFfromCME[section, {year, day}] imports the section \ -data from the CME website and returns a string. The arguments section, year, \ -and day should all be integers.\>\""}], ";"}]], "Input", - CellChangeTimes->{{3.4102667664578953`*^9, 3.410266802255268*^9}, { - 3.410267018898094*^9, 3.4102670457461243`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"ImportSectionPDFfromCMEandWriteToFile", "::", "usage"}], "=", - "\"\<ImportSectionPDFfromCMEandWriteToFile[section, {year, day}] imports \ -the section data from the CME website and writes a .txt file to the current \ -directory. The arguments section, year, and day should all be \ -integers.\>\""}], ";"}]], "Input", - CellChangeTimes->{{3.4102667851375017`*^9, 3.4102668043481336`*^9}, { - 3.4102670569601355`*^9, 3.4102670754679394`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"LineNumber", "[", - RowBox[{"startString_String", ",", "lines_"}], "]"}], ":=", - RowBox[{ - RowBox[{"Position", "[", - RowBox[{ - RowBox[{"Length", "/@", - RowBox[{"StringCases", "[", - RowBox[{"lines", ",", - RowBox[{"StartOfString", "~~", "startString"}]}], "]"}]}], ",", "1"}], - "]"}], "[", - RowBox[{"[", - RowBox[{"1", ",", "1"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.41032811828125*^9, 3.410328169484375*^9}, { - 3.41037084940625*^9, 3.4103708543125*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"ExtractDataFromCMEString", "::", "usage"}], "=", - "\"\<ExtractDataFromCMEString[instring] extracts the data from the given \ -input string, itself obtained from a CME pdf.\>\""}], ";"}]], "Input", - CellChangeTimes->{{3.4112982130539656`*^9, 3.411298270422741*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ExtractDataFromCMEString", "[", "instring_String", "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - "lines", ",", "dateline", ",", "quotedate", ",", "pagenumber", ",", - "daynumber", ",", "fixline", ",", "bbafix", ",", "datalines", ",", - "contracts", ",", "contractmonths", ",", "contractmaturities"}], "}"}], - ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"lines", "=", - RowBox[{"DeleteCases", "[", - RowBox[{ - RowBox[{"ImportString", "[", - RowBox[{"instring", ",", "\"\<Lines\>\""}], "]"}], ",", "\"\<\>\""}], - "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"dateline", "=", - RowBox[{"lines", "[", - RowBox[{"[", - RowBox[{"LineNumber", "[", - RowBox[{"\"\<PG\>\"", ",", "lines"}], "]"}], "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"quotedate", "=", - RowBox[{ - RowBox[{"DateList", "[", - RowBox[{"StringTake", "[", - RowBox[{"dateline", ",", - RowBox[{"{", - RowBox[{"118", ",", "129"}], "}"}]}], "]"}], "]"}], "[", - RowBox[{"[", - RowBox[{";;", "3"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"{", - RowBox[{"pagenumber", ",", "daynumber"}], "}"}], "=", - RowBox[{ - RowBox[{ - RowBox[{"StringCases", "[", - RowBox[{"dateline", ",", "NumberString"}], "]"}], "[", - RowBox[{"[", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}], "]"}], "]"}], "//", - "ToExpression"}]}], ";", "\[IndentingNewLine]", - RowBox[{"fixline", "=", - RowBox[{"lines", "[", - RowBox[{"[", - RowBox[{"LineNumber", "[", - RowBox[{"\"\<U.S.\>\"", ",", "lines"}], "]"}], "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"bbafix", "=", - RowBox[{ - RowBox[{ - RowBox[{"StringCases", "[", - RowBox[{"fixline", ",", "NumberString"}], "]"}], "[", - RowBox[{"[", - RowBox[{"-", "1"}], "]"}], "]"}], "//", "ToExpression"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"datalines", "=", - RowBox[{"lines", "[", - RowBox[{"[", - RowBox[{ - RowBox[{ - RowBox[{"LineNumber", "[", - RowBox[{"\"\<EURO DLR FUT\>\"", ",", "lines"}], "]"}], "+", "1"}], - ";;", - RowBox[{ - RowBox[{"LineNumber", "[", - RowBox[{"\"\<TOTAL\>\"", ",", "lines"}], "]"}], "-", "1"}]}], - "]"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"contracts", "=", - RowBox[{"StringTake", "[", - RowBox[{"datalines", ",", "5"}], "]"}]}], ";", "\[IndentingNewLine]", - RowBox[{"contractmonths", "=", - RowBox[{ - RowBox[{"(", - RowBox[{ - RowBox[{ - RowBox[{"DateList", "[", - RowBox[{"{", - RowBox[{ - RowBox[{"StringInsert", "[", - RowBox[{"#", ",", "\"\< \>\"", ",", "4"}], "]"}], ",", - RowBox[{"{", - RowBox[{"\"\<MonthName\>\"", ",", "\"\<YearShort\>\""}], - "}"}]}], "}"}], "]"}], "&"}], "/@", "contracts"}], ")"}], "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"{", - RowBox[{"1", ",", "2"}], "}"}]}], "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"contractmaturities", "=", - RowBox[{"EurodollarExpirationDate", "/@", "contractmonths"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"rates", "=", - RowBox[{"Flatten", "[", - RowBox[{"StringCases", "[", - RowBox[{"datalines", ",", - RowBox[{ - RowBox[{ - RowBox[{"r", ":", "NumberString"}], "~~", "\"\<)\>\""}], ":>", - RowBox[{"ToExpression", "[", "r", "]"}]}]}], "]"}], "]"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - "pagenumber", ",", "daynumber", ",", "quotedate", ",", "bbafix"}], - "}"}], ",", - RowBox[{"Sort", "[", - RowBox[{"Transpose", "[", - RowBox[{"{", - RowBox[{"contractmaturities", ",", "rates"}], "}"}], "]"}], "]"}]}], - "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.410361469578125*^9, 3.410361712953125*^9}, { - 3.410361756484375*^9, 3.410361796140625*^9}, {3.41036202865625*^9, - 3.41036211640625*^9}, {3.410370209546875*^9, 3.410370212890625*^9}, { - 3.41037046303125*^9, 3.41037046621875*^9}, {3.410370732890625*^9, - 3.410370771625*^9}, {3.41037080821875*^9, 3.41037081425*^9}, { - 3.410370867671875*^9, 3.410370899140625*^9}, {3.411298198204291*^9, - 3.4112982005465107`*^9}, {3.4112983089756823`*^9, 3.411298336738796*^9}, { - 3.411298393467365*^9, 3.4112984288348866`*^9}, {3.4112984626409287`*^9, - 3.4112984639369574`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"ReadDataFromCMEPDF", "::", "usage"}], " ", "=", " ", - "\"\<ReadDataFromCMEPDF[filename] returns the data extracted from the CME \ -pdf with the given filename.\>\""}], ";"}]], "Input", - CellChangeTimes->{{3.411298740178384*^9, 3.4112987755771356`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"ReadDataFromCMEPDF", "[", "filename_String", "]"}], ":=", - RowBox[{"ExtractDataFromCMEString", "[", - RowBox[{"Import", "[", - RowBox[{"filename", ",", "\"\<Plaintext\>\""}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.411298612355631*^9, 3.411298640462271*^9}, { - 3.4112987193638554`*^9, 3.411298727780233*^9}, 3.411298802840576*^9, { - 3.411299363927185*^9, 3.411299364551777*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"Section09DataForDataBase", "[", "filename_String", "]"}], ":=", - "\[IndentingNewLine]", - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"data", "=", - RowBox[{"ExtractDataFromCMEString", "[", - RowBox[{"Import", "[", - RowBox[{"filename", ",", "\"\<Plaintext\>\""}], "]"}], "]"}]}], "}"}], - ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"Join", "[", - RowBox[{ - RowBox[{"data", "[", - RowBox[{"[", - RowBox[{"1", ",", - RowBox[{"{", - RowBox[{"3", ",", "2"}], "}"}]}], "]"}], "]"}], ",", "#"}], "]"}], - "&"}], "/@", - RowBox[{"data", "[", - RowBox[{"[", "2", "]"}], "]"}]}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellChangeTimes->{{3.411299294753621*^9, 3.411299331526475*^9}, { - 3.4112993680963364`*^9, 3.4112994113493323`*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Usage", "Section", - CellChangeTimes->{{3.4102666250489016`*^9, 3.410266625658019*^9}}], - -Cell["\<\ -Download eurodollar data from \"www.cmegroup.com\". Currently only set up for \ -Sections 9, 51, 52. Others can be added. (Add to SectionList and \ -SectionLookupTable.)\ -\>", "Text", - CellChangeTimes->{{3.410266645399677*^9, 3.4102667434832287`*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"?", "URLforPDFfromCME"}]], "Input", - CellChangeTimes->{{3.410266881237517*^9, 3.4102668845017624`*^9}}], - -Cell[BoxData[ - StyleBox["\<\"URLforPDFfromCME[section, {year, day}] generates the URL for \ -the Section data for the date specified. The arguments section, year, and day \ -should all be integers.\"\>", "MSG"]], "Print", "PrintUsage", - CellChangeTimes->{3.411298078751071*^9}, - CellTags->"Info3411280078-7196149"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"?", "ImportSectionPDFfromCME"}]], "Input", - CellChangeTimes->{{3.4102668075967607`*^9, 3.41026681092348*^9}}], - -Cell[BoxData[ - StyleBox["\<\"ImportSectionPDFfromCME[section, {year, day}] imports the \ -section data from the CME website and returns a string. The arguments \ -section, year, and day should all be integers.\"\>", "MSG"]], "Print", \ -"PrintUsage", - CellChangeTimes->{3.411298081249439*^9}, - CellTags->"Info3411280081-2015869"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"?", "ImportSectionPDFfromCMEandWriteToFile"}]], "Input", - CellChangeTimes->{{3.410266817061511*^9, 3.410266820450704*^9}}], - -Cell[BoxData[ - StyleBox["\<\"ImportSectionPDFfromCMEandWriteToFile[section, {year, day}] \ -imports the section data from the CME website and writes a .txt file to the \ -current directory. The arguments section, year, and day should all be \ -integers.\"\>", "MSG"]], "Print", "PrintUsage", - CellChangeTimes->{3.4112980836228886`*^9}, - CellTags->"Info3411280083-4726061"] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"9", ",", - RowBox[{"{", - RowBox[{"2008", ",", "15"}], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.4102669047744455`*^9, 3.4102669123806067`*^9}, { - 3.4102985694375*^9, 3.41029857*^9}}], - -Cell[BoxData["\<\"http://www.cmegroup.com/daily_bulletin/Section09_Interest_\ -Rate_And_Energy_Futures_2008015.pdf\"\>"], "Output", - CellChangeTimes->{3.4102669128491583`*^9, 3.410298570140625*^9, - 3.411298085715272*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ImportSectionPDFfromCMEandWriteToFile", "[", - RowBox[{"9", ",", - RowBox[{"{", - RowBox[{"2008", ",", "15"}], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.410265334383932*^9, 3.410265343132868*^9}, { - 3.41029860440625*^9, 3.41029860471875*^9}}], - -Cell[BoxData["\<\"Section09_Interest_Rate_And_Energy_Futures_2008015.txt\"\>"]\ -, "Output", - CellChangeTimes->{3.4102653442889776`*^9, 3.4102653945172443`*^9, - 3.410265535728715*^9, 3.410298607109375*^9}] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["download pdfs", "Section", - CellChangeTimes->{{3.410366690859375*^9, 3.41036669496875*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"fn", "=", - RowBox[{"FileNames", "[", "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.410367909890625*^9, 3.41036793384375*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"yeardays", "=", - RowBox[{"ToExpression", "[", - RowBox[{"StringTake", "[", - RowBox[{"fn", ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"44", ",", "47"}], "}"}], ",", - RowBox[{"{", - RowBox[{"48", ",", "50"}], "}"}]}], "}"}]}], "]"}], "]"}]}], - ";"}]], "Input", - CellChangeTimes->{{3.410367930640625*^9, 3.41036794590625*^9}, { - 3.410367977671875*^9, 3.410368029296875*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"days2007", "=", - RowBox[{"Cases", "[", - RowBox[{"yeardays", ",", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "d_"}], "}"}], "\[Rule]", "d"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.41036811121875*^9, 3.410368145046875*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "113", ",", "114", ",", "115", ",", "116", ",", "117", ",", "118", ",", - "119", ",", "120", ",", "121", ",", "122", ",", "123", ",", "124", ",", - "125", ",", "126", ",", "127", ",", "128", ",", "129", ",", "130", ",", - "131", ",", "132", ",", "133", ",", "134", ",", "135", ",", "136", ",", - "137", ",", "138", ",", "139", ",", "140", ",", "141", ",", "142", ",", - "143", ",", "144", ",", "145", ",", "146", ",", "147", ",", "148", ",", - "149", ",", "150", ",", "151", ",", "152", ",", "153", ",", "154", ",", - "155", ",", "156", ",", "157", ",", "158", ",", "159", ",", "160", ",", - "161", ",", "162", ",", "163", ",", "164", ",", "165", ",", "166", ",", - "167", ",", "168", ",", "169", ",", "170", ",", "171", ",", "172", ",", - "173", ",", "174", ",", "175", ",", "176", ",", "177", ",", "178", ",", - "179", ",", "180", ",", "181", ",", "182", ",", "183", ",", "184", ",", - "185", ",", "186", ",", "187", ",", "188", ",", "189", ",", "190", ",", - "191", ",", "192", ",", "193", ",", "194", ",", "195", ",", "196", ",", - "197", ",", "198", ",", "199", ",", "200", ",", "201", ",", "202", ",", - "203", ",", "204", ",", "205", ",", "206", ",", "207", ",", "208", ",", - "209", ",", "210", ",", "211", ",", "212", ",", "213", ",", "214", ",", - "215", ",", "216", ",", "217", ",", "218", ",", "219", ",", "220", ",", - "221", ",", "222", ",", "223", ",", "224", ",", "225", ",", "226", ",", - "227", ",", "228", ",", "229", ",", "230", ",", "231", ",", "232", ",", - "233", ",", "234", ",", "235", ",", "236", ",", "237", ",", "238", ",", - "239", ",", "240", ",", "241", ",", "242", ",", "243", ",", "244", ",", - "245", ",", "246", ",", "247", ",", "248", ",", "249", ",", "250", ",", - "251", ",", "252", ",", "253"}], "}"}]], "Output", - CellChangeTimes->{{3.410368112890625*^9, 3.41036814546875*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"days2008", "=", - RowBox[{"Cases", "[", - RowBox[{"yeardays", ",", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "d_"}], "}"}], "\[Rule]", "d"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.41036811121875*^9, 3.410368145046875*^9}, { - 3.4103682569375*^9, 3.410368261453125*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "1", ",", "2", ",", "3", ",", "4", ",", "5", ",", "6", ",", "7", ",", "8", - ",", "9", ",", "10", ",", "11", ",", "12", ",", "13", ",", "14", ",", "15", - ",", "16", ",", "17"}], "}"}]], "Output", - CellChangeTimes->{3.41036856228125*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"SetDirectory", "[", - RowBox[{ - "myWorkingDrive", "<>", - "\"\<\\\\projects\\\\eurodollar\\\\cme_pdfs\\\\Section52\>\""}], - "]"}]], "Input", - CellChangeTimes->{{3.41036670809375*^9, 3.41036671134375*^9}, { - 3.410367901921875*^9, 3.410367904421875*^9}, {3.410368199703125*^9, - 3.410368201625*^9}, {3.41036894453125*^9, 3.41036894596875*^9}}], - -Cell[BoxData["\<\"c:\\\\data\\\\projects\\\\eurodollar\\\\cme_pdfs\\\\\ -Section52\"\>"], "Output", - CellChangeTimes->{3.41036671271875*^9, 3.410367904890625*^9, - 3.410368201796875*^9, 3.410368946390625*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{"temp", "=", - RowBox[{"Monitor", "[", - RowBox[{ - RowBox[{"Table", "[", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"url", "=", - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"52", ",", - RowBox[{"{", - RowBox[{"2007", ",", "day"}], "}"}]}], "]"}]}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"Export", "[", - RowBox[{ - RowBox[{ - RowBox[{"StringSplit", "[", - RowBox[{"url", ",", "\"\</\>\""}], "]"}], "[", - RowBox[{"[", - RowBox[{"-", "1"}], "]"}], "]"}], ",", - RowBox[{"Import", "[", - RowBox[{"url", ",", "\"\<Binary\>\""}], "]"}], ",", - "\"\<Binary\>\""}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{"day", ",", "days2007"}], "}"}]}], "]"}], ",", "day"}], - "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.410366723515625*^9, 3.4103667253125*^9}, { - 3.4103669039375*^9, 3.410366929109375*^9}, {3.410367131640625*^9, - 3.410367132515625*^9}, {3.410367192796875*^9, 3.410367193640625*^9}, { - 3.410367246546875*^9, 3.410367334734375*^9}, {3.410367364828125*^9, - 3.410367406828125*^9}, {3.41036743975*^9, 3.4103674706875*^9}, { - 3.410367583859375*^9, 3.4103676405*^9}, {3.410367672875*^9, - 3.410367679046875*^9}, {3.41036815334375*^9, 3.4103681778125*^9}, { - 3.41036855815625*^9, 3.410368568328125*^9}, {3.410368949015625*^9, - 3.410368952703125*^9}, {3.410369223484375*^9, 3.41036922371875*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"FetchURL", "::", "\<\"conopen\"\>"}], - RowBox[{ - ":", " "}], "\<\"The connection to URL \ -\\!\\(\\\"http://www.cmegroup.com/daily_bulletin/Section52_Euro_Dollar_Put_\ -Options_2007253.pdf\\\"\\) cannot be opened. If the URL is correct, you might \ -need to configure your firewall program, or you might need to set a proxy in \ -the Internet Connectivity tab of the Preferences dialog (or by calling \ -SetInternetProxy).\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4103691716875*^9, 3.41036952459375*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"BinaryWrite", "::", "\<\"nocoerce\"\>"}], - RowBox[{ - ":", " "}], "\<\"\\!\\($Failed\\) cannot be coerced to the specified \ -format. \\!\\(\\*ButtonBox[\\\"\[RightSkeleton]\\\", \ -ButtonStyle->\\\"Link\\\", ButtonFrame->None, \ -ButtonData:>\\\"paclet:ref/BinaryWrite\\\", ButtonNote -> \ -\\\"BinaryWrite::nocoerce\\\"]\\)\"\>"}]], "Message", "MSG", - CellChangeTimes->{3.4103691716875*^9, 3.410369524625*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"url", "=", - RowBox[{"URLforPDFfromCME", "[", - RowBox[{"52", ",", - RowBox[{"{", - RowBox[{"2008", ",", "253"}], "}"}]}], "]"}]}], "}"}], ",", - "\[IndentingNewLine]", - RowBox[{"Export", "[", - RowBox[{ - RowBox[{ - RowBox[{"StringSplit", "[", - RowBox[{"url", ",", "\"\</\>\""}], "]"}], "[", - RowBox[{"[", - RowBox[{"-", "1"}], "]"}], "]"}], ",", - RowBox[{"Import", "[", - RowBox[{"url", ",", "\"\<Binary\>\""}], "]"}], ",", "\"\<Binary\>\""}], - "]"}]}], "]"}]], "Input", - CellChangeTimes->{{3.410368513703125*^9, 3.410368517484375*^9}, { - 3.41036923846875*^9, 3.41036923871875*^9}}], - -Cell[BoxData["\<\"Section52_Euro_Dollar_Put_Options_2008253.pdf\"\>"], \ -"Output", - CellChangeTimes->{3.410368519578125*^9, 3.410369557265625*^9}] -}, Open ]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Write code", "Section", - CellChangeTimes->{{3.41032851565625*^9, 3.410328518171875*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"SetDirectory", "[", - RowBox[{ - "myWorkingDrive", "<>", - "\"\<\\\\projects\\\\eurodollar\\\\cme_pdfs\\\\Section09\>\""}], - "]"}]], "Input", - CellChangeTimes->{{3.41036670809375*^9, 3.41036671134375*^9}, { - 3.410367901921875*^9, 3.410367904421875*^9}, {3.410368199703125*^9, - 3.410368201625*^9}, {3.41036894453125*^9, 3.41036894596875*^9}, { - 3.41036991040625*^9, 3.41036991178125*^9}}], - -Cell[BoxData["\<\"d:\\\\data\\\\projects\\\\eurodollar\\\\cme_pdfs\\\\\ -Section09\"\>"], "Output", - CellChangeTimes->{3.41036671271875*^9, 3.410367904890625*^9, - 3.410368201796875*^9, 3.410368946390625*^9, 3.41036991225*^9, - 3.410370529609375*^9, 3.4112980976762085`*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"fn", "=", - RowBox[{"FileNames", "[", "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.4103699136875*^9, 3.410369919453125*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"?", "ExtractDataFromCMEString"}]], "Input", - CellChangeTimes->{{3.4112981245336647`*^9, 3.4112981281562977`*^9}, - 3.4112983447179594`*^9}], - -Cell[BoxData[ - StyleBox["\<\"ExtractDataFromCMEString[instring] extracts the data from the \ -given input string, itself obtained from a CME pdf.\"\>", "MSG"]], "Print", \ -"PrintUsage", - CellChangeTimes->{3.4112983453581657`*^9}, - CellTags->"Info3411280345-6648233"] -}, Open ]], - -Cell[BoxData["Extract"], "Input", - CellChangeTimes->{{3.411298148065168*^9, 3.4112981496422625`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{"instring", "=", - RowBox[{"ImportSectionPDFfromCME", "[", - RowBox[{"9", ",", - RowBox[{"{", - RowBox[{"2008", ",", "14"}], "}"}]}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.410330596390625*^9, 3.41033062196875*^9}}], - -Cell[BoxData["instring"], "Input", - CellChangeTimes->{{3.4112981734079885`*^9, 3.4112981777020583`*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - "file", "=", - "\"\<Section09_Interest_Rate_And_Energy_Futures_2008015.txt\>\""}], - ";"}]], "Input", - CellChangeTimes->{ - 3.4102653442889776`*^9, 3.4102653945172443`*^9, 3.410265535728715*^9, - 3.410298607109375*^9, {3.410298852875*^9, 3.410298857765625*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"filename", "=", - RowBox[{"fn", "[", - RowBox[{"[", "4", "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.410369930203125*^9, 3.410369935328125*^9}, - 3.41037048921875*^9, {3.41037094071875*^9, 3.410370968578125*^9}, - 3.41037100975*^9}], - -Cell[BoxData["\<\"Section09_Interest_Rate_And_Energy_Futures_2007116.pdf\"\>"]\ -, "Output", - CellChangeTimes->{ - 3.4103699356875*^9, 3.410370489390625*^9, 3.410370534921875*^9, { - 3.410370940890625*^9, 3.410370968765625*^9}, 3.410371009921875*^9, - 3.411298819282961*^9}] -}, Open ]], - -Cell[BoxData[ - RowBox[{ - RowBox[{"instring", "=", - RowBox[{"Import", "[", - RowBox[{"filename", ",", "\"\<Plaintext\>\""}], "]"}]}], ";"}]], "Input", - CellChangeTimes->{{3.410330501203125*^9, 3.410330515828125*^9}, { - 3.410369947484375*^9, 3.4103699574375*^9}, {3.410370006421875*^9, - 3.410370012546875*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"ReadDataFromCMEPDF", "[", "filename", "]"}]], "Input", - CellChangeTimes->{{3.410361731375*^9, 3.410361734625*^9}, { - 3.410361776953125*^9, 3.410361779578125*^9}, 3.410369979953125*^9, - 3.41037059221875*^9, 3.410370911390625*^9, {3.411298352447285*^9, - 3.4112983531187215`*^9}, {3.411298822530839*^9, 3.411298827043516*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"9", ",", "116", ",", - RowBox[{"{", - RowBox[{"2007", ",", "6", ",", "15"}], "}"}], ",", "5.36`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "6", ",", "18"}], "}"}], ",", "5.36`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "7", ",", "16"}], "}"}], ",", "5.36`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "8", ",", "13"}], "}"}], ",", "5.36`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "9", ",", "17"}], "}"}], ",", "5.36`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "17"}], "}"}], ",", "5.38`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "5.36`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "5.34`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "5.36`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "5.38`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "5.41`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "5.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "5.52`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "5.54`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "5.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "5.6`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "5.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "5.66`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "5.68`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "5.71`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "5.75`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "5.76`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "5.79`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "5.81`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "5.87`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "5.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.95`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.97`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.99`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "6.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "6.04`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "6.05`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "6.06`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "6.08`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "6.11`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "6.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "6.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "6.16`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "6.2`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "6.21`"}], "}"}]}], - "}"}]}], "}"}]], "Output", - CellChangeTimes->{3.4103709123125*^9, 3.410370965453125*^9, - 3.410371014140625*^9, 3.411298187804834*^9, 3.4112983539619207`*^9, - 3.4112983982611084`*^9, 3.4112984330196533`*^9, 3.4112985810479574`*^9, - 3.411298828199012*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Section09DataForDataBase", "[", - "\"\<O:\\\\CME PDF\\\\B2007248PG9.pdf\>\"", "]"}]], "Input"], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "1", ",", "14"}], "}"}], ",", "4.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "2", ",", "18"}], "}"}], ",", "4.45`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "3", ",", "17"}], "}"}], ",", "4.33`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "4", ",", "14"}], "}"}], ",", "4.17`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "5", ",", "19"}], "}"}], ",", "4.01`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "6", ",", "16"}], "}"}], ",", "3.87`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "9", ",", "15"}], "}"}], ",", "3.65`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2008", ",", "12", ",", "15"}], "}"}], ",", "3.56`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2009", ",", "3", ",", "16"}], "}"}], ",", "3.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2009", ",", "6", ",", "15"}], "}"}], ",", "3.72`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2009", ",", "9", ",", "14"}], "}"}], ",", "3.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2009", ",", "12", ",", "14"}], "}"}], ",", "4.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2010", ",", "3", ",", "15"}], "}"}], ",", "4.13`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2010", ",", "6", ",", "14"}], "}"}], ",", "4.27`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2010", ",", "9", ",", "13"}], "}"}], ",", "4.39`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2010", ",", "12", ",", "13"}], "}"}], ",", "4.5`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2011", ",", "3", ",", "14"}], "}"}], ",", "4.59`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2011", ",", "6", ",", "13"}], "}"}], ",", "4.69`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2011", ",", "9", ",", "19"}], "}"}], ",", "4.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2011", ",", "12", ",", "19"}], "}"}], ",", "4.86`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2012", ",", "3", ",", "19"}], "}"}], ",", "4.92`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2012", ",", "6", ",", "18"}], "}"}], ",", "5.`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2012", ",", "9", ",", "17"}], "}"}], ",", "5.07`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2012", ",", "12", ",", "17"}], "}"}], ",", "5.14`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2013", ",", "3", ",", "18"}], "}"}], ",", "5.2`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2013", ",", "6", ",", "17"}], "}"}], ",", "5.26`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2013", ",", "9", ",", "16"}], "}"}], ",", "5.32`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2013", ",", "12", ",", "16"}], "}"}], ",", "5.39`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2014", ",", "3", ",", "17"}], "}"}], ",", "5.44`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2014", ",", "6", ",", "16"}], "}"}], ",", "5.48`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2014", ",", "9", ",", "15"}], "}"}], ",", "5.52`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2014", ",", "12", ",", "15"}], "}"}], ",", "5.57`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2015", ",", "3", ",", "16"}], "}"}], ",", "5.6`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2015", ",", "6", ",", "15"}], "}"}], ",", "5.64`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2015", ",", "9", ",", "14"}], "}"}], ",", "5.67`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2015", ",", "12", ",", "14"}], "}"}], ",", "5.71`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2016", ",", "3", ",", "14"}], "}"}], ",", "5.74`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2016", ",", "6", ",", "13"}], "}"}], ",", "5.77`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2016", ",", "9", ",", "19"}], "}"}], ",", "5.8`"}], "}"}], ",", - - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2016", ",", "12", ",", "19"}], "}"}], ",", "5.83`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2017", ",", "3", ",", "13"}], "}"}], ",", "5.85`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2017", ",", "6", ",", "19"}], "}"}], ",", "5.87`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2017", ",", "9", ",", "18"}], "}"}], ",", "5.89`"}], "}"}], - ",", - RowBox[{"{", - RowBox[{ - RowBox[{"{", - RowBox[{"2007", ",", "12", ",", "21"}], "}"}], ",", "248", ",", - RowBox[{"{", - RowBox[{"2017", ",", "12", ",", "18"}], "}"}], ",", "5.93`"}], "}"}]}], - "}"}]], "Output", - CellChangeTimes->{3.4112995531785607`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"DateListPlot", "[", - RowBox[{ - RowBox[{"%", "[", - RowBox[{"[", - RowBox[{"All", ",", - RowBox[{"{", - RowBox[{"3", ",", "4"}], "}"}]}], "]"}], "]"}], ",", - RowBox[{"Joined", "\[Rule]", "True"}]}], "]"}]], "Input", - CellChangeTimes->{{3.410371060625*^9, 3.410371073796875*^9}, { - 3.4112988332894363`*^9, 3.41129883339874*^9}, {3.4112995632344923`*^9, - 3.4112995675910215`*^9}}], - -Cell[BoxData[ - GraphicsBox[{{}, {}, - {Hue[0.67, 0.6, 0.6], - LineBox[{{3.4092576*^9, 4.67}, {3.4122816*^9, 4.45}, {3.4147008*^9, - 4.33}, {3.41712*^9, 4.17}, {3.420144*^9, 4.01}, {3.4225632*^9, 3.87}, { - 3.4304256*^9, 3.65}, {3.438288*^9, 3.56}, {3.4461504*^9, 3.59}, { - 3.4540128*^9, 3.72}, {3.4618752*^9, 3.86}, {3.4697376*^9, 4.}, { - 3.4776*^9, 4.13}, {3.4854624*^9, 4.27}, {3.4933248*^9, 4.39}, { - 3.5011872*^9, 4.5}, {3.5090496*^9, 4.59}, {3.516912*^9, 4.69}, { - 3.5253792*^9, 4.77}, {3.5332416*^9, 4.86}, {3.541104*^9, 4.92}, { - 3.5489664*^9, 5.}, {3.5568288*^9, 5.07}, {3.5646912*^9, 5.14}, { - 3.5725536*^9, 5.2}, {3.580416*^9, 5.26}, {3.5882784*^9, 5.32}, { - 3.5961408*^9, 5.39}, {3.6040032*^9, 5.44}, {3.6118656*^9, 5.48}, { - 3.619728*^9, 5.52}, {3.6275904*^9, 5.57}, {3.6354528*^9, 5.6}, { - 3.6433152*^9, 5.64}, {3.6511776*^9, 5.67}, {3.65904*^9, 5.71}, { - 3.6669024*^9, 5.74}, {3.6747648*^9, 5.77}, {3.683232*^9, 5.8}, { - 3.6910944*^9, 5.83}, {3.698352*^9, 5.85}, {3.7068192*^9, 5.87}, { - 3.7146816*^9, 5.89}, {3.722544*^9, 5.93}}]}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - AxesOrigin->NCache[{3409257600, 4.}, {3.4092576*^9, 4.}], - Frame->True, - FrameTicks->{{Automatic, Automatic}, {{{ - NCache[3408134400, 3.4081344*^9], - FormBox["\"2008\"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\"2010\"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\"2012\"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\"2014\"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\"2016\"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\"2018\"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}, {{ - NCache[3408134400, 3.4081344*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3471292800, 3.4712928*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3534364800, 3.5343648*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3597523200, 3.5975232*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3660595200, 3.6605952*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3723753600, 3.7237536*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3439756800, 3.4397568*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3502828800, 3.5028288*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3565987200, 3.5659872*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3629059200, 3.6290592*^9], - FormBox["\" \"", TraditionalForm]}, { - NCache[3692217600, 3.6922176*^9], - FormBox["\" \"", TraditionalForm]}}}}, - GridLines->NCache[{{{3408134400, - GrayLevel[0.8]}, {3471292800, - GrayLevel[0.8]}, {3534364800, - GrayLevel[0.8]}, {3597523200, - GrayLevel[0.8]}, {3660595200, - GrayLevel[0.8]}, {3723753600, - GrayLevel[0.8]}}, None}, {{{3.4081344*^9, - GrayLevel[0.8]}, {3.4712928*^9, - GrayLevel[0.8]}, {3.5343648*^9, - GrayLevel[0.8]}, {3.5975232*^9, - GrayLevel[0.8]}, {3.6605952*^9, - GrayLevel[0.8]}, {3.7237536*^9, - GrayLevel[0.8]}}, None}], - PlotRange->{{3.4092576*^9, 3.722544*^9}, {3.56, 5.93}}, - PlotRangeClipping->True, - PlotRangePadding->{ - Scaled[0.02], - Scaled[0.02]}, - Ticks->None]], "Output", - CellChangeTimes->{3.410371074203125*^9, 3.4112988339608727`*^9, - 3.4112995683717613`*^9}, - ImageCache->GraphicsData["CompressedBitmap", "\<\ -eJztXVuMXVUZPp1zmbYUWsCWysUOtFAuhZZyKRTKtOVWpFgwMWKMiZWo5UEh -OCZGX/BBeNGY6IOSTCwRVBATMSYQCWQMjReSRhIj0ajJBBODDxISiTEkJuP5 -/sva65/598w+5+yz99qmTeey1+yz9v+t9d/Xv9a+5+jMsU9/7ujMgw8cnbrz -kaMPH3vwgS9M3fHQI/2m9qpWa9Wr/a8rp1r4faHV0m8L/f8LJ/ANLSv/fjr9 -OK01N9Na9O9Qa3ae7mwtzM/2r7K2CWrtLG7X5vnZQ1kns/M3j/KE+EMzczkP -vmnoJ/QWP4Fa+01tum6bLm4sD0iHmtvU1cwcf3TvGMYpau4/ZgwzsWiuubl1 -Bv04h/6q8NDxzOx8//e51ow+EA87NNuaJ7bNaSeCZlpz4R4eMgUzyDOYvLVM -tUz2Qv6zbxr6EW3zCG7ruv2U9QyPo4bv2xkimgblk/DZUmfBn+lVzFPr6cem -PkC9Q74YsVzPt7jTZdoNz4X2fUJUwe5zMfi33zxM73aC22GCsy6GIrq7hGjc -3RGFd4gmLtZIA3bfW9K9XE8EAK3wlKHGJYdzls6p4Zwe81S4i+kKOqsT6DLN -qw2587MzfW7m/lvc074infdML0vGpKd3mxkJpnPYzlUlxJ8ug9xuf3pmg8FQ -hTPWgRit83bg+yXT1xIe2RCQzUSzzbQsyyCLH8pqq//Q/Sv2ONpgDNVzV1ki -+ugI3QV+gMzNzhl+uKUc/C1ohrmF4Jf0ux6hZ1Wi0TyJYs04INIlqmc8Dgh0 -TkYPE96CahLiplfstuAwWHUds8HgPQc2iD46QndtGR5gxtQLC9wyKvRucAlm -ZoLnOfqIdt2JmojZYKN1RoZxMYwjw04QD8iaQn0P6GDsG7hr332MPz9qn8Fj -me1bC6MVBulz0vHW+R7M2oEyhtSfLrEMHCBvFuORSWArL25xJn759iiG3TDE -YxayICzTGTm37y33KTndlPQUy5M8hyUNk2cH9o17BpZyVaSJvJDbT68MknUZ -6AE6KEtD15yMyxC9r8mV5riLobtfOSbeW07XweRF3fQfURLhy2dXCMgAKb68 -38/GD/zSeg7fulFrqy3ZxIV4IE3bJRW0ba/gGR629qmhODUUwwzFyZMnQ9s2 -brv0zTff2fz22/+m+y917jvitN1b8L4j4yF9K33v3f/Ky399/YFP/eSt+448 -hZ9f+sHTrwPOJWNCEbeVgOIi+r72ky++8KcfffXRl1e/995/0bLrL3/+5+NP -fPe1P37i48/Of/QjP/zmt7/16xve+MM/tjYD1YXchrk4/vhjv6QrVt29qbfe -+tfDz/3497958NjzmDP8/dBrv/3bVDOQCZmPHv/eScwPXa3huyFAmMe5hz7/ -cyDfkgAi+ouHQ4jD6AMLXbG/1wb9+1//3d/p6oKxgOiYtv5Xp6Bxjz8mpEFk -AANDL2nUNqYCygA/xwShdM46P4Pz0698+RcE50xuw2xgVuL7UodzHrdtePfd -91784swLEHH+7AT4rSEgzs1ABKnY6EjJuc2A8/5MOqB+YWRam7I2GBtAbRgc -6Nqgi8/htntPvDoPKYrvSx3OZm6DAoDJJ90lpMP8w2jG9zUEDvwzeDbxTAAi -5AceTcPgwKqQ3OBK5AQuDdpJds5pBhwhEzMAVUBX5zuysykBOLlOjIAAsSCa -ri5wJGZjBSAmAqUDujGRAoY/TFcfcOSkChAlMNYmZ/zF2URYBjmhIOd9zYCz -MZsJzA6JuEQ3gAeYdHV2o+AY0jkEtQ7NWY2CA8cFzBXDMUq5IXBEJowClgwN -woEQSp/ZKDjB/cfVxdxmVPaGZsCR+2D9wVh0JVkmE282C853vvH1E8d+9vwb -dLXdYcD1CcDJ9QDOysYfPjNZlsu4LeQEcHVGBSCG9gAEhIljBAS0FxgL2qwS -ECUwlmgnE8dcwW0mkXF6o+CYOGYHtxknZ12j4Jg4Zkc2Y2gnU9oQOKJsTRxz -ldN2WqPgGPO4E98pa9YQEFESNkQ0uzIWC6mntY2CY3zmq7nNRDRrGgXHsNhu -B+LqRsGBpSEjiatruM1ENJMJwMl1Y8Syw9q/c/ddx+nqWm4zcUwVIIZ2YwSE -cR6v4zYTvfQSmImicEjt7nEkptsgEItCsOu5zcQszYIDGSF5wNUeh+28zyYI -RzxgiDj0F13xBj4bvbQbBcd4ygLHxDHNgmOcfK7Ms3HMRL1w+MdppoAwrkaN -r7XMrzvYEBhDKuWDZlj6X/S5+6qGbesmuc0pa+XqWK+3ZVD/5/ZbZ7UeR1Gb -EKkG1AJY/03Q97VmGwF9+dXlRQdAYj+T6eLK4w7a4MBjIPCZKrH7e7o6Muk5 -G5Hozx0eulykSIAhEUZXXP4fnOGxTHE38q9y9iYVwVV8Lo09meY2mMuFJ4+/ -nItmjBMpTBrtxDGAna1EAwI2awICmEocP3b/98nlqRBw2FUabTJRtCOKqqQE -TORwQO579pm5YKQqNEiKNjZCAa2/P2FAtMbXO5DdB2edqtkqN7/WDnX0uzW7 -Ra2uoDQWllGGujm1yB+qDmhRt0moNz4DU9/V+0zocU96ECQxBRsHoSIn4KCF -gK/gBaYLwTiqBy0P6RfFuIeThWCSUged+yYchvtgxXByMzsCwuQOlgFhsj1l -gxg6syMgTNjtgRBdaNTzXekxliRq4R3AS6CrW/MfZfTwoWThmBzbMnBMUVG6 -cIzD6sHpZrMYUvB3JgvHuKMeHMmKmkjkjvTgyKqA8Tdvc+6TTLVRyrcnC8do -rGXgmCrpdOGgigDVBLlw5D6jMrz70oBjjKdHpsgYko5IPubKWBpwsCZKnu8K -cIyXXDWcXIdGJMEoAE8S1jqS5fkMtTg0AsJ4xx4IiWWMLTpQMogSGEvgGE95 -GTgmGZ8uHDPqHpx1zizuTxaOqbjx4HjrDdPJwjHZ8WXgmIx5gnDE7zK5bs/v -kqVHeM1gNoJ+S7JwzBqcB4fKJijyTxeEkQQPhFRLmdXtm5OFY8hcBo5Rz+nC -MW6MB0cqDU2AdlPFcHLdGIkeTY2aFz1Kba5xY/aWDGJoN0ZAgKnAXLkgsn23 -ZZNeAjsJCOO8eCBkN4EJBm5IFo4hcxk4EHasp5J5TBeOSf15cGQnDmAADt27 -Jz040masvZcDk11sRuyvTxaOkR0PjmyUNDsMrksWjpEdD85m575rk4VjZGcZ -OMZTThBO25EdL7svm7zNUsY1FcPJtfttR2I8ELK127j7u0sGMbTdbzv874GQ -MzhMMHB1soxl5MSDI/vTjRbblR6cCUdOvKU82aluNuDtTBaOkRgPjuxZN1HO -VcnCMbKzDBw9+oUyN+nCMctLHpwt3AalDDgUW16ZApye6aL/BVWL5NJh5wlT -mWgBBWmLHdWh4B+T+aW2/T9wSWbbVLDllzctQa9aw0Mv5w6YcO+KqtHbSqee -3hAdcz4AWrVMHlrZx28WRC+vDq1baWtfPdEJ96Nsjw/aHQC8rtJ54OWcP7OQ -d1mF4P1S29WBA7JThekTVM464cNUTevB3MZtyPSHRJ93/OSYS20nAxJUJw48 -kap8PYRy3gEsZzhnb3vJCAcvtQ1iK8oLXJ1fnWiK3sLCn1f0JschAGmQWe8g -zsrrbDutcIo2w+0VQxv2EHtoZR6hocIq+sXVo40tkL40IT4fvCDUoGg9qCKU -WI6D6aFwaFt1UPOLbLtmYlsrCq+BHBYYPMiibmFtocLI19haHeR8j8lACO62 -B+HyDEJwly5KDkJYSPAgiH+jHh/5rRemACGU0apC9EqxdzjUTyVFvSo4j3qJ -D0zMsKVi6qNETqBZNZVH81UOzR8omeYB8jaBZlU1Hs07HZq9Q2vr4xLVMh71 -uxzqveNd66NeFYxHfXSQQ1i3OC8F6qmL4Gx53Uo60gTD3smt9ZAePCev22sc -0r1TWushPXhCXrfXZqTrPkj3CNN6SA8ejdetrPioR0Oke8eV1kM6fEtSHl63 -1zuke0eT1pyN87rd45DuneWZIOmyHo0sDXidnDTv3M5aVnK8zuS0AegeBOVU -ee6dzFnLqo3XmdRjaJaZUgTeYZUJModUJoFkuAekw72jDxMkfV8mksi10k6Y -9c0gXar11NuihSPvXMAESZ/mu6EAYV31dSfrmkG91Enr62ZoscU7jy1B0qXs -Xn1cShd4Z68lSLpse4ByCS/F8M5ZS5D027jNvJ7EO1MtQdKlmhNkh9UH79Su -ZOy+VKRhuSRk2b0jrZKx+1IGZBLl3mcTZA6pzDBZb+9olQRJl4Vxk8X2Tm9K -kPS7madNFNFvoXs+nB65h/lukKtpFfw9QUol6Yx4HiHDwtNPvZLigHLuit4x -tvDZzzwDHsDvCXIqt1HyDcu+GFQYkaJUVU5pWM4Fk8KCgGEREnjLEbVYN25b -bdoWstQ9aAbtd49Ab6nGzWsTCwFOAEdQ6ZVXp5QES3iPItGD2OlioFfJmyD1 -4rdhwMEslGHzCvgTJF3KMnQDEWVzvI1GCZIeHZMAT4PCdG+TZIKkS3ilYTrV -fN7WDNIlHkcCPKSkvD3nJZCOv8X1YfpO9dUrnb1Z9BCwojSu4zb1tHL3dJeA -Wasw4mI/bhv5yM2i1MmmYqMS9o8ZbVTdF9COdmhfUeqiY8HBz5RCmB4PWq1l -jEv7pKBv2RMoo8q/4WjivGtH0yT4At59I3QZV/xls5iV9rUL4CpxFmUfLGZP -XUt3W28Js7i4JAzoOhHaEY7VLErdWZmE6ouQ3V2/JelgW9XXrVY+z854F044 -ZBRe4o1jgss/tbSvp1hHO1KzKGGyZKlrJpRE9varlgG0Jy1LCvtCMed4bSqv -LJPHjznF3GKOvQ2gCXpBUo0AyYME0kqFt9kzQdKlBkQjWzJ43k7IBEnnypsO -bFdsx7w9gwlSLwVbxkZ5OwUTJF0q5dTgUPWLtyuwxtSNbeNyRLIaCK40UvE2 -lyWTvpGiVWj9UFjhbR9LkD+kWhjKHPxBO0d3NIN0KTeHJg/1N94WqARJ38Zt -UCR4tQm5gd4GpgRJvziTTzCLVoh4u3YSpJ7JDO9pgIaBdvH2pSRIvbAIlDj0 -DJ3muK0ZpLNgktOI0haodSRjvP0WCVIvGlEVPMmrt88iGSt6pZVSEA0p3TJC -l2O3oju5By3EUR/Rq/VPkEXEH4SPiNEm59wr9E+Q9N2ZbGLQIZuYBK9aPkHq -OQLqaOiNohGwvVd1niD112WCCso1besVnidIPVdvdzS6APeAi7wC7gSpl0yU -EVmvgDtB0rkyOsTTekaaVxydIPWc3+3AIoHhNYNU9NXwNVMv7/oCxbpgD+Wz -fozUj+wPTPNj4HJBvcMFg6AWfcl4Lf5AVFOMMaZV4nXNYJGDmXhilRi6EcNd -9JXONVMv69mwQ8rchV/fXDPpt2cDDz5HfAc5Lfpm4Jqpl8oTxHfh1Mui7wOu -mXSp99EDesiWFn1tbs2kc8luWGOFbgT/eFW7CVIvdW2684Jy06OsOFdI+mH6 -3oVRArvD/9VSWPeVkjWTK0WmIBNJu4XHvkZbc4sWmY7dxnNbl4awTxtohCah -Ymhvc3ctRp1Hi6pKQSgUdEzo4fSmnSmejNtgy0F5iBqKFpdWTrYzu+wFQtNh -4EG+d5pkgtRzf12lHucWQBYp71+08LFmCGzMuyAZpAMCzA0p7aJVhDVDYEew -q7ueVQRIyxStrBuicrCz+CjBwU4SLA8/V1F24ZspF0IVUGXh9Oj4vSrCwY4R -LA8qR4dkUKCfoS7CgUpFK9AGLCHsOW1VQOXUQ1cPj9RFOaqR9d4KMCBUr36w -57TR7bmv4x4FIGeGSHki3QK2BfuS5ilaqLRS5WDPaati8jhn14MK0hINrY9B -W9HqngErBwc7JbA8tJwa7mLmYjOYe5D4EArYKxtc0px/cF55WLniiTSQut3B -pS1agFO8ZlAPuix2PGB5KM/LUC72h90jrwdFuULB4KCHBJYHnJf2Oovd6aK1 -PjV7Qlu419ibhle0oxnU8/I1GQS4oJq0ITVStBSlZghcANRDzgkTgKPAdDsR -YHlHqyaIgsnswfVArhhspOuYcDK3NgPFZdlcgHKIMpBArGGppkpCMXKSxKOd -JbYHntHUqy44DFKAUFHuxLaxfaBwBNwDbwA/KXXsndSXIOuwIe/C3GHIMfSY -Aqpu8o69SxAC1yCQTwZlilmAl01BoXcQW4IQuHy/B1uMyAfCi1mAQICZvHPC -EkTBS/o9TIR6FPjCZEA1FV1hrhkFr4/3MO6YC5gDFWzsVC66alsziumMoyDX -2BkOEw1TDWRFF0NrRsFLuT0YAi0UiYPLoiuLNaPgddEQNEK6g4IqukxXMwRe -HO3GCgosRdmootmSWtwLPsihB8nV3JI6d7jPW+mqxZU4zHSCJ9SFW7jvyJPQ -oygFSJAl+L7JhZde+hXsFMosNLGF0aYA2luaSYLstXEbuBoqRZWkHueWd5RG -EghsGz9+EoOOwdeITHcdkarxDnlIEAor9R64XhMykAZIBbwI79CEBFGwgSUv -QktLgQReBJTmdDNQsLMzCfaBFwENCraCmw0BodU/bwd1glDY+5yETCO40ewt -JgYWjV6i5uXiE4TCKfdJkKy7gGIPlTSvtzW1FgPs3cdZ9MnYOcVr1VTvElt5 -GeZaLLN3Hwf3PVW1GP04XvNyqAnyEe/2zI3XvPe3JYiCc6mTi+M1zAuYiwTb -2yCXIJRt9H2N+iMQaMCBbOgR3DAeuS/LSRASv51pDXQSLLoeyQ0rAl4DREgN -7dr1XoaSICTe3rUWDAcGg+hgdham9z0BSDCOgAlImClvL0yCqHZnqGAfgQCo -MFFaexDzn5eSShAV75FZCwcGlMfspzEslAbmCizqHVeeICpOUa0BKpggKGzM -FfQEOFDfWUh21Mv0JAiJq5fIX4bqg1DFZRLe6dTJuDOS39HyB12+ID/My+8k -48ZIVsddv/CyOgnyDZdPkluv6xcQBVq/6P+F7vXKCGom+zA/CXoH9gI/8fch -KY3bLimhbRhERZ8xJA+VDXGltu0VPOPUUJwaisGHAr+0nousB91y4v/799aq -/wGpzok+\ -\>"]] -}, Open ]] -}, Open ]] -}, -WindowSize->{971, 935}, -WindowMargins->{{4, Automatic}, {Automatic, 3}}, -PrintingCopies->1, -PrintingPageRange->{Automatic, Automatic}, -ShowSelection->True, -FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{ - "Info3411280078-7196149"->{ - Cell[14716, 399, 312, 5, 73, "Print", - CellTags->"Info3411280078-7196149"]}, - "Info3411280081-2015869"->{ - Cell[15201, 413, 326, 6, 73, "Print", - CellTags->"Info3411280081-2015869"]}, - "Info3411280083-4726061"->{ - Cell[15713, 428, 369, 6, 73, "Print", - CellTags->"Info3411280083-4726061"]}, - "Info3411280345-6648233"->{ - Cell[26215, 713, 265, 5, 50, "Print", - CellTags->"Info3411280345-6648233"]} - } -*) -(*CellTagsIndex -CellTagsIndex->{ - {"Info3411280078-7196149", 57302, 1566}, - {"Info3411280081-2015869", 57412, 1569}, - {"Info3411280083-4726061", 57522, 1572}, - {"Info3411280345-6648233", 57632, 1575} - } -*) -(*NotebookFileOutline -Notebook[{ -Cell[CellGroupData[{ -Cell[590, 23, 92, 1, 88, "Section"], -Cell[685, 26, 206, 5, 52, "Input"], -Cell[894, 33, 689, 16, 141, "Input"], -Cell[1586, 51, 1398, 32, 185, "Input"], -Cell[2987, 85, 989, 26, 229, "Input"], -Cell[3979, 113, 1459, 38, 251, "Input"], -Cell[5441, 153, 409, 8, 97, "Input"], -Cell[5853, 163, 426, 8, 119, "Input"], -Cell[6282, 173, 487, 9, 119, "Input"], -Cell[6772, 184, 545, 15, 75, "Input"], -Cell[7320, 201, 313, 6, 97, "Input"], -Cell[7636, 209, 4882, 123, 427, "Input"], -Cell[12521, 334, 301, 6, 97, "Input"], -Cell[12825, 342, 432, 8, 35, "Input"], -Cell[13260, 352, 910, 26, 119, "Input"] -}, Open ]], -Cell[CellGroupData[{ -Cell[14207, 383, 92, 1, 88, "Section"], -Cell[14302, 386, 259, 5, 55, "Text"], -Cell[CellGroupData[{ -Cell[14586, 395, 127, 2, 52, "Input"], -Cell[14716, 399, 312, 5, 73, "Print", - CellTags->"Info3411280078-7196149"] -}, Open ]], -Cell[CellGroupData[{ -Cell[15065, 409, 133, 2, 52, "Input"], -Cell[15201, 413, 326, 6, 73, "Print", - CellTags->"Info3411280081-2015869"] -}, Open ]], -Cell[CellGroupData[{ -Cell[15564, 424, 146, 2, 52, "Input"], -Cell[15713, 428, 369, 6, 73, "Print", - CellTags->"Info3411280083-4726061"] -}, Open ]], -Cell[CellGroupData[{ -Cell[16119, 439, 255, 6, 52, "Input"], -Cell[16377, 447, 221, 3, 75, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[16635, 455, 279, 6, 35, "Input"], -Cell[16917, 463, 206, 3, 35, "Output"] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[17172, 472, 97, 1, 88, "Section"], -Cell[17272, 475, 165, 4, 35, "Input"], -Cell[17440, 481, 474, 14, 35, "Input"], -Cell[CellGroupData[{ -Cell[17939, 499, 276, 8, 35, "Input"], -Cell[18218, 509, 1905, 27, 190, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[20160, 541, 323, 9, 35, "Input"], -Cell[20486, 552, 283, 6, 35, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[20806, 563, 373, 8, 35, "Input"], -Cell[21182, 573, 208, 3, 35, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[21427, 581, 1638, 37, 102, "Input"], -Cell[23068, 620, 543, 10, 94, "Message"], -Cell[23614, 632, 444, 9, 27, "Message"] -}, Open ]], -Cell[CellGroupData[{ -Cell[24095, 646, 733, 21, 58, "Input"], -Cell[24831, 669, 146, 2, 35, "Output"] -}, Open ]] -}, Closed]], -Cell[CellGroupData[{ -Cell[25026, 677, 94, 1, 50, "Section"], -Cell[CellGroupData[{ -Cell[25145, 682, 420, 9, 52, "Input"], -Cell[25568, 693, 275, 4, 52, "Output"] -}, Open ]], -Cell[25858, 700, 164, 4, 52, "Input"], -Cell[CellGroupData[{ -Cell[26047, 708, 165, 3, 52, "Input"], -Cell[26215, 713, 265, 5, 50, "Print", - CellTags->"Info3411280345-6648233"] -}, Open ]], -Cell[26495, 721, 101, 1, 35, "Input"], -Cell[26599, 724, 272, 7, 52, "Input"], -Cell[26874, 733, 104, 1, 52, "Input"], -Cell[26981, 736, 303, 8, 35, "Input"], -Cell[CellGroupData[{ -Cell[27309, 748, 267, 6, 52, "Input"], -Cell[27579, 756, 276, 5, 52, "Output"] -}, Open ]], -Cell[27870, 764, 318, 7, 35, "Input"], -Cell[CellGroupData[{ -Cell[28213, 775, 355, 5, 52, "Input"], -Cell[28571, 782, 6536, 223, 295, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[35144, 1010, 119, 2, 52, "Input"], -Cell[35266, 1014, 9954, 311, 515, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[45257, 1330, 429, 11, 52, "Input"], -Cell[45689, 1343, 11199, 206, 336, 3902, 84, "CachedBoxData", "BoxData", \ -"Output"] -}, Open ]] -}, Open ]] -} -] -*) - -(* End of internal cache information *) diff --git a/MathematicaFiles/Applications/ParticleFilter.m b/MathematicaFiles/Applications/ParticleFilter.m deleted file mode 100755 index 06cb3958d995aac749519f2e218d54718b8d97b8..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/ParticleFilter.m +++ /dev/null @@ -1,306 +0,0 @@ -(* :Title: Particle Filter *) - -(* :Author: Mark Fisher *) - -(* :Context: ParticleFilter` *) - -(* :Mathematica Version: 6.0 *) - -(* :History: - Version 0.0 April 2005 - Version 0.1 May 2007 update for Version 6. - Use built-in RandomChoice (in addition to changing - Random and RandomArray to RandomReal) -*) - -(* :Summary: - SIR (Sampling Importance Resampling) particle filter and - backward simulation particle smoother -*) - -(* :Discussion: - This package implements ParticleFilter (an SIR particle filter) - and ParticleSmoother (a backward simulation particle smoother that - takes the output from ParticleFilter as input). In particular, given - {loglikelihood, states} = - ParticleFilter[data, {x0, w0}, f, gp, IncludeStates -> True]; - the marginal loglikelihood of the parameters (implicit in f and gp) is - given by loglikelihood. To compute n draws of paths from the smoothed - distribution, use - collected = CollectStates[states]; - smoothed = ParticleSmoother[collected, fp, n]; - -*) - -(* :References: - Doucet, de Freitas, and Gordon (editors), - "Sequenctial Monte Carlo Methods in Practice", - Springer, 2001. - - Arulampalam, Maskell, Gordon, and Clapp, - "A tutorial on particle filters for online nonlinear/non-Gaussian - Bayesian tracking", - IEEE Transactions on Signal Processing, vol. 50, no. 2, February 2002. - - Godsill, Doucet, and West, - "Monte Carlo smoothing for nonlinear time series", - Journal of the American Statistical Association, vol. 99, no. 465, - pp. 156-168, March 2004. -*) - -(* :Example: -(* -This is the now classic nonlinear example. -The functions are compiled for speed. -The parameters are accessible via the functions. -*) - -Clear[signal, data, f, fCompiled, gp, gpCompiled, fp, fpCompiled, - swarmsize, prior, loglikelihood, states, collected, smoothed] - -signal = Rest @ FoldList[ - {.5#1[[1]] + 25#1[[1]]/(1 + #1[[1]]^2) + 8 Cos[1.2#1[[2]]] + #2, #1[[2]] + 1} &, - {RandomReal[NormalDistribution[0, Sqrt[10]]], 0}, - RandomReal[NormalDistribution[0, Sqrt[10]], 100]]; - -data = Partition[signal[[All, 1]]^2/20, 1] + - RandomReal[NormalDistribution[], 100]; - -f[x_, {a_, b_, c_, s2v_}] := - fCompiled[ - x[[All, 1]], - x[[1, 2]], - RandomReal[NormalDistribution[0, Sqrt[s2v]], Length[x]], - a, b, c - ] - -fCompiled = Compile[ - {{x, _Real, 1}, {t, _Real, 0}, {v, _Real, 1}, - {a, _Real, 0}, {b, _Real, 0}, {c, _Real, 0}}, - MapThread[{a #1 + b #1/(1 + #1^2) + c*Cos[1.2t] + #2, t + 1} &, - {x, v}]]; - -gp[x_, y_, {d_, s2w_}] := gpCompiled[x[[All, 1]], y[[1]], d, s2w] - -gpCompiled = Compile[ - {{x, _Real, 1}, {y, _Real, 0}, {d, _Real, 0}, {s2w, _Real, 0}}, - E^-((y - d*#1^2)^2/(2*s2w^2))/(Sqrt[2*Pi]*s2w) & /@ x - ]; - -fp[x1_, x0_, {a_, b_, c_, s2v_}] := - fpCompiled[x1[[1]], x0[[All, 1]], x0[[1, 2]], a, b, c, s2v] - -fpCompiled = Compile[ - {{x1, _Real, 0}, {x0, _Real, 1}, {t, _Real, 0}, - {a, _Real, 0}, {b, _Real, 0}, {c, _Real, 0}, {s2v, _Real, 0}}, - 1/(E^((x1 - c*Cos[1.2*t] - a*#1 - (b*#1)/(1 + #1^2))^2/(2*s2v^2))*s2v) & /@ x0 - ]; - -swarmsize = 10^4; -prior = Thread[{RandomReal[NormalDistribution[0, Sqrt[10]], swarmsize], 0}]; - -{loglikelihood, states} = - ParticleFilter[data, prior, f[#, {.5, 25, 8, 10}]&, gp[##, {.05, 1}]&, - IncludeStates -> True]; - -collected = CollectStates[states]; - -smoothed = ParticleSmoother[collected, fp[##, {.5, 25, 8, 10}] &, 10]; - -*) - -BeginPackage["ParticleFilter`"] - -ParticleFilter::usage = "ParticleFilter[data, x0, f, gp] takes a list of \ -data vectors, a list of state vectors x0 that represent the prior \ -information (the particle swarm), a transition function f that takes the \ -list state vectors as an argument and returns the list of predictions for \ -the new state vectors, and a function gp that takes two arguments, the list \ -of state vectors and the current a single data point, that returns \ -likelihood of the data given the state from the measurement equation. \ -ParticleFilter returns the log of the marginal likelihood of the (implicit) \ -parameters. By setting the option IncludeStates -> True, ParticleFilter \ -also returns the list of states, suitable as input to ParticleSmoother. \ -ParticleFilter also takes the option MCMCSmooth." - -IncludeStates::usage = "IncludeStates is an option for ParticleFilter, \ -which specifies whether to include the filtered particle swarms in \ -the output. The default setting is IncludeStates -> False." - -ParticleSmoother::usage = "ParticleSmoother[states, fp, n] takes the list \ -of states produced by ParticleFilter and a function fp that takes two \ -arguments (the first of which is a single current state vector and the \ -second of which is a list of previous state vectors) and returns a list of \ -likelihoods of the previous states given the value of the current state. \ -ParticleSmoother returns n paths from the joint smoothed distribution of \ -the state vectors." - -FilterStep::usage = "FilterStep[{x0, loglike0}, y, f, gp] is called by \ -ParticleFilter and returns {x1, loglike1}." - -SmootherStep::usage = "SmootherStep[x1, {x0, w0}, fp] is called by \ -ParticleSmoother. SmootherStep returns a list of previous states sampled \ -from x0 corresponding to the list of current states x1." - -Resample::usage = "Resample[{x, w}, n] returns a list of n samples drawn \ -with replacement from x with probabilities proportional to the nonnegative \ -weights w (made with SystematicResampling). Resample[{x, w}] returns a \ -single draw (made with BinarySerach). Resample is called by ParticleFilter \ -and ParticleSmoother." - -SystematicResampling::usage = "SystematicResampling[weights, n] returns a \ -list of n positions computed from the nonnegative weights according to \ -systematic resampling. SystematicResampling is called by FilterStep (within \ -ParticleFilter)." - -BinarySearch::usage = "BinarySearch[weights] returns a single position \ -computed from the nonnegative weights using binary search. BinarySearch is \ -called by SmootherStep (within ParticleSmoother)." - -CollectStates::usage = "CollectStates is an option for ParticleSmoother \ -that specifies whether to run the function CollectStates on the input. \ -CollectStates[states] take a list of states (as repreented by particle \ -swarms such as can be produced by ParticleFilter) and returns a list of the \ -union of the particles paired with their weights. The output is suitable as \ -input for ParticleSmoother." - -MCMCSmooth::usage = "MCMCSmooth is an option for ParticleFilter that \ -specifies whether to run the function MCMCSmooth at the end of FilterStep \ -after resampling. The default setting is MCMCSmooth -> False. \ -MCMCSmooth[{x1, w}, y, x0, f, gp] compares the likelihood each element of \ -x1 with a draw from f[x0] and replaces it with the draw according to the \ -ususal Metropolis criterion. The purpose is to obtain more distinct values \ -while maintaining the same distribution." - -PriorToPosterior::usage = "PriorToPosterior[prior, likelihood] takes a list \ -of points that represent a prior distribution and a likelihood function and \ -returns a list of points that represents the posterior distribution." - -Begin["`Private`"] - -PriorToPosterior[prior_, Lfun_] := - prior[[ SystematicResampling[Lfun /@ prior, Length[prior]] ]] - -(***** filtering *****) - -Options[ParticleFilter] = {IncludeStates -> False, MCMCSmooth -> False} - -ParticleFilter[data_, x0_, f_, gp_, opts___?OptionQ] := - If[TrueQ[IncludeStates /. {opts} /. Options[ParticleFilter]], - (* then *) - {#[[-1, -1]], #[[All, 1]]}& @ - Rest[FoldList[FilterStep[##, f, gp, opts]&, {x0, 0}, data]], - (* else *) - Fold[FilterStep[##, f, gp, opts]&, {x0, 0}, data][[2]] - ] - -FilterStep[{x0_, loglike_}, y_, f_, gp_, opts___] := - Module[{x1, w, pos}, - x1 = f[x0]; - w = gp[x1, y]; - pos = SystematicResampling[w, Length[w]]; - {If[TrueQ[MCMCSmooth /. {opts} /. Options[ParticleFilter]], - (* then *) -(* MCMCSmooth[{x1[[ pos ]], w[[ pos ]]}, y, x0, f, gp], *) - MCMCChoose[x1[[ pos ]], w[[ pos ]], x1, w], - (* else *) - x1[[ pos ]] - ], - Log[Mean[w]] + loglike} - ] - -(* streamlined version *) -Clear[ParticleFilter, FilterStep] - -Options[ParticleFilter] = {IncludeStates -> False} - -ParticleFilter[data_, x0_, f_, gp_, opts___?OptionQ] := - If[TrueQ[IncludeStates /. {opts} /. Options[ParticleFilter]], - (* then *) - {#[[-1, 1, 1]], #[[All, 2;;]]}& @ - Rest[FoldList[FilterStep[##, f, gp]&, - Prepend[x0, Table[0,{Dimensions[x0][[2]]}]], data]], - (* else *) - Fold[FilterStep[##, f, gp]&, - Prepend[x0, Table[0,{Dimensions[x0][[2]]}]], data][[1, 1]] - ] - -FilterStep[x0loglike_, y_, f_, gp_] := - Module[{x1, w}, - x1 = f[Rest[x0loglike]]; - w = gp[x1, y]; - Prepend[ - RandomChoice[w -> x1, Length[x1]], - Log[Mean[w]] + First[x0loglike] - ] - ] - -(* c[[i]] is the number of children of the i-th parent - p[[j]] is the position of the parent of the j-th child - w is the list of nonnegative weights (need not be normalized) - M is the desired number of children - *) -SystematicResampling = Compile[{{w, _Real, 1}, {M, _Integer, 0}}, - Module[{ - c = (Rest[#] - Most[#])& @ - Floor[FoldList[Plus, 0, M * w/(Plus@@w)] - RandomReal[]], - p = Table[0, {M}], - j = 1}, - Do[ - Do[p[[j]] = i; j++, {c[[i]]}], - {i, Length[w]}]; - p - ]] - -(* use {x1[[ pos ]], w[[ pos ]]} as first argument, - where pos = SystematicResampling[w, Length[w]] *) -MCMCSmooth[{x1_, w_}, y_, x0_, f_, gp_] := - With[{proposal = f[x0]}, - MCMCChoose[x1, w, proposal, gp[proposal, y]] - ] - -MCMCChoose = Compile[ - {{x1, _Real, 2}, {w, _Real, 1}, {xp, _Real, 2}, {wp, _Real, 1}}, - With[{alpha = - If[# >= 0, 1, 0] & /@ (wp - w * RandomReal[1, Length[w]])}, - alpha * xp + (1 - alpha) * x1 - ]] - -(***** smoothing *****) - -Options[ParticleSmoother] = {CollectStates -> False} - -ParticleSmoother[states_, fp_, n_Integer:1, opts___?OptionQ] := - Module[{ - collected = Reverse @ - If[TrueQ[CollectStates /. {opts} /. Options[ParticleSmoother]], - (* then *) - CollectStates[states], - (* else *) - states], - result}, - result = Transpose @ Reverse @ - FoldList[ - SmootherStep[##, fp]&, - Resample[First[collected], n], - Rest[collected] - ]; - If[n == 1, result[[1]], result] - ] - -SmootherStep[x1_, {x0_, w0_}, fp_] := - x0[[ BinarySearch[w0 * fp[#, x0]] ]]& /@ x1 - -SmootherStep[x1_, {x0_, w0_}, fp_] := - RandomChoice[(w0 * fp[#, x0]) -> x0]& /@ x1 - - -CollectStates[states_] := - Transpose[{First[#], Length[#]}& /@ Split[Sort[#]]]& /@ states - -Resample[{x_, w_}] := RandomChoice[w -> x] - -Resample[{x_, w_}, n_] := RandomChoice[w -> x, n] - -End[] -EndPackage[] diff --git a/MathematicaFiles/Applications/ParticleFilter.old b/MathematicaFiles/Applications/ParticleFilter.old deleted file mode 100755 index 40883515f7f6fea3eca3bd4e64a93a5d56bfbfe2..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/ParticleFilter.old +++ /dev/null @@ -1,280 +0,0 @@ -(* :Title: Particle Filter *) - -(* :Author: Mark Fisher *) - -(* :Context: ParticleFilter` *) - -(* :Mathematica Version: 6.0 *) - -(* :History: - Version 0.0 April 2005 - Version 0.1 May 2007 update for Version 6. - Use built-in RandomChoice (in addition to changing - Random and RandomArray to RandomReal) -*) - -(* :Summary: - SIR (Sampling Importance Resampling) particle filter and - backward simulation particle smoother -*) - -(* :Discussion: - This package implements ParticleFilter (an SIR particle filter) - and ParticleSmoother (a backward simulation particle smoother that - takes the output from ParticleFilter as input). In particular, given - {loglikelihood, states} = - ParticleFilter[data, {x0, w0}, f, gp, IncludeStates -> True]; - the marginal loglikelihood of the parameters (implicit in f and gp) is - given by loglikelihood. To compute n draws of paths from the smoothed - distribution, use - collected = CollectStates[states]; - smoothed = ParticleSmoother[collected, fp, n]; - -*) - -(* :References: - Doucet, de Freitas, and Gordon (editors), - "Sequenctial Monte Carlo Methods in Practice", - Springer, 2001. - - Arulampalam, Maskell, Gordon, and Clapp, - "A tutorial on particle filters for online nonlinear/non-Gaussian - Bayesian tracking", - IEEE Transactions on Signal Processing, vol. 50, no. 2, February 2002. - - Godsill, Doucet, and West, - "Monte Carlo smoothing for nonlinear time series", - Journal of the American Statistical Association, vol. 99, no. 465, - pp. 156-168, March 2004. -*) - -(* :Example: -(* -This is the now classic nonlinear example. -The functions are compiled for speed. -The parameters are accessible via the functions. -*) - -Clear[signal, data, f, fCompiled, gp, gpCompiled, fp, fpCompiled, - swarmsize, prior, loglikelihood, states, collected, smoothed] - -signal = Rest @ FoldList[ - {.5#1[[1]] + 25#1[[1]]/(1 + #1[[1]]^2) + 8 Cos[1.2#1[[2]]] + #2, #1[[2]] + 1} &, - {RandomReal[NormalDistribution[0, Sqrt[10]]], 0}, - RandomReal[NormalDistribution[0, Sqrt[10]], 100]]; - -data = Partition[signal[[All, 1]]^2/20, 1] + - RandomReal[NormalDistribution[], 100]; - -f[x_, {a_, b_, c_, s2v_}] := - fCompiled[ - x[[All, 1]], - x[[1, 2]], - RandomReal[NormalDistribution[0, Sqrt[s2v]], Length[x]], - a, b, c - ] - -fCompiled = Compile[ - {{x, _Real, 1}, {t, _Real, 0}, {v, _Real, 1}, - {a, _Real, 0}, {b, _Real, 0}, {c, _Real, 0}}, - MapThread[{a #1 + b #1/(1 + #1^2) + c*Cos[1.2t] + #2, t + 1} &, - {x, v}]]; - -gp[x_, y_, {d_, s2w_}] := gpCompiled[x[[All, 1]], y[[1]], d, s2w] - -gpCompiled = Compile[ - {{x, _Real, 1}, {y, _Real, 0}, {d, _Real, 0}, {s2w, _Real, 0}}, - E^-((y - d*#1^2)^2/(2*s2w^2))/(Sqrt[2*Pi]*s2w) & /@ x - ]; - -fp[x1_, x0_, {a_, b_, c_, s2v_}] := - fpCompiled[x1[[1]], x0[[All, 1]], x0[[1, 2]], a, b, c, s2v] - -fpCompiled = Compile[ - {{x1, _Real, 0}, {x0, _Real, 1}, {t, _Real, 0}, - {a, _Real, 0}, {b, _Real, 0}, {c, _Real, 0}, {s2v, _Real, 0}}, - 1/(E^((x1 - c*Cos[1.2*t] - a*#1 - (b*#1)/(1 + #1^2))^2/(2*s2v^2))*s2v) & /@ x0 - ]; - -swarmsize = 10^4; -prior = Thread[{RandomReal[NormalDistribution[0, Sqrt[10]], swarmsize], 0}]; - -{loglikelihood, states} = - ParticleFilter[data, prior, f[#, {.5, 25, 8, 10}]&, gp[##, {.05, 1}]&, - IncludeStates -> True]; - -collected = CollectStates[states]; - -smoothed = ParticleSmoother[collected, fp[##, {.5, 25, 8, 10}] &, 10]; - -*) - -BeginPackage["ParticleFilter`"] - -ParticleFilter::usage = "ParticleFilter[data, x0, f, gp] takes a list of -data vectors, a list of state vectors x0 that represent the prior -information (the particle swarm), a transition function f that takes the -list state vectors as an argument and returns the list of predictions for -the new state vectors, and a function gp that takes two arguments, the list -of state vectors and the current a single data point, that returns -likelihood of the data given the state from the measurement equation. -ParticleFilter returns the log of the marginal likelihood of the (implicit) -parameters. By setting the option IncludeStates -> True, ParticleFilter -also returns the list of states, suitable as input to ParticleSmoother. -ParticleFilter also takes the option MCMCSmooth." - -IncludeStates::usage = "IncludeStates is an option for ParticleFilter, -which specifies whether to include the filtered particle swarms in -the output. The default setting is IncludeStates -> False." - -ParticleSmoother::usage = "ParticleSmoother[states, fp, n] takes the list -of states produced by ParticleFilter and a function fp that takes two -arguments (the first of which is a single current state vector and the -second of which is a list of previous state vectors) and returns a list of -likelihoods of the previous states given the value of the current state. -ParticleSmoother returns n paths from the joint smoothed distribution of -the state vectors." - -FilterStep::usage = "FilterStep[{x0, loglike0}, y, f, gp] is called by -ParticleFilter and returns {x1, loglike1}." - -SmootherStep::usage = "SmootherStep[x1, {x0, w0}, fp] is called by -ParticleSmoother. SmootherStep returns a list of previous states sampled -from x0 corresponding to the list of current states x1." - -Resample::usage = "Resample[{x, w}, n] returns a list of n samples drawn -with replacement from x with probabilities proportional to the nonnegative -weights w (made with SystematicResampling). Resample[{x, w}] returns a -single draw (made with BinarySerach). Resample is called by ParticleFilter -and ParticleSmoother." - -SystematicResampling::usage = "SystematicResampling[weights, n] returns a -list of n positions computed from the nonnegative weights according to -systematic resampling. SystematicResampling is called by FilterStep (within -ParticleFilter)." - -BinarySearch::usage = "BinarySearch[weights] returns a single position -computed from the nonnegative weights using binary search. BinarySearch is -called by SmootherStep (within ParticleSmoother)." - -CollectStates::usage = "CollectStates is an option for ParticleSmoother -that specifies whether to run the function CollectStates on the input. -CollectStates[states] take a list of states (as repreented by particle -swarms such as can be produced by ParticleFilter) and returns a list of the -union of the particles paired with their weights. The output is suitable as -input for ParticleSmoother." - -MCMCSmooth::usage = "MCMCSmooth is an option for ParticleFilter that -specifies whether to run the function MCMCSmooth at the end of FilterStep -after resampling. The default setting is MCMCSmooth -> False. -MCMCSmooth[{x1, w}, y, x0, f, gp] compares the likelihood each element of -x1 with a draw from f[x0] and replaces it with the draw according to the -ususal Metropolis criterion. The purpose is to obtain more distinct values -while maintaining the same distribution." - -PriorToPosterior::usage = "PriorToPosterior[prior, likelihood] takes a list -of points that represent a prior distribution and a likelihood function and -returns a list of points that represents the posterior distribution." - -Begin["`Private`"] - -PriorToPosterior[prior_, Lfun_] := - prior[[ SystematicResampling[Lfun /@ prior, Length[prior]] ]] - -(***** filtering *****) - -Options[ParticleFilter] = {IncludeStates -> False, MCMCSmooth -> False} - -ParticleFilter[data_, x0_, f_, gp_, opts___?OptionQ] := - If[TrueQ[IncludeStates /. {opts} /. Options[ParticleFilter]], - (* then *) - {#[[-1, -1]], #[[All, 1]]}& @ - Rest[FoldList[FilterStep[##, f, gp, opts]&, {x0, 0}, data]], - (* else *) - Fold[FilterStep[##, f, gp, opts]&, {x0, 0}, data][[2]] - ] - -FilterStep[{x0_, loglike_}, y_, f_, gp_, opts___] := - Module[{x1, w, pos}, - x1 = f[x0]; - w = gp[x1, y]; - pos = SystematicResampling[w, Length[w]]; - {If[TrueQ[MCMCSmooth /. {opts} /. Options[ParticleFilter]], - (* then *) -(* MCMCSmooth[{x1[[ pos ]], w[[ pos ]]}, y, x0, f, gp], *) - MCMCChoose[x1[[ pos ]], w[[ pos ]], x1, w], - (* else *) - x1[[ pos ]] - ], - Log[Mean[w]] + loglike} - ] - -(* c[[i]] is the number of children of the i-th parent - p[[j]] is the position of the parent of the j-th child - w is the list of nonnegative weights (need not be normalized) - M is the desired number of children - *) -SystematicResampling = Compile[{{w, _Real, 1}, {M, _Integer, 0}}, - Module[{ - c = (Rest[#] - Most[#])& @ - Floor[FoldList[Plus, 0, M * w/(Plus@@w)] - Random[]], - p = Table[0, {M}], - j = 1}, - Do[ - Do[p[[j]] = i; j++, {c[[i]]}], - {i, Length[w]}]; - p - ]] - -(* use {x1[[ pos ]], w[[ pos ]]} as first argument, - where pos = SystematicResampling[w, Length[w]] *) -MCMCSmooth[{x1_, w_}, y_, x0_, f_, gp_] := - With[{proposal = f[x0]}, - MCMCChoose[x1, w, proposal, gp[proposal, y]] - ] - -MCMCChoose = Compile[ - {{x1, _Real, 2}, {w, _Real, 1}, {xp, _Real, 2}, {wp, _Real, 1}}, - With[{alpha = - If[# >= 0, 1, 0] & /@ (wp - w * RandomReal[{0,1} Length[w]])}, - alpha * xp + (1 - alpha) * x1 - ]] - -(***** smoothing *****) - -Options[ParticleSmoother] = {CollectStates -> False} - -ParticleSmoother[states_, fp_, n_Integer:1, opts___?OptionQ] := - Module[{ - collected = Reverse @ - If[TrueQ[CollectStates /. {opts} /. Options[ParticleSmoother]], - (* then *) - CollectStates[states], - (* else *) - states], - result}, - result = Transpose @ Reverse @ - FoldList[ - SmootherStep[##, fp]&, - Resample[First[collected], n], - Rest[collected] - ]; - If[n == 1, result[[1]], result] - ] - -SmootherStep[x1_, {x0_, w0_}, fp_] := - x0[[ BinarySearch[w0 * fp[#, x0]] ]]& /@ x1 - -SmootherStep[x1_, {x0_, w0_}, fp_] := - RandomChoice[(w0 * fp[#, x0]) -> x0]& /@ x1 - - -CollectStates[states_] := - Transpose[{First[#], Length[#]}& /@ Split[Sort[#]]]& /@ states - -Resample[{x_, w_}] := RandomChoice[w -> x] - -Resample[{x_, w_}, n_] := RandomChoice[w -> x, n] - -End[] -EndPackage[] diff --git a/MathematicaFiles/Applications/PenalizedSmooth.m b/MathematicaFiles/Applications/PenalizedSmooth.m deleted file mode 100755 index cf02319b1a10381f8b6c58c0f83a5ad114df97bf..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/PenalizedSmooth.m +++ /dev/null @@ -1,76 +0,0 @@ -(* penalized smoothing spline *) - -(* Get[myWorkingDrive <> "/mma_applications/FRB/BSplineBasis3.m"] *) - -Needs["FRB`BSplineBasis`"] - -PenalizedSmooth::usage = "PenalizedSmooth[data, ({\[Lambda]0,\[Lambda]1})] returns a -penalized smoothing spline (as an InterpolationFunction). The data must be a -list of {x,y} pairs with no duplicate x values. The cubic spline has a knot -point at each x value; the weight on the penalty function (the integrated -squared second derivative) is determined via generalized cross validation. -The optional second argument specifies two starting values for the -minimization involved. The default values are {\[Lambda]0,\[Lambda]1}={.1,1}." - -PenalizedSmooth[data_] := PenalizedSmooth[data, {.1, 1}] - -PenalizedSmooth[data_, {lam0_, lam1_}] := - Module[{xvals, yvals, mat, pmat, minlam, fitted}, - xvals = data[[All, 1]]; - yvals = data[[All, 2]]; - mat = SplineMatrix[xvals, xvals, 3]; - pmat = PenaltyMatrix[xvals]; - minlam = Block[{lam}, - lam /. FindMinimum[GCV[lam, {mat, pmat}, yvals], {lam, lam0, lam1}][[2]]]; - fitted = Amatrix[minlam, {mat, pmat}] . - yvals; Interpolation[Transpose[{xvals, fitted}], InterpolationOrder -> 3] - ] - -Amatrix[lam_?NumericQ, {mat_, pmat_}] := - mat.Inverse[Transpose[mat].mat + lam * pmat].Transpose[mat] - -GCV[lam_?NumericQ, {mat_, pmat_}, yvals_] := - With[{A = Amatrix[lam, {mat, pmat}]}, - (#.#)&[yvals - A.yvals]/(1 - Tr[A]/Length[yvals])^2 - ] - -SmoothingSpline3D::usage = "SmoothingSpline3D[data, n] returns an \ -InterpolatingFunction that represents a cubic smoothing spline surface \ -given the data, a list of 3D points, and the nonnegative integer n, the \ -number of (internal) knot points. The number of knot points can be given \ -as {nx, ny} or as two explicit lists of points." - -SmoothingSpline3D[data_, n_Integer] := SmoothingSpline3D[data, {n, n}] - -SmoothingSpline3D[data_, {nx_Integer, ny_Integer}] := - Module[{}, - minx = Min[data[[All, 1]]]; - maxx = Max[data[[All, 1]]]; - miny = Min[data[[All, 2]]]; - maxy = Max[data[[All, 2]]]; - xknots = Range[minx, maxx, (maxx-minx)/(nx+1)]; - yknots = Range[miny, maxy, (maxy-miny)/(ny+1)]; - SmoothingSpline3D[data, xknots, yknots] - ] - -SmoothingSpline3D[ - data_?(MatrixQ[#, NumericQ]&), - xknots_?(VectorQ[#, NumericQ]&), - yknots_?(VectorQ[#, NumericQ]&) - ] /; Dimensions[data][[2]] == 3 := - Module[{splines, fun, mat, coeffs, x, y}, - splines = Flatten[Outer[Times, - Through[MakeBSplineBasis[xknots, 3][x]], - Through[MakeBSplineBasis[yknots, 3][y]] - ]]; - fun = Function @@ {{x, y}, splines}; - mat = Chop[fun @@@ data[[All, {1, 2}]]]; - coeffs = Inverse[Transpose[mat].mat].Transpose[mat].data[[All, 3]]; - fun = Function @@ {{x, y}, splines.coeffs}; - FunctionInterpolation[ - fun[x, y], - {x, xknots[[1]], xknots[[-1]]}, - {y, yknots[[1]], yknots[[-1]]}, - InterpolationPoints -> Ceiling[(5/2) (Length[xknots] + Length[yknots])]] - ] - diff --git a/MathematicaFiles/Applications/PlotEnhancements.m b/MathematicaFiles/Applications/PlotEnhancements.m deleted file mode 100755 index 0bf376dbc1dd818b4d16bc35f19d229725787f70..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/PlotEnhancements.m +++ /dev/null @@ -1,23 +0,0 @@ -ListLineDotPlot::usage = "ListLineDotPlot[list] produces a \ -ListLinePlot with lines nears the data points." - -Options[ListLineDotPlot] = { - DotMaskStyle -> {White, PointSize[0.025]}, - DotStyle -> Automatic, - LineStyle -> Automatic - } - -ListLineDotPlot[list_List, opts___OptionQ] := - Module[{maskstyle, linestyle, dotstyle, gropts}, - {maskstyle, linestyle, dotstyle} = - {DotMaskStyle, LineStyle, DotStyle} /. {opts} /. Options[ListLineDotPlot]; - gropts = FilterOptions[Graphics, opts]; - Show[ - ListLinePlot[list, Mesh -> All, MeshStyle -> maskstyle, PlotStyle -> linestyle], - ListPlot[list, Joined -> False, PlotStyle -> dotstyle], - gropts - ] - ] - -GetPlotRange[g_, opts___?OptionQ] := - AbsoluteOptions[Show[g, opts, PlotRange -> All], PlotRange][[1]] diff --git a/MathematicaFiles/Applications/RandomNumberGenerators.nb b/MathematicaFiles/Applications/RandomNumberGenerators.nb deleted file mode 100755 index 482e6400f23948497dc2d0077e132269a3305c53..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/RandomNumberGenerators.nb +++ /dev/null @@ -1,1004 +0,0 @@ -(* Content-type: application/mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 6.0' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 145, 7] -NotebookDataLength[ 38665, 995] -NotebookOptionsPosition[ 35725, 891] -NotebookOutlinePosition[ 36087, 907] -CellTagsIndexPosition[ 36044, 904] -WindowFrame->Normal -ContainsDynamic->False*) - -(* Beginning of Notebook Content *) -Notebook[{ -Cell["Example from tutorial/RandomNumberGeneration", "Text", - CellChangeTimes->{{3.3886625868125*^9, 3.388662605953125*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"Options", "[", "MultiplicativeCongruential", "]"}], " ", "=", " ", - - RowBox[{"{", - RowBox[{ - RowBox[{"\"\<Multiplier\>\"", "\[Rule]", "123456789"}], ",", " ", - RowBox[{"\"\<Modulus\>\"", "\[Rule]", - RowBox[{ - RowBox[{"2", "^", "35"}], "-", "1"}]}]}], "}"}]}], ";"}]], "Input", - CellID->207931436], - -Cell[BoxData[ - RowBox[{ - RowBox[{"MultiplicativeCongruential", " ", "/:", " ", - RowBox[{"Random`InitializeGenerator", "[", - RowBox[{"MultiplicativeCongruential", ",", " ", "opts___"}], "]"}], " ", ":=", - " ", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"mult", ",", " ", "mod", ",", " ", - RowBox[{"flops", " ", "=", " ", - RowBox[{"Flatten", "[", - RowBox[{"{", - RowBox[{"opts", ",", " ", - RowBox[{"Options", "[", "MultiplicativeCongruential", "]"}]}], - "}"}], "]"}]}]}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{ - RowBox[{"mult", " ", "=", " ", - RowBox[{"\"\<Multiplier\>\"", " ", "/.", " ", "flops"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"!", - RowBox[{"(", - RowBox[{ - RowBox[{"IntegerQ", "[", "mult", "]"}], "&&", - RowBox[{"Positive", "[", "mult", "]"}]}], ")"}]}], ",", - "\[IndentingNewLine]", - RowBox[{"Throw", "[", "$Failed", "]"}]}], "\[IndentingNewLine]", - "]"}], ";", "\[IndentingNewLine]", - RowBox[{"mod", " ", "=", " ", - RowBox[{"\"\<Modulus\>\"", " ", "/.", " ", "flops"}]}], ";", - "\[IndentingNewLine]", - RowBox[{"If", "[", - RowBox[{ - RowBox[{"!", - RowBox[{"(", - RowBox[{ - RowBox[{"IntegerQ", "[", "mod", "]"}], "&&", - RowBox[{"Positive", "[", "mult", "]"}]}], ")"}]}], ",", - "\[IndentingNewLine]", - RowBox[{"Throw", "[", "$Failed", "]"}]}], "\[IndentingNewLine]", - "]"}], ";", "\[IndentingNewLine]", - RowBox[{"MultiplicativeCongruential", "[", - RowBox[{"mult", ",", " ", "mod", ",", "1"}], "]"}]}]}], "]"}]}], - ";"}]], "Input", - CellID->15261556], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"MultiplicativeCongruential", "[", "___", "]"}], "[", - "\"\<GeneratesRealsQ\>\"", "]"}], " ", ":=", " ", "True"}], - ";"}]], "Input", - CellID->413732366], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{ - RowBox[{"MultiplicativeCongruential", "[", - RowBox[{"mult_", ",", "mod_", ",", " ", "___"}], "]"}], "[", - RowBox[{"\"\<SeedGenerator\>\"", "[", "seed_", "]"}], "]"}], " ", ":=", - " ", "\[IndentingNewLine]", - RowBox[{"MultiplicativeCongruential", "[", - RowBox[{"mult", ",", "mod", ",", " ", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"(", - RowBox[{"mult", "*", "seed"}], ")"}], ",", "mod"}], "]"}]}], "]"}]}], - ";"}]], "Input", - CellID->7906412], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"MultiplicativeCongruential", "[", - RowBox[{"mult_", ",", "mod_", ",", " ", "s_"}], "]"}], "[", - RowBox[{"\"\<GenerateReals\>\"", "[", - RowBox[{"n_", ",", - RowBox[{"{", - RowBox[{"a_", ",", "b_"}], "}"}], ",", "prec_"}], "]"}], "]"}], " ", ":=", - " ", "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"x", "=", "s"}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"a", "+", - RowBox[{ - RowBox[{"(", - RowBox[{"b", "-", "a"}], ")"}], - RowBox[{ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{ - RowBox[{"x", "=", - RowBox[{"mult", "*", "x"}]}], ";", - RowBox[{"Mod", "[", - RowBox[{"x", ",", "mod"}], "]"}]}], ",", - RowBox[{"{", "n", "}"}]}], "]"}], "/", "mod"}]}]}], ",", - RowBox[{"MultiplicativeCongruential", "[", - RowBox[{"mult", ",", "mod", ",", " ", "x"}], "]"}]}], "}"}]}], - "\[IndentingNewLine]", "]"}]}]], "Input", - CellID->216655639], - -Cell[BoxData[ - RowBox[{"SeedRandom", "[", - RowBox[{"Method", "->", "MultiplicativeCongruential"}], "]"}]], "Input", - CellChangeTimes->{{3.388662637984375*^9, 3.388662708765625*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"RandomReal", "[", "]"}], ",", - RowBox[{"{", - SuperscriptBox["10", "2"], "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.388735209545604*^9, 3.3887352112330394`*^9}, { - 3.3887353042294683`*^9, 3.388735349180867*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`"}], "}"}]], "Output",\ - - CellChangeTimes->{ - 3.3887352114674053`*^9, {3.38873530508881*^9, 3.3887353493058624`*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["BasicRandom", "Section", - CellChangeTimes->{{3.3886627944375*^9, 3.388662801109375*^9}}], - -Cell["\<\ -Basic RNG Stephen K.Park and Keith W.Miller,\"Random Number Generators: Good \ -Ones Are Hard to Find,\" Communications of the ACM,31:10 \ -(October,1988),1192-1201.\ -\>", "Text", - CellChangeTimes->{{3.38866323003125*^9, 3.388663233296875*^9}}], - -Cell[CellGroupData[{ - -Cell["Code for Verion 5.2", "Subsection", - CellChangeTimes->{{3.388665796328125*^9, 3.388665800375*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - SuperscriptBox["2", "31"], "-", "1"}], "==", "2147483647"}]], "Input", - CellChangeTimes->{{3.388663244546875*^9, 3.388663245828125*^9}}], - -Cell[BoxData["True"], "Output", - CellChangeTimes->{3.388663246546875*^9}] -}, Open ]], - -Cell[BoxData[{ - RowBox[{ - RowBox[{ - RowBox[{"BasicRandomSeed", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"Round", "[", - RowBox[{"AbsoluteTime", "[", "]"}], "]"}], ",", "2147483647"}], - "]"}]}], ";"}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"BasicRandomInteger", "[", "]"}], ":=", - RowBox[{"BasicRandomSeed", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"16807", "*", "BasicRandomSeed"}], ",", "2147483647"}], - "]"}]}]}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"BasicRandomInteger", "[", - RowBox[{"n_Integer", "?", "Positive"}], "]"}], ":=", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"BasicRandomInteger", "[", "]"}], ",", - RowBox[{"{", "n", "}"}]}], "]"}]}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"BasicRandomReal", "[", "]"}], ":=", - RowBox[{ - RowBox[{"BasicRandomInteger", "[", "]"}], "/", "2147483647."}]}], - "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"BasicRandomReal", "[", "n_Integer", "]"}], ":=", - RowBox[{ - RowBox[{"BasicRandomInteger", "[", "n", "]"}], "/", - "2147483647."}]}]}], "Input", - Evaluatable->False, - CellChangeTimes->{{3.38866320775*^9, 3.388663217015625*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Setup for Version 6", "Subsection", - CellChangeTimes->{{3.388663631296875*^9, 3.388663632046875*^9}, { - 3.388665783859375*^9, 3.38866579034375*^9}}], - -Cell[BoxData[ - RowBox[{"Clear", "[", "BasicRandom", "]"}]], "Input", - CellChangeTimes->{{3.388663583921875*^9, 3.388663587328125*^9}, { - 3.388665510875*^9, 3.3886655134375*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"BasicRandom", "[", "___", "]"}], "[", "\"\<GeneratesRealsQ\>\"", - "]"}], " ", ":=", " ", "True"}]], "Input", - CellChangeTimes->{{3.3886631375*^9, 3.388663138640625*^9}, - 3.388663175671875*^9, 3.388664005296875*^9, 3.388664360609375*^9, - 3.38866552575*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"BasicRandom", "[", "s_", "]"}], "[", - RowBox[{"\"\<GenerateReals\>\"", "[", - RowBox[{"n_", ",", - RowBox[{"{", - RowBox[{"a_", ",", "b_"}], "}"}], ",", "prec_"}], "]"}], "]"}], " ", ":=", - " ", "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"x", "=", "s"}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"a", "+", - RowBox[{ - RowBox[{"(", - RowBox[{"b", "-", "a"}], ")"}], - RowBox[{"(", - RowBox[{ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"x", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"16807", "*", "x"}], ",", "2147483647"}], "]"}]}], ",", - - RowBox[{"{", "n", "}"}]}], "]"}], "/", "2147483647"}], ")"}]}]}], - ",", - RowBox[{"BasicRandom", "[", "x", "]"}]}], "}"}]}], - "\[IndentingNewLine]", "]"}]}]], "Input", - CellChangeTimes->{{3.388663362234375*^9, 3.388663395734375*^9}, { - 3.3886635138125*^9, 3.388663520625*^9}, {3.38866401546875*^9, - 3.388664018625*^9}, {3.3886641531875*^9, 3.388664155859375*^9}, { - 3.388664201171875*^9, 3.388664201484375*^9}, {3.3886644155*^9, - 3.388664418796875*^9}, {3.3886655335*^9, 3.388665536109375*^9}}], - -Cell[BoxData[ - RowBox[{"BasicRandom", " ", "/:", " ", - RowBox[{"Random`InitializeGenerator", "[", - RowBox[{"BasicRandom", ",", "___"}], "]"}], " ", ":=", " ", - RowBox[{"BasicRandom", "[", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"Round", "[", - RowBox[{"AbsoluteTime", "[", "]"}], "]"}], ",", "2147483647"}], "]"}], - "]"}]}]], "Input", - CellChangeTimes->{{3.388663082375*^9, 3.388663109234375*^9}, { - 3.388663144171875*^9, 3.38866314690625*^9}, {3.388663456953125*^9, - 3.388663471484375*^9}, {3.388663836765625*^9, 3.388663845390625*^9}, { - 3.3886639966875*^9, 3.3886639994375*^9}, {3.388664583109375*^9, - 3.388664583890625*^9}, {3.38866551728125*^9, 3.388665523140625*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"BasicRandom", "[", "___", "]"}], "[", - RowBox[{"\"\<SeedGenerator\>\"", "[", "seed_", "]"}], "]"}], " ", ":=", - " ", "\[IndentingNewLine]", - RowBox[{"BasicRandom", "[", - RowBox[{"Mod", "[", - RowBox[{"seed", ",", "2147483647"}], "]"}], "]"}]}]], "Input", - CellChangeTimes->{ - 3.38866317365625*^9, {3.38866331184375*^9, 3.388663336734375*^9}, { - 3.388663401421875*^9, 3.388663439796875*^9}, {3.3886636635625*^9, - 3.388663669359375*^9}, {3.388664010296875*^9, 3.388664012859375*^9}, { - 3.38866552853125*^9, 3.388665530984375*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Run in Version 6", "Subsection", - CellChangeTimes->{{3.38866881534375*^9, 3.38866881965625*^9}}], - -Cell[BoxData[ - RowBox[{"SeedRandom", "[", - RowBox[{"Method", "\[Rule]", "BasicRandom"}], "]"}]], "Input", - CellChangeTimes->{{3.388735263012301*^9, 3.3887352736368933`*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"RandomReal", "[", "]"}], ",", - RowBox[{"{", "100", "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.3887352750587134`*^9, 3.3887352843396072`*^9}, { - 3.3887353654614916`*^9, 3.3887353698519483`*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8", ",", - "0.03125000000727596`", ",", "7.629394533026357`*^-6", ",", - "1.862645149230957`*^-9", ",", "0.0019531250004547474`", ",", - "4.76837158203125`*^-7", ",", "0.5000000001164153`", ",", - "0.0001220703125284217`", ",", "2.9802322387695312`*^-8"}], - "}"}]], "Output", - CellChangeTimes->{{3.3887352780585985`*^9, 3.38873529102685*^9}, - 3.3887353702894316`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"abstime", "=", - RowBox[{"Round", "[", - RowBox[{"AbsoluteTime", "[", "]"}], "]"}]}]], "Input", - CellChangeTimes->{{3.3886656094375*^9, 3.388665636*^9}}], - -Cell[BoxData["3388651236"], "Output", - CellChangeTimes->{{3.388665617046875*^9, 3.388665636421875*^9}}] -}, Open ]], - -Cell[BoxData[ - RowBox[{"SeedRandom", "[", - RowBox[{"abstime", ",", - RowBox[{"Method", "\[Rule]", "BasicRandom"}]}], "]"}]], "Input", - CellChangeTimes->{{3.388663485015625*^9, 3.38866349353125*^9}, - 3.38866402109375*^9, {3.3886644980625*^9, 3.388664501171875*^9}, { - 3.388664613625*^9, 3.38866461390625*^9}, {3.3886648165*^9, - 3.388664828046875*^9}, {3.388665548640625*^9, 3.388665549859375*^9}, { - 3.388665601296875*^9, 3.388665601546875*^9}, {3.388665639078125*^9, - 3.388665642*^9}}], - -Cell[BoxData[ - RowBox[{"SeedRandom", "[", - RowBox[{"Method", "\[Rule]", "\"\<MersenneTwister\>\""}], "]"}]], "Input", - CellChangeTimes->{{3.388665422265625*^9, 3.388665433234375*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"RandomReal", "[", "1", "]"}]], "Input", - CellChangeTimes->{{3.388664801984375*^9, 3.38866484571875*^9}, { - 3.388664970953125*^9, 3.388665010828125*^9}, 3.388665484484375*^9}], - -Cell[BoxData["0.8358643450009936`"], "Output", - CellChangeTimes->{{3.38866480390625*^9, 3.388664848875*^9}, { - 3.38866498315625*^9, 3.388665013421875*^9}, {3.388665435109375*^9, - 3.388665439328125*^9}, {3.388665477984375*^9, 3.38866548603125*^9}, - 3.388665552765625*^9, {3.388665589484375*^9, 3.3886656075625*^9}, - 3.388665644171875*^9, 3.388665922015625*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"RandomReal", "[", - RowBox[{ - RowBox[{"NormalDistribution", "[", "]"}], ",", - SuperscriptBox["10", "5"]}], "]"}], ";"}], "//", "Timing"}]], "Input", - CellChangeTimes->{{3.388664889890625*^9, 3.388664941921875*^9}, { - 3.38866544403125*^9, 3.38866544859375*^9}, {3.388665561828125*^9, - 3.388665565765625*^9}, {3.38866566871875*^9, 3.38866567646875*^9}, { - 3.388665924375*^9, 3.388665927625*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"0.6559999999999997`", ",", "Null"}], "}"}]], "Output", - CellChangeTimes->{3.388665928578125*^9}] -}, Open ]] -}, Open ]] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Jerry Dwyer's portable RNG", "Section", - CellChangeTimes->{{3.38866575984375*^9, 3.388665763890625*^9}, { - 3.388665939515625*^9, 3.388665949359375*^9}}], - -Cell[CellGroupData[{ - -Cell["Code for Version 5.2", "Subsection", - CellChangeTimes->{{3.388665808265625*^9, 3.388665811953125*^9}}], - -Cell[BoxData[{ - RowBox[{ - RowBox[{ - RowBox[{"SeedPortableRNG", "[", "n_Integer", "]"}], ":=", - RowBox[{"(", - RowBox[{ - RowBox[{"$randomY", "=", "n"}], ";", "\[IndentingNewLine]", - RowBox[{"$randomZ", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"64155", "*", "$randomY"}], ",", "214783629"}], "]"}]}], - ";"}], ")"}]}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"SeedPortableRNG", "[", "]"}], ":=", - RowBox[{"SeedPortableRNG", "[", - RowBox[{"Random", "[", - RowBox[{"Integer", ",", - RowBox[{"{", - RowBox[{"1", ",", "214783629"}], "}"}]}], "]"}], "]"}]}], - "\[IndentingNewLine]", "\[IndentingNewLine]", - RowBox[{"(*", "initialize", "*)"}]}], "\n", - RowBox[{ - RowBox[{"SeedPortableRNG", "[", "]"}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"PortableRNGInteger", "[", "]"}], ":=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{ - RowBox[{"(", - RowBox[{"$randomY", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"64155", "*", "$randomY"}], ",", "214783629"}], "]"}]}], - ")"}], "-", - RowBox[{"(", - RowBox[{"$randomZ", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"10064", "*", "$randomZ"}], ",", "2147483543"}], "]"}]}], - ")"}]}], ",", "214783629"}], "]"}]}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"PortableRNGInteger", "[", - RowBox[{"n_Integer", "?", "Positive"}], "]"}], ":=", - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"PortableRNGInteger", "[", "]"}], ",", - RowBox[{"{", "n", "}"}]}], "]"}]}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{ - RowBox[{"PortableRNG", "[", "]"}], ":=", - RowBox[{ - RowBox[{"(", - RowBox[{ - RowBox[{"PortableRNGInteger", "[", "]"}], "-", "1."}], ")"}], "/", - "214783629"}]}], "\n"}], "\[IndentingNewLine]", - RowBox[{ - RowBox[{"PortableRNG", "[", - RowBox[{"n_Integer", "?", "Positive"}], "]"}], ":=", - RowBox[{ - RowBox[{"(", - RowBox[{ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"PortableRNGInteger", "[", "]"}], ",", - RowBox[{"{", "n", "}"}]}], "]"}], "-", "1."}], ")"}], "/", - "214783629"}]}], "\n"}], "Input", - Evaluatable->False, - CellChangeTimes->{3.388665952796875*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Setup for Version 6", "Subsection", - CellChangeTimes->{{3.388665821359375*^9, 3.388665825203125*^9}}], - -Cell[BoxData[ - RowBox[{"Clear", "[", "PortableRandom", "]"}]], "Input", - CellChangeTimes->{{3.388663583921875*^9, 3.388663587328125*^9}, { - 3.388665510875*^9, 3.3886655134375*^9}, {3.388667134453125*^9, - 3.38866713890625*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"PortableRandom", "[", "___", "]"}], "[", - "\"\<GeneratesRealsQ\>\"", "]"}], " ", ":=", " ", "True"}]], "Input", - CellChangeTimes->{{3.3886631375*^9, 3.388663138640625*^9}, - 3.388663175671875*^9, 3.388664005296875*^9, 3.388664360609375*^9, - 3.38866552575*^9, 3.3886671536875*^9}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"PortableRandom", "[", - RowBox[{"s1_", ",", "s2_"}], "]"}], "[", - RowBox[{"\"\<GenerateReals\>\"", "[", - RowBox[{"n_", ",", - RowBox[{"{", - RowBox[{"a_", ",", "b_"}], "}"}], ",", "prec_"}], "]"}], "]"}], " ", ":=", - " ", "\[IndentingNewLine]", - RowBox[{"Module", "[", - RowBox[{ - RowBox[{"{", - RowBox[{ - RowBox[{"x1", "=", "s1"}], ",", - RowBox[{"x2", "=", "s2"}]}], "}"}], ",", "\[IndentingNewLine]", - RowBox[{"{", - RowBox[{ - RowBox[{"a", "+", - RowBox[{ - RowBox[{"(", - RowBox[{"b", "-", "a"}], ")"}], - RowBox[{"(", - RowBox[{ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{ - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{ - RowBox[{"(", - RowBox[{"x1", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"64155", "*", "x1"}], ",", "214783629"}], "]"}]}], - ")"}], "-", - RowBox[{"(", - RowBox[{"x2", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"10064", "*", "x2"}], ",", "2147483543"}], - "]"}]}], ")"}]}], ",", "214783629"}], "]"}], "-", "1"}], - ",", - RowBox[{"{", "n", "}"}]}], "]"}], "/", "214783629"}], ")"}]}]}], - ",", - RowBox[{"PortableRandom", "[", - RowBox[{"x1", ",", "x2"}], "]"}]}], "}"}]}], "\[IndentingNewLine]", - "]"}]}]], "Input", - CellChangeTimes->{{3.388663362234375*^9, 3.388663395734375*^9}, { - 3.3886635138125*^9, 3.388663520625*^9}, {3.38866401546875*^9, - 3.388664018625*^9}, {3.3886641531875*^9, 3.388664155859375*^9}, { - 3.388664201171875*^9, 3.388664201484375*^9}, {3.3886644155*^9, - 3.388664418796875*^9}, {3.3886655335*^9, 3.388665536109375*^9}, { - 3.388667162*^9, 3.388667164109375*^9}, {3.38866721584375*^9, - 3.388667235265625*^9}, {3.3886673793125*^9, 3.388667388953125*^9}, { - 3.3886682429375*^9, 3.388668246296875*^9}, {3.388668304109375*^9, - 3.38866831221875*^9}}], - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"PortableRandom", "[", "___", "]"}], "[", - RowBox[{"\"\<SeedGenerator\>\"", "[", "seed_", "]"}], "]"}], " ", ":=", - " ", "\[IndentingNewLine]", - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"x", "=", - RowBox[{"Mod", "[", - RowBox[{"seed", ",", "214783629"}], "]"}]}], "}"}], ",", - RowBox[{"PortableRandom", "[", - RowBox[{"x", ",", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"64155", "*", "x"}], ",", "214783629"}], "]"}]}], "]"}]}], - "]"}]}]], "Input", - CellChangeTimes->{ - 3.38866317365625*^9, {3.38866331184375*^9, 3.388663336734375*^9}, { - 3.388663401421875*^9, 3.388663439796875*^9}, {3.3886636635625*^9, - 3.388663669359375*^9}, {3.388664010296875*^9, 3.388664012859375*^9}, { - 3.38866552853125*^9, 3.388665530984375*^9}, {3.388667156734375*^9, - 3.38866715903125*^9}, {3.38866759378125*^9, 3.38866764028125*^9}}], - -Cell[BoxData[ - RowBox[{"PortableRandom", " ", "/:", " ", - RowBox[{"Random`InitializeGenerator", "[", - RowBox[{"PortableRandom", ",", "___"}], "]"}], " ", ":=", " ", - RowBox[{"With", "[", - RowBox[{ - RowBox[{"{", - RowBox[{"x", "=", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"Round", "[", - RowBox[{"AbsoluteTime", "[", "]"}], "]"}], ",", "214783629"}], - "]"}]}], "}"}], ",", - RowBox[{"PortableRandom", "[", - RowBox[{"x", ",", - RowBox[{"Mod", "[", - RowBox[{ - RowBox[{"64155", "*", "x"}], ",", "214783629"}], "]"}]}], "]"}]}], - "]"}]}]], "Input", - CellChangeTimes->{{3.388663082375*^9, 3.388663109234375*^9}, { - 3.388663144171875*^9, 3.38866314690625*^9}, {3.388663456953125*^9, - 3.388663471484375*^9}, {3.388663836765625*^9, 3.388663845390625*^9}, { - 3.3886639966875*^9, 3.3886639994375*^9}, {3.388664583109375*^9, - 3.388664583890625*^9}, {3.38866551728125*^9, 3.388665523140625*^9}, { - 3.388667144515625*^9, 3.38866715075*^9}, {3.38866766728125*^9, - 3.388667702234375*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell["Run in Version 6", "Subsection", - CellChangeTimes->{{3.388668828125*^9, 3.388668832015625*^9}}], - -Cell[BoxData[ - RowBox[{"SeedRandom", "[", - RowBox[{"Method", "\[Rule]", "PortableRandom"}], "]"}]], "Input", - CellChangeTimes->{{3.388667721171875*^9, 3.38866773025*^9}, { - 3.38866798259375*^9, 3.388667982859375*^9}, {3.3887355270057297`*^9, - 3.388735532786906*^9}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Table", "[", - RowBox[{ - RowBox[{"RandomReal", "[", "]"}], ",", - RowBox[{"{", "100", "}"}]}], "]"}]], "Input", - CellChangeTimes->{{3.3886679846875*^9, 3.388668042453125*^9}, { - 3.3887355125059156`*^9, 3.38873551528713*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{ - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", "0.`", ",", - "0.`", ",", "0.`", ",", "0.`", ",", "0.`"}], "}"}]], "Output", - CellChangeTimes->{{3.388667987359375*^9, 3.388668042765625*^9}, { - 3.388735504881013*^9, 3.3887355350837517`*^9}}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{ - RowBox[{ - RowBox[{"RandomReal", "[", - RowBox[{"1", ",", - SuperscriptBox["10", "5"]}], "]"}], ";"}], "//", "Timing"}]], "Input", - CellChangeTimes->{{3.38866773296875*^9, 3.388667761375*^9}}], - -Cell[BoxData[ - RowBox[{"{", - RowBox[{"0.875`", ",", "Null"}], "}"}]], "Output", - CellChangeTimes->{{3.3886677343125*^9, 3.388667762640625*^9}, - 3.3887355391930737`*^9}] -}, Open ]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - RowBox[{"Histogram", "[", - RowBox[{ - RowBox[{"RandomReal", "[", - RowBox[{"1", ",", - SuperscriptBox["10", "5"]}], "]"}], ",", - RowBox[{"{", - RowBox[{".01", ",", "0"}], "}"}], ",", - RowBox[{"GridLines", "\[Rule]", - RowBox[{"{", - RowBox[{ - RowBox[{"{", "}"}], ",", - RowBox[{"{", - RowBox[{"0", ",", "1"}], "}"}]}], "}"}]}]}], "]"}]], "Input", - CellChangeTimes->{{3.388667768734375*^9, 3.388667781125*^9}, { - 3.388735571614534*^9, 3.3887355880986977`*^9}}], - -Cell[BoxData[ - GraphicsBox[{ - LineBox[{{0., 0}, {0., 1.022}, {0.01, 1.022}, {0.01, 0.967}, {0.02, - 0.967}, {0.02, 0.98}, {0.03, 0.98}, {0.03, 1.028}, {0.04, 1.028}, {0.04, - 0.974}, {0.05, 0.974}, {0.05, 0.9480000000000001}, {0.06, - 0.9480000000000001}, {0.06, 0.962}, {0.07, 0.962}, {0.07, 1.041}, {0.08, - 1.041}, {0.08, 1.026}, {0.09, 1.026}, {0.09, 0.996}, {0.1, 0.996}, {0.1, - 0.96}, {0.11, 0.96}, {0.11, 1.029}, {0.12, 1.029}, {0.12, 0.969}, {0.13, - 0.969}, {0.13, 0.994}, {0.14, 0.994}, {0.14, 0.985}, {0.15, 0.985}, { - 0.15, 1.01}, {0.16, 1.01}, {0.16, 1.0210000000000001`}, {0.17, - 1.0210000000000001`}, {0.17, 0.9410000000000001}, {0.18, - 0.9410000000000001}, {0.18, 1.031}, {0.19, 1.031}, {0.19, 1.052}, {0.2, - 1.052}, {0.2, 1.02}, {0.21, 1.02}, {0.21, 1.032}, {0.22, 1.032}, {0.22, - 0.962}, {0.23, 0.962}, {0.23, 1.049}, {0.24, 1.049}, {0.24, - 1.0090000000000001`}, {0.25, 1.0090000000000001`}, {0.25, 0.991}, {0.26, - 0.991}, {0.26, 1.0190000000000001`}, {0.27, 1.0190000000000001`}, {0.27, - 0.996}, {0.28, 0.996}, {0.28, 1.0090000000000001`}, {0.29, - 1.0090000000000001`}, {0.29, 0.994}, {0.3, 0.994}, {0.3, 1.026}, {0.31, - 1.026}, {0.31, 0.999}, {0.32, 0.999}, {0.32, 1.0190000000000001`}, {0.33, - 1.0190000000000001`}, {0.33, 0.971}, {0.34, 0.971}, {0.34, 1.028}, { - 0.35000000000000003`, 1.028}, {0.35000000000000003`, 0.99}, {0.36, - 0.99}, {0.36, 1.045}, {0.37, 1.045}, {0.37, 1.035}, {0.38, 1.035}, {0.38, - 1.}, {0.39, 1.}, {0.39, 0.992}, {0.4, 0.992}, {0.4, 1.068}, { - 0.41000000000000003`, 1.068}, {0.41000000000000003`, 0.978}, {0.42, - 0.978}, {0.42, 0.987}, {0.43, 0.987}, {0.43, 1.038}, {0.44, 1.038}, { - 0.44, 0.9500000000000001}, {0.45, 0.9500000000000001}, {0.45, 1.075}, { - 0.46, 1.075}, {0.46, 1.048}, {0.47000000000000003`, 1.048}, { - 0.47000000000000003`, 0.979}, {0.48, 0.979}, {0.48, - 0.9420000000000001}, {0.49, 0.9420000000000001}, {0.49, 0.976}, {0.5, - 0.976}, {0.5, 0.973}, {0.51, 0.973}, {0.51, 0.987}, {0.52, 0.987}, {0.52, - 0.99}, {0.53, 0.99}, {0.53, 0.9510000000000001}, {0.54, - 0.9510000000000001}, {0.54, 1.0210000000000001`}, {0.55, - 1.0210000000000001`}, {0.55, 0.989}, {0.56, 0.989}, {0.56, - 1.0130000000000001`}, {0.5700000000000001, 1.0130000000000001`}, { - 0.5700000000000001, 0.983}, {0.58, 0.983}, {0.58, 1.0130000000000001`}, { - 0.59, 1.0130000000000001`}, {0.59, 0.9520000000000001}, {0.6, - 0.9520000000000001}, {0.6, 0.9540000000000001}, {0.61, - 0.9540000000000001}, {0.61, 1.0230000000000001`}, {0.62, - 1.0230000000000001`}, {0.62, 1.039}, {0.63, 1.039}, {0.63, - 0.9560000000000001}, {0.64, 0.9560000000000001}, {0.64, 1.01}, {0.65, - 1.01}, {0.65, 1.0090000000000001`}, {0.66, 1.0090000000000001`}, {0.66, - 0.988}, {0.67, 0.988}, {0.67, 1.0070000000000001`}, {0.68, - 1.0070000000000001`}, {0.68, 0.972}, {0.6900000000000001, 0.972}, { - 0.6900000000000001, 0.9520000000000001}, {0.7000000000000001, - 0.9520000000000001}, {0.7000000000000001, 1.09}, {0.71, 1.09}, {0.71, - 1.016}, {0.72, 1.016}, {0.72, 0.987}, {0.73, 0.987}, {0.73, 1.014}, { - 0.74, 1.014}, {0.74, 0.961}, {0.75, 0.961}, {0.75, 1.014}, {0.76, - 1.014}, {0.76, 1.022}, {0.77, 1.022}, {0.77, 1.0070000000000001`}, {0.78, - 1.0070000000000001`}, {0.78, 0.968}, {0.79, 0.968}, {0.79, - 1.0010000000000001`}, {0.8, 1.0010000000000001`}, {0.8, 1.002}, {0.81, - 1.002}, {0.81, 0.992}, {0.8200000000000001, 0.992}, {0.8200000000000001, - 0.9380000000000001}, {0.8300000000000001, 0.9380000000000001}, { - 0.8300000000000001, 0.983}, {0.84, 0.983}, {0.84, 0.9540000000000001}, { - 0.85, 0.9540000000000001}, {0.85, 1.03}, {0.86, 1.03}, {0.86, 1.004}, { - 0.87, 1.004}, {0.87, 0.9400000000000001}, {0.88, 0.9400000000000001}, { - 0.88, 1.0150000000000001`}, {0.89, 1.0150000000000001`}, {0.89, 1.033}, { - 0.9, 1.033}, {0.9, 0.99}, {0.91, 0.99}, {0.91, 0.97}, {0.92, 0.97}, { - 0.92, 1.}, {0.93, 1.}, {0.93, 1.002}, {0.9400000000000001, 1.002}, { - 0.9400000000000001, 1.0130000000000001`}, {0.9500000000000001, - 1.0130000000000001`}, {0.9500000000000001, 0.976}, {0.96, 0.976}, {0.96, - 0.989}, {0.97, 0.989}, {0.97, 1.028}, {0.98, 1.028}, {0.98, 1.051}, { - 0.99, 1.051}, {0.99, 1.065}, {1., 1.065}, {1., 0}}], {}, {}}, - AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], - DisplayFunction->Identity, - Frame->{True, True, False, False}, - GridLines->{{}, {0, 1}}]], "Output", - CellChangeTimes->{ - 3.388667782625*^9, 3.388668377640625*^9, 3.3887355428024025`*^9, { - 3.388735579270686*^9, 3.388735607067205*^9}}] -}, Open ]] -}, Open ]] -}, Open ]] -}, -WindowSize->{1044, 881}, -WindowMargins->{{0, Automatic}, {Automatic, 0}}, -ShowSelection->True, -FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (March 26, 2007)", -StyleDefinitions->"Default.nb" -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{} -*) -(*CellTagsIndex -CellTagsIndex->{} -*) -(*NotebookFileOutline -Notebook[{ -Cell[568, 21, 124, 1, 34, "Text"], -Cell[695, 24, 374, 11, 49, "Input", - CellID->207931436], -Cell[1072, 37, 1813, 46, 269, "Input", - CellID->15261556], -Cell[2888, 85, 217, 7, 49, "Input", - CellID->413732366], -Cell[3108, 94, 538, 15, 71, "Input", - CellID->7906412], -Cell[3649, 111, 1114, 32, 115, "Input", - CellID->216655639], -Cell[4766, 145, 183, 3, 49, "Input"], -Cell[CellGroupData[{ -Cell[4974, 152, 284, 7, 51, "Input"], -Cell[5261, 161, 3386, 55, 317, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[8684, 221, 94, 1, 88, "Section"], -Cell[8781, 224, 252, 5, 55, "Text"], -Cell[CellGroupData[{ -Cell[9058, 233, 104, 1, 46, "Subsection"], -Cell[CellGroupData[{ -Cell[9187, 238, 174, 4, 33, "Input"], -Cell[9364, 244, 73, 1, 32, "Output"] -}, Open ]], -Cell[9452, 248, 1255, 37, 208, "Input", - Evaluatable->False] -}, Open ]], -Cell[CellGroupData[{ -Cell[10744, 290, 155, 2, 46, "Subsection"], -Cell[10902, 294, 178, 3, 49, "Input"], -Cell[11083, 299, 311, 7, 49, "Input"], -Cell[11397, 308, 1342, 36, 115, "Input"], -Cell[12742, 346, 705, 14, 71, "Input"], -Cell[13450, 362, 596, 13, 71, "Input"] -}, Open ]], -Cell[CellGroupData[{ -Cell[14083, 380, 102, 1, 46, "Subsection"], -Cell[14188, 383, 175, 3, 49, "Input"], -Cell[CellGroupData[{ -Cell[14388, 390, 263, 6, 49, "Input"], -Cell[14654, 398, 3387, 55, 317, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[18078, 458, 180, 4, 32, "Input"], -Cell[18261, 464, 103, 1, 32, "Output"] -}, Open ]], -Cell[18379, 468, 502, 9, 32, "Input"], -Cell[18884, 479, 185, 3, 32, "Input"], -Cell[CellGroupData[{ -Cell[19094, 486, 200, 3, 32, "Input"], -Cell[19297, 491, 370, 5, 32, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[19704, 501, 456, 10, 34, "Input"], -Cell[20163, 513, 136, 3, 32, "Output"] -}, Open ]] -}, Open ]] -}, Open ]], -Cell[CellGroupData[{ -Cell[20360, 523, 159, 2, 88, "Section"], -Cell[CellGroupData[{ -Cell[20544, 529, 108, 1, 46, "Subsection"], -Cell[20655, 532, 2321, 70, 406, "Input", - Evaluatable->False] -}, Open ]], -Cell[CellGroupData[{ -Cell[23013, 607, 107, 1, 46, "Subsection"], -Cell[23123, 610, 229, 4, 49, "Input"], -Cell[23355, 616, 334, 7, 49, "Input"], -Cell[23692, 625, 2159, 56, 181, "Input"], -Cell[25854, 683, 941, 23, 71, "Input"], -Cell[26798, 708, 1063, 25, 71, "Input"] -}, Open ]], -Cell[CellGroupData[{ -Cell[27898, 738, 101, 1, 46, "Subsection"], -Cell[28002, 741, 271, 5, 49, "Input"], -Cell[CellGroupData[{ -Cell[28298, 750, 254, 6, 49, "Input"], -Cell[28555, 758, 1437, 21, 115, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[30029, 784, 226, 6, 51, "Input"], -Cell[30258, 792, 173, 4, 49, "Output"] -}, Open ]], -Cell[CellGroupData[{ -Cell[30468, 801, 517, 15, 51, "Input"], -Cell[30988, 818, 4697, 68, 318, "Output"] -}, Open ]] -}, Open ]] -}, Open ]] -} -] -*) - -(* End of internal cache information *) diff --git a/MathematicaFiles/Applications/RecursivePreferencesPDE.m b/MathematicaFiles/Applications/RecursivePreferencesPDE.m deleted file mode 100755 index 9241e48d66daddb40727eeeaa7910f68e1309071..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/RecursivePreferencesPDE.m +++ /dev/null @@ -1,169 +0,0 @@ -(* :Title: RecursivePreferencesPDE *) -(* :Author: Mark Fisher *) -(* :Date: July 2006 *) - -(* :Summary: - Setup and solve PDEs associated with homogeneous recursive preferences. - *) - -Needs["ItosLemma`"] -Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"] -Needs["Utilities`FilterOptions`"] -(* Needs["Graphics`Graphics`"] *) - -(* Turn off inapplicable message *) -Off[NDSolve::bcart] - -(* Global variables used *) -Clear[a, u, \[Beta], \[Eta], \[Gamma]] - -u[1 | 1.][x_] := Log[x] -u[\[Eta]_?NumericQ][x_] := (-1 + x^(1 - \[Eta]^(-1)))/(1 - \[Eta]^(-1)) - -ConsumptionRules = {Subscript[a, 0] -> 0, Subscript[a, 1] -> 1, - Subscript[a, 2] -> 1 - \[Gamma]}; -CapitalAccountRules = {Subscript[a, 0] -> -\[Beta] * \[Eta], - Subscript[a, 1] -> \[Eta], Subscript[a, 2] -> (1 - \[Gamma])/\[Eta]}; -DeflatorAssetRules = {Subscript[a, 0] -> -\[Beta] * \[Eta], - Subscript[a, 1] -> \[Eta], Subscript[a, 2] -> (1 - \[Gamma])/(\[Eta] \[Gamma])}; - -AssemblePDE::usage = "AssemblePDE[drifts, diffusions, termcond, f, Xnames, \ -t] returns the PDE for the \"information variable\" given the dynamics for \ -(the log of) the \"forcing variable\" (either the rate of consumption, the \ -capital accont, or the deflator asset). The user provides the vector of \ -drifts and the matrix of diffusions, where the first element of each is \ -that of the forcing variable and the rest of each are those of the state \ -variables. In addition, a terminal condition (termcond) must be specified \ -and symbols for the unknown function f, the names of the state variables, \ -and time symbol must be provided. AssemblePDE takes the option \ -ForcingVariable; valid settings are Consumption, CapitalAccount, or \ -DeflatorAsset. Any other setting produces generic coefficients." - -SolvePDE::usage = "SolvePDE[{pde, termcond}, f, Xranges, {t, Tstep}, opts] \ -returns a numerical solution to the PDE (given the terminal condition \ -termcond) computed iteratively backward by Tstep until the time derivative \ -is effectively zero. (Note Xranges is a sequence of ranges for the state \ -variables.) SolvePDE takes the options TimeDerivativeTolerance, \ -MaxIterations, and SteadyStateSolutionOnly. In addition, appropriate \ -options will be passed to NDSolve`MethodOfLines and \ -NDSolve`MetheOfLines`TensorProductGrid. As a side-effect, SolvePDE produces \ -an NDSolve`StateData object named $PDEState." - -$PDEState::usage = "$PDEState gives the most recent NDSolve`StateData \ -object computed by NDSolve`Iterate via SolvePDE." - -TimeDerivativeTolerance::usage = "TimeDerivativeTolerance is an option for \ -SolvePDE which specifies the tolerance to use in determining when the time \ -derivative is effectively zero (i.e., when the steady-state solution is \ -reached). The specified tolerance is comparted with \ -Norm[$PDEState@\"SolutionDerivativeVector\"[\"Backward\"], \[Infinity]]. \ -The default setting is TimeDerivativeTolerance -> 10^(-12)." - -SteadyStateSolutionOnly::usage = "SteadyStateSolutionOnly is an option for \ -SolvePDE which specifies whether to return the steady-state solution only. \ -The default setting is SteadyStateSolutionOnly -> True." - -ConsumptionRules::usage = "ConsumptionRules is a list of replacement rules \ -intended to be used with the output of AssemblePDE." - -CapitalAccountRules::usage = "CapitalAccountRules is a list of replacement \ -rules intended to be used with the output of AssemblePDE." - -DeflatorAssetRules::usage = "DeflatorAssetRules is a list of replacement \ -rules intended to be used with the output of AssemblePDE." - -PlotTimeDerivative::usage = "PlotTimeDerivative[NDSolve`StateData] produces \ -a LogPlot of the \!\(L\^\[Infinity]\) norm of the time derivative." - -ForcingVariable::usage = "ForcingVariable is an option for AssemblePDE that \ -specifies the intended parameterization. Valid settings are Consumption, \ -CapitalAccount, or DeflatorAsset." - -Consumption::usage = "Consumption is a setting for the ForcingVariable \ -option for AssemblePDE." - -CapitalAccount::usage = "CapitalAccount is a setting for the \ -ForcingVariable option for AssemblePDE." - -DeflatorAsset::usage = "DeflatorAsset is a setting for the ForcingVariable \ -option for AssemblePDE." - -Options[AssemblePDE] = {ForcingVariable -> Consumption} - -AssemblePDE[drifts_List, diffusions:{__List}, terminal_, f_, - Xnames:{__Symbol}, t_Symbol, opts___?OptionQ] := - Module[{Xt, nbrownians, dxi, xidrift, xidiffusion}, - Xt = Through[Xnames[t]]; - nbrownians = Dimensions[diffusions][[-1]]; - MapThread[ItoMake, {Xt, Rest[drifts], Rest[diffusions]}]; - dxi = ItoD[f @@ Append[Xt, t], SuppressTime -> False] /. Thread[Xt -> Xnames]; - xidrift = Drift[dxi]; - xidiffusion = Diffusion[dxi, - Scalarize -> False, - BrownianList -> Table[Subscript[dB, i], {i, Max[1, nbrownians]}]]; - {Subscript[a, 0] + xidrift + Subscript[a, 1] * First[drifts] + - Subscript[a, 2]/2 * (#.#) &[Subscript[a, 1] * First[diffusions] + xidiffusion] + - \[Beta] * u[\[Eta]][Exp[-f @@ Append[Xnames, t]]] == 0, - f @@ Append[Xnames, 0] == terminal} /. - (* Substitute out generic parameters given the forcing variable *) - Switch[ForcingVariable /. {opts} /. Options[AssemblePDE], - Consumption, ConsumptionRules, - CapitalAccount, CapitalAccountRules, - DeflatorAsset, DeflatorAssetRules, - _, {} (* use no rules *) - ] - ] - -Options[SolvePDE] = { - MaxIterations -> 100, - TimeDerivativeTolerance -> 10^(-12.), - SteadyStateSolutionOnly -> True - } - -SolvePDE::noconv = - "Warning: the time derivative did not converge by time = `1` (`2` iterations)." - -SolvePDE[eqns_List, f_Symbol, Xranges:{_Symbol, _?NumericQ, _?NumericQ}.., - {t_Symbol, Tstep_?NumericQ}, opts___?OptionQ] := - Module[{methodopts, gridopts, maxiters, tol, steady, count}, - methodopts = FilterOptions[NDSolve`MethodOfLines, opts]; - gridopts = FilterOptions[NDSolve`MethodOfLines`TensorProductGrid, opts]; - maxiters = MaxIterations /. {opts} /. Options[SolvePDE]; - tol = TimeDerivativeTolerance /. {opts} /. Options[SolvePDE]; - steady = TrueQ[SteadyStateSolutionOnly /. {opts} /. Options[SolvePDE]]; - count = 0; - (* Initialize *) - $PDEState = NDSolve`ProcessEquations[eqns, f, Xranges, t, - Method -> { - "MethodOfLines", methodopts, - "SpatialDiscretization" -> {"TensorProductGrid", gridopts} - } - ][[1]]; - (* Solve PDE backwards by Tstep until time derivative is less than the - tolerance. *) - While[Norm[$PDEState@"SolutionDerivativeVector"["Backward"], Infinity] > tol - && (count++) < maxiters, - NDSolve`Iterate[$PDEState, $PDEState@"CurrentTime"["Backward"] - Tstep]]; - If[count > maxiters > 1, Message[SolvePDE::noconv, -maxiters * Tstep, maxiters]]; - If[steady, - (* Steady-state solution *) - NDSolve`ProcessSolutions[$PDEState, "Backward"][[1, 2, 0]], - (* Entire solution *) - NDSolve`ProcessSolutions[$PDEState][[1, 2]] - ] - ] - -PlotTimeDerivative[state_NDSolve`StateData, opts___?OptionQ] := - Module[{baseline, plotopts, ifun0, n, ifun, normfun, t}, - baseline = TimeDerivativeTolerance /. {opts} /. Options[SolvePDE]; - plotopts = FilterOptions[LogPlot, opts]; - ifun0 = NDSolve`ProcessSolutions[state][[1, 2]]; - n = Length[InterpolatingFunctionDomain[ifun0]] - 1; - ifun = Operate[Derivative @@ # &, Append[Table[0, {n}], 1][ifun0]]; - normfun = Norm[ - ifun[##, t] & @@@ Transpose[Most[InterpolatingFunctionCoordinates[ifun]]], - Infinity]; - LogPlot[normfun, {t, state@"CurrentTime"["Backward"], 0}, opts, - PlotRange -> All, GridLines -> {{}, {baseline}}] - ] - diff --git a/MathematicaFiles/Applications/Remaining/TempFiles/Thumbs.db b/MathematicaFiles/Applications/Remaining/TempFiles/Thumbs.db deleted file mode 100755 index cf047f1c01370d9fdd3ad77849a9f011172c97b7..0000000000000000000000000000000000000000 Binary files a/MathematicaFiles/Applications/Remaining/TempFiles/Thumbs.db and /dev/null differ diff --git a/MathematicaFiles/Applications/ReversibleJumpMetropolis.m b/MathematicaFiles/Applications/ReversibleJumpMetropolis.m deleted file mode 100755 index 0b2dd1d943ced654beb72eea49f286e8cab41181..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/ReversibleJumpMetropolis.m +++ /dev/null @@ -1,311 +0,0 @@ -(* :Author: Mark Fisher *) -(* :Date: April 2006 *) -(* :References: Mark Fisher (2006) "Bayesian estimation of probabilities - of target rates using fed funds futures options", Working Paper. *) - -(* :Discussion: - Create y and X via AssembleFedFundsData in fedfunds.m. - Use MaxEntSimplexInvertMean to compute lambda for prior. - Use MakePriorMatrix to compute the prior matrix. - - To allow for unequal prior model probabilities, multiply - the prior matrix by the prior model probabilities. -*) - -(* :Notes: - Compiling NestList with the function in it is much faster than - compiling the function and running it within an uncompiled NestList. -*) - -Get["MaxEntSimplexDistribution`"] - -ReversibleJumpMetropolis::usage = "ReversibleJumpMetropolis[state, data, -prior, parms, {n, n0}] returns n draws from the posterior after discarding -the first n0 draws. The last argument can be given as n, in which case no -draws are discarded, or omitted entirely in which case a single draw -returned. The other arguments have the following structure: state = {{i, -j}, value, beta}, data = {y, X}, prior = {lambda, matrix}, and parms = {p, -s}. In particular, in the state argument, the pair {i, j} indexes the -current model with coefficient k-vector beta and its value. The beta vector -must have nonzero values in positions i through j and 0 elsewhere. The data -argument is composed of the dependent variable vector y and the matrix of -independent variables X. The prior argument is composed of the k-vector -lambda that characterizes the maximum entropy prior and a (k\[Times]k) -upper-triangular matrix of the inverse of the PartitionFunction values. -(Use MakePriorMatrix to construct it. To allow for unequal prior model -probabilities, multiply the prior matrix by the prior model probabilities.) -The parms argument is composed of the probability p of staying within the -current model and the standard deviation s of the Gaussian proposal -distribution for within model Metropolis-Hastings draws." - -MakePriorMatrix::usage = "MakePriorMatrix[lambda] returns an upper- -triangular matrix of the inverse of the PartitionFunction for each model -{i, j} where i <= j given the k-vector lambda (which includes a final -zero). To allow for unequal prior model probabilities, multiply the prior -matrix by the prior model probabilities." - -PriorModelMatrix::usage = "PriorModelMatrix[models, k] returns an -upper-triangular matrix of model probabilities computed from -the given list of models and the number of states k." - -PostProcess::usage = "PostProcess is an option for ReversibleJumpMetropolis -which specifies whether to process the output, rationalizing the model -indices and collecting the beta coefficients into its own vector." - -UseGLS::usage = "UseGLS is an option for ReversibleJumpMetropolis which -specifies whether to use the GLS variance structure to reduce the out-of- -bounds probability of posterior predictive draws. The default setting is -UseGLS -> False." - -ReformatMC::usage = "ReformatMC[mc] reformats the output from -ReversibleJumpMetropolis, rationalizing the model indices and collecting -the beta coefficients into its own vector." - -MakePriorMatrix[lambda_?VectorQ] := - With[{n = Length[lambda]}, - Table[ - Which[ - i == j, 1, - i > j, 0, - i < j, - 1/PartitionFunction[ lambda[[ Range[i, j - 1] ]] - lambda[[j]] ]], - {i, n}, {j, n}] - ] - -PriorModelMatrix[models:{{_Integer,_Integer}..}, k_Integer] := - N[Table[If[i > j, 0, Count[models, {i, j}]], {i, k}, {j, k}]/ - Length[models]] - -ReformatMC[mc_] := - Transpose[{ - Rationalize[mc[[All, {1, 2}]]], - mc[[All, 3]], - mc[[All, Range[4, Dimensions[#][[2]]]]] - }] - -Options[ReversibleJumpMetropolis] = {PostProcess -> False, - UseGLS -> False} - -ReversibleJumpMetropolis[state_, data_, prior_, parms_, opts___?OptionQ] := - ReversibleJumpMetropolis[state, data, prior, parms, {1, 0}, opts] - -ReversibleJumpMetropolis[state_, data_, prior_, parms_, n_Integer, - opts___?OptionQ] := - ReversibleJumpMetropolis[state, data, prior, parms, {n, 0}, opts] - -ReversibleJumpMetropolis[state:{{i_, j_}, v_, {b__}}, - {y_, X_}, {lam_, mat_}, {p_, s_}, {n_, n0_}, opts___?OptionQ] := - CompileRJM[{y, X}, {lam, mat}][Flatten[state], p, s, n, n0, - TrueQ[UseGLS /. {opts} /. Options[ReversibleJumpMetropolis]]] // - If[TrueQ[PostProcess /. {opts} /. Options[ReversibleJumpMetropolis]], - ReformatMC, - Identity] - -CompileRJM[{y_, X_}, {lam_, mat_}] := - With[{ (* inject these *) - n = Dimensions[X][[1]], - k = Dimensions[X][[2]] - }, - Compile[{ (* arguments *) - {state, _Real, 1}, - {p, _Real, 0}, (* probability of staying within model *) - {s, _Real, 0}, (* std dev of within-model proposals *) - {its, _Integer, 0}, (* number of iterations *) - {its0, _Integer, 0},(* number of burn-in iterations *) - {gls, True|False, 0} (* use GLS? *) - }, - Module[{ (* typing variables *) - r = {1}, - step = {1.}, - factor = 1., - u = 1., - kp = 1, - prior = 1., - like = 1., - Xb = {1.}, - dev = {1.}, - sd = {1.}, - val = 1. - }, - Drop[NestList[ - (* anonymous function to be iterated *) - Module[{ (* initial values *) - movetype = If[RandomReal[] < p, 0, RandomInteger[{1, 4}]], - i = Round[#[[1]]], (* lower model index *) - j = Round[#[[2]]], (* upper model index *) - beta = Drop[#, 3] (* coefficients *) - }, - Catch[ (* catch the state: for bad jumps, etc *) - Which[ - movetype == 0, (* within model move *) - If[i == j, Throw[#]]; (* nothing to do *) - r = Range[i, j-1]; - step = (* standard normal deviates *) - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {j-i}]; - beta[[r]] += s * step; - beta[[j]] = 1 - Plus @@ beta[[r]]; - If[Min[beta[[ Range[i, j] ]]] <= 0, - Throw[#]], (* out-of-bounds *) - movetype == 1, (* birth of i-1 *) - If[i == 1, Throw[#]]; (* bad jump *) - factor = beta[[i]]; - u = Random[]; - beta[[{i-1, i}]] = beta[[i]] * {1-u, u}; - i--; - r = Range[i, j-1], - movetype == 2, (* birth of j+1 *) - If[j == k, Throw[#]]; (* bad jump *) - factor = beta[[j]]; - u = Random[]; - beta[[{j, j+1}]] = beta[[j]] * {u, 1-u}; - j++; - r = Range[i, j-1], - movetype == 3, (* death of i *) - If[i == j, Throw[#]]; (* bad jump *) - beta[[i+1]] += beta[[i]]; - beta[[i]] = 0; - i++; - factor = 1/beta[[i]]; - r = Range[i, j-1], - movetype == 4, (* death of j *) - If[i == j, Throw[#]]; (* bad jump *) - beta[[j-1]] += beta[[j]]; - beta[[j]] = 0; - j--; - factor = 1/beta[[j]]; - r = Range[i, j-1] - ]; - prior = (* it's OK: it's -lambda *) - If[i == j, 1, Exp[(lam[[j]] - lam[[r]]).beta[[r]]]] * mat[[i,j]]; - Xb = X.beta; - dev = y - Xb; - like = If[gls, - (* then *) - sd = Sqrt[.01 + (Xb * (1 - Xb))]; (* xi = .01 *) - (#.#)^(-n/2)&[dev/sd]/(Times @@ sd), - (* else ols *) - (#.#)^(-n/2)&[dev] - ]; - val = prior * like; (* common constant omitted *) - If[val * factor > Random[] * #[[3]], - Join[{i}, {j}, {val}, beta], - # - ] - ]]&, (* end of Function, Module, and Catch *) - state, its + its0], (* end of NestList *) - its0 + 1] (* drop these, end of Drop *) - ]]] (* end of With, Compile, and Module *) - - -ReversibleJumpMetropolis[state:{{{i0_, j0_}, {i1_, j1_}}, v_, B:{{__}...}}, - {y_, X_}, {lam_, mat_}, {p_, s_}, {n_, n0_}, opts___?OptionQ] := - CompileRJM2[{y, X}, Dimensions[B]][Flatten[state], p, s, n, n0, - TrueQ[UseGLS /. {opts} /. Options[ReversibleJumpMetropolis]]] // - If[TrueQ[PostProcess /. {opts} /. Options[ReversibleJumpMetropolis]], - ReformatMC, - Identity] - -(* flat prior over joint probabilities *) -CompileRJM2[{y_, X_}, {nrows_, ncols_}] := - With[{ (* inject these *) - n = Dimensions[X][[1]], - k = Dimensions[X][[2]], - priorvec = Table[i!, {i, (nrows * ncols) - 1}] - }, - Compile[{ (* arguments *) - {state, _Real, 1}, - {p, _Real, 0}, (* probability of staying within model *) - {s, _Real, 0}, (* std dev of within-model proposals *) - {its, _Integer, 0}, (* number of iterations *) - {its0, _Integer, 0},(* number of burn-in iterations *) - {gls, True|False, 0} (* use GLS? *) - }, - Module[{ (* typing variables *) - r0 = {1}, - r1 = {1}, - step = {1.}, - current = {1.}, - factor = 1., - u = 1., - kp = 1, - prior = 1., - like = 1., - Xb = {1.}, - dev = {1.}, - sd = {1.}, - val = 1. - }, - Drop[NestList[ - (* anonymous function to be iterated *) - Module[{ (* initial values *) - movetype = If[RandomReal[] < p, 0, RandomInteger[{1, 4}]], - i0 = Round[#[[1]]], (* lower model index 0 *) - j0 = Round[#[[2]]], (* upper model index 0 *) - i1 = Round[#[[3]]], (* lower model index 1 *) - j1 = Round[#[[4]]], (* upper model index 1 *) - beta = Partition[Drop[#, 5], ncols] (* coefficients *) - }, - Catch[ (* catch the state: for bad jumps, etc *) - Which[ - movetype == 0, (* within model move *) - If[i0 == j0 && i1 == j1, Throw[#]]; (* nothing to do *) - r0 = Range[i0, j0]; - r1 = Range[i1, j1]; - step = (* standard normal deviates *) - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], - {(j0-i0+1)(j1-i1+1) - 1}]; - current = Most[Flatten[beta[[ r0, r1 ]]]]; - current += s * step; - AppendTo[current, 1 - Plus @@ current]; - beta[[ r0, r1 ]] = Partition[current, j1-i1+1]; - If[Min[beta[[ r0, r1 ]]] <= 0, - Throw[#]], (* out-of-bounds *) - movetype == 1, (* birth of i-1 *) - If[i == 1, Throw[#]]; (* bad jump *) - factor = beta[[i]]; - u = Random[]; - beta[[{i-1, i}]] = beta[[i]] * {1-u, u}; - i--; - r = Range[i, j-1], - movetype == 2, (* birth of j+1 *) - If[j == k, Throw[#]]; (* bad jump *) - factor = beta[[j]]; - u = Random[]; - beta[[{j, j+1}]] = beta[[j]] * {u, 1-u}; - j++; - r = Range[i, j-1], - movetype == 3, (* death of i *) - If[i == j, Throw[#]]; (* bad jump *) - beta[[i+1]] += beta[[i]]; - beta[[i]] = 0; - i++; - factor = 1/beta[[i]]; - r = Range[i, j-1], - movetype == 4, (* death of j *) - If[i == j, Throw[#]]; (* bad jump *) - beta[[j-1]] += beta[[j]]; - beta[[j]] = 0; - j--; - factor = 1/beta[[j]]; - r = Range[i, j-1] - ]; - prior = priorvec[[(j0 - i0 + 1)(j1 - i1 + 1)]]; - Xb = X.beta; - dev = y - Xb; - like = If[gls, - (* then *) - sd = Sqrt[.01 + (Xb * (1 - Xb))]; (* xi = .01 *) - (#.#)^(-n/2)&[dev/sd]/(Times @@ sd), - (* else ols *) - (#.#)^(-n/2)&[dev] - ]; - val = prior * like; (* common constant omitted *) - If[val * factor > Random[] * #[[5]], - Join[{i0, j0, i1, j1}, {val}, beta], - # - ] - ]]&, (* end of Function, Module, and Catch *) - state, its + its0], (* end of NestList *) - its0 + 1] (* drop these, end of Drop *) - ]]] (* end of With, Compile, and Module *) - diff --git a/MathematicaFiles/Applications/SmoothedHistogram.m b/MathematicaFiles/Applications/SmoothedHistogram.m deleted file mode 100755 index 2af689bd1d8c2ddd18f25fcbd76e6bd616ad6c3f..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/SmoothedHistogram.m +++ /dev/null @@ -1,288 +0,0 @@ -(* :Author: Mark Fisher *) - -(* :Date: August 2007 *) - -(* :Mathematica Verion: 6 *) - -Needs["BinnedKernelDensity`"] - -SmoothedHistogram::usage = -"SmoothedHistogram[data, {min,max,dx}, n, (opts)] \ -produces a normalized \ -smoothed histogram from the data by averaging \ -over adjacent bins. The bin width is dx and one \ -may simply specify dx instead of {min,max,dx}.) \ -The \"width\" of the smoothing kernel is given by \ -n, with n=1 specifying no smoothing. The option \ -Kernel can be used to specify the form of the \ -kernel. The option Overhang specifies \ -the number of bins to add to each end. The \ -default is Overhang -> None." - -SmoothedHistogramFunction::usage = -"SmoothedHistogramFunction[data, {min,max,dx}, n, (opts)] \ -produces an InterpolatingFunction of a normalized \ -smoothed histogram from the data by averaging \ -over adjacent bins. The bin width is dx and one \ -may simply specify dx instead of {min,max,dx}.) \ -The \"width\" of the smoothing kernel is given by \ -n, with n=1 specifying no smoothing. The option \ -Kernel can be used to specify the form of the \ -kernel. The option Overhang specifies \ -the number of bins to add to each end. The \ -default is Overhang -> None." - -Overhang::usage = -"Overhang is an option for \ -SmoothedHistogram and related functions that specifies the number of \ -bins to add to each end. The default is Overhang \ --> None, which specifies no overhang at either end and \ -produces a \"hard\" bound. The maximum overhang \ -at either end is n-1 (where n is the specified \ -\"width\" of the kernel) which can be specfied by All. \ -One may use different settings each end, such as \ -Overhang -> {None, All}. In addition one may use integers \ -between 1 and n-1 (inclusive)." - -PlotCounts::usage = -"PlotCounts is an option for SmoothedHistogram that specifies \ -whether to plot the (smoothed) bin counts instead of the \"density\". \ -The default setting is PlotCounts -> False." - -SmoothedHistogram::badoh = "Bad Overhang specification; using None." - -binCounts::usage = "binCounts[data, {min, max, dx}]" - -GeneralizedMovingAverage::usage = "GeneralizedMovingAverage[data, \ -n, (opts)] computes a moving average of the data." - -Options[SmoothedHistogramFunction] = - {Overhang -> All, Kernel -> TriweightKernel} - -Options[SmoothedHistogram] = - Join[ - Options[SmoothedHistogramFunction], - {PlotCounts -> False, PlotStyle -> Automatic}, - Options[Graphics] - ] - -SmoothedHistogram[data_?VectorQ, {nbins_Integer}, n_Integer, - opts:OptionsPattern[]] := - Module[{dx, min, max}, - dx = (Max[data] - Min[data])/(nbins-1); - min = Ceiling[Min[data] - dx, dx]; - max = Floor[Max[data] + dx, dx]; - SmoothedHistogram[data, {min, max, dx}, n, opts] - ] - -SmoothedHistogram[data_?VectorQ, {nbins_Integer}, - opts:OptionsPattern[]] := - Module[{dx, min, max}, - dx = (Max[data] - Min[data])/(nbins-1); - min = Ceiling[Min[data] - dx, dx]; - max = Floor[Max[data] + dx, dx]; - SmoothedHistogram[data, {min, max, dx}, 1, opts] - ] - -SmoothedHistogram[data_?VectorQ, opts:OptionsPattern[]] := - Module[{dx, min, max}, - dx = (Max[data] - Min[data])/19; - min = Ceiling[Min[data] - dx, dx]; - max = Floor[Max[data] + dx, dx]; - SmoothedHistogram[data, {min, max, dx}, 1, opts] - ] - -SmoothedHistogram[data_?VectorQ, {min_, max_, dx_}, n_Integer, - opts:OptionsPattern[]] := - Module[{olo, ohi, kernel, style, counts, padding, smoothed}, - {olo, ohi} = - Switch[ - over = OptionValue[Overhang] /. {None -> 0, All -> n-1}, - 0, {0, 0}, - n-1, {n-1, n-1}, - {_Integer, _Integer}, Min[Max[#1, 0], n-1] & /@ over, - _, Message[SmoothedHistogram::badoh]; {0, 0} - ]; - kernel = OptionValue[Kernel][n]/n; - style = OptionValue[PlotStyle]; - counts = binCounts[data, {min, max, dx}]; - If[!OptionValue[PlotCounts], counts = counts/(dx * Length[data])]; - padding = ConstantArray[0, Length[counts]]; - If[olo == 0, padding[[-(n - 1) ;; All]] = Reverse[counts[[1 ;; n - 1]]]]; - If[ohi == 0, padding[[1 ;; n - 1]] = Reverse[counts[[-(n - 1) ;; All]]]]; - smoothed = ListConvolve[kernel, counts, {n - olo, ohi - n}, padding]; - Graphics[{ - If[style === Automatic, {}, style], - Line[Transpose[{ - Flatten[({#1, #1} & ) /@ Range[min - olo*dx, max + ohi*dx, dx]], - Join[{0}, Flatten[({#1, #1} & ) /@ smoothed], {0}] - }]] - }, - FilterRules[{opts}, Options[Graphics]], - Frame -> {True, True, False, False}, - AspectRatio -> 1/GoldenRatio, - PlotRange -> All, - PlotRangePadding -> Scaled[0.025] - ] - ] - -SmoothedHistogram[data_?VectorQ, dx_?NumericQ, n_Integer, - opts:OptionsPattern[]] := - Module[{min, max}, - min = Ceiling[Min[data] - dx, dx]; - max = Floor[Max[data] + dx, dx]; - SmoothedHistogram[data, {min, max, dx}, n, opts] - ] - -SmoothedHistogram[data_?VectorQ, dx_?NumericQ, opts:OptionsPattern[]] := - Module[{min, max}, - min = Ceiling[Min[data] - dx, dx]; - max = Floor[Max[data] + dx, dx]; - SmoothedHistogram[data, {min, max, dx}, 1, opts] - ] - -SmoothedHistogramFunction[data_?VectorQ, {min_, max_, dx_}, n_Integer, - opts:OptionsPattern[]] := - Module[{olo, ohi, kernel, counts, padding, smoothed}, - {olo, ohi} = - Switch[ - over = OptionValue[Overhang] /. {None -> 0, All -> n-1}, - 0, {0, 0}, - n - 1, {n-1, n-1}, - {_Integer, _Integer}, Min[Max[#1, 0], n - 1] & /@ over, - _, Message[SmoothedHistogram::badoh]; {0, 0} - ]; - kernel = OptionValue[Kernel][n]/n; - counts = binCounts[data, {min, max, dx}]/(dx * Length[data]); - padding = ConstantArray[0, Length[counts]]; - If[olo == 0, padding[[-(n - 1) ;; All]] = Reverse[counts[[1 ;; n - 1]]]]; - If[ohi == 0, padding[[1 ;; n - 1]] = Reverse[counts[[-(n - 1) ;; All]]]]; - smoothed = ListConvolve[kernel, counts, {n - olo, ohi - n}, padding]; - Interpolation[ - Join[ - {{min - olo*dx, 0}}, - Transpose[{Range[min - olo*dx + dx, max + ohi*dx, dx], smoothed}] - ], - InterpolationOrder -> 0 - ] - ] - -SmoothedHistogramFunction[data_?VectorQ, dx_?NumericQ, n_Integer, - opts:OptionsPattern[]] := - Module[{min, max}, - min = Ceiling[Min[data] - dx, dx]; - max = Floor[Max[data] + dx, dx]; - SmoothedHistogramFunction[data, {min, max, dx}, n, opts] - ] - -(* there is a bug in BinCounts[data, {min, max, dx}] version 6.0.1 *) -(* anyway this is faster *) -binCounts[data_?VectorQ, dx_] := - binCounts[data, { - Ceiling[Min[data] - dx, dx], - Floor[Max[data] + dx, dx], - dx - }] - -binCounts[data_?VectorQ, {min_, max_, dx_}] := - TallyToBinCounts[ - Tally[Floor[(data - min)/dx] + 1], - Length[Range[min, max, dx]] - 1 - ] - -TallyToBinCounts = - Compile[{ - {tally, _Integer, 2}, - {nbins, _Integer, 0} - }, - Module[{counts = Table[0, {nbins}]}, - Do[If[1 <= tally[[i, 1]] <= nbins, - counts[[ tally[[i, 1]] ]] = tally[[i, 2]]], - {i, Length[tally]}]; - counts - ]] - -(* -binCounts[data_, {min_, max_, dx_}] := - Module[{tally, nbins, counts}, - tally = Tally[Floor[(data - min)/dx] + 1]; - nbins = Length[Range[min, max, dx]] - 1; - counts = ConstantArray[0, nbins]; - Do[ - If[1 <= tally[[i, 1]] <= nbins, - counts[[ tally[[i, 1]] ]] = tally[[i, 2]]], - {i, Length[tally]}]; - counts - ] -*) - -binCounts[data_?MatrixQ, {min1_, max1_, dx1_}, {min2_, max2_, dx2_}] := - Module[{nbins, index, tally, counts}, - nbins = MapThread[Length[Range[#1, #2, #3]]& , - {{min1, min2}, {max1, max2}, {dx1, dx2}}] - 1; - index = Transpose[Floor[MapThread[(#1 - #2)/#3&, - {Transpose[data], {min1, min2}, {dx1, dx2}}]] + 1]; - tally = {First[#], Length[#]}& /@ Split[Sort[index]]; - counts = ConstantArray[0, nbins]; - Do[If[Min[tally[[i, 1]]] > 0 && Min[nbins - tally[[i, 1]]] >= 0, - counts[[ Sequence @@ tally[[i, 1]] ]] = tally[[i, 2]]], - {i, Length[tally]}]; - counts - ] - -binCounts[data_?MatrixQ, dx1_?NumericQ, dx2_?NumericQ] := - Module[{tdata, min1, min2, max1, max2}, - tdata = Transpose[data]; - {min1, min2} = MapThread[Ceiling[Min[#1] - #2, #2]&, {tdata, {dx1, dx2}}]; - {max1, max2} = MapThread[Floor[Max[#1] + #2, #2]&, {tdata, {dx1, dx2}}]; - binCounts[data, {min1, max1, dx1}, {min2, max2, dx2}] - ] - -binCounts[data_?MatrixQ, dx_?NumericQ] := binCounts[data, dx, dx] - -SmoothedHistogram[data_?MatrixQ, dx1_?NumericQ, dx2_?NumericQ, - opts:OptionsPattern[]] := - Module[{tdata, min1, min2, max1, max2}, - tdata = Transpose[data]; - {min1, min2} = MapThread[Ceiling[Min[#1] - #2, #2]&, {tdata, {dx1, dx2}}]; - {max1, max2} = MapThread[Floor[Max[#1] + #2, #2]&, {tdata, {dx1, dx2}}]; - SmoothedHistogram[data, {min1, max1, dx1}, {min2, max2, dx2}, opts] - ] - -SmoothedHistogram[data_?MatrixQ, dx_?NumericQ, opts:OptionsPattern[]] := - SmoothedHistogram[data, dx, dx, opts] - -(* Options[SmoothedHistogram] = Options[ListDensityPlot] *) - -SmoothedHistogram[data_?MatrixQ, {min1_, max1_, dx1_}, {min2_, max2_, dx2_}, - opts:OptionsPattern[]] := -ListDensityPlot[ - Transpose[binCounts[data, {min1, max1, dx1}, {min2, max2, dx2}]], - opts, - ColorFunction -> (GrayLevel[1 - #1^0.5] & ), - InterpolationOrder -> 0, - PlotRange -> All, - AspectRatio -> Automatic, - DataRange -> {{min1 + dx1/2, max1 - dx1/2}, {min2 + dx2/2, max2 - dx2/2}} - ] - -Options[GeneralizedMovingAverage] = - {Overhang -> None, Kernel -> TriweightKernel} - -GeneralizedMovingAverage[data_?VectorQ, n_, - opts:OptionsPattern[]] := - Module[{olo, ohi, kernel, padding}, - {olo, ohi} = - Switch[ - over = OptionValue[Overhang] /. {None -> 0, All -> n-1}, - 0, {0, 0}, - n-1, {n-1, n-1}, - {_Integer, _Integer}, Min[Max[#1, 0], n-1] & /@ over, - _, Message[SmoothedHistogram::badoh]; {0, 0} - ]; - kernel = OptionValue[Kernel][n]/n; - padding = ConstantArray[0, Length[data]]; - If[olo == 0, padding[[-(n - 1) ;; All]] = Reverse[data[[1 ;; n - 1]]]]; - If[ohi == 0, padding[[1 ;; n - 1]] = Reverse[data[[-(n - 1) ;; All]]]]; - ListConvolve[kernel, data, {n - olo, ohi - n}, padding] - ] diff --git a/MathematicaFiles/Applications/StandardNormal.m b/MathematicaFiles/Applications/StandardNormal.m deleted file mode 100755 index 7ae81f070666806166303f28b6e0cb6921228b6f..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/StandardNormal.m +++ /dev/null @@ -1,114 +0,0 @@ -(* :Title: Standard Normal *) - -(* :Author: Mark Fisher *) - -(* :Mathematica Version: 6.0 *) - -(* :Context: `StandardNormal *) - -(* :Summary: Calculate standard normal deviates. *) - -(* :Discussion: -The current version of Mathematica (i.e. 3.0) does not compute normal -random variables efficiently. This package improves the efficiency -somewhat. The ideas used in this package are adopted from two guys from -California in a developer's workshop at Wolfram's headquarters in the fall -of 1997. Thanks guys. - -Updated for Version 5.0. Added StandardCauchy. - -Updated for Version 6.0. Replace Random[] with RandomReal[]. -*) - - -(* :Comment: -In Version 5.0, these uncompiled versions are almost as fast: - -StandardNormal[] := Sqrt[-2 Log[RandomReal[]]] * Cos[2 Pi RandomReal[]] -StandardNormal[n_Integer] := Table[StandardNormal[], {n}] -StandardNormal[n_Integer, m_Integer] := Table[StandardNormal[], {n}, {m}] -StandardNormal[n_Integer, cov_?MatrixQ] := - sn[n, Length[cov]].CholeskyDecomposition[cov] -StandardNormal[n_Integer, mean_?VectorQ, cov_?MatrixQ] := - Transpose[mean + Transpose[StandardNormal[n, cov]]] -*) - -(* :Requirements: For Mathematica versions prior to 5.0, -this package imports the standard package LinearAlgebra`Cholesky` *) - -BeginPackage["StandardNormal`"] - - -StandardNormal::usage = "StandardNormal[] returns a single \ -standard normal deviate. StandardNormal[n] returns a list of n \ -independent deviates. StandardNormal[n, m] returns an n by m matrix of \ -independent deviates. StandardNormal[n, cov] returns a list of n \ -standard normal deviates drawn from a multivariate standard normal \ -distribution with covariance matrix cov, where cov is a d-by-d \ -symetric matrix. StandardNormal[n, mean, cov] returns a list of n \ -normal deviates drawn from a multivariate normal distribution with \ -mean vector meam and covaraince matrix cov, where cov is a d-by-d \ -symetric, positive- definite matrix." - -StandardCauchy::usage = "StandardCauchy[] returns a single standard \ -Cauchy deviate. StandardCauchy[n] returns a list of n independent \ -deviates. To obtain draws from CauchyDistribution[a, b], multiply the \ -output of StandardCauchy by b and then add a." - -Begin["`Private`"] - -norm0 = Compile[{}, Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]]] - -norm1 = Compile[{{n, _Integer}}, - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {n}]] - -norm2 = Compile[{{n, _Integer}, {m, _Integer}}, - Table[Sqrt[-2 Log[RandomReal[]]] Cos[2 Pi RandomReal[]], {n}, {m}]] - -StandardNormal[] := norm0[] - -StandardNormal[n_Integer?Positive] := norm1[n] - -StandardNormal[n_Integer?Positive, m_Integer?Positive] := norm2[n, m] - -StandardNormal[n_Integer?Positive, cov_?(MatrixQ[#, NumericQ]&) /; - Transpose[cov] == cov && - And @@ (Positive /@ Eigenvalues[cov])] := - norm2[n, Length[cov]].CholeskyDecomposition[.5(cov + Transpose[cov])] - -StandardNormal[n_, mean_, cov_] := - Transpose[mean + Transpose[StandardNormal[n, cov]]] - -StandardCauchy[] := Tan[(Pi /2)(2 RandomReal[] - 1)] -StandardCauchy[n_Integer] := Table[StandardCauchy[], {n}] - - -(***** newer version that uses both deviates *****) -stdnorm1 = Compile[{{n, _Integer}}, - Take[#, n]& @ Flatten[ - Table[ - With[{x1 = Sqrt[-2*Log[RandomReal[]]], x2 = 2*Pi*RandomReal[]}, - {x1*Cos[x2], x1*Sin[x2]} - ], - {Ceiling[n/2]} - ] - ] - ] - -(* redefinitions *) -StandardNormal[1] := {norm0[]} - -StandardNormal[n_Integer?Positive] := stdnorm1[n] - -StandardNormal[n_Integer?Positive, m_Integer?Positive] := - Partition[stdnorm1[n * m], m] - -StandardNormal[n_Integer?Positive, cov_?(MatrixQ[#, NumericQ]&) /; - Transpose[cov] == cov && - And @@ (Positive /@ Eigenvalues[cov])] := - StandardNormal[n, Length[cov]]. - CholeskyDecomposition[.5(cov + Transpose[cov])] - - -End[] -EndPackage[] diff --git a/MathematicaFiles/Applications/StatisticalStuff.m b/MathematicaFiles/Applications/StatisticalStuff.m deleted file mode 100755 index 078977f3121c8f83685bcc45def432436de96afa..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/StatisticalStuff.m +++ /dev/null @@ -1,82 +0,0 @@ -(* This will generate random covariance matrix for which the variances -have mean 1 and the covariances have mean 0. This can be used as a proposal -distribution for a Metropolis sampler. *) - -rancov[n_] := - With[{u = Table[ - If[i > j, 0, RandomReal[NormalDistribution[0, 1/i^2]]], {i, n}, {j, n}]}, - Transpose[u].u - ] - -MultivariateGaussianLikelihood::usage = "MultivariateGaussianLikelihood[data, \ -mu, sigma] take a matrix of data, a vector parameter mu, and a matrix \ -parameter sigma and returns the likelihood." - -MultivariateGaussianLikelihood::baddim = "There is an inconsistency among \ -the dimensions of the data and the parameters." -MultivariateGaussianLikelihood::badsym = "The covariance matrix is not symmetric." - -MultivariateGaussianLikelihood[ - data_?MatrixQ, - mu_?VectorQ, - Sigma_?MatrixQ - ] := - Module[{n, d, S0}, - {n, d} = Dimensions[data]; - If[Length[mu] != d || Dimensions[Sigma] != {d, d}, - Message[MultivariateGaussianLikelihood::baddim]; Return[$Failed]]; - If[!TrueQ[Sigma == Transpose[Sigma]], - Message[MultivariateGaussianLikelihood::badsym]; Return[$Failed]]; - S0 = Sum[Outer[Times, data[[i]] - mu, data[[i]] - mu], {i, n}]; - Exp[-Tr[Inverse[Sigma].S0]/2]/((2*Pi)^d*Det[Sigma])^(n/2) - ] - -GaussianRegressionLikelihood::usage = "GaussianRegressionLikelihood[data, \ -beta, sigma] takes a matrix of data, a vector of regression coefficients, \ -and a residual variance matrix and returns the likelihood. The residual \ -variance can be given as a vector (specifying a diagonal matrix) or as a \ -scalar (specifying a diagonal matrix with a constant on the diagonal)." - -GaussianRegressionLikelihood::badbeta = "There is an inconsistency \ -between the length of the beta vector and the dimensions of the data." - -GaussianRegressionLikelihood[ - data_?MatrixQ, - beta_?VectorQ, - sigma_?MatrixQ - ] := - Module[{n, d, beta0, beta1, data1}, - {n, d} = Dimensions[data]; - If[!(d-1 <= Length[beta] <= d), - Message[GaussianRegressionLikelihood::badbeta]; Return[$Failed] - ]; - If[Length[beta] == d, - beta0 = First[beta]; beta1 = Rest[beta], - beta0 = 0; beta1 = beta - ]; - mu = beta0 * Table[1, {n}]; - data1 = DiagonalMatrix[data.Append[-beta1, 1]]; - MultivariateGaussianLikelihood[data1, mu, sigma] - ] - -GaussianRegressionLikelihood[ - data_?MatrixQ, - beta_?VectorQ, - sigma_?VectorQ - ] := - GaussianRegressionLikelihood[ - data, - beta, - DiagonalMatrix[sigma] - ] - -GaussianRegressionLikelihood[ - data_?MatrixQ, - beta_?VectorQ, - sigma_ - ] := - GaussianRegressionLikelihood[ - data, - beta, - sigma * IdentityMatrix[Length[data]] - ] diff --git a/MathematicaFiles/Applications/StatisticsEnhancements.m b/MathematicaFiles/Applications/StatisticsEnhancements.m deleted file mode 100755 index e7025b05de774603fe9fcd861239a3382fc25e32..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/StatisticsEnhancements.m +++ /dev/null @@ -1,429 +0,0 @@ -(* enhancements for statistics/random stuff *) - -(* Needs["Statistics`"] *) - -Benford::usage = "Benford[n] = Log[10,(n+1)/n] for positive integer n. \ -Benford[{d1, d2, ..., dn}] computes the probability of the (base 10) \ -digits according Benford's distribution." - -Benford[d_] := Log[10, (d + 1)/d] - -Benford[(d_)?(VectorQ[#1, Function[x, MemberQ[Range[0, 9], x]]] & ) /; - First[d] >= 1] := - Benford[FromDigits[d]] - -(* extend CDF and PDF for location and scale *) -Unprotect[CDF,PDF] -CDF[dist_, var_, {loc_, scale_}] := CDF[dist, (var - loc)/scale] -PDF[dist_, var_, {loc_, scale_}] := PDF[dist, (var - loc)/scale]/scale -PDF[dist_, var_?VectorQ, {loc_?VectorQ, scale_?MatrixQ}] := - PDF[dist, Inverse[scale].(var - loc)]/Det[scale] -PDF[dist_, var_?VectorQ, {loc_, scale_}] := - With[{n = Length[var]}, - PDF[dist, (var - loc)/Table[scale, {n}]]/scale^n - ] -Protect[CDF,PDF] - -GaussianLikelihood::usage = "GaussianLikelihood[data, {mu, sigma}] returns the \ -likelihood of mu and sigma using the Gaussian distribution assuming independent \ -data." -GaussianLikelihood[data_, {m_, s_}] := - With[{n = Length[data], sum = Plus @@ data, sumsq = Plus @@ (data^2)}, - Exp[-(n m^2 - 2 m sum + sumsq)/(2s^2)]/(Sqrt[2]^n Pi^(n/2)s^n) - ] - -(* to pass distribution to KolmogorovSmirnov *) -Off[StudentTDistribution::argx] -Unprotect[StudentTDistribution] - -StudentTDistribution /: - PDF[StudentTDistribution[n_, location_, scale_], x_] := - PDF[StudentTDistribution[n], (x - location)/scale]/scale - -StudentTDistribution /: - CDF[StudentTDistribution[n_, location_, scale_], x_] := - CDF[StudentTDistribution[n], (x - location)/scale] - -Protect[StudentTDistribution] -On[StudentTDistribution::argx] - - -(* random shuffle by Daniel Lichtblau; - returns a random permutation of the first n natural numbers *) -shuffleC = Compile[{{n, _Integer}}, - Module[{res = Range[n], tmp, rand}, - Do[ - rand = Random[Integer, {j, n}]; - tmp = res[[j]]; - res[[j]] = res[[rand]]; - res[[rand]] = tmp, - {j, n}]; - res]] - -(* modification that returns the first m values *) -RandomIntegerWithoutReplacement::usage = -"RandomIntegerWithoutReplacement[m, n] returns m distinct random integers \ -<= n. RandomIntegerWithoutReplacement[n] returns a random permutation \ -of the the first n positive integers." - -RandomIntegerWithoutReplacement[m_Integer?Positive, n_Integer?Positive] /; - (m <= n) := randomIntegerWithoutReplacement[m, n] -RandomIntegerWithoutReplacement[n_Integer?Positive] := shuffleC[n] -RandomIntegerWithoutReplacement[___] := $Failed - - -randomIntegerWithoutReplacement = - Compile[{{m, _Integer}, {n, _Integer}}, - Module[{res = Range[n], tmp, rand}, - Do[rand = Random[Integer, {j, n}]; - tmp = res[[j]]; - res[[j]] = res[[rand]]; - res[[rand]] = tmp, - {j, m}]; - Take[res, m]] - ] - -(* Random draws without replacement; - usage: RandomWithoutReplacement[Random[Integer, {1, 10}], 5] -*) - -RandomWithoutReplacement::usage = -"RandomWithoutReplacement[ran, n] returns n draws without \ -replacement using ran. For example, \ -RandomWithoutReplacement[Random[Integer, {1, 10}], 5]" - -SetAttributes[RandomWithoutReplacement, HoldFirst] - -RandomWithoutReplacement[ran_, n_Integer?Positive] := - Module[{list = {}, r}, - While[Length[list] < n, If[FreeQ[list, r = ran], AppendTo[list, r]]]; - list - ] - -(***** - Basic RNG - Stephen K. Park and Keith W. Miller, - "Random Number Generators: Good Ones Are Hard to Find," - Communications of the ACM, 31:10 (October, 1988), 1192-1201. -*****) -BasicRandomSeed = Mod[Round[AbsoluteTime[]], 2147483647]; - -BasicRandomInteger[] := - BasicRandomSeed = Mod[16807 * BasicRandomSeed, 2147483647] - -BasicRandomInteger[n_Integer?Positive] := Table[BasicRandomInteger[], {n}] - -BasicRandomReal[] := BasicRandomInteger[]/2147483647. - -BasicRandomReal[n_Integer] := BasicRandomInteger[n]/2147483647. - -(***** portable RNG; Jerry Dwyer's random number generator *****) - -SeedPortableRNG[n_Integer] := - ($randomY = n; - $randomZ = Mod[64155 * $randomY, 214783629];) - -SeedPortableRNG[] := SeedPortableRNG[Random[Integer, {1, 214783629}]] - -(* initialize *) -SeedPortableRNG[] - -PortableRNGInteger[] := - Mod[($randomY = Mod[64155 * $randomY, 214783629]) - - ($randomZ = Mod[10064 * $randomZ, 2147483543]), - 214783629] - -PortableRNGInteger[n_Integer?Positive] := Table[PortableRNGInteger[], {n}] - -PortableRNG[] := (PortableRNGInteger[] - 1.)/214783629 - -PortableRNG[n_Integer?Positive] := (Table[PortableRNGInteger[], {n}] - 1.)/214783629 - -(* -{$multiplierY, $modulusY, $multiplierZ, $modulusZ} = - {64155, 214783629, 10064, 2147483543}; - -SeedPortableRNG[n_Integer] := - ($randomY = n; - $randomZ = Mod[$multiplierY * $randomY, $modulusY];) - -SeedPortableRNG[] := SeedPortableRNG[Random[Integer, {1, $modulusY}]] - -PortableRNGInteger[] := - Mod[($randomY = Mod[$multiplierY * $randomY, $modulusY]) - - ($randomZ = Mod[$multiplierZ * $randomZ, $modulusZ]), - $modulusY] - -PortableRNG[n_Integer?Positive] := (PortableRNGInteger[n]-1.)/$modulusY - -PortableRNG[] := (PortableRNGInteger[]-1.)/$modulusY - -*) -(***** end portable RNG *****) - -(* next function compiles Piecewise to compute discrete random deviates *) - -MakeDiscreteRandomFunction::usage = "MakeDiscreteRandomFunction[probs, \ -vals] returns a compiled function that generates a list of n discrete \ -random numbers. For example, let ranfun = MakeDiscreteRandomFunction[{.25, \ -.25, .5}, {1, 2, 3}]. Then ranfun[10] returns 10 draws of 1, 2, and 3 with \ -the appropriate frequencies. If omitted, the default the list of values is \ -Range[Length[probs]]. The probs need not be normalized. (Requires Version \ -5.1.)" - -MakeDiscreteRandomFunction[probs_, vals_] := - With[{ - fun = Block[{x}, - Function @@ {x, Piecewise @ - Transpose[{vals, - x <= # & /@ (Rest @ FoldList[Plus, 0, probs/Tr[probs]])}]} - ]}, - Compile[{{n, _Integer}}, - fun /@ Table[Random[], {n}] - ] - ] - -MakeDiscreteRandomFunction[probs_] := - MakeDiscreteRandomFunction[probs, Range[Length[probs]]] - - -(* -MakeDiscreteRandomFunction[probs_, vals_] := - Block[{x}, Compile @@ {x, - Piecewise @ Transpose[{vals, x <= # & /@ (Rest @ FoldList[Plus, 0, probs])}] - } - ] - -MakeDiscreteRandomFunction[probs_, vals_] := - Block[{x, Random}, - With[{fun = Function @@ {x, Piecewise@Transpose[{vals, - x <= # & /@ (Rest@FoldList[Plus, 0, probs])}]}}, - Compile[{}, fun[Random[]]] - ]] - -MakeDiscreteRandomFunction[probs_, vals_] := - Block[{x, Random}, - With[{fun = Function @@ {x, Piecewise@Transpose[{vals, - x <= # & /@ (Rest@FoldList[Plus, 0, probs])}]}}, - Compile[{{n,_Integer}}, fun/@Table[Random[],{n}]] - ]] -*) - -(* Make inverse of cdf function for RNG from discrete pdf function; - adapted from Rose and Smith - usage: cf = MakeInverseCDF[f[#]&] - cf[Random[]] -*) -Options[MakeInverseCDF] = {MinimumValue -> 1, TailCutoff -> 10^-6} - -MakeInverseCDF[pdf_Function, opts___?OptionQ] := - With[{ - start = MinimumValue /. {opts} /. Options[MakeInverseCDF], - tail = TailCutoff /. {opts} /. Options[MakeInverseCDF]}, - With[{ - F = Block[{i = start}, - FixedPointList[ - N[ # + pdf[i++] ]&, 0, SameTest -> (1 - #2 < tail &)]] - }, - Block[{j = start}, - Compile[u, - Evaluate[ - Which @@ Flatten[Append[ - MapThread[{#1 < u < #2, j++} &, {Drop[F, -1], Rest[F]}], - {True, j - 1}]] - ] - ] - ] - ]] - -(* work arounds for bugs in earlier versions *) -If[$VersionNumber < 5.0, - -(* work around a bug in Random[] to generate geometric deviates; - the default method relies on absence of conditional serial - correlation for Random[] *) -Needs["Statistics`DiscreteDistributions`"]; -Statistics`DiscreteDistributions`Private`geometric = - Compile[{p}, Floor[Log[1 - Random[]]/Log[1 - p]]]; - -(* work around a bug in Random[Integer, n] for some large values of n *) -RandomInteger[n_] := - Round[n * Random[Real, 1, Max[$MachinePrecision + 1, Log[10, n]]]] - ] - -HighestDensityInterval::usage = "HighestDensityInterval[data, \ -percentIncluded] returns a pair of numbers that represent the lower and \ -upper bounds of the highest density region for one-dimensional data \ -(assuming the density is unimodal). A third optional argument is the number \ -of grid steps to take is determining the minimum interval length." - -HighestDensityInterval[data_List, percentIncluded_:.9, steps_Integer:100]:= - Module[{dx, quantiles, len, pos}, - dx = (1 - percentIncluded)/steps; - quantiles = Table[Quantile[data, {i*dx, percentIncluded + i*dx}], {i, 0, steps}]; - len = -Subtract @@@ quantiles; - pos = Floor[Median[Flatten[Position[len, Min[len]]]]]; - quantiles[[ pos ]] - ] - -CountPositions::usage = "CountPositions[poslist, n] is a compiled version \ -of Table[Count[poslist, i], {i, n}] where poslist is a list of integers \ -(that could represent positions). CountPositions is the inverse of \ -PositionCounts." - -CountPositions[poslist_List, n_Integer?Positive] := - countPositionsC[poslist, n] - -countPositionsC = - Compile[{{poslist, _Integer, 1}, {n, _Integer, 0}}, - Table[Count[poslist, i], {i, n}] - ] - -PositionCounts::usage = "PositionCounts[counts] returns the positions \ -represented by the list of counts. PositionCounts is the inverse of \ -CountPositions." - -PositionCounts[counts_?(VectorQ[#, IntegerQ]&)] := - Flatten[MapIndexed[Table[#2[[1]], {#1}]&, counts]] - -CountIntegerList::usage = "CountIntegerList[data, list] returns a list of \ -counts of the elements of data with respect to each element of list, where \ -both data and list are lists of integers. CountIntegerList[data, n] \ -computes CountIntegerList[data, Range[n]]." - -CountIntegerList[data:{__Integer}, list:{__Integer}] := - countIntegerListC[data, list] - -CountIntegerList[data:{__Integer}, n_Integer?Positive] := - countIntegerListC[data, Range[n]] - -countIntegerListC = Compile[{{data, _Integer, 1}, {list, _Integer, 1}}, - Count[data, #] & /@ list - ] - -(* -RandomMultinomial::usage = "RandomMultinomial[n, w] returns a draw from -MultinomialDistribution[n, w]." - -RandomMultinomial[n_, w_] := - countPositionsC[MakeDiscreteRandomFunction[w][n], n] - -RandomArrayMultinomial::usage = "RandomArrayMultinomial[n, w, reps] return -reps draws from MultinomialDistribution[n, w]." - -RandomArrayMultinomial[n_, w_, reps_] := - With[{ - fun = MakeDiscreteRandomFunction[w] - }, - Table[ - countPositionsC[fun[n], n], - {reps} - ] - ] - -*) - -(* obsolete -RandomArrayMultinomial[n_, w_, reps_] := - With[{ - zero = Table[0, {Length[w]}], - fun = MakeDiscreteRandomFunction[w]}, - Module[{list}, - Table[ - list = zero; - list[[#]]++ & /@ fun[n]; - list, - {reps}] - ]] -*) -(* obsolete -RandomMultinomial[n_, w_] := - Module[{list = Table[0, {Length[w]}]}, - list[[#]]++ & /@ MakeDiscreteRandomFunction[w][n]; - list - ] -*) - - -(* there is a problem with the built in Random(Array)[Multinominal[ ... ]] *) - -MultiNomialDistribution::usage = "MultiNomialDistribution[n, w] is a \ -replacement for MultinomialDistribtion[n, w] in Random and RandomArray. \ -(There is a problem with MultinomialDistribtution in these applications." - -MultiNomialDistribution /: - Random[MultiNomialDistribution[n_Integer?Positive, w_?VectorQ]] := - countIntegerListC[MakeDiscreteRandomFunction[w][n], Range[Length[w]]] - -MultiNomialDistribution /: - RandomArray[MultiNomialDistribution[n_Integer?Positive, w_?VectorQ], - reps_Integer?Positive] := - With[{ - fun = MakeDiscreteRandomFunction[w], - list = Range[Length[w]] - }, - Table[ - countIntegerListC[fun[n], list], - {reps} - ] - ] - - -Autocorrelations::usage = "Autocorrelations[data, maxlag] returns a list of \ -autocorrelations of the data beginning with lag 1 and ending with maxlag." - -Autocorrelations::lag2long = "Too many lags. Reduce maxlag to `` or less." - -Autocorrelations[data_?VectorQ, maxlag_Integer?Positive] := - Table[Correlation[Take[data, {1 + i, -1}], Take[data, {1, -(1 + i)}]], - {i, 1, maxlag}] /; maxlag <= Length[data] - 3 - -Autocorrelations[data_?VectorQ, _Integer?Positive] := - (Message[Autocorrelations::lag2long, Length[data] - 3]; - $Failed) - -PlotAutocorrelations[data_?VectorQ, maxlag_Integer?Positive, opts___?OptionQ] := - With[{auto = Autocorrelations[data, maxlag]}, - If[auto === $Failed, - $Failed, - ListPlot[auto, opts, PlotJoined -> True] - ] - ] - -(* incorporated into StandardNormal *) -(* -StdNorm[n_Integer?Positive] := stdnorm1[n] - -StdNorm[n_Integer?Positive, m_Integer?Positive] := - Partition[stdnorm1[n * m], m] - -stdnorm1 = Compile[{{n, _Integer}}, - If[OddQ[n], Rest[#], #]& @ Flatten[ - Table[ - With[{x1 = Sqrt[-2*Log[Random[]]], x2 = 2*Pi*Random[]}, - {x1*Cos[x2], x1*Sin[x2]} - ], - {Ceiling[n/2]} - ] - ] - ] -*) - -(* -stdnorm2 = Function[{n, m}, Partition[stdnorm1[n * m], m]] - -stdnorm2 = Compile[{{n, _Integer}, {m, _Integer}}, - Partition[ - If[OddQ[n * m], Rest[#], #]& @ Flatten[ - Table[ - With[{x1 = Sqrt[-2*Log[Random[]]], x2 = 2*Pi*Random[]}, - {x1 *Cos[x2], x1*Sin[x2]} - ], - {Ceiling[(n * m)/2]} - ] - ], - m] - ] -*) - - diff --git a/MathematicaFiles/Applications/The Virtual Mathematica Book (v6).nb b/MathematicaFiles/Applications/The Virtual Mathematica Book (v6).nb deleted file mode 100755 index ce81d2ce3656e350eee0c83f12f121ee90b02874..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/The Virtual Mathematica Book (v6).nb +++ /dev/null @@ -1,13110 +0,0 @@ -(* Content-type: application/mathematica *) - -(*** Wolfram Notebook File ***) -(* http://www.wolfram.com/nb *) - -(* CreatedBy='Mathematica 6.0' *) - -(*CacheID: 234*) -(* Internal cache information: -NotebookFileLineBreakTest -NotebookFileLineBreakTest -NotebookDataPosition[ 145, 7] -NotebookDataLength[ 428471, 13100] -NotebookOptionsPosition[ 373437, 11745] -NotebookOutlinePosition[ 373849, 11761] -CellTagsIndexPosition[ 373806, 11758] -WindowFrame->Normal -ContainsDynamic->False*) - -(* Beginning of Notebook Content *) -Notebook[{ - -Cell[CellGroupData[{ -Cell["The Virtual Mathematica Book (v6)", "Title"], - -Cell["\<\ -A collection of links to the tutorials present in the Mathematica 6.0 \ -Documentation Center, arranged in the order of chapters in \"The Mathematica \ -Book\".\ -\>", "Author"], - -Cell[CellGroupData[{ - -Cell["A practical introduction to Mathematica", "Subtitle", - ShowGroupOpener->True, - CellMargins->{{Inherited, Inherited}, {15, 30}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Running Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RunningMathematicaOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Notebook Interfaces\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NotebookInterfaces"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Text\[Hyphen]Based Interfaces\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TextBasedInterfaces"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Basic Editing Techniques\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/BasicEditingTechniquesOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Moving through Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MovingThroughExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Selecting and Deleting in Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SelectingAndDeletingInExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Entering Two-Dimensional Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EnteringTwoDimensionalExpressionsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Fractions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/TypingFractions"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Powers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/TypingPowers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Square Roots\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TypingSquareRoots"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Radicals\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/TypingRadicals"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Vectors\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/TypingVectors"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/TypingMatrices"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Superscripts\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TypingSuperscripts"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Subscripts\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TypingSubscripts"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Overscripts\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TypingOverscripts"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Typing Underscripts\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TypingUnderscripts"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Calculations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalCalculationsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Arithmetic\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Arithmetic"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exact and Approximate Results\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExactAndApproximateResults"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Some Mathematical Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SomeMathematicalFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Arbitrary\[Hyphen]Precision Calculations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ArbitraryPrecisionCalculations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Complex Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/ComplexNumbers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Used to Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GettingUsedToMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mathematical Notation in Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathematicalNotationInNotebooks-NumericalCalculations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Building Up Calculations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/BuildingUpCalculationsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Using Previous Results\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UsingPreviousResults"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Defining Variables\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DefiningVariables"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Making Lists of Objects\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MakingListsOfObjects"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Elements of Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingElementsOfLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Four Kinds of Bracketing in Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheFourKindsOfBracketingInMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Sequences of Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SequencesOfOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Using the Mathematica System\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UsingTheMathematicaSystemOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Structure of Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheStructureOfMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Differences between Computer Systems\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DifferencesBetweenComputerSystems"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Using a Text\[Hyphen]Based Interface\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UsingATextBasedInterface"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Doing Computations in Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DoingComputationsInNotebooks"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Notebooks as Documents\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NotebooksAsDocuments"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Hyperlinks and Active Text\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/HyperlinksAndActiveText"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Help with a Text\[Hyphen]Based Interface\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GettingHelpWithATextBasedInterface"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mathematica Packages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathematicaPackages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Warnings and Messages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WarningsAndMessages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Interrupting Calculations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InterruptingCalculations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Algebraic Calculations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AlgebraicCalculationsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic Computation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SymbolicComputation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Values for Symbols\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ValuesForSymbols"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Transforming Algebraic Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TransformingAlgebraicExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Simplifying Algebraic Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SimplifyingAlgebraicExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Putting Expressions into Different Forms\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PuttingExpressionsIntoDifferentForms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Simplifying with Assumptions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SimplifyingWithAssumptions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Picking Out Pieces of Algebraic Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PickingOutPiecesOfAlgebraicExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Controlling the Display of Large Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ControllingTheDisplayOfLargeExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Limits of Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheLimitsOfMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Using Symbols to Tag Objects\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UsingSymbolsToTagObjects"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Symbolic Mathematics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SymbolicMathematicsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Basic Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SymbolicMathematics-BasicOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integration\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Integration"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Sums and Products\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/SumsAndProducts"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Equations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Relational and Logical Operators\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RelationalAndLogicalOperators"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Solving Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SolvingEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inequalities\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/Inequalities-SymbolicMathematics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Differential Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DifferentialEquations-Basics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Power Series\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/PowerSeries"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Limits\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Limits"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integral Transforms\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegralTransforms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generic and Non\[Hyphen]Generic Cases\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GenericAndNonGenericCases"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mathematical Notation in Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathematicalNotationInNotebooks-SymbolicMathematics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Mathematics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalMathematicsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Basic Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalMathematics-BasicOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Sums, Products and Integrals\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalSumsProductsAndIntegrals"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Equation Solving\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalEquationSolving"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Differential Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalDifferentialEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Numerical Data\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingNumericalData"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Functions and Programs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionsAndProgramsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Defining Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DefiningFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Functions as Procedures\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionsAsProcedures"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Repetitive Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RepetitiveOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Transformation Rules for Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TransformationRulesForFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/ListsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Collecting Objects Together\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CollectingObjectsTogether"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Making Tables of Values\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MakingTablesOfValues"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Vectors and Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/VectorsAndMatrices"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Pieces of Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GettingPiecesOfLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing and Searching List Elements\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingAndSearchingListElements"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Adding, Removing and Modifying List Elements\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AddingRemovingAndModifyingListElements"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Combining Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/CombiningLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Lists as Sets\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/ListsAsSets"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rearranging Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RearrangingLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Grouping and Combining Elements of Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GroupingAndCombiningElementsOfLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Ordering in Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/OrderingInLists"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rearranging Nested Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RearrangingNestedLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Graphics and Sound\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GraphicsAndSoundOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Basic Plotting\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/BasicPlotting"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options for Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Options"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Redrawing and Combining Plots\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RedrawingAndCombiningPlots"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Options\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingOptions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Three\[Hyphen]Dimensional Surface Plots\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ThreeDimensionalSurfacePlots"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Plotting Lists of Data\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PlottingListsOfData"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Parametric Plots\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/ParametricPlots"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Some Special Plots\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SomeSpecialPlots"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Sound\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Sound"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Editing Mathematica Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntroductionToInteractiveGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Drawing Tools\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsPalette"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Selecting Graphics Objects\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsSelecting"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Selecting an Object\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsSelecting#19275731"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Selecting Multiple Objects\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsSelecting#425631810"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Copy and Paste\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsSelecting#69452175"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inset Objects\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsSelecting#22436782"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Reshaping Graphics Objects\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsReshaping"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Pointers\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsReshaping#377569141"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Vertices and Circle Points\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsReshaping#304872873"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Line Segments\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsReshaping#183967963"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Primitives\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsReshaping#622918205"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reshaping Overlapping Objects\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsReshaping#223368799"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Multiple Objects\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsReshaping#158252894"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Resizing, Cropping, and Adding Margins to Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsLayout"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Changing the AspectRatio\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsLayout#13473268"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Cropping\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsLayout#657801144"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Margins\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsLayout#27684169"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Graphics as Input\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphicsDirectOutput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Interacting with 3D Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphics3DInteraction"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rotate\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphics3DInteraction#181090781"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rotate about the axis perpendicular to the screen\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphics3DInteraction#403348457"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Zoom in and out with \[AltKey]\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphics3DInteraction#194874130"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Pan with \[ShiftKey]\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InteractiveGraphics3DInteraction#48613871"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Input and Output in Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InputAndOutputInNotebooksOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Entering Greek Letters\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EnteringGreekLetters"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Entering Two\[Hyphen]Dimensional Input\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EnteringTwoDimensionalInput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Editing and Evaluating Two\[Hyphen]Dimensional \ -Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EditingAndEvaluatingTwoDimensionalExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Entering Formulas\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EnteringFormulas"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Entering Tables and Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EnteringTablesAndMatrices"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Subscripts, Bars and Other Modifiers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SubscriptsBarsAndOtherModifiers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Non\[Hyphen]English Characters and Keyboards\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NonEnglishCharactersAndKeyboards"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Other Mathematical Notation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OtherMathematicalNotation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mixing Text and Formulas\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MixingTextAndFormulas"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Displaying and Printing Mathematica Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DisplayingAndPrintingMathematicaNotebooks"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Up Hyperlinks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SettingUpHyperlinks"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Automatic Numbering\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AutomaticNumbering"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exposition in Mathematica Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExpositionInMathematicaNotebooks"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Files and External Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FilesAndExternalOperationsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reading and Writing Mathematica Files: Basics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ReadingAndWritingMathematicaFiles-Basics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Finding and Manipulating Files\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FindingAndManipulatingFiles"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Importing and Exporting Data\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ImportingAndExportingData"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exporting Graphics and Sounds\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExportingGraphicsAndSounds"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generating and Importing TeX\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GeneratingAndImportingTeX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exchanging Material with the Web\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExchangingMaterialWithTheWeb"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generating C and Fortran Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GeneratingCAndFortranExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Splicing Mathematica Output into External Files\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SplicingMathematicaOutputIntoExternalFiles"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Running External Programs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RunningExternalPrograms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"MathLink\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/MathLink"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"The Internals of Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheInternalsOfMathematicaOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Why You Do Not Usually Need to Know about Internals\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WhyYouDoNotUsuallyNeedToKnowAboutInternals"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Basic Internal Architecture\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/BasicInternalArchitecture"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Algorithms of Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheAlgorithmsOfMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Software Engineering of Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheSoftwareEngineeringOfMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing and Verification\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingAndVerification"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Principles of Mathematica", "Subtitle", - ShowGroupOpener->True, - CellMargins->{{Inherited, Inherited}, {15, 30}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExpressionsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Everything Is an Expression\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EverythingIsAnExpression"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Meaning of Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheMeaningOfExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Special Ways to Input Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialWaysToInputExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Parts of Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PartsOfExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Expressions like Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingExpressionsLikeLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Expressions as Trees\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExpressionsAsTrees"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Levels in Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LevelsInExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Functional Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionalOperationsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Function Names as Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionNamesAsExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Applying Functions Repeatedly\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ApplyingFunctionsRepeatedly"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Applying Functions to Lists and Other Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ApplyingFunctionsToListsAndOtherExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Applying Functions to Parts of Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ApplyingFunctionsToPartsOfExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Pure Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/PureFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Building Lists from Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/BuildingListsFromFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Selecting Parts of Expressions with Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SelectingPartsOfExpressionsWithFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Expressions with Heads That Are Not Symbols\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExpressionsWithHeadsThatAreNotSymbols"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Working with Operators\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithOperators"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Structural Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StructuralOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Sequences\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Sequences"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PatternsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/Introduction-Patterns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Finding Expressions That Match a Pattern\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FindingExpressionsThatMatchAPattern"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Naming Pieces of Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NamingPiecesOfPatterns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Specifying Types of Expression in Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecifyingTypesOfExpressionInPatterns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Putting Constraints on Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PuttingConstraintsOnPatterns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Patterns Involving Alternatives\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PatternsInvolvingAlternatives"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Pattern Sequences\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PatternSequences"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Flat and Orderless Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FlatAndOrderlessFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Functions with Variable Numbers of Arguments\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionsWithVariableNumbersOfArguments"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Optional and Default Arguments\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OptionalAndDefaultArguments"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Up Functions with Optional Arguments\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SettingUpFunctionsWithOptionalArguments"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Repeated Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RepeatedPatterns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Verbatim Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/VerbatimPatterns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Patterns for Some Common Types of Expression\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PatternsForSomeCommonTypesOfExpression"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"An Example: Defining Your Own Integration Function\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AnExampleDefiningYourOwnIntegrationFunction"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Working with String Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatternsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#6475218"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"General String Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#316252289"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Regular Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#274403895"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"RegularExpression versus StringExpression\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#182364929"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"String Manipulation Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#393353162"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringMatchQ\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#115748480"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringFreeQ\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#221687989"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringCases\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#3968257"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Overlaps Option\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#351610464"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringPosition\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#363493082"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringCount\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#401719377"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringReplace\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#1274428"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringReplaceList\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#239124212"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringSplit\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#343107939"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"For Perl Users\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#759470019"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Overview\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#20697950"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"m/.../\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#120637313"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"s/.../.../\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#163295011"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"split(...)\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#45791734"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"tr/.../.../\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#627179989"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Some Examples\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#2083974"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Dictionary Lookup\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#123236071"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Highlight Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#738873845"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"HTML Parsing\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#146223979"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Find Money\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#263221749"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Find Text in Files\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#355263806"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Tips and Tricks for Efficient Matching\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#319138910"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StringExpression versus RegularExpression\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#571253149"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Conditions and PatternTests\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#11710184"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Avoid Nested Quantifiers\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#39608680"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Avoid Many Calls to a Function\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#73358011"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rewrite General Expression Searches as String Searches\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#148652143"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Implementation Details\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithStringPatterns#337819047"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingListsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Constructing Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstructingLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Lists by Their Indices\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingListsByTheirIndices"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Nested Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NestedLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Partitioning and Padding Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PartitioningAndPaddingLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Sparse Arrays\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SparseArrays-ManipulatingLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Transformation Rules and Definitions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TransformationRulesAndDefinitionsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Applying Transformation Rules\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ApplyingTransformationRules"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Sets of Transformation Rules\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingSetsOfTransformationRules"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Making Definitions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MakingDefinitions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Special Forms of Assignment\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFormsOfAssignment"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Making Definitions for Indexed Objects\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MakingDefinitionsForIndexedObjects"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Making Definitions for Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MakingDefinitionsForFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Ordering of Definitions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheOrderingOfDefinitions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Immediate and Delayed Definitions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ImmediateAndDelayedDefinitions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Functions That Remember Values They Have Found\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionsThatRememberValuesTheyHaveFound"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Associating Definitions with Different Symbols\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AssociatingDefinitionsWithDifferentSymbols"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Defining Numerical Values\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DefiningNumericalValues"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Modifying Built\[Hyphen]in Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ModifyingBuiltInFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Value Lists\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingValueLists"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Evaluation of Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EvaluationOfExpressionsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Principles of Evaluation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PrinciplesOfEvaluation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reducing Expressions to Their Standard Form\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ReducingExpressionsToTheirStandardForm"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Attributes\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Attributes"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Standard Evaluation Procedure\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheStandardEvaluationProcedure"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Nonstandard Evaluation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NonStandardEvaluation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Evaluation in Patterns, Rules and Definitions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EvaluationInPatternsRulesAndDefinitions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Evaluation in Iteration Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EvaluationInIterationFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Conditionals\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Conditionals"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Loops and Control Structures\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LoopsAndControlStructures"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Collecting Expressions During Evaluation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CollectingExpressionsDuringEvaluation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Tracing Evaluation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TracingEvaluation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Evaluation Stack\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheEvaluationStack"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Controlling Infinite Evaluation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ControllingInfiniteEvaluation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Interrupts and Aborts\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InterruptsAndAborts"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Compiling Mathematica Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CompilingMathematicaExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Compiled Code\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingCompiledCode"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Modularity and the Naming of Things\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ModularityAndTheNamingOfThingsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Modules and Local Variables\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ModulesAndLocalVariables"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Local Constants\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/LocalConstants"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"How Modules Work\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/HowModulesWork"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Variables in Pure Functions and Rules\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/VariablesInPureFunctionsAndRules"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Dummy Variables in Mathematics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DummyVariablesInMathematics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Blocks and Local Values\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/BlocksAndLocalValues"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Blocks Compared with Modules\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/BlocksComparedWithModules"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Contexts\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Contexts"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Contexts and Packages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ContextsAndPackages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Up Mathematica Packages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SettingUpMathematicaPackages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Automatic Loading of Packages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AutomaticLoadingOfPackages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Symbols and Contexts by Name\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingSymbolsAndContextsByName"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Intercepting the Creation of New Symbols\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InterceptingTheCreationOfNewSymbols"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Strings and Characters\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StringsAndCharactersOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Properties of Strings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PropertiesOfStrings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Operations on Strings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OperationsOnStrings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Characters in Strings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CharactersInStrings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"String Patterns\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/StringPatterns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Regular Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RegularExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Special Characters\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialCharacters-StringsAndCharacters"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Newlines and Tabs in Strings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NewlinesAndTabsInStrings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Character Codes\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/CharacterCodes"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Raw Character Encodings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RawCharacterEncodings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Textual Input and Output\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TextualInputAndOutputOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Forms of Input and Output\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FormsOfInputAndOutput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"How Input and Output Work\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/HowInputAndOutputWork"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Representation of Textual Forms\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheRepresentationOfTextualForms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Interpretation of Textual Forms\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheInterpretationOfTextualForms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Short and Shallow Output\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ShortAndShallowOutput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"String\[Hyphen]Oriented Output Formats\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StringOrientedOutputFormats"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Output Formats for Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OutputFormatsForNumbers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Tables and Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TablesAndMatrices"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Formatting Higher-Dimensional Data\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TablesAndMatrices"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Styles and Fonts in Output\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StylesAndFontsInOutput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Representing Textual Forms by Boxes\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RepresentingTextualFormsByBoxes"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Converting between Strings, Boxes and Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConvertingBetweenStringsBoxesAndExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Syntax of the Mathematica Language\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheSyntaxOfTheMathematicaLanguage"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Operators without Built\[Hyphen]in Meanings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OperatorsWithoutBuiltInMeanings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Defining Output Formats\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DefiningOutputFormats"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Low\[Hyphen]Level Input and Output Rules\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LowLevelInputAndOutputRules"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generating Unstructured Output\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GeneratingUnstructuredOutput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Requesting Input\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/RequestingInput"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Messages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Messages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"International Messages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InternationalMessages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Documentation Constructs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DocumentationConstructs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"The Structure of Graphics and Sound\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheStructureOfGraphicsAndSoundOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Structure of Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheStructureOfGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Two-Dimensional Graphics Elements\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TwoDimensionalGraphicsElements"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Graphics Directives and Options\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GraphicsDirectivesAndOptions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Coordinate Systems for Two-Dimensional Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CoordinateSystemsForTwoDimensionalGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Labeling Two-Dimensional Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LabelingTwoDimensionalGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Insetting Objects in Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InsettingObjectsInGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Density and Contour Plots\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DensityAndContourPlots"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Three-Dimensional Graphics Primitives\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ThreeDimensionalGraphicsPrimitives"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Three-Dimensional Graphics Directives\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ThreeDimensionalGraphicsDirectives"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Coordinate Systems for Three-Dimensional Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CoordinateSystemsForThreeDimensionalGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Lighting and Surface Properties\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LightingAndSurfaceProperties"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Labeling Three-Dimensional Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LabelingThreeDimensionalGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Efficient Representation of Many Primitives\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EfficientRepresentationOfManyPrimitives"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Formats for Text in Graphics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FormatsForTextInGraphics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Graphics Primitives for Text\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GraphicsPrimitivesForText"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Representation of Sound\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheRepresentationOfSound"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exporting Graphics and Sounds\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExportingGraphicsAndSounds"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Importing Graphics and Sounds\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ImportingGraphicsAndSounds"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingNotebooksOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Cells as Mathematica Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CellsAsMathematicaExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Notebooks as Mathematica Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NotebooksAsMathematicaExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Notebooks from the Kernel\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingNotebooksFromTheKernel"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating the Front End from the Kernel\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingTheFrontEndFromTheKernel"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Executing Notebook Commands Directly in the Front End\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExecutingNotebookCommandsDirectlyInTheFrontEnd"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Structure of Cells\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheStructureOfCells"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Styles and the Inheritance of Option Settings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StylesAndTheInheritanceOfOptionSettings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options for Cells\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/OptionsForCells"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Text and Font Options\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TextAndFontOptions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options for Expression Input and Output\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OptionsForExpressionInputAndOutput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options for Notebooks\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OptionsForNotebooks"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Global Options for the Front End\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GlobalOptionsForTheFrontEnd"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Files and Streams\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FilesAndStreamsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reading and Writing Mathematica Files\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ReadingAndWritingMathematicaFiles"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"External Programs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExternalPrograms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Streams and Low\[Hyphen]Level Input and Output\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StreamsAndLowLevelInputAndOutput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Naming and Finding Files\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NamingAndFindingFiles"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Files for Packages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FilesForPackages"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Files and Directories\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingFilesAndDirectories"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Importing and Exporting Files\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ImportingAndExportingFiles"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reading Textual Data\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ReadingTextualData"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Searching Files\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/SearchingFiles"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Searching and Reading Strings\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SearchingAndReadingStrings"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"MathLink and External Program Communication\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathLinkAndExternalProgramCommunicationOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"How MathLink Is Used\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/HowMathLinkIsUsed"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing Existing MathLink\[Hyphen]Compatible Programs\"\>", - - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingExistingMathLinkCompatiblePrograms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Up External Functions to Be Called from Mathematica\"\ -\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SettingUpExternalFunctionsToBeCalledFromMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Handling Lists, Arrays and Other Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/HandlingListsArraysAndOtherExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Portability of MathLink Programs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PortabilityOfMathLinkPrograms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Using MathLink to Communicate between Mathematica \ -Sessions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UsingMathLinkToCommunicateBetweenMathematicaSessions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Calling Subsidiary Mathematica Processes\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CallingSubsidiaryMathematicaProcesses"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Two\[Hyphen]Way Communication with External Programs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TwoWayCommunicationWithExternalPrograms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Running Programs on Remote Computers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RunningProgramsOnRemoteComputers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Running External Programs under a Debugger\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RunningExternalProgramsUnderADebugger"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Expressions in External Programs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingExpressionsInExternalPrograms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Error and Interrupt Handling\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ErrorAndInterruptHandling"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Running Mathematica from Within an External Program\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RunningMathematicaFromWithinAnExternalProgram"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Global Aspects of Mathematica Sessions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GlobalAspectsOfMathematicaSessionsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Main Loop\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/TheMainLoop"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Dialogs\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Dialogs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Memory Management\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MemoryManagement"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Global System Information\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GlobalSystemInformation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mathematica Sessions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathematicaSessions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"System Administration for Network Licenses\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemAdministrationForNetworkLicensesOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"What is MathLM?\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/WhatIsMathLM"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing MathLM\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingMathLM"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Launching MathLM\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/LaunchingMathLM"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Logging MathLM\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/LoggingMathLM"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Monitoring MathLM\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MonitoringMathLM"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Restricting and Reserving Licenses\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/RestrictingAndReservingLicenses"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Troubleshooting MathLM\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TroubleshootingMathLM"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing Mathematica on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingMathematicaOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Launching Mathematica on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LaunchingMathematicaOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing the Installation on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingTheInstallationOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Configuration Files on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConfigurationFilesOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Systemwide Defaults on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemwideDefaultsOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Troubleshooting on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TroubleshootingOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing Mathematica on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingMathematicaOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Launching Mathematica on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LaunchingMathematicaOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing the Installation on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingTheInstallationOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Configuration Files on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConfigurationFilesOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Systemwide Defaults on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemwideDefaultsOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Fonts on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FontsOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Troubleshooting on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TroubleshootingOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing Mathematica on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingMathematicaOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Launching Mathematica on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LaunchingMathematicaOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing the Installation on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingTheInstallationOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Configuration Files on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConfigurationFilesOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Systemwide Defaults on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemwideDefaultsOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Troubleshooting on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TroubleshootingOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"System Administration for Single-User Licenses\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemAdministrationForSingleUserLicensesOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing Mathematica on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingMathematicaOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Launching Mathematica on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LaunchingMathematicaOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing the Installation on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingTheInstallationOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Configuration Files on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConfigurationFilesOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Systemwide Defaults on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemwideDefaultsOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Troubleshooting on Windows\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TroubleshootingOnWindows"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing Mathematica on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingMathematicaOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Launching Mathematica on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LaunchingMathematicaOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing the Installation on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingTheInstallationOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Configuration Files on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConfigurationFilesOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Systemwide Defaults on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemwideDefaultsOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Fonts on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FontsOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Troubleshooting on Unix and Linux\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TroubleshootingOnUnixAndLinux"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Installing Mathematica on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/InstallingMathematicaOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Launching Mathematica on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LaunchingMathematicaOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing the Installation on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TestingTheInstallationOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Configuration Files on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConfigurationFilesOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Systemwide Defaults on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SystemwideDefaultsOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Troubleshooting on Mac OS X\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TroubleshootingOnMacOSX"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell["Advanced Mathematics in Mathematica", "Subtitle", - ShowGroupOpener->True, - CellMargins->{{Inherited, Inherited}, {15, 30}}], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NumbersOverview"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Types of Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/TypesOfNumbers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numeric Quantities\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericQuantities"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Digits in Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/DigitsInNumbers"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Precision\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalPrecision"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Arbitrary\[Hyphen]Precision Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ArbitraryPrecisionNumbers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Machine\[Hyphen]Precision Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MachinePrecisionNumbers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Interval Arithmetic\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntervalArithmetic"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Indeterminate and Infinite Results\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IndeterminateAndInfiniteResults"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Controlling Numerical Evaluation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ControllingNumericalEvaluation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Mathematical Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathematicalFunctionsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Naming Conventions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NamingConventions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Piecewise Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PiecewiseFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Pseudorandom Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PseudorandomNumbers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integer and Number Theoretic Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegerAndNumberTheoreticalFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Combinatorial Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CombinatorialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Elementary Transcendental Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ElementaryTranscendentalFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Functions That Do Not Have Unique Values\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionsThatDoNotHaveUniqueValues"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mathematical Constants\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathematicalConstants"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Orthogonal Polynomials\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OrthogonalPolynomials"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Special Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Gamma and Related Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Zeta and Related Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exponential Integral and Related Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Error Function and Related Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Bessel and Related Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Legendre and Related Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Confluent Hypergeometric Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Hypergeometric Functions and Generalizations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Product Log Function\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Elliptic Integrals and Elliptic Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EllipticIntegralsAndEllipticFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Elliptic Integrals\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EllipticIntegralsAndEllipticFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Elliptic Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EllipticIntegralsAndEllipticFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Elliptic Modular Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EllipticIntegralsAndEllipticFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generalized Elliptic Integrals and Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EllipticIntegralsAndEllipticFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Mathieu and Related Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathieuAndRelatedFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Algebraic Manipulation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AlgebraicManipulationOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Structural Operations on Polynomials\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StructuralOperationsOnPolynomials"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Finding the Structure of a Polynomial\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FindingTheStructureOfAPolynomial"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Structural Operations on Rational Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StructuralOperationsOnRationalExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Algebraic Operations on Polynomials\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AlgebraicOperationsOnPolynomials"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Polynomials Modulo Primes\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PolynomialsModuloPrimes"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Polynomials over Algebraic Number Fields\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/PolynomialsOverAlgebraicNumberFields"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Trigonometric Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TrigonometricExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Expressions Involving Complex Variables\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ExpressionsInvolvingComplexVariables"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Logical and Piecewise Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LogicalAndPiecewiseFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Simplification\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Simplification"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Using Assumptions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UsingAssumptions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Equations and Inequalities\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingEquationsAndInequalitiesOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Representation of Equations and Solutions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheRepresentationOfEquationsAndSolutions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations in One Variable\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EquationsInOneVariable"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Algebraic Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/AlgebraicNumbers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Simultaneous Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SimultaneousEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generic and Non\[Hyphen]Generic Solutions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GenericAndNonGenericSolutions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Eliminating Variables\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EliminatingVariables"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Solving Logical Combinations of Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SolvingLogicalCombinationsOfEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inequalities\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/Inequalities-ManipulatingEquationsAndInequalities"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations and Inequalities over Domains\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/EquationsAndInequalitiesOverDomains"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Representation of Solution Sets\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheRepresentationOfSolutionSets"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Quantifiers\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Quantifiers"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Minimization and Maximization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MinimizationAndMaximization"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Calculus\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CalculusOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Differentiation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Differentiation"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Total Derivatives\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TotalDerivatives"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Derivatives of Unknown Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DerivativesOfUnknownFunctions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Representation of Derivatives\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheRepresentationOfDerivatives"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Defining Derivatives\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DefiningDerivatives"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Indefinite Integrals\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IndefiniteIntegrals"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integrals That Can and Cannot Be Done\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegralsThatCanAndCannotBeDone"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Definite Integrals\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DefiniteIntegrals"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integrals over Regions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegralsOverRegions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Manipulating Integrals in Symbolic Form\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ManipulatingIntegralsInSymbolicForm"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Differential Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DifferentialEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Integral Transforms and Related Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegralTransformsAndRelatedOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Laplace Transforms\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegralTransformsAndRelatedOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Fourier Transforms\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegralTransformsAndRelatedOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Z Transforms\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/IntegralTransformsAndRelatedOperations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Generalized Functions and Related Objects\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/GeneralizedFunctionsAndRelatedObjects"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Differential Equation Solving with DSolve\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/DSolveOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction to Differential Equation Solving with \ -DSolve\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroduction"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Classification of Differential Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveClassificationOfDifferentialEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Overview of ODEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroductionToODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Straight Integration\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveStraightIntegration"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Separable Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSeparableEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Homogeneous Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveHomogeneousEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Linear Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearFirstOrderEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inverse Linear Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveInverseLinearEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Bernoulli Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveBernoulliEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Riccati Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveRiccatiEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exact Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveExactEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Clairaut Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveClairautEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Abel Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveAbelEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Chini Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveChiniEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Overview of Linear Second-Order ODEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroductionToLinearSecondOrderODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations with Constant Coefficients\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearSecondOrderEquationsWithConstantCoefficients"]\ -, - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Euler and Legendre Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSecondOrderEulerAndLegendreEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exact Linear Second-Order Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveExactLinearSecondOrderODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations with Solutions Involving Special Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearSecondOrderSpecialFunctionODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations with Rational Coefficients\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearSecondOrderODEsWithRationalCoefficients"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations with Non-Rational Coefficients\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearSecondOrderODEsWithNonRationalCoefficients"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inhomogeneous Linear Second-Order Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearSecondOrderInhomogeneousEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Nonlinear Second-Order ODEs \"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveNonlinearSecondOrderODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Overview of Higher-Order ODEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroductionToHigherOrderODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Equations with Constant Coefficients\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveHigherOrderODEsWithConstantCoefficients"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Euler and Legendre Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveHigherOrderEulerAndLegendreEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exact Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveHigherOrderExactEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Other Types of Higher-Order ODEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveFurtherHigherOrderODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction to Systems of ODEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroductionToSystemsOfODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Linear Systems of ODEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSystemsOfLinearODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Nonlinear Systems of ODEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSystemsOfNonlinearODEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Nonlinear ODEs with Lie Symmetries\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLieSymmetryMethods"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Introduction to PDEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroductionToPDEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Linear and Quasi-Linear PDEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearAndQuasiLinearFirstOrderPDEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Nonlinear PDEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveNonlinearFirstOrderPDEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Second-Order PDEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSecondOrderPDEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction to DAEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroductionToDAEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Examples of DAEs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveExamplesOfDAEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction to Initial and Boundary Value Problems\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveIntroductionToBVPs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Linear IVPs and BVPs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveLinearBVPs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Nonlinear IVPs and BVPs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveNonlinearBVPs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"IVPs with Piecewise Coefficients\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolvePiecewiseBVPs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/WorkingWithDSolveIntroduction"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Up the Problem\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSettingUpTheProblem"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Verification of the Solution\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSolutionVerification"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Plotting the Solution\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolvePlottingTheSolution"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generated Parameters\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveGeneratedParametersOption"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic Parameters and Inexact Quantities\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveSymbolicAndInexactQuantities"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Is the Problem Well-Posed?\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveWellPosedness"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"References\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/DSolveReferences"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Series, Limits and Residues\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SeriesLimitsAndResiduesOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Making Power Series Expansions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MakingPowerSeriesExpansions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Representation of Power Series\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheRepresentationOfPowerSeries"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Operations on Power Series\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/OperationsOnPowerSeries"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Composition and Inversion of Power Series\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CompositionAndInversionOfPowerSeries"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Converting Power Series to Normal Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConvertingPowerSeriesToNormalExpressions"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Solving Equations Involving Power Series\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SolvingEquationsInvolvingPowerSeries"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Summation of Series\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SummationOfSeries"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Solving Recurrence Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SolvingRecurrenceEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Finding Limits\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/FindingLimits"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Residues\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Residues"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Linear Algebra in Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraIntroduction#509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Tensors and Arrays\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraIntroduction#374996618"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Matrices as Mathematica Expressions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraIntroduction#1127257628"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Expression Input and Output\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraIntroduction#1564598842"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Design Principles of Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraIntroduction#207795216"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrix and Tensor Operations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1023128168"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Building Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#441715480"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Special Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1887778180"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Structural Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#223720584"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Pieces of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1678167046"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Multiple Pieces\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#288135948"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Pieces of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1626148827"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Multiple Pieces\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#289617502"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Extracting Submatrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#849568979"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Deleting Rows and Columns\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#2028205186"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inserting Rows and Columns\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#964961827"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Extending Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#782554218"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Transpose\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#11316850"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rotating Elements\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#654023951"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1736222906"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Further Structural Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#528156332"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Element-wise Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1701521313"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Listability\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#540401315"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Map\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#188079645"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Vectors and Tensors\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#112899229"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing Vectors and Tensors\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1062677296"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Visualization of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1361817013"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Formatting Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1886656195"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Plotting Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1336717728"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Import and Export of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#2053293398"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrix Multiplication\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1896011669"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Outer Product\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#520172951"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Visualization of the Outer Product\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1814519952"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generalized Inner Product\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1622139970"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrix Permutations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#1318022893"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Permutation Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixAndTensorOperations#384051338"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Working with Sparse Arrays\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1619024906"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Basic Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1588951893"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"SparseArray\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1458825321"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rule Inputs for SparseArray\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1126881263"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Banded Sparse Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#69082539"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Identity and Diagonal Sparse Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#386554746"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Normal\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1483534657"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ArrayRules\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1554122061"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Structural Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#382555551"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Pieces of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#43873582"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Multiple Pieces\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#980139236"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Pieces of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1033045979"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Setting Multiple Pieces\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1718872299"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Extracting Submatrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#2116455801"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Deleting Rows and Columns\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#503342974"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inserting Rows and Columns\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#812208252"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Extending Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1326060419"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Transpose\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1525842641"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rotating Elements\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#877282493"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Testing Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1013005059"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Further Structural Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1896109973"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Element-wise Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#430873687"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Listability\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1542041473"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Map\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#2077369385"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Visualization of Sparse Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1853380947"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Formatting Sparse Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1305822102"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Plotting Sparse Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1191044059"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Import and Export of Sparse Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#212323487"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrix Multiplication\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#243730537"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Outer Product\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1885795684"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Matrix Permutations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#1180395712"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Converting Equations to Sparse Arrays\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#139087150"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"SparseArray Data Format\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraSparseArrays#483612173"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrix Computations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1927833614"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Basic Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1060011943"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Norms\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#832278785"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"NullSpace\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#478394165"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rank\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#2035970465"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reduced Row Echelon Form\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#2032866165"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Inverse\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1798152178"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"PseudoInverse\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1120972426"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Determinant\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1665558708"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Minors\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1595477023"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Solving Linear Systems\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#81663253"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Singular Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#438728183"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Homogeneous Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#534320490"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Estimating and Calculating Accuracy\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1668277829"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic and Exact Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1644685080"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Row Reduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#644279649"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Saving the Factorization\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1974718471"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#834729047"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"LAPACK\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1131477137"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Multifrontal\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1415618539"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Krylov\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1643755774"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Cholesky\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1549309818"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1813753518"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Least Squares Solutions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#563250646"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Data Fitting\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1737956870"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Eigensystem Computations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1705931980"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Eigensystem Properties\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#723589929"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Diagonalizing a Matrix\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1770480598"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic and Exact Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1937669982"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generalized Eigenvalues\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#524353415"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#905279933"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"LAPACK\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1499161194"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Arnoldi\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1833787992"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#344887306"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrix Decompositions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#837293883"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"LU Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#849593972"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Cholesky Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1567526616"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Cholesky and LU Factorizations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#966681026"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Orthogonalization\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#464885506"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"QR Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1662286926"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Solving Systems of Equations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#841776984"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Singular Value Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#315998326"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generalized Singular Values\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#915032469"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#2106677120"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Schur Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#225662794"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generalized Schur Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#811895271"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#35657259"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Jordan Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1994258536"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Functions of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixComputations#1131563790"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrix Types\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#1880892864"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numbers in Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#139211047"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Exact versus Approximate Numbers\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#1831846039"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mixed Mode Arithmetic\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#1284345793"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Matrices in Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#77896732"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Standard Numerical Techniques\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#963685160"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Arbitrary-Precision Numerical Techniques\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#1753145835"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic Algebra Techniques\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#1095335974"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mixed Mode Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#1172699025"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Complex Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#411747335"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Arbitrary-Precision Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraMatrixTypes#2139022291"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Performance of Linear Algebra Computation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#195254286"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Packed Arrays\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1945433762"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Packed Array Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#995975105"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Packed Array Operations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#41338579"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Packed Array Summary\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#169320987"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Programming Efficiency\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1030559832"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Measuring Performance\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1826376848"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Vectorizing Loops\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1352766973"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"List Creation\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1048970201"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"List Updating\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#291032650"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Using Built-in Support\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1145089169"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"A Slow Way\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1855711455"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"A Faster Way\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#460055094"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Also Fast but Neater\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#663127012"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Matrix Contents\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#478605279"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mixed Symbolic/Numerical Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#92425055"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Mixed Numerical Type Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1705346414"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integer Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#535763928"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Expression Efficiency\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1857660297"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Updating of Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1264346631"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Appending to Matrices\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraPerformance#1750402393"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Linear Algebra Examples\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#349852864"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Matrix Ordering\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#1945860599"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Full Rank Least Squares Solutions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#967762464"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Least Squares Cholesky\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#899751076"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Least Squares QR\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#701643607"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Minimization of 1 and Infinity Norms\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#601898483"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"One-Norm Minimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#526704053"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Infinity-Norm Minimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#1503089771"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Finite Difference Solutions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#1711482715"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Mesh Partitioning\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#1370044451"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Data\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#1594202747"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Plotting the Mesh\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#846283239"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Laplacian\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#455167669"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Fiedler Vector\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#1726888774"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Partitioning the Nodes\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#1327004163"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Matrix Functions with NDSolve\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraExamples#747736829"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"References\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#342426796"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Software References\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#2058470059"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ARPACK\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#744728443"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ATLAS\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#342575303"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Harwell-Boeing\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#1350971188"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Matrix Market\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#1964229445"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"METIS\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#1290592593"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"TAUCS\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#165728992"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"UMFPACK\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#83486633"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Other References\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LinearAlgebraAppendix#95220008"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Operations on Data\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalOperationsOnDataOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Basic Statistics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/BasicStatistics"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Curve Fitting\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/CurveFitting"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Approximate Functions and Interpolation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ApproximateFunctionsAndInterpolation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Discrete Fourier Transforms\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FourierTransforms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Convolutions and Correlations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConvolutionsAndCorrelations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Cellular Automata\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/CellularAutomata"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Operations on Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalOperationsOnFunctionsOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Mathematics in Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalMathematicsInMathematica"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Uncertainties of Numerical Mathematics\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/TheUncertaintiesOfNumericalMathematics"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Integration\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalIntegration"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Evaluation of Sums and Products\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalEvaluationOfSumsAndProducts"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Solution of Polynomial Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalSolutionOfPolynomialEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Root Finding\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalRootFinding"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Solution of Differential Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalSolutionOfDifferentialEquations"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Numerical Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NumericalOptimization"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Controlling the Precision of Results\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ControllingThePrecisionOfResults"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Monitoring and Selecting Algorithms\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MonitoringAndSelectingAlgorithms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Functions with Sensitive Dependence on Their Input\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/FunctionsWithSensitiveDependenceOnTheirInput"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Advanced Numerical Differential Equation Solving in \ -Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolveOverview"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIntroductoryTutorial"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Overview\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIntroductoryTutorial"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"The Design of the NDSolve Framework\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolveDesign"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Features\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#75354863"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Common time stepping\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#1791028983"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Data encapsulation\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#587411179"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Method hierarchy\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#154961554"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"User extensibility\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#1518443729"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Method classes\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#74982980"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Automatic selection and user controllability\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#2101685400"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Shared features\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#1332704694"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Some basic methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#958103344"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Acknowledgements\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDesign#590065589"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ExplicitRungeKutta\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExplicitRungeKutta"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ImplicitRungeKutta\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveImplicitRungeKutta"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"SymplecticPartitionedRungeKutta\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolveSPRK"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Composition and Splitting\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveSplitting"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"DoubleStep\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveDoubleStep"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"EventLocator\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveEventLocator"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Extrapolation\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExtrapolation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"FixedStep\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveFixedStep"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"OrthogonalProjection\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveOrthogonalProjection"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Projection\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveProjection"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"StiffnessSwitching\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveStiffnessSwitching"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ExplicitEuler\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExtrapolation#1712532361"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ExplicitMidpoint\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExtrapolation#1712532361"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ExplicitModifiedMidpoint\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExtrapolation#1712532361"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"LinearlyImplicitEuler\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExtrapolation#1712532361"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"LinearlyImplicitMidpoint\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExtrapolation#1712532361"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"LinearlyImplicitModifiedMidpoint\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveExtrapolation#1712532361"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"LocallyExact\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveLocallyExact"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Method Plug-in Framework\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolvePlugIns"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Partial Differential Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolvePDE"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"The Numerical Method of Lines\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolvePDE"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolvePDE#1699661144"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Spatial Derivative Approximations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolvePDE#1106740037"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Boundary Conditions\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolvePDE#1306392612"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Spatial Error Estimates\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolvePDE#2081642391"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Boundary Value Problems\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolveBVP"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Shooting Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveBVP#659822336"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Chasing Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveBVP#948663323"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Boundary Value Problems with Parameters\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveBVP#3518691"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Differential-Algebraic Equations\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIntroductoryTutorialDAEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIntroductoryTutorialDAEs"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"IDA Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIDAMethod"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Components and Data Structures\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIntroductoryTutorialStateData"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIntroductoryTutorialStateData#2125957807"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Example\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveIntroductoryTutorialStateData#580655648"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Creating NDSolve`StateData Objects\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveStateData"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"ProcessEquations\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveStateData#1805463009"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reinitialize\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveStateData#568926686"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Iterating Solutions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveStateData#1408385626"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Getting Solution Functions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveStateData#1284231932"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"NDSolve`StateData methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveStateData#93858351"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"DifferentialEquations Utility Packages\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/NDSolvePackages"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"InterpolatingFunctionAnatomy\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolvePackages#120436095"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"NDSolveUtilities\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolvePackages#287875440"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"References\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NDSolveReferences"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Advanced Numerical Integration in Mathematica\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"NIntegrate Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntroduction"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Overview\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntroduction#32344101"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Design\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntroduction#951840905"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Features\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntroduction#540272418"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Strategies, rules, and preprocessors\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntroduction#118305364"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"User extensibility\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntroduction#2713904"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Acknowledgements\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntroduction#425413732"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"NIntegrate Integration Strategies\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#235955634"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Adaptive Strategies\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#155948475"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Global Adaptive Strategy\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#137878679"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"MinRecursion and MaxRecursion\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#280704764"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"MaxErrorIncreases\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#285388386"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Example implementation of a global adaptive strategy\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#16672882"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Local Adaptive Strategy\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#19475523"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"MinRecursion and MaxRecursion\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#270286642"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"InitialEstimateRelaxation\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#64704670"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"Partitioning\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#526467531"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reuse of integrand values\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#214095646"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Example implementation of a local adaptive strategy\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#715598439"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"\\\"GlobalAdaptive\\\" versus \\\"LocalAdaptive\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#290792217"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Singularity Handling\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#122144792"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"User specified singularities\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#112801667"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"SingularityHandler\\\" and \\\"SingularityDepth\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#31583791"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Use of the IMT variable transformation\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#150310618"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"IMT transformation by example\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#107913531"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Use of double exponential quadrature\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#225088061"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"IMT \\\"DoubleExponential\\\" no singularity handling for \ -one-dimensional integrals\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#23700706"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"IMT multidimensional singularity handling\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#159907828"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Duffy's coordinates for multidimensional singularity handling\ -\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#738848244"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Duffy's coordinates strategy\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#66551248"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Duffy's coordinates generalization and example implementation\ -\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#354695682"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Ignoring the singularity\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#74051012"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Automatic singularity handling \"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#4135167"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Cauchy principal value integration\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#295594003"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Double-Exponential Strategy\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#526196975"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"MinRecursion and MaxRecursion\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#168459464"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Comparison of double-exponential and Gaussian quadrature\"\>", - - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#140889501"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Convergence rate\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#175923852"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Example implementation of double-exponential quadrature\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#5698822"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"\\\"Trapezoidal\\\" Strategy\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#403370786"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Oscillatory Strategies\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#775797877"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Finite Region Oscillatory Integration\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#144042466"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Extrapolating Oscillatory Strategy \"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#50593814"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Double-Exponential Oscillatory Integration\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#48895312"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Generalized integrals\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#188549426"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Non-algebraic multiplicand\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#662597729"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Crude Monte Carlo and Quasi Monte Carlo Strategies\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#20795380"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"AccuracyGoal and PrecisionGoal\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#35773270"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"MaxPoints\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#1551213"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"RandomSeed\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#605699968"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Stratified crude Monte Carlo integration\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#473354685"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Convergence speed up of the stratified Monte Carlo \ -integration\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#40464370"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Global Adaptive Monte Carlo and Quasi Monte Carlo \ -Strategies\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#65285686"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"MinRecursion and MaxRecursion\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#61206936"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"Partitioning\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#574188911"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"BisectionDithering\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#193092152"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Choice of bisection axis\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#744911582"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Example: Comparison with crude Monte Carlo\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#718032232"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"MultiPeriodic\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#107447537"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Comparison with \\\"MultiDimensionalRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#161179452"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Preprocessors\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#12996145"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"SymbolicPiecewiseSubdivision\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#440163298"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"EvenOddSubdivision\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#172715735"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"OscillatorySelection\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#52803663"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"UnitCubeRescaling\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#46192878"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"SymbolicPreprocessing\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#188031681"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Examples and Applications\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#31617981"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Closed-contour integrals\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#184932443"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Fourier series calculation\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationStrategies#5688699"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"NIntegrate Integration Rules\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#235359397"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integration Rule Specification\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#135207409"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"TrapezoidalRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#618158740"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Romberg quadrature\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#101738258"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"TrapezoidalRule\\\" sampling points and weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#12731638"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"NewtonCotesRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#81663330"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"NewtonCotesRule\\\" sampling points and weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#617627612"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"GaussBerntsenEspelidRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#141675390"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"GaussBerntsenEspelidRule\\\" sampling points and \ -weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#165210023"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"GaussKronrodRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#381359375"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"GaussKronrodRule\\\" sampling points and weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#360328261"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"LobattoKronrodRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#210486704"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"LobattoKronrodRule\\\" sampling points and weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#49911002"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"ClenshawCurtisRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#486402291"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"ClenshawCurtisRule\\\" sampling points and weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#123359709"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"MultiPanelRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#106389821"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"MultiPanelRule\\\" sampling points and weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#362787930"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"CartesianRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#650745857"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"CartesianRule\\\" sampling points and weights\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#643860566"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"MultiDimensionalRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#89177434"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"MultiDimensionalRule\\\" sampling points and weights\"\>", - - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#810793694"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"\\\"MonteCarloRule\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#430697921"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"\\\"AxisSelector\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#364207621"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Comparisons of the Rules\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#233261223"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Number of points in a rule\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#6741536"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Rule comparison\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#870846129"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Examples of Pathological Behavior\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#8354729"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Tricking the error estimator\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#81420002"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Phase errors \"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#599865576"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Index of Technical Terms\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateIntegrationRules#17191326"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"NIntegrate References\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NIntegrateReferences"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Constrained Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationIntroduction#248488806"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Optimization Problems\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationIntroduction#248488806"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Global Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationIntroduction#170940268"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Local Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationIntroduction#171458460"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Solving Optimization Problems\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationIntroduction#32353590"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Linear Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#100661346"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#430238072"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"The LinearProgramming Function\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#113426546"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options for LinearProgramming\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#40914068"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Examples\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#414335858"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Difference Between Interior Point and Simplex and/or Revised \ -Simplex\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#589526112"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Finding Dual Variables\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#224700240"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Dealing with Infeasibility and Unboundedness in the Interior \ -Point Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#512388034"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Method Options of \\\"InteriorPoint\\\"\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#605660219"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Importing Large Data Sets and Solving Large-Scale \ -Problems\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#9813130"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Importing MPS Formatted Files in Equation Form\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#208553956"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Large-Scale Problems: Importing in Matrix and Vector \ -Form\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#445507631"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Free Formatted MPS Files\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#298767088"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Application Examples of Linear Programming\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#261990371"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"L1 Norm Minimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#293106634"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Design of an Optimal Anchor\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#326994842"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Algorithms for Linear Programming\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#38991160"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Simplex and Revised Simplex Algorithms\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#160402625"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Interior Point Algorithm\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLinearProgramming#155201634"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Nonlinear Local Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#85183321"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#469184158"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"The FindMinimum Function\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#73716527"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Options for FindMinimum\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#396232162"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Examples of FindMinimum\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#804055587"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Finding a Global Minimum\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#92384034"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"An Application Example\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#609426104"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Limitations of Interior Point Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#417182119"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Algorithms for Constrained Local Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#442312913"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Interior Point Algorithm\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationLocalNumerical#2552526"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Nonlinear Global Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#85183321"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#469184158"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The NMinimize Function\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#217856200"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Numerical Algorithms for Constrained Global Optimization\"\>", - - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#252245038"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Nelder\[Dash]Mead\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#323477034"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Differential Evolution\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#24713453"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Simulated Annealing\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#7062708"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Random Search\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationGlobalNumerical#155930577"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Exact Global Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#412364824"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Algorithms\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#248466559"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Optimization by Cylindrical Algebraic Decomposition\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#828680012"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Examples\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#370765765"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Customized CAD Algorithm for Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#4979907"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Reduction to Minimizing a Coordinate Function\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#211764667"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Projection Phase of CAD\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#215663124"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Lifting Phase of CAD\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#431999683"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Strict Inequality Constraints\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#289075302"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Linear Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#765665707"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Univariate Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#132591628"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Optimization by Finding Stationary and Singular Points\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#60567692"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Optimization over the Integers\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#7488435"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Integer Linear Programming\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#683534434"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Optimization over the Reals Combined with Integer Solution \ -Finding\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationExact#544345886"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Comparison of Constrained Optimization Functions\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationComparison#85183321"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Constrained Optimization References\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/ConstrainedOptimizationReferences"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Unconstrained Optimization\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationIntroduction#509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationIntroductionLocalMinimization#\ -509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Newton's Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationNewtonsMethodMinimum#509267359"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Quasi-Newton Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationQuasiNewtonMethods#509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Gauss-Newton Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationGaussNewtonMethods#509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Nonlinear Conjugate Gradient Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationConjugateGradientMethods#\ -509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Principal Axis Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationPrincipalAxisMethod#509267359"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationIntroductionNonlinearEquations#\ -771134545"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Newton\[CloseCurlyQuote]s Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationNewtonsMethodRoot#456855863"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"The Secant Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationSecantMethod#798406094"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Brent\[CloseCurlyQuote]s Method\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationBrentsMethod#1562437747"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Introduction\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationIntroductionStepControl#\ -1034146184"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Line Search Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationLineSearchMethods#1542627801"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Trust Region Methods\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationTrustRegionMethods#2058254571"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Specifying Derivatives\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationSpecifyingDerivatives#562305099"]\ -, - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Variables and Starting Conditions\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationVariablesAndStartingConditions#\ -1302289373"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Termination Conditions\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationTerminationConditions#\ -1953968666"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Symbolic Evaluation\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationSymbolicEvaluation#147397427"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Plotting Search Data\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationPlottingSearchData#982979262"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Test Problems\"\>", - Appearance->None, - BaseStyle->{"Subsubsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationTestProblems#1407764050"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"References\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/UnconstrainedOptimizationReferences"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Mathematical and Other Notation\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/MathematicalAndOtherNotationOverview"], - Evaluator->Automatic, - Method->"Preemptive"]], "Section", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Special Characters\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/SpecialCharacters-MathematicalAndOtherNotation"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Names of Symbols and Mathematical Objects\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/NamesOfSymbolsAndMathematicalObjects"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Letters and Letter\[Hyphen]like Forms\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Greek Letters\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Variants of English Letters\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms#15689"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Hebrew Letters\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms#15174"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Units and Letter\[Hyphen]like Mathematical Symbols\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms#10882"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Shapes, Icons and Geometrical Constructs\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms#5485"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Textual Elements\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms#28815"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Extended Latin Letters\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/LettersAndLetterLikeForms#6089"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[CellGroupData[{ - -Cell[BoxData[ - ButtonBox["\<\"Operators\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Basic Mathematical Operators\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Operators in Calculus and Algebra\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators#29358"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Logical and Other Connectives\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators#23281"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Operators Used to Represent Actions\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators#292"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Bracketing Operators\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators#14771"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Operators Used to Represent Relations\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators#26299"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True], - -Cell[BoxData[ - ButtonBox["\<\"Operators Based on Arrows and Vectors\"\>", - Appearance->None, - BaseStyle->{"Subsubsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup["paclet:tutorial/Operators#27644"], - - Evaluator->Automatic, - Method->"Preemptive"]], "Subsubsection", - ShowGroupOpener->True] -}, Closed]], - -Cell[BoxData[ - ButtonBox["\<\"Structural Elements and Keyboard Characters\"\>", - Appearance->None, - BaseStyle->{"Subsection", ShowStringCharacters -> False}, - ButtonFrame->None, - ButtonFunction:>Documentation`HelpLookup[ - "paclet:tutorial/StructuralElementsAndKeyboardCharacters"], - Evaluator->Automatic, - Method->"Preemptive"]], "Subsection", - ShowGroupOpener->True] -}, Closed]] -}, Closed]] -}, Open ]] -}, -WindowSize->{810, 774}, -WindowMargins->{{Automatic, 292}, {158, Automatic}}, -FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (June 19, 2007)", -StyleDefinitions->FrontEnd`FileName[{"Book"}, "Textbook.nb", - CharacterEncoding -> "WindowsANSI"] -] -(* End of Notebook Content *) - -(* Internal cache information *) -(*CellTagsOutline -CellTagsIndex->{} -*) -(*CellTagsIndex -CellTagsIndex->{} -*) -(*NotebookFileOutline -Notebook[{ -Cell[CellGroupData[{ -Cell[590, 23, 50, 0, 203, "Title"], -Cell[643, 25, 184, 4, 102, "Author"], -Cell[CellGroupData[{ -Cell[852, 33, 133, 2, 108, "Subtitle"], -Cell[CellGroupData[{ -Cell[1010, 39, 335, 9, 81, "Section"], -Cell[1348, 50, 330, 9, 51, "Subsection"], -Cell[1681, 61, 341, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[2059, 75, 344, 9, 81, "Section"], -Cell[2406, 86, 343, 9, 51, "Subsection"], -Cell[2752, 97, 363, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[3152, 111, 367, 9, 81, "Section"], -Cell[3522, 122, 323, 9, 51, "Subsection"], -Cell[3848, 133, 314, 8, 36, "Subsection"], -Cell[4165, 143, 329, 9, 36, "Subsection"], -Cell[4497, 154, 318, 8, 36, "Subsection"], -Cell[4818, 164, 316, 8, 36, "Subsection"], -Cell[5137, 174, 318, 8, 36, "Subsection"], -Cell[5458, 184, 330, 9, 36, "Subsection"], -Cell[5791, 195, 326, 9, 36, "Subsection"], -Cell[6120, 206, 328, 9, 36, "Subsection"], -Cell[6451, 217, 330, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[6818, 231, 341, 9, 81, "Section"], -Cell[7162, 242, 309, 8, 51, "Subsection"], -Cell[7474, 252, 348, 9, 36, "Subsection"], -Cell[7825, 263, 345, 9, 36, "Subsection"], -Cell[8173, 274, 363, 9, 36, "Subsection"], -Cell[8539, 285, 318, 8, 36, "Subsection"], -Cell[8860, 295, 344, 9, 36, "Subsection"], -Cell[9207, 306, 380, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[9624, 320, 344, 9, 81, "Section"], -Cell[9971, 331, 335, 9, 51, "Subsection"], -Cell[10309, 342, 328, 9, 36, "Subsection"], -Cell[10640, 353, 336, 9, 36, "Subsection"], -Cell[10979, 364, 350, 9, 36, "Subsection"], -Cell[11332, 375, 373, 9, 36, "Subsection"], -Cell[11708, 386, 337, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[12082, 400, 351, 9, 81, "Section"], -Cell[12436, 411, 346, 9, 51, "Subsection"], -Cell[12785, 422, 362, 9, 36, "Subsection"], -Cell[13150, 433, 353, 9, 36, "Subsection"], -Cell[13506, 444, 352, 9, 36, "Subsection"], -Cell[13861, 455, 335, 9, 36, "Subsection"], -Cell[14199, 466, 342, 9, 36, "Subsection"], -Cell[14544, 477, 375, 9, 36, "Subsection"], -Cell[14922, 488, 332, 9, 36, "Subsection"], -Cell[15257, 499, 333, 9, 36, "Subsection"], -Cell[15593, 510, 342, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[15972, 524, 341, 9, 81, "Section"], -Cell[16316, 535, 332, 9, 51, "Subsection"], -Cell[16651, 546, 327, 9, 36, "Subsection"], -Cell[16981, 557, 359, 9, 36, "Subsection"], -Cell[17343, 568, 357, 9, 36, "Subsection"], -Cell[17703, 579, 369, 9, 36, "Subsection"], -Cell[18075, 590, 347, 9, 36, "Subsection"], -Cell[18425, 601, 374, 9, 36, "Subsection"], -Cell[18802, 612, 376, 9, 36, "Subsection"], -Cell[19181, 623, 340, 9, 36, "Subsection"], -Cell[19524, 634, 345, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[19906, 648, 337, 9, 81, "Section"], -Cell[20246, 659, 344, 9, 51, "Subsection"], -Cell[20593, 670, 311, 8, 36, "Subsection"], -Cell[20907, 680, 324, 9, 36, "Subsection"], -Cell[21234, 691, 307, 8, 36, "Subsection"], -Cell[21544, 701, 354, 9, 36, "Subsection"], -Cell[21901, 712, 326, 9, 36, "Subsection"], -Cell[22230, 723, 337, 9, 36, "Subsection"], -Cell[22570, 734, 343, 9, 36, "Subsection"], -Cell[22916, 745, 312, 8, 36, "Subsection"], -Cell[23231, 755, 301, 8, 36, "Subsection"], -Cell[23535, 765, 330, 9, 36, "Subsection"], -Cell[23868, 776, 355, 9, 36, "Subsection"], -Cell[24226, 787, 378, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[24641, 801, 339, 9, 81, "Section"], -Cell[24983, 812, 345, 9, 51, "Subsection"], -Cell[25331, 823, 364, 9, 36, "Subsection"], -Cell[25698, 834, 343, 9, 36, "Subsection"], -Cell[26044, 845, 355, 9, 36, "Subsection"], -Cell[26402, 856, 345, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[26784, 870, 340, 9, 81, "Section"], -Cell[27127, 881, 328, 9, 51, "Subsection"], -Cell[27458, 892, 337, 9, 36, "Subsection"], -Cell[27798, 903, 334, 9, 36, "Subsection"], -Cell[28135, 914, 358, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[28530, 928, 304, 8, 81, "Section"], -Cell[28837, 938, 345, 9, 51, "Subsection"], -Cell[29185, 949, 336, 9, 36, "Subsection"], -Cell[29524, 960, 331, 9, 36, "Subsection"], -Cell[29858, 971, 336, 9, 36, "Subsection"], -Cell[30197, 982, 359, 9, 36, "Subsection"], -Cell[30559, 993, 375, 9, 36, "Subsection"], -Cell[30937, 1004, 318, 8, 36, "Subsection"], -Cell[31258, 1014, 313, 8, 36, "Subsection"], -Cell[31574, 1024, 326, 9, 36, "Subsection"], -Cell[31903, 1035, 368, 9, 36, "Subsection"], -Cell[32274, 1046, 324, 9, 36, "Subsection"], -Cell[32601, 1057, 339, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[32977, 1071, 332, 9, 81, "Section"], -Cell[33312, 1082, 316, 8, 51, "Subsection"], -Cell[33631, 1092, 316, 8, 36, "Subsection"], -Cell[33950, 1102, 348, 9, 36, "Subsection"], -Cell[34301, 1113, 332, 9, 36, "Subsection"], -Cell[34636, 1124, 360, 9, 36, "Subsection"], -Cell[34999, 1135, 334, 9, 36, "Subsection"], -Cell[35336, 1146, 323, 9, 36, "Subsection"], -Cell[35662, 1157, 327, 9, 36, "Subsection"], -Cell[35992, 1168, 299, 8, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[36328, 1181, 345, 9, 81, "Section"], -Cell[36676, 1192, 338, 9, 51, "Subsection"], -Cell[37017, 1203, 332, 9, 36, "Subsection"], -Cell[CellGroupData[{ -Cell[37374, 1216, 347, 9, 36, "Subsection"], -Cell[37724, 1227, 355, 9, 31, "Subsubsection"], -Cell[38082, 1238, 363, 9, 31, "Subsubsection"], -Cell[38448, 1249, 350, 9, 31, "Subsubsection"], -Cell[38801, 1260, 349, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[39187, 1274, 347, 9, 51, "Subsection"], -Cell[39537, 1285, 345, 9, 31, "Subsubsection"], -Cell[39885, 1296, 363, 9, 31, "Subsubsection"], -Cell[40251, 1307, 350, 9, 31, "Subsubsection"], -Cell[40604, 1318, 347, 9, 31, "Subsubsection"], -Cell[40954, 1329, 366, 9, 31, "Subsubsection"], -Cell[41323, 1340, 353, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[41713, 1354, 368, 9, 51, "Subsection"], -Cell[42084, 1365, 357, 9, 31, "Subsubsection"], -Cell[42444, 1376, 342, 9, 31, "Subsubsection"], -Cell[42789, 1387, 348, 9, 31, "Subsubsection"] -}, Closed]], -Cell[43152, 1399, 341, 9, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[43518, 1412, 353, 9, 36, "Subsection"], -Cell[43874, 1423, 347, 9, 31, "Subsubsection"], -Cell[44224, 1434, 390, 9, 31, "Subsubsection"], -Cell[44617, 1445, 371, 9, 31, "Subsubsection"], -Cell[44991, 1456, 360, 9, 31, "Subsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[45400, 1471, 352, 9, 81, "Section"], -Cell[45755, 1482, 335, 9, 51, "Subsection"], -Cell[46093, 1493, 358, 9, 36, "Subsection"], -Cell[46454, 1504, 398, 10, 36, "Subsection"], -Cell[46855, 1516, 326, 9, 36, "Subsection"], -Cell[47184, 1527, 346, 9, 36, "Subsection"], -Cell[47533, 1538, 360, 9, 36, "Subsection"], -Cell[47896, 1549, 369, 9, 36, "Subsection"], -Cell[48268, 1560, 345, 9, 36, "Subsection"], -Cell[48616, 1571, 338, 9, 36, "Subsection"], -Cell[48957, 1582, 379, 9, 36, "Subsection"], -Cell[49339, 1593, 333, 9, 36, "Subsection"], -Cell[49675, 1604, 330, 9, 36, "Subsection"], -Cell[50008, 1615, 360, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[50405, 1629, 353, 9, 81, "Section"], -Cell[50761, 1640, 378, 9, 51, "Subsection"], -Cell[51142, 1651, 350, 9, 36, "Subsection"], -Cell[51495, 1662, 346, 9, 36, "Subsection"], -Cell[51844, 1673, 348, 9, 36, "Subsection"], -Cell[52195, 1684, 346, 9, 36, "Subsection"], -Cell[52544, 1695, 353, 9, 36, "Subsection"], -Cell[52900, 1706, 361, 9, 36, "Subsection"], -Cell[53264, 1717, 382, 9, 36, "Subsection"], -Cell[53649, 1728, 341, 9, 36, "Subsection"], -Cell[53993, 1739, 305, 8, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[54335, 1752, 351, 9, 81, "Section"], -Cell[54689, 1763, 386, 9, 51, "Subsection"], -Cell[55078, 1774, 345, 9, 36, "Subsection"], -Cell[55426, 1785, 348, 9, 36, "Subsection"], -Cell[55777, 1796, 367, 9, 36, "Subsection"], -Cell[56147, 1807, 339, 9, 36, "Subsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[56535, 1822, 119, 2, 67, "Subtitle"], -Cell[CellGroupData[{ -Cell[56679, 1828, 320, 9, 81, "Section"], -Cell[57002, 1839, 344, 9, 51, "Subsection"], -Cell[57349, 1850, 342, 9, 36, "Subsection"], -Cell[57694, 1861, 355, 9, 36, "Subsection"], -Cell[58052, 1872, 331, 9, 36, "Subsection"], -Cell[58386, 1883, 360, 9, 36, "Subsection"], -Cell[58749, 1894, 331, 9, 36, "Subsection"], -Cell[59083, 1905, 333, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[59453, 1919, 339, 9, 81, "Section"], -Cell[59795, 1930, 348, 9, 51, "Subsection"], -Cell[60146, 1941, 349, 9, 36, "Subsection"], -Cell[60498, 1952, 385, 9, 36, "Subsection"], -Cell[60886, 1963, 372, 9, 36, "Subsection"], -Cell[61261, 1974, 316, 8, 36, "Subsection"], -Cell[61580, 1984, 348, 9, 36, "Subsection"], -Cell[61931, 1995, 378, 9, 36, "Subsection"], -Cell[62312, 2006, 373, 9, 36, "Subsection"], -Cell[62688, 2017, 335, 9, 36, "Subsection"], -Cell[63026, 2028, 334, 9, 36, "Subsection"], -Cell[63363, 2039, 307, 8, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[63707, 2052, 314, 9, 81, "Section"], -Cell[64024, 2063, 326, 9, 51, "Subsection"], -Cell[64353, 2074, 368, 9, 36, "Subsection"], -Cell[64724, 2085, 340, 9, 36, "Subsection"], -Cell[65067, 2096, 372, 9, 36, "Subsection"], -Cell[65442, 2107, 352, 9, 36, "Subsection"], -Cell[65797, 2118, 353, 9, 36, "Subsection"], -Cell[66153, 2129, 326, 9, 36, "Subsection"], -Cell[66482, 2140, 346, 9, 36, "Subsection"], -Cell[66831, 2151, 376, 9, 36, "Subsection"], -Cell[67210, 2162, 350, 9, 36, "Subsection"], -Cell[67563, 2173, 376, 9, 36, "Subsection"], -Cell[67942, 2184, 326, 9, 36, "Subsection"], -Cell[68271, 2195, 326, 9, 36, "Subsection"], -Cell[68600, 2206, 375, 9, 36, "Subsection"], -Cell[68978, 2217, 386, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[69401, 2231, 351, 9, 81, "Section"], -Cell[69755, 2242, 338, 9, 51, "Subsection"], -Cell[70096, 2253, 351, 9, 36, "Subsection"], -Cell[70450, 2264, 347, 9, 36, "Subsection"], -Cell[70800, 2275, 369, 9, 36, "Subsection"], -Cell[CellGroupData[{ -Cell[71194, 2288, 357, 9, 36, "Subsection"], -Cell[71554, 2299, 346, 9, 31, "Subsubsection"], -Cell[71903, 2310, 345, 9, 31, "Subsubsection"], -Cell[72251, 2321, 343, 9, 31, "Subsubsection"], -Cell[72597, 2332, 353, 9, 31, "Subsubsection"], -Cell[72953, 2343, 348, 9, 31, "Subsubsection"], -Cell[73304, 2354, 345, 9, 31, "Subsubsection"], -Cell[73652, 2365, 345, 9, 31, "Subsubsection"], -Cell[74000, 2376, 351, 9, 31, "Subsubsection"], -Cell[74354, 2387, 345, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[74736, 2401, 342, 9, 51, "Subsection"], -Cell[75081, 2412, 341, 9, 31, "Subsubsection"], -Cell[75425, 2423, 340, 9, 31, "Subsubsection"], -Cell[75768, 2434, 344, 9, 31, "Subsubsection"], -Cell[76115, 2445, 343, 9, 31, "Subsubsection"], -Cell[76461, 2456, 345, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[76843, 2470, 339, 9, 51, "Subsection"], -Cell[77185, 2481, 351, 9, 31, "Subsubsection"], -Cell[77539, 2492, 352, 9, 31, "Subsubsection"], -Cell[77894, 2503, 346, 9, 31, "Subsubsection"], -Cell[78243, 2514, 344, 9, 31, "Subsubsection"], -Cell[78590, 2525, 352, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[78979, 2539, 366, 9, 51, "Subsection"], -Cell[79348, 2550, 375, 9, 31, "Subsubsection"], -Cell[79726, 2561, 360, 9, 31, "Subsubsection"], -Cell[80089, 2572, 357, 9, 31, "Subsubsection"], -Cell[80449, 2583, 363, 9, 31, "Subsubsection"], -Cell[80815, 2594, 388, 9, 31, "Subsubsection"] -}, Closed]], -Cell[81218, 2606, 350, 9, 51, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[81605, 2620, 333, 9, 81, "Section"], -Cell[81941, 2631, 328, 9, 51, "Subsection"], -Cell[82272, 2642, 359, 9, 36, "Subsection"], -Cell[82634, 2653, 312, 8, 36, "Subsection"], -Cell[82949, 2663, 350, 9, 36, "Subsection"], -Cell[83302, 2674, 336, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[83675, 2688, 367, 9, 81, "Section"], -Cell[84045, 2699, 349, 9, 51, "Subsection"], -Cell[84397, 2710, 371, 9, 36, "Subsection"], -Cell[84771, 2721, 328, 9, 36, "Subsection"], -Cell[85102, 2732, 344, 9, 36, "Subsection"], -Cell[85449, 2743, 365, 9, 36, "Subsection"], -Cell[85817, 2754, 354, 9, 36, "Subsection"], -Cell[86174, 2765, 344, 9, 36, "Subsection"], -Cell[86521, 2776, 356, 9, 36, "Subsection"], -Cell[86880, 2787, 379, 9, 36, "Subsection"], -Cell[87262, 2798, 381, 9, 36, "Subsection"], -Cell[87646, 2809, 341, 9, 36, "Subsection"], -Cell[87990, 2820, 354, 9, 36, "Subsection"], -Cell[88347, 2831, 339, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[88723, 2845, 346, 9, 81, "Section"], -Cell[89072, 2856, 339, 9, 51, "Subsection"], -Cell[89414, 2867, 374, 9, 36, "Subsection"], -Cell[89791, 2878, 309, 8, 36, "Subsection"], -Cell[90103, 2888, 356, 9, 36, "Subsection"], -Cell[90462, 2899, 336, 9, 36, "Subsection"], -Cell[90801, 2910, 377, 9, 36, "Subsection"], -Cell[91181, 2921, 356, 9, 36, "Subsection"], -Cell[91540, 2932, 313, 8, 36, "Subsection"], -Cell[91856, 2942, 346, 9, 36, "Subsection"], -Cell[92205, 2953, 370, 9, 36, "Subsection"], -Cell[92578, 2964, 328, 9, 36, "Subsection"], -Cell[92909, 2975, 331, 9, 36, "Subsection"], -Cell[93243, 2986, 353, 9, 36, "Subsection"], -Cell[93599, 2997, 333, 9, 36, "Subsection"], -Cell[93935, 3008, 357, 9, 36, "Subsection"], -Cell[94295, 3019, 343, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[94675, 3033, 363, 9, 81, "Section"], -Cell[95041, 3044, 344, 9, 51, "Subsection"], -Cell[95388, 3055, 318, 8, 36, "Subsection"], -Cell[95709, 3065, 319, 8, 36, "Subsection"], -Cell[96031, 3075, 362, 9, 36, "Subsection"], -Cell[96396, 3086, 350, 9, 36, "Subsection"], -Cell[96749, 3097, 336, 9, 36, "Subsection"], -Cell[97088, 3108, 346, 9, 36, "Subsection"], -Cell[97437, 3119, 305, 8, 36, "Subsection"], -Cell[97745, 3129, 333, 9, 36, "Subsection"], -Cell[98081, 3140, 352, 9, 36, "Subsection"], -Cell[98436, 3151, 348, 9, 36, "Subsection"], -Cell[98787, 3162, 370, 9, 36, "Subsection"], -Cell[99160, 3173, 368, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[99565, 3187, 340, 9, 81, "Section"], -Cell[99908, 3198, 333, 9, 51, "Subsection"], -Cell[100244, 3209, 333, 9, 36, "Subsection"], -Cell[100580, 3220, 333, 9, 36, "Subsection"], -Cell[100916, 3231, 318, 8, 36, "Subsection"], -Cell[101237, 3241, 330, 9, 36, "Subsection"], -Cell[101570, 3252, 349, 9, 36, "Subsection"], -Cell[101922, 3263, 345, 9, 36, "Subsection"], -Cell[102270, 3274, 318, 8, 36, "Subsection"], -Cell[102591, 3284, 337, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[102965, 3298, 343, 9, 81, "Section"], -Cell[103311, 3309, 339, 9, 51, "Subsection"], -Cell[103653, 3320, 339, 9, 36, "Subsection"], -Cell[103995, 3331, 359, 9, 36, "Subsection"], -Cell[104357, 3342, 359, 9, 36, "Subsection"], -Cell[104719, 3353, 338, 9, 36, "Subsection"], -Cell[105060, 3364, 358, 9, 36, "Subsection"], -Cell[105421, 3375, 342, 9, 36, "Subsection"], -Cell[CellGroupData[{ -Cell[105788, 3388, 329, 9, 36, "Subsection"], -Cell[106120, 3399, 350, 9, 31, "Subsubsection"] -}, Closed]], -Cell[106485, 3411, 341, 9, 51, "Subsection"], -Cell[106829, 3422, 359, 9, 36, "Subsection"], -Cell[107191, 3433, 385, 9, 36, "Subsection"], -Cell[107579, 3444, 364, 9, 36, "Subsection"], -Cell[107946, 3455, 367, 9, 36, "Subsection"], -Cell[108316, 3466, 337, 9, 36, "Subsection"], -Cell[108656, 3477, 360, 9, 36, "Subsection"], -Cell[109019, 3488, 351, 9, 36, "Subsection"], -Cell[109373, 3499, 323, 9, 36, "Subsection"], -Cell[109699, 3510, 305, 8, 36, "Subsection"], -Cell[110007, 3520, 336, 9, 36, "Subsection"], -Cell[110346, 3531, 340, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[110723, 3545, 363, 9, 81, "Section"], -Cell[111089, 3556, 340, 9, 51, "Subsection"], -Cell[111432, 3567, 356, 9, 36, "Subsection"], -Cell[111791, 3578, 352, 9, 36, "Subsection"], -Cell[112146, 3589, 382, 9, 36, "Subsection"], -Cell[112531, 3600, 356, 9, 36, "Subsection"], -Cell[112890, 3611, 348, 9, 36, "Subsection"], -Cell[113241, 3622, 340, 9, 36, "Subsection"], -Cell[113584, 3633, 364, 9, 36, "Subsection"], -Cell[113951, 3644, 364, 9, 36, "Subsection"], -Cell[114318, 3655, 386, 9, 36, "Subsection"], -Cell[114707, 3666, 352, 9, 36, "Subsection"], -Cell[115062, 3677, 360, 9, 36, "Subsection"], -Cell[115425, 3688, 375, 9, 36, "Subsection"], -Cell[115803, 3699, 345, 9, 36, "Subsection"], -Cell[116151, 3710, 346, 9, 36, "Subsection"], -Cell[116500, 3721, 344, 9, 36, "Subsection"], -Cell[116847, 3732, 348, 9, 36, "Subsection"], -Cell[117198, 3743, 348, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[117583, 3757, 341, 9, 81, "Section"], -Cell[117927, 3768, 354, 9, 51, "Subsection"], -Cell[118284, 3779, 362, 9, 36, "Subsection"], -Cell[118649, 3790, 365, 9, 36, "Subsection"], -Cell[119017, 3801, 371, 9, 36, "Subsection"], -Cell[119391, 3812, 392, 9, 36, "Subsection"], -Cell[119786, 3823, 334, 9, 36, "Subsection"], -Cell[120123, 3834, 377, 9, 36, "Subsection"], -Cell[120503, 3845, 324, 9, 36, "Subsection"], -Cell[120830, 3856, 332, 9, 36, "Subsection"], -Cell[121165, 3867, 366, 9, 36, "Subsection"], -Cell[121534, 3878, 333, 9, 36, "Subsection"], -Cell[121870, 3889, 352, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[122259, 3903, 330, 9, 81, "Section"], -Cell[122592, 3914, 363, 9, 51, "Subsection"], -Cell[122958, 3925, 326, 9, 36, "Subsection"], -Cell[123287, 3936, 371, 9, 36, "Subsection"], -Cell[123661, 3947, 338, 9, 36, "Subsection"], -Cell[124002, 3958, 327, 9, 36, "Subsection"], -Cell[124332, 3969, 358, 9, 36, "Subsection"], -Cell[124693, 3980, 348, 9, 36, "Subsection"], -Cell[125044, 3991, 331, 9, 36, "Subsection"], -Cell[125378, 4002, 318, 8, 36, "Subsection"], -Cell[125699, 4012, 348, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[126084, 4026, 380, 9, 81, "Section"], -Cell[126467, 4037, 330, 9, 51, "Subsection"], -Cell[126800, 4048, 396, 10, 36, "Subsection"], -Cell[127199, 4060, 405, 10, 36, "Subsection"], -Cell[127607, 4072, 375, 9, 36, "Subsection"], -Cell[127985, 4083, 354, 9, 36, "Subsection"], -Cell[128342, 4094, 405, 10, 36, "Subsection"], -Cell[128750, 4106, 370, 9, 36, "Subsection"], -Cell[129123, 4117, 384, 9, 36, "Subsection"], -Cell[129510, 4128, 361, 9, 36, "Subsection"], -Cell[129874, 4139, 372, 9, 36, "Subsection"], -Cell[130249, 4150, 379, 9, 36, "Subsection"], -Cell[130631, 4161, 346, 9, 36, "Subsection"], -Cell[130980, 4172, 389, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[131406, 4186, 370, 9, 81, "Section"], -Cell[131779, 4197, 313, 8, 51, "Subsection"], -Cell[132095, 4207, 303, 8, 36, "Subsection"], -Cell[132401, 4217, 326, 9, 36, "Subsection"], -Cell[132730, 4228, 341, 9, 36, "Subsection"], -Cell[133074, 4239, 332, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[133443, 4253, 378, 9, 81, "Section"], -Cell[133824, 4264, 322, 8, 31, "Subsubsection"], -Cell[134149, 4274, 332, 9, 31, "Subsubsection"], -Cell[134484, 4285, 329, 9, 31, "Subsubsection"], -Cell[134816, 4296, 322, 8, 31, "Subsubsection"], -Cell[135141, 4306, 332, 9, 31, "Subsubsection"], -Cell[135476, 4317, 364, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[135865, 4330, 342, 9, 31, "Subsubsection"], -Cell[136210, 4341, 368, 9, 31, "Subsubsubsection"], -Cell[136581, 4352, 366, 9, 26, "Subsubsubsection"], -Cell[136950, 4363, 371, 9, 26, "Subsubsubsection"], -Cell[137324, 4374, 362, 9, 26, "Subsubsubsection"], -Cell[137689, 4385, 362, 9, 26, "Subsubsubsection"], -Cell[138054, 4396, 355, 9, 26, "Subsubsubsection"], -Cell[138412, 4407, 380, 9, 26, "Subsubsubsection"], -Cell[138795, 4418, 378, 9, 26, "Subsubsubsection"], -Cell[139176, 4429, 383, 9, 26, "Subsubsubsection"], -Cell[139562, 4440, 374, 9, 26, "Subsubsubsection"], -Cell[139939, 4451, 374, 9, 26, "Subsubsubsection"], -Cell[140316, 4462, 347, 9, 26, "Subsubsubsection"], -Cell[140666, 4473, 367, 9, 26, "Subsubsubsection"], -Cell[141036, 4484, 368, 9, 26, "Subsubsubsection"], -Cell[141407, 4495, 366, 9, 26, "Subsubsubsection"], -Cell[141776, 4506, 371, 9, 26, "Subsubsubsection"], -Cell[142150, 4517, 362, 9, 26, "Subsubsubsection"], -Cell[142515, 4528, 362, 9, 26, "Subsubsubsection"], -Cell[142880, 4539, 355, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[143284, 4554, 385, 9, 81, "Section"], -Cell[143672, 4565, 368, 9, 31, "Subsubsubsection"], -Cell[144043, 4576, 366, 9, 26, "Subsubsubsection"], -Cell[144412, 4587, 371, 9, 26, "Subsubsubsection"], -Cell[144786, 4598, 362, 9, 26, "Subsubsubsection"], -Cell[145151, 4609, 362, 9, 26, "Subsubsubsection"], -Cell[145516, 4620, 355, 9, 26, "Subsubsubsection"], -Cell[145874, 4631, 380, 9, 26, "Subsubsubsection"], -Cell[146257, 4642, 378, 9, 26, "Subsubsubsection"], -Cell[146638, 4653, 383, 9, 26, "Subsubsubsection"], -Cell[147024, 4664, 374, 9, 26, "Subsubsubsection"], -Cell[147401, 4675, 374, 9, 26, "Subsubsubsection"], -Cell[147778, 4686, 347, 9, 26, "Subsubsubsection"], -Cell[148128, 4697, 367, 9, 26, "Subsubsubsection"], -Cell[148498, 4708, 368, 9, 26, "Subsubsubsection"], -Cell[148869, 4719, 366, 9, 26, "Subsubsubsection"], -Cell[149238, 4730, 371, 9, 26, "Subsubsubsection"], -Cell[149612, 4741, 362, 9, 26, "Subsubsubsection"], -Cell[149977, 4752, 362, 9, 26, "Subsubsubsection"], -Cell[150342, 4763, 355, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[150746, 4778, 129, 2, 67, "Subtitle"], -Cell[CellGroupData[{ -Cell[150900, 4784, 311, 9, 81, "Section"], -Cell[151214, 4795, 319, 8, 51, "Subsection"], -Cell[151536, 4805, 328, 9, 36, "Subsection"], -Cell[151867, 4816, 324, 9, 36, "Subsection"], -Cell[152194, 4827, 330, 9, 36, "Subsection"], -Cell[152527, 4838, 353, 9, 36, "Subsection"], -Cell[152883, 4849, 349, 9, 36, "Subsection"], -Cell[153235, 4860, 330, 9, 36, "Subsection"], -Cell[153568, 4871, 358, 9, 36, "Subsection"], -Cell[153929, 4882, 355, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[154321, 4896, 341, 9, 49, "Section"], -Cell[154665, 4907, 328, 9, 51, "Subsection"], -Cell[154996, 4918, 330, 9, 36, "Subsection"], -Cell[155329, 4929, 330, 9, 36, "Subsection"], -Cell[155662, 4940, 332, 9, 36, "Subsection"], -Cell[155997, 4951, 367, 9, 36, "Subsection"], -Cell[156367, 4962, 338, 9, 36, "Subsection"], -Cell[156708, 4973, 361, 9, 36, "Subsection"], -Cell[157072, 4984, 367, 9, 36, "Subsection"], -Cell[157442, 4995, 336, 9, 36, "Subsection"], -Cell[157781, 5006, 336, 9, 36, "Subsection"], -Cell[CellGroupData[{ -Cell[158142, 5019, 326, 9, 36, "Subsection"], -Cell[158471, 5030, 342, 9, 31, "Subsubsection"], -Cell[158816, 5041, 341, 9, 31, "Subsubsection"], -Cell[159160, 5052, 357, 9, 31, "Subsubsection"], -Cell[159520, 5063, 351, 9, 31, "Subsubsection"], -Cell[159874, 5074, 343, 9, 31, "Subsubsection"], -Cell[160220, 5085, 345, 9, 31, "Subsubsection"], -Cell[160568, 5096, 349, 9, 31, "Subsubsection"], -Cell[160920, 5107, 359, 9, 31, "Subsubsection"], -Cell[161282, 5118, 339, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[161658, 5132, 371, 9, 51, "Subsection"], -Cell[162032, 5143, 354, 9, 31, "Subsubsection"], -Cell[162389, 5154, 354, 9, 31, "Subsubsection"], -Cell[162746, 5165, 362, 9, 31, "Subsubsection"], -Cell[163111, 5176, 380, 9, 31, "Subsubsection"] -}, Closed]], -Cell[163506, 5188, 348, 9, 51, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[163891, 5202, 341, 9, 49, "Section"], -Cell[164235, 5213, 362, 9, 51, "Subsection"], -Cell[164600, 5224, 362, 9, 36, "Subsection"], -Cell[164965, 5235, 379, 9, 36, "Subsection"], -Cell[165347, 5246, 360, 9, 36, "Subsection"], -Cell[165710, 5257, 341, 9, 36, "Subsection"], -Cell[166054, 5268, 369, 9, 36, "Subsection"], -Cell[166426, 5279, 342, 9, 36, "Subsection"], -Cell[166771, 5290, 368, 9, 36, "Subsection"], -Cell[167142, 5301, 352, 9, 36, "Subsection"], -Cell[167497, 5312, 317, 8, 36, "Subsection"], -Cell[167817, 5322, 326, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[168180, 5336, 373, 9, 49, "Section"], -Cell[168556, 5347, 378, 9, 51, "Subsection"], -Cell[168937, 5358, 340, 9, 36, "Subsection"], -Cell[169280, 5369, 326, 9, 36, "Subsection"], -Cell[169609, 5380, 336, 9, 36, "Subsection"], -Cell[169948, 5391, 363, 9, 36, "Subsection"], -Cell[170314, 5402, 334, 9, 36, "Subsection"], -Cell[170651, 5413, 371, 9, 36, "Subsection"], -Cell[171025, 5424, 354, 9, 36, "Subsection"], -Cell[171382, 5435, 367, 9, 36, "Subsection"], -Cell[171752, 5446, 359, 9, 36, "Subsection"], -Cell[172114, 5457, 311, 8, 36, "Subsection"], -Cell[172428, 5467, 349, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[172814, 5481, 314, 9, 49, "Section"], -Cell[173131, 5492, 322, 9, 51, "Subsection"], -Cell[173456, 5503, 326, 9, 36, "Subsection"], -Cell[173785, 5514, 354, 9, 36, "Subsection"], -Cell[174142, 5525, 356, 9, 36, "Subsection"], -Cell[174501, 5536, 332, 9, 36, "Subsection"], -Cell[174836, 5547, 332, 9, 36, "Subsection"], -Cell[175171, 5558, 361, 9, 36, "Subsection"], -Cell[175535, 5569, 328, 9, 36, "Subsection"], -Cell[175866, 5580, 335, 9, 36, "Subsection"], -Cell[176204, 5591, 367, 9, 36, "Subsection"], -Cell[176574, 5602, 336, 9, 36, "Subsection"], -Cell[CellGroupData[{ -Cell[176935, 5615, 373, 9, 36, "Subsection"], -Cell[177311, 5626, 355, 9, 31, "Subsubsection"], -Cell[177669, 5637, 355, 9, 31, "Subsubsection"], -Cell[178027, 5648, 349, 9, 31, "Subsubsection"] -}, Closed]], -Cell[178391, 5660, 371, 9, 51, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[178799, 5674, 341, 8, 49, "Section"], -Cell[179143, 5684, 370, 10, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[179538, 5698, 376, 9, 36, "Subsection"], -Cell[CellGroupData[{ -Cell[179939, 5711, 339, 9, 31, "Subsubsection"], -Cell[180281, 5722, 350, 9, 31, "Subsubsubsection"], -Cell[180634, 5733, 348, 9, 26, "Subsubsubsection"], -Cell[180985, 5744, 352, 9, 26, "Subsubsubsection"], -Cell[181340, 5755, 352, 9, 26, "Subsubsubsection"], -Cell[181695, 5766, 357, 9, 26, "Subsubsubsection"], -Cell[182055, 5777, 348, 9, 26, "Subsubsubsection"], -Cell[182406, 5788, 344, 9, 26, "Subsubsubsection"], -Cell[182753, 5799, 340, 9, 26, "Subsubsubsection"], -Cell[183096, 5810, 346, 9, 26, "Subsubsubsection"], -Cell[183445, 5821, 338, 9, 26, "Subsubsubsection"], -Cell[183786, 5832, 340, 9, 26, "Subsubsubsection"], -Cell[184129, 5843, 382, 9, 26, "Subsubsubsection"], -Cell[184514, 5854, 399, 10, 26, "Subsubsubsection"], -Cell[184916, 5866, 375, 9, 26, "Subsubsubsection"], -Cell[185294, 5877, 372, 9, 26, "Subsubsubsection"], -Cell[185669, 5888, 399, 9, 26, "Subsubsubsection"], -Cell[186071, 5899, 392, 9, 26, "Subsubsubsection"], -Cell[186466, 5910, 399, 9, 26, "Subsubsubsection"], -Cell[186868, 5921, 393, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[187298, 5935, 357, 9, 31, "Subsubsection"], -Cell[187658, 5946, 369, 9, 31, "Subsubsubsection"], -Cell[188030, 5957, 386, 9, 26, "Subsubsubsection"], -Cell[188419, 5968, 375, 9, 26, "Subsubsubsection"], -Cell[188797, 5979, 351, 9, 26, "Subsubsubsection"], -Cell[189151, 5990, 365, 9, 26, "Subsubsubsection"], -Cell[189519, 6001, 369, 9, 26, "Subsubsubsection"], -Cell[189891, 6012, 352, 9, 26, "Subsubsubsection"], -Cell[190246, 6023, 358, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[190619, 6035, 357, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[191001, 6048, 343, 9, 31, "Subsubsection"], -Cell[191347, 6059, 373, 9, 31, "Subsubsubsection"], -Cell[191723, 6070, 348, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[192086, 6082, 337, 9, 31, "Subsubsection"], -Cell[192426, 6093, 343, 9, 31, "Subsubsection"], -Cell[192772, 6104, 335, 9, 31, "Subsubsection"], -Cell[193110, 6115, 374, 9, 31, "Subsubsection"], -Cell[193487, 6126, 335, 9, 31, "Subsubsection"], -Cell[193825, 6137, 341, 9, 31, "Subsubsection"], -Cell[194169, 6148, 350, 9, 31, "Subsubsection"], -Cell[194522, 6159, 340, 9, 31, "Subsubsection"], -Cell[194865, 6170, 346, 9, 31, "Subsubsection"], -Cell[195214, 6181, 353, 9, 31, "Subsubsection"], -Cell[195570, 6192, 345, 9, 31, "Subsubsection"], -Cell[195918, 6203, 350, 9, 31, "Subsubsection"], -Cell[196271, 6214, 375, 9, 31, "Subsubsection"], -Cell[196649, 6225, 344, 9, 31, "Subsubsection"] -}, Closed]], -Cell[197008, 6237, 319, 9, 51, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[197364, 6251, 348, 9, 49, "Section"], -Cell[197715, 6262, 350, 9, 51, "Subsection"], -Cell[198068, 6273, 357, 9, 36, "Subsection"], -Cell[198428, 6284, 342, 9, 36, "Subsection"], -Cell[198773, 6295, 370, 9, 36, "Subsection"], -Cell[199146, 6306, 378, 9, 36, "Subsection"], -Cell[199527, 6317, 369, 9, 36, "Subsection"], -Cell[199899, 6328, 329, 9, 36, "Subsection"], -Cell[200231, 6339, 347, 9, 36, "Subsection"], -Cell[200581, 6350, 316, 8, 36, "Subsection"], -Cell[200900, 6360, 305, 8, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[201242, 6373, 340, 9, 81, "Section"], -Cell[CellGroupData[{ -Cell[201607, 6386, 340, 9, 51, "Subsection"], -Cell[201950, 6397, 352, 9, 31, "Subsubsection"], -Cell[202305, 6408, 370, 9, 31, "Subsubsection"], -Cell[202678, 6419, 362, 9, 31, "Subsubsection"], -Cell[203043, 6430, 366, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[203446, 6444, 370, 9, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[203841, 6457, 364, 9, 31, "Subsubsection"], -Cell[204208, 6468, 370, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[204615, 6482, 368, 9, 31, "Subsubsection"], -Cell[204986, 6493, 380, 9, 31, "Subsubsubsection"], -Cell[205369, 6504, 376, 9, 26, "Subsubsubsection"], -Cell[205748, 6515, 380, 9, 26, "Subsubsubsection"], -Cell[206131, 6526, 376, 9, 26, "Subsubsubsection"], -Cell[206510, 6537, 375, 9, 26, "Subsubsubsection"], -Cell[206888, 6548, 379, 9, 26, "Subsubsubsection"], -Cell[207270, 6559, 379, 9, 26, "Subsubsubsection"], -Cell[207652, 6570, 371, 9, 26, "Subsubsubsection"], -Cell[208026, 6581, 361, 9, 26, "Subsubsubsection"], -Cell[208390, 6592, 370, 9, 26, "Subsubsubsection"], -Cell[208763, 6603, 370, 9, 26, "Subsubsubsection"], -Cell[209136, 6614, 382, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[209555, 6628, 371, 9, 31, "Subsubsection"], -Cell[209929, 6639, 364, 9, 31, "Subsubsubsection"], -Cell[210296, 6650, 356, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[210689, 6664, 366, 9, 31, "Subsubsection"], -Cell[211058, 6675, 381, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[211476, 6689, 373, 9, 31, "Subsubsection"], -Cell[211852, 6700, 373, 9, 31, "Subsubsubsection"], -Cell[212228, 6711, 371, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[212614, 6723, 377, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[213016, 6736, 369, 9, 31, "Subsubsection"], -Cell[213388, 6747, 366, 9, 31, "Subsubsubsection"], -Cell[213757, 6758, 388, 9, 26, "Subsubsubsection"], -Cell[214148, 6769, 379, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[214564, 6783, 367, 9, 31, "Subsubsection"], -Cell[214934, 6794, 373, 9, 31, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[215356, 6809, 355, 9, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[215736, 6822, 351, 9, 31, "Subsubsection"], -Cell[216090, 6833, 352, 9, 31, "Subsubsubsection"], -Cell[216445, 6844, 368, 9, 26, "Subsubsubsection"], -Cell[216816, 6855, 361, 9, 26, "Subsubsubsection"], -Cell[217180, 6866, 377, 9, 26, "Subsubsubsection"], -Cell[217560, 6877, 347, 9, 26, "Subsubsubsection"], -Cell[217910, 6888, 351, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[218298, 6902, 355, 9, 31, "Subsubsection"], -Cell[218656, 6913, 365, 9, 31, "Subsubsubsection"], -Cell[219024, 6924, 363, 9, 26, "Subsubsubsection"], -Cell[219390, 6935, 367, 9, 26, "Subsubsubsection"], -Cell[219760, 6946, 364, 9, 26, "Subsubsubsection"], -Cell[220127, 6957, 363, 9, 26, "Subsubsubsection"], -Cell[220493, 6968, 365, 9, 26, "Subsubsubsection"], -Cell[220861, 6979, 366, 9, 26, "Subsubsubsection"], -Cell[221230, 6990, 359, 9, 26, "Subsubsubsection"], -Cell[221592, 7001, 350, 9, 26, "Subsubsubsection"], -Cell[221945, 7012, 357, 9, 26, "Subsubsubsection"], -Cell[222305, 7023, 357, 9, 26, "Subsubsubsection"], -Cell[222665, 7034, 370, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[223072, 7048, 357, 9, 31, "Subsubsection"], -Cell[223432, 7059, 352, 9, 31, "Subsubsubsection"], -Cell[223787, 7070, 344, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[224168, 7084, 367, 9, 31, "Subsubsection"], -Cell[224538, 7095, 367, 9, 31, "Subsubsubsection"], -Cell[224908, 7106, 365, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[225288, 7118, 370, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[225683, 7131, 355, 9, 31, "Subsubsection"], -Cell[226041, 7142, 354, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[226410, 7154, 354, 9, 31, "Subsubsection"], -Cell[226767, 7165, 371, 9, 31, "Subsubsection"], -Cell[227141, 7176, 357, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[227535, 7190, 354, 9, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[227914, 7203, 357, 9, 31, "Subsubsection"], -Cell[228274, 7214, 351, 9, 31, "Subsubsubsection"], -Cell[228628, 7225, 355, 9, 26, "Subsubsubsection"], -Cell[228986, 7236, 351, 9, 26, "Subsubsubsection"], -Cell[229340, 7247, 371, 9, 26, "Subsubsubsection"], -Cell[229714, 7258, 354, 9, 26, "Subsubsubsection"], -Cell[230071, 7269, 360, 9, 26, "Subsubsubsection"], -Cell[230434, 7280, 358, 9, 26, "Subsubsubsection"], -Cell[230795, 7291, 353, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[231185, 7305, 361, 9, 31, "Subsubsection"], -Cell[231549, 7316, 363, 9, 31, "Subsubsubsection"], -Cell[231915, 7327, 367, 9, 26, "Subsubsubsection"], -Cell[232285, 7338, 382, 9, 26, "Subsubsubsection"], -Cell[232670, 7349, 374, 9, 26, "Subsubsubsection"], -Cell[233047, 7360, 359, 9, 26, "Subsubsubsection"], -Cell[233409, 7371, 371, 9, 26, "Subsubsubsection"], -Cell[233783, 7382, 353, 9, 26, "Subsubsubsection"], -Cell[234139, 7393, 353, 9, 26, "Subsubsubsection"], -Cell[234495, 7404, 359, 9, 26, "Subsubsubsection"], -Cell[234857, 7415, 353, 9, 26, "Subsubsubsection"], -Cell[235213, 7426, 355, 9, 26, "Subsubsubsection"], -Cell[235571, 7437, 363, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[235971, 7451, 363, 9, 31, "Subsubsection"], -Cell[236337, 7462, 359, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[236733, 7476, 365, 9, 31, "Subsubsection"], -Cell[237101, 7487, 368, 9, 31, "Subsubsubsection"], -Cell[237472, 7498, 369, 9, 26, "Subsubsubsection"], -Cell[237844, 7509, 374, 9, 26, "Subsubsubsection"], -Cell[238221, 7520, 369, 9, 26, "Subsubsubsection"], -Cell[238593, 7531, 353, 9, 26, "Subsubsubsection"], -Cell[238949, 7542, 353, 9, 26, "Subsubsubsection"], -Cell[239305, 7553, 354, 9, 26, "Subsubsubsection"], -Cell[239662, 7564, 362, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[240061, 7578, 361, 9, 31, "Subsubsection"], -Cell[240425, 7589, 362, 9, 31, "Subsubsubsection"], -Cell[240790, 7600, 369, 9, 26, "Subsubsubsection"], -Cell[241162, 7611, 376, 9, 26, "Subsubsubsection"], -Cell[241541, 7622, 363, 9, 26, "Subsubsubsection"], -Cell[241907, 7633, 363, 9, 26, "Subsubsubsection"], -Cell[242273, 7644, 374, 9, 26, "Subsubsubsection"], -Cell[242650, 7655, 374, 9, 26, "Subsubsubsection"], -Cell[243027, 7666, 373, 9, 26, "Subsubsubsection"], -Cell[243403, 7677, 354, 9, 26, "Subsubsubsection"], -Cell[243760, 7688, 365, 9, 26, "Subsubsubsection"], -Cell[244128, 7699, 377, 9, 26, "Subsubsubsection"], -Cell[244508, 7710, 352, 9, 26, "Subsubsubsection"], -Cell[244863, 7721, 367, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[245245, 7733, 362, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[245644, 7747, 340, 9, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[246009, 7760, 355, 9, 31, "Subsubsection"], -Cell[246367, 7771, 372, 9, 31, "Subsubsubsection"], -Cell[246742, 7782, 361, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[247140, 7796, 355, 9, 31, "Subsubsection"], -Cell[247498, 7807, 368, 9, 31, "Subsubsubsection"], -Cell[247869, 7818, 380, 9, 26, "Subsubsubsection"], -Cell[248252, 7829, 367, 9, 26, "Subsubsubsection"], -Cell[248622, 7840, 359, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[248996, 7852, 349, 9, 31, "Subsubsection"], -Cell[249348, 7863, 362, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[249747, 7877, 368, 9, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[250140, 7890, 347, 9, 31, "Subsubsection"], -Cell[250490, 7901, 361, 9, 31, "Subsubsubsection"], -Cell[250854, 7912, 361, 9, 26, "Subsubsubsection"], -Cell[251218, 7923, 359, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[251614, 7937, 356, 9, 31, "Subsubsection"], -Cell[251973, 7948, 361, 9, 31, "Subsubsubsection"], -Cell[252337, 7959, 357, 9, 26, "Subsubsubsection"], -Cell[252697, 7970, 353, 9, 26, "Subsubsubsection"], -Cell[253053, 7981, 352, 9, 26, "Subsubsubsection"], -Cell[253408, 7992, 362, 9, 26, "Subsubsubsection"], -Cell[253773, 8003, 350, 9, 26, "Subsubsubsection"], -Cell[254126, 8014, 351, 9, 26, "Subsubsubsection"], -Cell[254480, 8025, 359, 9, 26, "Subsubsubsection"], -Cell[254842, 8036, 354, 9, 26, "Subsubsubsection"], -Cell[255199, 8047, 371, 9, 26, "Subsubsubsection"], -Cell[255573, 8058, 369, 9, 26, "Subsubsubsection"], -Cell[255945, 8069, 355, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[256337, 8083, 355, 9, 31, "Subsubsection"], -Cell[256695, 8094, 360, 9, 31, "Subsubsubsection"], -Cell[257058, 8105, 361, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[257468, 8120, 347, 9, 51, "Subsection"], -Cell[257818, 8131, 346, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[258189, 8144, 363, 9, 31, "Subsubsection"], -Cell[258555, 8155, 358, 9, 31, "Subsubsubsection"], -Cell[258916, 8166, 352, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[259305, 8180, 366, 9, 31, "Subsubsection"], -Cell[259674, 8191, 357, 9, 31, "Subsubsubsection"], -Cell[260034, 8202, 363, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[260412, 8214, 358, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[260795, 8227, 348, 9, 31, "Subsubsection"], -Cell[261146, 8238, 341, 9, 31, "Subsubsubsection"], -Cell[261490, 8249, 353, 9, 26, "Subsubsubsection"], -Cell[261846, 8260, 349, 9, 26, "Subsubsubsection"], -Cell[262198, 8271, 355, 9, 26, "Subsubsubsection"], -Cell[262556, 8282, 359, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[262930, 8294, 359, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[263326, 8308, 334, 9, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[263685, 8321, 350, 9, 31, "Subsubsection"], -Cell[264038, 8332, 342, 9, 31, "Subsubsubsection"], -Cell[264383, 8343, 341, 9, 26, "Subsubsubsection"], -Cell[264727, 8354, 351, 9, 26, "Subsubsubsection"], -Cell[265081, 8365, 350, 9, 26, "Subsubsubsection"], -Cell[265434, 8376, 342, 9, 26, "Subsubsubsection"], -Cell[265779, 8387, 341, 9, 26, "Subsubsubsection"], -Cell[266123, 8398, 342, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[266480, 8410, 345, 9, 31, "Subsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[266874, 8425, 351, 9, 81, "Section"], -Cell[267228, 8436, 323, 9, 51, "Subsection"], -Cell[267554, 8447, 314, 8, 36, "Subsection"], -Cell[267871, 8457, 368, 9, 36, "Subsection"], -Cell[268242, 8468, 337, 9, 36, "Subsection"], -Cell[268582, 8479, 349, 9, 36, "Subsection"], -Cell[268934, 8490, 326, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[269297, 8504, 361, 9, 81, "Section"], -Cell[269661, 8515, 362, 9, 51, "Subsection"], -Cell[270026, 8526, 373, 9, 36, "Subsection"], -Cell[270402, 8537, 334, 9, 36, "Subsection"], -Cell[270739, 8548, 370, 9, 36, "Subsection"], -Cell[271112, 8559, 373, 9, 36, "Subsection"], -Cell[271488, 8570, 335, 9, 36, "Subsection"], -Cell[271826, 8581, 377, 9, 36, "Subsection"], -Cell[272206, 8592, 336, 9, 36, "Subsection"], -Cell[272545, 8603, 361, 9, 36, "Subsection"], -Cell[272909, 8614, 360, 9, 36, "Subsection"], -Cell[273272, 8625, 387, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[273696, 8639, 369, 10, 81, "Section"], -Cell[CellGroupData[{ -Cell[274090, 8653, 332, 9, 51, "Subsection"], -Cell[274425, 8664, 334, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[274784, 8677, 343, 8, 31, "Subsubsection"], -Cell[275130, 8687, 335, 9, 31, "Subsubsubsection"], -Cell[275468, 8698, 349, 9, 26, "Subsubsubsection"], -Cell[275820, 8709, 346, 9, 26, "Subsubsubsection"], -Cell[276169, 8720, 344, 9, 26, "Subsubsubsection"], -Cell[276516, 8731, 347, 9, 26, "Subsubsubsection"], -Cell[276866, 8742, 341, 9, 26, "Subsubsubsection"], -Cell[277210, 8753, 373, 9, 26, "Subsubsubsection"], -Cell[277586, 8764, 344, 9, 26, "Subsubsubsection"], -Cell[277933, 8775, 346, 9, 26, "Subsubsubsection"], -Cell[278282, 8786, 344, 9, 26, "Subsubsubsection"], -Cell[278629, 8797, 348, 9, 26, "Subsubsubsection"], -Cell[278980, 8808, 348, 9, 26, "Subsubsubsection"], -Cell[279331, 8819, 343, 8, 26, "Subsubsubsection"], -Cell[279677, 8829, 346, 9, 26, "Subsubsubsection"], -Cell[280026, 8840, 332, 9, 26, "Subsubsubsection"], -Cell[280361, 8851, 336, 9, 26, "Subsubsubsection"], -Cell[280700, 8862, 338, 9, 26, "Subsubsubsection"], -Cell[281041, 8873, 330, 9, 26, "Subsubsubsection"], -Cell[281374, 8884, 352, 9, 26, "Subsubsubsection"], -Cell[281729, 8895, 332, 9, 26, "Subsubsubsection"], -Cell[282064, 8906, 348, 9, 26, "Subsubsubsection"], -Cell[282415, 8917, 349, 9, 26, "Subsubsubsection"], -Cell[282767, 8928, 352, 9, 26, "Subsubsubsection"], -Cell[283122, 8939, 360, 9, 26, "Subsubsubsection"], -Cell[283485, 8950, 357, 9, 26, "Subsubsubsection"], -Cell[283845, 8961, 360, 9, 26, "Subsubsubsection"], -Cell[284208, 8972, 368, 9, 26, "Subsubsubsection"], -Cell[284579, 8983, 336, 9, 26, "Subsubsubsection"], -Cell[284918, 8994, 339, 8, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[285306, 9008, 329, 8, 51, "Subsection"], -Cell[CellGroupData[{ -Cell[285660, 9020, 334, 8, 31, "Subsubsection"], -Cell[285997, 9030, 338, 9, 31, "Subsubsubsection"], -Cell[286338, 9041, 359, 9, 26, "Subsubsubsection"], -Cell[286700, 9052, 345, 9, 26, "Subsubsubsection"], -Cell[287048, 9063, 349, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[287446, 9078, 322, 8, 51, "Subsection"], -Cell[287771, 9088, 334, 9, 31, "Subsubsection"], -Cell[288108, 9099, 333, 9, 31, "Subsubsection"], -Cell[288444, 9110, 356, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[288837, 9124, 356, 9, 51, "Subsection"], -Cell[289196, 9135, 342, 9, 31, "Subsubsection"], -Cell[289541, 9146, 325, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[289903, 9160, 359, 9, 51, "Subsection"], -Cell[290265, 9171, 358, 9, 31, "Subsubsection"], -Cell[290626, 9182, 352, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[291003, 9195, 349, 9, 31, "Subsubsection"], -Cell[291355, 9206, 348, 9, 31, "Subsubsubsection"], -Cell[291706, 9217, 343, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[292064, 9229, 345, 9, 31, "Subsubsection"], -Cell[292412, 9240, 352, 9, 31, "Subsubsection"], -Cell[292767, 9251, 349, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[293153, 9265, 345, 9, 51, "Subsection"], -Cell[293501, 9276, 352, 9, 31, "Subsubsection"], -Cell[293856, 9287, 340, 9, 31, "Subsubsection"] -}, Closed]], -Cell[294211, 9299, 320, 9, 51, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[294568, 9313, 353, 9, 81, "Section"], -Cell[CellGroupData[{ -Cell[294946, 9326, 338, 9, 51, "Subsection"], -Cell[295287, 9337, 338, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[295650, 9350, 337, 9, 31, "Subsubsection"], -Cell[295990, 9361, 345, 9, 31, "Subsubsubsection"], -Cell[296338, 9372, 373, 9, 26, "Subsubsubsection"], -Cell[296714, 9383, 353, 9, 26, "Subsubsubsection"], -Cell[297070, 9394, 353, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[297472, 9409, 357, 9, 51, "Subsection"], -Cell[297832, 9420, 352, 9, 31, "Subsubsection"], -Cell[298187, 9431, 359, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[298571, 9444, 364, 9, 31, "Subsubsection"], -Cell[298938, 9455, 375, 9, 31, "Subsubsubsection"], -Cell[299316, 9466, 371, 9, 26, "Subsubsubsection"], -Cell[299690, 9477, 397, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[300124, 9491, 362, 9, 31, "Subsubsection"], -Cell[300489, 9502, 375, 9, 31, "Subsubsubsection"], -Cell[300867, 9513, 378, 9, 26, "Subsubsubsection"], -Cell[301248, 9524, 366, 9, 26, "Subsubsubsection"], -Cell[301617, 9535, 371, 9, 26, "Subsubsubsection"], -Cell[301991, 9546, 397, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[302403, 9558, 391, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[302819, 9571, 360, 9, 31, "Subsubsection"], -Cell[303182, 9582, 374, 9, 31, "Subsubsubsection"], -Cell[303559, 9593, 400, 9, 26, "Subsubsubsection"], -Cell[303962, 9604, 384, 9, 26, "Subsubsubsection"], -Cell[304349, 9615, 375, 9, 26, "Subsubsubsection"], -Cell[304727, 9626, 382, 9, 26, "Subsubsubsection"], -Cell[305112, 9637, 432, 10, 26, "Subsubsubsection"], -Cell[305547, 9649, 387, 9, 26, "Subsubsubsection"], -Cell[305937, 9660, 409, 10, 26, "Subsubsubsection"], -Cell[306349, 9672, 373, 9, 26, "Subsubsubsection"], -Cell[306725, 9683, 409, 10, 26, "Subsubsubsection"], -Cell[307137, 9695, 369, 9, 26, "Subsubsubsection"], -Cell[307509, 9706, 375, 9, 26, "Subsubsubsection"], -Cell[307887, 9717, 380, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[308304, 9731, 367, 9, 31, "Subsubsection"], -Cell[308674, 9742, 375, 9, 31, "Subsubsubsection"], -Cell[309052, 9753, 405, 10, 26, "Subsubsubsection"], -Cell[309460, 9765, 362, 9, 26, "Subsubsubsection"], -Cell[309825, 9776, 399, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[310239, 9788, 368, 9, 31, "Subsubsection"], -Cell[310610, 9799, 362, 9, 31, "Subsubsection"], -Cell[310975, 9810, 377, 9, 31, "Subsubsection"], -Cell[311355, 9821, 374, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[311754, 9834, 381, 9, 31, "Subsubsection"], -Cell[312138, 9845, 367, 9, 31, "Subsubsubsection"], -Cell[312508, 9856, 372, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[312917, 9870, 389, 9, 31, "Subsubsection"], -Cell[313309, 9881, 375, 9, 31, "Subsubsubsection"], -Cell[313687, 9892, 353, 9, 26, "Subsubsubsection"], -Cell[314043, 9903, 364, 9, 26, "Subsubsubsection"], -Cell[314410, 9914, 386, 9, 26, "Subsubsubsection"], -Cell[314799, 9925, 409, 10, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[315245, 9940, 401, 10, 31, "Subsubsection"], -Cell[315649, 9952, 374, 9, 31, "Subsubsubsection"], -Cell[316026, 9963, 366, 9, 26, "Subsubsubsection"], -Cell[316395, 9974, 372, 9, 26, "Subsubsubsection"], -Cell[316770, 9985, 370, 9, 26, "Subsubsubsection"], -Cell[317143, 9996, 388, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[317568, 10010, 361, 9, 31, "Subsubsection"], -Cell[317932, 10021, 390, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[318359, 10035, 352, 9, 31, "Subsubsection"], -Cell[318714, 10046, 382, 9, 31, "Subsubsubsection"], -Cell[319099, 10057, 372, 9, 26, "Subsubsubsection"], -Cell[319474, 10068, 373, 9, 26, "Subsubsubsection"], -Cell[319850, 10079, 370, 9, 26, "Subsubsubsection"], -Cell[320223, 10090, 375, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[320635, 10104, 364, 9, 31, "Subsubsection"], -Cell[321002, 10115, 370, 9, 31, "Subsubsubsection"], -Cell[321375, 10126, 370, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[321794, 10141, 347, 9, 51, "Subsection"], -Cell[322144, 10152, 347, 9, 31, "Subsubsection"], -Cell[322494, 10163, 365, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[322884, 10176, 358, 9, 31, "Subsubsection"], -Cell[323245, 10187, 359, 9, 31, "Subsubsubsection"], -Cell[323607, 10198, 391, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[324035, 10212, 357, 9, 31, "Subsubsection"], -Cell[324395, 10223, 392, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[324824, 10237, 367, 9, 31, "Subsubsection"], -Cell[325194, 10248, 403, 10, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[325634, 10263, 359, 9, 31, "Subsubsection"], -Cell[325996, 10274, 393, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[326426, 10288, 361, 9, 31, "Subsubsection"], -Cell[326790, 10299, 394, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[327221, 10313, 361, 9, 31, "Subsubsection"], -Cell[327585, 10324, 395, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[328017, 10338, 357, 9, 31, "Subsubsection"], -Cell[328377, 10349, 391, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[328805, 10363, 356, 9, 31, "Subsubsection"], -Cell[329164, 10374, 390, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[329591, 10388, 362, 9, 31, "Subsubsection"], -Cell[329956, 10399, 400, 10, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[330393, 10414, 357, 9, 31, "Subsubsection"], -Cell[330753, 10425, 361, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[331151, 10439, 359, 9, 31, "Subsubsection"], -Cell[331513, 10450, 365, 9, 31, "Subsubsubsection"], -Cell[331881, 10461, 356, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[332274, 10475, 366, 9, 31, "Subsubsection"], -Cell[332643, 10486, 368, 9, 31, "Subsubsubsection"], -Cell[333014, 10497, 354, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[333383, 10509, 358, 9, 31, "Subsubsection"] -}, Closed]], -Cell[333756, 10521, 334, 9, 51, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[334127, 10535, 345, 9, 81, "Section"], -Cell[CellGroupData[{ -Cell[334497, 10548, 350, 9, 51, "Subsection"], -Cell[334850, 10559, 365, 9, 31, "Subsubsection"], -Cell[335218, 10570, 363, 9, 31, "Subsubsection"], -Cell[335584, 10581, 362, 9, 31, "Subsubsection"], -Cell[335949, 10592, 372, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[336358, 10606, 362, 9, 51, "Subsection"], -Cell[336723, 10617, 361, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[337109, 10630, 379, 9, 31, "Subsubsection"], -Cell[337491, 10641, 383, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[337911, 10655, 357, 9, 31, "Subsubsection"], -Cell[338271, 10666, 425, 10, 31, "Subsubsubsection"], -Cell[338699, 10678, 377, 9, 26, "Subsubsubsection"], -Cell[339079, 10689, 430, 10, 26, "Subsubsubsection"], -Cell[339512, 10701, 398, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[339947, 10715, 407, 10, 31, "Subsubsection"], -Cell[340357, 10727, 401, 9, 31, "Subsubsubsection"], -Cell[340761, 10738, 414, 10, 26, "Subsubsubsection"], -Cell[341178, 10750, 379, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[341594, 10764, 391, 9, 31, "Subsubsection"], -Cell[341988, 10775, 375, 9, 31, "Subsubsubsection"], -Cell[342366, 10786, 382, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[342785, 10800, 381, 9, 31, "Subsubsection"], -Cell[343169, 10811, 393, 9, 31, "Subsubsubsection"], -Cell[343565, 10822, 379, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[343993, 10837, 377, 9, 51, "Subsection"], -Cell[344373, 10848, 358, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[344756, 10861, 369, 9, 31, "Subsubsection"], -Cell[345128, 10872, 375, 9, 31, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[345540, 10886, 369, 9, 31, "Subsubsection"], -Cell[345912, 10897, 375, 9, 31, "Subsubsubsection"], -Cell[346290, 10908, 374, 9, 26, "Subsubsubsection"], -Cell[346667, 10919, 388, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[347092, 10933, 401, 9, 31, "Subsubsection"], -Cell[347496, 10944, 378, 9, 31, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[347923, 10959, 379, 9, 51, "Subsection"], -Cell[348305, 10970, 359, 9, 31, "Subsubsection"], -Cell[348667, 10981, 369, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[349061, 10994, 406, 10, 31, "Subsubsection"], -Cell[349470, 11006, 370, 9, 31, "Subsubsubsection"], -Cell[349843, 11017, 374, 9, 26, "Subsubsubsection"], -Cell[350220, 11028, 370, 9, 26, "Subsubsubsection"], -Cell[350593, 11039, 366, 9, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[CellGroupData[{ -Cell[351008, 11054, 356, 9, 51, "Subsection"], -Cell[351367, 11065, 349, 9, 31, "Subsubsection"], -Cell[351719, 11076, 347, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[352091, 11089, 388, 9, 31, "Subsubsection"], -Cell[352482, 11100, 351, 9, 31, "Subsubsubsection"], -Cell[352836, 11111, 382, 9, 26, "Subsubsubsection"], -Cell[353221, 11122, 388, 9, 26, "Subsubsubsection"], -Cell[353612, 11133, 370, 9, 26, "Subsubsubsection"], -Cell[353985, 11144, 367, 9, 26, "Subsubsubsection"], -Cell[354355, 11155, 372, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[354742, 11167, 356, 9, 31, "Subsubsection"], -Cell[355101, 11178, 360, 9, 31, "Subsubsection"], -Cell[355464, 11189, 390, 9, 31, "Subsubsection"], -Cell[CellGroupData[{ -Cell[355879, 11202, 365, 9, 31, "Subsubsection"], -Cell[356247, 11213, 369, 9, 31, "Subsubsubsection"], -Cell[356619, 11224, 411, 10, 26, "Subsubsubsection"] -}, Closed]] -}, Closed]], -Cell[357057, 11238, 383, 9, 51, "Subsection"], -Cell[357443, 11249, 361, 9, 36, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[357841, 11263, 349, 9, 81, "Section"], -Cell[CellGroupData[{ -Cell[358215, 11276, 352, 9, 51, "Subsection"], -Cell[358570, 11287, 383, 10, 31, "Subsubsubsection"], -Cell[358956, 11299, 378, 10, 26, "Subsubsubsection"], -Cell[359337, 11311, 378, 9, 26, "Subsubsubsection"], -Cell[359718, 11322, 378, 9, 26, "Subsubsubsection"], -Cell[360099, 11333, 402, 10, 26, "Subsubsubsection"], -Cell[360504, 11345, 380, 9, 26, "Subsubsubsection"], -Cell[360887, 11356, 384, 10, 26, "Subsubsubsection"], -Cell[361274, 11368, 389, 9, 26, "Subsubsubsection"], -Cell[361666, 11379, 369, 9, 26, "Subsubsubsection"], -Cell[362038, 11390, 384, 9, 26, "Subsubsubsection"], -Cell[362425, 11401, 378, 10, 26, "Subsubsubsection"], -Cell[362806, 11413, 377, 9, 26, "Subsubsubsection"], -Cell[363186, 11424, 379, 9, 26, "Subsubsubsection"], -Cell[363568, 11435, 385, 10, 26, "Subsubsubsection"], -Cell[363956, 11447, 406, 10, 26, "Subsubsubsection"], -Cell[364365, 11459, 386, 10, 26, "Subsubsubsection"], -Cell[364754, 11471, 377, 9, 26, "Subsubsubsection"], -Cell[365134, 11482, 378, 9, 26, "Subsubsubsection"], -Cell[365515, 11493, 366, 9, 26, "Subsubsubsection"] -}, Closed]], -Cell[365896, 11505, 338, 9, 51, "Subsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[366271, 11519, 357, 9, 81, "Section"], -Cell[366631, 11530, 357, 9, 51, "Subsection"], -Cell[366991, 11541, 370, 9, 36, "Subsection"], -Cell[CellGroupData[{ -Cell[367386, 11554, 355, 9, 36, "Subsection"], -Cell[367744, 11565, 337, 9, 31, "Subsubsection"], -Cell[368084, 11576, 357, 9, 31, "Subsubsection"], -Cell[368444, 11587, 344, 9, 31, "Subsubsection"], -Cell[368791, 11598, 380, 9, 31, "Subsubsection"], -Cell[369174, 11609, 369, 9, 31, "Subsubsection"], -Cell[369546, 11620, 346, 9, 31, "Subsubsection"], -Cell[369895, 11631, 351, 9, 31, "Subsubsection"] -}, Closed]], -Cell[CellGroupData[{ -Cell[370283, 11645, 307, 8, 51, "Subsection"], -Cell[370593, 11655, 332, 8, 31, "Subsubsection"], -Cell[370928, 11665, 346, 9, 31, "Subsubsection"], -Cell[371277, 11676, 342, 9, 31, "Subsubsection"], -Cell[371622, 11687, 343, 8, 31, "Subsubsection"], -Cell[371968, 11697, 333, 9, 31, "Subsubsection"], -Cell[372304, 11708, 350, 9, 31, "Subsubsection"], -Cell[372657, 11719, 350, 9, 31, "Subsubsection"] -}, Closed]], -Cell[373022, 11731, 375, 9, 51, "Subsection"] -}, Closed]] -}, Closed]] -}, Open ]] -} -] -*) - -(* End of internal cache information *) - diff --git a/MathematicaFiles/Applications/WriteBriefingFilesWithHeaders.m b/MathematicaFiles/Applications/WriteBriefingFilesWithHeaders.m deleted file mode 100755 index fc6d11b47056916927a150a51f5e41c9b4f352ba..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/WriteBriefingFilesWithHeaders.m +++ /dev/null @@ -1,212 +0,0 @@ -<<DateFunctions` -<<OddsandEnds` - -WriteStripsFileWithHeader::usage = "WriteStripsFileWithHeader[filename, \ -{lastdate, lastFOMC}, stripsdata] writes the data to the specified file \ -in XLS format \ -with a header that reflects specified dates. The first column of the data \ -matrix should be the maturity in years, the second column should be the \ -yields from the most recent day in percent, and the third column should \ -be the yields from the previous FOMC date." - -WriteEurodollarsCurrentFileWithHeader::usage = -"WriteEurodollarsCurrentFileWithHeader[filename, lastdate, currentdata]." - -WriteEurodollarsAdjustedFileWithHeader::usage = -"WriteEurodollarsAdjustedFileWithHeader[filename, lastdate, currentdata]." - -WriteEurodollarsPreviousFileWithHeader::usage = -"WriteEurodollarsPreviousFileWithHeader[filename, \ -{lastdate, lastFOMCdate}, previousdata]." - -WriteEurodollarsChangeFileWithHeader::usage = -"WriteEurodollarsChangeFileWithHeader[filename, \ -{lastdate, lastFOMCdate}, changedata]." - -WriteEurodollarsFileWithHeader::usage = -"WriteEurodollarsFileWithHeader[filename, \ -{lastdate, lastFOMCdate}, \ -{currentdata, previousdata, changedata}]." - -ExportStripsDataToXLS = WriteStripsFileWithHeader - -ExportEurodollarDataToXLS = WriteEurodollarsFileWithHeader - - -WriteStripsFileWithHeader[ - filename_String, - {lastdate_List, lastFOMC_List}, - stripsdata_?MatrixQ - ] := - Module[{header}, - header = Partition[#,1]&@{ - "Strips data: smoothed zero-coupon yields", "col 1: maturity in years", - ToString[StringForm["col 2: yield (percent) as of ``", - ListDateToStringDate[lastFOMC]]], - ToString[StringForm["col 3: yield (percent) as of ``", - ListDateToStringDate[lastdate]]], - "" - }; - Export[filename <> ".xls", Join[header, stripsdata], {"Sheets", "STRIPs Data"}] - ] - - -WriteEurodollarsCurrentFileWithHeader[ - filename_String, - lastdate_List, - currentdata_List - ] := - Module[{header, currentstrdate}, - currentstrdate = ListDateToStringDate[lastdate]; - header = Partition[#,1]&@{ - ToString@StringForm["Eurodollar futures rates as of ``", currentstrdate], - ToString@StringForm["col 1: maturity in years relative to ``", currentstrdate], - "col 2: rate in percent", - ""}; - Export[filename <> ".xls", Join[header, currentdata], {"Sheets", "Current"}] - ] - -WriteEurodollarsPreviousFileWithHeader[ - filename_String, - {lastdate_List, lastFOMC_List}, - previousdata_List - ] := - Module[{header, currentstrdate, previousstrdate}, - currentstrdate = ListDateToStringDate[lastdate]; - previousstrdate = ListDateToStringDate[lastFOMC]; - header = Partition[#,1]&@{ - ToString[StringForm[ - "Eurodollar futures rates as of ``", previousstrdate]], - ToString[StringForm[ - "col 1: maturity in years relative to ``", currentstrdate]], - "col 2: rate in percent", - "" - }; - Export[filename <> ".xls", Join[header, previousdata], {"Sheets", "Previous"}] - ] - -WriteEurodollarsChangeFileWithHeader[ - filename_String, - {lastdate_List, lastFOMC_List}, - changedata_List - ] := - Module[{header, currentstrdate, previousstrdate}, - currentstrdate = ListDateToStringDate[lastdate]; - previousstrdate = ListDateToStringDate[lastFOMC]; - header = Partition[#,1]&@{ - ToString[StringForm[ - "Change in Eurodollar futures rates from `1` to `2`", - previousstrdate, currentstrdate]], - ToString[StringForm[ - "col 1: maturity in years relative to ``", currentstrdate]], - "col 2: change in rate (percent)", - "" - }; - Export[filename <> ".xls", Join[header, changedata], {"Sheets", "Change"}] - ] - -WriteEurodollarsAdjustedFileWithHeader[ - filename_String, - lastdate_List, - adjusteddata_List - ] := - Module[{header, currentstrdate}, - currentstrdate = ListDateToStringDate[lastdate]; - header = Partition[#,1]&@{ - ToString[StringForm[ - "Adjusted Eurodollar rates as of ``", currentstrdate]], - "(slope of curve from 3 years to 9 years removed)", - "col 1: maturity in years", - "col 2: adj rate in percent", - "" - }; - Export[filename <> ".xls", Join[header, adjusteddata], {"Sheets", "Adjusted"}] - ] - - -WriteEurodollarsFileWithHeader[ - filename_String, - {lastdate_List, lastFOMC_List}, - {currentdata_List, previousdata_List, changedata_List} - ] := - Module[{header1, header2, header3, currentstrdate, previousstrdate}, - currentstrdate = ListDateToStringDate[lastdate]; - previousstrdate = ListDateToStringDate[lastFOMC]; - header1 = Partition[#,1]&@{ - ToString@StringForm["Eurodollar futures rates as of ``", currentstrdate], - ToString@StringForm["col 1: maturity in years relative to ``", currentstrdate], - "col 2: rate in percent", - ""}; - header2 = Partition[#,1]&@{ - ToString[StringForm[ - "Eurodollar futures rates as of ``", previousstrdate]], - ToString[StringForm[ - "col 1: maturity in years relative to ``", currentstrdate]], - "col 2: rate in percent", - "" - }; - header3 = Partition[#,1]&@{ - ToString[StringForm[ - "Change in Eurodollar futures rates from `1` to `2`", - previousstrdate, currentstrdate]], - ToString[StringForm[ - "col 1: maturity in years relative to ``", currentstrdate]], - "col 2: change in rate (percent)", - "" - }; - Export[filename <> ".xls", - {Join[header1, currentdata], - Join[header2, previousdata], - Join[header3, changedata]}, - {"Sheets", {"Current", "Previous", "Change"}}] - ] - -WriteEurodollarsFileWithHeader[ - filename_String, - {lastdate_List, lastFOMC_List}, - {currentdata_List, previousdata_List, changedata_List, - adjusteddata_List} - ] := - Module[{header1, header2, header3, header4, currentstrdate, previousstrdate}, - currentstrdate = ListDateToStringDate[lastdate]; - previousstrdate = ListDateToStringDate[lastFOMC]; - header1 = Partition[#,1]&@{ - ToString@StringForm["Eurodollar futures rates as of ``", currentstrdate], - ToString@StringForm["col 1: maturity in years relative to ``", currentstrdate], - "col 2: rate in percent", - ""}; - header2 = Partition[#,1]&@{ - ToString[StringForm[ - "Eurodollar futures rates as of ``", previousstrdate]], - ToString[StringForm[ - "col 1: maturity in years relative to ``", currentstrdate]], - "col 2: rate in percent", - "" - }; - header3 = Partition[#,1]&@{ - ToString[StringForm[ - "Change in Eurodollar futures rates from `1` to `2`", - previousstrdate, currentstrdate]], - ToString[StringForm[ - "col 1: maturity in years relative to ``", currentstrdate]], - "col 2: change in rate (percent)", - "" - }; - header4 = Partition[#,1]&@{ - ToString[StringForm[ - "Adjusted Eurodollar rates as of ``", currentstrdate]], - "(slope of curve from 3 years to 9 years removed)", - "col 1: maturity in years", - "col 2: adj rate in percent", - "" - }; - Export[filename <> ".xls", - {Join[header1, currentdata], - Join[header2, previousdata], - Join[header3, changedata], - Join[header4, adjusteddata]}, - {"Sheets", {"Current", "Previous", "Change", "Adjusted"}}] - ] - - - diff --git a/MathematicaFiles/Applications/WulfGanglia.m b/MathematicaFiles/Applications/WulfGanglia.m deleted file mode 100755 index 1fdeb4758ace276e75e6a8849b5bb8af8ca52f93..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/WulfGanglia.m +++ /dev/null @@ -1,53 +0,0 @@ -(* produce a report of features of nodes on Atlanta Fed Wulf cluster *) - -ReadWulfGangia::usage = "ReadWulfGangia[characteristic] returns of \ -list of node numbers paired with the values of the characteristic. \ -Valid values for characteristic include \"cpu_speed\", \"cpu_num\", \ -and \"machine_type\"." - -WulfGangliaNodeReport::usage = "WulfGangliaNodeReport[] returns a \ -report of various features for each node." - -ReadWulfGangia[characteristic_String] := - Module[{url, instring, reportstring}, - url = ToString[ - StringForm[ - "http://wulf.frbatlanta.org/ganglia/?m=`1`&r=hour&s=descending&c=Wulf&h=&sh=1&hc=4", - characteristic]]; - instring = Import[url]; - reportstring = StringDrop[instring, - StringPosition[instring, "n" ~~ NumberString][[-18, 1]] - 1]; - Sort[ - StringCases[reportstring, - Shortest["n" ~~ n : NumberString ~~ __ ~~ characteristic ~~ ":" ~~ - Whitespace ~~ x__ ~~ WordBoundary] :> {ToExpression[n], x}] - ] - ] - -WulfGangliaReportFeatures = { - "machine_type", - "cpu_num", - "cpu_speed", - "mem_total" - } - - -WulfGangliaNodeReport[] := - Module[{subreports, headings}, - subreports = ReadWulfGangia /@ WulfGangliaReportFeatures; - headings = Prepend[Column[#, Alignment -> Center] & /@ - StringSplit[WulfGangliaReportFeatures, "_"], "node"]; - Labeled[ - Framed[ - Grid[ - Prepend[ - Transpose[ - Prepend[subreports[[All, All, 2]], subreports[[1, All, 1]]] - ], - headings - ], - Alignment -> Right, - Dividers -> {False, {False, True, False}}, - Spacings -> {2, .5}] - ], StringDrop[DateString[], -3], Top] - ] diff --git a/MathematicaFiles/Applications/ZhaMathematicaLibrary.m b/MathematicaFiles/Applications/ZhaMathematicaLibrary.m deleted file mode 100755 index a0e2462d26d392f8f94fb1680cf9320fcff6fc1b..0000000000000000000000000000000000000000 --- a/MathematicaFiles/Applications/ZhaMathematicaLibrary.m +++ /dev/null @@ -1,168 +0,0 @@ -(* Tao Zha's Mathematica Library *) - -FormatMatlabForMatrixOutput[mat_?MatrixQ, ArrayName_String] := - Module[{m, n}, - {m, n} = Dimensions[mat]; - Flatten[Table[ - ArrayName <> ToString[StringForm[ - "(`1`,`2`) = `3`;", - i, - j, - mat[[i, j]] // N // CForm - ]], - {i, m}, - {j, n}] - ] - ] - -FormatMatlabForVectorOutput[vec_?VectorQ, ArrayName_String] := - Table[ - ArrayName <> ToString[StringForm[ - "(`1`) = `2`;", - i, - vec[[i]] // N // CForm - ]], - {i, Length[vec]} - ] - -FormatMatlabForOutput[vec_?VectorQ, ArrayName_String] := - Table[ - ArrayName <> ToString[StringForm[ - "(`1`) = `2`;", - i, - vec[[i]] // N // CForm - ]], - {i, Length[vec]} - ] - -FormatCForOutput[mat_?MatrixQ, ArrayName_String] := - Module[{m, n}, - {m, n} = Dimensions[mat]; - Flatten[Table[ - ArrayName <> ToString[StringForm[ - "[`1`,`2`] = `3`;", - i - 1, - j - 1, - mat[[i, j]] // N // CForm - ]], - {i, m}, - {j, n}] - ] - ] -FormatCForOutput[vec_?VectorQ, ArrayName_String] := - Table[ - ArrayName <> ToString[StringForm[ - "[`1`] = `2`;", - i - 1, - vec[[i]] // N // CForm - ]], - {i, Length[vec]} - ] - -(* ----------------------------------------------------- *) -FormatForGreekLettersOutput[vec_?VectorQ] := - Table[ - ToString[StringForm[ - "`1` = ;", - vec[[i]] // N // CForm - ]], - {i, Length[vec]}] - -FormatCMatlabForEqualityOutput[LeftHandList_, RightHandList_] := - Table[ToString[StringForm[ - "`1` = `2`;", - LeftHandList[[i]], - RightHandList[[i]] // N // CForm - ]], - {i, Length[LeftHandList]} - ]; - - -(* ----------------------------------------------------- *) -(* Outputs are all strings. *) -TranslatingToNoSubscript[coef_, rules_] := - coef /. rules /. - Subscript[x_, y_] :> ToExpression[ToString[x] <> ToString[y]] - -MatlabStringReplace[str_] := - StringReplace[ - str, {Shortest["Power(" ~~ x__ ~~ "," ~~ y__ ~~ ")"] :> - "(" ~~ x ~~ ")" ~~ "^" ~~ "(" ~~ y ~~ ")"}] - -CStringReplace[str_] := - StringReplace[str, {"Power(" -> "pow(", "Sqrt" -> "sqrt"}] - -(* ------------------------ Append string to the file ---------------------------------- *) -ExportMatlabStringAppend::usage = - "ExportMatlabStringAppend[filename, data] imports Lines from \ -filename and joins the data (a list of strings) and exports to \ -filename. ExportAppend creates the file if filename does not exist."; - -ExportMatlabStringAppend[filename_String, data_] := - Module[{divider0 = {"\n%-------------------\n"}}, - Export[filename, - Join[ - Quiet[Check[Import[filename, "Lines"], {}]], - divider0, - data], - "Text"]; - ] - - - -(* ------------------- Arranging the measurement equations into matrix measurement form. See the project example with Marvin Goodfriend. ---------------- *) -tzMeasurementForm[equations:{__Equal}, xstatet_List, xut_List] := - Module[{a, H, Psiu}, - {resid, H} = Normal[CoefficientArrays[equations[[All, 2]], xstatet]]; - {a, Psiu} = Normal[CoefficientArrays[resid, xut]]; - (* All means all the rows; [All, 2] means right-hand equations for all the rows. *) - {a, H, Psiu} - ] - -tzMeasurementFormNoMeasureErrors[equations:{__Equal}, xstatet_List] := -Module[{a, H}, - {a, H} = Normal[ - CoefficientArrays[equations[[All, 2]], xstatet]]; - (* All means all the rows; [All, 2] means right-hand equations for all the rows. *) - {a, H} -] - - -tzMeasurementForm4HOnly[equations:{__Equal}, xstatet_List] := -Module[{H}, - H = Normal[ - CoefficientArrays[equations[[All, 2]], xstatet][[2]]]; - (* All means all the rows; [All, 2] means right-hand equations for all the rows. *) - {H} -] - - -(* ------------------- Arranging the state equations into matrix state form ---------------- *) -tzStateForm[equations:{__Equal}, y0_List, \[CurlyEpsilon]0_List, t_: t] := - Module[{y1, \[CurlyEpsilon]1, \[CurlyEpsilon], resid, g0, g1, psi, c}, - y1 = y0 /. t -> t - 1; - \[CurlyEpsilon]1 = - Union[Cases[equations, - Alternatives @@ (\[CurlyEpsilon]0 /. t -> t - 1), Infinity]]; - \[CurlyEpsilon] = Join[\[CurlyEpsilon]0, \[CurlyEpsilon]1]; - {resid, g0} = Normal[CoefficientArrays[equations, y0]]; - resid = -resid; - {g1, psi} = - Normal[CoefficientArrays[resid, #][[2]] & /@ {y1, \[CurlyEpsilon]}]; - c = resid - (g1.y1 + psi.\[CurlyEpsilon]) // Simplify; - {{g0, g1, c, psi}, {y0, y1, \[CurlyEpsilon]}} - ] - - - -(* ------------------- Exporting Greek symbols to ascii symbols used by C or Matlab ---------------- *) -(* ------------------- Calling example: BaseParsOuput = ExportSymbols[BasePars,"tz"] ---------------- *) -ExportSymbols[parmlist_List, initial_: ""] := - ToExpression[initial <> # & /@ StringReplace[(ToString[FullForm[#]] & /@ parmlist), - {"Subscript" -> "", "\\[" -> "", "]" -> "","[" -> "", "," -> "", " " -> ""}] - ] - -(* ------------------- Rules for exporting Greek symbols to ascii symbols used by C or Matlab ---------------- *) -(* ------------------- Calling example: BaseParsOuput = ExportSymbolsRules[BasePars,"tz"] ---------------- *) -ExportSymbolsRules[parmlist_List, initial_: ""] := - Thread[parmlist -> ExportSymbols[parmlist, initial]] \ No newline at end of file diff --git a/MatlabFiles/MSV/OldVersions/dw_gensys.m b/MatlabFiles/MSV/OldVersions/dw_gensys.m deleted file mode 100644 index cd959321a68ebe04c981adf3bdaac052548533f2..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/dw_gensys.m +++ /dev/null @@ -1,46 +0,0 @@ -function [G1,impact,gev,eu]=dw_gensys(g0,g1,psi,pi,div) -% function [G1,impact,gev,eu]=gensys(g0,g1,c,psi,pi,div) -% System given as -% g0*y(t)=g1*y(t-1)+psi*e(t)+pi*eta(t), -% with e an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*e(t). -% If div is omitted from argument list, a div>1 is calculated. -% eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for -% existence only with not-s.c. z; eu=[-2,-2] for coincident zeros. -% By Daniel Waggoner - -realsmall=1e-8; - -G1=[]; -impact=[]; -gev=[]; - -n=size(pi,1); - -if nargin == 4 - div=1.0; -end - -[a b q z]=qz(g0,g1); - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu=[-2;-2]; - gev=[diag(a) diag(b)]; - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -suppress=0; -i=n; -while (i > 0) & (abs(b(i,i)) > abs(a(i,i)*div)) - suppress=suppress+1; - i=i-1; -end - -[G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,suppress); - diff --git a/MatlabFiles/MSV/OldVersions/gensys.m b/MatlabFiles/MSV/OldVersions/gensys.m deleted file mode 100644 index 69f7fc0fa0229de91d3d4cc9a2be063d24152c42..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/gensys.m +++ /dev/null @@ -1,214 +0,0 @@ -function [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div) -% function [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div) -% System given as -% g0*y(t)=g1*y(t-1)+c+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+C+impact*z(t)+ywt*inv(I-fmat*inv(L))*fwt*z(t+1) . -% If z(t) is i.i.d., the last term drops out. -% If div is omitted from argument list, a div>1 is calculated. -% eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for -% existence only with not-s.c. z; eu=[-2,-2] for coincident zeros. -% By Christopher A. Sims -% Corrected 10/28/96 by CAS - -eu=[0;0]; -realsmall=1e-7; -fixdiv=(nargin==6); -n=size(g0,1); -[a b q z v]=qz(g0,g1); -if ~fixdiv, div=1.01; end -nunstab=0; -zxz=0; -for i=1:n -% ------------------div calc------------ - if ~fixdiv - if abs(a(i,i)) > 0 - divhat=abs(b(i,i))/abs(a(i,i)); - % bug detected by Vasco Curdia and Daria Finocchiaro, 2/25/2004 A root of - % exactly 1.01 and no root between 1 and 1.02, led to div being stuck at 1.01 - % and the 1.01 root being misclassified as stable. Changing < to <= below fixes this. - if 1+realsmall<divhat & divhat<=div - div=.5*(1+divhat); - end - end - end -% ---------------------------------------- - nunstab=nunstab+(abs(b(i,i))>div*abs(a(i,i))); - if abs(a(i,i))<realsmall & abs(b(i,i))<realsmall - zxz=1; - end -end -div ; -nunstab; -if ~zxz - [a b q z]=qzdiv(div,a,b,q,z); -end -gev=[diag(a) diag(b)]; -if zxz - disp('Coincident zeros. Indeterminacy and/or nonexistence.') - eu=[-2;-2]; - % correction added 7/29/2003. Otherwise the failure to set output - % arguments leads to an error message and no output (including eu). - G1=[];C=[];impact=[];fmat=[];fwt=[];ywt=[];gev=[]; - return -end -q1=q(1:n-nunstab,:); -q2=q(n-nunstab+1:n,:); -z1=z(:,1:n-nunstab)'; -z2=z(:,n-nunstab+1:n)'; -a2=a(n-nunstab+1:n,n-nunstab+1:n); -b2=b(n-nunstab+1:n,n-nunstab+1:n); -etawt=q2*pi; -% zwt=q2*psi; -[ueta,deta,veta]=svd(etawt); -md=min(size(deta)); -bigev=find(diag(deta(1:md,1:md))>realsmall); -ueta=ueta(:,bigev); -veta=veta(:,bigev); -deta=deta(bigev,bigev); -% ------ corrected code, 3/10/04 -eu(1) = length(bigev)>=nunstab; -length(bigev); -nunstab; -% ------ Code below allowed "existence" in cases where the initial lagged state was free to take on values -% ------ inconsistent with existence, so long as the state could w.p.1 remain consistent with a stable solution -% ------ if its initial lagged value was consistent with a stable solution. This is a mistake, though perhaps there -% ------ are situations where we would like to know that this "existence for restricted initial state" situation holds. -%% [uz,dz,vz]=svd(zwt); -%% md=min(size(dz)); -%% bigev=find(diag(dz(1:md,1:md))>realsmall); -%% uz=uz(:,bigev); -%% vz=vz(:,bigev); -%% dz=dz(bigev,bigev); -%% if isempty(bigev) -%% exist=1; -%% else -%% exist=norm(uz-ueta*ueta'*uz) < realsmall*n; -%% end -%% if ~isempty(bigev) -%% zwtx0=b2\zwt; -%% zwtx=zwtx0; -%% M=b2\a2; -%% for i=2:nunstab -%% zwtx=[M*zwtx zwtx0]; -%% end -%% zwtx=b2*zwtx; -%% [ux,dx,vx]=svd(zwtx); -%% md=min(size(dx)); -%% bigev=find(diag(dx(1:md,1:md))>realsmall); -%% ux=ux(:,bigev); -%% vx=vx(:,bigev); -%% dx=dx(bigev,bigev); -%% existx=norm(ux-ueta*ueta'*ux) < realsmall*n; -%% else -%% existx=1; -%% end -% ---------------------------------------------------- -% Note that existence and uniqueness are not just matters of comparing -% numbers of roots and numbers of endogenous errors. These counts are -% reported below because usually they point to the source of the problem. -% ------------------------------------------------------ -[ueta1,deta1,veta1]=svd(q1*pi); -md=min(size(deta1)); -bigev=find(diag(deta1(1:md,1:md))>realsmall); -ueta1=ueta1(:,bigev); -veta1=veta1(:,bigev); -deta1=deta1(bigev,bigev); -%% if existx | nunstab==0 -%% %disp('solution exists'); -%% eu(1)=1; -%% else -%% if exist -%% %disp('solution exists for unforecastable z only'); -%% eu(1)=-1; -%% %else -%% %fprintf(1,'No solution. %d unstable roots. %d endog errors.\n',nunstab,size(ueta1,2)); -%% end -%% %disp('Generalized eigenvalues') -%% %disp(gev); -%% %md=abs(diag(a))>realsmall; -%% %ev=diag(md.*diag(a)+(1-md).*diag(b))\ev; -%% %disp(ev) -%% % return; -%% end -if isempty(veta1) - unique=1; -else - unique=norm(veta1-veta*veta'*veta1)<realsmall*n; -end - -veta1; -veta; -norm(veta1-veta*veta'*veta1); - -if unique - %disp('solution unique'); - eu(2)=1; -else - fprintf(1,'Indeterminacy. %d loose endog errors.\n',size(veta1,2)-size(veta,2)); - %disp('Generalized eigenvalues') - %disp(gev); - %md=abs(diag(a))>realsmall; - %ev=diag(md.*diag(a)+(1-md).*diag(b))\ev; - %disp(ev) -% return; -end -tmat = [eye(n-nunstab) -(ueta*(deta\veta')*veta1*deta1*ueta1')']; -G0= [tmat*a; zeros(nunstab,n-nunstab) eye(nunstab)]; -G1= [tmat*b; zeros(nunstab,n)]; -% ---------------------- -% G0 is always non-singular because by construction there are no zeros on -% the diagonal of a(1:n-nunstab,1:n-nunstab), which forms G0's ul corner. -% ----------------------- -G0I=inv(G0); -G1=G0I*G1; -usix=n-nunstab+1:n; -C=G0I*[tmat*q*c;(a(usix,usix)-b(usix,usix))\q2*c]; -impact=G0I*[tmat*q*psi;zeros(nunstab,size(psi,2))]; -fmat=b(usix,usix)\a(usix,usix); -fwt=-b(usix,usix)\q2*psi; -ywt=G0I(:,usix); -% -------------------- above are output for system in terms of z'y ------- -G1=real(z*G1*z'); -C=real(z*C); -impact=real(z*impact); -% Correction 10/28/96: formerly line below had real(z*ywt) on rhs, an error. -ywt=z*ywt; - -%-------------------------------------------------------------------------- -% The code below check that a solution is obtained with stable manifold -% z1. Should be commented out for production runs. -%-------------------------------------------------------------------------- -% eu -% -% z2=z(:,n-nunstab+1:n); -% z1=null(z2'); -% -% n=norm(g0*(G1*z1) - g1*z1); -% disp('norm(g0*(g1*z1) - g1*z1) -- should be zero'); -% disp(n); -% -% eta=-veta*diag(1./diag(deta))*ueta'*q2*psi; -% n=norm(g0*impact - (psi + pi*eta)); -% disp('norm(g0*impact - psi - pi*eta) -- should be zero'); -% disp(n); -% -% n=norm(z2'*G1*z1); -% disp('norm(z2''*G1*z1) -- should be zero'); -% disp(n); -% -% n=norm(z2'*G1); -% disp('norm(z2''G1) -- best if zero'); -% disp(n); -% -% n=norm(z2'*impact); -% disp('norm(z2''*impact) -- should be zero'); -% disp(n); -% -% n=norm(G1*z2); -% disp('norm(G1*z2)'); -% disp(n); -% -% disp('press any key to continue'); -% pause diff --git a/MatlabFiles/MSV/OldVersions/mainfunction.m b/MatlabFiles/MSV/OldVersions/mainfunction.m deleted file mode 100644 index cf38e917c721f806fccd86e33fe94d6bb181ee4e..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/mainfunction.m +++ /dev/null @@ -1,219 +0,0 @@ -% The constant paramater model written in the canonical form: -% A x_t = B x_{t-1} + Gamma_u u_t + Pi pi_t -% where f_t = [pi_t, y_t, R_t, mu_w_t, nu_t, E_t pi_{t+1}, E_t y_{t+1}]'; -% ut = [Sst*x_t{-1}; diag(e_t(1),...,e_t(h*))] -% e_t is a 3-by-1 vector of fundamental shocks: e_{r t}, e_{wt}, and e_{nu t}; -% pi_t is a 2-by-1 vector of expectationsl errors for inflation and output: pi_{pi t} and pi_{y t}. -% -% Output format: x_t = G1*x_{t-1} + impact*e_t. -% -% Look for <<>> for ad hoc changes. -%See Notes pp.41-42. - -smallval = 1.0e-8; %<sqrt(machine epsilon). -locs_normalizedvars = [3 4 5]; %R_t, mu_w_t, nu_t; -seednumber = 7910; %472534; % if 0, random state at each clock time -if seednumber - randn('state',seednumber); - rand('state',seednumber); -else - randn('state',fix(100*sum(clock))); - rand('state',fix(100*sum(clock))); -end -n_normalizedvars = length(locs_normalizedvars); - - - -%--- Reading in the values of the parameters. -%addpath D:\ZhaData\WorkDisk\LiuWZ\CalibrationMatlab\LWZmodel\Paravals2r -cd ./Paravals2r -%paravals2r_bench -%paravals2r_complex -paravals2r_noexistence -%paravals2r_try -cd .. - -Q = [ - q11 1-q22 - 1-q11 q22 - ]; -disp(' ') -disp('Ergodic probability:') -qbar = fn_ergodp(Q) -g_etabar = qbar'*g_eta; -if (flag_swap_rs) - g_eta = flipud(g_eta); - g_gamma = flipud(g_gamma); - g_rhor = flipud(g_rhor); - g_phipi = flipud(g_phipi); - g_phiy = flipud(g_phiy); - Q = flipud(fliplr(Q)); -end - - -%--- Composite regime-switching parameters. The symbol "td" stands for "tilde." -htd = 1; %4; -Qtd = [ - Q(1,1) Q(1,1) 0 0 - 0 0 Q(1,2) Q(1,2) - Q(2,1) Q(2,1) 0 0 - 0 0 Q(2,2) Q(2,2) - ]; -%--- psi1(std_t) = g_psi1(s_t,s_{t-1}) -psi1td = [ - g_etabar*(1-g_eta(1)) / (g_eta(1)*(1-g_eta(1))) - g_etabar*(1-g_eta(2)) / (g_eta(2)*(1-g_eta(1))) - g_etabar*(1-g_eta(1)) / (g_eta(1)*(1-g_eta(2))) - g_etabar*(1-g_eta(2)) / (g_eta(2)*(1-g_eta(2))) - ]; -%--- psi2(std_t) = g_psi2(s_{t-1}) -psi2td = [ - (1-g_beta*g_etabar)*(1-g_eta(1)) / (g_eta(1)*(1+g_thetap*(1-g_alpha)/g_alpha)); - (1-g_beta*g_etabar)*(1-g_eta(2)) / (g_eta(2)*(1+g_thetap*(1-g_alpha)/g_alpha)); - (1-g_beta*g_etabar)*(1-g_eta(1)) / (g_eta(1)*(1+g_thetap*(1-g_alpha)/g_alpha)); - (1-g_beta*g_etabar)*(1-g_eta(2)) / (g_eta(2)*(1+g_thetap*(1-g_alpha)/g_alpha)); - ]; -%--- gamma0(std_t) = g_gamma(s_{t}) -gamma0td = [ - g_gamma(1) - g_gamma(1) - g_gamma(2) - g_gamma(2) - ]; -%--- gamma1(std_t) = g_gamma(s_{t-1}) -gamma1td = [ - g_gamma(1) - g_gamma(2) - g_gamma(1) - g_gamma(2) - ]; -%--- rhor(std_t) = g_rhor(s_{t}) -rhortd = [ - g_rhor(1) - g_rhor(1) - g_rhor(2) - g_rhor(2) - ]; -%--- phipi(std_t) = g_phipi(s_{t}) -phipitd = [ - g_phipi(1) - g_phipi(1) - g_phipi(2) - g_phipi(2) - ]; -%--- phiy(std_t) = g_phiy(s_{t}) -phiytd = [ - g_phiy(1) - g_phiy(1) - g_phiy(2) - g_phiy(2) - ]; - -%-------------------- Filling in A(std_t)'s, B(std_t)'s, etc for an expanded gensys. -------------------% -Astd = cell(htd,1); -Bstd = cell(htd,1); -Psistd = cell(htd,1); -for si=1:htd - a1td = (1+g_beta*psi1td(si)*gamma0td(si)); - a2td = psi2td(si)*((g_xi+1)/g_alpha + b/(g_lambda-b)); - Astd{si} = [ - -a1td a2td 0 psi2td(si) psi2td(si)*(b/(g_lambda-b)) g_beta*psi1td(si) 0 - 0 -(g_lambda+b)/g_lambda -(g_lambda-b)/g_lambda 0 g_rhov - b/g_lambda (g_lambda-b)/g_lambda 1 - -(1-rhortd(si))*phipitd(si) -(1-rhortd(si))*phiytd(si) 1 0 0 0 0 - 0 0 0 1 0 0 0 - 0 0 0 0 1 0 0 - ]; - Bstd{si} = [ - -gamma1td(si) psi2td(si)*b/(g_lambda-b) 0 0 0 0 0 - 0 -b/g_lambda 0 0 0 0 0 - 0 0 rhortd(si) 0 0 0 0 - 0 0 0 g_rhow 0 0 0 - 0 0 0 0 g_rhov 0 0 - ]; - Psistd{si} = [ - 0 0 0 - 0 0 0 - g_sigmar 0 0 - 0 g_sigmaw 0 - 0 0 g_sigmav - ]; -end -%--- <<>>Reordering -if (flag_swap_fps) - ki = 4; - kk = 1; - Atmp = Astd{ki}; - Astd{ki} = Astd{kk}; - Astd{kk} = Atmp; - Btmp = Bstd{ki}; - Bstd{ki} = Bstd{kk}; - Bstd{kk} = Btmp; - SwapM = zeros(ki,ki); - SwapM(kk,ki) = kk; - SwapM(ki,1) = 1; - SwapM(2,2) = 1; - SwapM(3,3) = 1; - Qtd = SwapM*Qtd*SwapM; -end - - - - -Aind = cell(htd,1); -Bind = cell(htd,1); -Psiind = cell(htd,1); -Piind = cell(htd,1); -G1ind = cell(htd,1); -impactind = cell(htd,1); -gevind = cell(htd,1); -gevind_abs = cell(htd,1); -euind = cell(htd,1); -for si=1:htd - Aind{si} = [ - Astd{si} - 1 0 0 0 0 0 0 - 0 1 0 0 0 0 0 - ]; - Bind{si} = [ - Bstd{si} - 0 0 0 0 0 1 0 - 0 0 0 0 0 0 1 - ]; - Psiind{si} = [ - Psistd{si} - 0 0 0 - 0 0 0 - ]; - Piind{si} = [ - zeros(5,2) - 1 0 - 0 1 - ]; - - disp('---------- Individual (possibly swapped) regimes in isolation --------------') - disp('Under Regime') - si - - %[G1ind{si},Cind,impactind{si},fmat,fwt,ywt,gevind{si},euind{si}]=gensys(Aind{si}, Bind{si}, zeros(7,1), Psiind{si}, Piind{si}, divind(si)); - %[G1ind{si},impactind{si},gevind{si},euind{si}]=msv_one(Aind{si}, Bind{si}, Psiind{si}, Piind{si}); - [G1ind{si},impactind{si},gevind{si},euind{si}]=msv_simple(Aind{si}, Bind{si}, Psiind{si}, Piind{si}); - [G1 impact gev eu]=msv_all(Aind{si}, Bind{si}, Psiind{si}, Piind{si}); - %[G1ind{si},impactind{si},v2junk,gevind{si},euind{si}]=gensys_dw(Aind{si}, Bind{si}, Psiind{si}, Piind{si}, divind(si)); - - k=size(eu,2); - for i=1:k - gev_abs = abs(gev{i}(:,1).\gev{i}(:,2)); - gev_abs - G1{i} - impact{i} - eu{i} - end -end -% disp(' ') -% disp('----------------- Existence and uniqueness for each individual regime -----------------------') -% for si=1:htd -% euind{si} -% end -return - - diff --git a/MatlabFiles/MSV/OldVersions/msv_all.m b/MatlabFiles/MSV/OldVersions/msv_all.m deleted file mode 100644 index 7fffafc11a21b995b35c8d85ba81484aca939a72..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/msv_all.m +++ /dev/null @@ -1,142 +0,0 @@ -function [G1,impact,gev,eu]=msv_all(g0,g1,psi,pi) -% function [G1,C,impact,gev,eu]=msv_all(g0,g1,psi,pi) -% System given as -% g0*y(t)=g1*y(t-1)+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*z(t). -% eu(1)=1 for existence, eu(2)=1 for uniqueness. -% eu=[-2,-2] for coincident zeros. -% Attempts all possible ordering such that all explosive roots are -% suppressed and no complex conjugate pairs are split -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=1e-10; - -n=size(pi,1); -s=size(pi,2); -ii=1; - -[a b q z]=qz(g0,g1); - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu{ii}=[-2;-2]; - gev{ii}=[diag(a) diag(b)]; - G1{ii}=[] - impact{ii}=[] - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -% determine complex conjugate pairs -pairs=zeros(n,1); -i=1; -while i < n - if abs(b(i+1,i+1)*conj(a(i,i)) - a(i+1,i+1)*conj(b(i,i))) < realsmall - pairs(i)=1; - pairs(i+1)=-1; - i=i+2; - else - i=i+1; - end -end - -% determine number unstable roots -nunstable=0; -i=1; -while i <= n - if pairs(i) == 0 - if (abs(b(i,i)) > abs(a(i,i))) - nunstable=n-i+1; - break; - else - i=i+1; - end - else - if (abs(b(i,i)) > abs(a(i,i))) | (abs(b(i+1,i+1)) > abs(a(i+1,i+1))) - nunstable=n-i+1; - break; - else - i=i+2; - end - end -end - -% No bounded MSV solutions? -if nunstable > s - disp('No bounded MSV solutions') - eu{ii}=[0;0]; - gev{ii}=[diag(a) diag(b)]; - G1{ii}=[] - impact{ii}=[] - return; -end - -% Multiple bounded MSV solutions? -if nunstable < s - disp('Multiple bounded MSV solutions should exist'); - - % Get roots to suppress - idx=zeros(n,1); - idx_size=zeros(n,1); - k=1; - idx(1)=n-nunstable; - cont=1; - while cont > 0 - if (pairs(idx(k)) == -1) - idx_size(k)=2; - else - idx_size(k)=1; - end - - d=nunstable; - for i=1:k - d=d+idx_size(i); - end - - if (d == s) - cont=cont+1; - [an bn qn zn]=qzmoveindex(a,b,q,z,pairs,idx,k,n-nunstable); - [G1{ii},impact{ii},eu{ii}]=qzcomputesolution(an,bn,qn,zn,psi,pi,s); - gev{ii}=[diag(an) diag(bn)]; - ii=ii+1; - end - - if (d >= s) - if idx(k) > idx_size(k) - idx(k)=idx(k)-idx_size(k); - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - return; - end - end - else - if idx(k) > idx_size(k) - idx(k+1)=idx(k)-idx_size(k); - k=k+1; - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - return; - end - end - end - end -end - -% Unique MSV solution? -disp('Unique bounded MVS solution'); -[G1{ii},impact{ii},eu{ii}]=qzcomputesolution(a,b,q,z,psi,pi,s); -gev{ii}=[diag(a) diag(b)]; - - - diff --git a/MatlabFiles/MSV/OldVersions/msv_one.m b/MatlabFiles/MSV/OldVersions/msv_one.m deleted file mode 100644 index 44c79456919075887ebfc5a122a53f6ff84d6711..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/msv_one.m +++ /dev/null @@ -1,145 +0,0 @@ -function [G1,impact,gev,eu]=msv_one(g0,g1,psi,pi) -% function [G1,C,impact,gev,eu]=msv_one(g0,g1,psi,pi) -% System given as -% g0*y(t)=g1*y(t-1)+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*z(t). -% eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for -% existence only with not-s.c. z; eu=[-2,-2] for coincident zeros. -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=1e-10; - -n=size(pi,1); -s=size(pi,2); - -[a b q z]=qz(g0,g1); - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu=[-2;-2]; - gev=[diag(a) diag(b)]; - G1=[] - impact=[] - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -% determine complex conjugate pairs -pairs=zeros(n,1); -i=1; -while i < n - if abs(b(i+1,i+1)*conj(a(i,i)) - a(i+1,i+1)*conj(b(i,i))) < realsmall - pairs(i)=1; - pairs(i+1)=-1; - i=i+2; - else - i=i+1; - end -end - -% determine number unstable roots -nunstable=0; -i=1; -while i <= n - if pairs(i) == 0 - if (abs(b(i,i)) > abs(a(i,i))) - nunstable=n-i+1; - break; - else - i=i+1; - end - else - if (abs(b(i,i)) > abs(a(i,i))) | (abs(b(i+1,i+1)) > abs(a(i+1,i+1))) - nunstable=n-i+1; - break; - else - i=i+2; - end - end -end - -% No bounded MSV solutions? -if nunstable > s - disp('No bounded MSV solutions') - eu=[0;0]; - gev=[diag(a) diag(b)]; - G1=[] - impact=[] - return; -end - -% Multiple bounded MSV solutions? -if nunstable < s - disp('Multiple bounded MSV solutions should exist'); - - % Get roots to suppress - idx=zeros(n,1); - idx_size=zeros(n,1); - k=1; - idx(1)=n-nunstable; - cont=1; - while cont > 0 - if (pairs(idx(k)) == -1) - idx_size(k)=2; - else - idx_size(k)=1; - end - - d=nunstable; - for i=1:k - d=d+idx_size(i); - end - - if (d == s) - cont=cont+1; - [an bn qn zn]=qzmoveindex(a,b,q,z,pairs,idx,k,n-nunstable); - [G1,impact,eu]=qzcomputesolution(an,bn,qn,zn,psi,pi,s); - if (eu(1) == 1) & (eu(2) == 1) - gev=[diag(an) diag(bn)]; - return; - else - disp('MSV solution does not exist for the ordering:'); - abs(diag(bn)./diag(an)) - eu - end - end - - if (d >= s) - if idx(k) > idx_size(k) - idx(k)=idx(k)-idx_size(k); - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - disp('No MSV solutions exist'); - return; - end - end - else - if idx(k) > idx_size(k) - idx(k+1)=idx(k)-idx_size(k); - k=k+1; - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - disp('No MSV solutions exist'); - return; - end - end - end - end -end - -% Unique MSV solution? -disp('Unique bounded MVS solution'); -[G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,s); -gev=[diag(a) diag(b)]; - diff --git a/MatlabFiles/MSV/OldVersions/msv_simple.m b/MatlabFiles/MSV/OldVersions/msv_simple.m deleted file mode 100644 index c37148fc3e6e279cf95ee4e33a669458e45cc6a4..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/msv_simple.m +++ /dev/null @@ -1,62 +0,0 @@ -function [G1,impact,gev,eu]=msv_simple(g0,g1,psi,pi) -% function [G1,C,impact,gev,eu]=msv_one(g0,g1,psi,pi) -% System given as -% g0*y(t)=g1*y(t-1)+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*z(t). -% eu(1)=1 for existence, eu(2)=1 for uniqueness. -% eu=[-2,-2] for coincident zeros. -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=1e-10; - -G1=[]; -impact=[]; -gev=[]; - -n=size(pi,1); -s=size(pi,2); - -[a b q z]=qz(g0,g1); - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu=[-2;-2]; - gev=[diag(a) diag(b)]; - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -% determine number unstable roots -nunstable=0; -i=n; -while i > 0 - if (abs(b(i,i)) > abs(a(i,i))) - nunstable=nunstable+1; - i=i-1; - else - break; - end -end - -eu=[0;0]; -gev=[diag(a) diag(b)]; - -% No bounded MSV solutions? -if nunstable > s - disp('No bounded MSV solutions') - return; -end - -% Multiple or unique bounded MSV solutions? -if nunstable < s - disp('Multiple bounded MSV solutions should exist'); -else - disp('Unique bounded MVS solution'); -end - -[G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,s); diff --git a/MatlabFiles/MSV/OldVersions/qzcomputesolution.m b/MatlabFiles/MSV/OldVersions/qzcomputesolution.m deleted file mode 100644 index 2312735e29e3b833ffd66d2129635022e0f5eaf9..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/qzcomputesolution.m +++ /dev/null @@ -1,126 +0,0 @@ -function [G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,suppress) -% function [G1,C,impact,eu]=qzcomputesolution(a,b,q,z,c,psi,pi,suppress) -% System given as -% (q'*a*z')*y(t)=(q'*b*z')*y(t-1)+psi*e(t)+pi*eta(t), -% with e an exogenous variable process and eta an endogenously determined -% one-step-ahead expectational error. q and z are unitary matrices and a -% and b are upper triangular matrices that are computed via a generalized -% Schur decomposition. It is assumed that the ordering of the system -% is such that complex conjugate pairs are together. If a complex -% conjugate pair is split, then G1 and impact will be complex. -% Returned system is -% y(t)=G1*y(t-1)+impact*z(t). -% eu(1)=1 for existence, eu(2)=1 for uniqueness. -% -% The last suppress roots are suppressed. -% -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=sqrt(eps); - -eu=[0;0]; -G1=[]; -impact=[]; - -n=size(pi,1); -s=size(pi,2); - -q1=q(1:n-suppress,:); -q2=q(n-suppress+1:n,:); - -[u1 d1 v1]=svd(q2*pi,'econ'); -if suppress > 0 - m=sum(diag(d1) > realsmall*d1(1,1)); -else - m=0; -end -u1=u1(:,1:m); -d1=d1(1:m,1:m); -v1=v1(:,1:m); - -if (m == s) - eu(2)=1; -else - eu(2)=0; -end - -[u2 d2 v2]=svd(q2*psi,'econ'); -if suppress > 0 - m=sum(diag(d2) > realsmall*d2(1,1)); -else - m=0; -end -u2=u2(:,1:m); -d2=d2(1:m,1:m); -v2=v2(:,1:m); - -if norm((eye(suppress) - u1*u1')*u2) < realsmall - eu(1)=1; -else - eu(1)=0; - return; -end - - -% Compute impact and G0 -a11_inv=inv(a(1:n-suppress,1:n-suppress)); -x=a11_inv*q1*pi*v1*diag(1./diag(d1))*u1'; -impact=[a11_inv*q1*psi - x*q2*psi; zeros(suppress,size(psi,2))]; - -G1=zeros(n,n); -G1(1:n-suppress,1:n-suppress)=a11_inv*b(1:n-suppress,1:n-suppress); - -% this is to make the answer agree with gensys - this piece does not effect -% the answer, at least after the initial period. -G1(1:n-suppress,n-suppress+1:n)=a11_inv*b(1:n-suppress,n-suppress+1:n) - x*b(n-suppress+1:n,n-suppress+1:n); - -% Convert back to y -impact=z*impact; -G1=z*G1*z'; - -% Is the solution real? -if (suppress == 0) | (suppress == n) | (abs(b(n-suppress+1,n-suppress+1)*conj(a(n-suppress,n-suppress)) - a(n-suppress+1,n-suppress+1)*conj(b(n-suppress,n-suppress))) > realsmall) - impact=real(impact); - G1=real(G1); -end - -%-------------------------------------------------------------------------- -% The code below check that a solution is obtained with stable manifold -% z1. Should be commented out for production runs. -%-------------------------------------------------------------------------- -% z2=z(:,n-suppress+1:n); -% z1=null(z2'); -% A=q'*a*z'; -% B=q'*b*z'; -% -% n=norm(A*(G1*z1) - B*z1); -% disp('norm(A*(g1*z1) - B*z1) -- should be zero'); -% disp(n); -% -% eta=-v1*diag(1./diag(d1))*u1'*q2*psi; -% n=norm(A*impact - psi - pi*eta); -% disp('norm(A*impact - psi - pi*eta) -- should be zero'); -% disp(n); -% -% n=norm(z2'*G1*z1); -% disp('norm(z2''*G1*z1) -- should be zero'); -% disp(n); -% -% n=norm(z2'*G1); -% disp('norm(z2''G1) -- best if zero'); -% disp(n); -% -% n=norm(z2'*impact); -% disp('norm(z2''*impact) -- should be zero'); -% disp(n); -% -% n=norm(G1*z2); -% disp('norm(G1*z2)'); -% disp(n); -% -% disp('press any key to continue'); -% pause - - - - diff --git a/MatlabFiles/MSV/OldVersions/qzdiv.m b/MatlabFiles/MSV/OldVersions/qzdiv.m deleted file mode 100644 index b04068fe95afabf3cf4a096e90849529fef410d9..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/qzdiv.m +++ /dev/null @@ -1,40 +0,0 @@ -function [A,B,Q,Z,v] = qzdiv(stake,A,B,Q,Z,v) -%function [A,B,Q,Z,v] = qzdiv(stake,A,B,Q,Z,v) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, rearranges them -% so that all cases of abs(B(i,i)/A(i,i))>stake are in lower right -% corner, while preserving U.T. and orthonormal properties and Q'AZ' and -% Q'BZ'. The columns of v are sorted correspondingly. -% -% by Christopher A. Sims -% modified (to add v to input and output) 7/27/00 -vin = nargin==6; -%if ~vin, v=[], end; -if ~vin, v=[]; end; -[n jnk] = size(A); -root = abs([diag(A) diag(B)]); -root(:,1) = root(:,1)-(root(:,1)<1.e-13).*(root(:,1)+root(:,2)); -root(:,2) = root(:,2)./root(:,1); -for i = n:-1:1 - m=0; - for j=i:-1:1 - if (root(j,2) > stake | root(j,2) < -.1) - m=j; - break - end - end - if (m==0) - return - end - for k=m:1:i-1 - [A B Q Z] = qzswitch(k,A,B,Q,Z); - tmp = root(k,2); - root(k,2) = root(k+1,2); - root(k+1,2) = tmp; - if vin - tmp=v(:,k); - v(:,k)=v(:,k+1); - v(:,k+1)=tmp; - end - end -end diff --git a/MatlabFiles/MSV/OldVersions/qzmoveindex.m b/MatlabFiles/MSV/OldVersions/qzmoveindex.m deleted file mode 100644 index 853b79d90263ac3d76dff67f466edab1f4f217a3..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/qzmoveindex.m +++ /dev/null @@ -1,17 +0,0 @@ -function [a,b,q,z] = qzmoveindex(a,b,q,z,pairs,idx,k,j) -% function [a,b,q,z] = qzmoveindex(a,b,q,z,pairs,idx,k,j) -% -% Takes U.T. matrices a, b, orthonormal matrices q,z, rearranges them -% so that the indices in idx are moved up to the jth position, while -% preserving U.T. and orthogonal properties and q'az' and q'bz'. -% -% by Daniel Waggoner based on code by Christopher A. Sims - -for i=1:k - [a b q z pairs]=qzslide(a,b,q,z,pairs,idx(i),j); - if (pairs(j) == -1) - j=j-2; - else - j=j-1; - end -end \ No newline at end of file diff --git a/MatlabFiles/MSV/OldVersions/qzslide.m b/MatlabFiles/MSV/OldVersions/qzslide.m deleted file mode 100644 index f9bbcb46d93fd903c5f3e3aa31c81d9ce49c2f51..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/qzslide.m +++ /dev/null @@ -1,80 +0,0 @@ -function [a,b,q,z,pairs] = qzslide(a,b,q,z,pairs,i,j) -% function [a,b,q,z,pairs] = qzslide(a,b,q,z,pairs,i,j) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, rearranges them -% so that the ith diagonal element is moved to the jth position, while -% preserving U.T. and orthogonal properties and Q'AZ' and Q'BZ'. -% -% The array pairs is also rearranged. Complex conjugate pairs are kept -% adjacent. If pairs(i)=1, then position i and i+1 are complex -% conjugate pairs. If pairs(i)=-1, then position i and i-1 are complex -% conjugate pairs. If pairs(i)=0, then position i is real. -% -% -% by Daniel Waggoner based on code by Christopher A. Sims - -n=size(a,1); - -if i == j - return; -end - -if i < j - if pairs(j) == 1 - j=j+1; - end - if pairs(i) == -1 - j=j-1; - i=i-1; - else - if (pairs(i) == 1) & (j == n) - if (i == n-1) - return; - end - j=n-1; - end - end - while i < j - if (pairs(i) == 1) - [a b q z]=qzswitch(i+1,a,b,q,z); - [a b q z]=qzswitch(i,a,b,q,z); - pairs(i)=pairs(i+2); - pairs(i+1)=1; - pairs(i+2)=-1; - else - [a b q z]=qzswitch(i,a,b,q,z); - pairs(i)=pairs(i+1); - pairs(i+1)=0; - end - i=i+1; - end -else - if pairs(j) == -1 - j=j-1; - end - if pairs(i) == 1 - j=j+1; - i=i+1; - else - if (pairs(i) == -1) & (j == 1) - if (i == 2) - return; - end - j=2; - end - end - while i > j - if (pairs(i) == -1) - [a b q z]=qzswitch(i-2,a,b,q,z); - [a b q z]=qzswitch(i-1,a,b,q,z); - pairs(i)=pairs(i-2); - pairs(i-2)=1; - pairs(i-1)=-1; - else - [a b q z]=qzswitch(i-1,a,b,q,z); - pairs(i)=pairs(i-1); - pairs(i-1)=0; - end - i=i-1; - end -end diff --git a/MatlabFiles/MSV/OldVersions/qzsort.m b/MatlabFiles/MSV/OldVersions/qzsort.m deleted file mode 100644 index 7f24331a9650d14c0ae42c25fb2f1a67bed4c754..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/qzsort.m +++ /dev/null @@ -1,21 +0,0 @@ -function [A,B,Q,Z] = qzsort(A,B,Q,Z) -%function [A,B,Q,Z] = qzsort(stake,A,B,Q,Z) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, rearranges them -% so that abs(B(i,i)/A(i,i)) are increasing, while preserving U.T. and -% orthonormal properties and Q'AZ' and % Q'BZ'. -% -% by Daniel Waggoner based on code by Christopher A. Sims - -n=size(A,1); - -for i=2:n - for j=i:-1:2 - if abs(A(j,j)*B(j-1,j-1)) > abs(A(j-1,j-1)*B(j,j)) - [A B Q Z]=qzswitch(j-1,A,B,Q,Z); - else - break; - end - end -end - diff --git a/MatlabFiles/MSV/OldVersions/qzswitch.m b/MatlabFiles/MSV/OldVersions/qzswitch.m deleted file mode 100644 index 93c36640cc3488a66dc6c5261b8778e45c314c94..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/qzswitch.m +++ /dev/null @@ -1,60 +0,0 @@ -function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) -%function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, interchanges -% diagonal elements i and i+1 of both A and B, while maintaining -% Q'AZ' and Q'BZ' unchanged. If diagonal elements of A and B -% are zero at matching positions, the returned A will have zeros at both -% positions on the diagonal. This is natural behavior if this routine is used -% to drive all zeros on the diagonal of A to the lower right, but in this case -% the qz transformation is not unique and it is not possible simply to switch -% the positions of the diagonal elements of both A and B. - realsmall=sqrt(eps)*10; -%realsmall=1e-3; -a = A(i,i); d = B(i,i); b = A(i,i+1); e = B(i,i+1); -c = A(i+1,i+1); f = B(i+1,i+1); - % A(i:i+1,i:i+1)=[a b; 0 c]; - % B(i:i+1,i:i+1)=[d e; 0 f]; -if (abs(c)<realsmall & abs(f)<realsmall) - if abs(a)<realsmall - % l.r. coincident 0's with u.l. of A=0; do nothing - return - else - % l.r. coincident zeros; put 0 in u.l. of a - wz=[b; -a]; - wz=wz/sqrt(wz'*wz); - wz=[wz [wz(2)';-wz(1)'] ]; - xy=eye(2); - end -elseif (abs(a)<realsmall & abs(d)<realsmall) - if abs(c)<realsmall - % u.l. coincident zeros with l.r. of A=0; do nothing - return - else - % u.l. coincident zeros; put 0 in l.r. of A - wz=eye(2); - xy=[c -b]; - xy=xy/sqrt(xy*xy'); - xy=[[xy(2)' -xy(1)'];xy]; - end -else - % usual case - wz = [c*e-f*b, (c*d-f*a)']; - xy = [(b*d-e*a)', (c*d-f*a)']; - n = sqrt(wz*wz'); - m = sqrt(xy*xy'); - if m<eps*100 - % all elements of A and B proportional - return - end - wz = n\wz; - xy = m\xy; - wz = [wz; -wz(2)', wz(1)']; - xy = [xy;-xy(2)', xy(1)']; -end -A(i:i+1,:) = xy*A(i:i+1,:); -B(i:i+1,:) = xy*B(i:i+1,:); -A(:,i:i+1) = A(:,i:i+1)*wz; -B(:,i:i+1) = B(:,i:i+1)*wz; -Z(:,i:i+1) = Z(:,i:i+1)*wz; -Q(i:i+1,:) = xy*Q(i:i+1,:); \ No newline at end of file diff --git a/MatlabFiles/MSV/OldVersions/test_gensys.m b/MatlabFiles/MSV/OldVersions/test_gensys.m deleted file mode 100644 index f8ae311cd2304f84cb4bedfc81871f8a161a837d..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/test_gensys.m +++ /dev/null @@ -1,53 +0,0 @@ -r=2; -s=2; -n=6; -explosive=s; - -div=1.0; - -cont=1; -while cont > 0 - [q tmp]=qr(rand(n,n)); - [z tmp]=qr(rand(n,n)); - a=q*diag(ones(n,1)+rand(n,1))*z; - %a=q*z; - d=rand(n,1); - d(1:explosive)=d(1:explosive)+ones(explosive,1); - b=q*diag(d)*z; - - psi=rand(n,r); - pi=rand(n,s); - c=zeros(n,1); - - [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(a,b,c,psi,pi,div); - [dwG1,dwimpact,dwgev,dweu]=dw_gensys(a,b,psi,pi,div); - - G1 - dwG1 - - impact - dwimpact - - eu - dweu - - if eu(1) == 1 - cont=0; - end -end - -% Simulate -y0=rand(n,1) -n_sim=10; -for i=1:10 - epsilon=rand(r,1); - y=G1*y0+impact*epsilon; - dwy=dwG1*y0+dwimpact*epsilon; - - y - dwy - norm(y-dwy) - pause - - y0=dwy; -end \ No newline at end of file diff --git a/MatlabFiles/MSV/OldVersions/test_msv.m b/MatlabFiles/MSV/OldVersions/test_msv.m deleted file mode 100644 index c408620adca36353d8b6b98e5b78fcf96b1fc4b5..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/OldVersions/test_msv.m +++ /dev/null @@ -1,35 +0,0 @@ -r=2; -s=2; -n=6; -explosive=s; - -div=1.0; - -cont=1; -while cont > 0 - [q tmp]=qr(rand(n,n)); - [z tmp]=qr(rand(n,n)); - a=q*diag(ones(n,1)+rand(n,1))*z; - %a=q*z; - d=rand(n,1); - d(1:explosive)=d(1:explosive)+ones(explosive,1); - b=q*diag(d)*z; - - psi=rand(n,r); - pi=rand(n,s); - - [G1,G2,gev,eu]=msv_all(a,b,psi,pi); - - k=size(eu,2); - - for i=1:k - eu{i} - abs(gev{i}(:,2)./gev{i}(:,1)) - G1{i} - G2{i} - i - k - pause - end -end - diff --git a/MatlabFiles/MSV/dw_gensys.m b/MatlabFiles/MSV/dw_gensys.m deleted file mode 100644 index cd959321a68ebe04c981adf3bdaac052548533f2..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/dw_gensys.m +++ /dev/null @@ -1,46 +0,0 @@ -function [G1,impact,gev,eu]=dw_gensys(g0,g1,psi,pi,div) -% function [G1,impact,gev,eu]=gensys(g0,g1,c,psi,pi,div) -% System given as -% g0*y(t)=g1*y(t-1)+psi*e(t)+pi*eta(t), -% with e an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*e(t). -% If div is omitted from argument list, a div>1 is calculated. -% eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for -% existence only with not-s.c. z; eu=[-2,-2] for coincident zeros. -% By Daniel Waggoner - -realsmall=1e-8; - -G1=[]; -impact=[]; -gev=[]; - -n=size(pi,1); - -if nargin == 4 - div=1.0; -end - -[a b q z]=qz(g0,g1); - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu=[-2;-2]; - gev=[diag(a) diag(b)]; - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -suppress=0; -i=n; -while (i > 0) & (abs(b(i,i)) > abs(a(i,i)*div)) - suppress=suppress+1; - i=i-1; -end - -[G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,suppress); - diff --git a/MatlabFiles/MSV/fwz_msv_msre.m b/MatlabFiles/MSV/fwz_msv_msre.m deleted file mode 100644 index 5b97593340fcbd8b010922b4b22947f4172d3817..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/fwz_msv_msre.m +++ /dev/null @@ -1,125 +0,0 @@ -function [F1, F2, G1, G2, V, err] = fwz_msv_msre(P, A, B, Psi, s, x, max_count, tol) -%[ F1 F2 G1 G2 V err ] = fwz_msv_msre(P, A, B, Psi, s, x, max_count, tol) -% Computes MSV solution of -% -% A(s(t) x(t) = B(s(t) x(t-1) + Psi(s(t)) epsilon(t) + Pi eta(t) -% -% using Newton's Method. Assumes that Pi' = [zeros(s,n-s) eye(s)] and -% that A{i} is invertible. P is the transition matrix and P(i,j) is the -% probability that s(t+1)=j given that s(t)=i. Note that the rows of P -% must sum to one. x is the initial value and if not passed is set to -% zero. max_count is the maximum number of iterations on Newton's method -% before failing and tol is the convergence criterion. -% -% The solution is of the form -% -% x(t) = V{s(t)}*F1{s(t)}*x(t-1) + V{s(t)}*G1{s(t)}*epsilon(t) -% -% eta(t) = F2{s(t)}*x(t-1) + G2{s(t)}*epsilont(t) -% -% A positive value of err is the number of iterations needed to obtain -% convergence and indicates success. A negitive value of err is the number of -% iterations before the method terminated without convergence and indicates -% failure. -% - -h=size(P,1); -n=size(A{1},1); -r=size(Psi{1},2); - -if (nargin <= 7) || (tol <= 0) - tol=1e-5; -end - -if (nargin <= 6) || (max_count <= 0) - max_count=1000; -end - -if nargin <= 5 - x=zeros(h*s*(n-s),1); -end -f=zeros(h*s*(n-s),1); - -Is=eye(s); -I=eye(n-s); - -U=cell(h,1); -for i=1:h - U{i}=inv(A{i}); -end -C=cell(h,h); -for i=1:h - for j=1:h - C{i,j}=P(i,j)*B{j}*U{i}; - end -end - -cont=true; -count=1; -D=zeros(h*s*(n-s),h*s*(n-s)); -X=cell(h,1); -for i=1:h - X{i}=reshape(x((i-1)*s*(n-s)+1:i*s*(n-s)),s,n-s); -end -while cont - for i=1:h - for j=1:h - W1=C{i,j}*[I; -X{i}]; - W2=W1(1:n-s,:); - D((i-1)*s*(n-s)+1:i*s*(n-s),(j-1)*s*(n-s)+1:j*s*(n-s)) = kron(W2',Is); - if i == j - W1=zeros(s,n); - for k=1:h - W1=W1+[X{k} Is]*C{i,k}; - end - W2=-W1(:,n-s+1:end); - D((i-1)*s*(n-s)+1:i*s*(n-s),(j-1)*s*(n-s)+1:j*s*(n-s)) = D((i-1)*s*(n-s)+1:i*s*(n-s),(j-1)*s*(n-s)+1:j*s*(n-s)) + kron(I,W2); - end - end - end - - for i=1:h - mf=zeros(s,n-s); - for j=1:h - mf=mf+[X{j} Is]*C{i,j}*[I; -X{i}]; - end - f((i-1)*s*(n-s)+1:i*s*(n-s))=reshape(mf,s*(n-s),1); - end - - y=D\f; - x=x - y; - - if (count > max_count) || (norm(f) < tol) - cont=false; - else - count=count+1; - for i=1:h - X{i}=reshape(x((i-1)*s*(n-s)+1:i*s*(n-s)),s,n-s); - end - end -end - -if (norm(f) < tol) - err=count; -else - err=-count; -end - -F1=cell(h,1); -F2=cell(h,1); -G1=cell(h,1); -G2=cell(h,1); -V=cell(h,1); -pi=[zeros(n-s,s); Is]; -for i=1:h - X=reshape(x((i-1)*s*(n-s)+1:i*s*(n-s)),s,n-s); - V{i}=U{i}*[I; -X]; - W=[A{i}*V{i} pi]; - F=W\B{i}; - F1{i}=F(1:n-s,:); - F2{i}=F(n-s+1:end,:); - G=W\Psi{i}; - G1{i}=G(1:n-s,:); - G2{i}=G(n-s+1:end,:); -end - \ No newline at end of file diff --git a/MatlabFiles/MSV/fwz_pi2eye.m b/MatlabFiles/MSV/fwz_pi2eye.m deleted file mode 100644 index eb58610077f5080b39ea16f8ed8f19352b3fff68..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/fwz_pi2eye.m +++ /dev/null @@ -1,20 +0,0 @@ -function [A_new, B_new, Psi_new] = fwz_pi2eye(A, B, Psi, Pi) -% [A, B, Psi] = fwz_pi2eye(A, B, Psi, Pi) -% Converts the representation -% -% A(s(t) x(t) = B(s(t) x(t-1) + Psi(s(t)) epsilon(t) + Pi{s(t)} eta(t) -% -% to a form compatible with fwz_msv_msre(). This is the form -% -% A(s(t) x(t) = B(s(t) x(t-1) + Psi(s(t)) epsilon(t) + Pi eta(t) -% -% where Pi' = [zeros(s,n-s) eye(s)] -% - -for i=1:h - [Q,R] = qr(Pi{i}); - W=[zeros(n-s,s) I; inv(R(1:s,1:s)); zeros(s,n-s)]*Q'; - A_new{i}=W*A{i}; - B_new{i}=W*B{i}; - Psi_new{i}=W*Psi{i}; -end \ No newline at end of file diff --git a/MatlabFiles/MSV/gensys.m b/MatlabFiles/MSV/gensys.m deleted file mode 100644 index 705b2c182d1ce28b00000f9634638b5e180c64d9..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/gensys.m +++ /dev/null @@ -1,177 +0,0 @@ -function [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div) -% function [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div) -% System given as -% g0*y(t)=g1*y(t-1)+c+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+C+impact*z(t)+ywt*inv(I-fmat*inv(L))*fwt*z(t+1) . -% If z(t) is i.i.d., the last term drops out. -% If div is omitted from argument list, a div>1 is calculated. -% eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for -% existence only with not-s.c. z; eu=[-2,-2] for coincident zeros. -% By Christopher A. Sims -% Corrected 10/28/96 by CAS - -eu=[0;0]; -realsmall=1e-7; -fixdiv=(nargin==6); -n=size(g0,1); -[a b q z v]=qz(g0,g1); -if ~fixdiv, div=1.01; end -nunstab=0; -zxz=0; -for i=1:n -% ------------------div calc------------ - if ~fixdiv - if abs(a(i,i)) > 0 - divhat=abs(b(i,i))/abs(a(i,i)); - % bug detected by Vasco Curdia and Daria Finocchiaro, 2/25/2004 A root of - % exactly 1.01 and no root between 1 and 1.02, led to div being stuck at 1.01 - % and the 1.01 root being misclassified as stable. Changing < to <= below fixes this. - if 1+realsmall<divhat & divhat<=div - div=.5*(1+divhat); - end - end - end -% ---------------------------------------- - nunstab=nunstab+(abs(b(i,i))>div*abs(a(i,i))); - if abs(a(i,i))<realsmall & abs(b(i,i))<realsmall - zxz=1; - end -end -div ; -nunstab; -if ~zxz - [a b q z]=qzdiv(div,a,b,q,z); -end -gev=[diag(a) diag(b)]; -if zxz - disp('Coincident zeros. Indeterminacy and/or nonexistence.') - eu=[-2;-2]; - % correction added 7/29/2003. Otherwise the failure to set output - % arguments leads to an error message and no output (including eu). - G1=[];C=[];impact=[];fmat=[];fwt=[];ywt=[];gev=[]; - return -end -q1=q(1:n-nunstab,:); -q2=q(n-nunstab+1:n,:); -z1=z(:,1:n-nunstab)'; -z2=z(:,n-nunstab+1:n)'; -a2=a(n-nunstab+1:n,n-nunstab+1:n); -b2=b(n-nunstab+1:n,n-nunstab+1:n); -etawt=q2*pi; -% zwt=q2*psi; -[ueta,deta,veta]=svd(etawt); -md=min(size(deta)); -bigev=find(diag(deta(1:md,1:md))>realsmall); -ueta=ueta(:,bigev); -veta=veta(:,bigev); -deta=deta(bigev,bigev); -% ------ corrected code, 3/10/04 -eu(1) = length(bigev)>=nunstab; -length(bigev); -nunstab; -% ------ Code below allowed "existence" in cases where the initial lagged state was free to take on values -% ------ inconsistent with existence, so long as the state could w.p.1 remain consistent with a stable solution -% ------ if its initial lagged value was consistent with a stable solution. This is a mistake, though perhaps there -% ------ are situations where we would like to know that this "existence for restricted initial state" situation holds. -%% [uz,dz,vz]=svd(zwt); -%% md=min(size(dz)); -%% bigev=find(diag(dz(1:md,1:md))>realsmall); -%% uz=uz(:,bigev); -%% vz=vz(:,bigev); -%% dz=dz(bigev,bigev); -%% if isempty(bigev) -%% exist=1; -%% else -%% exist=norm(uz-ueta*ueta'*uz) < realsmall*n; -%% end -%% if ~isempty(bigev) -%% zwtx0=b2\zwt; -%% zwtx=zwtx0; -%% M=b2\a2; -%% for i=2:nunstab -%% zwtx=[M*zwtx zwtx0]; -%% end -%% zwtx=b2*zwtx; -%% [ux,dx,vx]=svd(zwtx); -%% md=min(size(dx)); -%% bigev=find(diag(dx(1:md,1:md))>realsmall); -%% ux=ux(:,bigev); -%% vx=vx(:,bigev); -%% dx=dx(bigev,bigev); -%% existx=norm(ux-ueta*ueta'*ux) < realsmall*n; -%% else -%% existx=1; -%% end -% ---------------------------------------------------- -% Note that existence and uniqueness are not just matters of comparing -% numbers of roots and numbers of endogenous errors. These counts are -% reported below because usually they point to the source of the problem. -% ------------------------------------------------------ -[ueta1,deta1,veta1]=svd(q1*pi); -md=min(size(deta1)); -bigev=find(diag(deta1(1:md,1:md))>realsmall); -ueta1=ueta1(:,bigev); -veta1=veta1(:,bigev); -deta1=deta1(bigev,bigev); -%% if existx | nunstab==0 -%% %disp('solution exists'); -%% eu(1)=1; -%% else -%% if exist -%% %disp('solution exists for unforecastable z only'); -%% eu(1)=-1; -%% %else -%% %fprintf(1,'No solution. %d unstable roots. %d endog errors.\n',nunstab,size(ueta1,2)); -%% end -%% %disp('Generalized eigenvalues') -%% %disp(gev); -%% %md=abs(diag(a))>realsmall; -%% %ev=diag(md.*diag(a)+(1-md).*diag(b))\ev; -%% %disp(ev) -%% % return; -%% end -if isempty(veta1) - unique=1; -else - unique=norm(veta1-veta*veta'*veta1)<realsmall*n; -end - -veta1; -veta; -norm(veta1-veta*veta'*veta1); - -if unique - %disp('solution unique'); - eu(2)=1; -else - fprintf(1,'Indeterminacy. %d loose endog errors.\n',size(veta1,2)-size(veta,2)); - %disp('Generalized eigenvalues') - %disp(gev); - %md=abs(diag(a))>realsmall; - %ev=diag(md.*diag(a)+(1-md).*diag(b))\ev; - %disp(ev) -% return; -end -tmat = [eye(n-nunstab) -(ueta*(deta\veta')*veta1*deta1*ueta1')']; -G0= [tmat*a; zeros(nunstab,n-nunstab) eye(nunstab)]; -G1= [tmat*b; zeros(nunstab,n)]; -% ---------------------- -% G0 is always non-singular because by construction there are no zeros on -% the diagonal of a(1:n-nunstab,1:n-nunstab), which forms G0's ul corner. -% ----------------------- -G0I=inv(G0); -G1=G0I*G1; -usix=n-nunstab+1:n; -C=G0I*[tmat*q*c;(a(usix,usix)-b(usix,usix))\q2*c]; -impact=G0I*[tmat*q*psi;zeros(nunstab,size(psi,2))]; -fmat=b(usix,usix)\a(usix,usix); -fwt=-b(usix,usix)\q2*psi; -ywt=G0I(:,usix); -% -------------------- above are output for system in terms of z'y ------- -G1=real(z*G1*z'); -C=real(z*C); -impact=real(z*impact); -% Correction 10/28/96: formerly line below had real(z*ywt) on rhs, an error. -ywt=z*ywt; diff --git a/MatlabFiles/MSV/msv_all.m b/MatlabFiles/MSV/msv_all.m deleted file mode 100644 index 22affc994490ad693320dced7569c880a1dffb49..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/msv_all.m +++ /dev/null @@ -1,150 +0,0 @@ -function [G1,impact,gev,eu]=msv_all(g0,g1,psi,pi) -% function [G1,C,impact,gev,eu]=msv_all(g0,g1,psi,pi) -% System given as -% g0*y(t)=g1*y(t-1)+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*z(t). -% eu(1)=1 for existence, eu(2)=1 for uniqueness. -% eu=[-2,-2] for coincident zeros. -% Attempts all possible ordering such that all explosive roots are -% suppressed and no complex conjugate pairs are split -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=1e-10; - -n=size(pi,1); -s=size(pi,2); -ii=1; - -[a b q z]=qz(g0,g1); -eu{ii}=[0;0]; -gev{ii}=[diag(a) diag(b)]; -G1{ii}=[] -impact{ii}=[] - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu{ii}=[-2;-2]; - gev{ii}=[diag(a) diag(b)]; - G1{ii}=[] - impact{ii}=[] - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -% determine complex conjugate pairs -pairs=zeros(n,1); -i=1; -while i < n - if abs(b(i+1,i+1)*conj(a(i,i)) - a(i+1,i+1)*conj(b(i,i))) < realsmall - pairs(i)=1; - pairs(i+1)=-1; - i=i+2; - else - i=i+1; - end -end - -% determine number unstable roots -nunstable=0; -i=1; -while i <= n - if pairs(i) == 0 - if (abs(b(i,i)) > abs(a(i,i))) - nunstable=n-i+1; - break; - else - i=i+1; - end - else - if (abs(b(i,i)) > abs(a(i,i))) | (abs(b(i+1,i+1)) > abs(a(i+1,i+1))) - nunstable=n-i+1; - break; - else - i=i+2; - end - end -end - -% No bounded MSV solutions? -if nunstable > s - disp('No bounded MSV solutions') - eu{ii}=[0;0]; - gev{ii}=[diag(a) diag(b)]; - G1{ii}=[] - impact{ii}=[] - return; -end - -disp('Beginning*************') -% Multiple bounded MSV solutions? -if nunstable < s - disp('Multiple bounded MSV solutions should exist'); - - % Get roots to suppress - idx=zeros(n,1); - idx_size=zeros(n,1); - k=1; - idx(1)=n-nunstable; - cont=1; - while cont > 0 - if (pairs(idx(k)) == -1) - idx_size=2; - else - idx_size=1; - end - - d=nunstable; - for i=1:k - d=d+idx_size(i); - end - - d - size(pi,2) - if (d == size(pi,2)) - cont=cont+1; - [an bn qn zn]=qzmoveindex(a,b,q,z,pairs,idx,k,n-nunstable); - [G1{ii},impact{ii},eu{ii}]=qzcomputesolution(an,bn,qn,zn,psi,pi,s); - gev{ii}=[diag(an) diag(bn)]; - ii=ii+1 - end - - if (d >= s) - if idx(k) > idx_size(k) - idx(k)=idx(k)-idx_size(k); - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - return; - end - end - else - if idx(k) > idx_size(k) - k=k+1; - idx(k)=idx(k-1)-idx_size(k); - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - return; - end - end - end - end -end - -disp('End*************') -% Unique MSV solution? -disp('Unique bounded MVS solution'); -[G1{ii},impact{ii},eu{ii}]=qzcomputesolution(a,b,q,z,psi,pi,s); -gev{ii}=[diag(a) diag(b)]; - - - diff --git a/MatlabFiles/MSV/msv_all_complex.m b/MatlabFiles/MSV/msv_all_complex.m deleted file mode 100644 index 607f5722335b0a9073c82e1b5f58c203ecb502a2..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/msv_all_complex.m +++ /dev/null @@ -1,177 +0,0 @@ -function [Gamma,Omega]=msv_all_complex(A1,A2,A3,B1,B2,B3,C1) -% System given as -% -% E_t[y(t+1)] = A1*u(t) + A2*z(t) + A3*y(t) -% -% z(t+1) = B1*u(t) + B2*z(t) + B3*y(t) -% -% u(t+1) = C1*u(t) + epsilon(t+1) -% -% for t >= 0. The dimension of u(t) is r, the dimension of z(t) is k, and -% the dimension of y(t) is s. E_t[epsilon(t+1)]=0. -% -% Solution technique: -% -% Assume a solution of the form y(t) = Gamma*u(t) + Omega*z(t). This -% implies that -% -% Gamma*C1*u(t) + Omega*(B1*u(t) + B2*z(t) + B3*(Gamma*u(t) + Omega*z(t))) -% = A1*u(t) + A2*z(t) + A3*(Gamma*u(t) + Omega*z(t)) -% -% Gathering terms, we have that -% -% (1) (Omega*B2 + Omega*B3*Omega - A2 - A3*Omega)*z(t) = 0 -% -% (2) (Gamma*C1 + Omega*B1 + Omega*B3*Gamma - A1 - A3*Gamma)*u(t) = 0 -% -% Let -% -% X = [ -B2 -B3 -% -A2 -A3 ] -% -% and let X = U*T*U' be a Schur decomposition of X, where U is unitary, T -% is upper triangular, and ' denotes the conjugate transpose. If -% -% U = [ U11 U12 -% U21 U22 ] -% -% and U11 is invertiable, then -% -% (3) Omega = U21*inv(U11) -% -% will be a solution of (1) for any value of z(t) in k-dimensional -% euclidean space. On the other hand, if Omega is a solution of (1) for -% all z(t) in k-dimensional euclidean space, then Omega is of the form of -% (3) for some Schur decomposition of X. -% -% Given Omega, the solution of the second equation is -% -% vec(Gamma) = inv(kron(C1',eye(s)) + kron(eye(r),Omega*B3 - A3)) -% *vec(A1 - Omega*B1) -% -% The solution Omega of (1) depends only on the column space -% -% [ U11 -% U21 ] -% -% which we denote by V. It is well known that the eigenvalues of X appear -% along the diagonal of T. If the eigenvalues of X are distinct, then the -% ordering of the eigenvalues uniquely determines U. However, when the -% dimension of the eigenspace of some eigenvalue is greater than one, this -% is no longer true and reordering the Schur decomposition is no longer -% sufficient to capture all possible solutions. -% -% By Daniel Waggoner - -realsmall=sqrt(eps); - -r=size(A1,2); -k=size(A2,2); -s=size(A3,2); -kk=k+s; - -Gamma=cell(0,1); -Omega=cell(0,1); - -if k == 0 - Y=kron(C1',eye(s)) + kron(eye(r),-A3); - if rank(Y) == size(Y,1) - Omega{1,1}=zeros(s,k); - Gamma{1,1}=reshape(inv(Y)*reshape(A1,s*r,1),s,r); - - %------------------------------------------------------------------ - % Check if solution - comment out for production runs - % E_t[y(t+1)] = E_t[Gamma*u(t+1) + Omega*z(t+1)] - % = Gamma*C1*u(t) + Omega*(B1*u(t) + B2*z(t) - % + B3*(Gamma*u(t) + Omega*z(t))) - % = A1*u(t) + A2*z(t) + A3*(Gamma*u(t) + Omega*z(t)) - %------------------------------------------------------------------ - n1=norm(Gamma*C1 - (A1 + A3*Gamma)); - if n1 > realsmall - disp('Should be zero - press any key to continue'); - disp('Gamma*C1 - (A1 + A3*Gamma)'); - disp(n1); - pause; - end - %------------------------------------------------------------------ - - end -else - % get and order Schur decomposition - X=[ -B2 -B3 - -A2 -A3 - ]; - - [U,T]=schur(X,'complex'); - [d,id]=sort(abs(diag(T)),'descend'); - [id,idx]=sort(id); - [U,T]=ordschur(U,T,idx); - u=U; t=T; - - idx=ones(s+k,1); - for i=0:s-1 - idx(s+k-i)=0; - end - - ii=1; - cont=1; - while cont == 1 - - u11=u(1:k,1:k); - u21=u(k+1:k+s,1:k); - - if rank(u11) == k - omega=u21/u11; - Y=kron(C1',eye(s)) + kron(eye(r),omega*B3 - A3); - if rank(Y) == size(Y,1) - Omega{ii,1}=omega; - Gamma{ii,1}=reshape(Y\reshape(A1 - omega*B1,s*r,1),s,r); - ii=ii+1; - - %---------------------------------------------------------- - % Check if solution - comment out for production runs - % E_t[y(t+1)] = E_t[Gamma*u(t+1) + Omega*z(t+1)] - % = Gamma*C1*u(t) + Omega*(B1*u(t) + B2*z(t) - % + B3*(Gamma*u(t) + Omega*z(t))) - % = A1*u(t) + A2*z(t) + A3*(Gamma*u(t) - % + Omega*z(t)) - %---------------------------------------------------------- - n1=norm(Gamma{ii-1,1}*C1 + Omega{ii-1,1}*(B1 + B3*Gamma{ii-1,1}) - (A1 + A3*Gamma{ii-1,1})); - n2=norm(Omega{ii-1,1}*(B2 + B3*Omega{ii-1,1}) - (A2 + A3*Omega{ii-1,1})); - if (n1 > realsmall) || (n2 > realsmall) - i - idx - disp('Both should be zero - press any key to continue'); - disp('Gamma*C1 + Omega*(B1 + B3*Gamma) - (A1 + A3*Gamma)'); - disp(n1); - disp('Omega*(B2 + B3*Omega) - (A2 + A3*Omega)'); - disp(n2); - pause - end - %---------------------------------------------------------- - end - end - - % increment idx - cont=0; - jj=1; - while (jj < kk) & (idx(jj) == 0) - idx(jj)=1; - jj=jj+1; - end - for j=jj+1:kk - if idx(j) == 0 - idx(j)=1; - cont=1; - break; - end - end - for i=1:jj - idx(j-i)=0; - end - - [u,t]=ordschur(U,T,idx); - end -end - - diff --git a/MatlabFiles/MSV/msv_all_complex_ar.m b/MatlabFiles/MSV/msv_all_complex_ar.m deleted file mode 100644 index 3ad0abddcc6caed9624bbea5d2b41fce42827d6d..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/msv_all_complex_ar.m +++ /dev/null @@ -1,112 +0,0 @@ -function [G1,Impact,gev,z2,err]=msv_all_complex_AR(A,B,Psi,Pi) -% System given as -% -% A*y(t) = B*y(t-1) + psi*epsilon(t) + pi*eta(t), -% -% with epsilon(t) an exogenous process and eta(t) endogenously determined -% one-step-ahead expectational errors. Returned solutions are -% -% y(t)=G1{i}*y(t-1)+Impact{i}*epsilon(t). -% -% The span of the each of the solutions returned will be n-s and the -% solution will be uniquely determined by its span. gev returns the -% generalized eigenvalues, of which the last s were suppressed. z2 is the -% subspace that is perpendicular to the span of the solution. -% -% err is the error return. -% err = 0 -- success, at least one msv solution found. -% err = 1 -- no msv solutions -% err = 2 -- degenerate system -% -% Solutions are obtained via calls to qzcomputesolution(). -% -% By Daniel Waggoner - -realsmall=sqrt(eps); - -n=size(Pi,1); -s=size(Pi,2); - -[a,b,q,z]=qz(A,B,'complex'); - -G1=cell(0,1); -Impact=cell(1,1); -gev=cell(0,1); -gev{1}=[diag(a) diag(b)]; -z2=cell(0,1); -err=1; - -% determine if the system is degenerate and count the number of diagonal -% elements of a that are non-zero. -kk=0; -for i=1:n - if abs(a(i,i)) < realsmall - if abs(b(i,i)) < realsmall - disp('Coincident zeros.') - err=2; - return - end - else - kk=kk+1; - end -end - -% too many roots must be suppressed. no msv type solutions. -if (n-kk > s) - return -end - -% sort the generalized eigenvalues -[d,id]=sort(abs(diag(b)./diag(a)),'descend'); -[id,idx]=sort(id); -[a0,b0,q0,z0]=ordqz(a,b,q,z,idx); -a=a0; b=b0; q=q0; z=z0; - -idx=ones(n,1); -for i=0:s-1 - idx(n-i)=0; -end - -ii=0; -cont=1; -cntmax = 500; -cntnumber = 1; -while (cont == 1) && (cntnumber <=cntmax) - % compute solution - [g1,impact,eu]=qzcomputesolution(a,b,q,z,Psi,Pi,s); - - % save solution if unique - if (eu == [1;1]) - ii=ii+1; - G1{ii,1}=g1; - Impact{ii,1}=impact; - gev{ii,1}=[diag(a) diag(b)]; - z2{ii,1}=z(:,n-s+1:n); - err=0; - end - - % increment idx - cont=0; - jj=1; - while (jj < kk) & (idx(jj) == 0) - idx(jj)=1; - jj=jj+1; - end - for j=jj+1:kk - if idx(j) == 0 - idx(j)=1; - cont=1; - break; - end - end - for i=1:jj - idx(j-i)=0; - end - - % reorder roots - [a,b,q,z]=ordqz(a0,b0,q0,z0,idx); - - %--- Ad hoc addtion. - cntnumber = cntnumber+1; -end - diff --git a/MatlabFiles/MSV/msv_complex_ar.m b/MatlabFiles/MSV/msv_complex_ar.m deleted file mode 100644 index ae9c5c145665cdbc98ba9ae249f83787b5591f5a..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/msv_complex_ar.m +++ /dev/null @@ -1,69 +0,0 @@ -function [g1,impact,gev,z2,err]=msv_complex_AR(A,B,Psi,Pi) -% System given as -% -% A*y(t) = B*y(t-1) + psi*epsilon(t) + pi*eta(t), -% -% with epsilon(t) an exogenous process and eta(t) endogenously determined -% one-step-ahead expectational errors. Returned solutions are -% -% y(t)=G1{i}*y(t-1)+Impact{i}*epsilon(t). -% -% The span of the each of the solutions returned will be n-s and the -% solution will be uniquely determined by its span. gev returns the -% generalized eigenvalues, of which the last s were suppressed. z2 is the -% subspace that is perpendicular to the span of the solution. -% -% err is the error return. -% err = [2;2] -- degenerate system -% err = [1;1] -- success, unique msv solution found. -% err = [1;0] -- multiple msv solutions -% err = [3;?] -- msv solutions are unbounded -% -% Solutions are obtained via calls to msv_all_complex_AR(). -% -% By Daniel Waggoner - -realsmall=sqrt(eps); - -% find all msv type solutions -[G1,Impact,Gev,Z2,err]=msv_all_complex_AR(A,B,Psi,Pi); - -if err ~= 0 - % no solution exists - g1=[]; - impact=[]; - gev=Gev{1,1}; - z2=[]; - if err == 2 - err=[-2;-2]; - else - err=[0;0]; - end -else - % solution exists - g1=G1{1}; - impact=Impact{1,1}; - gev=Gev{1,1}; - z2=Z2{1,1}; - - % uniqueness - if size(G1,1) == 1 - err=[1,1]; - else - n=size(Pi,1); - m=n-size(Pi,2)+1; - x1=min(abs(gev(m:n,2)./gev(m:n,1))); - x2=min(abs(Gev{2,1}(m:n,2)./Gev{2,1}(m:n,1))); - if abs(x1 - x2) > realsmall - err=[1,1]; - else - err=[1,0]; - end - end - - % boundedness - m=size(Pi,1)-size(Pi,2); - if max(abs(gev(1:m,2)./gev(1:m,1))) > 1+1.0e-9 - err(1)=3 - end -end diff --git a/MatlabFiles/MSV/msv_newton.m b/MatlabFiles/MSV/msv_newton.m deleted file mode 100644 index dd8d0ea8449f35dc3eb1d0c357131f50fe16122d..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/msv_newton.m +++ /dev/null @@ -1,109 +0,0 @@ -function [ F1 F2 G1 G2 V ] = MSV_Newton(P, A, B, Psi, s, x) -% -% Computes MSV solution of -% -% A(s(t) x(t) = B(s(t) x(t-1) + Psi(s(t)) epsilon(t) + Pi eta(t) -% -% using Newton's Method. Assumes that Pi' = [zeros(s,n-s) eye(s)] -% -% Assumes that A{i} is invertable for 1 <= i <= h - -max_count=1000; -tol=1e-5; - -h=size(P,1); -n=size(A{1},1); -r=size(Psi{1},2); - -if nargin <= 5 - x=zeros(h*s*(n-s),1); -end -f=zeros(h*s*(n-s),1); - -Is=eye(s); -I=eye(n-s); - -% The following code would be used if Pi were passed instead of the -% assumption that Pi' = [zeros(s,n-s) eye(s)]. -% for i=1:h -% [Q,R] = qr(Pi{i}); -% W=[zeros(n-s,s) I; inv(R(1:s,1:s)); zeros(s,n-s)]*Q'; -% A{i}=W*A{i}; -% B{i}=W*B{i}; -% Psi{i}=W*Psi{i}; -% end - -U=cell(h,1); -for i=1:h - U{i}=inv(A{i}); -end -C=cell(h,h); -for i=1:h - for j=1:h - C{i,j}=P(i,j)*B{j}*U{i}; - end -end - -cont=true; -count=1; -D=zeros(h*s*(n-s),h*s*(n-s)); -X=cell(h,1); -for i=1:h - X{i}=reshape(x((i-1)*s*(n-s)+1:i*s*(n-s)),s,n-s); -end -while cont - for i=1:h - for j=1:h - W1=C{i,j}*[I; -X{i}]; - W2=W1(1:n-s,:); - D((i-1)*s*(n-s)+1:i*s*(n-s),(j-1)*s*(n-s)+1:j*s*(n-s)) = kron(W2',Is); - if i == j - W1=zeros(s,n); - for k=1:h - W1=W1+[X{k} Is]*C{i,k}; - end - W2=-W1(:,n-s+1:end); - D((i-1)*s*(n-s)+1:i*s*(n-s),(j-1)*s*(n-s)+1:j*s*(n-s)) = D((i-1)*s*(n-s)+1:i*s*(n-s),(j-1)*s*(n-s)+1:j*s*(n-s)) + kron(I,W2); - end - end - end - - for i=1:h - mf=zeros(s,n-s); - for j=1:h - mf=mf+[X{j} Is]*C{i,j}*[I; -X{i}]; - end - f((i-1)*s*(n-s)+1:i*s*(n-s))=reshape(mf,s*(n-s),1); - end - - y=D\f; - x=x - y; - - if (count > max_count) || (norm(y) < tol) - cont=false; - end - - count=count+1; - for i=1:h - X{i}=reshape(x((i-1)*s*(n-s)+1:i*s*(n-s)),s,n-s); - end -end - -F1=cell(h,1); -F2=cell(h,1); -G1=cell(h,1); -G2=cell(h,1); -V=cell(h,1); -pi=[zeros(n-s,s); Is]; -for i=1:h - X=reshape(x((i-1)*s*(n-s)+1:i*s*(n-s)),s,n-s); - V{i}=U{i}*[I; -X]; - W=[A{i}*V{i} pi]; - F=W\B{i}; - F1{i}=F(1:n-s,:); - F2{i}=F(n-s+1:end,:); - G=W\Psi{i}; - G1{i}=G(1:n-s,:); - G2{i}=G(n-s+1:end,:); -end - \ No newline at end of file diff --git a/MatlabFiles/MSV/msv_one.m b/MatlabFiles/MSV/msv_one.m deleted file mode 100644 index 7d68e5a3ec36438be728c82dbbee76e7e7af7c36..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/msv_one.m +++ /dev/null @@ -1,143 +0,0 @@ -function [G1,impact,gev,eu]=msv_one(g0,g1,psi,pi) -% function [G1,C,impact,gev,eu]=msv_one(g0,g1,psi,pi) -% System given as -% g0*y(t)=g1*y(t-1)+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*z(t). -% eu(1)=1 for existence, eu(2)=1 for uniqueness. eu(1)=-1 for -% existence only with not-s.c. z; eu=[-2,-2] for coincident zeros. -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=1e-10; - -G1=[]; -impact=[]; -gev=[]; - -n=size(pi,1); - -[a b q z]=qz(g0,g1); - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu=[-2;-2]; - gev=[diag(a) diag(b)]; - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -% determine complex conjugate pairs -pairs=zeros(n,1); -i=1; -while i < n - if abs(b(i+1,i+1)*conj(a(i,i)) - a(i+1,i+1)*conj(b(i,i))) < realsmall - pairs(i)=1; - pairs(i+1)=-1; - i=i+2; - else - i=i+1; - end -end - -% determine number unstable roots -nunstable=0; -i=1; -while i <= n - if pairs(i) == 0 - if (abs(b(i,i)) > abs(a(i,i))) - nunstable=n-i+1; - break; - else - i=i+1; - end - else - if (abs(b(i,i)) > abs(a(i,i))) | (abs(b(i+1,i+1)) > abs(a(i+1,i+1))) - nunstable=n-i+1; - break; - else - i=i+2; - end - end -end - -eu=[0;0]; -gev=[diag(a) diag(b)]; - -% No bounded MSV solutions? -if nunstable > size(pi,2) - disp('No bounded MSV solutions') - return; -end - -% Multiple bounded MSV solutions? -if nunstable < size(pi,2) - disp('Multiple bounded MSV solutions should exist'); - - % Get roots to suppress - idx=zeros(n,1); - idx_size=zeros(n,1); - k=1; - idx(1)=n-nunstable; - cont=1; - while cont > 0 - if (pairs(idx(k)) == -1) - idx_size=2; - else - idx_size=1; - end - - d=nunstable; - for i=1:k - d=d+idx_size(i); - end - - if (d == size(pi,2)) - cont=cont+1; - [an bn qn zn]=qzmoveindex(a,b,q,z,pairs,idx,k,n-nunstable); - [G1,impact,eu]=qzcomputesolution(an,bn,qn,zn,psi,pi,size(pi,2)); - if (eu(1) == 1) & (eu(2) == 1) - gev=[diag(an) diag(bn)]; - return; - else - disp('MSV solution does not exist for the ordering:'); - abs(diag(bn)./diag(an)) - eu - end - end - - if (d >= size(pi,2)) - if idx(k) > idx_size(k) - idx(k)=idx(k)-idx_size(k); - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - disp('No MSV solutions exist'); - return; - end - end - else - if idx(k) > idx_size(k) - k=k+1; - idx(k)=idx(k-1)-idx_size(k); - else - if k > 1 - k=k-1; - idx(k)=idx(k)-idx_size(k); - else - disp('No MSV solutions exist'); - return; - end - end - end - end -end - -% Unique MSV solution? -disp('Unique bounded MVS solution'); -[G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,size(pi,2)); diff --git a/MatlabFiles/MSV/msv_simple.m b/MatlabFiles/MSV/msv_simple.m deleted file mode 100644 index c37148fc3e6e279cf95ee4e33a669458e45cc6a4..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/msv_simple.m +++ /dev/null @@ -1,62 +0,0 @@ -function [G1,impact,gev,eu]=msv_simple(g0,g1,psi,pi) -% function [G1,C,impact,gev,eu]=msv_one(g0,g1,psi,pi) -% System given as -% g0*y(t)=g1*y(t-1)+psi*z(t)+pi*eta(t), -% with z an exogenous variable process and eta being endogenously determined -% one-step-ahead expectational errors. Returned system is -% y(t)=G1*y(t-1)+impact*z(t). -% eu(1)=1 for existence, eu(2)=1 for uniqueness. -% eu=[-2,-2] for coincident zeros. -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=1e-10; - -G1=[]; -impact=[]; -gev=[]; - -n=size(pi,1); -s=size(pi,2); - -[a b q z]=qz(g0,g1); - -for i=1:n - if (abs(a(i,i)) < realsmall) & (abs(b(i,i)) < realsmall) - disp('Coincident zeros.') - eu=[-2;-2]; - gev=[diag(a) diag(b)]; - return - end -end - -[a b q z]=qzsort(a,b,q,z); - -% determine number unstable roots -nunstable=0; -i=n; -while i > 0 - if (abs(b(i,i)) > abs(a(i,i))) - nunstable=nunstable+1; - i=i-1; - else - break; - end -end - -eu=[0;0]; -gev=[diag(a) diag(b)]; - -% No bounded MSV solutions? -if nunstable > s - disp('No bounded MSV solutions') - return; -end - -% Multiple or unique bounded MSV solutions? -if nunstable < s - disp('Multiple bounded MSV solutions should exist'); -else - disp('Unique bounded MVS solution'); -end - -[G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,s); diff --git a/MatlabFiles/MSV/qzcomputesolution.m b/MatlabFiles/MSV/qzcomputesolution.m deleted file mode 100644 index 4c5dcdb5bd88347d54e31c2436ebd5eb6658d51b..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/qzcomputesolution.m +++ /dev/null @@ -1,120 +0,0 @@ -function [G1,impact,eu]=qzcomputesolution(a,b,q,z,psi,pi,suppress) -% System given as -% -% (q'*a*z')*y(t) = (q'*b*z')*y(t-1) + psi*epsilon(t) + pi*eta(t), -% -% with epsilon(t) an exogenous process and eta(t) an endogenously -% determined one-step-ahead expectational error. The matrices q and z are -% unitary and a and b are upper triangular. Furthermore, it is assumed -% that if a11 is the upper (n-suppress) x (n-suppress) block of a, then a11 -% is non-singular. -% -% The span of the returned solution is equal to the span of the first -% (n-suppress) columns of z. -% -% If t -% It is assumed that the ordering of -% the system is such that complex conjugate pairs are together. If a -% complex conjugate pair is split, then G1 and impact will be complex. -% -% Returned solution is -% -% y(t) = G1*y(t-1) + impact*z(t). -% -% eu(1)=1 for existence, eu(2)=1 for uniqueness. -% -% The last suppress roots are suppressed. -% -% By Daniel Waggoner -- Based on code by Christopher A. Sims - -realsmall=sqrt(eps); - -eu=[0;0]; -G1=[]; -impact=[]; - -n=size(pi,1); -s=size(pi,2); - -q1=q(1:n-suppress,:); -q2=q(n-suppress+1:n,:); - -[u1 d1 v1]=svd(q2*pi,'econ'); - -% find the dimension of the column space of q2*pi -if suppress > 0 - % all singular values small - q2*pi is the zero matrix - if d1(1,1) < realsmall - m=0; - else - % exclude the small singular values relative to largest - m=sum(diag(d1) > realsmall*d1(1,1)); - end -else - m=0; -end -u1=u1(:,1:m); -d1=d1(1:m,1:m); -v1=v1(:,1:m); - -if (m == suppress) - eu(2)=1; -end - -% find othogonal basis for span of q2*psi -[u2 d2 v2]=svd(q2*psi,'econ'); -if suppress > 0 - % all singular values small - q2*psi is the zero matrix - if d2(1,1) < realsmall - m=0; - else - % exclude the small singular values relative to largest - m=sum(diag(d2) > realsmall*d2(1,1)); - end -else - m=0; -end -u2=u2(:,1:m); -d2=d2(1:m,1:m); -v2=v2(:,1:m); - -% is the projection of the column space of q2*psi on to the column space of -% the column space of q2*pi the identity mapping? -if norm((eye(suppress) - u1*u1')*u2) > realsmall - return -end - -eu(1)=1; - -% Compute impact and G0 -a11_inv=inv(a(1:n-suppress,1:n-suppress)); -x=a11_inv*q1*pi*v1*diag(1./diag(d1))*u1'; -impact=[a11_inv*q1*psi - x*q2*psi; zeros(suppress,size(psi,2))]; - -G1=zeros(n,n); - -G1(1:n-suppress,1:n-suppress)=a11_inv*b(1:n-suppress,1:n-suppress); - -% Uncomment the line below to make the answer agree with gensys - this -% piece does not effect the answer, at least after the initial period. -G1(1:n-suppress,n-suppress+1:n)=a11_inv*b(1:n-suppress,n-suppress+1:n) - x*b(n-suppress+1:n,n-suppress+1:n); - -% Convert back to y -impact=z*impact; -G1=z*G1*z'; - -% Is the solution real? -% if (suppress == 0) | (suppress == n) | (abs(b(n-suppress+1,n-suppress+1)*conj(a(n-suppress,n-suppress)) - a(n-suppress+1,n-suppress+1)*conj(b(n-suppress,n-suppress))) > realsmall) -% impact=real(impact); -% G1=real(G1); -% end - -%-------------------------------------------------------------------------- -% The code below check that a solution is obtained with stable manifold -% z1. Should be commented out for production runs. -%-------------------------------------------------------------------------- -z2=z(:,n-suppress+1:n); -z1=null(z2'); -%if check_solution_AR(G1,impact,q'*a*z',q'*b*z',psi,pi,z1) == 1 -% eu(1)=3; -%end diff --git a/MatlabFiles/MSV/qzdiv.m b/MatlabFiles/MSV/qzdiv.m deleted file mode 100644 index b04068fe95afabf3cf4a096e90849529fef410d9..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/qzdiv.m +++ /dev/null @@ -1,40 +0,0 @@ -function [A,B,Q,Z,v] = qzdiv(stake,A,B,Q,Z,v) -%function [A,B,Q,Z,v] = qzdiv(stake,A,B,Q,Z,v) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, rearranges them -% so that all cases of abs(B(i,i)/A(i,i))>stake are in lower right -% corner, while preserving U.T. and orthonormal properties and Q'AZ' and -% Q'BZ'. The columns of v are sorted correspondingly. -% -% by Christopher A. Sims -% modified (to add v to input and output) 7/27/00 -vin = nargin==6; -%if ~vin, v=[], end; -if ~vin, v=[]; end; -[n jnk] = size(A); -root = abs([diag(A) diag(B)]); -root(:,1) = root(:,1)-(root(:,1)<1.e-13).*(root(:,1)+root(:,2)); -root(:,2) = root(:,2)./root(:,1); -for i = n:-1:1 - m=0; - for j=i:-1:1 - if (root(j,2) > stake | root(j,2) < -.1) - m=j; - break - end - end - if (m==0) - return - end - for k=m:1:i-1 - [A B Q Z] = qzswitch(k,A,B,Q,Z); - tmp = root(k,2); - root(k,2) = root(k+1,2); - root(k+1,2) = tmp; - if vin - tmp=v(:,k); - v(:,k)=v(:,k+1); - v(:,k+1)=tmp; - end - end -end diff --git a/MatlabFiles/MSV/qzmoveindex.m b/MatlabFiles/MSV/qzmoveindex.m deleted file mode 100644 index 57bd9c9882c9dd4ba8780d2cd05d624fbfc6e970..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/qzmoveindex.m +++ /dev/null @@ -1,18 +0,0 @@ -function [a,b,q,z] = qzmoveindex(a,b,q,z,pairs,idx,k,j) -% function [a,b,q,z] = qzmoveindex(a,b,q,z,pairs,idx,k,j) -% -% Takes U.T. matrices a, b, orthonormal matrices q,z, rearranges them -% so that the indices in idx are moved up to the jth position, while -% preserving U.T. and orthogonal properties and q'az' and q'bz'. -% -% by Daniel Waggoner based on code by Christopher A. Sims - -while k > 0 - [a b q z pairs]=qzslide(a,b,q,z,pairs,idx(k),j); - if (pairs(j) == -1) - j=j-2; - else - j=j-1; - end - k=k-1; -end \ No newline at end of file diff --git a/MatlabFiles/MSV/qzslide.m b/MatlabFiles/MSV/qzslide.m deleted file mode 100644 index f9bbcb46d93fd903c5f3e3aa31c81d9ce49c2f51..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/qzslide.m +++ /dev/null @@ -1,80 +0,0 @@ -function [a,b,q,z,pairs] = qzslide(a,b,q,z,pairs,i,j) -% function [a,b,q,z,pairs] = qzslide(a,b,q,z,pairs,i,j) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, rearranges them -% so that the ith diagonal element is moved to the jth position, while -% preserving U.T. and orthogonal properties and Q'AZ' and Q'BZ'. -% -% The array pairs is also rearranged. Complex conjugate pairs are kept -% adjacent. If pairs(i)=1, then position i and i+1 are complex -% conjugate pairs. If pairs(i)=-1, then position i and i-1 are complex -% conjugate pairs. If pairs(i)=0, then position i is real. -% -% -% by Daniel Waggoner based on code by Christopher A. Sims - -n=size(a,1); - -if i == j - return; -end - -if i < j - if pairs(j) == 1 - j=j+1; - end - if pairs(i) == -1 - j=j-1; - i=i-1; - else - if (pairs(i) == 1) & (j == n) - if (i == n-1) - return; - end - j=n-1; - end - end - while i < j - if (pairs(i) == 1) - [a b q z]=qzswitch(i+1,a,b,q,z); - [a b q z]=qzswitch(i,a,b,q,z); - pairs(i)=pairs(i+2); - pairs(i+1)=1; - pairs(i+2)=-1; - else - [a b q z]=qzswitch(i,a,b,q,z); - pairs(i)=pairs(i+1); - pairs(i+1)=0; - end - i=i+1; - end -else - if pairs(j) == -1 - j=j-1; - end - if pairs(i) == 1 - j=j+1; - i=i+1; - else - if (pairs(i) == -1) & (j == 1) - if (i == 2) - return; - end - j=2; - end - end - while i > j - if (pairs(i) == -1) - [a b q z]=qzswitch(i-2,a,b,q,z); - [a b q z]=qzswitch(i-1,a,b,q,z); - pairs(i)=pairs(i-2); - pairs(i-2)=1; - pairs(i-1)=-1; - else - [a b q z]=qzswitch(i-1,a,b,q,z); - pairs(i)=pairs(i-1); - pairs(i-1)=0; - end - i=i-1; - end -end diff --git a/MatlabFiles/MSV/qzsort.m b/MatlabFiles/MSV/qzsort.m deleted file mode 100644 index 7f24331a9650d14c0ae42c25fb2f1a67bed4c754..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/qzsort.m +++ /dev/null @@ -1,21 +0,0 @@ -function [A,B,Q,Z] = qzsort(A,B,Q,Z) -%function [A,B,Q,Z] = qzsort(stake,A,B,Q,Z) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, rearranges them -% so that abs(B(i,i)/A(i,i)) are increasing, while preserving U.T. and -% orthonormal properties and Q'AZ' and % Q'BZ'. -% -% by Daniel Waggoner based on code by Christopher A. Sims - -n=size(A,1); - -for i=2:n - for j=i:-1:2 - if abs(A(j,j)*B(j-1,j-1)) > abs(A(j-1,j-1)*B(j,j)) - [A B Q Z]=qzswitch(j-1,A,B,Q,Z); - else - break; - end - end -end - diff --git a/MatlabFiles/MSV/qzswitch.m b/MatlabFiles/MSV/qzswitch.m deleted file mode 100644 index 93c36640cc3488a66dc6c5261b8778e45c314c94..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/qzswitch.m +++ /dev/null @@ -1,60 +0,0 @@ -function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) -%function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) -% -% Takes U.T. matrices A, B, orthonormal matrices Q,Z, interchanges -% diagonal elements i and i+1 of both A and B, while maintaining -% Q'AZ' and Q'BZ' unchanged. If diagonal elements of A and B -% are zero at matching positions, the returned A will have zeros at both -% positions on the diagonal. This is natural behavior if this routine is used -% to drive all zeros on the diagonal of A to the lower right, but in this case -% the qz transformation is not unique and it is not possible simply to switch -% the positions of the diagonal elements of both A and B. - realsmall=sqrt(eps)*10; -%realsmall=1e-3; -a = A(i,i); d = B(i,i); b = A(i,i+1); e = B(i,i+1); -c = A(i+1,i+1); f = B(i+1,i+1); - % A(i:i+1,i:i+1)=[a b; 0 c]; - % B(i:i+1,i:i+1)=[d e; 0 f]; -if (abs(c)<realsmall & abs(f)<realsmall) - if abs(a)<realsmall - % l.r. coincident 0's with u.l. of A=0; do nothing - return - else - % l.r. coincident zeros; put 0 in u.l. of a - wz=[b; -a]; - wz=wz/sqrt(wz'*wz); - wz=[wz [wz(2)';-wz(1)'] ]; - xy=eye(2); - end -elseif (abs(a)<realsmall & abs(d)<realsmall) - if abs(c)<realsmall - % u.l. coincident zeros with l.r. of A=0; do nothing - return - else - % u.l. coincident zeros; put 0 in l.r. of A - wz=eye(2); - xy=[c -b]; - xy=xy/sqrt(xy*xy'); - xy=[[xy(2)' -xy(1)'];xy]; - end -else - % usual case - wz = [c*e-f*b, (c*d-f*a)']; - xy = [(b*d-e*a)', (c*d-f*a)']; - n = sqrt(wz*wz'); - m = sqrt(xy*xy'); - if m<eps*100 - % all elements of A and B proportional - return - end - wz = n\wz; - xy = m\xy; - wz = [wz; -wz(2)', wz(1)']; - xy = [xy;-xy(2)', xy(1)']; -end -A(i:i+1,:) = xy*A(i:i+1,:); -B(i:i+1,:) = xy*B(i:i+1,:); -A(:,i:i+1) = A(:,i:i+1)*wz; -B(:,i:i+1) = B(:,i:i+1)*wz; -Z(:,i:i+1) = Z(:,i:i+1)*wz; -Q(i:i+1,:) = xy*Q(i:i+1,:); \ No newline at end of file diff --git a/MatlabFiles/MSV/readme_msv.prn b/MatlabFiles/MSV/readme_msv.prn deleted file mode 100644 index 7b8ece011a5ccae70f64ed072ea391c8dbc086dc..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/readme_msv.prn +++ /dev/null @@ -1,35 +0,0 @@ -********************************************************************** -************************** Important Notes *************************** -********************************************************************** -When eu=[0,1] in the original gensys setup, it means that in our MSV setting that exogenous persistence is put - in a wrong place when we reorder the roots. Thus, there is no such [0,1] return in our MSV solution. - -When eu=[1,0] in the original gensys setup, it means that the MSV solution must exist with another order. See - example3_10_sw.m in D:\ZhaData\WorkDisk\LiuWZ\ZhaNotes\UnderstandingMSV\OneDimentionCaseImportant. - -With our MSV solution, we abuse the notation eu=[1,0], which really means that we have multiple MSV solutions. - But multiple MSV solutions can occur only in complex numbers. The imaginary part of the solution can be scaled - arbitrarily, which gives sunspot solutions. Thus, the real MSV solution will be unique. - -If we encourter eu=[3,?], it means that all MSV solutions are explosive. Thus, no stable MSV solution. - - - -========================= New files for MSV solutions ============================== -msv_complex_AR.m: gives an MSV solution (upon the order that first works) with a flag indicating if [1,0]. If - [1;0], the complex solution exits and thus the MSV solution is NOT unique. - AR: autoregressive or gensys form; -msv_all_complex_AR.m: gives all MSV-like solutions (including complex solutions). That is, all the solutions that - come from the undetermined coefficients method. - - -========================= Old files for MSV solutions ============================== -msv_simple.m: works only for the first order if an msv solution (even if it is non-unique where the solution is - complex) exist. It does not try the second order (where the exogenous persistence may be larger - than the endogenous persistence). - -msv_one.m: works only for the unqiue MSV solution (thus, no complex solution) for the order that comes first. If no - solution is found for all orders, then no unique MSV solution (but there may be multiple MSV solutions - such as a complex solution). - -msv_all.m: gives all MSV-like real solutions (thus, some solutions are NOT an MSV solution). diff --git a/MatlabFiles/MSV/test_gensys.m b/MatlabFiles/MSV/test_gensys.m deleted file mode 100644 index 64a7af3e700008564fdfe331578a5d5d516e34cc..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/test_gensys.m +++ /dev/null @@ -1,30 +0,0 @@ -r=2; -s=2; -n=6; -explosive=n; - -div=1.0; - -a=rand(n,n); -b=rand(n,n); -[a b q z]=qz(a,b); -a=q*diag(ones(n,1)+rand(n,1))*z; -d=rand(n,1); -d(1:explosive)=d(1:explosive)+ones(explosive,1); -b=q*diag(d)*z; - -psi=rand(n,r); -pi=rand(n,s); -c=zeros(n,1); - -[G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(a,b,c,psi,pi,div); -[dwG1,dwimpact,dwgev,dweu]=dw_gensys(a,b,psi,pi,div); - -G1 -dwG1 - -impact -dwimpact - -eu -dweu \ No newline at end of file diff --git a/MatlabFiles/MSV/verify_solution.m b/MatlabFiles/MSV/verify_solution.m deleted file mode 100644 index dc0737f24cd88bcdcbeeda0406e6386423308f4c..0000000000000000000000000000000000000000 --- a/MatlabFiles/MSV/verify_solution.m +++ /dev/null @@ -1,52 +0,0 @@ -function diff = verify_solution(P,A,B,Psi,s,F1,F2,G1,G2,V) -% -% Verifies that -% -% x(t) = V(s(t))(F1(s(t))x(t-1) + G1(s(t))epsilon(t) -% eta(t) = F2(s(t))x(t-1) + G2(s(t))epsilon(t) -% -% is a solution of -% -% A(s(t)) x(t) = B(s(t)) x(t-1) + Psi(s(t) epsilon(t) + Pi eta(t) -% -% where Pi' = [zeros(s,n-s) eye(s)] by verifying that -% -% [A(j)*V(j) Pi] [ F1(j) -% F2(j) ] = B(j) -% -% [A(j)*V(j) Pi] [ G1(j) -% G2(j) ] = Psi(j) -% -% (P(i,1)*F2(1) + ... + P(i,h)*F2(h))*V(i) = 0 -% - -h=size(P,1); -n=size(A{1},1); -r=size(Psi{1},2); - -diff=0; -Pi=[zeros(n-s,s); eye(s)]; -for j=1:h - X=inv([A{j}*V{j} Pi]); - - tmp=norm(X*B{j} - [F1{j}; F2{j}]); - if tmp > diff - diff=tmp; - end - - tmp=norm(X*Psi{j} - [G1{j}; G2{j}]); - if (tmp > diff) - diff=tmp; - end -end - -for i=1:h - X=zeros(s,n); - for j=1:h - X=X+P(i,j)*F2{j}; - end - tmp=norm(X*V{i}); - if tmp > diff - diff=tmp; - end; -end diff --git a/tzDocumentation/Template_datainp_Markov.prn b/tzDocumentation/Template_datainp_Markov.prn deleted file mode 100755 index 9bc527183d009eab27e95f000b54b32c891d3a50..0000000000000000000000000000000000000000 --- a/tzDocumentation/Template_datainp_Markov.prn +++ /dev/null @@ -1,198 +0,0 @@ -/******************************************************************************/ -/********************* Markov State Variable Information **********************/ -/******************************************************************************/ - -//== Flat Independent Markov States and Simple Restrictions ==// - - -//1st state variable: learning gain. -//2nd state variable: average seigniorage. -//3rd state variable: seigniorage shocks. -//4th state variable: after-escape shocks. -//+ -//Case: tv_varibles == (TV_GAIN | TV_AD | TV_DSHOCKS) && syntypes == S_D_SHOCKS. See datainp_setup.prn. -//== Number Independent State Variables ==// -2 - -//=====================================================// -//== state_variable[i] (1 <= i <= n_state_variables) ==// -//=====================================================// -//== Number of states for state_variable[1] ==// -2 - - -//----------------- Prior for the transition matrix Q_k ----------------- -//== Each column contains the parameters for a Dirichlet prior on the corresponding -//== column of the transition matrix. Each element must be positive. For each column, -//== the relative size of the prior elements determine the relative size of the elements -//== of the transition matrix and overall larger sizes implies a tighter prior. -//If it is an identity matrix, we have no prior (i.e., a flat prior in this case). -//Examples: -//2.000000 1.000000 -//1.000000 2.000000 -//2.000000 1.000000 1.000000 -//1.000000 2.000000 1.000000 -//1.000000 1.000000 2.000000 -//== Transition matrix prior for state_variable[1]. (n_states x n_states) ==// -1.000000 1.000000 -1.000000 1.000000 - - -//----------------- The semi-free parameter vector free ----------------- -//The vector, free, indictates the number of semi-free parameters in each column of Q_k. By semi-free, we -// meen that the sum of each column in Q_k is 1.0 so that the number of true free parameters is one less. -//== Free Dirichet dimensions for state_variable[1] ==// -2 2 - - -//----------------- The restriction matrix R_j ----------------- -//== The jth restriction matrix is n_states x free[j]. Each row of the restriction -//== matrix has exactly one non-zero entry and the sum of each column must be one. -//Example 1: -//1 0 0 -//0 1 0 -//0 0 1 -//Example 2 (3 states but 2 semi-free parameters for column j of Q_1): -//0 0 -//1 0 -//0 1 -//which gives the free-parameter vector [0 q_2 q_3] where q_2 + q_3 = 1.0. -//== Column restrictions for state_variable[1] ==// -1 0 -0 1 - -1 0 -0 1 - - -//----------------- Allows for lagged values of the state variable to be encoded ----------------- -//== Number of lags encoded for state_variable[1] ==// -1 - - -//== Number of states for state_variable[2] ==// -3 - -//== Each column contains the parameters for a Dirichlet prior on the corresponding -//== column of the transition matrix. Each element must be positive. For each column, -//== the relative size of the prior elements determine the relative size of the elements -//== of the transition matrix and overall larger sizes implies a tighter prior. -//== Transition matrix prior for state_variable[2]. (n_states x n_states) ==// - 1.0 1.0 1.0 - 1.0 1.0 1.0 - 1.0 1.0 1.0 - -//== Free Dirichet dimensions for state_variable[2] ==// -2 2 2 - -//== The jth restriction matrix is n_states x free[j]. Each row of the restriction -//== matrix has exactly one non-zero entry and the sum of each column must be one. -//== Column restrictions for state_variable[2] ==// -1 0 -0 0 -0 1 - -0 0 -1 0 -0 1 - -0 0.5 -0 0.5 -1 0 - - -//----------------- Allows for lagged values of the state variable to be encoded ----------------- -//== Number of lags encoded for state_variable[1] ==// -0 - - -//----------------- User-defined intial values of the transition matrix Q_k, mainly for debugging purposes ----------------- -//Non-zero integer: use the values under Initial: Transition matrix; 0: use Waggoner's default value which is the prior mean. -//== indxInitializeTransitionMatrix ==// -1 - - -// 0.5 0.5 -// 0.5 0.5 -//Call ReadTransitionMatrices(f,(char*)NULL,"Initial: ",model) in the main function. -//If indxInitializeTransitionMatrix=0 or does not exist, the following values are not used and -// Waggoner's function initializes the value from the prior mean. -//== Initial: Transition matrix[1] ==// - 9.7331908462961059e-01 1.5790335972902768e-02 - 2.6680915370389413e-02 9.8420966402709720e-01 - - - -//--- Initial guess - 9.7331908462961059e-01 1.5790335972902768e-02 - 2.6680915370389413e-02 9.8420966402709720e-01 -//--- Converged results - 9.7885175490925935e-001 1.6213439424811054e-002 - 2.1148245090740647e-002 9.8378656057518898e-001 - - - - -//== Initial: Transition matrix[2] ==// - 3.8872218833300276e-01 0.0 3.185699602083008e-002 - 0.0 9.8480151496509816e-01 3.185699602083008e-002 - 6.112778116669972e-001 1.519848503490184e-002 9.3628600795833983e-01 - - -//--- Initial guess - 3.8872218833300276e-01 0.0 3.185699602083008e-002 - 0.0 9.8480151496509816e-01 3.185699602083008e-002 - 6.112778116669972e-001 1.519848503490184e-002 9.3628600795833983e-01 -//--- Converged results - 4.3952235591344235e-001 0.0000000000000000e+000 3.6997582827338338e-002 - 0.0000000000000000e+000 9.7128777689293189e-001 3.6997582827338338e-002 - 5.6047764408655765e-001 2.8712223107068113e-002 9.2600483434532332e-001 - - - - - - - - - - - - -//********************************** Notes ******************************************// -//----------------- Not working any more but used to have the user-defined intial values of Q_k ----------------- -//== Initial transition matrix for state_variable[12]. (n_states x n_states) ==// -0.99 0.01 -0.01 0.99 - -The following no longer used in the new switch.c: -line 564 switch.c. -// Initial transition matrix[1] // -0.8 0.1 0.1 -0.1 0.8 0.1 -0.1 0.1 0.8 - - -For the restrictions of the absorbing type: -X X 0 -X X 0 -X X 1 - -we have: - -// Free parameters in state_variable[1] // -3 3 1 - -// Column restrictions for state_variable[1] // -1 0 0 -0 1 0 -0 0 1 - -1 0 0 -0 1 0 -0 0 1 - -0 -0 -1 -//--------------------------------------------------------------------------// diff --git a/tzDocumentation/readme_use_dwVARestimate.prn b/tzDocumentation/readme_use_dwVARestimate.prn deleted file mode 100755 index 8dec4271077fcc09828f036a94a8082b2ad1fd4c..0000000000000000000000000000000000000000 --- a/tzDocumentation/readme_use_dwVARestimate.prn +++ /dev/null @@ -1,166 +0,0 @@ -Corresponding to the SWZ article. ----------------------------------- -Zeta in DW's output is Xi^2 in SWZ's JE article. The prior on Zeta is gamma(a=1,b=1). <<>> Check with Dan to be sure (17 Jan 2010 with Kirstin) - Sigma(k) = inv( A0(K) Zeta(k) A0(k)' ) - - - -In the init_*.dat, the following is always true (hard-coded when using create_init_file.c): -//== Specification (0=default 1=Sims-Zha 2=Random Walk) ==// -1 - -But if you want to change this, you must go into this file to do it manually. - - - -3by2 (e.g., 3 states for variances and 2 states for coefficients) - -sv 1 sv 2 -3 states 2 states -A1-A3 B1-B2 - -Block A1 -B1 and B2 - -Block A2 -B1 and B2 - -Block A3 -B1 and B2 -==> -Overall Sates: Individual Sates -1. A1 B1 -2. A1 B2 -3. A2 B1 -4. A2 B2 -5. A3 B1 -6. A3 B2 - - -WriteTransitionMatrices(f_out,(char*)NULL,header,model); -Write_VAR_Parameters(f_out,(char*)NULL,header,model); - - -create_init_file < -TZMatlab file> <DWSpecification file> file_tag name. -Example -exectuable datainp2_a_case2p2_sz5v_lp5011_d8507.prn specification2p2_3by2.dat test -All these do is to read the SZ prior and the data and the starting point for the estimation. - -In Specification*.dat: -//== Controlling states variables for coefficients ==// - -//== Controlling states variables for variance ==// - - -In init_tag.dat, we have - -Mean of the prior. -//== Initial: Transition matrix[1] ==// - -//== Initial: Transition matrix[2] ==// - - - - -If -ft is chosen, -fs, -fr, and -rh will be all ignored. -For -fr option, supply a different file with the data from //== Initial: Transition matrix[1] ==// on. - Perhaps change to //== Restart: ?????==// --rh "Restart: " in the command line. - or if I'm lazy, I would do the following instead: --rh "Initial: " in the command line. - -Another example: - -executable -ft tag -MLE -ce 1.03-6 -ii 1.5 - //-ii can be a double. - - - - - - -Input Command line: - -Group 1 (must specify most inputs). - Attempt to set up model from command line. Command line options are the following - - -di <directory> - If this argument exists, then all input files are in specified directory. - - -ft <filename tag> - If this argument exists, then the following is attempted: - - specification file name: est_final_<tag>.dat - init/restart file name: est_final_<tag>.dat with header="Posterior mode: " - - specification file name: init_<tag>.dat - init/restart file name: est_intermediate_<tag>.dat with header="Iteration %d: " - - (not yet implemented) - specification file name: init_<tag>.dat - init/restart file name: est_csminwel_<tag>.dat - - specification file name: init_<tag>.dat - init/restart file name: init_<tag>.dat with header="Initial: " - - Failure to load both the specification and restart/init files causes the routine to exit. - - -fs <filename> - If this argument exists, then the specification file name is <filename>. The argument -ft - takes precedence over -fs. - - -fr <filename> - If this argument exists, then the init/restart file name is <filename>. Must be used in - conjunction with the argument -fs. The default value is the filename associated with the - argument -fs. - - -rh <header> - If this argument exists, then the header for the init/restart file is <header>. Must be - used in conjuction with the arguments -fr or -fs. The default value is "". - - If no command line options are given, then attemps to use a default input file - with the name "default.ini". Returns one valid pointer to a TStateModel upon - success and null upon failure. - - -Group 2 (either output or controlling execution of csminwel) (has a lot of default values). - Attempt to set up model from command line. Command line options are the following - - -do <directory> - If this argument exists, then all output files are put in the specified directory. - - -fo <filename tag> - If this argument exists, then the output files are - - est_csminwel_<tag>.dat - est_intermediate_<tag>.dat - est_final_<tag>.dat - - The default value is the filename tag associated with the argument -ft if it exists. Otherwise - it is "default". - - -MLE - Find the maximum likelihood estimate - - -PM (default) - Find the posterior mode - - -cb <floating point number> (default = 1.0e-3) - Beginning csminwel exit criterion - - -ce <floating point number> (default = 1.03-6) - Ending csminwel exit criterion - - -ci <floating point number> (default = 0.1) - csminwel exit criterion increment multiplier - - -ib <integer> (default = 50) - Beginning csminwel maximum iteration value - - -ii <floating point number> (default = 2) - csminwel maximum interation increment multiplier - - If no command line options are given, then attemps to use a default input file - with the name "default.ini". Returns one valid pointer to a TStateModel upon - success and null upon failure. diff --git a/tzDocumentation/readme_use_dwVARmhm.prn b/tzDocumentation/readme_use_dwVARmhm.prn deleted file mode 100755 index 2132a3bd5b15d9464a7fe881afedf4afcd4f0c4e..0000000000000000000000000000000000000000 --- a/tzDocumentation/readme_use_dwVARmhm.prn +++ /dev/null @@ -1,49 +0,0 @@ -Example: - -swzmnhstage1 -fi MHM_input.dat -ft sz5v_2vby2m - -Command line: - - Attempt to set up model from command line. Command line options are the - following - - -di <directory> - If this argument exists, then all input files are in specified directory. - - -do <directory> - If this argument exists, then all output files are in specified directory. - - -ft <filename tag> - If this argument exists, then the following is attempted: - - 1) specification file name: mhm_final_<tag>.dat - mhm arguments file name: mhm_final_<tag>.dat - - 2) specification file name: mhm_intermediate_<tag>.dat - mhm arguments file name: mhm_intermediate_<tag>.dat - - 3) specification file name: est_final_<tag>.dat - mhm arguments file name: -fi <filename> - - -fi <filename> - If this argument exists, then additional mhm arguments are read from the - input file with the given filename. - - -fs <filename> - If this argument exists, then the specification file name is <filename>. - The argument -ft takes precedence over -fs. - - -fp <filename> - If this argument exists, then the posterior is read from <filename>. Must - be used in conjunction with the argument -fs. The default value is the - filename associated with the argument -fs. - - -ph <header> - If this argument exists, then the header for the posterior file is - <header>. Must be used in conjuction with the arguments -fp or -fs. The - default value is "Posterior mode: ". - - If no command line options are given, then attemps to use a default input file - with the name "default.ini". Returns one valid pointer to a TStateModel upon - success and null upon failure. - diff --git a/tzDocumentation/readme_use_dwswitch.prn b/tzDocumentation/readme_use_dwswitch.prn deleted file mode 100755 index 71c5d7e976bec2a9adba6ccb2151bd1aa122fd30..0000000000000000000000000000000000000000 --- a/tzDocumentation/readme_use_dwswitch.prn +++ /dev/null @@ -1,792 +0,0 @@ - ********* Contents ********** - ********** Guide for using Waggoner switch.c and switch_opt.c. ********** -/* Basic steps -/* How to use DW regime contral table for DSGE and any regime-switching models -/* Some basic DW's functions in his switch.h, such as likelihood, posterior, probabilities of regimes. -/* Calling some switching variables from DW code - (1) Regime swaps. - (2) Grand, base, lagged regimes. - (3) Getting P(s_t = i | Y_{t-1}, theta) or P(s_t = i | Y_{t}, theta) using DW's ElementV() where - t is base-1 (1 to T) while i is base-0 (regimes 0 to h-1). - (4) Getting base regimes. - (5) Getting number of lags for a particular regime variable. - (6) Getting base transition probabilities. -/* Notes on block-wise optimization in switch_opt.c -/* How are overall states (regimes) ordered -/* Dirichlet prior for a column of the transition probability matrix - in DW's initial Markov-switching data file used by the SWZ estimation procedure -/* How to specify time variations for coefficients and variance sizes for the VAR model -/* How to convert between model free parameters and model specific parameters (no transition matrix Q is involved) -/* How to specify restrictions on each transition matrix Q_k -/* How to obtain starting point of the transition matrix Q_k -/* How to reset the probability of the initial state s_0 -/* How to set the transition matrix for the 3rd state that is redundant to the 2nd state -/* How to call base regimes -/* How to write out transition matrices -/* -/* DSGE output files such as simulations and impulse responses - ***************************** - - -//================================== -// Basic steps -//================================== -(-1) In extern_dw_switch.c, toggel between the old DW switch program - #include "switch.c" - #include "switchio.c" - #include "switch_opt.c" - and the new DW switch program - #include "dsge_switch.c" - #include "dsge_switchio.c" - #include "dsge_switch_opt.c" - #include "Dirichlet.c" - -(0) For the new DW switch program, make sure that in tzmatlab.h, use - #define NEWVERSIONofDW_SWITCH - -(1) In matrix.h, make sure the following line is activated and the other related lines (e.g., STRUCTURED_COLUMN_MAJOR) are disactivated: - #define TZ_COLUMN_MAJOR - - In general toggle between #define STRUCTURED_COLUMN_MAJOR and #define TZ_COLUMN_MAJOR; - -(2) In matrix.h, make sure the following line is activated and the line #include "tz2dw.h" is disactivated: - #include "tzmatlab.h" - - In general toggle between #include "tzmatlab.h" and #include "tz2dw.h" - -(3) In bmatrix.c, always comment out the following for Windows (Linux seems working fine; if not, we can always comment it out). - - /******************** - #include "blas_lapack.h" - #define USE_BLAS_LAPACK - /********************/ - - When this is commented out, Dan's code will work slower because it does not use any Blas and Lapack calls, - but Tao's code will be fine because he is using MKL. - -(4) To use the old code, uncomment the function in switch.c (at the end of this file): - TParameters* CreateParameters() - -(5) Make sure to uncomment out the function - int main(void) - in switchio.c. - - -//================================== -// How to use DW regime contral table for DSGE and any regime-switching models -//================================== -There three blocks of parameters: constant, coefficient TV, and volatility TV. -It is better that each block is NOT empty. If for some reasons one of the blocks is empty, saying, - the coeffivient TV block (Time varying coefficient parameters) is set to 0, then - use the following convention: - DWRegimeControlVariables_ps->cum_total_coef in the DW code will be NULL; - DWRegimeControlVariables_ps->indx_st_coef in the DW code will be NULL; - In this case, do not call dw_DimA(n_st_coef) because the program will crash and give an error. - To make it automatic, we can do this: if it is NULL, do not call dw_DimA(n_st_coef) or - create an macro (use define) to globally return (define) dw_DimA(n_st_coef) to be 0. - - -Illustration: - -Parameters not time varying ------- -X -X -X - -Coefficient parameters time varying ------- -1st coefficient (2 regimes) -X <-- cum_total_coef[0] (=3) -X - -2nd coefficient (3 regimes) -X <-- cum_total_coef[1] (=5) -X -X <-- cum_total_coef[1] + (n_st_coef[1]-1) (= 7) - -Variance parameters time varying ------- -1st variance parameter (2 regimes) -X <-- cum_total_var[0] (=8) -X - -2st variance parameter (1 regime) -X <-- cum_total_var[1] (=10) - -3nd variance parameter (3 regimes) -X -X -X - -Notes: (a) dw_DimA(n_st_coef) = 2 (coef parameters), dw_DimA(n_st_var) = 3 (variance parameters); - (b) n_st_coef[0] = 2 (regimes), n_st_coef[1] = 3 (regimes); - n_st_var[0] = 2 (regimes), n_st_var[1] = 1 (regime), n_st_var[2] = 3 (regimes); - - -typedef struct TSDWRegimeControlVariables_tag -{ - //--- Memory of all the following arrays will be allocated by DW and destroyed by the DW function dw_FreeArray(), - //--- partly because DW allocated array with some information stored in the -2, -1 elements, so - //--- the array does not begin with base 0. Thus, tzDestroy(n_coef) or free(n_coef)will NOT work. - //--- Thus, it's essential to destroy them using dw_FreeArray(). - - int n_constpars; // number of constant (not time varying) free parameters. - - int *n_st_coef; //n_st_coef[i-1] is the number of regimes associated with the i_th time-varying coefficient parameter. - int *cum_total_coef; //cum_total_coef[i-1] is the offset of the i_th time-varying coefficient parameter - // in the whole vector of free parameters. - int **indx_st_coef; //indx_st_coef[st][i-1] is the regime associated with the i_th time-varying - // variance parameter with the grand regime st. - - int *n_st_var; //n_st_var[i-1] is the number of regimes associated with the i_th time-varying variance parameter. - int *cum_total_var; //cum_total_var[i-1] is the offset of the i_th time-varying variance parameter - // in the whole vector of free parameters. - int **indx_st_var; //indx_var[st][i-1] is the regime associated with the i_th time-varying - // variance parameter with the grand regime st. - //Use 1: g_sigma_w_dv->v[indx_st_var[st][2]] where 2 means that g_sigma_w_dv is the 3rd - // time-varying variance parameter to be considered. - //Use 2: xphi_dv->v[cum_total_var[2]+indx_st_var[st][2]] where 2 means the 3rd time-varying - // variance parameters; this value is the same as g_sigma_w_dv->v[idx_var[st][2]]. -} TSDWRegimeControlVariables; - - - -//================================== -// Some basic DW's functions in his switch.h, such as likelihood, posterior, probabilities of regimes. -//================================== -// ln(P(y[t] | Y[t-1], Z[t], s[t], theta, q)) -#define LogConditionalLikelihood(s,t,model) ((model)->routines->pLogConditionalLikelihood(s,t,model)) - -// ln(P(y[t] | Y[t-1], Z[t], theta, q)) -PRECISION LogConditionalLikelihood_StatesIntegratedOut(int t, TStateModel *model); - -// E[y[t] | Y[t-1], Z[t], s[t], theta, q] -#define ExpectationSingleStep(y,s,t,model) ((model)->routines->pExpectationSingleStep(y,s,t,model)) - -// E[y[t] | Y[t-1], Z[t], theta, q] -TVector ExpectationSingleStep_StatesIntegratedOut(TVector y, int t, TStateModel *model); - -// ln(P(q)) -PRECISION LogPrior_q(TStateModel *model); - -// ln(P(theta)) -#define LogPrior_theta(model) ((model)->routines->pLogPrior(model)) - -// ln(P(theta, q)) -#define LogPrior(model) (LogPrior_theta(model) + LogPrior_q(model)) - -// ln(P(S[T] | theta, q)) -PRECISION LogConditionalPrior_S(TStateModel *model); - -// ln(P(Y[T] | Z[T], S[T], theta, q)) = Assumes that the data is for fobs <= t <= nobs -PRECISION LogLikelihood(TStateModel *model); - -// ln(P(Y[T] | Z[T], S[T], theta, Q) * P(S[T] | theta, q) * P(theta, q)) -#define LogPosterior(model) (LogLikelihood(model) + LogConditionalPrior_S(model) + LogPrior(model)) - -// ln(P(Y[T] | Z[T], theta, Q)) - Assumes that the data is for fobs <= t <= nobs -PRECISION LogLikelihood_StatesIntegratedOut(TStateModel *model); - -// ln(P(Y[T] | Z[T], theta, q) * P(Theta, q)) -#define LogPosterior_StatesIntegratedOut(model) (LogLikelihood_StatesIntegratedOut(model) + LogPrior(model)) - -// ln(P(S[T] = S | Y[T], Z[T], theta, q)) -PRECISION LogConditionalProbabilityStates(int *S, TStateModel *model); - -// P(s[t] = s | Y[t], Z[t], theta, q) -PRECISION ProbabilityStateConditionalCurrent(int s, int t, TStateModel *model); - -// P(s[t] = s | Y[t-1], Z[t-1], theta, q) -PRECISION ProbabilityStateConditionalPrevious(int s, int t, TStateModel *model); - -// p[t] = P(s[t] = s | Y[T], Z[T], theta, q) -TVector ProbabilitiesState(TVector p, int s, TStateModel *model); - - - -//================================== -// Calling some switching variables from DW code -// (1) Regime swaps. -// (2) Grand, base, lagged regimes. -// (3) Getting P(s_t = i | Y_{t-1}, theta) or P(s_t = i | Y_{t}, theta) using DW's ElementV() where -// t is base-1 (1 to T) while i is base-0 (regimes 0 to h-1). -// (4) Getting base regimes. -// (5) Getting number of lags for a particular regime variable. -// (6) Getting base transition probabilities. -//================================== -(1) Regime swaps. - Swap_SV(smodel_ps->sv->state_variable[0], 0, si); - - -(2) Grand, base, lagged regimes. - //------------ Index individual states from the grand state. -------------------// - Define the following: - struct TStateModel_tag *smodel - struct TMarkovStateVariable_tag *sv - - smodel->sv->nstates (***grand*** number of states, seldom used by the user) - smodel->sv->n_state_variables (number of state variables) - smodel->sv->state_variable[0]->nbasestates (number of states for the 1st state variable) - smodel->sv->state_variable[0]->nstates (number of ***sub-grand** states for the 1st state variable, - which equals nbasestates^nlags), where nlags is specified in the Markov input data file (see, - for example, template_datainp_Markov.prn) as in the following 1-lag case for the 1st state variable: - - //-----------------------------------------------------------------------------// - //-- Allows for lagged values of the state variable to be encoded --// - //-----------------------------------------------------------------------------// - //== Number of lags encoded for state_variable[1] ==// - 1 - - smodel->sv->state_variable[0]->lag_index (lagged states for the 1st state variable) - smodel->sv->state_variable[0]->nlags_encoded (number of lags of the states for the 1st state variable) - smodel->sv->state_variable[0]->Q (transition matrix for 1st state variable) - Equivalently, smodel->sv->QA[0]; - - - In the file switch.h, there is a structure called TMarkovStateVariable. - This sturcture contains a field called lag_index which is an array of arrays of integers. - This field provides for decoding the state indexes. For instance, suppose there are 2 lags encoded, - so the grand state k would consist of three states (i_0,i_1,i_2) which would be the current state, - the first lagged state, and the second lagged state. In this case we have that - - lag_index[k][0] = i_0 - lag_index[k][1] = i_1 - lag_index[k][2] = i_2 - - This allows you to easily decode the grand state k. Currently, Dan does not have a procedure for - going in the other direction to encode the grand state from the current and lagged states. - - -(3) Getting P(s_t = i | Y_{t-1}, theta) or P(s_t = i | Y_{t}, theta) using DW's ElementV() where - t is base-1 (1 to T) while i is base-0 (regimes 0 to h-1). - int _t; //base-1 where my own C data is base-0, thus we need to use _t-1. - int _i; //base-0 regimes at time t. - P(s_t = i | Y_{t-1}, theta) = ElementV(smodel_ps->Z[_t],_i); - P(s_t = i | Y_{t}, theta) = ElementV(smodel_ps->V[_t],_i); - //---------------- Real example (OLD Code) -----------------// - prob_gainstate_dv->v[si] = 0.0; - for (ki=smodel_ps->sv->nstates-1; ki>=0; ki--) - if (smodel_ps->sv->state_variable[0]->lag_index[Index[ki][0]][0]==si) - prob_gainstate_dv->v[si] += ElementV(smodel_ps->Z[inpt],ki); - //July/2007. prob_gainstate_dv->v[si] += ProbabilityStateGivenPreviousData(ki,inpt,smodel_ps); - //Cannot call the above function because it calls the likelihood function which creates an infinite loop. - gBeta_dm->M[mos(inpt,si,gBeta_dm->nrows)] = gBeta_dm->M[mloc] + prob_gainstate_dv->v[si]*exp(tvp7d_ps->loggain_dv->v[si]) * (ginf_dv->v[(nlags_max-1)+inpt0] - gBeta_dm->M[mloc]); - - -(4) Getting base regimes. - Consider the following example - s_t = (m*_t, v_t) where m*_t = (m_t, m_{t-1}). - for s_t = k, we have - mstar = smodel_ps->sv->index[k][0]; //Old Code: smodel_ps->sv->Index[k][0]; - v = smodel_ps->sv->index[k][1]; //Old Code: smodel_ps->sv->Index[k][1]; - m_0 = smodel_ps->sv->state_variable[0]->lag_index[mstar][0]; - m_1 = smodel_ps->sv->state_variable[0]->lag_index[mstar][1]; - such that m_t = m_0, m_{t-1} = m_1, v_t = v. - - -(5) Getting number of lags for a particular regime variable. - int nlags_statevariable0 = smodel_ps->sv->state_variable[0]->nlags_encoded; - - -(6) Getting base transition probabilities. - New Code - ------------- - sv_ComputeTransitionMatrix(0, smodel_ps->sv, smodel_ps); //0 mean time 0 (in the time-varying Q, t means time t) - //This line must be used before copying it to any Q in case theta or q or anything has changed. - CopyMatrix0(Qc_dm, smodel_ps->sv->state_variable[0]->baseQ); //$$## - Qc_dm->flag = M_GE; - - - OLD Code - ------------- - Example: getting Qm for m_t. - - Allocate the memory for MyMatrixQm and call - - GetBaseTransitionMatrix_SV(MyMatrixQm, smodel->sv->state_variable[0]); - - or call the following function, which creates MyMatrixQm as well - - MyMatrixQm = GetBaseTransitionMatrix_SV(NULL, smodel->sv->state_variable[0]); - - //--- Getting Qv for v_t --- - Simply call - - smodel->sv->QA[1]; - - or - - CopyMatrix0(MyMatrixQv, smodel->sv->QA[1]); - - or - - GetBaseTransitionMatrix_SV(MyMatrixQv, smodel->sv->state_variable[1]); - - - -//================================== -// Notes on block-wise optimization in switch_opt.c -//================================== -In switch_opt.c, we have - -void SetupObjectiveFunction(TStateModel *model, PRECISION *Modified, PRECISION *FreeQ, PRECISION *FreeTheta) - -where FreeTheta points to free model parameters only (no free parameters in transition matricies); - FreeQ points to free q's in the transtiona matrices only; - Modified ponts to the location to be modified. -*** Note that FreeQ and FreeTheta need not be adjacent. *** - - - -//================================== -// How are overall states (regimes) ordered -//================================== -sv 1 sv 2 -3 states 2 states -A1-A3 B1-B2 - -Block A1 -B1 and B2 - -Block A2 -B1 and B2 - -Block A3 -B1 and B2 -==> -Overall Sates: Individual Sates -1. A1 B1 -2. A1 B2 -3. A2 B1 -4. A2 B2 -5. A3 B1 -6. A3 B2 - - - -//================================== -// Dirichlet prior for a column of the transition probability matrix -// in DW's initial Markov-switching data file used by the SWZ estimation procedure -//================================== -Let x_h be a Dirichlet of form of Gelman (2004) where h be the number of states, - a_h be the diagonal parameter, and a_1, ..., a_{h-1}=1 to allow for an absorbing state. -Let p be the probability of staying in that regime (for 20 months -- 1.7 years, p = 0.95; - for 6.7 quarters -- 1.67 years, p = 0.85) -For E(x_h) = p, we have a_h/(h-1+a_h) = p, ==> - a_h = ( p/(1-p) )*(h-1) - -For monthly data, h=2, and p=0.95, a_h = 19.0e+000, ==> -//== Transition matrix prior for state_variable[1]. (n_states x n_states) ==// - 19.0e+000 1.0000000000000000e+000 - 1.0000000000000000e+000 19.0e+000 - -For quarterly data, h=2, and p=0.85, a_h = 5.6666666666666661e+000, ==> -//== Transition matrix prior for state_variable[1]. (n_states x n_states) ==// - 5.6666666666666661e+000 1.0000000000000000e+000 - 1.0000000000000000e+000 5.6666666666666661e+000 - -For quarterly data and restricted Q: - a (1-b)/2 0 - 1-a b 1-c - 0 (1-b)/2 c -h=3, and p=0.85, a_h = 5.67, ==> -//== Transition matrix prior for state_variable[1]. (n_states x n_states) ==// - 5.67 1.0 1.0 - 1.0 5.67 1.0 - 1.0 1.0 5.67 - -For monthly data and restricted Q: - a (1-b)/2 0 - 1-a b 1-c - 0 (1-b)/2 c -h=3, and p=0.95, a_h = 19.0, ==> -//== Transition matrix prior for state_variable[1]. (n_states x n_states) ==// - 19.000 1.0 1.0 - 1.0 19.00 1.0 - 1.0 1.0 19.00 - - -For quarterly data and unrestricted Q, h=3, and p=0.85, a_h = 11.333333, ==> -//== Transition matrix prior for state_variable[1]. (n_states x n_states) ==// - 11.33 1.0 1.0 - 1.0 11.33 1.0 - 1.0 1.0 11.33 - -For quarterly data and unrestricted Q, h=4, and p=0.85, a_h = 17.0, ==> -//== Transition matrix prior for state_variable[1]. (n_states x n_states) ==// - 17.0 1.0 1.0 1.0 - 1.0 17.0 1.0 1.0 - 1.0 1.0 17.0 1.0 - 1.0 1.0 1.0 17.0 - - - -//================================== -// How to specify hard restrictions on each transitiona matrix Q_k -// in DW's initial Markov-switching data file used by the SWZ estimation procedure -//================================== -In specification*.prn or datainp_markovswitching*.prn or any file that contains Markov-switching information, - follow the following template: - -Suppose Q = [ - p1 (1-p2)/2 0 - 1-p1 p2 1-p2 - 0 (1-p2)/2 p2 - ]; -We have - -//== Free Dirichet dimensions for state_variable[1] ==// -2 2 2 - -//== The jth restriction matrix is n_states-by-free[j]. Each row of the restriction -//== matrix has exactly one non-zero entry and the sum of each column must be one. -//== Column restrictions for state_variable[1] ==// -1 0 -0 1 -0 0 - -0.5 0 -0 1 -0.5 0 - -0 0 -1 0 -0 1 - -For the restrictions of the absorbing type: - X X 0 - X X 0 - X X 1 -we have: - -// Free parameters in state_variable[1] // -3 3 1 - -// Column restrictions for state_variable[1] // -1 0 0 -0 1 0 -0 0 1 - -1 0 0 -0 1 0 -0 0 1 - -0 -0 -1 - -Other examples: - -Example 1: -1 0 0 -0 1 0 -0 0 1 -Example 2 (3 states but 2 semi-free parameters for column j of Q_1): -0 0 -1 0 -0 1 -which gives the free-parameter vector [0 q_2 q_3] where q_2 + q_3 = 1.0. - - - -//================================== -// How to specify time variations for coefficients and variance sizes for the VAR model -//================================== -Note that the first column corresponds to the first state variable, and so forth. - -For example: - -//== nvar x n_state_variables matrix. In the jth row, a non-zero value implies that -//== this state variable controls the jth column of A0 and Aplus -//== Controlling states variables for coefficients ==// -0 0 -0 0 -0 0 -0 0 -0 1 - -//== nvar x n_state_variables matrix. In the jth row, a non-zero value implies that -//== this state variable controls the jth diagonal element of Xi -//== Controlling states variables for variance ==// - 1 0 - 1 0 - 1 0 - 1 0 - 1 0 - -Clearly, the 1st state variable corresponds to variance sizes and the 2nd state variable corresponds to coefficients. - for coefficient, only the fifth equation is time variation. - - - - -//================================== -// How to convert between model free parameters and model specific parameters (no transition matrix Q is involved) -//================================== -When calling Waggoner's function CreateParameters(), one needs supply the two functions to which Waggoner's - function names point. These two Waggoner's function names (of course, the functions are supplied by the - user himself) are: - ConvertFreeParametersToTheta(smodel_ps, xphi_sdv.v); //Waggoner's function. - //Converting the vectorized free model parameters and the model specific (and meaningful) parameters. - ConvertFreeParametersToQ(smodel_ps, xqs_sdv.v); //Waggoner's function. - //Converting the model specific (and meaningful) parameters to the vectorized free model parameters. - - - - -//================================== -// How to specify restrictions on each transitiona matrix Q_k -//================================== -//----------------- The semi-free parameter vector: free ----------------- -//The vector, free, indictates the number of semi-free parameters in each column of Q_k. By semi-free, we -// meen that the sum of each column in Q_k is 1.0 so that the number of true free parameters is one less. -//== Free Dirichet dimensions for state_variable[1] ==// -2 2 - -//----------------- The restriction matrix R_j ----------------- -//== The jth restriction matrix is n_states-by-free[j]. Each row of the restriction -//== matrix has exactly one non-zero entry and the sum of each column must be one. - - - - - - -//================================== -// How to obtain starting point of the transition matrix Q_k -//================================== -Without supplying initial Q, DW's code will use the prior mean of Q as a starting point (default). -To have a random starting point, call in the C file: - DrawTransitionMatrixFromPrior(smodel_est_ps); -To mannually supply initial Q_k, (1) use the following 2-state 1-variable example in the input file datainp_markovswitching*.prn: - //== indxInitializeTransitionMatrix ==// - 1 - - //== Initial: Transition matrix ==// - 1.0 1.0 - 0.0 0.0 - (2) call DW's function in the C file: - ReadTransitionMatrices(fptr_markov, (char*)NULL, "Initial: ", smodel_ps); //Waggoner's function.. - (3) for more complicated cases such as 2 independent state variables, we can have the following: - //== Initial: Transition matrix[1] ==// - 0.5 0.5 - 0.5 0.5 - - //== Initial: Transition matrix[2] ==// - 0.9 0.2 - 0.1 0.8 - - - -//================================== -// How to reset the probability of the initial state s_0 -//================================== -At two places in switch.c, change the values (1: use ergodic distribution; 0: use 1/h for overall Q): - sv->UseErgodic=1; //in line 239 - sv->UseErgodic=1; //in line 344 - - -//================================== -// How to set the transition matrix for the 3rd state that is redundant to the 2nd state -//================================== -Say the estimated 2-state transition matrix is: - - p11 p12 - p21 p22 - -Then the initial value of the 3-state transition matrix should be in the following form: - - p11 p12 p12 - p21 p22 p23 - 0 0 p33 - -where p23+p33 = p22. - -Matlab example about the ergodic properties of these transition matrices: -x1 = [ - 0.9 0.2 - 0.1 0.8 - ]; -e1=fn_ergodp(x) -e1 = - 0.6667 - 0.3333 - -x2 = [ - 0.9 0.2 0.2 - 0.1 0.8 0.3 - 0.0 0.0 0.5 - ]; -e2=fn_ergodp(x2) -e2 = - 0.6667 - 0.3333 - 0 - -x2 = [ - 0.9000 0.2000 0.2000 - 0.1000 0.8000 0 - 0 0 0.8000 - ]; -e2=fn_ergodp(x2) -e2 = - 0.6667 - 0.3333 - 0 - -x2 = [ - 0.9000 0.2000 0 - 0.1000 0.8000 0.3000 - 0 0 0.7000 - ]; -e2=fn_ergodp(x2) -e2 = - 0.6667 - 0.3333 - 0 - -x2 = [ - 0.9000 0.2000 0 - 0.1000 0.8000 0 - 0 0 1.0000 - ]; -e2=fn_ergodp(x2) -e2 = - 0 - 0 - 1 - -e2=fn_ergodp(eye(4)) -e2 = - 0 - 0 - 0 - 1 - - - -//================================== -// How to call base regimes -//================================== -int **Index = smodel_ps->sv->Index; //Regime-switching states. -//--- Example 1 (two types of state variables) where s_t is an overall state variable combining the both state variables. -st_d = st_dshocks = Index[s_t][0]; //[0]: 1st state variable. -st_gain = Index[s_t][1]; //[1]: 2nd state variable. - - -//================================== -// How to write out transition matrices -//================================== -printf("Obj. func. value: %g\n", *fret_p); -WriteTransitionMatrices(stdout, (char*)NULL, "DDDDebugging: ", SMODEL_PS); //Waggoner's function. -fgetc(stdin); //fgetc(stdin) will automatically fflush(stdout). Use ctrl-c to stop the program. - - -//================================== -// DSGE output files such as simulations and impulse responses -//================================== - Output format for ir_percentiles_TAG.prn reporting impulse responses with error bands -------------------------------------------------------------------------------------------------------- -Each block represents the responses corresponding to each percentile. In each block, the element in the position (k,i+j*nz) is the response of the ith state variable to the jth shock at horizon k. The variable nz is the total number of states. Shocks 0 through nepsilon-1 are fundamental and shocks nepsilon through nepsilon+nu-1 aremeasurement error. Horizon 0 is the contemporaneous response. - -This files contains the impulse responses of the unobservable variables. The code to produce the impulse responses of the observable variables has been commented out and so would be easy to produce. - - - Output format for simulation_TAG.prn reporting posterior draws of parameters -------------------------------------------------------------------------------------------------------- -Rows: posterior draws saved after the burning period and the thinning factor -Column 1: log posterior (states integrated out) -Column 2: log likelihood (states integrated out) -Columns 3-length(Theta): free model specific parameters (Theta) -Columns (last) free transition matrix parameters (q) - -The draws were generated with a burn-in period of 10,000 draws, this was starting from the posterior mode after the adaptive code had run to determine the jumping kernel. Example: two files contain 100,000 draws, but the thinning factor for the constant parameter case was 10 (1,000,000 total draws) while the thinning factor for the 2v case was 5 (500,000 total draws). - - - Output format for historical*_TAG.prn reporting historical decompositions. -------------------------------------------------------------------------------------------------------- -historical_TAG.csv: Historical decompositions of observables. - 1st colomn: dates. 0 -- beginning of the sample (include the lags), 1 -- second period, 2 -- third period, and so on. - 1st block (from the 2nd column on): concerns the 1st variable. - 1st column within this block: the data for the 1st variable. - 2nd column within this block: unconditional mean (with zero shocks) given the initial condition. The first lags rows are garbage and must be disposed. - 3rd - (2+nshocks)rd columns within this block: cumulative contributions of n shocks to this variable (deviations from the mean). - Note: 2nd column + 3rd - (2+nshocks)rd columns = 1st column. - 2nd block: concerns the 2nd variable. - 1st column within this block: .... - and so on. - -historicalstates_TAG.cvs: Historical decompositions of state variables (not observed). - 1st colomn: dates. 0 -- beginning of the sample (include the lags), 1 -- second period, 2 -- third period, and so on. - 1st block (from the 2nd column on): concerns the 1st variable. - 1st column within this block: smoothed value (mean value conditional on all the data up to T). - 2nd column within this block: unconditional mean (given the initial condition, NOT the data up to T) with zero shocks. The first lags rows are garbage and must be disposed. - 3rd - (2+nshocks)rd columns within this block: cumulative contributions of n shocks to this variable (deviations from the mean). - Note: 2nd column + 3rd - (2+nshocks)rd columns = 1st column. - 2nd block: concerns the 2nd variable. - 1st column within this block: .... - and so on. - - - - - - -//------------------------- -// How to use switch.c -//------------------------- -For call of the old functions, uncomment the following functions in switch.c - -TParameters* CreateParameters() - - - - - - - -Tempary fix -in switch.h and switch.c - //=== Control variables === - int UseErgodic; //1: use ergodic; 0: use 1/h for Q (not individual Q_k). - -=================================================================================================== - - -sv->UseErgodic=1; //in switch.c. - -//------------------------------------------------------------ -// Functions required by CreateParameters() in switch.c. -//------------------------------------------------------------ -int NumberOfFreeModelSpecificParameters(struct TStateModel_tag *smodel_ps) -{ - struct TStvp7d_tag *tvp7d_ps = (struct TStvp7d_tag *)smodel_ps->p->p; - return (tvp7d_ps->gphi_dv->n); -} -//--- -void ConvertFreeParameters2ModelSpecificParameters(struct TStateModel_tag *smodel_ps, PRECISION *xopt_pd) -{ - //xopt_pd: the (temporary) vector of free model parameters for optimization or minimization. - struct TStvp7d_tag *tvp7d_ps = (struct TStvp7d_tag *)smodel_ps->p->p; - memcpy(tvp7d_ps->gphi_dv->v, xopt_pd, tvp7d_ps->gphi_dv->n); - $$$$$$ This gphi_dv must also be syncronized with interpretable individual parameters, which I forgot to do. ?????????? - $$$$$$ Convertphi2indpars(tvp7d_ps); -} -//--- -void ConvertModelSpecificParameters2FreeParameters(struct TStateModel_tag *smodel_ps, PRECISION *xopt_pd) -{ - //xopt_pd: the (temporary) vector of free model parameters for optimization or minimization. - struct TStvp7d_tag *tvp7d_ps = (struct TStvp7d_tag *)smodel_ps->p->p; - $$$$$$$$$$$$$ Convertindpars2phi(tvp7d_ps); - memcpy(xopt_pd, tvp7d_ps->gphi_dv->v, tvp7d_ps->gphi_dv->n); -} - - - - -ConvertFreeParametersToTheta(smodel_ps, xphi_sdv.v); //Waggoner's function. -ConvertFreeParametersToQ(smodel_ps, xqs_sdv.v); //Waggoner's function. -smodel_ps->ValidForwardRecursion = 0; //Reset so recursion can do through. -logvalue = LogLikelihoodGivenParameters(smodel_ps); //log(P(Y_T|theta, Q)). Waggoner's function. - diff --git a/tzDocumentation/testjunk.prn b/tzDocumentation/testjunk.prn deleted file mode 100755 index 2132a3bd5b15d9464a7fe881afedf4afcd4f0c4e..0000000000000000000000000000000000000000 --- a/tzDocumentation/testjunk.prn +++ /dev/null @@ -1,49 +0,0 @@ -Example: - -swzmnhstage1 -fi MHM_input.dat -ft sz5v_2vby2m - -Command line: - - Attempt to set up model from command line. Command line options are the - following - - -di <directory> - If this argument exists, then all input files are in specified directory. - - -do <directory> - If this argument exists, then all output files are in specified directory. - - -ft <filename tag> - If this argument exists, then the following is attempted: - - 1) specification file name: mhm_final_<tag>.dat - mhm arguments file name: mhm_final_<tag>.dat - - 2) specification file name: mhm_intermediate_<tag>.dat - mhm arguments file name: mhm_intermediate_<tag>.dat - - 3) specification file name: est_final_<tag>.dat - mhm arguments file name: -fi <filename> - - -fi <filename> - If this argument exists, then additional mhm arguments are read from the - input file with the given filename. - - -fs <filename> - If this argument exists, then the specification file name is <filename>. - The argument -ft takes precedence over -fs. - - -fp <filename> - If this argument exists, then the posterior is read from <filename>. Must - be used in conjunction with the argument -fs. The default value is the - filename associated with the argument -fs. - - -ph <header> - If this argument exists, then the header for the posterior file is - <header>. Must be used in conjuction with the arguments -fp or -fs. The - default value is "Posterior mode: ". - - If no command line options are given, then attemps to use a default input file - with the name "default.ini". Returns one valid pointer to a TStateModel upon - success and null upon failure. -