Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Stas Kolenikov <skolenik@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: RE: estimate precision in MATA |

Date |
Wed, 22 Sep 2010 08:08:31 -0500 |

On Wed, Sep 22, 2010 at 2:25 AM, Marie-Claire Robitaille-Blanchet <marie-claire.robitaille-blanchet@uwa.edu.au> wrote: > Let say I want to sum two variables. I can use format to increase the number of digits after the decimal point for the new variable = old_variable_1 + old_variable_2. > > I'm looking for the equivalent but when I sum matrixes in MATA. So I want to increase the number of digit after the decimal point for the new matrix I'm creating from already existing matrixes. And, if possible, I would prefer the entry in the new matrix to be in the data type: double. Mata already operates in double precision. If you need even higher precision for your computations, there are -quad*()- functions available. For each individual number, you can -printf()- it in the format you like: . mata : pi() 3.141592654 : printf("%20.18f",pi()) 3.141592653589793100 Here, of course, the trailing zeroes are wrong, but Stata may have no way of figuring out that they are. -- 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/

**Follow-Ups**:**RE: st: RE: RE: estimate precision in MATA***From:*Marie-Claire Robitaille-Blanchet <marie-claire.robitaille-blanchet@uwa.edu.au>

**References**:**st: estimate precision in MATA***From:*Marie-Claire Robitaille-Blanchet <marie-claire.robitaille-blanchet@uwa.edu.au>

**st: RE: RE: estimate precision in MATA***From:*Marie-Claire Robitaille-Blanchet <marie-claire.robitaille-blanchet@uwa.edu.au>

- Prev by Date:
**Re: st: Gllamm: Convergence not achieved: try with more quadrature points** - Next by Date:
**st: RE: SVAR approach by Blanchard and Perotti** - Previous by thread:
**st: RE: RE: RE: estimate precision in MATA** - Next by thread:
**RE: st: RE: RE: estimate precision in MATA** - Index(es):