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

From |
"Erik Ø. Sørensen" <sameos@mac.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: storage type problem |

Date |
Fri, 28 Feb 2003 11:10:16 -0500 |

On fredag, feb 28, 2003, at 10:44 Canada/Eastern, Kostova Deliana (HXX1DAK) wrote:

Suppose we want to calculate the product of -.1796042 and 4.752947, so wethis produces - ( .1796^0.475), not (-.179)^4.75 (whatever that would mean). The product (if you want it) would be written with a "*" not a "^".

type:

display -.1796042^4.752947

and we get

-.00028563

However, if we have variable X= -.1796042 and variable Y=4.752947, and weI think you are mixing some things here. X*Y should work well (and be -.85), but X^Y (which you indicate above) will not work since negative numbers raised to non-integers will not work (for good mathematical reasons, this has nothing to do with the storage types).

type

gen Z=X*Y, Stata will generate Z=. even though Z should be -.00028563.

Kind regards,

Erik

--

Erik Ø. Sørensen, <http://www.geocities.com/erik_oiolf/>.

phd student (economics), Norwegian School of Economics.

currently visiting Queen's University, Kingston, Ontario.

*

* 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/

**References**:**st: storage type problem***From:*"Kostova Deliana (HXX1DAK)" <HXX1DAK@ups.com>

- Prev by Date:
**st: RE: storage type problem** - Next by Date:
**st: RE: storage type problem (2)** - Previous by thread:
**st: RE: storage type problem (2)** - Next by thread:
**st: Re: storage type problem** - Index(es):

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