BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
AB85
Fluorite | Level 6

I'm working on a Monte Carlo simulation that uses the gmatch macro to do propensity score matching. The full macro is available here: http://people.duke.edu/~hammill/software/gmatch.sas. I'd like to adapt the macro so that it doesn't take so long to process the data because I need to do this for 62,000 datasets. The program includes a lot of checks that I do not need at this point since I know that the macro is working and doing what it's supposed to do, but when I try to remove any of the checks, it stops working. Would anyone have suggestions for code that I can remove or adapt that will still result in computing the output dataset? I do not need all of the checks or the outlinks file.

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

How long does it take to run now on one of your datasets? Which are the slow steps? Shaving a second here or a second there isn't going to improve things much.

 

Removing the OUTLINKS step is easy as long as you remove the CHECK4 query that uses OUTLINKS as well.

 

You could run multiple versions of your program at the same time over different datasets to speed things up. This would work best on server-based SAS.

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

How long does it take to run now on one of your datasets? Which are the slow steps? Shaving a second here or a second there isn't going to improve things much.

 

Removing the OUTLINKS step is easy as long as you remove the CHECK4 query that uses OUTLINKS as well.

 

You could run multiple versions of your program at the same time over different datasets to speed things up. This would work best on server-based SAS.

AB85
Fluorite | Level 6

Thanks for your thoughts and suggestions! I took out the outlinks and check4 query that you suggested. I also removed all of the notes, and with these changes it only took a few seconds to run each replication. The bigger problem was with some macro loops earlier in my program, so I went through and revised the whole program, and now it should run much faster. It took more than 1.5 days the first time I ran it! 

SASKiwi
PROC Star

@AB85 - Good to hear. 1.5 days is indeed a bit long...

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 758 views
  • 0 likes
  • 2 in conversation