Statalist


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

Re: st: Converting SAS code into Stata code


From   David Airey <david.airey@Vanderbilt.Edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Converting SAS code into Stata code
Date   Thu, 11 Dec 2008 08:54:28 -0600

Why not run a test data set through both?

-Dave

On Dec 11, 2008, at 7:26 AM, Hugh Colaco wrote:

Thanks Scott. I would appreciate it if someone could verify that I
have translated the rest of the SAS code into Stata code correctly,
assuming the data is exactly the same.

Thanks,

Hugh



On Wed, Dec 10, 2008 at 12:13 PM, Scott Merryman
<scott.merryman@gmail.com> wrote:
On Wed, Dec 10, 2008 at 7:34 AM, Hugh Colaco <hmjc66@gmail.com> wrote:
Dear Statalisters,

I was given some code in SAS and need to translate it into Stata. My
dataset is in Stata. I have attempted the translation, but would
appreciate if someone would check it. I don't fully understand the
files that the author of the SAS code has created (at the beginning of
the code),

<snip>

libname tmp1 'c:\original';

data tr1; set tmp1.original1;
data tr22; set tmp1.original2;
data tr33; set tmp1.original3;

This copies the data files from the temp1 library to the Work library.

data tmp1.original0207;
set tmp1.original0203 tmp1.original04 tmp1.original05 tmp1.original06;

This appends the four SAS data sets in the SET statement.

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




--
Hugh
*
*   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   |   What's new   |   Site index