LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 2 Oct 2009 09:48:36 -0400
Reply-To:     Peter Flom <>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Flom <peterflomconsulting@MINDSPRING.COM>
Subject:      Best way to rearrange dyadic data
Content-Type: text/plain; charset=UTF-8

Good morning all

It's been a while since I've asked a question :-)

Before posting this one, I searched SAS-L and found similar questions (including some by me!) but I also found advice that each case is a little different.... so...

I have a data set with data on heterosexual couples. Currently, each line is an indvidual, and there are ~1000 variables. Each line includes

COUPLE - which is the couple ID ID - which is the individual's ID SEX - which is the individual's sex many many other variables, e.g. marital status. So, it looks something like this --------------------------------------- DATA HAVE Couple ID Sex A11 10260 10261 Male Single, Never Married 10260 10262 Female Widowed 10380 10381 Male Married 10380 10382 Female Married 10280 10281 Male Married 10280 10282 Female Married

etc for c. 300 couples and 1000 variables -------------------------------------------- for some parts of this analysis (it's going to be a long project - many months, anyway, with lots of analysis) this is the best order of data. But some of the initial work is checking whether the two members of a dyad agree.

for this, I *think* the best arrangement is

Couple A11M A11F 10260 Single, Never Married Widowed 10380 Married Married

(that's A with two ones)

Then I could just do PROC FREQ; table a11M*a11F; run; etc.

The nice thing is that every dyad has one male and one female, and the male always has a 1 suffix and the female a 2.

The hard thing is that there are hundreds of variables, some numeric, some character, many with a lot of missing data. And the variables have been named rather capriciously (e.g. the MARITAL variable is A11, other names are such things as D6_M). The variables have good labels, and have formats attached.

Any hints appreciated as always.

Note that I have to be out from 10 to about 2 or 3, Eastern time, so, if I don't reply, that's why.

Thanks as always


Peter L. Flom, PhD Statistical Consultant Website: www DOT peterflomconsulting DOT com Writing; Twitter: @peterflom

Back to: Top of message | Previous page | Main SAS-L page