You have more than you need in your code.
local nvar 10
set obs 25
forvalues i=1/`nvar'{
gen coef`i' = uniform() /* You original code had a space before the () */
}
And then simply -save filename- gives you what you want.
..Frank
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Rajiv Mallick
Sent: Tuesday, January 14, 2003 3:44 PM
To: [email protected]
Subject: st: forv
I run the following code and get ""uniform not found r(111);"" error
message. Am I missing something?
Also, how can I save values of coef`i'-`nvar' in a Stata file?
Thank you
Rajiv
code:
-------------------
local nvar 10
set obs 25
forvalues i=1/`nvar'{
gen coef`i' = uniform ()
gen n = _n
}
clear
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*
http://join.msn.com/?page=features/virus
*
* 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/
*
* 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/