John,
Jim has shown how to accomplish what you want.
Here's a slight variation (for a single model):
y - rnorm(20)
x - runif(20)
z - runif(20)
fm - lm(y ~ x + z)
m - cbind(NA, coef(summary(fm)))
colnames(m)[1] - deparse(formula(fm))
print(m, na.print = )
- Peter Ehlers
jim holtman wrote:
try using a 'list':
whatIwant-list(call=summary(myreg)$call, coef=summary(myreg)$coefficients)
On 9/30/07, John Sorkin [EMAIL PROTECTED] wrote:
Widows XP
R 2.3.1
I have been trying to make a data structure that will contain both the
coefficients from a linear regression along with column
Jim,
Again thank you for your quick reply. Your suggestion does not give me exactly
what I want:
whatIwant-list(,summary(fitdelete)$call,summary(fitdelete)$coefficients)
whatIwant
[[1]]
lm(formula = y ~ x)
[[2]]
Estimate Std. Error t value Pr(|t|)
(Intercept) 4.927791
Thank you Moshe,
I understand you point, but I would hope that I could use summary to save my
self some work. I need to do what I described in my original Email to the list
server on tens of regressions.
John
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of
Jim,
You are indeed trying to help, again my thanks.
What I want to do is make a single structure - a table is an apt description
that will summarize all the regressions, something like:
Estimate Std. Error t value Pr(|t|)
(Intercept) lm(formula = y ~ x)
5 matches
Mail list logo