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: How to copy the contents of a variable into a new variable but in different observations


From   Clarice Martins <[email protected]>
To   [email protected]
Subject   st: How to copy the contents of a variable into a new variable but in different observations
Date   Tue, 22 Oct 2013 20:03:51 -0200

Hello!!

Can anyone help me with this?

I have data that is set as stock returns for different months (variables: jun2000 jul2000 aug2000 and so on), for different companies (variable: ticker_name) and different types of returns (variable: type_return with 3 groups: "formation_period", "buy_sell_period", "holding_period")

I have separated the Jun2000 returns, for the "formation period" observations, into quintile data. ie: now I have a variable called quintile that ranks from 1111 to 5555, my Jun2000 returns for the formation_period only.

Now, I need to copy these quintile numbers between companies (same companies) from "formation period" observations to "buy sell period" observations.   ie.: if AMBV4 has 1 in the "formation period", i need to carry 1 to AMBV4 in the "buy_sell_period" and "hold period" observations.

Is this possible? What is the best way?

I am new at stata and I have been learning a lot of new things, but I am having difficulty with this... Can you guys give a hand??

Thank you very much!!
Clarice


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index