Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: Writing the value of a variable in another variable in a selective way


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Writing the value of a variable in another variable in a selective way
Date   Tue, 31 May 2011 17:31:26 +0100

If the problem is just this, the solution would be  

gen partnerprofit = profit[5] in 13 

In general, think about a -merge-. 

Nick 
[email protected] 


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Sent: 31 May 2011 17:20
To: [email protected]
Subject: st: Writing the value of a variable in another variable in a selective way

Hello,

How can I write the value of the variable called profit for e.g., 
subject i as the value into another variable called "partnerprofit" of 
another subject j?

For example: I am subject 3, my partner is subject 5; his profit is 13, 
now I would like to stata write in my "partnerprofit" the value 13.

Thank you very much for your help!
Ozgur

-- 
Dr. Özgür Gürerk

Lehrstuhl für Mikroökonomie & Laboratorium für experimentelle 
Wirtschaftsforschung
(Microeconomics & Laboratory for Experimental Economics)

Universität Erfurt, Nordhäuser Str. 63, D-99089 Erfurt

Tel: +49 361 7374561
Fax: +49 361 7374569
www.uni-erfurt.de/elab
--


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