
12

As egen, group() maps to 1 ... whatever regardless of gaps, this might
in fact make things worse. What's wrong with year (or year MINUS
midpoint) for interpretability?
Nick
[hidden email]
Martin Weiss
Your code maps years in your dataset to integer numbers, and I am not
sure
that it gets you any closer to your final destination. So far, it has
not
hurt either...
natasha agarwal
I was trying to estimate a production function with an unbalanced
firmyear panel data and wanted to include a time trend. However I was
not sure if the time trend was created correctly.
egen t=group(year)
I was wondering if anyone could please tell me if this was correct?
*
* 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/


<>
You can just subtract the mean/median from your years to center the
variable:
*************
use http://www.statapress.com/data/r11/nlswork.dta, clear
su year, d
gen centeredyear=yearr(p50)
su centeredyear year
*************
HTH
Martin
Ursprüngliche Nachricht
Von: [hidden email]
[mailto: [hidden email]] Im Auftrag von natasha agarwal
Gesendet: Montag, 5. Juli 2010 13:38
An: [hidden email]
Betreff: Re: st: RE: RE: estimation with a time trend.
On Mon, Jul 5, 2010 at 11:03 AM, Nick Cox < [hidden email]> wrote:
> As egen, group() maps to 1 ... whatever regardless of gaps, this might
> in fact make things worse. What's wrong with year (or year MINUS
> midpoint) for interpretability?
I am afraid I did not understand "year (or year MINUS> midpoint)
for interpretability?"
Thanks
Natasha
> Nick
> [hidden email]
>
> Martin Weiss
>
> Your code maps years in your dataset to integer numbers, and I am not
> sure
> that it gets you any closer to your final destination. So far, it has
> not
> hurt either...
>
> natasha agarwal
>
> I was trying to estimate a production function with an unbalanced
> firmyear panel data and wanted to include a time trend. However I was
> not sure if the time trend was created correctly.
>
> egen t=group(year)
>
> I was wondering if anyone could please tell me if this was correct?
>
> *
> * 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/>
*
* 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/*
* 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/


Sorry; I meant
year (or year MINUS midpoint for interpretability)
For example, if you work with (year  2000) then intercepts have a clear
interpretation as "predicted value in 2000".
Nick
[hidden email]
natasha agarwal
On Mon, Jul 5, 2010 at 11:03 AM, Nick Cox < [hidden email]> wrote:
> As egen, group() maps to 1 ... whatever regardless of gaps, this
might
> in fact make things worse. What's wrong with year (or year MINUS
> midpoint) for interpretability?
I am afraid I did not understand "year (or year MINUS> midpoint)
for interpretability?"
Martin Weiss
> Your code maps years in your dataset to integer numbers, and I am not
> sure
> that it gets you any closer to your final destination. So far, it has
> not
> hurt either...
>
> natasha agarwal
>
> I was trying to estimate a production function with an unbalanced
> firmyear panel data and wanted to include a time trend. However I was
> not sure if the time trend was created correctly.
>
> egen t=group(year)
>
> I was wondering if anyone could please tell me if this was correct?
>
*
* 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/


 On Mon, 5/7/10, natasha agarwal wrote:
> I am afraid I did not understand "year (or year
> MINUS> midpoint) for interpretability?"
Say you have a variable representing year of birth
ranging between 1910 and 1980. I would then usually
have a line like this in my dofile:
gen c_year = year  1910
Afterwards I would use c_year instead of year. In
this case "midpoint" is 1910, and makes sure that
your new variable is shifted to the left such that
it has the value zero in 1910. This makes sure
that the baseline in your models refer to a point
at the beginning of your observed period. This is
particularly important if you include interactions
or if you care about the constant (e.g. in a random
effects model)
Hope this helps,
Maarten

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
*
* 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/


<>
Then I do not understand the word "midpoint". I thought you meant something
like the mean or median?
HTH
Martin
Ursprüngliche Nachricht
Von: [hidden email]
[mailto: [hidden email]] Im Auftrag von Nick Cox
Gesendet: Montag, 5. Juli 2010 14:14
An: [hidden email]
Betreff: RE: st: RE: RE: estimation with a time trend.
Sorry; I meant
year (or year MINUS midpoint for interpretability)
For example, if you work with (year  2000) then intercepts have a clear
interpretation as "predicted value in 2000".
Nick
[hidden email]
natasha agarwal
On Mon, Jul 5, 2010 at 11:03 AM, Nick Cox < [hidden email]> wrote:
> As egen, group() maps to 1 ... whatever regardless of gaps, this
might
> in fact make things worse. What's wrong with year (or year MINUS
> midpoint) for interpretability?
I am afraid I did not understand "year (or year MINUS> midpoint)
for interpretability?"
Martin Weiss
> Your code maps years in your dataset to integer numbers, and I am not
> sure
> that it gets you any closer to your final destination. So far, it has
> not
> hurt either...
>
> natasha agarwal
>
> I was trying to estimate a production function with an unbalanced
> firmyear panel data and wanted to include a time trend. However I was
> not sure if the time trend was created correctly.
>
> egen t=group(year)
>
> I was wondering if anyone could please tell me if this was correct?
>
*
* 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/*
* 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/


I just meant some convenient middle. In fact, it needn't absolutely be
within the range of the data. So, the word 'midpoint' is indeed not the
best one. 'Reference year' would be a better term if one were needed.
FWIW, I strongly support choosing some reference date that is simple
and/or makes scientific or substantive sense. That is important for not
only interpretability within a study but also interpretability across
studies.
There is no real virtue to using a mean or median for this purpose,
whatever their merits elsewhere.
Nick
[hidden email]
Martin Weiss
Then I do not understand the word "midpoint". I thought you meant
something
like the mean or median?
Nick Cox
Betreff: RE: st: RE: RE: estimation with a time trend.
Sorry; I meant
year (or year MINUS midpoint for interpretability)
For example, if you work with (year  2000) then intercepts have a clear
interpretation as "predicted value in 2000".
natasha agarwal
On Mon, Jul 5, 2010 at 11:03 AM, Nick Cox < [hidden email]> wrote:
> As egen, group() maps to 1 ... whatever regardless of gaps, this
might
> in fact make things worse. What's wrong with year (or year MINUS
> midpoint) for interpretability?
I am afraid I did not understand "year (or year MINUS> midpoint)
for interpretability?"
Martin Weiss
> Your code maps years in your dataset to integer numbers, and I am not
> sure
> that it gets you any closer to your final destination. So far, it has
> not
> hurt either...
>
> natasha agarwal
>
> I was trying to estimate a production function with an unbalanced
> firmyear panel data and wanted to include a time trend. However I was
> not sure if the time trend was created correctly.
>
> egen t=group(year)
>
> I was wondering if anyone could please tell me if this was correct?
*
* 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/


 On Mon, 5/7/10, Martin Weiss wrote:
> Then I do not understand the word "midpoint". I thought you
> meant something like the mean or median?
You want the value 0 to represent some meaningful point in time.
Most important is that it lies within the range of your data.
Which point you choose after that is more a matter of convenience:
If you choose the minimum then your baseline represents the
begining of your observed period, which is sometimes helpful
when writing up your results. ("In the begining we found XXX, and
as time progressed ...")
It is often nicer to think in "nice round numbers" (e.g. multiples
of 10), so you can move this baseline a bit to the right by
choosing "the next round number" (e.g. choose 1910 instead of 1907).
Data often tends to be sparse at the extreme ends of time, so
the minimum does represent a number within the observed period,
but the information about this period is often still very sparse.
Choosing some central value (mean, median), can for that reason
help the stability of some estimates in complex models.
You might be interested in one specific point in time, in which
case it makes sense to declare that point as 0.
 Maarten

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
*
* 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/


On Mon, Jul 5, 2010 at 1:14 PM, Maarten buis < [hidden email]> wrote:
>  On Mon, 5/7/10, natasha agarwal wrote:
>> I am afraid I did not understand "year (or year
>> MINUS> midpoint) for interpretability?"
>
> Say you have a variable representing year of birth
> ranging between 1910 and 1980. I would then usually
> have a line like this in my dofile:
>
> gen c_year = year  1910
>
> Afterwards I would use c_year instead of year. In
> this case "midpoint" is 1910, and makes sure that
> your new variable is shifted to the left such that
> it has the value zero in 1910. This makes sure
> that the baseline in your models refer to a point
> at the beginning of your observed period. This is
> particularly important if you include interactions
> or if you care about the constant (e.g. in a random
> effects model)
I am estimating the model with a within estimator. I thought that they
mean center the data anyways?
*
* 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/


On Mon, Jul 5, 2010 at 1:45 PM, natasha agarwal
< [hidden email]> wrote:
> On Mon, Jul 5, 2010 at 1:14 PM, Maarten buis < [hidden email]> wrote:
>>  On Mon, 5/7/10, natasha agarwal wrote:
>>> I am afraid I did not understand "year (or year
>>> MINUS> midpoint) for interpretability?"
>>
>> Say you have a variable representing year of birth
>> ranging between 1910 and 1980. I would then usually
>> have a line like this in my dofile:
>>
>> gen c_year = year  1910
>>
>> Afterwards I would use c_year instead of year. In
>> this case "midpoint" is 1910, and makes sure that
>> your new variable is shifted to the left such that
>> it has the value zero in 1910. This makes sure
>> that the baseline in your models refer to a point
>> at the beginning of your observed period. This is
>> particularly important if you include interactions
>> or if you care about the constant (e.g. in a random
>> effects model)
Can anyone please explain me why is this particularly important if you
include interactions??? and with interactions do you mean interaction
with the time?
Thanks
Natasha
*
* 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/


 On Mon, 5/7/10, natasha agarwal wrote:
> I am estimating the model with a within estimator. I
> thought that they mean center the data anyways?
It still matters if you include interactions with time.
Anyhow, if you believe that your variables are
centered anyhow, why would you want to use egen group()?
The only use it could have it to center your data at
some meaningful point, but as Nick already mentioned
the way it does that is dangerous, and the alternative
method of just subtracting some meaningful point in time
is both much safer and easier.
 Maarten

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
*
* 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/


Your original question was
"I was trying to estimate a production function with an unbalanced
firmyear panel data and wanted to include a time trend. However I was
not sure if the time trend was created correctly.
egen t=group(year)
I was wondering if anyone could please tell me if this was correct?"
Who knows whether the commands you are using "mean center" the data if
you do not tell us what they are?
Nick
[hidden email]
natasha agarwal
On Mon, Jul 5, 2010 at 1:14 PM, Maarten buis < [hidden email]>
wrote:
>  On Mon, 5/7/10, natasha agarwal wrote:
>> I am afraid I did not understand "year (or year
>> MINUS> midpoint) for interpretability?"
>
> Say you have a variable representing year of birth
> ranging between 1910 and 1980. I would then usually
> have a line like this in my dofile:
>
> gen c_year = year  1910
>
> Afterwards I would use c_year instead of year. In
> this case "midpoint" is 1910, and makes sure that
> your new variable is shifted to the left such that
> it has the value zero in 1910. This makes sure
> that the baseline in your models refer to a point
> at the beginning of your observed period. This is
> particularly important if you include interactions
> or if you care about the constant (e.g. in a random
> effects model)
I am estimating the model with a within estimator. I thought that they
mean center the data anyways?
*
* 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/


On Mon, Jul 5, 2010 at 2:01 PM, Nick Cox < [hidden email]> wrote:
> Your original question was
>
> "I was trying to estimate a production function with an unbalanced
> firmyear panel data and wanted to include a time trend. However I was
> not sure if the time trend was created correctly.
>
> egen t=group(year)
>
> I was wondering if anyone could please tell me if this was correct?"
>
> Who knows whether the commands you are using "mean center" the data if
> you do not tell us what they are?
I am sorry about this.
I issue the following line of commands:
egen t=group(year)
xtreg lnrval lnk lnw lnvfdi t, fe vce(robust)
Thanks
Natasha
> Nick
> [hidden email]
>
> natasha agarwal
>
> On Mon, Jul 5, 2010 at 1:14 PM, Maarten buis < [hidden email]>
> wrote:
>
>>  On Mon, 5/7/10, natasha agarwal wrote:
>>> I am afraid I did not understand "year (or year
>>> MINUS> midpoint) for interpretability?"
>>
>> Say you have a variable representing year of birth
>> ranging between 1910 and 1980. I would then usually
>> have a line like this in my dofile:
>>
>> gen c_year = year  1910
>>
>> Afterwards I would use c_year instead of year. In
>> this case "midpoint" is 1910, and makes sure that
>> your new variable is shifted to the left such that
>> it has the value zero in 1910. This makes sure
>> that the baseline in your models refer to a point
>> at the beginning of your observed period. This is
>> particularly important if you include interactions
>> or if you care about the constant (e.g. in a random
>> effects model)
>
> I am estimating the model with a within estimator. I thought that they
> mean center the data anyways?
>
>
> *
> * 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/>
*
* 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/


<>
The coeff for "t" will stay the same, then, no matter how you "center" it:
*************
use http://www.statapress.com/data/r11/nlswork, clear
egen t=group(year)
xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
replace t=t7
xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
replace t=t3
xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
*************
HTH
Martin
Ursprüngliche Nachricht
Von: [hidden email]
[mailto: [hidden email]] Im Auftrag von natasha agarwal
Gesendet: Montag, 5. Juli 2010 15:06
An: [hidden email]
Betreff: Re: st: RE: RE: estimation with a time trend.
On Mon, Jul 5, 2010 at 2:01 PM, Nick Cox < [hidden email]> wrote:
> Your original question was
>
> "I was trying to estimate a production function with an unbalanced
> firmyear panel data and wanted to include a time trend. However I was
> not sure if the time trend was created correctly.
>
> egen t=group(year)
>
> I was wondering if anyone could please tell me if this was correct?"
>
> Who knows whether the commands you are using "mean center" the data if
> you do not tell us what they are?
I am sorry about this.
I issue the following line of commands:
egen t=group(year)
xtreg lnrval lnk lnw lnvfdi t, fe vce(robust)
Thanks
Natasha
> Nick
> [hidden email]
>
> natasha agarwal
>
> On Mon, Jul 5, 2010 at 1:14 PM, Maarten buis < [hidden email]>
> wrote:
>
>>  On Mon, 5/7/10, natasha agarwal wrote:
>>> I am afraid I did not understand "year (or year
>>> MINUS> midpoint) for interpretability?"
>>
>> Say you have a variable representing year of birth
>> ranging between 1910 and 1980. I would then usually
>> have a line like this in my dofile:
>>
>> gen c_year = year  1910
>>
>> Afterwards I would use c_year instead of year. In
>> this case "midpoint" is 1910, and makes sure that
>> your new variable is shifted to the left such that
>> it has the value zero in 1910. This makes sure
>> that the baseline in your models refer to a point
>> at the beginning of your observed period. This is
>> particularly important if you include interactions
>> or if you care about the constant (e.g. in a random
>> effects model)
>
> I am estimating the model with a within estimator. I thought that they
> mean center the data anyways?
>
>
> *
> * 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/>
*
* 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/*
* 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/


On Mon, Jul 5, 2010 at 2:22 PM, Martin Weiss < [hidden email]> wrote:
>
> <>
>
> The coeff for "t" will stay the same, then, no matter how you "center" it:
>
> *************
> use http://www.statapress.com/data/r11/nlswork, clear
> egen t=group(year)
> xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
> replace t=t7
> xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
> replace t=t3
> xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
> *************
I tried this and as you said the coefficient stays the same. I was
wondering then what is the point in doing this then?
Thanks
Natasha
> HTH
> Martin
>
>
> Ursprüngliche Nachricht
> Von: [hidden email]
> [mailto: [hidden email]] Im Auftrag von natasha agarwal
> Gesendet: Montag, 5. Juli 2010 15:06
> An: [hidden email]
> Betreff: Re: st: RE: RE: estimation with a time trend.
>
> On Mon, Jul 5, 2010 at 2:01 PM, Nick Cox < [hidden email]> wrote:
>> Your original question was
>>
>> "I was trying to estimate a production function with an unbalanced
>> firmyear panel data and wanted to include a time trend. However I was
>> not sure if the time trend was created correctly.
>>
>> egen t=group(year)
>>
>> I was wondering if anyone could please tell me if this was correct?"
>>
>> Who knows whether the commands you are using "mean center" the data if
>> you do not tell us what they are?
>
> I am sorry about this.
>
> I issue the following line of commands:
>
> egen t=group(year)
> xtreg lnrval lnk lnw lnvfdi t, fe vce(robust)
>
> Thanks
> Natasha
>
>
>
>
>
>> Nick
>> [hidden email]
>>
>> natasha agarwal
>>
>> On Mon, Jul 5, 2010 at 1:14 PM, Maarten buis < [hidden email]>
>> wrote:
>>
>>>  On Mon, 5/7/10, natasha agarwal wrote:
>>>> I am afraid I did not understand "year (or year
>>>> MINUS> midpoint) for interpretability?"
>>>
>>> Say you have a variable representing year of birth
>>> ranging between 1910 and 1980. I would then usually
>>> have a line like this in my dofile:
>>>
>>> gen c_year = year  1910
>>>
>>> Afterwards I would use c_year instead of year. In
>>> this case "midpoint" is 1910, and makes sure that
>>> your new variable is shifted to the left such that
>>> it has the value zero in 1910. This makes sure
>>> that the baseline in your models refer to a point
>>> at the beginning of your observed period. This is
>>> particularly important if you include interactions
>>> or if you care about the constant (e.g. in a random
>>> effects model)
>>
>> I am estimating the model with a within estimator. I thought that they
>> mean center the data anyways?
>>
>>
>> *
>> * 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/>>
>
> *
> * 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/>
>
> *
> * 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/>
*
* 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/


Good question, but clearly
1. Most postings in the thread, and the specific suggestions you received, were sent _before_ you made it clear that you were using xtreg.
2. If the question is, how best to estimate a time trend, with nothing else said, then translating time to a sensible origin remains good general advice.
Nick
[hidden email]
natasha agarwal
On Mon, Jul 5, 2010 at 2:22 PM, Martin Weiss < [hidden email]> wrote:
>
> <>
>
> The coeff for "t" will stay the same, then, no matter how you "center" it:
>
> *************
> use http://www.statapress.com/data/r11/nlswork, clear
> egen t=group(year)
> xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
> replace t=t7
> xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
> replace t=t3
> xtreg ln_wage wks_work tenure south nev_mar age t, fe vce(robust)
> *************
I tried this and as you said the coefficient stays the same. I was
wondering then what is the point in doing this then?
natasha agarwal
>
> On Mon, Jul 5, 2010 at 2:01 PM, Nick Cox < [hidden email]> wrote:
>> Your original question was
>>
>> "I was trying to estimate a production function with an unbalanced
>> firmyear panel data and wanted to include a time trend. However I was
>> not sure if the time trend was created correctly.
>>
>> egen t=group(year)
>>
>> I was wondering if anyone could please tell me if this was correct?"
>>
>> Who knows whether the commands you are using "mean center" the data if
>> you do not tell us what they are?
>
> I am sorry about this.
>
> I issue the following line of commands:
>
> egen t=group(year)
> xtreg lnrval lnk lnw lnvfdi t, fe vce(robust)
>> natasha agarwal
>>
>> On Mon, Jul 5, 2010 at 1:14 PM, Maarten buis < [hidden email]>
>> wrote:
>>
>>>  On Mon, 5/7/10, natasha agarwal wrote:
>>>> I am afraid I did not understand "year (or year
>>>> MINUS> midpoint) for interpretability?"
>>>
>>> Say you have a variable representing year of birth
>>> ranging between 1910 and 1980. I would then usually
>>> have a line like this in my dofile:
>>>
>>> gen c_year = year  1910
>>>
>>> Afterwards I would use c_year instead of year. In
>>> this case "midpoint" is 1910, and makes sure that
>>> your new variable is shifted to the left such that
>>> it has the value zero in 1910. This makes sure
>>> that the baseline in your models refer to a point
>>> at the beginning of your observed period. This is
>>> particularly important if you include interactions
>>> or if you care about the constant (e.g. in a random
>>> effects model)
>>
>> I am estimating the model with a within estimator. I thought that they
>> mean center the data anyways?
*
* 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/


 On Mon, 5/7/10, natasha agarwal wrote:
> I was wondering then what is the point in doing this then?
This thread is getting very confused. Let me try
to reconstruct the argument:
You asked about estimating a time trend by first
creating a variable using egen group(). Now
we had to guess why you would want to do that.
We guessed that you wanted to make sure that your
time has the value 0 at some a meaningful point
in time. Which in general is good, though it
doesn't matter if you used a fixed effects model
without interactions (it does matter if you
include interactions with time).
Even though making sure that time has a meaningful
0 value is a good idea, using egen group() for
that is a very dangerous idea, and you should never
do that. Instead you should just substract some
meaningful 'midpoint' or 'reference year'.
So, to clear up this thread:
Why did you want to use egen group()?
 Maarten

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
*
* 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/


I am really really sorry for this confusion what I have created here.
I wanted to introduce a time trend in my estimation where my years go
from 20012005. I was estimating an augmented production function
using an unbalanced panel data using a within estimator.
With time trend I mean:
panel identifier year time trend
1 2001 1
1 2002 2
1 2003 3
1 2004 4
1 2005 5
2 2001 1
2 2002 2
The only way I knew how to do it was to use the egen group
command.That is why I wanted to do the egengroup command.
However I was not confident whether the creation of the same was
correct because of the unbalanced nature of the data.
for the purpose of estimating my equation I issue the following command:
egen t=group(year)
xtreg lnrval lnk lnw lnvfdi t, fe vce(robust)
Thanks
Natasha
On Mon, Jul 5, 2010 at 3:52 PM, Maarten buis < [hidden email]> wrote:
>  On Mon, 5/7/10, natasha agarwal wrote:
>> I was wondering then what is the point in doing this then?
>
>
> This thread is getting very confused. Let me try
> to reconstruct the argument:
>
> You asked about estimating a time trend by first
> creating a variable using egen group(). Now
> we had to guess why you would want to do that.
> We guessed that you wanted to make sure that your
> time has the value 0 at some a meaningful point
> in time. Which in general is good, though it
> doesn't matter if you used a fixed effects model
> without interactions (it does matter if you
> include interactions with time).
>
> Even though making sure that time has a meaningful
> 0 value is a good idea, using egen group() for
> that is a very dangerous idea, and you should never
> do that. Instead you should just substract some
> meaningful 'midpoint' or 'reference year'.
>
> So, to clear up this thread:
> Why did you want to use egen group()?
>
>  Maarten
>
> 
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://www.maartenbuis.nl> 
>
>
>
>
> *
> * 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/>
*
* 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/

12
