Statalist The Stata Listserver


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

st: RE: Simple Data Question


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Simple Data Question
Date   Fri, 16 Mar 2007 00:28:10 -0000

The variables must be in the same data file. For this
to make sense I think you need to -merge- the datasets. 

Nick 
[email protected] 

Alex Koltai5
> 
> Sorry for a such a trivial question but I'm desperate.
> 
>    I want to correlate two variables which are stored in different
> data files (dat) in Stata.
> 
>    Eg. Data1.dat contains variable P1, Data2.dat contains the
> variable P2.
> 
>    How in the world do I do this in Stata?
> 
>    When I load one variable with "use 'Data1.dat'" and then save the
> variable that I'm interested in with "gen xy=p1", then if I load the
> other file the variable I saved (xy) gets deleted.
> 
>     This is annoying as hell. I hope a kind soul will help me with
> this trivial (but important to me) question.

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index