• Community
    • Home
    • Welcome
      • Getting Started
      • Community Memo
      • All Things Community
      • SAS Customer Recognition Awards (2024)
      • SAS Customer Recognition Awards (2023)
    • SAS Community Library
    • SAS Product Suggestions
    • Upcoming Events
    • SAS Customer Recognition Awards
    • All Recent Topics
  • Learn
    • New SAS User
    • SAS Software for Learning Community
    • Ask the Expert
    • SAS Certification
    • SAS Tips from the Community
    • SAS Training
      • Programming 1 and 2
      • Advanced Programming
      • Course Case Studies and Challenges
      • Trustworthy AI
    • SAS Global Forum Proceedings 2021
    • Tech Report Archive
    • SAS Insights Archive
  • Programming
    • SAS Programming
    • SAS Procedures
    • SAS Enterprise Guide
    • SAS Studio
    • Graphics Programming
    • ODS and Base Reporting
    • SAS Code Examples
    • SAS Web Report Studio
    • Developers
  • Analytics
    • Statistical Procedures
    • SAS Data Science
    • Mathematical Optimization, Discrete-Event Simulation, and OR
    • SAS/IML Software and Matrix Computations
    • SAS Forecasting and Econometrics
    • Streaming Analytics
    • Research and Science from SAS
  • SAS Viya
    • SAS Viya
    • SAS Viya on Microsoft Azure
    • SAS Viya Release Updates
    • Moving to SAS Viya
    • SAS Visual Analytics
    • SAS Visual Analytics Gallery
    • Your Journey to Success
    • SAS Viya Workbench
      • SAS Viya Workbench: Getting Started
      • SAS Viya Workbench Discussion
      • SAS Viya Workbench: Release Updates
  • Administration
    • Administration and Deployment
    • Architecture
    • SAS Hot Fix Announcements
    • SUGA
  • Solutions
    • Microsoft Integration with SAS
    • Decisioning
    • SAS Decision Builder
    • Data Management
    • SAS Data Maker
      • SAS Data Maker: Getting Started
      • SAS Data Maker Discussion
    • Customer Intelligence
      • SAS Customer Intelligence
      • SAS Customer Intelligence 360 Release Notes
      • SAS 360 Match
    • Risk and Fraud
      • SAS Risk Management
      • Fraud, AML and Security Intelligence
      • SAS Risk Release Updates
      • Risk & Finance Analytics
      • Insurance Fraud
      • MRM AI Governance Working Group
      • SAS Quant Community
    • SAS Health
      • SAS Health and Life Sciences
      • SAS Life Science Analytics Framework
  • Hubs
    • Regional Hubs
      • SAS User Groups
      • SAS Community Nordic
      • AML Nordic User Group
      • SAS Japan
      • SAS Korea
      • CoDe SAS German
      • SAS Plattform Netzwerk
      • SAS Brazil Community
      • SAS Spanish Community
      • SAS Users Group in Israel
      • 欢迎来到SAS中文社区!
      • Ottawa Area SAS Users' Society
      • Toronto Area SAS Users Group
      • SAS Türkiye Community
    • Special Interest Hubs
      • SAS Hacker's Hub
      • SAS Innovate 2026
      • SAS Analytics Explorers
      • The Curiosity Cup
      • SAS Inner Circle Panel
      • SAS Hackathon Team Profiles (Past)
      • SAS Explore
      • Reporting and Optimization
      • Intern Alumni Network Community
Sign In

Search the Community

Showing results for 
Search instead for 
Did you mean: 
Search Options
  • Subscribe to RSS Feed for this Search
Advanced Hide Advanced
  • Posts
  • Users
  • Places
  • Products
Advanced Search Options
Search Modifiers:
You can apply modifiers to the terms you enter in the search field.
Use quotes to search for an "exact phrase".
Use the plus sign to search for +one +or +more +words.
Use the minus sign to -exclude -certain -words from your search.
Limits search results to topics that have no replies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
228 results
Sorted by:
Best Match
  • Date
  • Views
  • Likes
  • Replies
  • Best Match

SAS/SQL, how to getting rolling max with rolling and changing window-l...

by Pyrite | Level 9 hellohere in SAS Programming
3 weeks ago
3 weeks ago
data temp(drop=i j); do i=1 to 3; do j=0 to 100;      byvar=i;         ind=j;         x1=sin(j/10)+i;         y1=cos(j/10)+i;         output;    end; end; run;quit; /*proc sgplot data=temp; by byv...
Show results in replies (1)
  • PROC SQL doesn't allow these types of 'windowing' functions, unfortunately (not sure about FEDSQL)....

rolling window by quarter

by Lapis Lazuli | Level 10 sasphd in SAS Procedures
‎03-22-2017 11:39 AM
‎03-22-2017 11:39 AM
I want to do a special rolling window. I want to estimate a variable X every quarter using the 60 past observations of variable Y. This is an example the variable X of december 2015 is estimed u...
Show results in replies (3)
  • ...ommunities.sas.com/t5/SAS-Procedures/macro-for-a-rolling-window-regression/m-p/177594
  • ...stimation using a rolling window 
  • ...o be a rolling window, that would be a quarterly summary for the previous 3 months for each month: M...

Rolling Skewness with Moving Window

by Pyrite | Level 9 Junyong in SAS Programming
‎08-27-2020 07:13 PM
‎08-27-2020 07:13 PM
I have 5000 daily time series ( var0001-var5000 ) from 01/01/2019 to 12/31/2019 and want to compute their rolling skewness each month. This post introduces proc summary for the rolling skewness....
Show results in replies (3)
  • The only way to get proc summary to generate rolling window skewness (or rolling window anything) i...
  • Using a data row in a rolling window computation means the data row needs to be replicated for a...
  • ...rop=_:) / view=need ; retain window_id; format t_beg yymmddn8. ; set have; t_beg=lag&u...

how to estimate rolling window beta

by Obsidian | Level 7 bera00 in SAS Programming
‎05-24-2017 04:14 PM
‎05-24-2017 04:14 PM
Hello all, I need your help please because I am having some troubles with the sas script to estimate rolling window betas . I want to estimate for each cusip code  in each month , the  b...
Show results in replies (2)
  • OK, so now it is clear you want Every Rolling window whose report_date is >= first_date+47 m...
  • ...ou want a minumum window size criterion.  In that case I suggest you add anew array: _SEQ_N{}, o...

VA Report Example: Moving 30 Day Rolling Sum

by SAS Employee TeriPatsilaras in SAS Communities Library
‎10-17-2019 01:12 PM
2 Likes
‎10-17-2019 01:12 PM
2 Likes
...dded a few List Table objects to aggregate Day of Year and applied a filter for date to match the appropriate 30 day rolling window. I added a custom title to each List Table for clarification and h...
  • Find more articles tagged with:
  • GEL
Labels:
  • SAS Visual Analytics
  • SAS Viya
  • Tips and Tricks

macro for a rolling window regression

by Lapis Lazuli | Level 10 sasphd in SAS Procedures
‎11-19-2014 08:24 AM
‎11-19-2014 08:24 AM
I am working on a research project and have trouble come up with a way to conduct a rolling window regression. In my proc model I include this macro to do my rolling window. %do fen = %eval(&d...
Show results in replies (1)
  • ...ashelp.class using rolling windows of 5 records within each sex. BTW, you appear to never mark y...

macro for a rolling window regression

by Lapis Lazuli | Level 10 sasphd in SAS Programming
‎11-19-2014 10:09 AM
‎11-19-2014 10:09 AM
I am working on a research project and have trouble come up with a way to conduct a rolling window regression. In my proc model I include this macro to do my rolling window. %do fen = %eval(&d...
Show results in replies (1)
  • see my response at:

Aggregating or summing over three year rolling window for each ID

by Obsidian | Level 7 StevenR in SAS Programming
‎04-11-2020 03:33 PM
‎04-11-2020 03:33 PM
Hi, I have a question regarding how to calculate three year moving or rolling sum for each ID in a panel dataset.  The variables of interest are as follows: Year ID N...
  • Tags:
  • sum
  • three year moving window
Show results in replies (2)
  • ...hould be rolling. If we look at the table above for A, the count of nuniuniquepatents is 0 for 1936 b...
  • Here is a solution using proc expand:   data have; input Year ID$ NUniquePatents; dat...

SAS/IML for rolling window regressions by firm

by Fluorite | Level 6 ho0421 in SAS/IML Software and Matrix Computations
‎01-16-2017 04:07 AM
‎01-16-2017 04:07 AM
...egression of "Weight" on "Wheelbase" and "Length", including the intercept (using 10-rolling windows for each "Make"). I know some normal SAS macro that can do the work. But I want to learn how SAS/IML c...
Show results in replies (2)
  • ..., 2, ... */ idx = s:i; /* rolling window of data points */ PE[i,] = RegEst( y[i...
  • ...to nrow(y); idx = max(1,(i-k+1)):i; /* rolling window of data points */ Estimate[i...

Rolling window retaing fixed number of observations along the way

by Calcite | Level 5 Taasby in SAS Programming
‎10-14-2020 07:17 AM
‎10-14-2020 07:17 AM
Hi everyone   I'm using this array (thanks to Kurt for helping me out with this): data avg_1; set avg; by Date; array window{0:379} _temporary_; array window1{0:379} _temporary_; if f...
Show results in replies (1)
  • ...way_Table; by Date; array window{0:199} _temporary_; array window1{0:199} _temporary_; if first.Date...
  • « Previous
    • 1
    • 2
    • 3
  • Next »
Powered by Khoros