Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Which inverter? (was: RE: RE: ivreg2 weak-id statistic and quadratic terms)


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: Which inverter? (was: RE: RE: ivreg2 weak-id statistic and quadratic terms)
Date   Tue, 21 Feb 2012 11:45:46 -0600

Is it that the tolerance is very large due to the large value of
max(S)?  Changing the tolerance does result in values that are close
to the scaled data:

. *max(S)

. mata: max(svdsv(XX))
  1.31904e+15

. *value of tolerance

. mata: max(svdsv(XX))*max(y)*epsilon(1)
  7.615041406

. mata: beta_sv2=svsolve(XX,Xy,.,-max(svdsv(XX))*max(y)*epsilon(1))

. mata: beta_sv2
                  1
    +----------------+
  1 |    .755934374  |
  2 |   .0032936694  |
  3 |  -1.97687e-06  |
  4 |    .001060688  |
    +----------------+

. mata: beta_sv2=svsolve(XX,Xy,.,-epsilon(1))

. mata: beta_sv2
                  1
    +----------------+
  1 |   .6979560211  |
  2 |  -.0218987055  |
  3 |   1.97388e-06  |
  4 |   41.39947923  |
    +----------------+

. *Compare to scaled data

. mata: beta_sv1=svsolve(XX1,Xy1)

. mata: beta_sv1
                  1
    +----------------+
  1 |   .6979557583  |
  2 |  -21.89870042  |
  3 |   1.973884277  |
  4 |   41.39947954  |
    +----------------+


Scott


On Mon, Feb 20, 2012 at 6:11 PM, Schaffer, Mark E <[email protected]> wrote:
> Hi all.  I have traced the problem to the choice of inverter.  At least,
> it's definitely the problem in the auto dataset example below, and I'll
> bet it's the source of Miroslav's problem as well.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index