How do I handle a variable that is mainly 0 in multiple regression analysis in R? I have tried transforming the variable (x; shown below) using various methods but with nothing changing as 0 is so prominent. How would I handle the variable below in multiple regression analysis as it is predominantly zeros and thus very asymmetrically distributed? Can it be transformed? Any help would be greatly appreciated!
x <- c(rep( x = 0, times = 5473 ),7,8,9,9,9.5,10,11.1,11.8,12,13,13,13,17.7,19,27)

 A: I assume x is a predictor, not the dependent variable.  Fit x as quadratic with an exception that allows for a discontinuity at zero, i.e., add an indicator variable for x > 0.
A: Depending on what you are trying to estimate, sometimes it is useful with imbalanced data to re-sample the data. There are various algorithms out to resample your data. You can undersample your zeros to prevent them from dominating the model. You can oversample (aka duplicate) your non-zero values to make them have a higher impact on your model. You can use another algorithm such as the SMOGN algorithm to generate sample data. 
These techniques can be effective when your data is actually imbalanced (such as when the $ spent per person who clicks an advertisement is usually zero). However, you need to be careful that the zeros are meaningful and don't represent missing data before you consider sampling techniques. 
Additionally, sampling won't help if you actually have two categories and are trying to force them into a single regression line. The correct answer might be to categorize the zeros and non-zeros first, and then perform a regression on only the non-zeros. For example, if you're looking at how much a person will spend after clicking an advertisement you might have a logistic regression to predict whether or not they will purchase (are they zero or not), and then a regression that ignores zero to determine how much the will spend if they do purchase.
