Skip to contents

Generates a random variogram Matrix by producing a \((d-1) \times (d-1)\) matrix B with random integer entries between -b and b, computing S = B %*% t(B), and passing this S to Sigma2Gamma(). This process is repeated with an increasing b until a valid Gamma matrix is produced.

Usage

generate_random_integer_Gamma(d, b = 2, b_step = 1)

Arguments

d

Number of rows/columns in the output matrix

b

Initial b used in the algorithm described above

b_step

By how much b is increased in each iteration

Value

A numeric \(d \times d\) variogram matrix with integer entries

Examples


generate_random_integer_Gamma(5, 2, 0.1)
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]    0    2    6    3    7
#> [2,]    2    0   14    7    9
#> [3,]    6   14    0    9   13
#> [4,]    3    7    9    0   14
#> [5,]    7    9   13   14    0