On Wed, 2005-10-05 at 14:12 +0200, [EMAIL PROTECTED] wrote: > Prof Brian Ripley wrote: > > > On Wed, 5 Oct 2005 [EMAIL PROTECTED] wrote: > > > > > >>Full_Name: Hallgeir Grinde > >>Version: 2.1.1 > >>OS: Windows XP > >>Submission from: (NULL) (144.127.1.1) > >> > >> > >>While using lm(y~(x*z*c*...*v)^2) R crashes/closes if the numbers of > >>variables > >>are at least 8. > > > > > > OK, let's try to reproduce that: > > > > > >>x1 <- runif(1000) > >>x2 <- runif(1000) > >>x3 <- runif(1000) > >>x4 <- runif(1000) > >>x5 <- runif(1000) > >>x6 <- runif(1000) > >>x7 <- runif(1000) > >>x8 <- runif(1000) > >>y <- rnorm(1000) > >>fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2) > > > > > > No crash, a quite reasonable fit. > > > > Can we please have a reproducible example, as we do ask? > > > > Hmm, crashes for me as well with R-2.1.1 and R-2.2.0 beta (2005-09-27 > r35682M) on WinNT 4.0, SP6. > > > Let's make it reproducible: > > set.seed(123) > x1 <- runif(1000) > x2 <- runif(1000) > x3 <- runif(1000) > x4 <- runif(1000) > x5 <- runif(1000) > x6 <- runif(1000) > x7 <- runif(1000) > x8 <- runif(1000) > y <- rnorm(1000) > fit <- lm(y~(x1*x2*x3*x4*x5*x6*x7*x8)^2)
No problems on FC4 using Version 2.1.1 Patched (2005-10-04): > summary(fit) Call: lm(formula = y ~ (x1 * x2 * x3 * x4 * x5 * x6 * x7 * x8)^2) Residuals: Min 1Q Median 3Q Max -3.315028 -0.532338 0.005368 0.548012 2.957057 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 16.2460 15.7375 1.032 0.3023 x1 -10.0310 29.7557 -0.337 0.7361 x2 -26.2678 24.0473 -1.092 0.2750 x3 -42.5713 32.9481 -1.292 0.1967 ... x1:x2:x4:x5:x6:x7:x8 -339.8099 1024.8652 -0.332 0.7403 x1:x3:x4:x5:x6:x7:x8 -833.5375 1095.1153 -0.761 0.4468 x2:x3:x4:x5:x6:x7:x8 -546.0684 1050.8648 -0.520 0.6035 x1:x2:x3:x4:x5:x6:x7:x8 533.8390 1861.5862 0.287 0.7744 --- Signif. codes: 0 â***â 0.001 â**â 0.01 â*â 0.05 â.â 0.1 â â 1 Residual standard error: 1.001 on 744 degrees of freedom Multiple R-Squared: 0.2541, Adjusted R-squared: -0.001499 F-statistic: 0.9941 on 255 and 744 DF, p-value: 0.5161 Is this perhaps a RAM issue? I have 2 Gb. Marc ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel