Calculate the autoregressive matrix and its first and second derivatives wrt D.
fun.ar1mat(sigma, rho, obsi, transform, case = 1)
standard deviation
autoregressive parameter
dimision of the square matrix
logical indicating wether or not the parameter in D is transformed.
1: return nobs x nobs AR1 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.