[R] lmList and lapply(... lm) different std. errors

2010-12-15 Thread beatlebg
Am I trying to perform multiple linear regressions on each 'VARIABLE2'. I figured out that there are different ways, using the following code: (data is given at the end of this message) reg <- lapply(split(TRY, VARIABLE2), function(X){lm(X2 ~ X3, data=X)}) lapply(reg, summary) Which produces

Re: [R] Forcing results from lm into datframe

2010-12-23 Thread beatlebg
Hi all, This subject treats exactly what I am looking for, thank you. Only I would like to include the p-values (or t-values) in the dataframe, like this: .id (Intercept) p-value(intercept) quartile p-value(intercept) 1 CBP090802020.92140 0.00