Statalist


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

st: regression on variable over time to get mean autoregressive parameter


From   "Fabian Brenner" <Fabian.Brenner@gmx.de>
To   statalist@hsphsun2.harvard.edu
Subject   st: regression on variable over time to get mean autoregressive parameter
Date   Tue, 07 Oct 2008 22:24:40 +0200

Dear all:

I have observations for different years ("year" 1990-2000) for bacterias ("bacteria_name", eg.ATT, GLY, ...) and the number of the bacteria population ("number").

Now I would like to run the following regression: number (year+1) = w0 + w1 * number (year) + e for every two consecutive years (whenever there are values for at least two consecutive years for a given bacteria_name) to get mean estimates of the parameters w0 and w1 (w1 should reflect the fade rate of the bacteria population).

I hope someone has a solution or can give me a hint to solve this problem. I tried it many times but I did not found a solution (especially how to get the mean of the different regressions and on how to refer to the last observation)..Thanks a lot.

Fabian Brenner

My data looks like the following (using -sort bacteria_name year-)
bacteria_name        year         number
ATT                    1990           10
ATT                    1991             3
GLY                    1993             4
SIS                    1992           99
SIS                    1993           19
SIS                    1994             8 
X                       1995             2
.


-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
*
*   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   |   What's new   |   Site index