BookmarkSubscribeRSS Feed
scched
Calcite | Level 5

Hello, I'm not sure if this is the right place to be requesting help with a problem for school but I figured I'd try.

Anyway, I am trying to use SAS and familiar with how to use if for multiple and logistic regression, however, I am struggling using it now for Time Series.

I am supposed to create a sample of length 200 from the time series model and then I am supposed to:

1. Plot the Series

2. Give the corresponding ACF and PACF plots.

3. Identify it as ARMA (p,q) for appropriate values of p and q.

The model (with subscripts listed as lowercase letters) the sample is supposed to run off is:

Yt= 1.5Y(t-1) - 0.56Y(t-2) + Et

here is the code I entered into SAS, I recieve the error message LIBNAME TS is not assigned.

data TS.ARMA11;

y_1=0;

y_2=0;

do N=1 to 300;

e = normal (0822016280);

y= 1.5*y_1-0.56*y_2 + e;

y_2=y_1;

y_1=y;

time = -100 + n;

if n > 100 then output;

end;

keep time y;

run;

Someone please help me. Thanks a lot in advance.

Scott

3 REPLIES 3
Rick_SAS
SAS Super FREQ

In SAS, a dot in a data set name is interpretted as a two-level name: library.member.

Assuming you want to create the data in the WORK library, just use DATA TSARMA11 without the dot (or use an underscore, if you want).

scched
Calcite | Level 5

Hey Rick, thanks for your reply. I removed the period so my first line now reads as you wrote. I now get the error message:

NOTE: The data set WORK.TSARMA11 has 200 observations and 2 variables.

NOTE: DATA statement used (Total process time):

      real time           0.04 seconds

      cpu time            0.00 seconds

scched
Calcite | Level 5

Oh wait, I found the dataset, in the Work folder. Whattyaknow? haha. Thanks.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1234 views
  • 0 likes
  • 2 in conversation