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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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