paley {survey}R Documentation

Paley-type Hadamard matrices

Description

Computes a Hadamard matrix of dimension p+1, where p is a prime, and p+1 is a multiple of 4, using the Paley construction. Works for n up to 7919, and beyond that if the user can specify a suitable prime.

Usage

paley(n, nmax = 2 * n, prime=NULL, check=!is.null(prime))

Arguments

n Minimum size for matrix
nmax Maximum size for matrix. Ignored if prime is specified.
prime Optional if n<7920. A prime at least as large as n, such that prime+1 is divisible by 4.
check Check that the resulting matrix is of Hadamard type

Value

A matrix of zeros and ones, or NULL if no matrix smaller than nmax can be found.

See Also

hadamard

Examples


p<-paley(11)

p1<-2*p-1
## HH^T is diagonal for any Hadamard matrix
p1%*%t(p1)


[Package survey version 3.4-4 Index]