Bookmark and Share

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

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

st: portfolio building according to breakpoints

From   "Fabian Schönenberger" <[email protected]>
To   [email protected]
Subject   st: portfolio building according to breakpoints
Date   Tue, 03 Jul 2012 15:52:16 +0200

Dear Statalist

I am facing the following challenge:

I have a panel data consisting of id and observations for each id from different point in times for various variables (for instance size). Additionally, there are variables which serve as breakpoints for building portfolios. These variables differ only between different point in times. The goal is the following: I need to assign a number between 1 and 10 (10 portfolios) for each id's size on every point in time. The assignment is dependent between which breakpoint variables size fits. So, for one year and for the first assignment test this would be:

by id: generate sizeportfolio=1 if size <breakpoint2 & if year=2000

The second:

by id: replace sizeportfolio=2 if sizeportfolio= . & if size<breakpoint4 &  size>breakpoint2 & if year=2000

What is the most efficient way to conduct this formula for many years (1974-2011) and many assignment test?

Any suggestions highly appreciated.

Thx, Fabian

*   For searches and help try:

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