BookmarkSubscribeRSS Feed
sasphd
Lapis Lazuli | Level 10

Hello,

I want to do bootstrap simulation. I create N bootstrap sample for each group. the dataset looks like:

Group     bootstrapsample

1                    1

1                    1

1                    2

1                    2

1                    3

1                    3

.

.

1                    N

2                    1

2                    1

2                     2

2                    2

2                    3

2                    3

.

.

2                    N

I want to use %BYSTMT macro to run my program for each bootstrap sample for each group?

Thanks

5 REPLIES 5
Reeza
Super User

What's your question? If you're using a pre-defined macro and need help, reference to the macro or the code are required.

sasphd
Lapis Lazuli | Level 10

When I am using only group, I am running my proc model using a macro with a do loop by group to estimate my variable. In the output, I have my estimate for each group. Here I create a N bootstrap sample for each  group. My question is how we can run proc model for each bootstrap sample by group? 


Reeza
Super User

One of the following would work:

By bootstrapsample group;

or By group bootstrapsample

sasphd
Lapis Lazuli | Level 10

Thanks it works with my macro but it takes a lot of time. Can you tell me how to do it with  %ANALYZE macro and %BYSTMT macro.

24982 - Jackknife and Bootstrap Analyses

Reeza
Super User

In your case there's probably a better way:

http://www2.sas.com/proceedings/forum2007/183-2007.pdf

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