Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: atan2: Mata vs Stata


From   Chris Parker <chris.parker@psu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: atan2: Mata vs Stata
Date   Tue, 26 Feb 2013 19:59:46 -0500

Does anyone know why I get different answers for atan2 when
calculating in Mata and Stata? Here is an example from Stata/SE 12.1
for Mac

. disp atan2(sqrt(.0113631735),sqrt(1-.0113631735))
.10680111

. mata
------------------------------------------------- mata (type end to
exit) -----------------------------------------------------------
: atan2(sqrt(.0113631735),sqrt(1-.0113631735))
  1.463995218

: end
-------------------------------------------------------------------------------------------------------------------------------------

I feel like I must be missing something very simple but I can't figure
out what it is.

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index