![](/img/trans.png)
[英]how to identify time series is stationarity or not by package fUnitRoots in R language
[英]How to achieve stationarity for this type of time series using R?
使用預測 package:
library(forecast)
no_diffs_to_stationary = ndiffs(df$px)
df$stationary_series <- c(rep(NA, no_diffs_to_stationary),
diff(df$px, no_diffs_to_stationary))
mean(df$stationary_series, na.rm = TRUE)
sd(df$stationary_series, na.rm = TRUE)
數據:
x <- seq(0, 20, length.out=1000)
df <- data.frame(x = x, px = dexp(x, rate=0.65))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.