I haven't got any myself, but presumably, it's pretty straightforward to put twin 1 variables in one vector, twin 2 variables in another, and then call runif(1) to choose whether to flip the order, possibly using a dummy vector, dummy<-twin1; twin1<-twin2; twin2<-dummy. Or simply write them to a new dataset c(twin1,twin2) or c(twin2,twin1).
One thing to add: you need to be careful if you have opposite-sex dizygotic twins in your dataset, because the script you're using might assume that, say, twin 1 is always the male and twin 2 is always the female.
Not afaik
Log in or register to post comments
OSDZ twin pairs
Log in or register to post comments