Learn R Programming

isni (version 0.1)

fun.generalmat: Internal Function for generate a general symmetric matrix and its first and second derivatives wrt D

Description

Calculate the general symmetric matrix and its first and second derivatives wrt D.

Usage

fun.generalmat(sigma, rho, obsi, transform, case = 1, case2 = NULL)

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 general symmetric matrix; 2: return a list for first derivatives of the general symmetric matrix wrt D; 3: return an array containing 2nd derivatives of the general symmetric matrix wrt D.

case2

indicator for variance and covariance parameters.