Description Usage Arguments Examples
Runs a 2-term harmonic regression for the specified number of iterations. Modifies getHarmonicFits to return the coefficients instead of fitted values
1 2 | getRecursiveCoeffs(ts, iterations, origin, dependent0, ...,
dt_col = DATE, omega = 1)
|
ts |
Data.frame containing columns date, dependent variable, and any grouping variables. |
iterations |
Number of recursive harmonics to fit |
origin |
reference time; format should match df date column |
... |
additional grouping variables; unquoted |
dt_col |
unquoted column name for date column. Default is DATE |
omega |
default is 1 |
dependent |
column name for dependent variable |
1 2 3 4 5 6 7 8 9 10 11 | # apply harmonics by pointID
library(dplyr)
library(lubridate)
library(stringr)
library(broom)
coefficients <- df_satelliteSeries %>%
getRecursiveCoeffs(iterations = numIterations,
origin = ymd("2018-01-01"),
dependent = "GCVI",
omega = 1.5, pointID)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.