Absolutely.
set obs 100
forval j = 1/10 {
gen v`j' = uniform()
}
P.S. what's SPSS?
Nick
[email protected]
[email protected]
> Does anyone know how to make up a "psudo "dataset in stata?
> By psudo data, I
> mean the data is not collected by survey. For example, I want
> to use data to
> test my theory. however, I do not have a dataset. I therefore
> assume some
> characteristics of certain population and "make up " a
> dataset according to ,y
> assumption. In spss, I can create a 10 variable 100 cases by
> the syntax below.
> However, how can I do the corresponding thing in Stata?
>
>
> * the following syntax create a file with 10 var and 100 cases.
> input program.
> vector v(10).
> loop cases=1 to 100.
> loop #i=1 to 10.
> compute v(#i)=uniform(1).
> end loop.
> end case.
> end loop.
> end file.
> end input program.
> exe.
*
* 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/