0

Can we use cubic, power, exponential and growth regression models for following data.

If not why? Then what data should be removed to get suit with above regression models?

         Day    1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25

   Deliveries   1   2   2   5   7   10  15  9   8   12  6   9   10  5   0   4   0   9   2   5   21  3   5   8   7

These are the package deliveries in each days. Your kind support on this is highly appreciated.

  • 3
    Stack Overflow may not be the right place for this kind of question, as it's more statistical rather than programming question. Cross Validated may be better. However, given that your data is positive discrete counts, the best sort of regression would be some sort of poisson/negative binomial model. – Adam B. Apr 26 '20 at 21:15
  • is this all the data? i mean you can fit a curve to anything but what you would iike to do? – StupidWolf Apr 26 '20 at 21:38
  • Let me also add that if the goal is to regress Deliveries against Day, you'll run into issues with typical regression models. You'll likely have to find a time series model to fit your data if you want to make predictions. – lincolnck Apr 26 '20 at 22:31
  • @StupidWolf yeah, sure. We need to get the best regression model to analyse the data. – user13413344 Apr 27 '20 at 02:37
  • @lincolnck I done this with R. But I couldnt get a proper diagram.Here. ABC <- read_csv(choose.files()) x<-ABC$Day y<-ABC$Deliveries ABC <- ggplot(data = ABC, aes(x = ABC$Day, y = ABC$Deliveries)) + geom_point(pch=16) model1<-lm(y~x+x^2+x^3) ABC<-ABC + geom_line(aes(y=predict(model1)), colour="Blue") ABC – user13413344 Apr 27 '20 at 02:38
  • @user13413344 I see. As Adam B. pointed out, it appears that this may be a better question for Cross Validated. You're trying to fit a linear model with quadratic terms to regress Deliveries against Day. What inherent information does day have that affects deliveries? Likely none. Rather, what you have is a set of measurements of some underlying process recorded at daily intervals. You'll be better off fitting a time series model, and using that to make your forecasts. This question has a detailed example: https://stackoverflow.com/questions/10302261/forecasting-time-series-data – lincolnck Apr 27 '20 at 03:29
  • @user13413344 Also, it's generally a good idea to check your model fit before trying to use it to make predictions. With your model setup: `model1<-lm(y~x+x^2+x^3)`, if you run `summary(model1)`, you would see that day is not a significant predictor of deliveries, and that the F-statistic (a measure of model fit) has a non-significant p-value, meaning you'd fail to reject the null hypothesis that your model is significantly different than one with just an intercept term. – lincolnck Apr 27 '20 at 03:38

0 Answers0