Last active
September 30, 2021 08:53
-
-
Save MJacobs1985/9a077f9e53a9d352fac250b339e32ed2 to your computer and use it in GitHub Desktop.
Time-series analysis in SAS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Decomposition Analysis**/ | |
ods graphics / reset width=10in height=8in imagefmt=svg; | |
proc sort data=WORK.MONTHLONG out=Work.preProcessedData;by variable date;run; | |
proc timeseries data=Work.preProcessedData seasonality=12 | |
plots=(series histogram cycles spectrum corr acf wn decomp sa pcsa tcc sc ic) | |
print=(descstats seasons decomp); | |
where variable in ('65_80_all' '65_80_male' '65_80_female'); | |
by variable; | |
id date interval=month; | |
var value / accumulate=none transform=none dif=0 sdif=0; | |
decomp adjusted pcsa trendcycle seasonal irregular / mode=multoradd; | |
ods exclude ACFNORMPlot; | |
ods exclude WhiteNoiseLogProbabilityPlot; | |
spectra / domain=frequency; | |
run; | |
proc delete data=Work.preProcessedData;run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment