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