Video summary
Mandat mater 5,6,7 cleaning, recode dan compute
Main summary
Key takeaways
Main Ideas and Lessons
-
Course context & logistics
- The lecturer, Nurul Setyaningtyas, introduces the next topics in the data management course as preparation for the midterm exam.
- Materials and assignments will be shared on Google Classroom, where students can ask questions.
- The lecturer emphasizes that students must still complete assignments, and submission is tied to SPSS work.
-
Data cleaning (cleansing)
- Purpose: checking and ensuring the correctness of data entry.
- What it checks for:
- Validity of codes/values
- Example: education code should only fall within an allowed range. Even if a total looks correct (e.g.,
total = 100), an invalid code (e.g., education code"7"when only1–4are allowed) indicates an entry error that must be re-checked.
- Example: education code should only fall within an allowed range. Even if a total looks correct (e.g.,
- Consistency across related variables/tables
- Example: if only 20 respondents are KB participants, but a contraceptive-type frequency table sums to 24, then there are likely data entry errors because totals don’t logically match.
- Plausibility checks using cross-tabulation
- Example concept: comparing age vs. number of children can reveal impossible/unlikely combinations (e.g., a 15-year-old with a very high number of children). This suggests values may have been entered into the wrong case/value and require correction.
- Validity of codes/values
-
Data quality criteria for successful cleansing
-
The lecturer lists key quality requirements, including:
-
Validity (accuracy of meaning and allowed structure)
- Data must have clear types, allowed value ranges, no empty fields (or a decision strategy for empties), uniqueness, and proper formatting/patterns.
-
Completeness
- Data elements should be filled. Empty data must be handled by either:
- discarding the record/sample (if acceptable), or
- filling missing values using additional information.
- Completeness matters even for fields not used in analysis (e.g., names), because incomplete/duplicate/mistyped fields reflect input errors.
- Data elements should be filled. Empty data must be handled by either:
-
Consistency
- Related variables must agree across the dataset (e.g., KB participant counts must match related contraceptive distributions).
-
Uniformity
- Data should follow consistent standards (e.g., using the same unit/type representation throughout, such as “one size” consistently).
-
Additional criteria mentioned
- Effectiveness & efficiency (time and project cost)
- Data security
- Data processing contingencies (handling risks during processing)
-
-
Data transformation
-
Purpose: convert existing variables into new variables that better match analysis needs.
-
Typical transformation goals:
- Grouping/recoding variables into categories
- Example: convert numeric age into categories (e.g., young vs. risk vs. not at risk).
- Combining variables with mathematical operations
- Example: compute differences or totals (e.g., weight before vs. after; calculate change; compute HB increase/decrease).
- Grouping/recoding variables into categories
-
SPSS terminology: “Compute” vs. “Recode/Record”
-
Compute (computer variable)
- Creates or modifies values of a new variable using arithmetic or function-based operations.
- Can work for numeric/string types, with emphasis on numeric.
- SPSS workflow:
- Go to Transform → Compute Variable
- Choose the Target Variable (new variable name)
- Build the numeric expression (e.g.,
remainder = savings - loans, orHB_difference = HB2 - HB1) - Confirm with OK
- Example logic described:
- difference calculation (e.g.,
HB2 - HB1) producing positive/negative/zero outcomes.
- difference calculation (e.g.,
-
Recode into different variables (lecturer’s term for SPSS action analogous to recoding/grouping)
- Used to group values into categories and store results in a new variable (recommended instead of overwriting the original).
- SPSS workflow:
- Go to Transform → Recode into Different Variables
- Select the input variable
- Enter the output variable name (new variable)
- Define categories: old value ranges → new coded values
- Press Continue / OK
- Example classification:
- Baby weight:
- LBW if < 2500 → code 1
- Not LBW if ≥ 2500 → code 2
- Baby weight:
- Lecturer emphasizes why automated recoding is better than manual:
- manual grouping increases error rate, especially with large datasets and fatigue/time pressure.
-
-
-
End of session / assignment reminder
- The lecturer re-emphasizes that compute and recode (and/or grouping using SPSS transforms) will be used later in research.
- Students are reminded to finish remaining assignments, with submissions handled via the classroom/assignment section.
Methodology / Instruction-Style Steps
A) Data Cleaning Approach (Checking Data Correctness)
-
Verify allowed value ranges/codes
- Check categorical codes fall within the expected set (e.g., education code should be only
1–4).
- Check categorical codes fall within the expected set (e.g., education code should be only
-
Check totals and cross-table consistency
- Compare related tables (e.g., KB participant counts vs. contraceptive-type totals).
- If totals don’t match logically, identify likely entry errors.
-
Validate cross-tab plausibility
- Use pairings such as age vs. number of children to find impossible/unlikely patterns.
- Correct entries likely mis-entered into the wrong case/value.
B) SPSS “Compute Variable” Workflow (Math-based new variable)
- In SPSS, go to Transform → Compute Variable
- Set the Target Variable (name for the computed variable)
- Choose/create the Numeric Expression
- Examples mentioned:
remainder = savings - loansHB_difference = HB2 - HB1
- Examples mentioned:
- Click OK to apply the computation
- Use the resulting variable for later analysis (differences may be negative/zero/positive)
C) SPSS “Recode into Different Variables” Workflow (Category grouping)
- Go to Transform → Recode into Different Variables
- Select the Input Variable
- Set the Output Variable
- Prefer creating a different/new variable so the original remains visible.
- Define recoding rules
- Specify old value range → new code value
- Example:
- if baby weight < 2500 → code 1 (LBW)
- if baby weight ≥ 2500 → code 2 (Not LBW)
- Click Change to add each rule
- Click Continue, then OK
- Use the new coded variable in analysis (e.g., value labels/categories)
Speakers / Sources Featured
- Nurul Setyaningtyas — lecturer/instructor for the data management course
Rate this summary
Your feedback will help improve summaries.
Improve this summary
Reprocess with a stronger model when the summary feels incomplete or inaccurate.
Translate summary in another language
Ask questions to this video
Chat for follow-up questions, clarifications, and source-backed answers.