myDiag: Auxiliary function to form matrices equal to x everywhere...

Description Usage Arguments Value Examples

Description

Auxiliary function to form matrices equal to x everywhere except from the upper/lower k diagonal, which values are vec

Usage

1
myDiag(x, vec, k)

Arguments

x

initial matriw

vec

vector with specified new values for the upper/lower k diagonal elements of x

k

index of the diagonal

Value

x

Examples

1
2
3
4
K=3
u <- sqrt(1/(4-1/seq(1,(K-1))^2))
n = length(u)+1
trans = myDiag(matrix(0,n, n),u,1) + myDiag(matrix(0,n, n),u,-1)

RandomCoefficients documentation built on June 7, 2019, 5:02 p.m.