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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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