# regression where input data is skewed

For a linear regression model, the data for a continuous input variable X is such that 90% of the data lie at a value far short of the maximum possible. For example, say the range of X (in months) is between 1 and 100,the median of X is 25 and the 90th percentile is 60 months. Most of the input X values (90% in the example) lie before a value only a little over half the maximum possible.

The outcome variable Y is a percentage. The trend of Y vs X is as follows: Y shows a very small increasing trend ( nearly flat looking ) vs X, upto the 65 month mark. After this, there is a very sharp downward trend.

However, the regression coefficient for X is a very small positive number (close to zero) and not negative.

I should mention the regression is weighted by another variable W, which is in currency units. However, even without the weighting, I still get nearly the same coefficient from my regression. My guess is that the regression is influenced by the fact that most data is in the slightly upward trending part.

For our application, it is very important to capture the negative trend. Binning the variable X is not possible due to the nature of the application - it has to be continuous. Is there any other transformation of X that could help ? or any other method that could be used in this situation to capture the downward trend at the end?

You can use a spline regression model such as restricted cubic splines. In SAS you can do this with PROC TRANSREG. In R you can do it with rcsspline in the Hmisc package.

Splines allow virtually any shape of relationship between the dependent and independent variables.

I'm afraid the worse problem here is not skewness of predictor. The problem is that the relation between X and Y is not linear, and no straight line will ever fit to them.

You haven't posted any scatterplot of the data, so I can just guess what they look like by your descripction. However I'll give a couple of suggestions:

• If your data show two different trends for two different ranges of predictor, then you should try to fit two regression lines. A common approach for that is broken stick regression.
• If that different trends are not so clear and a continous curve can fit the data, there are several approaches available. One of them is spline regression, as Peter Flom suggests in his answer. Another one is polynomial regression and it's usually simpler - altough less flexible.
• Sometimes a suitable transformation make data fit a linear relation, although that doesn't seem to be your case. Taking logarithms or inverting response and/or predictor is often useful.

Skewness of predictor is not a problem in itself. It just means that you have a lot more of information from one part of the range than from another. The problem is that the few individual points in the longest queue will have a large influence in the fitted line. If thee underlying relation is not linear or if those points are ouliers from the fitted line, they may cause your fitted line not be related to the question you are studying.