David A. Kenny
April 2, 2024
Data To Text

The datatotext macros on this page are no longer maintained."  You can still access these macros and programs, but there is no gaurantee that they work. Most of these macros have been replaced by shiny apps. To learn about these apps visit the DyadR page.

On this page there are links to SPSS, SAS, and R macros that will go from "data to text."  That is, you will just tell the program what variables you want analyzed, and the program performs relevant analyses, "make sense" of the analyses, and then creates text in English that summarizes those results.  You should go to the output file to examine the more detailed results from the relevant program (e.g., SPSS and SAS). Moreover, the macros create syntax that you might want to use for future analyses.

One should be very careful in making sure that the results from DataToText are correct.  The macros are planned to give warnings about possible problems in the analyses and these should be noted and appropriate changes should be made.  These macros still require careful thought and knowledge about the data analyses.  In fact, I hope it will lead to a better understanding about the meaning of the analysis and less work learning about the details of a statistical program.  I would appreciate that if you do use one of the macros in your research that you cite this website.  If one copie the DataToText output verbatim to one's results section, one needs to have quotation marks to make clear that the text was not generated by the author.  DataToText is meant as a tutorial to inform researchers about the meaning of their data.It can be used as a check of one's analyses.

I have created a Frequently Asked Questions page.   If you have questions click here.

I am most interested in feedback about these programs, but I cannot take the time to assist you in the interpretation of your particular dataset.

All these macros are quite preliminary.  Make sure the dataset is backed up, as it is possible, but not likely that the macro can destroy all or parts of your data.  Some macros will create new data sets that you may wish to save for future analyses.  It may also create "junk" datasets that it fails to erase.

To run an SPSS or SAS macro you need to do the following:
      1. Download the macro syntax (e.g., medtext.sps).
      2. Download the call statement (e.g., callmedtext.sps).
      3. Open SPSS or SAS.
      4. Open (Load) your data file using the menu: File>Open>Data (this is not necessary when running SAS)
      5. Open a Syntax Window using the menu: File>Syntax
      6. Find the macro that you downloaded in Step 1 (e.g. medtext.sps) and open it.
      7. Run the macro. To do so, use the menu: Run>All
      8. Open a Syntax Window using the menu: File>Syntax
      9. Find the call statement (e.g., callmedtext.sps) and open it.
      10. Put in the names of variables and other information for your run.
      11. Run the syntax: Run>All
      12. When done, find and open the file you named in the call statement.  It has the English text describing the results from your data analysis (e.g., c:/medtext.txt).

To run an R macro you need to do the following:
      1. Download the macro syntax (e.g., medtext.r) and additional files.
      2. Make sure the additonal files are place in the propery directory.
      3. Open R.
      4. Make sure all relevant libraries are accessible.
      5. Copy the macro into R.
      6. A window should pop up and fill in relevant information.
      7. You will be informed of warnings and where the test file exists.
      8. When done, find and open the textfile you named in the call statement.  It has the English text describing the results from your data analysis (e.g., c:/MedTextR.txt).

The macros are as follows:
      Mediation (revised September 25, 2011), written in SPSS
      Mediation written in R with serveral features not available in the SPSS version (very preliminary version)
      Moderation (corrections made in September 2014)
      Univariate Social Relations Model Using SAS
      Actor-Partner Interdependence Model Indistinguishable Dyads
      Actor-Partner Interdependence Model, Distinguishable Dyads (change made June 29, 2014)
      Group Actor-Partner Interdependence Model (changes made September 14, 2014)
      DyadR -- R Programs for Dyadic Data Analysis
             Descriptive Statistics for Restructured Dyadic Data (RDDD)
                  Individual to Pairwise
                  Individual to Dyad
                  Dyad to Pairwise
             Dyadic Data Analysis (DAR)
                Actor-Partner Interdependence Model with Indistinguishable Dyads: Multilevel Modeling
                Actor-Partner Interdependence Model with Indistinguishable Dyads: Structural Equation Modeling
                Actor-Partner Interdependence Model with Distinguishable Dyads: Multilevel Modeling
                Power Anaalysis for the Actor-Partner Interdependence Model with Indistinguishable Dyads
                Common Fate Model with Correlated Errors
                Common Fate Model with Paths
                Mutual Influence Model
                Confirmator Factor Analysis with Indistinguishable Dyads
                Tests of Distinguishablity

I am sorry, but I do not have time to teach you how to run a macro or to interpret the text.  I have created a Frequently Asked Questions page.   One should look not only at the text produced by DataToText, but also the output which contains syntax and the output.



Go back to the homepage.