basically I want to regress the following model:

p(x)= constant + a*x,

where x is the income of a particular person and p(x) the proportion of people in my sample with a higher or equal income than that particular person. I am ultimately interested in a.

thus i thought the obv thing to do would be to

regress px x (letting p(x)=px here),

but I am struggling with how to compute the variable px for my sample.

Any suggestion/help would be greatly appreciated!