Hi, everyone!

Right now I have to do research about how the minimum wage affects wage distribution. I have to do OLS regression - where the dependent variable is the difference between the log wage of the percentage and the log median wage, while the explanatory variables are the difference between the log minimum wage and the log median wage in linear and squared forms in addition to control variables. So I would like to ask your help on how to calculate percentiles and their differences with the median. The expected result would be that I get regression coefficients each row that reports the results of a separate OLS regression (by groups p5-p50, p10-p50, and so on) with the dependent variable being the difference between the percentile (with median) and explanatory variable minimum wage minus median. I have a data set of more than 1 million rows.

Thank you for your advice!