Dear ales,
Try this:
# Data
# set.seed(123)
mat=matrix(rnorm(36),ncol=6)
colnames(mat)=paste('x',1:6,sep="")
res=rnorm(6)
# All info for coefficients. First 4 columns # correspond to the intercept
and the next for to the slope
t(apply(mat,2,function(x){
sm=summary(lm(res~x))$coeff
res=matrix(sm,n
On Nov 27, 2008, at 9:49 AM, David Winsemius wrote:
Have you looked at results of str on a regression object? I would
not think that there would be a single p.value associated with such
a beast, but that there might be if you examined individual
coefficients.
? coefficients
?coef
That w
Have you looked at results of str on a regression object? I would not
think that there would be a single p.value associated with such a
beast, but that there might be if you examined individual coefficients.
? coefficients
?coef
--
David Winsemius
On Nov 27, 2008, at 4:03 AM, ales grill wro
Dear all,
I have wrote a code for a linear regression. I want to
write a loop for so, that I can get estimate for pavlues for six predictors.
But I am getting for estmate for only last one. How can I get pvalues for
all my predictors in a loop??
Anticipating your help
Thanks
Ales
4 matches
Mail list logo