BookmarkSubscribeRSS Feed
econfkw
Calcite | Level 5


The attached sports2 file contains info about sport events.

KDate is the actual date of the match. Ktime is the starting time of the match. Win and Loss are dummy variables. I have to filer the data by a couple criteria:

1. if the match time (Ktime) is before 7am, then set date=kdate, otherwise, set date=kdate+1. Let's say a soccer match starts at 3pm on 1/1 (kdate), then date=1/2. I've done this part.

if hour(KTIME) < 7 then KDATE1=KDATE;

if hour(KTIME) >= 7 then KDATE1=KDATE+1;            

2.If a trading day with a game played during trading hours (9am-4pm) is matched with other game(s) carried forward from yesterday, remove both games. For instance, a soccer match starts at 3pm on 1/1 (kdate), then date=1/2. If on 1/2, there is baseball game at 2pm (by rule 1, date= 1/3), then delete both matches.

3.if there are two matches on the same date (not kdate) and if the results are the same, then combine them as one event. Otherwise (like 1 win and 1 loss), delete all observations on the same date.

thanks

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 775 views
  • 0 likes
  • 1 in conversation