I really would like to be able to read about this in a document but I
cannot find my way around the documentation properly

Given the code...

M <- matrix(runif(5*20), nrow=20)
colnames(M) <- c('a', 'b', 'c', 'd', 'e')
ind <- c(1,2,3,4)
dep <- 5

I can then do...
l2 <- lm(M[,dep]~M[,ind]) ## Clearly not useful!
summary(l2)

I am not sure what my regression formula is.

The results are (edited for brevity)

> summary(l2)$coefficients

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)  0.63842    0.16036   3.981  0.00120 **
M[, ind]a   -0.02912    0.17566  -0.166  0.87054
M[, ind]b   -0.21172    0.19665  -1.077  0.29865
M[, ind]c    0.00752    0.18551   0.041  0.96820
M[, ind]d    0.06357    0.18337   0.347  0.73366

Is there some way I can do this so the coefficients have better names ('a'
through 'd')?

As for what I am doing it is not...

l3 <- lm(M[,1]+M[,2]+M[,3]+M[,4]~M[,5])

or

l4 <- lm(M[,1]*M[,2]*M[,3]*M[,4]~M[,5])

cheers
W

	[[alternative HTML version deleted]]

