BookmarkSubscribeRSS Feed
samp945
Obsidian | Level 7

Hello all,

 

I'm new to forecasting and have been using UCM with good results for certain analyses. However, I'm currently working with a couple of datasets where the training data appears less patterned (i.e., no seasonality). Specifically, I'm trying to create retrospective forecasts for 2020+ using monthly vehicle fatality data from 2015 - 2019. My goal is to assess how much of an impact pandemic conditions had on certain types of mortality unrelated to COVID.

 

I've attached the dataset I'm using. Any hints or tips on how to create a better model? My current model has very wide confidence intervals.

 

Here's my code (I've commented out certain statements because the model diagnostics suggested I should based on papers I've read):

%let Cause=Traffic;

proc ucm data=CountsDeathMonthCause;
		where CauseOfDeath="&Cause";
id DeathMonth interval=month;
	model Count;

	irregular;
		*variance=0 NoEst;
	level
		variance=0 NoEst;
	*slope
		variance=0 NoEst;
	*cycle
		variance=0 NoEst=(variance);
	*season
		length=12
		type=trig
		variance=0 NoEst;

	deplag lags=(1);
	
	estimate
		back=48
		plot=panel;
		*outest=pan.EstDeath&Cause;
	forecast
		back=48
		lead=48
		plot=(decomp forecasts)
		outfor=pan.TableDeath&Cause;
	ods output FitStatistics=FitDeath&Cause;
run;

Thanks for reading!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 0 replies
  • 66 views
  • 0 likes
  • 1 in conversation