Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Re:Grouping data/Probability Transition Matrix


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re:Grouping data/Probability Transition Matrix
Date   Tue, 3 Apr 2012 09:08:07 +0100

I would call your new variable a 5-category nominal or categorical
variable. It is not a dummy variable.

I note that

replace InitialSize=4 if emp>=250& & year==1991

is illegal. With the superfluous "&" removed it will include firms
with missing -emp- in 1991.

Also -InitialSize- of 0 includes all data for 1992-1999. That's what
you asked for at the outset, and nothing changed it.

I would not do your analysis your way as I dislike coarsening data,
but that aside I would go

gen Initial = 1 if emp<10 & year==1991
replace Initial = 2 if emp>=10  & emp<50 & year==1991
replace Initial = 3 if emp>=50 & emp<250 & year==1991
replace Initial = 4 if emp>=250& emp < .  & year==1991

Then presumably there is an identifier with which you can go.

bysort id (year) : replace Initial = Initial[1]

Transitions are standard -xt- stuff. See help on -xttrans-.

Nick

On Tue, Apr 3, 2012 at 2:20 AM, tunmise jones <tunmisejones@gmail.com> wrote:

> I am currently working with a balanced panel dataset of companies over a period
> of 9 years (1991-1999) to track employment growth over the period.
>
> I would like to group firms into 4 size classes based on size
> (employment) in 1991. Based on the size classes, I ran the following
> commands:
>
> gen InitialSize=0
> Replace InitialSize=1 if emp<10& !mi(emp) & year==1991
> Replace InitialSize=2 if emp>=10& emp<50& year==1991
> Replace InitialSize=3 if emp>=50& emp<250 & year==1991
> Replace InitialSize=4 if emp>=250& & year==1991
>
> and obtained a four category dummy variable. I tried to group the
> entire dataset based on these categories and run separate regressions
> for each size class. It would appear observations for the regressions
> are only being limited to this sub-sample of firms in the first year.
>
> Following the above commands,
>
> 1. How can I classify all the firms into size classes based on their
> initial size (1991 size)?
> 2. Following from this, how can I estimate transition probability
> matrix for 1991 and 1999 to track firm mobility across the 4 size
> classes?
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index