On Wed, 30 Apr 2008, Riccardo (Jack) Lucchetti wrote:
On Wed, 30 Apr 2008, Allin Cottrell wrote:
> On Mon, 28 Apr 2008, Sven Schreiber wrote:
>
> [re, reorganizing the $sigma and $vcv accessors]
>
>> Although I will be one of the (few?) affected users I agree with
>> Jack that $vcv should be changed, especially because it's very
>> simple to change $vcv to $sigma to get the scripts working
>> again. (And I like the functionality that $vcv will deliver in
>> VAR/VECM contexts.)
>
> OK.
Coding $vcv for VARs should be quite easy. I'll try to see to that tomorrow.
Things are a bit trickier for VECMs. Should we return the v-cov matrix of the
coefficients in VECM or VAR form?
I just committed to CVS a few modifications to the VAR code, so that $vcv
returns the estimated covariance matrix for the coefficients. I don't
think I've broken anything, but you never know, so please test!
Limitations:
1) the --robust switch is ignored
2) VECMs aren't handled
Moreover, we have a slight inconsistency in the way we compute things:
$sigma uses the asymptotic formula (ie, E'E over T), while in the
displayed equations we use degrees-of-freedom corrected figures for
standard errors. I'm not overly bothered by this, but some may. Example
script:
<script>
open denmark
list Y = LRM LRY
scalar order = 2
scalar n = nelem(Y)*order+1
var order Y
b = vec($coeff)
vcv = $vcv
scalar correction = ($nobs-order)/($nobs-order-n)
#reproduce displayed stderrs
se = sqrt(diag(vcv)*correction)
zstat = b./se
eval b~se~zstat
</script>
Comments welcome.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti