Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if non sparse weight matrix used #6

Closed
JanDitzen opened this issue Aug 30, 2021 · 1 comment
Closed

Error if non sparse weight matrix used #6

JanDitzen opened this issue Aug 30, 2021 · 1 comment

Comments

@JanDitzen
Copy link
Owner

Dear Jan,
I run the demo code in your github , eg VA data set to estimate a SAR mode, the estimation process goes smoothly but while I try to get the imact, estat impact, it returns the following errors:
estat impact
----+--- 10 --+--- 20 --+--- 30 --+--- 40 --+--- 50 %
*: 3200 conformability error
SparseMultiply(): - function returned error
BarryPace(): - function returned error
calc_DIEffects(): - function returned error
: - function returned error

As you methioned in one of the discussion, I need to install the new version of moremata library in Stata. The problem is that even I install it, the errors are still there, I sincerely hope that you can help me.

the coding is just like this :

use IO
keep if Year == 1998
drop buyer_industry seller_industry
replace sam = 0 if sam < 0
replace sam = 0 if ID1==ID2
reshape wide sam, i(ID1) j(ID2)
spset ID1
spmatrix fromdata WSpmat = sam* , replace
clear
use VA
nwxtregress cap_cons compensation net_surplus , dvarlag(WSpmat) seed(1234)
estat impact

Thank you very much!

Originally posted by @zhangzhqnk in #5

@JanDitzen
Copy link
Owner Author

Error fixed.

_nwxtregress did not update sparse matrix indicator if non sparse weight matrix converted to sparse matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant