2
$\begingroup$

Right now, I'm trying to use some georeferenced data to predict revenue for some stores.

My data set has 21 obs (Annual Revenue for 21 stores), but I have 306 variables (Population/pop density, area, income groups, purchasing potential, and so on, for 3 different radius: 1km, 3km and 5km). Here is a print of my dataset.

Dataset 1

As I don't have a large number of observations, I cannot run a multiple linear regression, so I decided to analyze the correlation matrix of the variables and to perform a principal component analysis and define which variable would be interesting (or maybe a linear combination). In the figure above, everything in red is 1 and in green is >.9.

Correlation Matrix

My intention is to use these variables to increment another predicition model where I have ~ 4000 variables to predict an hourly numbers of item sales, based in dummy variables for days of week, month, hollidays, distance to payment days, etc, for the 21 stores). Also I'll review that model to discard some variables, ~ 4000 maybe is a little too much and brings me a lot of problems.

Here is the R lm summary to the 4000 variables model:

Residual standard error: 498.4 on 19062 degrees of freedom Multiple R-squared: 0.821, Adjusted R-squared: 0.8164 F-statistic: 179.8 on 486 and 19062 DF, p-value: < 2.2e-16

As I'm quite new to statistics models, I'm not sure if I'm doing something -really- wrong, so I wanted to ask if you have any suggestions about choosing variables to my models

Thank you!

$\endgroup$

closed as too broad by rolando2, kjetil b halvorsen, Michael Chernick, mdewey, Bernhard Jun 8 '18 at 11:49

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ The standard approach to variable selection in linear models is a penalized regression model like a LASSO. $\endgroup$ – Sycorax Dec 8 '15 at 19:25
  • 3
    $\begingroup$ Your implied approach is not based on statistical principles. For one thing you may be hurting an unsupervised learning approach (principal components) by letting it make use of the correlations with $Y$. For your problem I'd look at variable clustering followed by principal components, or consider sparse principal components analysis. More details are in my RMS course notes and book. $\endgroup$ – Frank Harrell Nov 11 '17 at 17:11
0
$\begingroup$

You can read more about Regression Model Selection (Stepwise and subset model) selection The problem in these techniques when applied directly is that they use internal measure (F-Test), which may be misleading . Your best move is to apply these techniques but by using cross validation as selection criteria , this will give you probably the best model you can apply on NEW data

$\endgroup$
  • 2
    $\begingroup$ Fair, but why use stepwise at all when ridge and lasso are available. $\endgroup$ – Matthew Drury May 5 '17 at 4:19
  • 1
    $\begingroup$ They will probably amount to the same thing. The lasso will set most things to 0, and the forward stepwise is choosing the possible non zero values in a greedy fashion. Judging from the covariance matrix, it is likely we will be left with 1 or 2 features. $\endgroup$ – Sid Oct 12 '17 at 7:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.