Currently, I fit my data with an exponential function:
Index = exp(a + b * Age + c * SaleType + d * Age * SaleType + e * miles)
But it looks like I over fit my data at the beginning, underfit at the middle and I am fine at the end. Could I use an s-shaped curved so that Y goes down slowly at the beginning of X, then steeply in the middle, then slowly at the end?
The data is the sale price of a car versus its cost. The price wont decrease a lot at the first two years of a new car, then the price drops a lot in the following 7-8 years, then the price decreases more slowly after the 10th year.
I would like to fit the non-linear logistic function:
f(x) = L/(1 + exp(-kx))
Can anyone help me with this problem? I think it can be done by R with nls(). Is it possible to fit multiple variables instead of only one x? And how do I set the initial start point?