Re: [Rd] rnorm is not truly random used in the lm function

2017-08-03 Thread Victor Tian
I did it purely based on the intuition I built from elsewhere and maybe in R as well. To summarise, it's basically a matter of evaluation ordering issue. It looks like the model.matrix() function has a higher precedence over rnorm(100), i.e., outside in rather than inside out in this specific

Re: [Rd] rnorm is not truly random used in the lm function

2017-08-03 Thread Martin Maechler
> Victor Tian > on Thu, 3 Aug 2017 09:49:57 -0400 writes: > To whom it may concern, > I happened to run the following R code just to check the layout of the > output, but found that the code doesn't work the way I thought it should > work. yes,

[Rd] rnorm is not truly random used in the lm function

2017-08-03 Thread Victor Tian
To whom it may concern, I happened to run the following R code just to check the layout of the output, but found that the code doesn't work the way I thought it should work. '' > lm(rnorm(100) ~ rnorm(100)) Call: lm(formula = rnorm(100) ~ rnorm(100)) Coefficients: (Intercept) -0.07966