I am running fixed-effect instrumental variable panel regression. The data is unbalanced panel. The cross-sectional unit is bond. I run regression in daily frequency. The variable on the left hand side is bond yield. Instead of running xtivreg, I use ivreg2 and manually add fixed effect terms for bonds (i.bond_id). It is because I want to use the post-estimation command "weakivtest". I cannot use "weakivtest" after xtivreg.
I am having hard time figuring out why I am getting the warning message below. Could you help?
code:
set matsize 10000
eststo clear
bysort bond_id: drop if _N <= 2
ivreg2 yield x1 i.bond_id x2 (x3 = z), cluster (bond_quarter_id)
weakivtest
Then I get the following warning message:
Warning: estimated covariance matrix of moment conditions not of full rank.
overidentification statistic not reported, and standard errors and
model tests should be interpreted with caution.
Possible causes:
number of clusters insufficient to calculate robust covariance matrix
singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
partial option may address problem.
I tried to fix problems on my own.
(1) I do not have any singleton dummy. As you can see in my code, I drop all bonds that appear no more than 2 times in the data. Hence, any i.bond_ID cannot be singleton.
(2) I cannot use partial out option, unfortunately. If I do that, then I have a problem with "weakivtest". I get the message that "weakivtest" cannot be used with noconstant option.
(3) number of clusters: this is why I am clustering at the bond-month level, instead of bond-level. I have about 3000 bonds. I have about 30,000 unique pairs of bond and quarters. The number of clusters is far larger than the number of indicator variables.
I want to use "weakivtest" because the usual rule-of-thumb (F statistic should be greater than 10) holds only for homoskedastic errors without auto-correlation. I am following the NBER SI http://conference.nber.org/confer/20...18/ML/Note.pdf.
At this point, I have no idea where the problem is coming from. Any suggestions?
Related Posts with ivreg2 warning that covariance matrix is not of full rank. But can't figure out why
Find the most recent observationHi, I have a year-firm panel data. How should I write the code to find the most recent observation …
Curious error when listing longI'm working with latitude and longitude variables but I ran into a curious error: Code: clear input…
Unable to cd and use the file in DropboxHi Everyone, I have difficulty to cd the file to Dropbox and use the file in Dropbox. Here are my s…
FIML and mixedI would like to estimate a multilevel model but have about 5-10% missing data on my covariates. I wo…
Descompositioncan someone explain to me about the gap descomposition methods and which are commands in Stata? I wa…
Subscribe to:
Post Comments (Atom)
0 Response to ivreg2 warning that covariance matrix is not of full rank. But can't figure out why
Post a Comment