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

st: Mata: I/O question

From   "Abdel Rahmen El Lahga" <>
Subject   st: Mata: I/O question
Date   Thu, 25 Oct 2007 23:05:03 +0200

Under Stata 9.2 I would like to perform Monte Carlo experiment my code
looks like
*============Begion code
mc = 1
while(mc <=n_mc) {
stmt1... stmt2...
results=a,b,c  // my estimation result as rowvector
*===========End code
I would like to accumulate each iteration results in a file (Either
Stata or ascii ).
So that, at the end of my monte carlo loop,  I can recuperate a file
with 1000 lines of estimation results.
I tried the following inside my loop
fwrite(fh,  m)
BUT mata return "fwrite():  3204  matrix found where scalar required"
Is there any method to write my results in a file ideally with
variable names (a b c ) in the first line

AbdelRahmen El Lahga
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index