ARIMAX 中的标准错误得到 NaN 结果

如何解决ARIMAX 中的标准错误得到 NaN 结果

我想应用关于灾难对夜光强度影响的中断时间序列分析。我有从 2015 年 1 月到 2020 年 5 月的 65 个月数据。灾难发生在 2018 年 10 月(从原始数据算起 46 个月)。我有一个 arima 模型函数 ARIMA(3,0),(0,0)12 用于干预前的数据

干预功能是这样的

the transfer function

enter image description here

所以我这里有代码

air.m1=arimax(kota,order=c(3,seasonal=list(order=c(0,period=12),xtransf=data.frame(I911=1*(seq(kota)==46),I911=1*(seq(kota)==46)),transfer=list(c(0,c(1,0)))

当我试图知道结果时,我收到了这样的警告

    Coefficients:
              ar1      ar2  I911-MA0  I911.1-AR1  I911.1-MA0
          -0.8738  -0.5048  800.1583      0.0526   -2283.138
    s.e.   0.1118   0.1114       NaN         NaN         NaN
    
    sigma^2 estimated as 1826510:  log likelihood = -552.69,aic = 1115.37
Warning message:
In sqrt(diag(x$var.coef)) : NaNs produced

为什么标准错误没有出现?这个问题的解决方案是什么?

这是kota变量的样子

          Jan      Feb      Mar      Apr      May      Jun      Jul      Aug
2015 3627.300 3982.730 3763.880 4568.350 4463.370 3492.180 4689.460 4134.270
2016 3495.830  304.790 4093.980 3696.690 3339.750 2053.980 4105.550 4417.260
2017 3279.070 3064.600 6164.940 2507.610 2835.330 4245.300  421.230 4252.740
2018  161.870 4919.110 3952.470 5848.790 4862.430 4787.780 4905.020 6036.310
2019 3610.630 4413.600 3123.320 5432.030 5050.170 3127.430 6437.540 5001.340
2020 5283.910 5047.740 4971.200 7375.960 3862.400                           
          Sep      Oct      Nov      Dec
2015 3671.630 3392.750 2407.510 3374.650
2016 4354.850 5184.930 1731.430 4675.500
2017 4864.100 2747.270 3795.644 4697.800
2018 5431.930 3224.620 1880.110 3955.170
2019 5577.980 6907.160 5669.520 6981.180
2020 

                               

解决方法

按照有关交叉验证的 post 的指导,您的数据似乎显示出显着的异方差性。通过用 kota 包装 log() 来尝试对您的数据进行日志转换:

library(TSA)
library(lmtest)
# data
vec <- c(3627.300,3982.730,3763.880,4568.350,4463.370,3492.180,4689.460,4134.270,3671.630,3392.750,2407.510,3374.650,3495.830,304.790,4093.980,3696.690,3339.750,2053.980,4105.550,4417.260,4354.850,5184.930,1731.430,4675.500,3279.070,3064.600,6164.940,2507.610,2835.330,4245.300,421.230,4252.740,4864.100,2747.270,3795.644,4697.800,161.870,4919.110,3952.470,5848.790,4862.430,4787.780,4905.020,6036.310,5431.930,3224.620,1880.110,3955.170,3610.630,4413.600,3123.320,5432.030,5050.170,3127.430,6437.540,5001.340,5577.980,6907.160,5669.520,6981.180,5283.910,5047.740,4971.200,7375.960,3862.400)                           

# convert to time series
kota <- ts(vec,start=c(2015,1),end=c(2020,frequency=12)

# test heteroscedasticity
> gqtest(kota ~ 1)

    Goldfeld-Quandt test

data:  kota ~ 1
GQ = 2.0991,df1 = 30,df2 = 29,p-value = 0.02451
alternative hypothesis: variance increases from segment 1 to 2

# log tranform time series object
air.m1=arimax(log(kota),order=c(3,0),# transform to log scale
              seasonal=list(order=c(0,period=12),xtransf=data.frame(I911=1*(seq(kota)==46),I911=1*(seq(kota)==46)),transfer=list(c(0,c(1,0)))
> air.m1

Call:
arimax(x = log(kota),order = c(3,seasonal = list(order = c(0,period = 12),xtransf = data.frame(I911 = 1 * (seq(kota) == 46),I911 = 1 * 
    (seq(kota) == 46)),transfer = list(c(0,0)))

Coefficients:
          ar1     ar2     ar3  intercept  I911-MA0  I911.1-AR1  I911.1-MA0
      -0.0447  0.0686  0.1710     8.1999   14.4892      0.0537    -14.6782
s.e.   0.1255  0.1267  0.1263     0.1023  111.8000      0.4048    111.7594

sigma^2 estimated as 0.4105:  log likelihood = -59.45,aic = 132.9

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-