EVOLUTION-MANAGER
Edit File: runFun.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Analysis of Running/Rolling/Moving Windows</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for runSum {TTR}"><tr><td>runSum {TTR}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Analysis of Running/Rolling/Moving Windows</h2> <h3>Description</h3> <p>Various functions to analyze data over a moving window of periods. </p> <h3>Usage</h3> <pre> runSum(x, n = 10, cumulative = FALSE) runMin(x, n = 10, cumulative = FALSE) runMax(x, n = 10, cumulative = FALSE) runMean(x, n = 10, cumulative = FALSE) runMedian(x, n = 10, non.unique = "mean", cumulative = FALSE) runCov(x, y, n = 10, use = "all.obs", sample = TRUE, cumulative = FALSE) runCor(x, y, n = 10, use = "all.obs", sample = TRUE, cumulative = FALSE) runVar(x, y = NULL, n = 10, sample = TRUE, cumulative = FALSE) runSD(x, n = 10, sample = TRUE, cumulative = FALSE) runMAD( x, n = 10, center = NULL, stat = "median", constant = 1.4826, non.unique = "mean", cumulative = FALSE ) wilderSum(x, n = 10) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>Object coercible to xts or matrix.</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>Number of periods to use in the window or, if <code>cumulative=TRUE</code>, the number of observations to use before the first result is returned. Must be between 1 and <code>nrow(x)</code>, inclusive.</p> </td></tr> <tr valign="top"><td><code>cumulative</code></td> <td> <p>Logical, use from-inception calculation?</p> </td></tr> <tr valign="top"><td><code>non.unique</code></td> <td> <p>One of 'mean', 'max', or 'min'; which compute their respective statistics for the two middle values of even-sized samples.</p> </td></tr> <tr valign="top"><td><code>y</code></td> <td> <p>Object coercible to xts or matrix.</p> </td></tr> <tr valign="top"><td><code>use</code></td> <td> <p>Only <code>"all.obs"</code> currently implemented.</p> </td></tr> <tr valign="top"><td><code>sample</code></td> <td> <p>Logical, sample covariance if <code>TRUE</code> (denominator of <code>n-1</code>)</p> </td></tr> <tr valign="top"><td><code>center</code></td> <td> <p>The values to use as the measure of central tendency, around which to calculate deviations. The default (<code>NULL</code>) uses the median.</p> </td></tr> <tr valign="top"><td><code>stat</code></td> <td> <p>Statistic to calculate, one of 'median' or 'mean' (e.g. median absolute deviation or mean absolute deviation, respectively.)</p> </td></tr> <tr valign="top"><td><code>constant</code></td> <td> <p>Scale factor applied to approximate the standard deviation.</p> </td></tr> </table> <h3>Value</h3> <p>A object of the same class as <code>x</code> and <code>y</code> or a vector (if <code>try.xts</code> fails). </p> <dl> <dt>runSum</dt><dd><p>returns sums over a n-period moving window.</p> </dd> <dt>runMin</dt><dd><p>returns minimums over a n-period moving window.</p> </dd> <dt>runMax</dt><dd><p>returns maximums over a n-period moving window.</p> </dd> <dt>runMean</dt><dd><p>returns means over a n-period moving window.</p> </dd> <dt>runMedian</dt><dd><p>returns medians over a n-period moving window.</p> </dd> <dt>runCov</dt><dd><p>returns covariances over a n-period moving window.</p> </dd> <dt>runCor</dt><dd><p>returns correlations over a n-period moving window.</p> </dd> <dt>runVar</dt><dd><p>returns variances over a n-period moving window.</p> </dd> <dt>runSD</dt><dd><p>returns standard deviations over a n-period moving window.</p> </dd> <dt>runMAD</dt><dd><p>returns median/mean absolute deviations over a n-period moving window.</p> </dd> <dt>wilderSum</dt><dd><p>retuns a Welles Wilder style weighted sum over a n-period moving window.</p> </dd> </dl> <h3>Author(s)</h3> <p>Joshua Ulrich </p> <hr /><div style="text-align: center;">[Package <em>TTR</em> version 0.24.3 <a href="00Index.html">Index</a>]</div> </body></html>