Asking in newsgroup about a way to solve logistic regression

Solve[{a + b + c + d == m0, b + d == m1, c + d == m2, 
          d ==  m3} /. {a -> (t0/(1 + t0)), 
          b -> ((t0 t1)/(1 + t0 t1)), c -> ((t0 t2)/(1 + t0 t2)), 
          d -> ((t0 t1 t2 t3)/(1 + t0 t1 t2 t3))}, {t0, t1, t2, 
        t3}]

eqns = {a + b + c + d == 4 m0, b + d == 4 m1, 
          c + d == 4 m2, d == 4 m3} /. {a -> (t0/(1 + t0)), 
          b -> (((t0 t1))/(1 + t0 t1)), 
          c -> (((t0 t2))/(1 + t0 t2)), 
          d -> (((t0 t1 t2 t3))/(1 + t0 t1 t2 t3))}

Solve[eqns, {t0, t1, t2, t3}]

sol = {t0 -> (a/(1/4 - a)), 
          t1 -> (b/(1/4 - b)) ((1/4 - a)/a), 
          t2 -> (c/(1/4 - c)) ((1/4 - a)/a), 
          t3 -> (m3/(1/4 - m3)) (a/(1/4 - a)) ((1/4 - 
                    b)/b) ((1/4 - c)/c)} /. {a -> m0 - m1 - m2 + m3, 
          b -> m1 - m3, c -> m2 - m3}

eqns /. sol // Simplify

Asking in newsgroup about a way to solve logistic regression

Asking in newsgroup about a way to solve logistic regression

eqns = {a + b + c + d == 4*m0, b + d == 4*m1, c + d == 4*m2, d == 4*m3} /. {a -> t0/(1 + t0), b -> (t0*t1)/(1 + t0*t1), c -> (t0*t2)/(1 + t0*t2), 
    d -> (t0*t1*t2*t3)/(1 + t0*t1*t2*t3)}

Solve[eqns, {t0, t1, t2, t3}]

sol = {t0 -> a/(1/4 - a), t1 -> (b/(1/4 - b))*((1/4 - a)/a), t2 -> (c/(1/4 - c))*((1/4 - a)/a), 
    t3 -> (m3/(1/4 - m3))*(a/(1/4 - a))*((1/4 - b)/b)*((1/4 - c)/c)} /. {a -> m0 - m1 - m2 + m3, b -> m1 - m3, c -> m2 - m3}

eqns /. sol // Simplify