You could also create a matrix and set its elements to the results you
wanted. One column for example would hold the betas and the other column
would hold the standard errors. This can be handy for passing to subsequent
commands. If you want several outputs of different dimension, though--a
scalar test statistic and a vector of coefficients, say--list() would work
better.
John-Paul Ferguson
PhD Candidate, Economic Sociology
MIT Sloan School of Management
50 Memorial Drive, E52-533
Cambridge, MA 02142
http://web.mit.edu/jpferg/www
617.253.3940 (w)
617.549.8482 (c)
On Tue, Feb 10, 2009 at 5:12 PM, Jennifer Brea <brea at fas.harvard.edu> wrote:
You can use list() to return multiple outputs.
Thomas Sander wrote:
Kris --
Many thanks.
Have you or other had experience in R with an error message on running a
function that says
............: multi-argument returns are deprecated
I've written an OLS function that is returning three outputs (coeff,
sigmahatsq, u). Is that illegal in R? Do I need to write three separate OLS
functions: one that returns the Betas, one that returns sigma-hat squared
and one that returns u?
Many thanks.
Best.
Tom
------------------------------
_______________________________________________
gov2001-l mailing listgov2001-l at
lists.fas.harvard.eduhttp://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
--
Jennifer Brea
Ph.D Student
Department of Government
Harvard University
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l