Re: [R] how to obtain lm statistics for multiple subsets

2009-06-15 Thread Gabor Grothendieck
Check out: http://tolstoy.newcastle.edu.au/R/e2/help/07/05/17714.html On Mon, Jun 15, 2009 at 9:26 AM, Cecilia Carmo wrote: > Hi everyone, my data is in a dataframe similar to this but with more firms, > more industries, more years and variables that correspond to financial > information: > >> fir

[R] how to obtain lm statistics for multiple subsets

2009-06-15 Thread Cecilia Carmo
Hi everyone, my data is in a dataframe similar to this but with more firms, more industries, more years and variables that correspond to financial information: firm<-c(rep(1,4),rep(2,4),rep(3,4),rep(4,4)) year<-c(rep(2000:2003,4)) industry<-c(rep(10,4),rep(20,4),rep(10,4),rep(30,4)) X1<-c(10,1