Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to import SAS dataset into Matlab?

589 views
Skip to first unread message

Mei Zhao

unread,
Sep 18, 2002, 3:58:44 PM9/18/02
to
Hi, all,


I need to run SURE estimation in Matlab, after I massage the dataset
in SAS. Can anybody tell me how to transfer the SAS dataset
(.sas7bdat) into the Matlab?


thanks, mei

Scott Seidman

unread,
Sep 18, 2002, 4:47:23 PM9/18/02
to
"Mei Zhao" <tsing...@yahoo.com> wrote in news:eeb261a.-1
@WebX.raydaftYaTP:

Without knowing too much about SAS, I can recommend how I would approach
the problem.

1- Is there a good document defining the format of a SAS file? If there
is, the problem is very solvable, but will take some work

2- Does SAS have and export function? If it does, export the data into
some format that matlab can read. My favorite format for this type of
stuff is a lotus file, with extension wk1. Many programs allow export
into this format, and matlab reads it easily with the wk1read command.

3- Copy and paste the SAS data into whatever spreadsheet you like. Then,
save it as a WK1 file, or use ExcelLink if you have it, or use the
ActiveX commands that people like to talk about in this newsgroup

Choice 2 is the quickest and easiest by far. Choice 3 is probably best if
you need to modify the file from matlab, and choice 1 will work forever,
and you don't even need SAS running on your computer to use it!

--
Scott
Reverse first field of address to reply

Mei Zhao

unread,
Sep 18, 2002, 5:57:18 PM9/18/02
to
Dear Scott,


thank you so much for explaining the way to solve the problem in such
a
great detail. It worked by approach 2. My dataset is too big to be
copied to any sheet by method 3.


Best, mei


Scott Seidman wrote:
>
>

0 new messages