This function numerically finds the equilibrium in a Stackelberg duopoly model with linear functions. For guaranteed existence of equilibrium, cost parameters should be non-negative. The general functional form for a function of argument x is f(x)=p0+p1x. Parameters p refer to the inverse demand function. The firm indexed by "l" is the leader, and the one indexed by "f" is the follower.
leader: vector of coefficients of the leader's cost function which in order must be: intercept of leader's cost function and linear term's parameter of leader's cost function
follower: vector of coefficients of the follower's cost function which in order must be: intercept of intercept of follower's cost function linear term's parameter of follower's cost function
demand: vector of coefficients of the market demand curve. Must be, in order, intercept and linear coefficient.
l0: Initial guess for leader's output. Defaults to 0. Strongly advised not to set this parameter unless you are very aware of what you're doing.
f0: Initial guess for follower's output. Defaults to 0. Strongly advised not to set this parameter unless you are very aware of what you're doing.
Returns
A list with market price, firm output, profits and market share