Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- Re: ARIMA model to proc ARIMA

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 08-18-2022 10:58 AM
(1603 views)

Hi,

I am working on an intervention/ITS analysis. I first ran the analysis in R and would like to marginally replicate my results in SAS but I am having trouble. Given my ARIMA model from R and current proc arima code, I was hoping that you could point me in the right direction as the results do not make sense.

R model ARIMA=(3,0,0)

proc arima data=one;

identify=y cross=(step ramp);

estimate p=3 input=(step ramp) method=ml outmodel=out;

run;

__results__

SAS

R

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

hello @Levi_M

I do not have knowledge about R code or output to know exactly the equation that is being fit in your R code to compare with your PROC ARIMA code. So I can only comment on what your PROC ARIMA code is doing, it is an ARIMA(3,0,0) model with two input series (which is a regression with AR(3) error). The model is estimated using maximum likelihood estimation method in your code with method = ML option. The mathematical equation for the ARIMA(3,0,0) model with two input series in your PROC ARIMA is below:

Y_t = mu + w1*X1_t + w2*X2_t + 1/ (1-phi1*B-phi2*B^2-phi3*B^3) *a_t

You may also check the following section of PROC ARIMA documentation for discussions of regression with ARMA errors, and the mathematical equation specified, for similar regression models with ARMA errors in general:

The example in the doc above is ARIMA(1,0,1) with two inputs, different than the one you specified, but it should give you an example what equation is being fit when regression with ARMA error is fit in PROC ARIMA in general.

You may want to verify the equation being fit in your R code and make sure the equation fit are the same before you make any comparison.

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

hello @Levi_M

I do not have knowledge about R code or output to know exactly the equation that is being fit in your R code to compare with your PROC ARIMA code. So I can only comment on what your PROC ARIMA code is doing, it is an ARIMA(3,0,0) model with two input series (which is a regression with AR(3) error). The model is estimated using maximum likelihood estimation method in your code with method = ML option. The mathematical equation for the ARIMA(3,0,0) model with two input series in your PROC ARIMA is below:

Y_t = mu + w1*X1_t + w2*X2_t + 1/ (1-phi1*B-phi2*B^2-phi3*B^3) *a_t

You may also check the following section of PROC ARIMA documentation for discussions of regression with ARMA errors, and the mathematical equation specified, for similar regression models with ARMA errors in general:

The example in the doc above is ARIMA(1,0,1) with two inputs, different than the one you specified, but it should give you an example what equation is being fit when regression with ARMA error is fit in PROC ARIMA in general.

You may want to verify the equation being fit in your R code and make sure the equation fit are the same before you make any comparison.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for your feedback. Unfortunately, I do not know R very well either and a package was using fit parameters ie AIC to determine the model without providing much context. However, the resources you provide helped me continue working on my project.

Thank you.

⏰

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.** **

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.