Displaying 3 results from an estimated 3 matches for "6x1x2".
Did you mean:
x1x2
2009 Jun 23
1
How to exclude insignificant intercepts using "step" function
...I include -1 in the
model designation then no intercept is returned for grps B and C. Am I not
using step properly? Or perhaps there is an alternative methodology I could
use. Any help appreciated.
# y = x1 + x2 for grp A
# y = 2 + 2x1 + 4x2 for grp B
# y = 3 + 2x1 + 4x2 + 6x1x2 for grp C
ind <- matrix(runif(200), ncol=2, dimnames=list(c(), c("x1","x2")))
d1 <- data.frame(ind, y=ind[,"x1"]+ind[,"x2"]+rnorm(100,0,0.05),
grp=rep("A",100))
d2 <- data.frame(ind,
y=2+2*ind[,"x1"]+4*ind[,"x2"]+rnorm(...
2009 Jun 17
2
Re gression by groups questions
...code below shows a multivariate dataset which I hope to fit by group.
# The code below creates a data.frame comprising three marginally noisy
planes. I want to perform a
# regression on each based on the grp factor.
# y = x1 + x2 for grp A
# y = 2 + 2x1 + 4x2 for grp B
# y = 2 + 2x1 + 4x2 + 6x1x2 for grp C
ind <- matrix(runif(100), ncol=2, dimnames=list(c(), c("x1","x2")))
d1 <- data.frame(ind, y=ind[,"x1"]+ind[,"x2"]+rnorm(100,0,0.1), grp=rep("A",
100))
d2 <- data.frame(ind, y=2+2*ind[,"x1"]+4*ind[,"x2"]+rnorm(...
2009 Jun 22
1
Error when using step
...a.frame comprising three marginally noisy
surfaces. The code below fails when I use step in a function but summary
seems to show the model fits are legitimate. Any ideas on what I'm doing
wrong?
# y = x1 + x2 for grp A
# y = 2 + 2x1 + 4x2 for grp B
# y = 3 + 2x1 + 4x2 + 6x1x2 for grp C
ind <- matrix(runif(200), ncol=2, dimnames=list(c(), c("x1","x2")))
d1 <- data.frame(ind, y=ind[,"x1"]+ind[,"x2"]+rnorm(100,0,0.05),
grp=rep("A",100))
d2 <- data.frame(ind,
y=2+2*ind[,"x1"]+4*ind[,"x2"]+rnorm(...