Statalist


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

[no subject]



. di %15.12f one " " %15.12f two " " %15.12f one-two
 0.034278255072  0.034287810169 -0.000009555097

. di %15.12f reldif(one, two)
 0.000009238335

. di %15.12f reldif(two, one)
 0.000009238420

Thanks,

Misha

On Thu, Oct 15, 2009 at 6:51 AM, Stas Kolenikov <skolenik@gmail.com> wrote:
> I would say so. They have different underlying algorithms for numeric
> approximations, but the relative error of 1e-5 is OK for nonlinear
> stuff. Can you report -reldif- instead of -abs()-?
>
> On Wed, Oct 14, 2009 at 7:58 PM, Misha Spisok <misha.spisok@gmail.com> wrote:
>> In brief, are the two following approaches for the standard error of a
>> Wald estimate equivalent?  If not, why not?
>>
>> use http://pped.org/card.dta
>> reg lwage exper nearc4, nohe r
>> loc b1=_b[nearc4]
>> loc s1=_se[nearc4]
>> reg educ exper nearc4, nohe r
>> loc b2=_b[nearc4]
>> loc s2=_se[nearc4]
>> ivreg lwage exper (educ=nearc4), nohe r
>> di `b1'/`b2'
>> di `b1'/`b2'*sqrt((`s2'/`b2')^2+(`s1'/`b1')^2)
>>
>> qui reg lwage exper nearc4
>> est sto r1
>> qui reg educ exper nearc4, nohe
>> est sto r2
>> suest r1 r2
>> mat v=e(V)
>> matrix cov=v["r1_mean:nearc4","r2_mean:nearc4"]
>> loc c=cov[1,1]
>>
>>
>> -----Approach 1-----
>>
>> di `b1'/`b2'*sqrt((`s2'/`b2')^2+(`s1'/`b1')^2-2*`c'/`b1'/`b2')
>>
>> This final line is the result of the approach suggested by Austin
>> Nichols (http://www.stata.com/statalist/archive/2009-10/msg00498.html)
>> to get the standard error for the Wald estimator.
>>
>> Then, using the above results from -suest-,
>>
>> -----Approach 2-----
>>
>> nlcom [r1_mean]_b[nearc4]/[r2_mean]_b[nearc4]
>>
>> The results for the standard error are close (the difference is
>> 0.00001913), but not exactly the same.  Are the two approaches
>> analytically equivalent but different only numerically?
>>
>> Thank you for your time and attention.
>>
>> Misha
>> *
>> *   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/
>>
>
>
>
> --
> Stas Kolenikov, also found at http://stas.kolenikov.name
> Small print: I use this email account for mailing lists only.
>
> *
> *   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/
>

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index