2

I have a time series Y, for one year and measures taken every 15 minutes. The data show clear seasonality, both daily and weekly. I would like to see the seasonality in the models. I tried various possibilitiesm for example:

fit <- arima(Y,order=c(1,1,0),seasonal=c(1,1,0))
plot(forecast(fit, h=1000),xlim=c(34000,36000),ylim=c(-5000,10000))

enter image description here

fit <- arima(Y,order=c(1,1,0))
plot(forecast(fit, h=1000),xlim=c(34000,36000))

enter image description here

plot(Y,xlim=c(34000,36000))
fit.pred1 <- predict(fit,n.ahead=1000)
lines(fit.pred1$pred, col="blue")
lines(fit.pred1$pred+2*fit.pred1$se, col="red")
lines(fit.pred1$pred-2*fit.pred1$se, col="red")

But none of them seems to capture seasonality.

What am I doing wrong?

I would just like to have a good model for the data and to make meaningful forecasts.

Thank you in advance!

Edit: here are some similarly-behaved data for 30 days, one row per day (24*4=96 columns):

0.2853903 0.5027444 0.3406662 0.2820748 0.46706 0.5728534 0.595643 0.6652935 0.7818723 0.6959602 0.6519794 0.5647326 0.5890602 0.557911 0.4888465 0.6688437 0.4811599 0.5594265 0.6475436 0.5106266 0.5255525 0.5563658 0.5028147 0.4864361 0.5657214 0.4199351 0.4582162 0.4549566 0.5937044 0.3919327 0.4169895 0.5838849 0.4177969 0.5216293 0.3154148 0.3410787 0.5180743 0.3372039 0.3967992 0.3440696 0.3909682 0.4590096 0.3250363 0.5875157 0.5441012 0.358755 0.6015975 0.5911806 0.5986964 0.6191813 0.5814472 0.3752599 0.4148064 0.4703371 0.4844158 0.6006953 0.4282761 0.5562159 0.5319981 0.4731712 0.4284997 0.3948165 0.415126 0.3917853 0.442045 0.4288206 0.4878757 0.611713 0.4601243 0.4326218 0.668656 0.7149193 0.5340428 0.6024034 0.4598372 0.6262921 0.4368254 0.6388835 0.4559636 0.5928237 0.4750904 0.495264 0.3661642 0.3484672 0.3581329 0.5043428 0.3470957 0.409147 0.5305529 0.3604082 0.3561858 0.3731508 0.3758843 0.3673427 0.5028245 0.5017383
0.4526543 0.2747341 0.3266029 0.3443395 0.3082169 0.5962182 0.5075682 0.3722111 0.5299366 0.4313633 0.4508852 0.5222199 0.6248788 0.3878705 0.5942242 0.3626091 0.4114703 0.5393379 0.3562593 0.5466059 0.3414957 0.5606944 0.5756006 0.5108079 0.5923736 0.5770516 0.438379 0.5303272 0.6133581 0.5522289 0.6297271 0.6117546 0.6629539 0.6807204 0.7057956 0.6172754 0.7314352 0.7473414 0.675704 0.6308616 0.6392492 0.4971291 0.7198369 0.6896397 0.7661179 0.5556982 0.5495953 0.5165598 0.6740179 0.6953432 0.6796856 0.6985831 0.6725855 0.6102553 0.5304535 0.7073461 0.4915155 0.6721515 0.5466946 0.4617012 0.5669751 0.6965325 0.5085153 0.6570337 0.4533104 0.6559014 0.6242329 0.657796 0.7443724 0.5574992 0.6081216 0.7365744 0.6771749 0.6435538 0.8135456 0.6381623 0.5436202 0.6629154 0.5886281 0.6524874 0.6707658 0.5555088 0.5509819 0.3469319 0.444956 0.5292943 0.3970854 0.4566398 0.4565526 0.3257971 0.4478553 0.3047685 0.4491484 0.4732244 0.4489578 0.3930251
0.2808011 0.3801154 0.3189665 0.387666 0.4505273 0.5335627 0.3881989 0.522673 0.552177 0.6722655 0.4286112 0.6390012 0.6444802 0.5575672 0.4049658 0.4799996 0.3734781 0.337089 0.4819419 0.4117726 0.5191145 0.4100395 0.5038686 0.6151415 0.4265712 0.3466191 0.5471873 0.5975763 0.596385 0.5740509 0.5998497 0.4427777 0.3678708 0.4298932 0.5393362 0.40571 0.6728396 0.6417479 0.456878 0.5570895 0.653847 0.518636 0.6640414 0.5888336 0.7244199 0.5272784 0.746073 0.7780778 0.5152739 0.7973394 0.7342017 0.541466 0.6689419 0.5593274 0.5307969 0.7670766 0.629771 0.7087565 0.6053312 0.7954 0.6734407 0.6935127 0.5324438 0.5571602 0.6274946 0.5650004 0.6345156 0.6332174 0.6851879 0.7393333 0.8374871 0.7041434 0.8309581 0.64284 0.6884188 0.8199885 0.7765225 0.7475106 0.6813046 0.5017466 0.5521493 0.3937259 0.5703556 0.5795641 0.4987329 0.3879325 0.4315375 0.3782032 0.3055675 0.5494698 0.3964649 0.4709917 0.321118 0.4580182 0.3446154 0.3684738
0.2682905 0.441066 0.5509992 0.3693984 0.348678 0.59406 0.6723658 0.5742416 0.53712 0.6510236 0.4972386 0.5092981 0.3714023 0.4574162 0.5433307 0.5539665 0.4018455 0.5601443 0.5282315 0.3120679 0.3263155 0.5464865 0.3894949 0.4178148 0.3879855 0.5099239 0.5467833 0.3844746 0.3912243 0.4335088 0.497534 0.3714408 0.4203047 0.5925564 0.4344696 0.6406967 0.5027222 0.5137061 0.5996331 0.5226465 0.6671574 0.5816476 0.4967364 0.409515 0.4880864 0.449616 0.4899497 0.4703518 0.4298615 0.6630118 0.6156465 0.4408425 0.622184 0.5795672 0.3870901 0.5793927 0.6163492 0.5066164 0.5481942 0.4758411 0.6307336 0.567153 0.5885189 0.4342182 0.4009503 0.5191054 0.4126471 0.5884862 0.6684472 0.7077288 0.7044199 0.7715294 0.5907055 0.7626427 0.6082116 0.5867981 0.641591 0.6222193 0.6965761 0.5054411 0.5666689 0.4351416 0.4849475 0.325489 0.5333734 0.3676487 0.2841587 0.4291199 0.4953274 0.3588527 0.4019216 0.2659863 0.3051478 0.5393469 0.4151618 0.3932539
0.3727511 0.2906377 0.3762787 0.3947058 0.5554344 0.4676228 0.4430754 0.4804482 0.4451806 0.4476499 0.4355628 0.4189208 0.4432653 0.5817132 0.3537522 0.3465654 0.5569741 0.5457532 0.3901919 0.3907466 0.4627239 0.4858143 0.3626315 0.4877198 0.6126562 0.5688865 0.4953761 0.7356476 0.6996297 0.6886494 0.6301716 0.6150181 0.7023006 0.8576785 0.6436254 0.785613 0.791331 0.9155314 0.7932043 0.7953521 0.784241 0.6848049 0.7136484 0.8790015 0.8262028 0.8367121 0.6744526 0.8835384 0.6221514 0.81786 0.8285718 0.5946162 0.8404607 0.7704805 0.8375419 0.8024972 0.7186878 0.6748977 0.7607434 0.8690517 0.7885586 0.7843645 0.7325377 0.704903 0.8239591 0.8488829 0.7310696 0.8695237 0.7000224 0.6945519 0.7018047 0.7728677 0.7926451 0.7043946 0.6872189 0.8017128 0.7181723 0.7158533 0.7471881 0.6917525 0.5143125 0.5292816 0.6738677 0.4468231 0.4993275 0.5669867 0.5749986 0.4347046 0.4093564 0.4714489 0.4143501 0.4039571 0.4026808 0.447273 0.3195616 0.4848237
0.3015869 0.4140575 0.3333938 0.3206558 0.4033872 0.5364798 0.5471684 0.5127134 0.5930395 0.4722758 0.4769107 0.4559871 0.5646627 0.5467845 0.497354 0.5429793 0.5054162 0.520107 0.5951167 0.6148726 0.4566326 0.5816516 0.6719967 0.5898149 0.5772814 0.645778 0.4880486 0.6341176 0.83828 0.6662674 0.8898406 0.8139387 0.7459675 0.7500147 0.673765 0.7635295 0.8594116 0.7676164 0.7755297 0.8034668 0.6404909 0.6590301 0.6260171 0.6954383 0.6174549 0.7143704 0.6148129 0.6498469 0.7510348 0.6924323 0.7239194 0.620928 0.7000218 0.654929 0.7238226 0.8577425 0.8733579 0.724427 0.7754929 0.6424981 0.7118672 0.8493652 0.6393725 0.6747775 0.7813966 0.8342146 0.6596139 0.9078558 0.6947954 0.9191803 0.7660761 0.7735668 0.9793027 0.7502707 0.7244348 0.6634369 0.9198952 0.8083251 0.6684165 0.5847844 0.6785949 0.7001825 0.5518311 0.660377 0.447748 0.588709 0.5339689 0.4351436 0.4740497 0.4850872 0.367947 0.3312925 0.3284073 0.5190333 0.3844297 0.354367
0.3423846 0.2830862 0.4940943 0.4841206 0.5446908 0.4441723 0.6362946 0.6472583 0.717248 0.625432 0.6333646 0.6723422 0.557221 0.6755687 0.5285703 0.3856528 0.5317822 0.6374733 0.5674433 0.5652715 0.5617936 0.4844527 0.5882017 0.5944235 0.4800325 0.6933968 0.6986713 0.717513 0.7201405 0.6538285 0.8338837 0.6682242 0.8891553 0.7881033 0.8620113 0.8370757 0.6649298 0.8675475 0.7971239 0.7655597 0.8079894 0.7539631 0.6718768 0.5744052 0.7937606 0.5890702 0.6234497 0.8014323 0.809055 0.578145 0.8146418 0.60757 0.8002286 0.797845 0.53972 0.8475592 0.7724592 0.5993012 0.7943784 0.6707428 0.6218457 0.8325028 0.8519901 0.7800905 0.6255964 0.6532268 0.6344449 0.7546444 0.8304777 0.8466408 0.9131986 0.8945036 0.7271628 0.8333254 0.6841405 0.8175176 0.6282266 0.7329485 0.7588553 0.6648702 0.7611212 0.5388258 0.4331923 0.5024083 0.4601282 0.60912 0.5198222 0.3645034 0.5880916 0.3645411 0.383629 0.5743795 0.5752736 0.3321732 0.5483537 0.428461
0.388627 0.3655065 0.5953327 0.5322567 0.5938565 0.5121292 0.652072 0.4433016 0.5205482 0.7061423 0.4551973 0.4795978 0.4965659 0.4150493 0.4902392 0.5173975 0.5120362 0.4350196 0.4203666 0.5916798 0.4449728 0.5302069 0.6411386 0.3831604 0.5859447 0.543427 0.7229236 0.521354 0.5841089 0.7863118 0.6160179 0.613606 0.6709049 0.6879885 0.709164 0.8722454 0.7210095 0.8606382 0.6298481 0.7116648 0.9074239 0.6416599 0.7618481 0.8435812 0.7243693 0.8049344 0.871298 0.7997528 0.8064608 0.7379868 0.8386673 0.8364904 0.898491 0.7469263 0.6285942 0.8297674 0.7178296 0.722303 0.8684758 0.6896719 0.7051689 0.8402164 0.843191 0.76866 0.7091838 0.7142899 0.662205 0.6394218 0.7880964 0.858868 0.7517492 0.6915789 0.909629 0.7318321 0.6447026 0.8026928 0.8400432 0.7764364 0.6707256 0.6500952 0.6062825 0.565143 0.5504484 0.4782444 0.5631759 0.4628839 0.5609816 0.5415761 0.5801913 0.5631855 0.2910622 0.3233175 0.4067208 0.5609751 0.4496785 0.4771435
0.4015414 0.4858634 0.277107 0.337085 0.4843721 0.3296739 0.6417595 0.4907171 0.4382515 0.6444868 0.5845756 0.6138799 0.5963557 0.4443803 0.6473308 0.6451057 0.4014633 0.5531131 0.4819209 0.3628772 0.4986371 0.4658573 0.6109616 0.5022148 0.4627948 0.65407 0.5777388 0.5716622 0.5011905 0.6100083 0.8343105 0.6914763 0.8027144 0.7875751 0.7499653 0.8854877 0.622035 0.7897308 0.8980558 0.866189 0.7604495 0.6663257 0.7216542 0.7814939 0.8254875 0.8931296 0.8593729 0.7826992 0.7738375 0.8518449 0.8143669 0.6930341 0.7406134 0.6172553 0.7653155 0.6503368 0.6948107 0.7605221 0.572824 0.6517204 0.8187169 0.828943 0.5569779 0.6293572 0.7764127 0.625712 0.7875772 0.7756041 0.7309916 0.725823 0.8937282 0.7300095 0.7014166 0.7800355 0.8351296 0.6890539 0.6533693 0.6608129 0.6584051 0.7147803 0.4600709 0.3500013 0.5696147 0.5584947 0.3888056 0.2991072 0.3436302 0.479452 0.3850549 0.4081674 0.2724221 0.2410558 0.4395672 0.5029925 0.4343972 0.4766289
0.203516 0.3997648 0.2384271 0.3734613 0.4386578 0.2970784 0.479069 0.445755 0.4441374 0.3999673 0.4901881 0.3443205 0.562948 0.5344198 0.4013007 0.4988506 0.4609821 0.3635368 0.3222967 0.4136292 0.3692118 0.5593686 0.3463526 0.298534 0.4047672 0.3848599 0.3202988 0.5022562 0.3420041 0.3280367 0.5756346 0.537109 0.3623625 0.5239204 0.3871928 0.4995413 0.5658469 0.4727539 0.7070113 0.6415877 0.63025 0.5778643 0.7146286 0.5737602 0.5266031 0.6133852 0.5282564 0.5613905 0.5278183 0.7190137 0.7116975 0.702773 0.6794321 0.6788944 0.7269408 0.7239387 0.4929666 0.447611 0.5987434 0.5051813 0.7148797 0.6945832 0.518186 0.4743902 0.6677011 0.4880509 0.5618594 0.5074324 0.5577094 0.5701907 0.6398301 0.7357474 0.7585905 0.7993548 0.539217 0.7537225 0.6017002 0.6707432 0.474219 0.6957836 0.3874304 0.5195775 0.5782812 0.3777103 0.3140846 0.4003067 0.3272363 0.5234317 0.4841384 0.4355499 0.511667 0.3226472 0.4458955 0.3569181 0.3302592 0.3251063
0.4295872 0.3702038 0.3149945 0.3631203 0.3393795 0.3389065 0.5756977 0.5631754 0.6403065 0.5103357 0.6483919 0.5944176 0.3470958 0.551793 0.4736119 0.5158781 0.3137257 0.4198434 0.4855532 0.5389643 0.3304785 0.3362924 0.3784152 0.5601462 0.4746812 0.4937865 0.5511082 0.3573334 0.5591323 0.4059392 0.5259905 0.5586619 0.523706 0.5550785 0.439302 0.4503375 0.4097829 0.4319648 0.417766 0.6632772 0.426369 0.4853921 0.4137169 0.4707212 0.6481028 0.4835832 0.4418121 0.6937484 0.7030264 0.6130719 0.6333538 0.5101626 0.6691585 0.4278902 0.6484271 0.5352575 0.579867 0.5580022 0.4946328 0.5724421 0.5712879 0.4904638 0.4522124 0.6367415 0.5031083 0.551045 0.4153403 0.6337054 0.559528 0.6717957 0.6921996 0.5807448 0.6642201 0.6267077 0.5183498 0.553998 0.5095279 0.659912 0.6155766 0.6868793 0.6498902 0.5578582 0.3837777 0.4937461 0.3211895 0.4441532 0.4023001 0.301393 0.5144899 0.2987589 0.4114656 0.4678648 0.3444538 0.2795863 0.4300046 0.3609046
0.3696115 0.5041553 0.3822854 0.4613618 0.2745296 0.4150928 0.5284729 0.4824618 0.3810235 0.6282418 0.4629985 0.5775204 0.6215042 0.3820765 0.4646821 0.5911708 0.5337131 0.5724884 0.4031903 0.3112135 0.3844716 0.3714984 0.6134869 0.3899953 0.3755428 0.5551699 0.6315186 0.6684006 0.7092136 0.7819499 0.7533687 0.8368703 0.7997914 0.6902459 0.6936631 0.8243017 0.6974226 0.8185016 0.8351332 0.6704491 0.8055476 0.6587081 0.695978 0.6848707 0.6614218 0.6698868 0.642967 0.7182433 0.9007542 0.8098637 0.7028401 0.7791662 0.6478088 0.694067 0.6359578 0.5797607 0.7615818 0.786026 0.8357189 0.7363983 0.7111511 0.837722 0.6531159 0.5840719 0.7128906 0.604089 0.814694 0.7275235 0.629928 0.7141084 0.906138 0.8765373 0.9033999 0.7615572 0.6668051 0.7372837 0.6231318 0.5968959 0.6758381 0.694847 0.4614467 0.4580747 0.5860513 0.343262 0.4325211 0.4773809 0.4073903 0.4868878 0.4200411 0.3020091 0.2988728 0.4224042 0.3910436 0.4382808 0.455637 0.4084874
0.3376556 0.2432099 0.2023345 0.2890251 0.3584378 0.4473946 0.338547 0.3860686 0.5427603 0.6187289 0.5882156 0.4379623 0.4129827 0.4142986 0.3094679 0.3758769 0.5470865 0.5719495 0.4445973 0.4951221 0.5538071 0.3682519 0.3884265 0.5490186 0.3683119 0.6516914 0.5028351 0.6449063 0.5815496 0.6583375 0.7219053 0.5895455 0.6323176 0.8276192 0.741249 0.8027972 0.5935694 0.8596379 0.7771117 0.6632299 0.6758115 0.5924466 0.7181143 0.8494992 0.7895948 0.8770265 0.685207 0.6422573 0.6541535 0.7201098 0.7070303 0.6037727 0.6089562 0.7363017 0.7860564 0.6322776 0.7171135 0.8356507 0.7257395 0.6489687 0.6651687 0.7967955 0.7535109 0.6594123 0.8074426 0.6285589 0.6455125 0.5876565 0.6880259 0.8600818 0.8620263 0.6981781 0.7022957 0.6768537 0.8596834 0.8205387 0.6245945 0.7758383 0.7138999 0.5312027 0.6018214 0.4218687 0.3778759 0.3787618 0.5875487 0.4707556 0.3494209 0.4558937 0.5568152 0.4280618 0.3996777 0.5049007 0.4293099 0.4339505 0.3253434 0.4883206
0.3245967 0.4908116 0.4685726 0.3799489 0.3547985 0.4885701 0.5022316 0.4222361 0.4650701 0.5742201 0.6482559 0.3975371 0.3843245 0.3595233 0.4908876 0.5998604 0.6149715 0.5614339 0.4827791 0.3758665 0.5922438 0.5204652 0.4722873 0.3695418 0.4013633 0.4563773 0.6515237 0.6377996 0.569053 0.7184331 0.8355213 0.8150469 0.8699795 0.6567011 0.7328708 0.8250753 0.8369397 0.8248298 0.6551387 0.6713535 0.6629935 0.7471499 0.891712 0.8874105 0.6603114 0.6557479 0.7657173 0.9403128 0.8105674 0.6371201 0.8397974 0.7667517 0.8537679 0.7754431 0.7696157 0.6529395 0.8382412 0.7317458 0.9275837 0.9061513 0.8800561 0.6551982 0.7912697 0.6714059 0.8056814 0.6623041 0.7046234 0.8590447 0.650902 0.6777208 0.6879243 0.9565481 0.8864318 0.7941055 0.7374686 0.6719481 0.7903522 0.7251954 0.6398608 0.7989448 0.5421679 0.5585819 0.6600939 0.6178703 0.6486155 0.5265155 0.3538848 0.4772005 0.4949449 0.433069 0.5586714 0.388754 0.3157931 0.4540782 0.4999795 0.4961175
0.4471382 0.42737 0.300872 0.3601817 0.4093675 0.4083311 0.4350853 0.5909762 0.6893574 0.5102382 0.6583686 0.594373 0.5701561 0.5749103 0.6036381 0.5870369 0.4009105 0.6086612 0.5674759 0.3669466 0.5786838 0.5344011 0.5038454 0.4822181 0.4092872 0.5115985 0.6604393 0.4778151 0.6599518 0.7462789 0.7564864 0.6378 0.7462237 0.7597063 0.7993932 0.6018895 0.8377901 0.7417446 0.7591082 0.7982231 0.6683353 0.7628597 0.6377966 0.8447711 0.8530086 0.612908 0.6590358 0.7965547 0.8280142 0.7223041 0.8893183 0.6333865 0.8527055 0.6846443 0.8975703 0.6351605 0.6233517 0.7055428 0.6476154 0.762907 0.6087573 0.7250847 0.6416523 0.7668186 0.8241942 0.6849928 0.734784 0.8430806 0.7506771 0.8067594 0.8643861 0.7766476 0.8132023 0.760926 0.697244 0.66829 0.8640418 0.7436183 0.5621568 0.5965657 0.6741125 0.4683723 0.6589917 0.5751379 0.5685299 0.5254777 0.3352665 0.5838762 0.5418706 0.3337174 0.4499786 0.3473132 0.3774619 0.5486464 0.4895208 0.4770246
0.3334065 0.471024 0.4331516 0.3008525 0.3950957 0.5015572 0.6347042 0.5121731 0.5221061 0.5334327 0.4356593 0.6027328 0.5787301 0.4955264 0.424495 0.4048437 0.4797074 0.6063755 0.5630081 0.5132698 0.4747889 0.5689445 0.4172336 0.631386 0.5153763 0.4223037 0.5739152 0.7157817 0.7659467 0.5489039 0.6738804 0.6171281 0.7492441 0.6657926 0.8524361 0.7729543 0.6740318 0.6571857 0.6421193 0.8470046 0.7068514 0.8147033 0.8000459 0.7066385 0.6513663 0.7191029 0.5612399 0.7785182 0.8896549 0.853529 0.7436354 0.5966006 0.6151725 0.6111304 0.7640139 0.6666709 0.5316632 0.6492036 0.810203 0.6790206 0.5461231 0.7930806 0.7159511 0.7718178 0.573113 0.7104147 0.7839004 0.7718459 0.764292 0.6683898 0.7364751 0.7192493 0.6240643 0.7180386 0.6545492 0.8260547 0.5812435 0.7299941 0.5475544 0.5793527 0.5782967 0.3845492 0.6022901 0.5692878 0.536159 0.5654826 0.5403118 0.4181701 0.3310373 0.35711 0.316289 0.3130826 0.5492711 0.4467137 0.4083314 0.2962416
0.4779038 0.436013 0.4273154 0.3488943 0.3226392 0.3018929 0.4567682 0.4362071 0.5767919 0.5715172 0.6558539 0.650549 0.3970592 0.3973727 0.5151416 0.3868545 0.3487387 0.3419956 0.6002869 0.470155 0.3334452 0.5886593 0.5989218 0.4389215 0.4582648 0.4782752 0.3840742 0.561901 0.5908637 0.6098246 0.5575049 0.5573953 0.6146444 0.5270451 0.5265468 0.5664555 0.4611744 0.4961582 0.4801388 0.5385387 0.6835821 0.5573452 0.5744298 0.6017878 0.6936792 0.7119525 0.5107293 0.5891908 0.5712777 0.6644612 0.4731912 0.5029918 0.6984357 0.6920887 0.6526009 0.4368871 0.4399106 0.6479661 0.5845192 0.4942007 0.7007181 0.5024188 0.4996838 0.5976283 0.4460033 0.5205181 0.7056937 0.466568 0.5505278 0.572101 0.7434864 0.5905975 0.6112249 0.6624956 0.6576304 0.7932277 0.6739205 0.7336167 0.6199079 0.4985642 0.6664989 0.5189582 0.5446895 0.435059 0.4957309 0.5427747 0.3362916 0.420871 0.442076 0.4444812 0.4831686 0.4915364 0.5269757 0.2816285 0.4390492 0.343173
0.4940956 0.4463397 0.3436056 0.3915684 0.3763794 0.4655524 0.6593 0.528747 0.5691971 0.4797326 0.4501787 0.5482691 0.3977039 0.476605 0.4298603 0.3822006 0.4990843 0.4768711 0.5440539 0.5853384 0.470453 0.4665093 0.5584134 0.5042465 0.4071156 0.618718 0.4113743 0.4288447 0.4049812 0.3146732 0.3752923 0.445346 0.5147155 0.4032897 0.4780584 0.3489425 0.548394 0.5314503 0.4277436 0.5316682 0.6678159 0.6093093 0.4535929 0.4886073 0.6154481 0.6812568 0.434476 0.5798678 0.6436342 0.727834 0.6554385 0.6176213 0.6663533 0.4979813 0.7006258 0.4339675 0.5574746 0.4297314 0.3985753 0.559971 0.5650127 0.65253 0.6780554 0.5736152 0.4355079 0.578841 0.5596293 0.6672288 0.4545422 0.7778557 0.6336737 0.6556647 0.5315244 0.5500839 0.6939264 0.7967682 0.6619482 0.661558 0.5820188 0.6642021 0.5279955 0.3422285 0.4455041 0.411847 0.4474661 0.3702402 0.3397518 0.5312971 0.3652094 0.3148039 0.4242196 0.4905421 0.5205779 0.4261626 0.3569862 0.317145
0.3052572 0.4890146 0.5645182 0.4458626 0.3245093 0.5028945 0.5602612 0.579533 0.5623975 0.6626049 0.3910528 0.3869362 0.4356468 0.3813484 0.5311214 0.447055 0.358645 0.4365272 0.5311374 0.3517178 0.5803297 0.5563091 0.4028816 0.6047015 0.4902369 0.7183078 0.6291137 0.6283998 0.7249069 0.6580509 0.8579785 0.7276574 0.6326164 0.7927162 0.722508 0.8084262 0.7594878 0.7693956 0.7584448 0.7945467 0.6302177 0.8413394 0.8143482 0.9163645 0.6774146 0.9498859 0.9396921 0.9386189 0.9043447 0.8230741 0.7952545 0.7794557 0.7150824 0.6708492 0.9489346 0.6763411 0.754076 0.8986697 0.861798 0.8724053 0.8950184 0.7963454 0.8809903 0.6995518 0.8957109 0.7393097 0.8036497 0.8530983 0.6612235 0.8135495 0.9427403 0.8416451 0.9135702 0.7506924 0.8407863 0.6882559 0.7243582 0.814522 0.8192907 0.5583023 0.6891728 0.607907 0.6629426 0.5016127 0.4984621 0.6426641 0.5418873 0.4548414 0.5741721 0.3651476 0.5626484 0.2942262 0.5082548 0.4942996 0.4845483 0.5359624
0.4544988 0.3864324 0.4591521 0.3889788 0.5723112 0.5927309 0.5151486 0.5656936 0.644287 0.4576888 0.4460126 0.5773976 0.4923295 0.4164836 0.6575589 0.4563435 0.3803441 0.3724734 0.535668 0.5578266 0.3773922 0.5734505 0.3716818 0.5962009 0.500476 0.4557995 0.6899686 0.6539905 0.7498854 0.8280788 0.5933947 0.6470237 0.8143574 0.8042075 0.8420986 0.6386361 0.7381934 0.6570716 0.6898319 0.6672401 0.6366482 0.8606711 0.6367528 0.8355461 0.8296435 0.8289991 0.6798052 0.8275999 0.8590415 0.7106924 0.7027833 0.7392108 0.6967011 0.8911563 0.8012201 0.7457701 0.7157586 0.8839833 0.7091909 0.8532194 0.7313826 0.8132334 0.6841478 0.6632211 0.8103 0.7300224 0.6894274 0.7922881 0.6483815 0.8758868 0.7702819 0.9336376 0.8399787 0.8608207 0.7303168 0.8090621 0.6307529 0.8081929 0.6247015 0.630327 0.7526094 0.5371649 0.4577122 0.5745111 0.5616705 0.507044 0.5709812 0.6375291 0.6017594 0.5188043 0.5548356 0.482383 0.4898109 0.496595 0.4431955 0.4022112
0.5249196 0.4952271 0.4838592 0.5069834 0.5408287 0.6063733 0.6129088 0.7036881 0.6560966 0.6306047 0.6317744 0.4538044 0.5377533 0.466892 0.66416 0.4114664 0.6339096 0.53419 0.4582389 0.4543045 0.5314422 0.6237695 0.4254064 0.6015081 0.4396006 0.6484943 0.5708576 0.6945422 0.8090561 0.7476248 0.8255579 0.8851238 0.7898752 0.8699252 0.6413632 0.8659202 0.8797355 0.6404405 0.7738554 0.8762484 0.7862547 0.7025205 0.7659297 0.705478 0.7290111 0.8370882 0.8979613 0.9078111 0.6710133 0.662866 0.8983179 0.6461341 0.7149497 0.911812 0.7694754 0.8555191 0.8384997 0.8504463 0.7725313 0.8135567 0.8150404 0.8981978 0.7543266 0.8524037 0.8188873 0.7944638 0.8239845 0.7153299 0.7103565 0.8358676 0.7856362 0.7720326 1 0.7167783 0.9132723 0.8679415 0.9259516 0.9077308 0.7754206 0.7519832 0.5229931 0.6884344 0.6722791 0.5014786 0.4555387 0.5952165 0.4288752 0.5869282 0.3841665 0.5257777 0.4666884 0.3424762 0.4922576 0.4371775 0.6106761 0.5265953
0.6226878 0.6283718 0.4510807 0.4631837 0.4994025 0.4123245 0.7371878 0.5328421 0.7040127 0.4799362 0.713414 0.6388676 0.646304 0.4562443 0.600424 0.4250989 0.5421795 0.4125982 0.6935459 0.5096238 0.4725329 0.5563071 0.6615258 0.7046158 0.5662076 0.7432745 0.6684676 0.7292503 0.6688185 0.6711295 0.7971537 0.7672898 0.7691441 0.7210888 0.7543745 0.9578705 0.8805869 0.7780747 0.9172386 0.9674377 0.7204461 0.7718675 0.7574133 0.7778013 0.9027665 0.7504951 0.6814959 0.8660602 0.8490566 0.9346689 0.7688235 0.7889362 0.892612 0.6487792 0.6910845 0.8559668 0.7935144 0.7116968 0.8101721 0.6556304 0.7208663 0.890189 0.901543 0.7627929 0.6714004 0.8372034 0.9176991 0.8229567 0.7177987 0.6287309 0.7376183 0.7890441 0.7862535 0.8012577 0.856759 0.8883167 0.7640675 0.8875959 0.6166534 0.6195084 0.7118016 0.6036887 0.4903869 0.4065156 0.5914014 0.5819594 0.469505 0.4808614 0.3532655 0.3861224 0.491788 0.58349 0.5411776 0.4886878 0.3229608 0.5244529
0.4747077 0.5770013 0.3745665 0.513647 0.5780867 0.4512269 0.658708 0.5685072 0.5114353 0.7045248 0.6226386 0.6529827 0.6235116 0.5395446 0.5841188 0.4387667 0.6774506 0.4301552 0.5253122 0.4485602 0.4466049 0.5715692 0.5591095 0.5070607 0.5820277 0.5394209 0.661885 0.6743268 0.8190612 0.8100747 0.7805829 0.6384026 0.880655 0.9038808 0.8948492 0.7150546 0.7582353 0.8831198 0.6723525 0.7054453 0.6386931 0.7531704 0.7974518 0.6715435 0.6991402 0.9053797 0.6968482 0.683862 0.7437076 0.7830472 0.8840981 0.7832299 0.7160779 0.874988 0.7758921 0.795251 0.7272234 0.9510586 0.9188598 0.9253419 0.9057585 0.7010791 0.7219213 0.5579337 0.6936456 0.688484 0.6153287 0.7113593 0.749781 0.7280101 0.9455978 0.8472191 0.7837583 0.7868946 0.606117 0.8270857 0.7421694 0.7875695 0.7545922 0.5275303 0.6462345 0.4492907 0.4457837 0.5889818 0.4967435 0.590549 0.3192125 0.4110975 0.3867483 0.4194765 0.3458948 0.4810112 0.3264615 0.5796245 0.5547414 0.4460361
0.3541914 0.2893302 0.4981929 0.4403907 0.3326345 0.3572724 0.5259514 0.4916167 0.4447531 0.7128958 0.4618664 0.6397877 0.4284836 0.4279021 0.414875 0.4221009 0.4636676 0.5456853 0.3493264 0.4848609 0.4810044 0.5620982 0.5044715 0.5046103 0.3672738 0.264378 0.3873006 0.5606275 0.5282342 0.440598 0.6499674 0.5541098 0.4535814 0.4382632 0.6128593 0.6355804 0.5095338 0.4867095 0.4617058 0.6982173 0.5766907 0.7132595 0.7461251 0.7192029 0.725326 0.552826 0.545421 0.6180755 0.6582867 0.4310791 0.4910933 0.5300087 0.5034622 0.6541351 0.5473296 0.6298619 0.4441574 0.4527401 0.5625837 0.4040758 0.4751053 0.5132651 0.4602926 0.5774692 0.6846934 0.491967 0.4610501 0.5685656 0.4663405 0.6189469 0.7302622 0.6957355 0.8314404 0.6208864 0.5219125 0.511896 0.7041856 0.6982835 0.5812055 0.477473 0.6032296 0.5135193 0.3441756 0.3810368 0.569425 0.557062 0.4522122 0.3345625 0.3620072 0.4836535 0.3241135 0.248278 0.3370375 0.5378853 0.5171395 0.5268279
0.4617244 0.4451043 0.4253976 0.4178833 0.3471981 0.445945 0.5727624 0.4395663 0.4893786 0.5869143 0.511206 0.5103194 0.4032379 0.459056 0.4457849 0.5808356 0.4352501 0.4314307 0.5314832 0.6056467 0.4003504 0.3575786 0.4828609 0.6167909 0.5520558 0.5390846 0.4070647 0.5859835 0.3730845 0.472718 0.3602674 0.5204527 0.3681098 0.5600455 0.4415786 0.6012951 0.4566478 0.6420139 0.5947895 0.7011043 0.4860072 0.7018349 0.446126 0.4998864 0.5814167 0.7062149 0.6234018 0.696135 0.5801808 0.5545983 0.6860608 0.5191793 0.5524422 0.440344 0.5824509 0.5628417 0.5538404 0.6253764 0.4631574 0.4511841 0.6461121 0.5477582 0.6248404 0.4286795 0.5430478 0.6824772 0.3995573 0.5999366 0.6741401 0.6159592 0.7419249 0.7111448 0.5349733 0.7534165 0.6067333 0.6949017 0.56692 0.7342087 0.6276577 0.6231192 0.4934336 0.5216617 0.5137105 0.4634168 0.3016641 0.537492 0.3039905 0.4000785 0.430154 0.5098741 0.2443324 0.3627332 0.523739 0.2689388 0.4821689 0.455471
0.4342211 0.4563985 0.3074098 0.4395839 0.4744109 0.3668823 0.4279918 0.4954984 0.5514843 0.6039425 0.4906899 0.6087218 0.5859962 0.5109064 0.4112584 0.5885559 0.429163 0.6365661 0.6005157 0.3680743 0.6410641 0.4328388 0.5766291 0.5460312 0.653068 0.5380957 0.5422652 0.5504195 0.5787142 0.6444638 0.8349804 0.7769124 0.5991447 0.7035122 0.8285108 0.6830973 0.6204824 0.6943687 0.6721327 0.8732629 0.7040038 0.7900543 0.7976264 0.7757913 0.8018827 0.9338893 0.8562087 0.9273147 0.7086919 0.755986 0.8679707 0.8167147 0.8797119 0.8515412 0.8187451 0.7500288 0.7900946 0.7853951 0.7653337 0.6834887 0.797754 0.7588428 0.8426554 0.8682868 0.7058599 0.7742814 0.6747463 0.8557588 0.891645 0.9350425 0.8788985 0.7439723 0.7795719 0.8353444 0.8075989 0.7960682 0.6087101 0.7168358 0.731878 0.650528 0.4867669 0.5543615 0.6112825 0.5294781 0.3841658 0.3946891 0.5502861 0.4347843 0.3906832 0.3100519 0.274817 0.2807315 0.4180718 0.2957353 0.3775791 0.3780109
0.3462764 0.4914024 0.3772454 0.4376179 0.3073297 0.4988345 0.6962937 0.700517 0.503 0.5081063 0.5732896 0.4829354 0.5389744 0.4270152 0.6001243 0.5024294 0.6457127 0.4020746 0.6018613 0.5382313 0.5476164 0.6560517 0.6403468 0.6624757 0.7310645 0.5750365 0.6472246 0.5936199 0.5548082 0.7966999 0.7433957 0.9012398 0.7581337 0.8516893 0.7258516 0.6731189 0.9261605 0.8863652 0.9206213 0.8416682 0.7869314 0.843005 0.6903597 0.7085235 0.8520101 0.6033971 0.6238388 0.7683378 0.6004817 0.7192188 0.7645782 0.8171346 0.831914 0.7711725 0.8583522 0.738524 0.89651 0.7226114 0.6766842 0.7599239 0.775803 0.6914932 0.7424642 0.7319847 0.6245272 0.6112332 0.6455367 0.7276233 0.8749882 0.6934152 0.76718 0.8989147 0.8836197 0.9450943 0.7848756 0.7976432 0.8428852 0.8162248 0.7724613 0.6576995 0.5041613 0.4590339 0.6066662 0.6738239 0.5914272 0.4891452 0.4809305 0.4900053 0.522493 0.3799941 0.5463361 0.4872289 0.3516803 0.4747169 0.3088042 0.3752445
0.4512905 0.4655989 0.2508579 0.3057046 0.3513555 0.3752685 0.4246501 0.4908356 0.5995639 0.4733665 0.5204489 0.4682131 0.6434603 0.5440474 0.5072628 0.3914594 0.5450244 0.5313875 0.4918653 0.54299 0.4009373 0.6454506 0.5684035 0.6708547 0.5622213 0.7219614 0.5222517 0.6133404 0.6204751 0.7804306 0.8253788 0.83151 0.9043332 0.9014897 0.6422152 0.6886419 0.8196782 0.8211332 0.6738674 0.8137934 0.8098428 0.609931 0.7726869 0.6515573 0.6346253 0.7013774 0.6155391 0.8831791 0.8594656 0.9050285 0.8880796 0.9187325 0.7933486 0.9106183 0.8675875 0.8235065 0.815381 0.7168702 0.8867515 0.8074408 0.8424884 0.7736315 0.9285586 0.911794 0.6944614 0.7520127 0.719549 0.8517022 0.8351761 0.9608144 0.9583554 0.9991922 0.8632588 0.8217999 0.7522218 0.8079716 0.6826439 0.7196327 0.8194668 0.6680456 0.6432017 0.4509373 0.6090758 0.4267904 0.4162964 0.4541753 0.6222681 0.4831514 0.498736 0.4366561 0.4620125 0.3112433 0.4845672 0.3741105 0.3973449 0.5600716
0.3235945 0.3048008 0.603721 0.3336198 0.5877338 0.3999639 0.5022636 0.7377394 0.5800549 0.5609157 0.5587831 0.4801652 0.6849805 0.4637972 0.4257232 0.6763859 0.5122029 0.6140922 0.635335 0.6301604 0.6446209 0.5383086 0.5414378 0.588431 0.6439533 0.7194704 0.7172331 0.7395052 0.7874202 0.686871 0.8091281 0.8844104 0.78944 0.6494674 0.718092 0.8438777 0.8862875 0.8342923 0.6350507 0.7243641 0.8621362 0.6495911 0.7278274 0.8204779 0.7690414 0.6568349 0.6724347 0.7277756 0.9518499 0.8231221 0.8047257 0.9366855 0.681284 0.6489075 0.7110934 0.6751812 0.9100087 0.7812862 0.851215 0.7825046 0.7862812 0.6608539 0.8266985 0.7509542 0.8356956 0.7168024 0.6197006 0.8302886 0.6420229 0.6881712 0.6647679 0.8326532 0.6774961 0.9504633 0.8842299 0.6541942 0.7323174 0.9013277 0.8854183 0.6582812 0.6349351 0.613386 0.471822 0.4862005 0.4653103 0.6367903 0.4571739 0.5808391 0.4141132 0.6243839 0.5016164 0.2976648 0.3824881 0.4459773 0.4051439 0.3388703
0.5101376 0.2965726 0.6008441 0.4293723 0.417393 0.4453572 0.6111282 0.5983116 0.7142418 0.6920242 0.5566324 0.68526 0.6883228 0.5217717 0.5439389 0.6926704 0.6551969 0.638361 0.5072247 0.5113699 0.5975521 0.4788842 0.4214116 0.4467138 0.6048739 0.5620414 0.7681929 0.6163582 0.7155979 0.574994 0.8552615 0.8542974 0.6400895 0.8688234 0.8051574 0.8588666 0.6161711 0.8059189 0.7806703 0.8555602 0.8031597 0.6700029 0.6521534 0.8851928 0.7893672 0.8806758 0.9035852 0.8968438 0.6347917 0.8507489 0.8344105 0.6303565 0.6195542 0.6882697 0.6274473 0.7749748 0.8129316 0.7344294 0.6981986 0.6392457 0.594449 0.814542 0.6755778 0.6056335 0.8176867 0.6195659 0.6318747 0.8526902 0.8555843 0.8569631 0.6863375 0.8913815 0.6863134 0.7187347 0.7970806 0.8634765 0.758283 0.7011734 0.585674 0.599605 0.6989049 0.530715 0.4296788 0.4871189 0.3888237 0.3361096 0.5302847 0.5170949 0.398522 0.588406 0.4348589 0.4254819 0.3807077 0.4045931 0.5122969 0.5631191
Rforecast
  • 21
  • 2
  • Based on your plots, I can assume that variable Y may be not of proper time series class. – Andrey Kolyadin Jan 04 '17 at 10:29
  • Thank you for your comment. Transforming Y into a time series object like below gives error messages. If I put "frequency=672" (672 = number of 15-min intervals in one week), arima says "maximum supported lag is 350". If I put frequency=96 I get some different error messages: Yts – Rforecast Jan 04 '17 at 11:14
  • Try xts or zoo time series. – Andrey Kolyadin Jan 04 '17 at 11:29
  • TacoBell asked us to forecast 15 minute interval data for their store sales thus we have seen and worked with this intriguing problem. Our solution incorporated day-of-the-week , holiday effects , monthly effects , level/step shifts/time trends. Please post you data and I will demonstrate our approach. Of course with only 1 year of data certain seasonal/holiday effects may not be available. When you post your data do so using 96 columns (24*4) and specify beginning date and country of origin. – IrishStat Jan 04 '17 at 12:50
  • 2
    See what Rob J. Hyndman recommends when it comes to ["Forecasting with long seasonal periods"](http://robjhyndman.com/hyndsight/longseasonality/). This will be quite relevant for your problem. – Richard Hardy Jan 04 '17 at 15:03
  • Thank you all for your help and advice. I now added some similar data. – Rforecast Jan 06 '17 at 13:35
  • I had some issues reading you data please email a csv file to me perhaps that will be better – IrishStat Jan 07 '17 at 15:32
  • http://stats.stackexchange.com/questions/238797/robust-time-series-regression-for-outlier-detection/239979#239979 might be of interest to you as it deals with a similar problem. I have received your data and will respond. – IrishStat Jan 09 '17 at 15:27

3 Answers3

1

Simple tools/approaches might be right (but I don't think so !) if there are no anomalous data points and no level shifts and one and only one trend and if you correctly specify anticipatory and lagged effects around holidays and no change in the daily patterns and no assignable cause to particular days of the month and no long-weekend effects and constant error variance over tine et al.. . See R Time Series Forecasting: Questions regarding my output and more recently Hidden markov model to detect Stock outs in Hourly sales Time series data for a comprehensive treatment/extraction of possible predictor variables waiting to be discovered.

When somebody suggests a solution, you might ask them if they have had any personal experience with the software/approach as it applies to real-world data like yours. Ask them to share their analysis with you so you can have a "learning moment". Unfortunately many times the responder's answer may be an embarrassing "no" as they are just passing on hearsay. The devil is in the details and 15 minute readings often contain information that needs to be carefully extracted and used effectively for labor force management or supply chain decisions.

EDITED AFTER RECEIPT OF DATA:

I took your 30 days of data (96 readings per day) and analyzed it using AUTOBOX a piece of software that I have helped develop using a 30 day forecast horizon. The documentation for the approach can be found in the User Guide available from the AFS website. I will try and give you you a general overview here. The data is analyzed in a parent-to-child approach where a model is initially developed for the daily totals . This is the analysis for daily sums enter image description here and here enter image description here . Two unusual days (29 and 10) and a suggestion of a day 6 effect found for the last two weeks. With 30 days of data one has to be concerned with false positives.

Now 96 individual equations are formed for each of the "children" employing the daily total as a possible predictor. 16 of the 96 series suggested that daily totals was a significant predictor . Note that it is always possible to constrain the group total as a predictor . CHILD 36 was an example where the PARENT (daily total) was significant enter image description here with two level shifts identified enter image description here.

Some other analyses are also interesting (4,8,30 and 69) just to show variety . enter image description here . enter image description here enter image description here enter image description here

One can create forecasts for the next 30 days for each of the 96 periods normalizing the CHILD forecasts to the PARENT forecast or vice-versa. As to which reconciliation procedure is more accurate one would have to conduct an out-of-sample comparison.

Clearly with more than 30 days one might be able to model not only daily effects but holiday effects (before and after) , week-of-the-month effects , week/month of the year effects , particular days-of-the-month effects. All models are wrong but some are useful. I hope this has helped you and the millions of others who are facing the same kind of statistical problem/opportunity.

IrishStat
  • 27,906
  • 5
  • 29
  • 55
1

I think your problem is that you didn't set the seasonal period. It has to be set so that the seasonality doesn't die off. In your case, start with setting it to daily, for instance. You have 24 hours and 4 observations per hour, so seasonal period is 96. Set it in `seasonal' order parameter, as period.

Aksakal
  • 55,939
  • 5
  • 90
  • 176
0

A GAMM can model both the periodic component (using a cyclical spline) and the temporal correlation structure. Since fitting ARMA beyond the AR1 is very slow, the below code example only serves as illustration, to be modified according to the residuals' partial ACF:

x <- read.table(pipe("pbpaste")) # read data from clipboard on macos
y <- as.vector(t(as.matrix(x))) 
time <- 1:length(y) 
withinDay <- rep(1:96, 30)

This sets up the data, although not particularly prettily.

library(mgcv)
fmm <- gamm(y ~ s(time) + s(withinDay, bs="cc"), correlation=corARMA(c(0.2), ~time, 1, 0))

The corARMA needs to be adapted, e.g. according to the observed partial autocorrelation in the model residuals.

Now predict and plot:

plot(y, type="l", xlim=c(1, 3550))
lines(time, predict(fmm$gam), col="red") # fitted
lines(2881:(2880+7*96), predict(fmm$gam, newdata=data.frame("time"=2881:(2880+7*96), "withinDay"=rep(1:96, 7))), col="blue", lwd=2)

Data (black), fit (red) and extrapolation (blue) using a GAMM.

To see why extrapolation drops steadily, plot effects in this model.

par(mfrow=c(1,2))
plot(fm)

Effect of "time" and the cyclic "within day" pattern. Error bars are 95% CIs.

The effect of "time" decreases towards the end. Obviously, this model is not yet tuned (I would, for example, use heavier regularisation).

Carsten
  • 341
  • 2
  • 3