Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: stata to matlab
Mario Veneziani <email@example.com>
Re: st: stata to matlab
Sun, 15 Apr 2012 14:46:49 +0200
I hope this mine finds you well indeed.
Unfortunately, I will not be able to respond to your query in full but
I am able to give you a couple of preliminary tips you might find
useful in preparing your dataset for import in Matlab if anybody else
chimes in with additional suggestions.
First of all, I am aware that Matlab does not accept datafiles
containing variables stored as strings. It imports only numeric text
files. Therefore, if your Stata file contains string variables you
have to drop them before attempting to go to Matlab.
Second of all, it is my understanding that Matlab treats the name of
the variables (the columns of the matrix of data it imports) quite
differently from STATA. It seems to me that you might need to let
Matlab know the name of the columns (or of the variables) through
either a variable storing the other variables' names and/or through a
different text file with names only.
Having said that, I believe the best strategy to convert the datafile
from Stata to Matlab is using Stattransfer which will protect you from
"unusual" behaviours of both Stata and Matlab in the export/import
procedure (i.e., the addition of hidden characters and their ensuing
reading as empty columns). Please note that converting a 1 GB Stata
file into a Matlab one might be highly intensive computationally, so
either use a powerful computer or exercise your patience. It remains
to be seen then whether Matlab is like Stata which adds memory to
accommodate very large datasets. Unfortunately, I never got to verify
this information myself.
I hope this helps you, somewhat!
Il 15 aprile 2012 04:59, Rui Zeng <firstname.lastname@example.org> ha scritto:
> Dear Statalist,
> Is is possible to read a stata file of size of one gigabyte into matlab? If so, how can I do that? thanks!
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
Istituto di Economia Agroalimentare
Università Cattolica del Sacro Cuore
* For searches and help try: