turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- 'Conditional' incomplete block design

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-21-2013 04:44 PM

hi all,

im not sure where to post this so ill start here.

i want to create an incomplete block design. i have 8 treatments A-H. i need to create 3 blocks of size 2.

now here is where im getting it stuck. there are treatment pairs that cannot be separated. in other words, A/B need to stay together, C/D, E/F, and G/H. so out of those four pairs i need to pick 3 pairs and i have to replicate this 50 times. i need all the pairs to be distributed equally and uniformly.

so for example replicate 1 may look like

Block 1 | Block 2 | Block 3 |
---|---|---|

A | E | C |

B | F | D |

replicate 2 would may like

Block 1 | Block 2 | Block 3 |
---|---|---|

E | A | C |

F | B | D |

any thoughts???

Accepted Solutions

Solution

05-21-2013
10:56 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-21-2013 10:56 PM

Since you haven't stated clearly if the order of treatments matters, so here is the combination version of the code. If it does matter, then use permutation version of it.

data _null_;

array x(4) $2 ('AB' 'CD' 'EF' 'GH');

seed = 1234567890123;

do n=1 to 50;

call rancomb(seed, 3, of x1-x4);

put seed= @20 ' x= ' x1-x3;

end;

run;

Haikuo

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-21-2013 09:23 PM

If the pairs can't be separated doesn't that mean you really only have 4 "treatments"?

Solution

05-21-2013
10:56 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-21-2013 10:56 PM

Since you haven't stated clearly if the order of treatments matters, so here is the combination version of the code. If it does matter, then use permutation version of it.

data _null_;

array x(4) $2 ('AB' 'CD' 'EF' 'GH');

seed = 1234567890123;

do n=1 to 50;

call rancomb(seed, 3, of x1-x4);

put seed= @20 ' x= ' x1-x3;

end;

run;

Haikuo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-22-2013 03:25 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

05-22-2013 03:35 PM

Not only random permutations, but also ordered sets of permutations:

http://blogs.sas.com/content/iml/2010/10/13/generate-all-permutations-in-sas/

By the way, in SAS/IML software the ALLCOMB, ALLPERM, RANCOMB, and RANPERM functions work on arbitrary sets, not just integers 1:n.