Class SocialMobilityMatrix
java.lang.Object
org.episteme.social.sociology.SocialMobilityMatrix
Models social mobility between classes using Markov chain transition matrices.
Provides tools to project future class distributions and analyze mobility metrics.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a socioeconomic class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Real[]findEquilibrium(Real[][] matrix) Finds the equilibrium class distribution (Steady State) of the matrix.static RealmobilityIndex(Real[][] matrix) Calculates the mobility index (Prais Index) of a transition matrix.static Real[]projectClassDistribution(Real[] initialDistribution, Real[][] transitionMatrix, int generations) Projects the class distribution after a specified number of generations.
-
Method Details
-
projectClassDistribution
public static Real[] projectClassDistribution(Real[] initialDistribution, Real[][] transitionMatrix, int generations) Projects the class distribution after a specified number of generations. Formula: P_future = P_current * M^n- Parameters:
initialDistribution- Array representing initial population percentages in each classtransitionMatrix- Square matrix where M[i][j] is probability of moving from class i to class jgenerations- Number of time steps to project- Returns:
- Array representing the future class distribution
- Throws:
IllegalArgumentException- if matrix dimensions do not match distribution
-
mobilityIndex
Calculates the mobility index (Prais Index) of a transition matrix.Index M = (n - trace(P)) / (n - 1)
Where trace(P) is the sum of diagonal elements (stayers). 0 implies perfect immobility (identity matrix). 1 implies perfect mobility (random chance, essentially).- Parameters:
matrix- the transition matrix- Returns:
- the mobility index
-
findEquilibrium
-