On Mon, 15 Feb 2021, Allin Cottrell wrote:
On Mon, 15 Feb 2021, Sven Schreiber wrote:
> I'm getting a matrix non-pos-def error when using the ivpanel addon. It
> concerns the function matrix_tsls, namely:
>
> matrix nonzero = (abs(R[diag]) .> 1.0e-12)'
> if minr(nonzero) == 1
>
> V = invpd(XQ * XQ')
>
> So the solution is apparently: remove the same regressors that Jack's
> felogit package removes automatically as (numerically) collinear.
I agree, ivpanel should use the same approach as felogit on this
point.
In git ivpanel is revised to use dropcoll(), like felogit. It worked
fine for me when I added a collinear term to the sample script but I
won't publish the update to sourceforge until it's had some more
checking.
Allin