By no means should any of this be taken as correct, until verified by a better skilled poster. Though, let's see if I can get on the right direction.
The full house vs. quads is probably the tougher of the two to calculate, so I'll start with the set over set.
I'd think of it this way, though my entire line of thought could be wrong... The odds of getting a pair are 1/17. So the odds of two players getting pockets pairs are 1/17 x 1/17.
The odds to complete the three of a kind by the river are 4.2 to 1
Based upon that, I'd calculate the odds of set over set are 1/17 x 1/17 x 1/4.2 x 1/4.2, or 1 in 5098 hands.
That's assuming that you were asking the result by the river. If both players flopped the set it'd be less likely. It'd be more on the order of 16256 to 1.
...
For the second part, check this thread
http://forumserver.twoplustwo.com/25...quads-1302867/
There's too many variables for me to determine the answer, but if you read through it you may be able to determine the answer.
Then just multiply the result by either 5098 or 16256.
That's my thinking anyway. Good luck.