David A. Kenny
May 9, 2016

RDDD: Programs To

Restructure & Describe Dyadic Data (RDDD)


     For some, it might help to read Kenny, Kashy, & Cook Chapter 1 or view the Dyad Structures webinar for definitions of the different data structures. Also view the Restructuring Dyadic Data webinar.   (There is a small charge if you view more than one webinar; there is also a powerpoint on Restructuring Dyadic Data.)

     RDDD was originally three different programs written in R to restructure dyadic data. The programs are available in two forms. There are web-based programs that can be run by just going to a webpage and not having to load R. To go to links to those programs click here. The other type are R programs which are described here in some detail. (These R programs are no longer being changed, except to fix any obvious errors.) However, the two types of program are essentially the same; what differs is how to access them and the user interface.

     To understand how to load an R program, go to Tom Ledermann's R Instructions page. To run the programs the following R packages must be first downloaded: plyr, reshape, foreign, and RGtk2. All of these re-structuring programs were co-written with Thomas Ledermann. The programs are follows (click on the program for a description and to go to a download link):

     ItoP: Convert an individual dataset and turn it into a pairwise dataset.
     ItoD: Convert an individual dataset and turn it into a dyad dataset.
     DtoP: Convert a dyad dataset and turn it into a pairwise (or individual) dataset.
  RDDD: Combines all three R restructuring programs into one program.

You can download a paper written by Thomas Ledermann and David A. Kenny that describes the programs in detail at RDDD.pdf.

     As stated above, these programs can be run directly from the web. This application does not require downloading of R or any knowledge of R, as it is web-based. These programs were written with the assistance of Robert Ackerman. The programs can be accessed by click on the following link:  General Entry Page to Web-based Programs. It is helpful to read below to get an idea of what information even if you use the web-based version so that you get an idea of what information you need to provide the programs.

ItoP  

     This program converts an individual dataset into a pariwise dataset and was co-written with Thomas Ledermann.  This program has not been extensively checked and results should be carefully reviewed.  Files that can be downloaded:  

The program: ItoP.R

The program without a graphical user interface: ItoP.R

Sample data: indiv.sav

Text with descriptive statistics: de-emphasizing

Output data file: pairwise.csv  

Load ItoP.R into R (with its packages) and you will obtain the following screen (changes have been made for the example and also some small changes have been made in the program):

 

Description: http://davidakenny.net/dtt/rgui.jpg

Add in the information that you need for your dataset.

The descriptive statistics supplied are the mean, standard deviation, N, and the intraclass correlation variable for each variable. The researcher is alerted to variables that do not vary, low N variables, and variables for which only one of the two members of the dyad is measured. This program removes the string variables from the dataset.

ItoD

  This program converts an individual dataset into a dyad dataset and was co-written with Thomas Ledermann.  It presumes that the dataset contains a distinguishing variable and it creates two variables, one for each member. This program has not been extensively checked and results should be carefully reviewed.  Here are some files to download:

The program: ItoD.R

The program without graphical user interface: ItoD.R

Sample data: indiv.sav

Text with descriptive statistics: cs.txt

Output data file: dyad.csv

Load ItoD into R (and the packages) and you will obtain the following screen (changes have been made for the example and also some small changes have been made in the program):

 

Description: Individual to Dyad GUI

Add in the information that you need for your dataset.

The descriptive statistics supplied are the mean, standard deviation, maximum and minimum values, N, and the intraclass correlation variable.  Additionally, the mean and standard deviations are given for each member of the dyad, as well as the correlation across members.  The researcher is alerted to variables that do not vary, low N variables, and variable for which only one of the two members of the dyad is measured.  This program removes string variables.

DtoP

     This program converts a dyad dataset into a pairwise or individual dataset and was co-written with Thomas Ledermann.  It presumes that variable have a code at the end (a suffix) or beginning (a prefix) that denotes which member the variable refers to. For instance, for a dataset with heterosexual couples, the male variable might end with "_M" and the female variables with "_F." This program provides a very brief text output, as well as the restructured data. Here are some files to download:

The program: DtoP.R

The program without graphical user interface: DtoP.R

Sample data: dyad.csv

Text with descriptive statistics: DtoPtextfile.txt

Output data file: indiv2.csv

  Load DtoP.R (and packages) into R and you will obtain the following screen:

 

Description: http://davidakenny.net/dtt/rgui.jpg

RDDD

This program combines the three above R programs into a single program. When the program is loaded you obtain the screen below and make the appropriate choice.

  The program: RDDD.R

When the program is loaded you obtain the screen below and make the appropriate choice:

Description: http://davidakenny.net/dtt/rgui.jpg

 



Go back to homepage.