Hi!
I am using version 13.1 and I am trying to classify/label each company in my dataset as young or mature (i.e. “1” “0”).
I am using a dataset including companies with stock price data from 1988-2008. I should analyse stock price movements, but as a first step I have to classify the companies.
Variables I want to use are:
gvkey(->long, %12.0g)
year(->int, %9.0g)
prcc(->Type:double, %10.0g)
but company names (conm) are still included.
A company should be labeled mature, if prcc shows six entries or more (company is listed with prcc six times, does not have to be in row),
and should be young as long as “prcc” has one to five entries. I tried "label" but were not able to code the "jump" from young to old.
In my dataset, if there is an entry for a company (gvkey) in a certain year(year), there is always a stock price (prcc). It looks like this:

Here is my problem: Has anyone an idea how I can label or create a new variable for the companies classsifing them?
Some companies start at 1995, some 1999 and so on.
A classification for a company should change from young to old, when it “turns” six (i.e. see Kofax which should have a “young” or 1 from 1998-2002 and “old” or 0 from 2003 throuhout the rest).
If anyone could help me out, that would be nice!
Nellie
I am using version 13.1 and I am trying to classify/label each company in my dataset as young or mature (i.e. “1” “0”).
I am using a dataset including companies with stock price data from 1988-2008. I should analyse stock price movements, but as a first step I have to classify the companies.
Variables I want to use are:
gvkey(->long, %12.0g)
year(->int, %9.0g)
prcc(->Type:double, %10.0g)
but company names (conm) are still included.
A company should be labeled mature, if prcc shows six entries or more (company is listed with prcc six times, does not have to be in row),
and should be young as long as “prcc” has one to five entries. I tried "label" but were not able to code the "jump" from young to old.
In my dataset, if there is an entry for a company (gvkey) in a certain year(year), there is always a stock price (prcc). It looks like this:
Here is my problem: Has anyone an idea how I can label or create a new variable for the companies classsifing them?
Some companies start at 1995, some 1999 and so on.
A classification for a company should change from young to old, when it “turns” six (i.e. see Kofax which should have a “young” or 1 from 1998-2002 and “old” or 0 from 2003 throuhout the rest).
If anyone could help me out, that would be nice!
Nellie
Comment