r - 为不同时间段创建假人
问题描述
我试图为时间序列分析创建假人。数据为月度芯片产量,暂时波动,产量水平明显下降后恢复上升趋势。
所以我想我可以将数据分成三个不同的时间段并对其进行回归。这是一些代码:
date2 <- seq(as.Date("1987/1/1"), as.Date("2017/12/1"), by ="month")
T2<- length(date2)
data.rt <- data[1:T2,]
time.rt <- seq(1:T2)
总长度是350,我想把数据分成三部分:
time.rt[0:200] #increasing trend before the fluctuation
time.rt[200:300] #fluctuation occurs during this period
time.rt[300:350] #the increasing trend resumes
如何构建假人并对其进行回归?
感谢您的时间和帮助!对此,我真的非常感激。:)
解决方案
推荐阅读
- javascript - 在 React.js 项目中启动本地主机服务器时出现 npm start 错误
- c# - HangFire 从服务迁移
- python - function() 缺少 4 个必需的位置参数
- latex - Knit RMarkdown 报错,pdfLaTeX 编译失败
- javascript - 尝试在双数组中填充任何情况 - javascript
- reactjs - 如何在 JSX 中包含逻辑来转换对象?
- tar - tar 命令因“懦弱地拒绝创建空存档”而失败
- python - Python Selenium find_element_by_link_text 不适合我
- c# - .NET Core 5 Web 应用程序中具有复杂 json 值的 Http GET 请求
- ruby-on-rails - Rails 5:如何将此 named_scope 转换为范围