Displaying 2 results from an estimated 2 matches for "ts12".
Did you mean:
ts1
2008 Mar 31
1
concatenating two successive time series
..., 96, 104, 140, 135, 87, 215, 173, 56, 38, 80,
90, 113, 72, 86, 95, 88, 93, 198, 128, 40, 28, 76, 133, 80, 89,
72, 108, 102, 86, 199, 204, 84, 60, 49, 103, 121, 98, 108, 165
), .Tsp = c(2000, 2006.91666666667, 12), class = "ts")
When we plot them together the difference is visible:
> ts12 <- ts(c(ts1,ts2),start=1982,frequency=12)
> plot(ts12)
but
> plot(decompose(ts12))
confirm that both describe one phenomena.
I have dozens of such pairs and I would like to find a method to
recalculate one ts to the other to make one homogeneous ts.
Do you have any suggestions how to s...
2008 Jul 28
2
Help with a loop
...dtmax<-9884
i<-1
dt[m]<-round(runif(1,dtmin,(tmax[m]-1)))}
ts<-c(1)
ts1<-ts
ts2<-ts1
ts3<-ts1
ts4<-ts1
ts5<-ts1
ts6<-ts1
ts7<-ts1
ts8<-ts1
ts9<-ts1
ts10<-ts1
ts11<-ts1
ts12<-ts1
ts13<-ts1
ts14<-ts1
for (m in 1:2){
while(i+dt[m]<tmax[m])
{
ts1<-append(ts,i+dt[1])
i<-i+dt[1]
ifelse(dtmin<=(tmax[1]-i), dt[1]<-round(runif(1,dtmin,(tmax[1]-i))),
dt[1]<-(tmax[1]-i))
ts2<-append(ts,i+dt[2])...