[Limdep Nlogit List] Read matrix / sample statistics of matrix columns
Steven Yen
syen at utk.edu
Fri Nov 5 08:01:14 EST 2010
Dear
Page R12-44 of the Reference Guide suggests a way to read a matrix as
a data file. I could not read a matrix properly; see error message below.
What I need is to calculate sample means and standard deviations for
each column of a matrix. Is there a convenient way to do this? Thanks.
----
--> calc ;nr=5 ;nc=3 $
--> matrix ;list ;myx=rndm(nr,nc) $
Matrix MYX has 5 rows and 3 columns.
1 2 3
+-------------+-------------+-------------+
1| -.10830 .97037 .22962
2| -.71564 .95221 -1.13377
3| -.49604 -.24165 -.27317
4| .50904 -.98409 -2.31595
5| -.14872 -1.35394 1.01877
+-------------+-------------+-------------+
--> read ;rows=10 ;cols=5 ;matrix=myx $
Error 9: READ - error or end of file occurs while reading data set.
Error 327: Closing command file to prevent reading data as command
Steven T. Yen
http://web.utk.edu/~syen/
Check out our postdoc opening at:
http://web.utk.edu/~syen/postdoc.html
More information about the Limdep
mailing list