Am 15.02.2021 um 20:08 schrieb Allin Cottrell:
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.
I can test on my data later this week.
Did you update the version requirement? (To at least 2016c AFAICS.)
thanks
sven