Question: discuss part 3 3. Construct a flag variable, cg.miss, that takes value 1 when capital gain (pre-imputation) is missing, and 0 otherwise. Hint: Use an
3. Construct a flag variable, cg.miss, that takes value 1 when capital gain (pre-imputation) is missing, and 0 otherwise. Hint: Use an ifelse command. Construct a contingency table, with income as the rows, and cg.miss as the columns, showing the counts. Discuss. 0 1 50K 3485 69 Observing the contingency table, it was surprising as all the 69 missing values for capital gain had income greater than $50,000 compared to none for the income less than equal to $50,000. I 4. Add a new field, ID. To show it is working, select only Record #2001 to display here. education 2001 10 Maye sanital.asin capital.loss income ca, imp cg.miss ID capo? 2001 3. Construct a flag variable, cg.miss, that takes value 1 when capital gain (pre-imputation) is missing, and 0 otherwise. Hint: Use an ifelse command. Construct a contingency table, with income as the rows, and cg.miss as the columns, showing the counts. Discuss. 0 1 50K 3485 69 Observing the contingency table, it was surprising as all the 69 missing values for capital gain had income greater than $50,000 compared to none for the income less than equal to $50,000. I 4. Add a new field, ID. To show it is working, select only Record #2001 to display here. education 2001 10 Maye sanital.asin capital.loss income ca, imp cg.miss ID capo? 2001
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
