I used following time series data and tried to get some analysis but failed because of missing values. Could you give some tips? Thank you very much! TG
2.2351
2
2.2450
3
2.2766
4
2.3208
5
2.3390
6
2.3687
7
2.3750
8
2.3859
9
2.3895
10
2.4701
11
2.5120
12
2.5470
13
2.5787
14
2.5874
15
2.6138
16
2.6917
17
2.7008
18
2.7301
19
2.8378
20
2.8435
21
2.8440
22
2.9243
23
2.9422
24
2.9593
25
3.0027
26
3.0340
27
3.0498
28
3.0922
29
3.1719
30
3.1852
31
3.1869
32
3.1925
33
3.2286
34
3.2528
35
3.2542
36
3.3479
37
3.3522
38
3.5066
39
3.5310
nz<-pounds_nz
nz.ts<-ts(nz, st=1991, fr=4)
nz.ar <- ar(nz.ts)
library(forecast)
spec.ar7 = arfimaspec(mean.model=list(armaOrder=c(7,0),include.mean=TRUE))
fit.ar7 = arfimafit(spec=spec.ar7,data=data$spread)
Error in if (mean(data) == 0) { : missing value where TRUE/FALSE needed
fit.ar7
res.ar7 = fit.ar7@fit$residuals
Box.test(res.ar7,lag=4,type="Ljung-Box")
Box.test(res.ar7,lag=8,type="Ljung-Box")
Box.test(res.ar7,lag=12,type="Ljung-Box")
We don't really have enough info to help you out. Could you ask this with a minimal REPR oducible EX ample (reprex) ? A reprex makes it much easier for others to understand your issue and figure out how to help.
If you've never heard of a reprex before, you might want to start by reading this FAQ:
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
1 Like
system
Closed
October 10, 2019, 4:57pm
3
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.