BookmarkSubscribeRSS Feed
Calcite | Level 5

Hi everyone,
I came across these two types of ERROR during the execution of the UCM procedure:
1. ERROR: Parameter estimation failed because the likelihood function or its gradient could not be evaluated at some stage of estimation. No further computations will be done.

2. ERROR: Parameter estimation failed because the likelihood function could not be evaluated at the initial point.


The code that I'm using is the following:


proc ucm data=&ds_in;
id &time_id interval=day;
model ⌖
splinereg &var1 degree=2 nknots=1;
splinereg &var2 degree=2 nknots=1;
season length=7 type=dummy;
deplag lags=1;
level plot=smooth;
estimate plot=panel;
forecast back=0 lead=1 outfor=ds_out;
ods output OutlierSummary=ucm_outlier;



- ds_in is the input dataset, 

- time_id is the time variabile (date9. format because the dataset is daily),

- target is the target variable,

- var1 and var2 are the explanatory variables.


What would account for that kind of errors? May I have to insert an additional statement in the procedure?


Jade | Level 19

There are a couple of possibilities for the cause.  The usual suspect for this kind of error is overspecifying the model.  Since &model resolves to a single target variable, I would suspect that the splinereg statements are causing the problem  Another is that the data are pathological in the sense that there are variable values that are not compatible with one or another when combined in the model.  As the Parameter Estimation section of the Details for PROC UCM says: "In most cases the difficulties in parameter estimation are associated with the specification of a model that is not appropriate for the series being modeled."


So let's assume that is taken care of, and you still get these kinds of errors.  Sometimes changing the optimization method will help, as will providing starting values.(although this is referred to in the Parameter Estimation section, I can't see right off how to do it).  The section Computational Issues also has a subsection on convergence issues and how to address them.





Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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
  • 2 in conversation