# Can I use Sum of squares in R for variable significance instead of p-values?

I have a data with 20k samples. It includes 6 categorical and 2 continuous variables. When I performed multiple linear regression and ANOVA to test the variables significance, it shows p-values 1e-16 for all variables. I suppose it is because of data size and has to do something with power. However, I am quite sure that 2 varables are not important for the regression at all. Could I use sum of squares as a quatitative measure of significance instead of p-values or something else? I can also reduce the size of data, but how much? What is an optimal size which I should use?

• Not a programming question - try stats.stackexchange for statistics questions. I would recommend looking at (standardized) effect sizes to determine non-statistical significance. You could also use regularization techniques such as LASSO. – Gregor Thomas Oct 6 '16 at 20:19
• I'm not sure how you would use Sum of Squares as a variable-level metric - maybe fit a model with and without the variable and compare? And come up with some way to decide whether the difference matters or not? I wouldn't recommend it... – Gregor Thomas Oct 6 '16 at 20:21
• There are a lot of ways to do variable selection; see Chapter 6 of ISLR. Most methods depend on a quantity like AIC or BIC rather than RSS directly. – alistaire Oct 6 '16 at 20:36
• Generally speaking, more data is better. This is the idea behind much of statistics such as LLN, CLT, etc.... There is, therefore, no optimal size of data. That said, you'll want to use an information criterion (AIC, BIC, etc...) for model selection. Try a bunch of different specification (i.e. specification with different co-variates) and pick the one with the smallest information criterion. Using RSS for model selection will not work. RSS will always favor more variables to less, because each additional variable will provide additional, but potentially really small, helpful info. – Jacob H Oct 6 '16 at 21:22
• (cont) information criterion, in contrast, penalize the introduction of each additional variable and therefore pick the model which explains the LHS variable the best with the least amount of parameters. Additionally, you can use a LASSO for model selection. Run the LASSO with all your data. Those variables shrunk to zero should be omitted from your OLS regression. However, be wary of shrinkage estimates such as LASSO, if your goal is parameter estimation. Shrinkage estimators generate bias coefficients and therefore should really only be used for forecasting (or model selection). – Jacob H Oct 6 '16 at 21:28

tmp <- data.frame(a = rnorm(100), b = rnorm(100))
tmp$c = tmp$a + 3*tmp\$b + rnorm(100)