I experimented with faction attitudes and wrote down all the IDs, which are basically the same order as in pedpop.dat.
0 - Prefects
1 - Nerds
2 - Jocks
3 - Dropouts/Townies
4 - Greasers
5 - Preppies
6 - Non-Clique Students
7 - Cops
8 - Teachers
9 - Townspeople
10 - Shopkeepers
11 - Bullies
12 - ? (Crashes upon load)
13 - Player
An example of changing the attitude for the nerds to hate the player:
PedSetTypeToTypeAttitude(1, 13, 0)
SetFactionRespect(1, 0)
The first line sets the nerds to attack the player on sight, and the second line sets their 'respect percentage' in the menu to 0%.
EDIT: In another faction-related subject, you can change the faction of a script-created ped using: PedSetFaction(l_1_7, 1)
This example in particular when added onto the debug bodyguard script madman has on the first page will turn whoever you spawned as your bodyguard into a nerd.