WRAP Data Dictionary: Grade and EdYears_Coded_Max20

This article describes the logic used in generating the "EdYears_Coded_Max20" calculated field.

There have been two questions asked of WRAP Participants in regards to their educational attainment.

The first question was asked early on in the "Entry Assessment Form" at their first Visit.  The question was:

      Which is the highest grade you completed in school?   (Field: ed)
 
                 Checkbox Symbol1  8th grade or less
                 Checkbox Symbol2  Some high school
                 Checkbox Symbol3  High school graduate / GED
                 Checkbox Symbol4  Some college or technical school (including AA degree)
                 Checkbox Symbol5  College graduate (BA or BS or equivalent)
                 Checkbox Symbol6  Post-graduate
                 ________  Total Years of Education (Field: edyrs)

This question was then followed up in the "Personal and Family Background" assessment of their second Visit with the following question:
 
      Which is the highest grade you completed in school?  (Field: Grade)
 
                 Checkbox Symbol1  Didn't go to school
                 Checkbox Symbol2  Grade school (1 - 4 years)
                 Checkbox Symbol3  Grade school (5 - 8 years)
                 Checkbox Symbol4  Some high school (9 - 11 years)
                 Checkbox Symbol5  High school diploma or G.E.D.
                 Checkbox Symbol6  Vocational or training school after high school graduation
                 Checkbox Symbol7  Some college or Associate Degree
                 Checkbox Symbol8  College graduate o Baccalaureate Degree
                 Checkbox Symbol9  Some college or professional school after college graduation
                 Checkbox Symbol10  Master's Degree
                 Checkbox Symbol11  Doctoral Degree (Ph.D., M.D., J.D., etc.)

                 ________  Total Years of Education (For example: High school degree plus one year of college classes = 12 + 1 = 13 total years of education) (Field: EducYrs)

(Note: The "ed", "edyrs", "Grade" and "EducYrs" fields are all present in the "Demographics" table.)
At some point, the first question was no longer used, and the second question was moved to the Entry Assessment at Visit 1. As we transitioned our database into OpenClinica, we elected not to retain the WRAP database "ed" field. Participants who had provided data on "ed," but not on "grade," were mapped to the Open Clinica field "oc_ed" using the following logic. Note: No records existed with ed = 1, so this case was not covered.

    If ("ed" = 2) then "oc_ed" = 4

    ElseIf ("ed" = 3) then "oc_ed" = 5

    ElseIf ("ed" = 4) then

        (If (("edyrs" >= 14) OR (first "NeuropsychScores.readstn" >= 99) OR ("WorkHistory.ComPeop1" < 5.5)) then "oc_ed" = 7

        Else "oc_ed" = 6)

    ElseIf ("ed" = 5) then "oc_ed" = 8

    ElseIf ("ed" = 6) then

        (If "edyrs" = 16, 17, 18, 19, 999 then "oc_ed" = 10

        ElseIf ("edyrs" >= 20) then "oc_ed" = 11)

Computing EdYears_Coded_Max20

In many applications it is customary to adjust for total years of education (e.g., as captured in our "edyrs" and "EducYrs" variables). However, over time
we determined that participants' interpretation of this question was uneven, with some reporting very large numbers in this field (in excess of 20 years) based on, e.g., frequent participation in noncredit continuing education. We wanted to derive a variable that would truncate these values in a sensible way based on the other information reported by participants about the kind of education they had received. Specifically, we sought to credit participants with a fixed number of years of education for each type of postsecondary degree, and to credit them more flexibly for educational attainment at the high school diploma or less, depending on the precise number of years reported. For this, we worked with the second, more granular educational attainment question (Grade) first, where available, and fell back to the first, coarser question (ed) otherwise. A more detailed explanation of this recoding follows.

A VBA function was created, named "CalculateTotalYearsEducation_Corrected", that is used in queries to return the "EdYears_Coded_Max20" for a WRAP Participant given their responses to the two educational attainment related questions.  This is the function that produces the values for the "EdYears_Coded_Max20" variable in the "MiscVars" table of the WRAP Data Freezes.

Here is the logic within the "CalculateTotalYearsEducation_Corrected" VBA function that returns the "EdYears_Coded_Max20" score:

      If there is a value in the "Grade" field, then

            If the Participant indicated "Doctoral Degree (Ph.D., M.D., J.D., etc.)",
                  then "EdYears_Coded_Max20" = 20.
            ElseIf the Participant indicated "Master's Degree",
                  then "EdYears_Coded_Max20" = 18.
            ElseIf the Participant indicated "Some college or professional school after college graduation",
                  then "EdYears_Coded_Max20" = 17.
            ElseIf the Participant indicated "College graduate o Baccalaureate Degree",
                  then "EdYears_Coded_Max20" = 16.
            ElseIf the Participant indicated "Some college or Associate Degree",
                  then "EdYears_Coded_Max20" = 14.
            ElseIf the Participant indicated "Vocational or training school after high school graduation",
                  then "EdYears_Coded_Max20" = 13.
            ElseIf the Participant indicated "High school diploma or G.E.D.",
                  then "EdYears_Coded_Max20" = 12.
            ElseIf the Participant indicated "Some high school (9 - 11 years)",
                  If (("EducYrs" Missing = False) And
                        ("EducYrs" >= 9) And ("EducYrs" <= 11)) Then
                              "EdYears_Coded_Max20"  = EducYrs
                  ElseIf (("EducYrs" Missing = True) And ( "NeuroPsych-VX-EducYrs" Missing = False) And _
                        ("NeuroPsych-VX-EducYrs" >= 9) And ("NeuroPsych-VX-EducYrs"<= 11)) Then
                              "EdYears_Coded_Max20" = "NeuroPsych-VX-EducYrs"
                  ElseIf (("EducYrs" Missing = True) And ("NeuroPsych-VX-EducYrs" Missing = True) And ('EdYrs" Missing = False) And _
                              ("EdYrs" >= 9) And ("EdYrs" <= 11)) Then
                              "EdYears_Coded_Max20" = "EdYrs"
                  Else
                              "EdYears_Coded_Max20" = 10
                  End If

            ElseIf the Participant indicated "Grade school (5 - 8 years)",

                  If (("EducYrs" Missing = False) And
                        ("EducYrs" >= 5) And ("EducYrs" <= 8)) Then
                              "EdYears_Coded_Max20"  = EducYrs
                  ElseIf (("EducYrs" Missing = True) And ( "NeuroPsych-VX-EducYrs" Missing = False) And _
                        ("NeuroPsych-VX-EducYrs" >= 5) And ("NeuroPsych-VX-EducYrs"<= 8)) Then
                              "EdYears_Coded_Max20" = "NeuroPsych-VX-EducYrs"
                  ElseIf (("EducYrs" Missing = True) And ("NeuroPsych-VX-EducYrs" Missing = True) And ('EdYrs" Missing = False) And _
                              ("EdYrs" >= 5) And ("EdYrs" <= 8)) Then
                              "EdYears_Coded_Max20" = "EdYrs"
                  Else
                              "EdYears_Coded_Max20" = 7
                  End If

           ElseIf the Participant indicated "Grade school (1 - 4 years))",

                  If (("EducYrs" Missing = False) And
                        ("EducYrs" >= 1) And ("EducYrs" <= 4)) Then
                              "EdYears_Coded_Max20"  = EducYrs
                  ElseIf (("EducYrs" Missing = True) And ( "NeuroPsych-VX-EducYrs" Missing = False) And _
                        ("NeuroPsych-VX-EducYrs" >= 1) And ("NeuroPsych-VX-EducYrs"<= 4)) Then
                              "EdYears_Coded_Max20" = "NeuroPsych-VX-EducYrs"
                  ElseIf (("EducYrs" Missing = True) And ("NeuroPsych-VX-EducYrs" Missing = True) And ('EdYrs" Missing = False) And _
                              ("EdYrs" >= 1) And ("EdYrs" <= 4)) Then
                              "EdYears_Coded_Max20" = "EdYrs"
                  Else
                              "EdYears_Coded_Max20" = 3
                  End If
            ElseIf the Participant indicated "Didn't go to school",

                  then "EdYears_Coded_Max20" = 0.

      Else, If there is a value in the "Ed" field, then

            If the Participant indicated "Post-graduate",
                  then "EdYears_Coded_Max20" = 18.
            ElseIf the Participant indicated "College graduate (BA or BS or equivalent)",
                  then "EdYears_Coded_Max20" = 16.
            ElseIf the Participant indicated "Some college or technical school (including AA degree)",
                  then "EdYears_Coded_Max20" = 14.
            ElseIf the Participant indicated "High school graduate / GED",
                  then "EdYears_Coded_Max20" = 12.
            ElseIf the Participant indicated "Some high school",
                  If (("EducYrs" Missing = False) And
                        ("EducYrs" >= 9) And ("EducYrs" <= 11)) Then
                              "EdYears_Coded_Max20"  = EducYrs
                  ElseIf (("EducYrs" Missing = True) And ( "NeuroPsych-VX-EducYrs" Missing = False) And _
                        ("NeuroPsych-VX-EducYrs" >= 9) And ("NeuroPsych-VX-EducYrs"<= 11)) Then
                              "EdYears_Coded_Max20" = "NeuroPsych-VX-EducYrs"
                  ElseIf (("EducYrs" Missing = True) And ("NeuroPsych-VX-EducYrs" Missing = True) And ('EdYrs" Missing = False) And _
                              ("EdYrs" >= 9) And ("EdYrs" <= 11)) Then
                              "EdYears_Coded_Max20" = "EdYrs"
                  Else
                              "EdYears_Coded_Max20" = 10
                  End If

            ElseIf the Participant indicated "8th grade or less",

                  If (("EducYrs" Missing = False) And
                        ("EducYrs" >= 0) And ("EducYrs" <= 8)) Then
                              "EdYears_Coded_Max20"  = EducYrs
                  ElseIf (("EducYrs" Missing = True) And ( "NeuroPsych-VX-EducYrs" Missing = False) And _
                        ("NeuroPsych-VX-EducYrs" >= 0) And ("NeuroPsych-VX-EducYrs"<= 8)) Then
                              "EdYears_Coded_Max20" = "NeuroPsych-VX-EducYrs"
                  ElseIf (("EducYrs" Missing = True) And ("NeuroPsych-VX-EducYrs" Missing = True) And ('EdYrs" Missing = False) And _
                              ("EdYrs" >= 0) And ("EdYrs" <= 8)) Then
                              "EdYears_Coded_Max20" = "EdYrs"
                  Else
                              "EdYears_Coded_Max20" = 5
                  End If



If you have any questions about this, please contact Erin Jonaitis or Dan Plotz of WRAP.

Document History

Version Date Change Reason Primary Author
8/16/2019 New KB Document Allen Wenzel
10/5/2022 Open Clinica text added Erin Jonaitis


Keywords:
total years education 
Doc ID:
94030
Owned by:
Dan P. in Wisconsin Alzheimer’s Program
Created:
2019-08-22
Updated:
2023-01-23
Sites:
Wisconsin Alzheimer’s Program