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 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]

RE: st: Re: FORTRAN


From   "Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Re: FORTRAN
Date   Mon, 30 Aug 2010 13:02:11 -0700

A follow- up  to my previous comment:  if you need to learn FORTRAN in addition to Stata, you may be biting off a big part of your career...

Tony

Peter A. Lachenbruch
Department of Public Health
Oregon State University
Corvallis, OR 97330
Phone: 541-737-3832
FAX: 541-737-4001


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Sergiy Radyakin
Sent: Monday, August 30, 2010 7:36 AM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Re: FORTRAN

On Mon, Aug 30, 2010 at 9:55 AM, Joseph Coveney <jcoveney@bigplanet.com> wrote:
> Stata SpecialEdition wrote:
>
> I have been using STATA for two years now and I LOVE it. I now need to
> do some more complicated estimation in a language called FORTRAN. Is
> it possible to read my STATA files in FORTRAN? A colleague said it was
> impossible and I would have just save it as an ASCII. Is this the best
> way? I just wanted to check whether this is the case with some STATA
> (and hopefully FORTRAN experts).
>
> --------------------------------------------------------------------------------
>
> The format of Stata's dataset files (.dta) are published, and so, if you're up
> to it, you probably *could* read them with a suitable FORMAT / READ statement
> (or set of FORMAT / READ statements) in Fortran.  Like your colleague, though,
> I question the worthiness of such an undertaking for any applications that
> you're likely to encounter.
>
> I'd go with ASCII, just as your colleague says.
>
> Joseph Coveney
>

Other options would include:
1. OLE Automation in FORTRAN
2. A plugin in FORTRAN.

Both will delegate reading/writing data to Stata itself, and both will
provide you with
a possibility to get/set values of Data(var, obs). This should be
enough for most cases.

If you wish to create a standalone program in FORTRAN that can process
Stata datasets,
the FORTRAN source code to read/write Stata datasets is made available by Andrew
Shephard here (see STATAMOD section):
http://www.ucl.ac.uk/~uctpajs/software.htm

Best, Sergiy Radyakin



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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index