Re: [R] identifying a column name correctly to use in a formula

2012-02-29 Thread Rui Barradas
Hello, > > I have a large matrix (SNPs) that I want to cycle over with logistic > regression with interaction terms. I have made a loop but I am struggling > to identify to the formula the name of the column in a way which is > meaningful to the formula. It errors becasue it is not evaluated propo

Re: [R] identifying a column name correctly to use in a formula

2012-02-29 Thread R. Michael Weylandt
Your method of constructing a formula is funny: is there a term called "interaction" or do you mean an interaction in the statistical sense? Once you do that, I'd think the easiest way to proceed is to use as.formula() to construct your formula programmatically and then to pass that to glm(). Somet

[R] identifying a column name correctly to use in a formula

2012-02-29 Thread Philip Robinson
Hi, I have a large matrix (SNPs) that I want to cycle over with logistic regression with interaction terms. I have made a loop but I am struggling to identify to the formula the name of the column in a way which is meaningful to the formula. It errors becasue it is not evaluated proporly. (below