Description:
        Top 3 alternatives 16 moment conditions objective function
    Parameters:
        params:  all parameters for the Plackett-Luce mixture model (numpy ndarray)
        moments: values of the moment conditions from the data (numpy ndarray)

def top3_reduced(params, moments):
    """
    Description:
        Top 3 alternatives 16 moment conditions objective function
    Parameters:
        params:  all parameters for the Plackett-Luce mixture model (numpy ndarray)
        moments: values of the moment conditions from the data (numpy ndarray)
    """
    params = np.asarray(params)
    alpha = params[0]
    a = params[1:5]
    b = params[5:]
    p = np.asarray(moments)
    p1 = alpha*a+(1-alpha)*b-p[:4]
    p21 = alpha*a[0]*a[2:]/(1-a[0])+(1-alpha)*b[0]*b[2:]/(1-b[0])-p[4:6]
    p22 = alpha*a[1]*np.hstack((a[0],a[3]))/(1-a[1])+(1-alpha)*b[1]*np.hstack((b[0],b[3]))/(1-b[1])-p[6:8]
    p23 = alpha*a[2]*a[:2]/(1-a[2])+(1-alpha)*b[2]*b[:2]/(1-b[2])-p[8:10]
    p24 = alpha*a[3]*a[1:3]/(1-a[3])+(1-alpha)*b[3]*b[1:3]/(1-b[3])-p[10:12]
    p3 = np.array([
        alpha*a[0]*a[2]*a[3]/(1-a[2])/(a[0]+a[1])+(1-alpha)*b[0]*b[2]*b[3]/(1-b[2])/(b[0]+b[1])-p[12],
        alpha*a[0]*a[1]*a[3]/(1-a[3])/(a[1]+a[2])+(1-alpha)*b[0]*b[1]*b[3]/(1-b[3])/(b[1]+b[2])-p[13],
        alpha*a[0]*a[1]*a[2]/(1-a[0])/(a[3]+a[2])+(1-alpha)*b[0]*b[1]*b[2]/(1-b[0])/(b[3]+b[2])-p[14],
        alpha*a[2]*a[1]*a[3]/(1-a[1])/(a[0]+a[3])+(1-alpha)*b[2]*b[1]*b[3]/(1-b[1])/(b[0]+b[3])-p[15]
        ])
    allp = np.concatenate((p1,p21,p22,p23,p24,p3))
    return np.sum(allp**2)