PHLT 8032 Week 10 SPSS Syntax Audit Example

SPSS Revealed Walden University Free custom sample in 24 to 48h

This PHLT 8032 Week 10 syntax audit example reorganizes nine weeks of SPSS commands into seven commented blocks, reruns them on a fresh import of the raw spreadsheet, and reports the results in a memo. Walden PHLT 8032 asks whether every reported figure can be reproduced, and here 44 of 47 come back exactly. The memo traces the three that do not: a BMI recode that overwrote its own variable and was run twice, moving overweight respondents into the normal band; a SELECT IF that deleted adults 65 and older when a FILTER was meant; and a frequent physical distress figure copied from output made before the 88 recode. Each discrepancy gets its cause, its fix and the figures it changed. Students in the PhD in Public Health research courses can use it as a reproducibility check before a final report.

CoursePHLT 8032 SPSS Revealed
WeekWeek 10
Paper typeSyntax audit and memo
LengthAbout 1,230 words, 7 pages
FormatAPA 7 student paper
SchoolWalden University
ProgramPhD in Public Health
UpdatedOctober 2026

Free sample paper for PHLT 8032 Week 10

1

Syntax Audit for the Harlow County Survey Analysis: An Annotated Command File in Labeled Blocks and a Memo on the Full Rerun, Three Discrepancies, Their Causes, Their Fixes and the Figures They Changed

Student Name

Walden University

PHLT 8032: SPSS Revealed

Instructor Name

Month Day, Year

What this page is doingThe title promises both deliverables and names the discrepancies, which tells the grader the audit found something and fixed it.
2

Syntax Audit for the Harlow County Survey Analysis: An Annotated Command File in Labeled Blocks and a Memo on the Full Rerun, Three Discrepancies, Their Causes, Their Fixes and the Figures They Changed

Purpose of the Audit

Every figure reported in this course so far was produced in SPSS sessions spread over nine weeks, some through dialogs and some from pasted syntax. This audit asks a simple question: if the raw spreadsheet were imported again and the syntax file run from top to bottom, would every reported figure come back exactly? Sandve et al. (2013) list keeping a record of every step that produces a result as the first rule of reproducible analysis, and Wilson et al. (2017) recommend a single script that rebuilds the analytic file from the raw data. Before this week, the syntax file existed but had never been run as a whole. It has now been reorganized into labeled blocks, commented, and rerun on a clean import.

What this page is doingFraming the audit as a single question with a pass test makes the memo's findings easy to judge.
3

The Annotated Syntax File

The file opens with a header comment naming the data source, the survey year, the author, the date of the audit and the rule that the file must run from top to bottom without dialogs. It is divided into seven blocks. Each block begins with a comment stating the decision it carries out and the cleaning log entry or week that justifies it. Table 1 shows the block structure with each block's opening comment and its principal commands.

Comments state reasons, not mechanics. The comment opening Block 3, for example, reads: "88 means none in the codebook, so it is recoded to zero into ment_d and phys_d; the source variables are kept unchanged; see log entries 1 and 2." A reader who opens the file cold can tell why each transformation exists and where the decision was recorded, which is the test Pallant (2020) proposes for a well-documented file. Exploratory runs that informed a decision but produced no reported figure were moved to a final section headed "Not reported," so the main blocks contain only commands behind published numbers.

Table 1

Structure of the Audited Syntax File

BlockOpening commentPrincipal commands |
1 RetrievalImport raw spreadsheet; identifier as string width 6, date as mm/dd/yyyy (Week 1)GET DATA, SAVE OUTFILE to a new working file |
2 DefinitionNames, labels, value labels and measurement levels (Weeks 1 and 2)VARIABLE LABELS, VALUE LABELS, VARIABLE LEVEL |
3 Recodes and missing values88 to 0 into new variables; 77, 99, 7 and 9 user-missing (log entries 1 to 3, 11, 12)RECODE INTO, MISSING VALUES |
4 Computed variablesCleaned height and weight, BMI, BMI category, age group (log entries 5 to 9)COMPUTE, IF, RECODE INTO |
5 Case selectionRemove keyed-twice duplicate; subgroup checks by FILTER only (log entry 4)SELECT IF for the duplicate, FILTER BY for subgroups |
6 Descriptive analysesStatistics, Frequencies, Descriptives and Explore (Week 4)FREQUENCIES, DESCRIPTIVES, EXAMINE |
7 ComparisonsCrosstabs with tau-b; Mann-Whitney by insurance (Weeks 7 and 8)CROSSTABS, NPAR TESTS M-W |

Note. Comments use the asterisk form and close with a period; each block ends with EXECUTE where a transformation must be applied before the next block reads it.

What this page is doingA comment quoted in full shows the grader the commenting standard rather than asserting it.
4

The Rerun

The raw spreadsheet was imported into a new session, and the syntax ran from Block 1 to Block 7 without intervention. Every figure reported in the Week 4 descriptives, the Week 5 chart, the Week 7 and Week 8 results and both Week 9 tables was then compared with the rerun output, along with the figures in the working draft of the final report: 47 figures in all. Forty-four matched to the last reported decimal. Three did not, and each is described below with its cause, its fix and the figures it changed.

Discrepancy 1: A BMI Recode Run Twice

The draft final report stated that 31.6% of respondents with a valid BMI were overweight or obese. The rerun gave 68.6%. The cause was a recode that collapsed the four BMI categories into three by overwriting the variable in place: underweight and normal were combined as 1, overweight became 2 and obese became 3. In the original session it was run once through the dialog and again when the pasted syntax was executed. A recode in place is not safe to repeat. The second pass treated the new codes as old ones, so overweight respondents, now coded 2, were moved into category 1, and obese respondents, now coded 3, were moved into category 2 under the label "overweight." The saved file therefore held a category that looked plausible and was wrong. The fix replaces the in-place recode with a recode from the scale BMI variable into a new variable, bmi_cat3, which gives the same result however many times it runs. The corrected distribution is 31.4% normal or underweight, 37.0% overweight and 31.6% obese, so the 31.6% in the draft was in fact the obese share alone.

What this page is doingExplaining why a repeated in-place recode corrupts data, step by step, is the reasoning that earns credit for this discrepancy.
5

Discrepancy 2: SELECT IF Where FILTER Was Meant

The draft report gave the share of respondents with frequent mental distress, 14 or more poor days, as 12.3%. The rerun gave 10.9%, the figure reported in Week 4. The cause was a subgroup check run for the Week 7 discussion, which limited the analysis to respondents under 65 with SELECT IF. SELECT IF deletes the unselected cases from the active file, unlike FILTER, which only hides them, and the file was saved afterward. The next session opened a working file holding 1,361 respondents instead of 1,845, and the frequent distress share was computed on that reduced file. Field (2018) warns that the delete option in Select Cases is permanent once the file is saved, which is exactly what happened. The fix restricts SELECT IF in the syntax to the single duplicate removal, uses FILTER BY for every subgroup check with FILTER OFF immediately after, and adds a line after Block 5 that prints the case count so any unexpected loss shows at once. The 12.3% also appeared in the Week 7 discussion post as a figure for all respondents; a correction was posted to the thread.

Discrepancy 3: A Percentage From Before the 88 Recode

The draft report gave the share of respondents with frequent physical distress as 15.8%. The rerun gave 6.2%. The cause was an output file from before the cleaning log's first entries, when 88 had been briefly declared user-missing rather than recoded to zero. With 88 treated as missing, the 1,104 respondents with no poor physical health days dropped out of the denominator, and 113 respondents with 14 or more days were divided by 715 instead of 1,819. The figure had been copied from an old output file rather than regenerated. The fix is procedural: every figure in the final report will now be regenerated from the audited syntax, and output files from before the cleaning log are archived in a folder marked superseded.

What the Audit Changes

Three figures in the draft final report change: the BMI category distribution, frequent mental distress from 12.3% to 10.9% and frequent physical distress from 15.8% to 6.2%. No figure in the Week 4, 5, 7, 8 or 9 write-ups changed; the one discussion post figure was corrected in the thread. The syntax file now reproduces all 47 figures from the raw spreadsheet, and the final report will cite it in an appendix.

References

Field, A. (2018). Discovering statistics using IBM SPSS Statistics (5th ed.). SAGE.

Pallant, J. (2020). SPSS survival manual: A step by step guide to data analysis using IBM SPSS (7th ed.). Routledge.

Sandve, G. K., Nekrutenko, A., Taylor, J., & Hovig, E. (2013). Ten simple rules for reproducible computational research. PLoS Computational Biology, 9(10), Article e1003285. https://doi.org/10.1371/journal.pcbi.1003285

Wilson, G., Bryan, J., Cranston, K., Kitzes, J., Nederbragt, L., & Teal, T. K. (2017). Good enough practices in scientific computing. PLoS Computational Biology, 13(6), Article e1005510. https://doi.org/10.1371/journal.pcbi.1005510

Reading the PHLT 8032 Week 10 instructions

The tenth assignment usually asks students to assemble their syntax into a single file that rebuilds the analysis from the raw data, then rerun it and report what they find. Faculty expect the file divided into logical blocks, each opening with a comment that states the decision it carries out and points to the log entry or week that justified it. The memo should explain how the rerun was done, how many reported figures were compared and how many matched. Any discrepancies need a cause, a fix and a list of the figures they changed. Prompts often warn against syntax that only restates commands in comments. Honest reporting of errors earns more credit than a file presented as flawless, since the purpose of the week is reproducibility rather than perfection.

How this PHLT 8032 Week 10 example is built

The memo opens with the audit's single question and the reproducibility principles behind it. A section describes the annotated file, with a table listing its seven blocks, each block's opening comment and its principal commands, and quotes one comment in full to show the standard. The rerun section reports that 47 figures were compared and 44 matched. Three discrepancy sections follow. The first walks step by step through how an in-place recode run twice corrupted the BMI categories and why recoding from the scale variable fixes it. The second explains the difference between SELECT IF and FILTER and the reduced file that resulted. The third traces a figure to old output. A closing section lists the three changed figures and confirms the submitted write-ups stand.

PHLT 8032 Week 10 rubric: what earns full marks

The audit is graded on organization, commenting and honesty. A syntax file that runs from top to bottom with blocks and decision-level comments earns the structural credit; comments that only restate commands earn little. In the memo, graders look for a clear rerun procedure, a count of figures checked and an explanation of every mismatch. Each discrepancy should be traced to a specific cause, fixed in a way that prevents recurrence, and connected to the figures it changed. Explaining why an in-place recode is unsafe to repeat, or why SELECT IF deletes cases, shows understanding beyond the fix. Credit also goes to separating exploratory commands from those behind reported numbers. Sources on reproducible research support the memo's framing, and corrections already posted to a thread count in its favor.

PHLT 8032 Week 10 help: mistakes that cost marks

Audit memos lose credit when they claim everything matched without showing how the comparison was made, or when a discrepancy is fixed without its cause. Start the rerun from the raw file in a fresh session, run the syntax as a whole, and compare every reported figure, not a sample. For each mismatch, find the command or habit that produced it, change the syntax so it cannot happen again, and list the figures it affects. Comment each block with the decision and its justification, not a description of the command. Move exploratory runs into a separate section. An annotated syntax file and audit memo built from your own section's commands can be prepared along the same lines.

Get a PHLT 8032 Week 10 example written to your instructions

Enclose the Week 10 prompt and rubric, and your syntax file if the course permits, with file paths stripped. An audit memo with a matching table and annotated blocks returns in 24-48h, free the first time. The syntax it audits was written for a composite file, not yours.

More PHLT 8032 papers and PhD in Public Health samples

PHLT 8032 Week 10 questions, answered

What if the course never required syntax until now?

Then the audit starts by reconstructing it. Pasting from dialogs, or copying commands from the output log, recovers most of the steps, and the memo notes which decisions had to be rebuilt from memory. That honesty earns credit. A syntax file presented as though it had been kept all term, when it was assembled this week, tends to show gaps the rerun exposes.

Does every analysis need to be in the syntax file?

Every figure that appears in a report should be traceable to a command. Exploratory runs that informed a decision but produced nothing reported can sit in a separate section or be omitted with a note. The audit's promise is limited to reported figures, and the memo says so, so a reader knows exactly what the syntax guarantees and what it does not.

How much commenting is enough?

One comment per block stating the decision and its reason, plus a header naming the data source, date and author. Line-by-line comments restating what each command does add length without explanation. The test is whether someone opening the file cold could tell why each transformation exists, and link it to the cleaning log entry that justifies it.

Where can I find a free PHLT 8032 Week 10 sample paper?

The full Week 10 syntax audit appears here, with a table of the annotated file's seven blocks and a memo tracing three discrepancies to their causes, fixes and the figures they changed.

Why is running a recode twice a problem?

A recode that overwrites its own variable treats its new codes as old ones on the second pass. In this sample, collapsing BMI categories in place and repeating it moved overweight respondents into the normal band.