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

# Re: st: Coefficients resulting from Cross-Sectional Regressions

 From Nick Cox To statalist@hsphsun2.harvard.edu Subject Re: st: Coefficients resulting from Cross-Sectional Regressions Date Fri, 6 Apr 2012 19:42:52 +0100

I now see what that means. Sorry, but I haven't progressed beyond my
impression that you want regressions each based on one data point.
Others may be able to help.

2012/4/6 Fabian Schönenberger <fabian.schoenenberger@gmail.com>:
> I do not have the same number of yearly observations for each firm.
> According to other studies from journals this is true for many empirical
> investigations.
>
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nick Cox
> Gesendet: Freitag, 6. April 2012 19:49
> An: statalist@hsphsun2.harvard.edu
> Betreff: Re: st: Coefficients resulting from Cross-Sectional Regressions
>
> What does "different amounts of yearly observations" mean?
>
> Perhaps you seek -rolling-.
>
> I'm not an economist, or at least no longer studying it, so economists and
> econometricians on the list may have a better sense of what you want.
>
> Nick
>
> 2012/4/6 Fabian Schönenberger <fabian.schoenenberger@gmail.com>:
>> I try to explain the research idea. Based on the expression yid,t = a
>> + bid,t*xid,t + e I am looking for bid,t, where id = firm and t = firm
> years.
>> Y = lnebit, x = lnsales; for every firm on different amounts of yearly
>> observations. The coefficient b measures the sensitivity of ebit
>> resulting from business activity. I will further analyse the
>> coefficients and try to find out what financial policies (for instance
>> equity-ratio) this dependence creates. In order to do that I (think I)
>> need b for each individual for every point in time. Clustered b (on
>> id) are not sufficient to reuse the coefficients for regressions based
>> on yearly observations. One way would be to merge id with t, in order
>> to get yearly coefficients. Doesn't this make sense?
>>
>> Fabian
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: owner-statalist@hsphsun2.harvard.edu
>> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nick Cox
>> Gesendet: Freitag, 6. April 2012 18:39
>> An: statalist@hsphsun2.harvard.edu
>> Betreff: Re: st: Coefficients resulting from Cross-Sectional
>> Regressions
>>
>> That sounds like a series of regressions based on precisely one data
>> point each.
>>
>> And that makes no sense to me.
>>
>> Nick
>>
>> 2012/4/6 Fabian Schönenberger <fabian.schoenenberger@gmail.com>:
>>> Then I am on the wrong track anyway. Which is the right formula to do
>>> panel regressions with ID and t, for every single ID on each point in
>>> time in order to get coefficients individualised by ID and t?
>>>
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: owner-statalist@hsphsun2.harvard.edu
>>> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Nick Cox
>>> Gesendet: Freitag, 6. April 2012 17:20
>>> An: statalist@hsphsun2.harvard.edu
>>> Betreff: Re: st: Coefficients resulting from Cross-Sectional
>>> Regressions
>>>
>>> statsby _b, by(gvkey) saving(coefsales): regress lnebit lnsales
>>>
>>> conducts separate regressions for each firm. The coefficient does not
>>> differ by year, as different years are pooled in each regression.
>>>
>>> You can put the results of -statsby- back in the original dataset by
>>> using -merge-.
>>>
>>> Alternatively,
>>>
>>> egen group = group(gvkey)
>>> gen coeff = .
>>> su group, meanonly
>>>
>>> qui forval i = 1/`r(max)'  {
>>>          regress lnebit lnsales if group == `i'
>>>          replace coeff = _b[lnsales] if group == `i'
>>> }
>>>
>>> Nick
>>>
>>> 2012/4/6 Fabian Schönenberger <fabian.schoenenberger@gmail.com>:
>>>
>>>> I am an absolute beginner in Stata and face now some challenges with
>>>> generating regression coefficients as new variable for further
>>> computations.
>>>> I use tsset id t to conduct cross-sectional regressions. ID is gvkey
>>>> which identifies firm (about 4’000 firms in my sample), t is fyear
>>>> which identifies the specific year (ranging from 1984 to 2010). What
>>>> I am looking for is the function to run cross-sectional regressions
>>>> and generating coefficients as new variable to my list of variables.
>>>> In other words: I am looking for b, specified for each ID for every
>>>> t (yi,t =
>>> ai + bi,t*xi,t).
>>>> I have tried the following:
>>>> statsby _b, by(gvkey) saving(coefsales): regress lnebit lnsales
>>>> However, two problems arise. First, the major problem, I only get
>>>> coefficients for gvkey, but not specified for every point in time
>> (fyear).
>>>> Second, the coefsales are safed in a new file, but I would prefer a
>>>> new variable in my list of variable.
>>>> Any suggestions to solve the two problems are highly appreciated.
>>
>> *
>> *   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/

*
*   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/