[R-SIG-Finance] Some ANOVA and data matrix basics... please help

Brian G. Peterson brian at braverock.com
Wed Oct 11 12:59:22 CEST 2006


On Wednesday 11 October 2006 05:33, Jan-Paul Roodbol wrote:
> I want to do the ANOVA test for all 20 variables
> For each month individually, as well as for the
> average For 9 classification systems

One online reference that looks particularly relevant to your query is:
"Practical Regression and Anova in R" by Julian J. Faraway, available 
here:
http://www.stat.lsa.umich.edu/~faraway/book/pra.pdf
Or, his updated book
"Linear Models with R"
http://www.stat.lsa.umich.edu/~faraway/LMR/
which I use regularly as a reference.

Your questions also contain elements of "how do I do simple things in R" 
that would be covered by any of the introductory R/S texts.

> How do I code this so that it automatically reads a
> different column, and uses a different classification
> system.

I assume with a set of nested loops that vary the indices.

> Also, how do I store the output in a matrix

probably by using c(), cbind(), and rbind() in some combination to collect 
your results.

Regards,

   - Brian



More information about the R-SIG-Finance mailing list