Learn R Programming

isni (version 0.1)

fun.ar1mat: Internal Function for generate AR1 matrix and its first and second derivatives wrt D

Description

Calculate the autoregressive matrix and its first and second derivatives wrt D.

Usage

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

Arguments

sigma

standard deviation

rho

autoregressive parameter

obsi

dimision of the square matrix

transform

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

case

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.