search for: umat

Displaying 2 results from an estimated 2 matches for "umat".

Did you mean: mat
2010 Apr 13
1
Lapack, determinant, multivariate normal density, solution to linear system, C language
...piv, one = 1; double *b, *A, *D, det; /* ** A and D are upper triangular matrices in packed storage ** A[] = a00, a01, a11, a02, a12, a22, a03, a13, a23, a33, ... ** use the following macro to address the element in the ** i'th row and j'th column for i <= j */ #define UMAT(i, j) (i + j * ( j + 1 ) / 2) /* ** additional code should be here ** - set q ** - allocate ipiv... ** - allocate and fill A and b... */ /* ** solve Ax=b using A=UDU' factorization where ** A represents a qxq matrix, b a 1xq vector. ** dspsv outputs the elements of the...
2011 Feb 16
1
VAR with HAC
Hello, I would like to estimate a VAR model with HAC corrected standard errors. I tried to do this by using the sandwich package, for example: > library(vars) > data(Canada) > myvar = VAR(Canada, p = 2, type = "const") > coeftest(myvar, vcov = vcovHAC) Error in umat - res : non-conformable arrays Which suggests that this function is not compatible with the VAR command. Has anyone tried to modify the code to get HAC corrected standard errors with VAR? Any suggestions are welcome. Thank you. Marta [[alternative HTML version deleted]]