Learn R Programming

isni (version 0.1)

fun.csmat: Internal Function for generate compound symmetry matrix and its first and second derivatives wrt D

Description

Calculate the compound symmetry matrix and its first and second derivatives wrt D.

Usage

fun.csmat(sigma, rho, obsi, transform, case = 1)

Arguments

sigma

standard deviation

rho

correlation coefficient

obsi

dimension of the square matrix

transform

logical indicating wether or not the parameter in D is transformed.

case

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.