| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: RE: Problem with generating time dummies in panel data
Your dependent variable can take any value of (h98-h96) and (h96-h94).
Your explanatory variables are (hp98-h98), (hp96-h96), (hp94-h94),
plus sex and age dummies.
The number of observations for your explanatory variables don't match
with the number of dependent variables you have - 2 years against 3.
What would make more sense to me (but I can be wrong) is to specify
your model so that:
Delta h = (hp-h) + (hp-h)*year dummies + sex dum + age dum
And you only need 1 year dummy because although you have 3 years to
start with, you lose one year as you take the difference for the
dependent variable, then you lose another one - as you might already
know but it appears to me that you don't - because you need to save
one as a reference group.
On 7/17/06, Daghan Yeldan <[email protected]> wrote:
Hi Ada,
I am using a first difference model where
∆h= á94 min94+á96 min96+ á98 min98 + sex dummies+ age dummies
h= is the number of agreed working hours
hp=the number of desired working hours
minder= the difference between the number of desired working hours and
number of agreed working hours.
My concern is to look for the differences in the á's during the time period.
∆h is descirbed as Dh=h- h(_n-1) if y==y(_n-1)+2
As I mentioned earlier I am working with micro panel data and I appended the
values in one dataset to run a regression. If I can manage to create these
min dummies I will run an OLS and look for the effects at first place. But
until, now I cannot create these dummies.
I think I inform you suffiecient about my struggle with generating the
dummies.
Best Wishes,
d
>From: "Ada Ma" <[email protected]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: st: RE: Problem with generating time dummies in panel data
>Date: Mon, 17 Jul 2006 16:17:48 +0100
>
>I think you need to clarify what kind of model you're trying to
>estimate, the exact command and option you use to estimate the model,
>plus some information on what h and hp are.
>
>You shouldn't have get a "no observation" warning as the bits of data
>you've posted clearly indicated that your "minder" variable carries
>non missing values, that is unless you have severe missing values
>problem in the other variables you're also using in your regression
>model.
>
>
>On 7/17/06, Daghan Yeldan <[email protected]> wrote:
>>Thanks Ada,
>>But tab year if ~mi(minder), gen(minder)
>>makes my minder values 0 for all the id (resp96)numbers. I am wondering if
>>I
>>can generate these dummies for each with a command which captures the id
>>number and the year as well. Dropping missing values wont help as well
>>than
>>I get no observation warning. I am quite new with Stata and I think what I
>>am looking forward to create has to capture the id numbers and years both
>>otherwise it is useless. Until now the advices I get generate things which
>>are almost the same and were dropped when they put them in a regression.
>>Moreover, when I try to implement the advices of the user (I thank them
>>for
>>their attendance my problem) generates 0 for the other years although
>>there
>>is no observations are present. This is the problem I am trying to solve
>>for
>>days.
>>
>>best wishes,
>>Daghan
>>
>>
>> >From: "Ada Ma" <[email protected]>
>> >Reply-To: [email protected]
>> >To: [email protected]
>> >Subject: Re: st: RE: Problem with generating time dummies in panel data
>> >Date: Mon, 17 Jul 2006 14:42:39 +0100
>> >
>> >You have to tell Stata that you don't want a value generated if minder
>> >is missing. Your command refers to the year variable, not the minder
>> >variable although the generated variables are named minder1, minder2,
>> >minder3, you could have called the three dummy variables holiday1,
>> >holiday2, holiday3, if you have written -tab year, gen(holiday)-
>> >
>> >Therefore if you want no dummies generated when minder is missing you
>> >should write:
>> >
>> >tab year if ~mi(minder), gen(minder)
>> >
>> >Or you can restrict your regression to use only obs that has a minder
>> >value. Or you can drop all obs that has got a missing minder value.
>> >
>> >
>> >On 7/17/06, Daghan Yeldan <[email protected]> wrote:
>> >>Thank you at least I get the year dummies, but again I am facing with a
>> >>problem;
>> >>Namely, the variable minder is defined as hp<h and gets the value 1 if
>> >>this
>> >>is the case, gets value 0 if this is not the case for each year. Now
>>when
>> >>I
>> >>list the variables I see value 0 is attached to a year even if there is
>>no
>> >>minder value associated with the year. For example
>> >> +-----------------------------------------------------------+
>> >> | resp96 y minder minder1 minder2 minder3 |
>> >> |-----------------------------------------------------------|
>> >> 1. | 701 1994 0 1 0 0 |
>> >> 2. | 701 1996 1 0 1 0 |
>> >> 3. | 1602 1994 . 1 0 0 |
>> >> 4. | 1602 1996 . 0 1 0 |
>> >> 5. | 1602 1998 . 0 0 1 |
>> >> |-----------------------------------------------------------|
>> >>
>> >>For resp96 1602, there is no minder variable present, but if you look
>>at
>> >>the
>> >>dummies there are values attached to them.
>> >>If I use them in a regression, then I get muticollinearity and
>> >>automatically
>> >>dropped by stata.
>> >>My excuses for the inconvienient results but I am stucked with this
>> >>problem
>> >>by days.
>> >>
>> >>Thank you in advance,
>> >>d
>> >>
>> >>
>> >>
>> >> >From: "Scott Merryman" <[email protected]>
>> >> >Reply-To: [email protected]
>> >> >To: <[email protected]>
>> >> >Subject: RE: st: RE: Problem with generating time dummies in panel
>>data
>> >> >Date: Mon, 17 Jul 2006 08:19:45 -0500
>> >> >
>> >> >For year dummies I would try -tab year, gen(minder)-
>> >> >
>> >> >This will create three dummies callers (named minder1, minder2,
>>minder3
>> >> >corresponding to years 1994, 1996, and 1998).
>> >> >
>> >> >Scott
>> >> >
>> >> >
>> >> > > -----Original Message-----
>> >> > > From: [email protected] [mailto:owner-
>> >> > > [email protected]] On Behalf Of Daghan Yeldan
>> >> > > Sent: Monday, July 17, 2006 8:15 AM
>> >> > > To: [email protected]
>> >> > > Subject: RE: st: RE: Problem with generating time dummies in panel
>> >>data
>> >> > >
>> >> > > thnx for the advice. But I tried them all before I sent this
>>message.
>> >> >The
>> >> > > problem I get is when I do this,
>> >> > >
>> >> > > tab minder,g(min) it only creates two dummies instead of 3. I have
>>3
>> >> >years
>> >> > > of variables.
>> >> > > How can I solve this problem?
>> >> > > cheers,
>> >> > > d
>> >> >
>*
>* For searches and help try:
>* http://www.stata.com/support/faqs/res/findit.html
>* http://www.stata.com/support/statalist/faq
>* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
--
Ada Ma
Research Fellow
Health Economics Research Unit
University of Aberdeen, UK.
http://www.abdn.ac.uk/heru/
Tel: +44 (0) 1224 553863
Fax: +44 (0) 1224 550926
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/