Statalist


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

AW: st: question


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: st: question
Date   Tue, 3 Nov 2009 15:26:04 +0100

<> 

"No, this is because these numbers are going to HUGE..."


Weirdly though, it also happens when the result is "1.9944475"...


*************
clear*
set obs 10000
set seed 12345

gen x1=rnormal()
gen x2=rnormal() 
gen y=0.2+.03* x1+.01* x2 +rnormal()

reg y x?

di exp(_b[_cons]+_b[x2]*15.3)* /* 
*/ exp(e(rss)/e(df_r)/2)
nlcom exp(_b[_cons]+_b[x2]*15.3)* /* 
*/ exp(e(rss)/e(df_r)/2)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Maarten buis
Gesendet: Dienstag, 3. November 2009 15:23
An: [email protected]
Betreff: Re: st: question

--- On Tue, 3/11/09, Tunga Kantarci wrote:
> I wish to calculate a figure where I call coefficient
> estimates and residuals sum of squares and degrees of
> freedom. All these quantities are from the stata
> estimation output. When I run the relevant command 
> -nlcom exp(_b[_cons]+_b[income]*15.3)*exp(e(rss)/e(df_r)/2)- 
>I get the error "could not calculate numerical derivative".
> This is perhaps because e(rss) and e(df_r) are not estimates.

No, this is because these numbers are going to HUGE, so huge
that in many cases a computer can't contain that number. This
to me suggest a conceptual error rather than a Stata error:
why do you want to do this?

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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