Thanks Martin for the lead. A new avenue to explore.
Dhruv
-Original Message-
From: Martin Maechler [mailto:maech...@stat.math.ethz.ch]
Sent: Wednesday, March 10, 2010 6:18 AM
To: kMan
Cc: Sharma, Dhruv; r-help@r-project.org
Subject: Re: [R] r code to generate interaction columns
ere
which you can run in R by
examples(model.matrix)
Regards,
Martin Maechler, ETH Zurich
k> -Original Message-
k> From: Sharma, Dhruv [mailto:dhruv.sha...@penfed.org]
k> Sent: Monday, March 08, 2010 7:51 AM
k> To: kMan; r-help@r-project.org
k> Subje
Dhruv; r-help@r-project.org
Subject: RE: [R] r code to generate interaction columns
Dear Dhruv,
You could create interaction variables manually (assuming A is your
dependent variable). Just multiply the variables together.
cd.int<-C*D
ce.int<-C*E
cde.int<-C*D*E # what about D*E, or inter
-project.org
Subject: RE: [R] r code to generate interaction columns
Dear Dhruv,
You could create interaction variables manually (assuming A is your
dependent variable). Just multiply the variables together.
cd.int<-C*D
ce.int<-C*E
cde.int<-C*D*E # what about D*E, or interactions with B?
Incl
Dear Dhruv,
You could create interaction variables manually (assuming A is your
dependent variable). Just multiply the variables together.
cd.int<-C*D
ce.int<-C*E
cde.int<-C*D*E # what about D*E, or interactions with B?
Include those in your model, such as A~B+C+D+E+cd.int+cd.int+ce.int+cde.int.
5 matches
Mail list logo