East Carolina University
Department of Psychology


SAS Code, Weaver & Wuensch


    Each of the programs below is in a plain text file.  Click the desired link, copy the text into the SAS editor, enter your data, and submit.  Alternatively, download *the zip, extract files, submit to SAS.

  1. Test value of rho  -- for each test, enter r, rho, n, and alpha.  Submit.

  2. Test intercept and/or slope -- enter value of estimator (intercept or slope), null value, standard error, df, alpha, and note.  Submit.

  3. Compare two independent correlation coefficients, z test -- enter r1, r2, n1, n2, alpha, and note.  Submit.

  4. *Compare two independent regression coefficients -- enter number of predictors, both slopes or intercepts, both sample sizes, alpha, and note.  Submit.

  5. Compare two or more independent coefficients --  for each group, enter group number, coefficient, standard error, sample size, and note.  Submit.

  6. Compare two non-independent correlations with one variable in common --enter r12, r13, r23, n, alpha, and note.  Submit.

  7. *Compare two non-independent correlations with no variables in common -- enter n, r12, r13, r14, r23, r24, r34, alpha, and note.  Submit.

  8. Test Hypotheses of Coincidence, Equal Slopes, and Equal Intercepts Using Raw Data, k independent groups --  Tinker with code.  Submit.

*Updated on the 7th of February, 2013.  *Erratum

    In SAS 9.3, the default is for output to be in HTML and with ODS graphics enabled when code is submitted from the windowing environment.  However, if one submits the code in batch mode (by double clicking on the file name), the default output is plain text (a listing).  We have used a "txt" extension rather than an "sas" extension for the modules above to facilitate reading the code from a browser.  When users save a module to their computer they are free to change the extension to "sas," if they wish.  If SAS is already open, one can "File, Open Program" and bring in the contents of any plain text file, regardless of the extension.  The second author typically opens the file with Notepad first, edits the code, and then copies it into the SAS enhanced editor.  In the zip, the extensions are "sas."