Statalist


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

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


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: regression on variable over time to get mean autoregressive parameter
Date   Tue, 7 Oct 2008 23:50:16 +0200

" especially how to get the mean of the different regressions and on how to
refer to the last observation":

Not quite sure why you want a mean, but if you want to record results from
multiple regression, either look at - h postfile- or -estimates store-

Referring to the last observation is as easy as the qualifier -in `=_N'-


HTH
Martin

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Fabian Brenner
Sent: Tuesday, October 07, 2008 10:25 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: regression on variable over time to get mean autoregressive
parameter

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/


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