Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: local variables into observations


From   [email protected]
To   [email protected]
Subject   st: local variables into observations
Date   Wed, 2 Apr 2008 12:32:14 -0300 (BRT)

Try this:


set obs 1
gene age = `age'
gene gender = `gender'
gene education = `14'


you can also create a loop if you have several locals such as age1 age2
age...etc..

Let me know if it is not exactly what you are looking for.

Cheers!

Tiago

---------------------------

If I have a set of local variable that I want to make an observation
with how do I do this?
For example
local age = 30
local gender = 1
local education = 14

how do I make(add) this into an observation with the corresponding
variable names and values.

-- 
Thanks
Vincent Davis
Aspen Tech Pro
720-273-2219


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