[R] create matrices with constraint

Richard M. Heiberger rmh at temple.edu
Sat Dec 13 06:20:57 CET 2014


I think you might be looking for incomplete block designs.  See
Cochran and Cox 1957, page 481
for Plan 11.38
t=28, k=4, r=9, b=63, lambda=1, E=.78. Type I

This design might be the set of 4 x 7 matrices you are looking for.

On Fri, Dec 12, 2014 at 12:00 PM, Kathryn Lord
<kathryn.lord2000 at gmail.com> wrote:
> Dear all,
>
> Suppose that I have natural numbers 1 through 28.
>
> Based on these numbers, choose 4 numbers 7 times without replacement and
> make a 4 by 7 matrix, for example,
>
>> a1
>      [,1] [,2] [,3] [,4] [,5] [,6] [,7]
> [1,]    1    5    9   13   17   21   25
> [2,]    2    6   10   14   18   22   26
> [3,]    3    7   11   15   19   23   27
> [4,]    4    8   12   16   20   24   28
>
> and again create another 4 * 7 matrix, say a2, in the same way; however,
> every element of each column in a2 does not exist in any column of a1 like
> this, e.g.
>
>> a2
>      [,1] [,2] [,3] [,4] [,5] [,6] [,7]
> [1,]    1    2    3    4    5    6    7
> [2,]    8    9   10   11   12   13   14
> [3,]   15   16   17   18   19   20   21
> [4,]   22   23   24   25   26   27   28
>>
>
> and again create another 4 * 7 matrix, say a3, in the same way; however,
> every element of each column in a3 does not exist in any column of a1 and
> a2.
>
> Using same logic, I'd like to make the matrices (a3, a4, a5....) as many as
> possible.
>
>
> Any suggestion will be greatly appreciated.
>
> Best,
>
> Kathryn Lord
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list