SPSS Analysis Workflow
Use this workflow for medical, education, psychology, public-health, nursing, agriculture, and other research tasks that need variable inspection, SPSS syntax or menu steps, output verification, and manuscript-ready reporting.
1. Ingest files, screenshots, and study design
- Read the latest attached data file, variable view, SPSS output, or screenshot before giving final syntax or conclusions.
- Extract a working audit sheet: file/version, sample size, row identifier, variable names, labels, value labels, missing codes, grouping/time structure, and the user's stated research question.
- For screenshots, first transcribe the visible error/output text and current SPSS dialog; then give the smallest next action.
Concrete conventions:
- In the Go/No-go evidence, wide data used
Subject,major,Sex,RTgo_1~RTgo_4,ACCgo_1~ACCgo_4,ACCnogo_1~ACCnogo_4,AWE_1~AWE_4, andPTM_1~PTM_4; do not write long-format syntax until confirming how these four suffixes map to the four conditions. - The observed four-condition mapping was condition 1=红色歌曲/红歌, 2=中性歌曲/中歌, 3=红色器乐/红器, 4=中性器乐/中器; if the user says the variable names changed, update labels and prose to the latest names before reusing an old template.
- For Mplus/SPSS missing handling in the same trace,
MISSING ARE ALL (-99)was explicitly used; treat blank cells, text like(跳过), and numeric-99as different missing/value-label situations until the file confirms otherwise.
2. Build the variable map and quantitative coding plan
- Map variables into outcome, grouping factor, covariate, mediator, moderator, repeated-measure time/condition, questionnaire item, manipulation-check item, and attention-check item.
- Preserve original text columns when recoding; create numeric target variables with clear variable labels and value labels.
- For scale or questionnaire work, document item membership, reverse scoring, excluded checks, score range, and whether totals or means are used.
Concrete conventions:
- For the AOFAS ankle questionnaire,
follow_daycodes(跳过)as0for 初诊/baseline, and第1天,第2天,第3天,第5天,第7天as 1, 2, 3, 5, 7; coding(跳过)as missing changes baseline counts and downstream nonparametric tests. - For AOFAS scoring,
aofas_totalis the sum of nine dimensions:aofas_pain + aofas_function + aofas_walkdist + aofas_walksurface + aofas_gait + aofas_dorsiflex + aofas_hindfoot + aofas_stability + aofas_alignment, with theoretical maximum 100; if the questionnaire has an original total column, use it only to cross-check large coding mistakes. - Evidence-specific AOFAS item names include
pain_scorefor pain andfunction_scorefor function/support; pain options were scored 40/30/20/10 and function/support options 10/5/0, so do not recode them as simple 1/2/3/4 Likert values. - For affected-side VAS,
vas_affected = vas_leftwhenside = 1andvas_affected = vas_rightwhenside = 2; averaging left/right VAS or always taking one side changes the analysis target. - For questionnaire models with
TRU,AMO,IMP, andNFC, exclude attention-check/manipulation-check items before computing scale means, reverse-score reverse items first, then compute scale scores such asMEAN(...).
3. Check data quality and effective sample size
- Run frequencies/descriptives before method selection: unique values, missing counts, impossible ranges, duplicate IDs, row counts per group/time, and whether filters or deleted rows are active.
- State the deletion rule that each analysis uses: listwise deletion, pairwise/indicator-specific deletion, or complete-case analysis.
- If SPSS reports “不存在有效个案”, inspect whether all candidate variables are strings, value labels were entered without numeric values, user-missing values exclude all rows, filters/weights/split-file are active, or listwise deletion removes every row.
Concrete conventions:
- For manuscript revision around CEA、降钙素、被膜累及、脉管侵犯、神经侵犯, the evidence used complete case analysis and annotated each variable's effective N and missing cases below Table 1; do not report a single denominator for every clinicopathological indicator if variables have different missingness.
- For baseline sex comparison in the simulated clinical dataset, first filter to completed cases, then tabulate
group × genderand verify Pearson chi-square/P before writing the paper sentence; using all generated rows instead of completed cases changes counts and percentages. - When results differ from a previous run, check data source version, deleted rows, missing processing, filters, and variable coding before recalculating; one evidence trace located the discrepancy at an incorrectly deleted sample row.
4. Match statistical method to design and assumptions
- Choose the method from the research design and variable types, not from the user's preferred button: descriptive statistics, t-test/ANOVA, nonparametric test, chi-square/Fisher, correlation, linear/logistic regression, ROC, repeated-measures GLM, mixed model, PCA/factor analysis, cluster analysis, or mediation/moderation model.
- State the method rationale and prerequisite checks: normality, homogeneity, paired/repeated structure, sparse categories, multicollinearity, model encoding direction, or factorability.
- When the user's proposed method is inappropriate, explain the design mismatch and provide the closest valid SPSS route.
Concrete conventions:
- For a 2×2×2 repeated-measures accuracy template with N=58, do not reuse old prose if the user changes the design to SCIAT with only “相容/不相容”; update the within-subject factors and df from the current condition structure.
- For the speed manipulation evidence with 3 repeated levels and N=24, the correct repeated-measures df was
F(2, 46), notF(3, 476); derive df fromk-1and(k-1)*(n-1)before accepting a manuscript template. - For KAP or questionnaire group comparisons, use Levene to choose equal-variance vs unequal-variance t-test output, use ANOVA only for 3+ groups, and perform post-hoc comparisons only after a significant omnibus test.
- For EFA/survey validity screenshots, read
KMOandBartlettfirst, then inspect total variance explained, factor number, rotated component matrix, low loading/cross-loading items, and rerun after item changes. - For sparse multinomial/logistic outputs, inspect case-processing summaries and likelihood-ratio tests before interpreting coefficients; merge sparse categories or simplify predictors when estimates are unstable.
5. Produce executable SPSS syntax or menu steps
- Prefer reproducible SPSS syntax; add menu paths when the user is learning SPSS or sends screenshots of the interface.
- Include import, recoding, variable/value labels, missing values, compute/restructure commands, assumption checks, and final analysis commands as separate blocks.
- When targeting another statistical tool from SPSS-prepared data, still keep the SPSS data preparation traceable.
Concrete conventions:
- For Go/No-go moderated mediation, long format used
Subject major Sex condition X W AWE PTM RTgo ACCgo ACCnogo QianAWE XW condition_label;X = 1for songs and0for instrumental,W = 1for red and0for neutral, andXW = X*W. - For the Mplus twolevel model,
CLUSTER = Subject,WITHIN = X W XW,AWE ON X W XW, and each outcome (PTM,RTgo,ACCgo,ACCnogo) should be swapped one at a time in the outcome position; do not split “one variable one dataset” if the user asks to keep all variables in one long file. - If a screenshot/error says
BOOTSTRAP is not allowed with TYPE=TWOLEVEL, remove bootstrap for that twolevel model and use the compatible estimator/output route shown by the user's current syntax rather than retrying the same command. - For AOFAS and VAS recoding, generate numeric variables (
follow_day,pain_score,function_score,aofas_total,vas_affected) and labels before running Explore or nonparametric tests; running Explore on raw Chinese text columns can produce no valid cases.
6. Verify output and reconcile inconsistencies
- Read the returned SPSS output or screenshot; extract only visible or computed statistics: N, M, SD/SE, test statistic, df, p, CI, effect size, model coefficients, and table labels.
- Cross-check output against the data and manuscript table/prose: same variable, same coding direction, same sample, same deletion rule, same rounding.
- If output is unavailable, provide expected workflow and verification points, not fabricated results.
Concrete conventions:
- For repeated-measures writeups, extract
F, df,p, and partial eta-squared (η²p/η²) for each main effect and interaction; do not copy a template result when variable names, condition labels, or dfs differ. - For screenshot-based Cohen's d, first extract
N, means, SD, andt, then choose the formula by test type; do not confuse the CI for a mean difference with a CI ford. - For LMM/Sci table extraction, pull EMM, MD, CI, P, and fixed effects from the SPSS output; mark missing items explicitly instead of filling blanks from memory.
- For figures/tables, verify raw
M/SD/SEagainst visible bar heights, error bars, axes, and manuscript table values before claiming the chart matches.
7. Write manuscript text, table notes, and revision replies
- Convert verified outputs into methods text, results paragraphs, tables, figure notes, and reviewer replies.
- Preserve actual statistical direction, significance, N, p formatting, CI, units, group labels, and missing-data notes.
- For translation or polishing, keep technical terms and statistical claims equivalent to the source; do not add unverified causal or independent-risk claims.
Concrete conventions:
- For complete-case revision replies, include both the method and table note: variables such as CEA、降钙素、被膜累及、脉管侵犯、神经侵犯 had missingness, and each table row should show effective sample size/missing cases when denominators differ.
- For Logistic forest-plot text, treat OR=1 as the no-effect line; only describe an independent risk factor when the 95% CI does not cross 1 and the output P supports it.
- For moderated mediation prose, align labels exactly: evidence used
歌曲类型(0=红色歌曲,1=中性歌曲),音乐训练经历(0=无音乐训练,1=有音乐训练), mediator敬畏情绪, and outcomes such asGo反应时orGo正确率; if current coding usesX/Wdifferently, rewrite all interpretations accordingly.
Boundaries and refusals
- Do not give final syntax, statistical conclusions, or manuscript-ready text before checking variable names, coding, missingness, and effective N.
- Do not invent SPSS output values. Without output, give only steps, syntax, and a checklist of what to verify after running it.
- Do not detach method choice from study design. Explain why the selected test/model matches the outcome type, group/time structure, and assumptions.
- Do not ignore filters, split-file, weights, deleted rows, user-missing values, or listwise/pairwise deletion rules.
- Refuse requests to alter or fabricate data solely to obtain significance; redirect to valid cleaning, sensitivity analysis, model correction, or transparent reporting.
- For screenshots of errors, diagnose from the visible text and current dialog first; avoid broad reinstall/software-version advice unless the minimal fix fails.
Concrete conventions:
- If the task involves the AOFAS file, do not run final nonparametric tests until
follow_day,pain_score,function_score,aofas_total, andvas_affectedare numeric and verified by frequencies. - If the model syntax contains
TYPE=TWOLEVEL, do not keepBOOTSTRAPafter the output saysBOOTSTRAP is not allowed with TYPE=TWOLEVEL. - Do not treat
Subject-clustered Go/No-go rows as independent observations whencondition,X,W,XW,AWE,PTM,RTgo,ACCgo, andACCnogoare repeated within the same person.
Minimal example
User: “这个 AOFAS Excel 用 SPSS 做非参数检验,为什么探索提示不存在有效个案?”
Response pattern:
- Read the Excel and list actual columns/options.
- Confirm whether
aofas_totalis numeric; if not, recode raw items first. - Code
(跳过)infollow_dayas 0 for baseline, not missing. - Compute
pain_score,function_score, the remaining seven AOFAS dimensions, andaofas_totalas the nine-dimension sum. - Use frequencies to verify nonmissing
aofas_totalandfollow_day, then run Explore/nonparametric tests with the correct deletion rule. - Only after SPSS output returns, write the result sentence with the observed statistic, P value, and effective N.