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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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