Description Usage Arguments Details Value Examples
View source: R/roll.R View source: R/RcppExports.R
A parallel function for computing rolling linear models of timeseries data.
1 2 3 4 5 
x 
matrix or xts object. Rows are observations and columns are the independent variables. 
y 
matrix or xts object. Rows are observations and columns are the dependent variables. 
width 
integer. Window size. 
weights 
vector. Weights for each observation within a window. 
intercept 
logical. Either 
center 
logical. 
center_x 
logical. If 
center_y 
logical. Analogous to 
scale 
logical. 
scale_x 
logical. If 
scale_y 
logical. Analogous to 
min_obs 
integer. Minimum number of observations required to have a value within a window,
otherwise result is 
complete_obs 
logical. If 
na_restore 
logical. Should missing values be restored? 
parallel_for 
character. Executes a "for" loop in which iterations run in parallel by

The numerical calculations use RcppParallel to parallelize rolling linear models of timeseries data. RcppParallel provides a complete toolkit for creating safe, portable, highperformance parallel algorithms, built on top of the Intel Threading Building Blocks (TBB) and TinyThread libraries.
By default, all the available cores on a machine are used for parallel algorithms. If users are
either already taking advantage of parallelism or instead want to use a fixed number or proportion of
threads, then set the number of threads in the RcppParallel package with the
setThreadOptions
function.
A list containing the following components:
coefficients 
A list of objects with the rolling coefficients for each 
r.squared 
A list of objects with the rolling rsquareds for each 
1 2 3 4 5 6 7 8 9 10 11 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.