help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new to octave, confused about load(), dlmread et cetera


From: Justin Cress
Subject: Re: new to octave, confused about load(), dlmread et cetera
Date: Tue, 31 Aug 2010 12:15:04 -0400

thanks for all the responses everyone, and, I think the general theme is correct, I was trying to use octave too much like stata... 

So, if I don't know exactly which order the columns are in (in the data) is there an easy way to let 

Y = load ( .. args ..)    be a Y var  

and grab a matrix of X vars like 

X = load ( ... args ..)    

I guess my question is, if i just wanted to do basic OLS (or something similar) in octave, what's the general approach?

On Tue, Aug 31, 2010 at 2:15 AM, forkandwait <address@hidden> wrote:
justin.cress <boywonder410 <at> gmail.com> writes:


> What i'd like to be able to do is load a bunch of column vectors from a csv
> or text file (created by stata) and have octave grab the headers as variable
> names.

A matrix doesn't have header names, hence dlmread etc won't work with headers.
There is nothing with header names native to matlab/ octave, really.  I would
try to work with the matrix without header names, just remember what each column
means.

What you want (if you want it to look like a statistics language) is to convert
each column into a struct field, and have a "struct array".  The problem is that
 very few functions work with this data structure, and you will have to convert
it into a matrix in order to do tabulations or whatever.  I don't think there is
a function to read in data like this either.

My hunch is that you are trying to make octave/ matlab behave like
stata/R/sas/etc, and octave doesn't really do that well.

That may not be much help, but maybe if share the particular application someone
can help you do it more idiomatically (idiomatic to octave, anyway).

_______________________________________________
Help-octave mailing list
address@hidden
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]