*** Creating and Manipulating Variables *** *** Stata Code * Code Answers As Correct for Financial Literacy Questions * generate byte m6_correct = 1 if M6 == 1 replace m6_correct = 0 if M6 != 1 generate byte m7_correct = 1 if M7 == 3 replace m7_correct = 0 if M7 != 3 generate byte m8_correct = 1 if M8 == 2 replace m8_correct = 0 if M8 != 2 generate byte m9_correct = 1 if M9 == 1 replace m9_correct = 0 if M9 != 1 generate byte m10_correct = 1 if M10 == 2 replace m10_correct = 0 if M10 != 2 * Sum Number of Correct Answers generate fin_lit_score = m6_correct + m7_correct + m8_correct + m9_correct + m10_correct