Hsiao-nan Cheung
2008-Oct-07 17:46 UTC
[R] Statistically significant in linear and non-linear model
Hi, I have a question to ask. if in a linear regression model, the independent variables are not statistically significant, is it necessary to test these variables in a non-linear model? Since most of non-linear form of a variable can be represented to a linear combination using Taylor's theorem, so I wonder whether the non-linear form is also not statistically significant in such a situation. Best Regards Hsiao-nan Cheung 2008/10/08 [[alternative HTML version deleted]]
Greg Snow
2008-Oct-07 18:01 UTC
[R] Statistically significant in linear and non-linear model
Well here is one example where x is not significant in a linear regression:> x <- seq( -1,1, 0.1 ) > y <- x^2 + rnorm(21,0,.1) > summary(lm(y~x))Would you really want to dismiss any relationship (non-linear) between x and y based on the above p-value? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Hsiao-nan Cheung > Sent: Tuesday, October 07, 2008 11:47 AM > To: R-help > Subject: [R] Statistically significant in linear and non-linear model > > Hi, > > > > I have a question to ask. if in a linear regression model, the > independent > variables are not statistically significant, is it necessary to test > these > variables in a non-linear model? Since most of non-linear form of a > variable > can be represented to a linear combination using Taylor's theorem, so I > wonder whether the non-linear form is also not statistically > significant in > such a situation. > > > > Best Regards > > Hsiao-nan Cheung > > 2008/10/08 > > > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.
(Ted Harding)
2008-Oct-07 18:16 UTC
[R] Statistically significant in linear and non-linear model
On 07-Oct-08 17:46:52, Hsiao-nan Cheung wrote:> Hi, > I have a question to ask. if in a linear regression model, the > independent variables are not statistically significant, is it > necessary to test these variables in a non-linear model? > Since most of non-linear form of a variable can be represented > to a linear combination using Taylor's theorem,That depends on the coefficients in the Taylor's series expansion. It is quite possible to have the linear coefficient zero, and the quadratic coefficient non-zero.> so I wonder whether the non-linear form is also not statistically > significant in such a situation. > > Best Regards > Hsiao-nan Cheung > 2008/10/08Example: X <- 0.2*((-10):10) Y <- 0.5*(X^2) + 0.2*rnorm(21) X2 <- X^2 [A] Linear regression, Y on X: summary(lm(Y ~ X))$coef # Estimate Std. Error t value Pr(>|t|) # (Intercept) 0.72840442 0.1554215 4.6866382 0.0001606966 # X 0.06570652 0.1283351 0.5119919 0.6145564688 So the coefficient of X is not significant. [B] Quadratic regression, Y on X and X^2: summary(lm(Y ~ X + X2))$coef # Estimate Std. Error t value Pr(>|t|) # (Intercept) 0.003425041 0.07203265 0.04754846 9.625997e-01 # X 0.065706524 0.03957727 1.66020864 1.141924e-01 # X2 0.494304121 0.03666239 13.48259513 7.570563e-11 So the coefficient of X is still not significant (P = 0.14), but the coefficient of X^2 is *highly* significant! So it all depends ... of course the original coefficients (Taylor) could be anything. Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 07-Oct-08 Time: 19:16:04 ------------------------------ XFMail ------------------------------