How can I import a data file and run regression in Maxima?
Subject: How can I import a data file and run regression in Maxima?
From: Milan Lukic
Date: Mon, 31 Jul 2006 21:25:31 -0700
* Robert Dodier <robert.dodier at gmail.com> [2006-07-31 09:59:19 -0600]:
> On 7/29/06, J. Li <lij53 at univmail.cis.mcmaster.ca> wrote:
>
> > I have been trying to find a way to import a simple data file in text
> > format and run a simple regression with the data in Maxima. Are there
> > any commands or packages designed for this purpose?
>
> There are functions in the package numericalio to read a matrix
> (and some other kinds of objects). ? numericalio should find some
> documentation (in Maxima 5.9.3 and later). The package name is
> a misnomer -- actually the functions in that package can read
> non-numeric atoms (symbols and strings) as well as numbers.
> An input file is a plain text file with elements separated by spaces
> (default), commas, or vertical bars (pipe symbol).
>
> E.g.
> load (numericalio);
> A : read_matrix ("path/to/mymatrix.data");
> /* now do something with matrix A */
>
> HTH
> Robert Dodier
Once you import your data, you can load the lsquares.mac package (in
Maxima's /share/contrib directory) to do linear regression
"? lsquares" should give you a pretty good idea how to use it.
HTH
Milan Lukic
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
--