Choice of alpha for a numerically stable psi matrix

Psi_alpha(CorY, n, cond.tol = 1e-10)

Arguments

CorY

Correlation matrix of dimensions p x p with p the number of species for example.

n

number of samples

cond.tol

tolerance for the matrix condition number.

Value

  • psi: p x p corrected psi matrix

  • alpha: final alpha value needed to correct the psi matrix

Examples

n=30 p=10 S=5 Y=data_from_scratch("tree",p=p,n=n)$data beta = matrix(1/10,10,10) psi=Psi_alpha(cor(Y), n)$psi