Statalist


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

st: How to generate this variable please?


From   Nirina F <[email protected]>
To   [email protected]
Subject   st: How to generate this variable please?
Date   Wed, 21 Oct 2009 17:05:01 -0400

Dear all,

I am not even sure how to search in the help for this so I thought I
would ask you.

I have two variables year (1950 to 2000) and field. Field has
different categories 1 for accounting, 2 for art 3 for biochemistry
etc....until 12.

I would like to have a variable that shows the mean of the frequency
in accounting (category 1) for year -3 and +3. To be more explicit:
for example, I studied in 1955. I would like to attribute to myself
the average frequency of people who did accounting between 1952 and
1958 so that it will be an indicator for me on how popular accounting
was around 1955. For year 1950, we can just look at +3, for year 2000,
we can just look at -3 years.
I am confused myself so I hope you understand what I mean.
then I would like to do it for category 5 and 6 together of variable Field.

Thank you so very much in advance for your help,
Nirina
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index