[89] | 1 | |
---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 4 | |
---|
| 5 | <!-- Generated by IDLdoc 2.0 --> |
---|
| 6 | |
---|
| 7 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 8 | <head> |
---|
| 9 | <title>c_timecorrelate.pro (IDLdoc API documentation)</title> |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | <link rel="stylesheet" type="text/css" media="all" href="./../../main_files.css" /> |
---|
| 13 | <link rel="stylesheet" type="text/css" media="print" href="./../../main_files_print.css" /> |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | function setTitle() { |
---|
| 18 | parent.document.title="c_timecorrelate.pro (IDLdoc API documentation)"; |
---|
| 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
| 26 | <h1>IDLdoc API documentation</h1> |
---|
| 27 | </div> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <div id="main_navbar"> |
---|
| 31 | |
---|
| 32 | <table cellspacing="0"> |
---|
| 33 | <tr> |
---|
| 34 | |
---|
| 35 | <td><a href="./../../overview.html?format=raw" title="Overview of library">Overview</a></td> |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
| 43 | <td><a href="./../../idldoc-categories.html?format=raw" title="Browse library by category">Categories</a></td> |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | <td><a href="./../../idldoc-index.html?format=raw" title="Index of files, routines, and parameters">Index</a></td> |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | <td><a href="./../../search-page.html?format=raw" title="Search library">Search</a></td> |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | <td >Source</td> |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | <td><a href="./../../idldoc-help.html?format=raw" title="Help on IDLdoc">Help</a></td> |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | <td >Etc</td> |
---|
| 65 | |
---|
| 66 | <td id="flexible">Developer documentation</td> |
---|
| 67 | </tr> |
---|
| 68 | </table> |
---|
| 69 | |
---|
| 70 | </div> |
---|
| 71 | |
---|
| 72 | <div id="secondary_navbar"> |
---|
| 73 | |
---|
| 74 | <a href="a_timecorrelate.html"><<prev file</a> | next file >> <a href="c_timecorrelate.html" target="_TOP">view single page</a> | <a href="./../../index.html?format=raw" target="_TOP">view frames</a> summary: fields | <a href="#routine_summary">routine</a> details: <a href="#routine_details">routine</a> |
---|
| 75 | |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <div id="container"> |
---|
| 80 | |
---|
| 81 | <h1 class="directory"><a href="directory-overview.html?format=raw">ToBeReviewed/STATISTICS/</a></h1> |
---|
| 82 | <h2 class="pro_file">c_timecorrelate.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
| 89 | <div id="file_comments"></div> |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | <div id="routine_summary"> |
---|
| 99 | <h2>Routine summary</h2> |
---|
| 100 | |
---|
| 101 | <dl> |
---|
| 102 | |
---|
| 103 | <dt><p><a href="#_TimeCross_Cov"><span class="result">result = </span>TimeCross_Cov(<span class="result">Xd, Yd, M, nT, Ndim</span>, Double=<span class="result">Double</span>, ZERO2NAN=<span class="result">ZERO2NAN</span>)</a></p><dt> |
---|
| 104 | <dd> NAME: C_TIMECORRELATE PURPOSE: This function computes the "time cross correlation" Pxy(L) or the "time cross covariance" between 2 arrays (this is some kind of c_correlate but for multidimenstionals arrays) as a function of the lag (L).</dd> |
---|
| 105 | |
---|
| 106 | <dt><p><a href="#_C_Timecorrelate"><span class="result">result = </span>C_Timecorrelate(<span class="result">X, Y, Lag</span>, Covariance=<span class="result">Covariance</span>, Double=<span class="result">Double</span>)</a></p><dt> |
---|
| 107 | <dd></dd> |
---|
| 108 | |
---|
| 109 | </dl> |
---|
| 110 | </div> |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | <div id="routine_details"> |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | <div class="routine_details" id="_TimeCross_Cov"> |
---|
| 117 | |
---|
| 118 | <h2><a class="top" href="#container">top</a>TimeCross_Cov </h2> |
---|
| 119 | |
---|
| 120 | <p class="header"> |
---|
| 121 | <span class="result">result = </span>TimeCross_Cov(<span class="result"><a href="#_TimeCross_Cov_param_Xd">Xd</a>, <a href="#_TimeCross_Cov_param_Yd">Yd</a>, <a href="#_TimeCross_Cov_param_M">M</a>, <a href="#_TimeCross_Cov_param_nT">nT</a>, <a href="#_TimeCross_Cov_param_Ndim">Ndim</a></span>, <a href="#_TimeCross_Cov_keyword_Double">Double</a>=<span class="result">Double</span>, <a href="#_TimeCross_Cov_keyword_ZERO2NAN">ZERO2NAN</a>=<span class="result">ZERO2NAN</span>)</p> |
---|
| 122 | |
---|
| 123 | <div class="comments"> |
---|
| 124 | NAME: |
---|
| 125 | C_TIMECORRELATE |
---|
| 126 | |
---|
| 127 | PURPOSE: |
---|
| 128 | This function computes the "time cross correlation" Pxy(L) or |
---|
| 129 | the "time cross covariance" between 2 arrays (this is some |
---|
| 130 | kind of c_correlate but for multidimenstionals arrays) as a |
---|
| 131 | function of the lag (L). |
---|
| 132 | |
---|
| 133 | CATEGORY: |
---|
| 134 | Statistics. |
---|
| 135 | |
---|
| 136 | CALLING SEQUENCE: |
---|
| 137 | Result = c_timecorrelate(X, Y, Lag) |
---|
| 138 | |
---|
| 139 | INPUTS: |
---|
| 140 | X: an Array which last dimension is the time dimension of |
---|
| 141 | size n, float or double. |
---|
| 142 | |
---|
| 143 | Y: an Array which last dimension is the time dimension of |
---|
| 144 | size n, float or double. |
---|
| 145 | |
---|
| 146 | LAG: A scalar or n-element vector, in the interval [-(n-2), (n-2)], |
---|
| 147 | of type integer that specifies the absolute distance(s) between |
---|
| 148 | indexed elements of X. |
---|
| 149 | |
---|
| 150 | KEYWORD PARAMETERS: |
---|
| 151 | COVARIANCE: If set to a non-zero value, the sample cross |
---|
| 152 | covariance is computed. |
---|
| 153 | |
---|
| 154 | DOUBLE: If set to a non-zero value, computations are done in |
---|
| 155 | double precision arithmetic. |
---|
| 156 | |
---|
| 157 | EXAMPLE |
---|
| 158 | Define two n-element sample populations. |
---|
| 159 | x = [3.73, 3.67, 3.77, 3.83, 4.67, 5.87, 6.70, 6.97, 6.40, 5.57] |
---|
| 160 | y = [2.31, 2.76, 3.02, 3.13, 3.72, 3.88, 3.97, 4.39, 4.34, 3.95] |
---|
| 161 | |
---|
| 162 | Compute the cross correlation of X and Y for LAG = -5, 0, 1, 5, 6, 7 |
---|
| 163 | lag = [-5, 0, 1, 5, 6, 7] |
---|
| 164 | result = c_timecorrelate(x, y, lag) |
---|
| 165 | |
---|
| 166 | The result should be: |
---|
| 167 | [-0.428246, 0.914755, 0.674547, -0.405140, -0.403100, -0.339685] |
---|
| 168 | |
---|
| 169 | PROCEDURE: |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | FOR L>=0 |
---|
| 173 | |
---|
| 174 | n-L-1 |
---|
| 175 | sigma (X[k]-Xmean)(Y[k+L]-Ymean) |
---|
| 176 | k=0 |
---|
| 177 | correlation(X,Y,L)=------------------------------------------------------ |
---|
| 178 | n-1 n-1 |
---|
| 179 | sqrt( (sigma (X[k]-Xmean)^2)*(sigma (Y[k]-Ymean)^2)) |
---|
| 180 | k=0 k=0 |
---|
| 181 | |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | n-L-1 |
---|
| 185 | sigma (X[k]-Xmean)(Y[k+L]-Ymean) |
---|
| 186 | k=0 |
---|
| 187 | covariance(X,Y,L)=------------------------------------------------------ |
---|
| 188 | n |
---|
| 189 | |
---|
| 190 | FOR L<0 |
---|
| 191 | |
---|
| 192 | |
---|
| 193 | n-L-1 |
---|
| 194 | sigma (X[k+L]-Xmean)(Y[k]-Ymean) |
---|
| 195 | k=0 |
---|
| 196 | correlation(X,Y,L)=------------------------------------------------------ |
---|
| 197 | n-1 n-1 |
---|
| 198 | sqrt( (sigma (X[k]-Xmean)^2)*(sigma (Y[k]-Ymean)^2)) |
---|
| 199 | k=0 k=0 |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | |
---|
| 203 | n-L-1 |
---|
| 204 | sigma (X[k+L]-Xmean)(Y[k]-Ymean) |
---|
| 205 | k=0 |
---|
| 206 | covariance(X,Y,L)=------------------------------------------------------ |
---|
| 207 | n |
---|
| 208 | |
---|
| 209 | Where Xmean and Ymean are the time means of the sample populations |
---|
| 210 | x=(x[t=0],x[t=1],...,x[t=n-1]) and y=(y[t=0],y[t=1],...,y[t=n-1]), |
---|
| 211 | respectively. |
---|
| 212 | |
---|
| 213 | |
---|
| 214 | |
---|
| 215 | REFERENCE: |
---|
| 216 | INTRODUCTION TO STATISTICAL TIME SERIES |
---|
| 217 | Wayne A. Fuller |
---|
| 218 | ISBN 0-471-28715-6 |
---|
| 219 | |
---|
| 220 | MODIFICATION HISTORY:</div> |
---|
| 221 | |
---|
| 222 | |
---|
| 223 | |
---|
| 224 | |
---|
| 225 | <h3>Parameters</h3> |
---|
| 226 | |
---|
| 227 | |
---|
| 228 | <h4 id="_TimeCross_Cov_param_Xd">Xd |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | |
---|
| 234 | |
---|
| 235 | |
---|
| 236 | |
---|
| 237 | </h4> |
---|
| 238 | |
---|
| 239 | <div class="comments"></div> |
---|
| 240 | |
---|
| 241 | <h4 id="_TimeCross_Cov_param_Yd">Yd |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | |
---|
| 248 | |
---|
| 249 | |
---|
| 250 | </h4> |
---|
| 251 | |
---|
| 252 | <div class="comments"></div> |
---|
| 253 | |
---|
| 254 | <h4 id="_TimeCross_Cov_param_M">M |
---|
| 255 | |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | |
---|
| 262 | |
---|
| 263 | </h4> |
---|
| 264 | |
---|
| 265 | <div class="comments"></div> |
---|
| 266 | |
---|
| 267 | <h4 id="_TimeCross_Cov_param_nT">nT |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | |
---|
| 276 | </h4> |
---|
| 277 | |
---|
| 278 | <div class="comments"></div> |
---|
| 279 | |
---|
| 280 | <h4 id="_TimeCross_Cov_param_Ndim">Ndim |
---|
| 281 | |
---|
| 282 | |
---|
| 283 | |
---|
| 284 | |
---|
| 285 | |
---|
| 286 | |
---|
| 287 | |
---|
| 288 | |
---|
| 289 | </h4> |
---|
| 290 | |
---|
| 291 | <div class="comments"></div> |
---|
| 292 | |
---|
| 293 | |
---|
| 294 | |
---|
| 295 | |
---|
| 296 | |
---|
| 297 | |
---|
| 298 | <h3>Keywords</h3> |
---|
| 299 | |
---|
| 300 | <h4 id="_TimeCross_Cov_keyword_Double">Double |
---|
| 301 | |
---|
| 302 | |
---|
| 303 | |
---|
| 304 | |
---|
| 305 | |
---|
| 306 | |
---|
| 307 | |
---|
| 308 | |
---|
| 309 | </h4> |
---|
| 310 | |
---|
| 311 | <div class="comments"></div> |
---|
| 312 | |
---|
| 313 | <h4 id="_TimeCross_Cov_keyword_ZERO2NAN">ZERO2NAN |
---|
| 314 | |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | |
---|
| 318 | |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | |
---|
| 322 | </h4> |
---|
| 323 | |
---|
| 324 | <div class="comments"></div> |
---|
| 325 | |
---|
| 326 | |
---|
| 327 | |
---|
| 328 | |
---|
| 329 | |
---|
| 330 | |
---|
| 331 | |
---|
| 332 | |
---|
| 333 | |
---|
| 334 | |
---|
| 335 | |
---|
| 336 | |
---|
| 337 | |
---|
| 338 | |
---|
| 339 | |
---|
| 340 | |
---|
| 341 | |
---|
| 342 | |
---|
| 343 | |
---|
| 344 | |
---|
| 345 | |
---|
| 346 | |
---|
| 347 | |
---|
| 348 | |
---|
| 349 | |
---|
| 350 | |
---|
| 351 | </div> |
---|
| 352 | |
---|
| 353 | |
---|
| 354 | <div class="routine_details" id="_C_Timecorrelate"> |
---|
| 355 | |
---|
| 356 | <h2><a class="top" href="#container">top</a>C_Timecorrelate </h2> |
---|
| 357 | |
---|
| 358 | <p class="header"> |
---|
| 359 | <span class="result">result = </span>C_Timecorrelate(<span class="result"><a href="#_C_Timecorrelate_param_X">X</a>, <a href="#_C_Timecorrelate_param_Y">Y</a>, <a href="#_C_Timecorrelate_param_Lag">Lag</a></span>, <a href="#_C_Timecorrelate_keyword_Covariance">Covariance</a>=<span class="result">Covariance</span>, <a href="#_C_Timecorrelate_keyword_Double">Double</a>=<span class="result">Double</span>)</p> |
---|
| 360 | |
---|
| 361 | <div class="comments"></div> |
---|
| 362 | |
---|
| 363 | |
---|
| 364 | |
---|
| 365 | |
---|
| 366 | <h3>Parameters</h3> |
---|
| 367 | |
---|
| 368 | |
---|
| 369 | <h4 id="_C_Timecorrelate_param_X">X |
---|
| 370 | |
---|
| 371 | |
---|
| 372 | |
---|
| 373 | |
---|
| 374 | |
---|
| 375 | |
---|
| 376 | |
---|
| 377 | |
---|
| 378 | </h4> |
---|
| 379 | |
---|
| 380 | <div class="comments"></div> |
---|
| 381 | |
---|
| 382 | <h4 id="_C_Timecorrelate_param_Y">Y |
---|
| 383 | |
---|
| 384 | |
---|
| 385 | |
---|
| 386 | |
---|
| 387 | |
---|
| 388 | |
---|
| 389 | |
---|
| 390 | |
---|
| 391 | </h4> |
---|
| 392 | |
---|
| 393 | <div class="comments"></div> |
---|
| 394 | |
---|
| 395 | <h4 id="_C_Timecorrelate_param_Lag">Lag |
---|
| 396 | |
---|
| 397 | |
---|
| 398 | |
---|
| 399 | |
---|
| 400 | |
---|
| 401 | |
---|
| 402 | |
---|
| 403 | |
---|
| 404 | </h4> |
---|
| 405 | |
---|
| 406 | <div class="comments"></div> |
---|
| 407 | |
---|
| 408 | |
---|
| 409 | |
---|
| 410 | |
---|
| 411 | |
---|
| 412 | |
---|
| 413 | <h3>Keywords</h3> |
---|
| 414 | |
---|
| 415 | <h4 id="_C_Timecorrelate_keyword_Covariance">Covariance |
---|
| 416 | |
---|
| 417 | |
---|
| 418 | |
---|
| 419 | |
---|
| 420 | |
---|
| 421 | |
---|
| 422 | |
---|
| 423 | |
---|
| 424 | </h4> |
---|
| 425 | |
---|
| 426 | <div class="comments"></div> |
---|
| 427 | |
---|
| 428 | <h4 id="_C_Timecorrelate_keyword_Double">Double |
---|
| 429 | |
---|
| 430 | |
---|
| 431 | |
---|
| 432 | |
---|
| 433 | |
---|
| 434 | |
---|
| 435 | |
---|
| 436 | |
---|
| 437 | </h4> |
---|
| 438 | |
---|
| 439 | <div class="comments"></div> |
---|
| 440 | |
---|
| 441 | |
---|
| 442 | |
---|
| 443 | |
---|
| 444 | |
---|
| 445 | |
---|
| 446 | |
---|
| 447 | |
---|
| 448 | |
---|
| 449 | |
---|
| 450 | |
---|
| 451 | |
---|
| 452 | |
---|
| 453 | |
---|
| 454 | |
---|
| 455 | |
---|
| 456 | |
---|
| 457 | |
---|
| 458 | |
---|
| 459 | |
---|
| 460 | |
---|
| 461 | |
---|
| 462 | |
---|
| 463 | |
---|
| 464 | |
---|
| 465 | |
---|
| 466 | </div> |
---|
| 467 | |
---|
| 468 | </div> |
---|
| 469 | |
---|
| 470 | |
---|
| 471 | |
---|
| 472 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
| 473 | |
---|
| 474 | </div> |
---|
| 475 | |
---|
| 476 | </body> |
---|
| 477 | </html> |
---|