On Tue, 21 Jun 2022, atecon wrote:
And here another version using a matrix which can be stored as a csv
file:
<hansl>
set verbose off
clear
scalar N_COLS = 5
scalar N_ROWS = 10
matrix random = mnormal(N_ROWS, N_COLS)
mwrite(random, "dataset_with_random_numbers.csv")
open dataset_with_random_numbers.csv
</hansl>
The possible variations on this theme are nearly endless: for example, you
cans save a matrix as a dataset as follows:
<hansl>
set verbose off
clear
scalar N_COLS = 5
scalar N_ROWS = 10
matrix random = mnormal(N_ROWS, N_COLS)
store random.gdt --matrix=random
open random.gdt
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------