Hi Everyone,
I need some help with a SAS problem. I am doing some research into twinning and need to identify a way of calculating the sex ratio of twins. What I want is to create a new column which will say FF for female/female twins, MM for male/male twins and MF for male/female twins. My data looks like this:
Mother Father d.o.b idtwin twin/single sex
123 987 15/9/99 12398715999 1 m
345 678 1/2/99 3456781299 2 m
345 678 1/2/99 3456781299 2 m
456 123 2/5/99 4561232599 1 f
674 789 3/4/99 6747893499 1 m
345 567 8/9/99 3455678999 2 m
345 567 8/9/99 3455678999 2 f
etc. Where idtwin is made by compressing the mother, father & date of birth and teh twin/single column is either 1=single or twin=twin.
I'd really appriciate any help on how to create a column and get a variable for twins to be eitehr ff, mm or mf.
Thanks!
I need some help with a SAS problem. I am doing some research into twinning and need to identify a way of calculating the sex ratio of twins. What I want is to create a new column which will say FF for female/female twins, MM for male/male twins and MF for male/female twins. My data looks like this:
Mother Father d.o.b idtwin twin/single sex
123 987 15/9/99 12398715999 1 m
345 678 1/2/99 3456781299 2 m
345 678 1/2/99 3456781299 2 m
456 123 2/5/99 4561232599 1 f
674 789 3/4/99 6747893499 1 m
345 567 8/9/99 3455678999 2 m
345 567 8/9/99 3455678999 2 f
etc. Where idtwin is made by compressing the mother, father & date of birth and teh twin/single column is either 1=single or twin=twin.
I'd really appriciate any help on how to create a column and get a variable for twins to be eitehr ff, mm or mf.
Thanks!