Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Trend


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: Re: Trend
Date   Thu, 9 Jan 2003 06:38:58 -0600

----- Original Message ----- 
From: "Chau Tak Wai" <[email protected]>
To: <[email protected]>
Sent: Thursday, January 09, 2003 4:57 AM
Subject: st: Trend


> Could anyone tell me how can we create linear time trend in STATA
> directly?
> 
> Also, how can I refer to a particular cell in the dataset? Say variable
> x, 5th observation?
> 
> Thank you very much!

For a linear trend:
gen trend = _n

To refer to the 5th observation use explicit subscripting:
x[5]

See [U] 16.7

I hope this helps,
Scott


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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