Randomly selecting a person from household listing, depending on age and relationship to the household head

Get into a household and list all members with age and relationship to the head of the household.
Age is numeric, so anybody above 15 years is eligible to be selected randomly.
Relationship 1=head, 2=spouse, 3=children, 4=cousin, 5= brother, 6=househelp.
I would want help in writing a syntax that randomly selects any member who is 15 years and has code 1,2 or 3 in the relationship (the relationship is nuclear family) and also samples another member from code 4,5 and 6 in the relationship (the relationship is extended family).
Thankyou
@sergiy