Calculate the compound symmetry matrix and its first and second derivatives wrt D.
fun.csmat(sigma, rho, obsi, transform, case = 1)
standard deviation
correlation coefficient
dimension of the square matrix
logical indicating wether or not the parameter in D is transformed.
1: return nobs x nobs CS matrix; 2: return a list for first derivatives of the compound symmetry matrix wrt sigma and rho; 3: eturn an array containing 2nd derivatives of the compound symmetry matrix wrt sigma and rho.