Psychology 602: Demonstration Problems

        These programs illustrate some common problems or issues in statistical analysis which continue to arise in class. Note that there are comments within each program that provide a more complete explanation than is found either on this page or on the SAS output.

        Each file contains the SAS code, as a .txt file in pure ASCII.

        To view a file, left-click on the link.

        To download a copy of a file, right-click on the link. [If you right-click with Internet Explorer, click on "Save Target As ..." and follow the prompts. If you right-click with Firefox or Chrome, click on "Save Link As ..." and follow the prompts.]

        [Remember to rename the file with a .SAS extension after you have downloaded it.]


        Icon to open demonstration text file  The Importance of Graphing Data
         
        Bassett, Bremner, Jolliffe, Jones, Morgan, and North (1986) created a revised set of 'Anscombe data' (Anscombe, 1973) for which both the simple correlation between y and X and the regression equation was exactly the same across all four datasets, respectively. This SAS program first fits a simple regression equation predicting y from X for each dataset, including various regression-related plots. More reasonable models are then fit to the second, third, and fourth datasets. Anything more than a cursory examination of the results of these analyses would strongly suggest to anyone reviewing the examples and their output the absolute necessity of graphing data as part of any inferential statistical analysis.
         
        Icon to open demonstration text file  Venn Diagram Example Data
         
        This SAS command file contains highly simplified example data for each of the Venn diagrams discussed in class, including examples for classic supression and net supression. The only role of this example is to link the Venn diagrams to the simple and multiple correlations that would produce such diagrams.
         
        Icon to open demonstration text file  Trend Analysis and Misanalysis
         
        This SAS command file illustrates two important issues in the use of the trend components to describe the functional relationship between a categorical predictor variable for which there exists a 'known' scaling and a criterion variable. First, the fact that a simple straight-line model seemingly fits the observed data well is shown. Second, the fact that the functional relationship between the factor and the criterion variable is multiplicative rather than additive can be easily seen in a graph of the means, and how to fit such a model to observed data is illustrated.
         
        Icon to open demonstration text file  Contrast Coefficients in Regression v. ANOVA
         
        This SAS command file illustrates the differences in how contrast-coded predictor variables are specificed in a regression analysis to test orthogonal contrasts among the means in comparison to how they are defined for the CONTRAST and ESTIMATE commands in SAS PROC GLM.
         
        Icon to open demonstration text file  Relationship between Sample Size and p
         
        This SAS command file uses a SAS macro to conduct a very simple simulation that illustrates the relationship between sample size and the magnitude of p, in an attempt to address one of the 'beliefs that will not die' among researchers: "My p value is very small, so my finding is highly likely"; or, of course, its abominable variant: "My p value is very small, so my finding is highly reliable".
         
        Icon to open demonstration text file  Relationship between Sample Size and power
         
        This SAS command file uses a SAS macro to conduct a very simple simulation that illustrates the relationship between sample size and the ability to detect a true and known effect (i.e., a mean difference) that exists in the population.