Tuesday, September 8, 2020

How to Beautify your (SPSS) Outputs with MODIFY

** (Clicking on the any of the images displayed below will enlarge their contents) **

First, we will address the steps necessary to suppress unnecessary and unwanted columns within the SPSS Frequency tables.

The process to enable the MODIFY functionality is rather complicated. However, if you follow the steps below, you too will be able to have beautiful outputs without having to endeavor upon a lengthy manual cleanup process.

Steps Necessary to Enable the MODIFY Command

1. Un-install SPSS.

2. Install the latest version of Python Programming Language (3.x). The executable installer can be found here: www.python.org.

(NOTE: THIS STEP MUST STILL BE ADHERED TO, EVEN IF ANACONDA PYTHON HAS ALREADY BEEN PREVIOUSLY INSTALLED.)

3. Re-install SPSS. During the installation process, be sure to make all of the appropriate selections necessary to install the SPSS Python Libraries.

4. From the top menu within SPSS’s data view, select the menu title “Extensions”, then select the option “Extension Hub”.



5. Within the “Explore” tab of the “Extension Hub” menu, search for “SPSSINC MODIFY TABLES” within the left search bar.


6. Check the box “Get extension” to the right of “SPSSINC_MODIFY_TABLES”, then click “OK”.

7. The next screen should confirm that the installation of the extension has occurred.

Steps Necessary to Utilize the MODIFY Command

We are now prepared to obliterate all of those pesky ‘Percent’ and ‘Cumulative Percent’ tables from existence! In order to achieve this as it applies to all tables within the output section, create and run the following lines of syntax subsequent to frequency table creation.

SPSSINC MODIFY TABLES subtype="Frequencies"

SELECT='Cumulative Percent' 'Percent'

DIMENSION= COLUMNS

PROCESS = ALL HIDE=TRUE

/STYLES APPLYTO=DATACELLS.


Steps Necessary to Remove the top Frequency Rows Which Accompany Frequency Table Output


In order to suppress the creation of the type of table depicted above, you must modify your initial frequency syntax.

Instead of utilizing syntax such as:

FREQUENCIES VARIABLES=Q1 Q2 Q3

/ORDER=ANALYSIS.

You are instead forced to utilize a more verbose syntax:

OMS SELECT ALL /EXCEPTIF SUBTYPES='Frequencies'

/DESTINATION VIEWER=NO.

FREQUENCIES VARIABLES= Q1 Q2 Q3

/ORDER=ANALYSIS.

OMSEND.


Doing such adds lines of code. However, it is worth the effort. At least, in my opinion. As the offset to the trade is peace of mind. 

How to Suppress Syntax from Printing within the SPSS Output

In order to suppress syntax from printing within the SPSS Output widow, prior to creating output, follow the steps below.

1. From the top menu within SPSS’s data view, select the menu title “Edit”, then select the option “Options”.

2. Within the subsequent menu, select the tab “Viewer”. Then, remove the check mark located to the left of “Display commands in the log”. Next, click “Apply”.

You are now prepared to create SPSS session output devoid of syntax. 

How to Modify the Visual Style of SPSS Table Output

If you’d prefer a different, perhaps more readable SPSS table output, the following steps allow for the modification of such.

1. Create a table within SPSS which complies with the system default output style.

2. Right click on the table within the output, and select the options “Edit Content”, “In Separate Window” within the drop down menu.


3. Selecting “Format”, followed by “Table Looks” from the top menu, presents a new pop-up menu which allows for general table alterations.

As an example, select “ClassicLook” from the “TableLook Files:” menu.

Next, click the right “Edit Look” button, then click the tab “Cell Formats”. Within this submenu, the general background of table cells can be modified. Be sure to click “Apply” before clicking “OK”.


4. To save a custom “Look”, again select “TableLooks” from the “Format” menu. Select “Save Look”, with “<As Displayed>” selected within the right “TableLook Files” menu.


5. To load this look so that it is applied to all future outputs, select “Edit” from the top main SPSS Data View menu. Then select “Options” from the drop down menu followed by the tab “Pivot Tables”. Select the “Browse” button from beneath the “Table View” menu, then select the new look which you created.

6. Clicking “Apply”, followed by “OK”, will apply this look to all future tables created during the duration of the SPSS session.

If you ever want to revert back to the default look, follow the previous steps, and select “<System Default>” from the leftmost “TableLook” menu.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.