Skip to content

function and glm

On Thu, 2006-03-02 at 11:34 +0100, Henrik Kallberg wrote:
A dot on the right hand side of the formula means "regress on
everything". So you can create a data frame with only the variables you
want and pass this to glm inside your function

mydata <- cbind("case"=case, "exp"=exp, as.data.frame(confounders))
glm(case ~ ., data=mydata)

Martyn

-----------------------------------------------------------------------
This message and its attachments are strictly confidential. ...{{dropped}}