R Language--time series analysis steps

Source: Internet
Author: User
Tags natural log

Great.

(1 ) based on trend differential

Plot (lostjob,type= "B") view the overall image trend and determine how the differential

df1 = diff (lostjob) d=1 order differential

S4_df1=diff (df1,4) k=4- Step (seasonal) differential for d=1- order differential Results

(2 ) is stable according to the determined differential test

Adftest (s4_df1,lag=6) for smooth test of differential results

(3) PQ Fixed order in ARIMA (p,d,q)

ACF (S4_DF1)

PACF (S4_DF1)

(4) building an Arima model

Ans=arima (Lostjob,order=c (4,1,0), Seasonal=list (Order=c (1,0,1), period=4), Include.mean=f,fixed=c (NA,0,0,NA,NA,NA ))

(5 ) test model residuals White noise

Use natural log of T (the number Ofobservations) which provides higher power (1-beta)

Box.test (s4_df1,lag=5,type= ' Ljung ')

Box.test (ans$residuals,lag=5,type= ' Ljung ')

Or

Tsdiag (ANS)

(6 ) forecast

Predict (ans,10)

R Language-time series analysis steps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.