Skip to content
Prev 269135 / 398502 Next

a Question regarding glm for linear regression

convert your matrix to a data frame:
df <- as.data.frame(mymatrix)

then you can simplify your formula and specify where the data is coming from:
glm.fit <- glm(y~., data=df)

the "." in the formula means all columns in your dataframe (except
"y", if it is in df)
On Sat, Aug 20, 2011 at 10:43 AM, Andra Isan <andra_isan at yahoo.com> wrote: