-
Notifications
You must be signed in to change notification settings - Fork 27
Update FCS High threshold update #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@odai-saleh suggested changes are part of this review.
Generally the code mixes elements of indicator calculation with outlier detection and imputation.
This will create issues in the use of the code for automations.
| *** Harmonize Data Quality Guidance measures | ||
| *** Clean impossible values | ||
|
|
||
| RECODE FCSStap FCSPulse FCSDairy FCSPr FCSVeg FCSFruit FCSFat FCSSugar (LOWEST THRU -1 = SYSMIS). | ||
| RECODE FCSStap FCSPulse FCSDairy FCSPr FCSVeg FCSFruit FCSFat FCSSugar (8 THRU HIGHEST = SYSMIS). | ||
| EXECUTE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These rows refer to a logical data cleaning of the dataset.
Suggest to move to dedicated cleaning process.
| *** Harmonize Data Quality Guidance measures | ||
| *** Check that FCS is between 0-112 | ||
|
|
||
| DESCRIPTIVES VARIABLES=FCS | ||
| /STATISTICS=MEAN STDDEV MIN MAX. | ||
|
|
||
| *** Clean any impossible FCS values | ||
|
|
||
| Value labels FCSCat21 1.00 "Poor" 2.00 "Borderline" 3.00 "Acceptable". | ||
| RECODE FCS (LOWEST THRU -1 = SYSMIS). | ||
| RECODE FCS (113 THRU HIGHEST = SYSMIS). | ||
| EXECUTE. | ||
|
|
||
| *** Important note: pay attention to the threshold used by your CO when selecting the syntax (21 cat. vs 28 cat.) | ||
| *** Use this when analyzing a country with high consumption of sugar and oil – thresholds 28-42 | ||
| *** Flagging potential Data Quality issues. If any cases reflected here, refer to the Data Quality Guidance note pages 36-37. This can be found on the VAM Ressource Centre | ||
|
|
||
| COMPUTE FCS_flag_low = 0. | ||
| IF (FCS LT 14) FCS_flag_low = 1. | ||
| VARIABLE LABELS FCS_flag_low "FCS has low values that could be a Data Quality issue. Refer to the Data Quality guidance for recommended actions". | ||
| VALUE LABELS FCS_flag_low | ||
| 0 "No" | ||
| 1 "Yes". | ||
|
|
||
| COMPUTE FCS_flag_high = 0. | ||
| IF (FCS GT 100) FCS_flag_high = 1. | ||
| VARIABLE LABELS FCS_flag_high "FCS has high values that could be a Data Quality issue. Refer to the Data Quality guidance for recommended actions". | ||
| VALUE LABELS FCS_flag_high | ||
| 0 "No" | ||
| 1 "Yes". | ||
|
|
||
| * Check flagged cases | ||
|
|
||
| Recode FCS (lowest thru 28 = 1) (28.5 thru 42 = 2) (42.5 thru highest = 3) into FCSCat28. | ||
| Variable labels FCSCat28 "FCS Categories: 28/42 thresholds". | ||
| FREQUENCIES VARIABLES=FCS_flag_low FCS_flag_high | ||
| /ORDER=ANALYSIS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outlier detection step, this should be done in the statistical cleaning process.
| *** Sample check of food group distributions (recommended for data quality review) | ||
|
|
||
| FREQUENCIES VARIABLES=FCSStap FCSPulse FCSDairy FCSPr FCSVeg FCSFruit FCSFat FCSSugar | ||
| /FORMAT=NOTABLE | ||
| /STATISTICS=MINIMUM MAXIMUM MEAN. | ||
|
|
||
| *** Optional: Compute the same variable to be used directly for IPC analysis (referring to IPC phases) | ||
|
|
||
| RECODE FCS (LOWEST THRU 28 = 1) (28.5 THRU 42 = 2) (42.5 THRU HIGHEST = 3) INTO FCSCat28IPC. | ||
| VARIABLE LABELS FCSCat28IPC "Official IPC Classification for FCS - high thresholds". | ||
| VALUE LABELS FCSCat28IPC | ||
| 1 "Acceptable - IPC Phase 1-2" | ||
| 2 "Borderline - IPC Phase 3" | ||
| 3 "Poor - IPC Phase 4-5". | ||
| EXECUTE. | ||
|
|
||
| *** Check distribution of final categories | ||
|
|
||
| FREQUENCIES VARIABLES=FCSCat28IPC | ||
| /ORDER=ANALYSIS. | ||
|
|
||
| *** ---------------------------------------------------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a second copy of the indicator with reversed classes?
I find this confusing.
No description provided.