Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Can you get sign of value only?


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Can you get sign of value only?
Date   Thu, 23 Mar 2006 18:31:12 -0500

Please use the help system -- or just try the obvious. Stata has a built in sign() function.

Michael Blasnik
----- Original Message -----

Hi there,
Is it possible to get the sign of a value? I.e., I would like to multiply the
var x by either -1 or +1 depending on the sign of var y. Can I do this?
Danielle H Ferry

--
National Bureau of Economic Research <http://www.nber.org>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index