BookmarkSubscribeRSS Feed
jaweriahh
Obsidian | Level 7

My data set shows a u shaped trend. I want to fit a quadratic trend to the data set (studies utilizing similar datasets utilize quadratic models) how can i include it in the following command.

 

proc ucm data = metals;

id year interval = year;

model logcopper;

irregular;

level;

slope;

cycle;

estimate;

run;

 

Thank you for your help

1 REPLY 1
rselukar
SAS Employee

1.  The combination of LEVEL and SLOPE statements can approximate almost any smooth data pattern (including quadratic).  However, the generated forecast function (out-of-sample) is constant or linear.  This is adequate in most situations.  If you want the forecast function to be quadratic (or higher), you will have to use ARIMA type specification, which can be accomplished by a combination of DEPLAG (to specify differencing) and IRREGULAR (to set AR and MA orders) statements.  See the last example in the UCM doc.  Of course, you can also use PROC ARIMA.

2. You should not include CYCLE like components in your model without good reason.  It is good to keep a few good time series books handy to get better idea about time series modeling.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Discussion stats
  • 1 reply
  • 817 views
  • 0 likes
  • 2 in conversation