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.
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
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):
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.
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
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.
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
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.
When the program is loaded you obtain the screen below and make the appropriate choice: