Thread: Massive Systems of Equations Problem

1. Massive Systems of Equations Problem

Hello there MHF,

I am working on a massive systems of equations problem (7 equations, 50+ variables) with which I could really use your help! I would rather not muddy the water with substantive context, but for those of you who are interested, the problem essentially arises when you have, in this case, 7 observed populations (groups) with observed sample sizes, but you know there is bidirectional misclassification going on between all populations. You know the observed group sizes and all rates of misclassification and are ultimately trying to solve for the true sample sizes.

I have found some online systems of equations calculators that will give me solutions for the 2 and 3 group problems (2 and 3 equations), but it breaks down when there are 4 or more equations (I was using https://quickmath.com/webMathematica...e/advanced.jsp). Is there a better website for 7 equations?

Anyway, here are all 7 equations with all variables. I am trying to solve for T_1, T_2, T_3, T_4, T_5, T_6, T_7.

• N_1 = T_1 – (T_1*a + T_1*c + T_1*g + T_1*m + T_1*u + T_1*E) + (T_2*b + T_3*d + T_4*h + T_5*n + T_6*v + T_7*F)
• N_2 = T_2 – (T_2*b + T_2*e + T_2*i + T_2*o + T_2*w + T_2*G) + (T_1*a + T_3*f + T_4*j + T_5*p + T_6*x + T_7*H)
• N_3 = T_3 – (T_3*d + T_3*f + T_3*k + T_3*q + T_3*y + T_3*I) + (T_1*c + T_2*e + T_4*l + T_5*r + T_6*z + T_7*J)
• N_4 = T_4 – (T_4*h + T_4*j + T_4*l + T_4*s + T_4*A + T_4*K) + (T_1*g + T_2*i + T_3*k + T_5*t + T_6*B + T_7*L)
• N_5 = T_5 – (T_5*n + T_5*p + T_5*r + T_5*t + T_5*C + T_5*M) + (T_1*m + T_2*o + T_3*q + T_4*s + T_6*D + T_7*N)
• N_6 = T_6 – (T_6*v + T_6*x + T_6*z + T_6*B + T_6*D + T_6*O) + (T_1*u + T_2*w + T_3*y + T_4*A + T_5*C + T_7*P)
• N_7 = T_7 – (T_7*F + T_7*H + T_7*J + T_7*L + T_7*N + T_7*P) + (T_1*E + T_2*G + T_3*I + T_4*K + T_5*M + T_6*O)

Many thanks!

Jnonymous

2. Re: Massive Systems of Equations Problem

7 equations and 50 variables leaves you a 43 dimension surface on which solutions appear.

You can't refine the system any more than this?

3. Re: Massive Systems of Equations Problem

Originally Posted by romsek
7 equations and 50 variables leaves you a 43 dimension surface on which solutions appear.

You can't refine the system any more than this?
Yes and no. The only true unknowns are T_1 – T_7, so I could refine the equations based on the known values of the other variables; however, the goal is to make a calculator in R where the user inputs the observed group sizes (N_1 – N_7) and each unidirectional misclassification rate (a – P) and it spits out the true group sizes, so I would prefer a solution that maintains all of the current variables. I'm really hoping there is a program out there that can do this automatically like I found for the 3 group solution...

4. Re: Massive Systems of Equations Problem

This is the first portion of your 1st equation
N_1 = T_1 – (T_1*a + T_1*c + T_1*g + T_1*m + T_1*u + T_1*E)

Why so unwieldy? Why not this way:
N_1 = T_1*(1 - a - c - g - m - u - E)

Get my drift?

5. Re: Massive Systems of Equations Problem

Originally Posted by DenisB
This is the first portion of your 1st equation
N_1 = T_1 – (T_1*a + T_1*c + T_1*g + T_1*m + T_1*u + T_1*E)

Why so unwieldy? Why not this way:
N_1 = T_1*(1 - a - c - g - m - u - E)

Get my drift?
Thanks for the response Denis. I have reduced the equations to this form and even further to N_1 = T_1*(1 - A_1) where A_1 = a + c + g + m + u + E, but this does not reduce the dimensionality of the solution, so I left the equations in their raw form. I was able to get a systems of equations solver to solve the 4 equation solution using this latter reduction, but it still crashes on 5+ equations.

6. Re: Massive Systems of Equations Problem

Originally Posted by jnonmous330
Thanks for the response Denis. I have reduced the equations to this form and even further to N_1 = T_1*(1 - A_1) where A_1 = a + c + g + m + u + E, but this does not reduce the dimensionality of the solution, so I left the equations in their raw form. I was able to get a systems of equations solver to solve the 4 equation solution using this latter reduction, but it still crashes on 5+ equations.
You basically have $N_i = \sum_{j=1}^7 a_{i,j}T_j$. So, you can put this into a matrix:

$$\left[ \begin{array}{ccc|c}a_{1,1} & \cdots & a_{1,7} & N_1 \\ \vdots & \ddots & \vdots & \vdots \\ a_{7,1} & \cdots & a_{7,7} & N_7\end{array} \right]$$

This is an augmented matrix where you have:

$a_{1,1} = 1 - a - c - g - m - u - E$

$a_{1,2} = b$

$a_{1,3} = d$

.
.
.

$a_{7,1} = E$

$a_{7,2} = G$

.
.
.

$a_{7,7} = 1-F-H-J-L-N-P$

Once you calculate the 49 coefficients and the 7 values for $N_i$, you can solve for each $T_i$ (if a solution exists) by putting the LHS of this augmented matrix into reduced row-echelon form.

Example: http://www.math.odu.edu/~bogacki/cgi-bin/lat.cgi?c=rref put in 7 rows and 8 columns. Then type in your results for each $a_{i,j}$ and each $N_i$. When you hit Submit, it will give you the answer in the right hand column. You should wind up with this:

$$\left[ \begin{array}{ccccccc|c}1 & 0 & 0 & 0 & 0 & 0 & 0 & T_1 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & T_2 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & T_3 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & T_4 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & T_5 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & T_6 \\ 0 & 0 &0 & 0 &0 & 0 & 1 & T_7\end{array} \right]$$

7. Re: Massive Systems of Equations Problem

Thank you so much for this, SlipEternal! By reformulating the problem as you suggested and using matrix algebra I was able to solve the problem in R and create my calculator successfully for up to 7 groups (7 equations). If anyone has a similar problem and is interested in seeing the R code, let me know!

Cheers,
Jnon