This is a summary of an article by Robert Moffitt (1986):
Often in Public Economics, we come across budget constraints which are piecewiselinear. Some examples are studies of: the negative income tax, Social Security program, food stamp program, Aid to Families with Dependent Children (AFDC), and unemployment insurance. Wrinkles to the traditional piecewise linear budget constraint are: Halpern and Hausman (1985) who incorporate uncertainty of benefit receipt of disability insurance; Moffitt (1983) allowed welfare recipients to shop among different kinks in their budget constraint; Venti and Wise (1984) allowed there to be fixed costs to moving; and Hausman (1981) allowed there to be fixed costs (transportation and/or child care) involved in the decision to work or not. With regards to health insurance, workers who work ‘too many’ may see that their marginal tax rate (and thus the implicit health care subsidy they receive from group insurance) will change. This will lead to a piecewise linear budget constraint.
Model
I will use the tax subsidy to employerprovided health insurance to explain Moffitt’s model. Consumer maximize utility U(X,Y) s.t. (M=PX+Y if X<=X*; ) or (s.t. m=pX+Y, if X>X*). Here m=M+(pP)X* which is the income loss which occurs when employees work ‘too many’ hours and move into a higher tax bracket. The function g() is the regular demand function in the standard linear setting. The demand function in the piecewise setting can be written as follows:

X=g(P,M) if X
 X=X* if X=X*
 X=g(p,m) if X>X*
On which segment will we be on? Well that depends on the indirect utility function. If V(P,M)>V(p,m) then we will choose the first segment and if V(P,M)< V(p,m) we will choose the second segment. Writing the Demand function more concisely, we have: X=D1*g(P,M)+D2*g(p,M+(pP)X*) +(1D1D2)X*
 D1=1 if X*g(P,M)>0, 0 otherwise
 D2=1 if g(p,M+(pP)X*)X*>0, 0 otherwise.
Comparative Statics:

dX/dP=D1*g_1(P,M)D2*g_2(p,m)X* <= 0

If the price of health insurance increases (or the tax subsidy decreases) you will demand less health insurance


dX/dp=D2*[g_1(P,M)+g_2(p,m)X*] <= 0

If one moves to the high marginal tax area and the price of health insurance increases, demand for insurance will decrease.


dX/dM=D1*g_2(P,M)+D2*g_2(P,M) >=0
 Health Insurance is assumed to be a normal good, so as income increases, the demand for health insurance increases.
Here g_1() is the derivative of g with respect to price; g_2() is the derivative of the demand function with respect to income. We can see that the income effects are nonnegative on demand for X and the price effects are nonpositive for X. These are simply derivatives however and a nontrivial change in price or income may cause an individual to switch from one segment of the budget constraint to another.
Incorporating Heterogeneous Preferences
One would guess that all consumers do not have the same preferences for health care. Some may have a low or high risk or illness, others may be more or less risk averse. Moffitt modifies the demand function to incorporate this so that the new ‘regular’ demand function is: g(P,M;B,A)=g(P,M;B)+A.
Maximum Likelihood Estimation
From the above equations, consumers will choose to be on the first area only if Ag(p,m;B)X*. I assume that no one chooses to locate exactly on the kink between the two areas. If we assume that there is a normally distributed error term, we can create the following likelihood function.
L= [PI] Pr(X)

[PI] signifies that would should multiply the the probability of all the observations.

P(X)=f{A+e=Xg(P,M;B) AX*g(p,m;B)}

This is the probability we observe X, given the person chose X on area one (or area two).

 General distributional assumptions are that e~N[0,(s_e)^2], and A~N[a,(s_a)^2] where a is the mean of A which can be estimated using an observed set of covariates.
Now, that we know the distribution of this function, we simply use numerical methods to estimate the desired parameters and we will estimates for the demand function for a piecewiselinear budget constraint.
Robert Moffitt, Robert (1986); The Econometrics of PiecewiseLinear Budget Constraints: A Survey and Exposition of the Maximum Likelihood Method ; Journal of Business & Economic Statistics, Vol. 4, No. 3. (Jul., 1986), pp. 317328.