SCM

[#2379] elasAids returns negative variance

Date:
2012-11-17 19:51
Priority:
3
State:
Open
Submitted by:
Johannes Kutsam (johanneskutsam)
Assigned to:
Nobody (None)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
None
URL:
Summary:
elasAids returns negative variance

Detailed description
the first line creates an aidsEst object without deltas (and adjusted vcov)
the second line should calculate the elasticities.
but for some goods the standard errors are missing.
inspecting the marshallVcov reveals that the variance (diagonal) is negative for some.
this may be due to some error in my adjusting the vcov in aidsSetShifters ... but aidsElas could (and maybe should) check that its not returning a covariance matrix with negative variances...

conditional_aidsmodel=aidsSetShifters(aidsmodel_shift, shiftervalues,hide=TRUE)
aidselas_shift2009=aidsElas(coef(conditional_aidsmodel),prices=conditional_aidsmodel$pMeans,totExp=conditional_aidsmodel$xtMean,
coefCov=conditional_aidsmodel$coef$allcov,df=df.residual(conditional_aidsmodel))

table(diag(aidselas_shift2009$marshallVcov)<0)

Comments:

No Comments Have Been Posted

Attached Files:

Changes

No Changes Have Been Made to This Item

Thanks to:
Vienna University of Economics and Business Powered By FusionForge