# Linear regression with low variance predictors

I'm working on a linear regression problem where I have variables that improve the response, but have very low variance. In these variables almost all of the terms are zero, but the non-zero terms are positively correlated with the response. However, when I regress it I get a negative coefficient.

Most of the information that I saw said that I should discard these variables, but I know they have valuable information. What can I do?

I wrote a R code with a reproducible example of what I am experiencing:

y = 1:100
x = rep(0,100)
x[c(10, 11, 15, 21, 15, 40, 45, 49, 55, 70)] = c(5, 15, 24, 21, 17, 44, 48, 49, 85, 70)
plot(x, y)


lm(y ~ x)
Call:
lm(formula = y ~ x)

Coefficients:
(Intercept)            x
50.70483     -0.05786


And if I only get the non-zero observations:

y2 = y[x!=0]
x2 = x[x!=0]

plot(x2, y2)


lm(y2 ~ x2)
Call:
lm(formula = y2 ~ x2)

Coefficients:
(Intercept)           x2
5.5357       0.7519


I apologize if this post is somehow against the rules. It is my first time posting here.

• Your issue here is that using the lm function treats your data as if it follows a normal distribution. Based on those graphs it clearly does not, so you will have to use a more sophisticated modelling technique. I would recommend investigating zero-inflated models, which are well supported in R. Commented Mar 29, 2017 at 21:13
• linear regression just assumption for the residual distribution , so you can check it Commented Mar 30, 2017 at 0:09
• It makes sense, thanks! Any ideas on how to transform this kind of variable so it can result in uniformly distributed residuals?
– jcp
Commented Mar 31, 2017 at 14:30