Every troop has a set of stats in the troops.txt file. These define the troop's level, starting stats and skills. However, the actual stats of troops do not match the file, as the game uses a different method of determining those stats. At the beginning of a new game, the game engine takes the starting stats of the troop, then randomly adds more stats until it runs out, and then uses this stat set for the rest of that game.
This randomizing effect, in tandem with the slightly less randomized equipment that troops can receive, allows for variety of the troops in-game. At the same time, it could upset balance by its random nature, if a troop is particularly blessed with good stat placement or cursed with poor stat placement. This makes it important to look at the game's unique stats to ensure that desired troops are not gimped.
The formula that it uses to determine the total attribute points (at least for factional troops) appears to be Troop Level + 20. So a Level 21 Swadian Man-at-Arms has a total of 41 Attribute points. These stats are not distributed equally, so the troop could theoretically receive most of its points in less useful attributes like Intelligence and Charisma.
The method by which skills are distributed is less coherent, as there is far less consistency among the troops skill sets. All that can really be said is that the skills will always be at least as high as reported in the troops.txt file, and that these troops do not have the same restrictions the player and companions have, and are thus able to have higher skills than their stats would normally allow.
Weapon Proficiencies appear to be completely static, and match the file.