0
$\begingroup$

I have a dataset of 30 social variables such as Facebook Likes, Posts, Comments, etc. I would like to see if these variables predict Website Views.

MY problem is I only have 3 months of data- or 3 data points. Thus I have a 3 by 30 dataset. My question is, how do I model with such few data points but lots of variables?

In addition, I would love a resource that walks through regression in R. My data does not even remotely look linear, so I don't know what to do next. Suggestions?

$\endgroup$
7
  • $\begingroup$ Welcome here. Please split your questions into separate threads $\endgroup$
    – sheß
    Apr 21 '16 at 22:24
  • 7
    $\begingroup$ 3 observations, 30 variables implies that you need many more observations. Even 30 observations and 3 variables would be a stretch. $\endgroup$
    – Nick Cox
    Apr 21 '16 at 22:37
  • 2
    $\begingroup$ This can not be done. Your linear regression is what we call underdetermined. Because you have way more variables than you do observations, linear regression won't be able to pick out coefficients that minimize the sum of squared errors. There are, literally, an infinite number of coefficients that would do so, which doesn't sound very useful. You are going to need to wait for more data. $\endgroup$ Jul 7 '19 at 15:51
  • 2
    $\begingroup$ You need more data. People are suggesting using regularization or local methods, but both will give highly variable results. Frankly, your inference will be questionable even if you take a simple average. $\endgroup$
    – Josh
    Jul 7 '19 at 16:22
  • 1
    $\begingroup$ I may be missing something, but why do 3 months of visits result in 3 data points? Why not summarize by day? That would give you 30x more observations. $\endgroup$
    – burger
    Jul 8 '19 at 19:28
0
$\begingroup$

Yes, as Nick mentions, it is definitely a stretch for using models with assumptions. If you just want to predict, I would suggest that you use nearest neighbor method as a non-parametric method for prediction.

If you have little more points, you can use partial least squares (PLS) if more variables than data points.

As pointed out by others, three data points is too few for developing a regression model. I would suggest to collect at least 20 data points to run a regression model.

$\endgroup$
4
  • 4
    $\begingroup$ This really isn’t appropriate given the size of the data set. Op should collect more data before considering any modeling. $\endgroup$ Jul 7 '19 at 16:11
  • $\begingroup$ @DemetriPananos, I agree that it would be ideal to collect more data. But in case, only data point is available, that is the best guess. In case, only two data points are available, the outcome of the closest one to the test data is the best guess, so on and so forth. These are be written into the code until sufficient data has been collected to do any proper modeling. $\endgroup$
    – KarthikS
    Jul 8 '19 at 1:57
  • 1
    $\begingroup$ I'm not trying to answer if OP can make predictions, I'm answering should OP make predictions. No worthwhile predictions can be made from 3 data points housing 30 measurements. Telling OP otherwise is at worst negligent and at best shows a gross misunderstanding for the modelling processes. $\endgroup$ Jul 8 '19 at 2:28
  • $\begingroup$ You are right. I will update my answer to suggest that nearest neighbor is not really a model and for 3 data points, it really works only as a heuristic. $\endgroup$
    – KarthikS
    Jul 9 '19 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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