search for: x1x3

Displaying 3 results from an estimated 3 matches for "x1x3".

Did you mean: x13
2004 Apr 05
0
Selecting Best Regression Equation : leaps() in R and stepwise() in S+
...----------------------------- > options(prompt=" R > " ) R > leafbrn1<-read.table("c:\\leafbrn.txt",header=T) R > leafbrn.data1<-data.frame(leafbrn1) R > attach(leafbrn.data1) R > x1sq<-x1^2;x2sq<-x2^2;x3sq<-x3^2;x1x2<-x1*x2;x1x3<-x1*x3;x2x3<-x2*x3; R > leafbrn <- cbind(leafbrn1,x1sq,x2sq,x3sq,x1x2,x1x3,x2x3) R > detach(leafbrn.data1) R > leafbrn.data<-data.frame(leafbrn) R > attach(leafbrn.data) R > X<-cbind(x1,x2,x3,x1sq,x2sq,x3sq,x1x2,x1x3,x2x3) R > Y<-y -------...
2010 Mar 26
2
R loop help
Hi, I am tring to write a loop to compute this, ========================== x1=c( rep(-1,4), rep(1,4) ) x2=c( rep(c(-1,-1,1,1),2) ) x3=c( rep(c(-1,1),4) ) x1*x2 x1*x3 x2*x3 ======================== suppose i have x1,x2,x3 i want to compute their ' two factor interactions', x1x2,x1x3 and x2x3, I wrote ======================== for(i in 1:2){ for( j in i+1:3){ xij=c() xij=xi*xj } } ======================== it did not seem to recognize xi and xj is there any suggestion? it would be wonderful if there exists a single command that i can use My ultimate aim is to find the 55 x...
2012 Sep 12
3
how to create a substraction matrix (subtract a row of every column from the same row in other columns)
...er represents a year, and I want each comparison to only be listed once, the difference between the 1st year the sample was taken and then 2nd year the sample was taken. (This would probably entail just taking a portion of the matrix.) . This is what the result would be difftype value x1x2 x1x3 x1x4 x1x5 x2x3 x2x4 x2x5 x3x4 x3x5 x4x5 Thank you for any help you can give me. -- View this message in context: http://r.789695.n4.nabble.com/how-to-create-a-substraction-matrix-subtract-a-row-of-every-column-from-the-same-row-in-other-column-tp4642949.html Sent from the R help mailing list a...