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

From |
"Austin Nichols" <[email protected]> |

To |
[email protected] |

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

Date |
Tue, 7 Oct 2008 18:23:18 -0400 |

Fabian Brenner <[email protected]>: Try g id=group(bacteria_name) tsset id year reg number l.number but you might want a log-log specification: g lnn=ln(number) reg lnn l.lnn On Tue, Oct 7, 2008 at 4:24 PM, Fabian Brenner <[email protected]> wrote: > 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 > . * * 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/

**References**:**st: regression on variable over time to get mean autoregressive parameter***From:*"Fabian Brenner" <[email protected]>

- Prev by Date:
**Re: st: RE: Data consistency heuristics** - Next by Date:
**Re: st: RE: Data consistency heuristics** - Previous by thread:
**st: RE: regression on variable over time to get mean autoregressive parameter** - Next by thread:
**st: Data consistency heuristics** - Index(es):

© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |