1
$\begingroup$

I am trying to predict the long term residual value of a product with only the releasing price. I have collected some data off the Internet related with one phone type, and it is pretty obvious that the residual value (say eBay and Amazon used pricing) of a used electronic product (say iphone) is decreasing exponential. Like the plot below:

enter image description here

par(mfrow=c(3,1)) 
x <- 1:100 
y <- exp(-0.03 * x) * (2 + rnorm(100)) 
plot(x, y, main="raw data", ylim=c(0, 4)) 
plot(diff(y), main="diff", pch=4, ylim=c(-2, 2)) 
plot(y ~ as.factor(as.integer(x/10)))

Clearly, the derivative is not constant and also decreasing. So I think exponential model might be a good fit.

However, one interesting thing here is the longer the time goes since the release.. the less dispersive the data is. In another way, when phone first released. People started selling used phones, and since the value is the highest, say $700.

They can possibly sell at 600 USD or even 300 USD if they want. But 3 years later, the phone value is much lower, say even a new phone is only $200, then when they sell old phones, the prices are probably at the range of 100~200, a much narrowed band.

In my scenario, I am more interested in the residual value in a longer term, which is at the narrowed band.

Here is my question:

  1. should I only look at the attenuation coefficient, the b from Exp(b*x) for different types of phones... and predict the new b for the phone that I am going to predict based on all the data that I have.
PhoneModel   b
iPhone3      -0.04
iPhone4      -0.05
iPhone5      -0.03
iPhone6      TBD
  1. or should I only look at the time period that I am interested in. say 2 ~ 3 years (or 36 months time point) and do the modeling in that range since the data is much narrowed.. To avoid the dispersion brought by the 0 ~ 2 years data..
PhoneModel residualRatio
iPhone3    20% 
iPhone4    25%
iPhone5    30%
iPhone6    TBD

Again, I am trying to predict the long term residual value of a product with only the releasing price.

$\endgroup$
4
  • $\begingroup$ Uh, three of the values in the top plot (x=4,39,59) are clearly negative. How can residual value be negative? $\endgroup$
    – Glen_b
    Sep 10 '14 at 2:14
  • $\begingroup$ Level yield depreciation is what you're looking for. Something like $V_t=(1-\delta)V_{t-1}$, where $\delta$ is your depreciation, and $t$ time since purchase. One thing to keep in mind that $\delta$ could be changing with time of purchase. $\endgroup$
    – Aksakal
    Sep 10 '14 at 16:32
  • $\begingroup$ @Aksakal, so divide the data into buckets (say monthly level). And calculate the median/mean of each bucket. Then look at the depreciation rate between buckets? $\endgroup$
    – B.Mr.W.
    Sep 10 '14 at 16:57
  • $\begingroup$ @B.Mr.W., I was suggesting that the residual value is not just a f-n of the time between purchase and resale, but that it could also depend on the time of purchase and/or the price. In this case your "buckets" will be by vintages and prices. Obviously, the product model is a factor too. $\endgroup$
    – Aksakal
    Sep 10 '14 at 18:03
1
$\begingroup$

The spread of something approaching a bound will naturally tend to decrease.

For something bounded below by 0, what's below the mean can't get more than the mean away, and something above it, if it's not to pull the mean up, then can't tend to be very far away (that is, the average value above the mean must equal the average value below it).

In other words, as you approach the bound, the mean deviation must decrease (and the standard deviation will tend to do the same, unless the skewness becomes sufficiently more severe).

As a result, the decreasing spread is to be expected.

A similar argument can be made to suggest that continuous distributions approaching a bound from above will often tend to be right skew; it's common to see that, but possible to construct situations where it doesn't happen.

Presumably your $x$ is something related to time.

A suitable model will be one that models the mean, the spread, and if possible the skewness. A common choice for this sort of data would be a gamma GLM with a log-link (the log-link picks up the exponential decay with a linear predictor in time); the gamma has spread proportional to mean, and can be more or less skew.

It's not completely clear what you want to obtain, but you can extract a fair bit of information from such a model, and also check its reasonableness via a number of model diagnostics. These are very easy to fit in R.

Depending on exactly what you're collecting, it's possible your data will exhibit some time-dependence, so you may need a more sophisticated model; you can do a quick assessment of dependence by looking at say a time-series plot and autocorrelation of some form of standardized residual.


Illustration of what I mean about some of the data being negative:

enter image description here


I'll generate data twice - once with set.seed(127) rather than 123, so we get positive data with your code, and a second time to show you how to do it so as to produce only positive answers.

set.seed(127)
x <- 1:100 
y <- exp(-0.03 * x) * (2 + rnorm(100)) 
gamfit=glm(y~x,family=Gamma(link=log))
summary(gamfit)
plot(x, y, main="raw data", ylim=c(0, 4)) 
lines(x,fitted(gamfit),col=4)
abline(h=0,col=8)

giving:

> summary(gamfit)

Call:
glm(formula = y ~ x, family = Gamma(link = log))

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-2.77677  -0.40078  -0.00537   0.29472   1.01420  

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.671939   0.094734   7.093 2.06e-10 ***
x           -0.029218   0.001629 -17.940  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for Gamma family taken to be 0.2210132)

    Null deviance: 102.040  on 99  degrees of freedom
Residual deviance:  34.689  on 98  degrees of freedom
AIC: -5.7283

Number of Fisher Scoring iterations: 5

enter image description here


to get a more plausible model, simulate data with a specified mean from a distribution that is already restricted to be positive, such as a lognormal, or gamma (there are many other choices):

set.seed(127)
x <- 1:100 
y <- rgamma(100,10,scale=exp(-0.03 * x)/4)
gamfit=glm(y~x,family=Gamma(link=log))
summary(gamfit)
plot(x, y, main="raw data", ylim=c(0, 4)) 
lines(x,fitted(gamfit),col=4)
abline(h=0,col=8)

One useful set of diagnostic displays is obtained by plotting the result of fitting the glm:

plot(gamfit)

If you do par(mfrow=c(2,2)) first you get a nice display on a single page.

===

An alternative would be to work on the log-scale with linear models.

$\endgroup$
7
  • $\begingroup$ There are a few new terms from your post that I might need to do more research and digest for a while. Per your comment about how to implement it in R. Can you give me more information which library and which function you tend to use? Since I have the code to generate the dummy data in the post. I am wondering if you can paste some POC code down here to help me get started. $\endgroup$
    – B.Mr.W.
    Sep 10 '14 at 15:22
  • $\begingroup$ i) For GLMS I use the glm command in vanilla R. ii) POC? iii) To show an example, you'd need to start by answering how residual value can be negative, because it would impact the approach to analysis. iv) If I use your code I'll get different data since you don't have a seed set. If you don't mind that, okay, but if you do you'll be better to post your data (though I scraped your plot, so I have an approximation to it). $\endgroup$
    – Glen_b
    Sep 10 '14 at 15:52
  • $\begingroup$ POC(prove of concept).. The value is actually pricing for products so they should never be negative. You can really set.seed(123) if you want. Thanks for the quick reply. $\endgroup$
    – B.Mr.W.
    Sep 10 '14 at 16:09
  • $\begingroup$ Oh, I misread part of your code. I see now it can produce negatives. That's a problem when your data really can't be negative. $\endgroup$
    – Glen_b
    Sep 10 '14 at 16:19
  • $\begingroup$ Hi Glen_b, I really learned a lot and wondering if we can have a deeper conversation maybe in a chat room from stackoverflow so we don't overwhelm that comments.. And Maybe I can offer some points to mark this question as bounty question to show my appreciation? $\endgroup$
    – B.Mr.W.
    Sep 10 '14 at 17:03

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.