ComeçarComece de graça

Dealing with Missing Test Scores

If we want to use SAT scores as our outcome, we should examine missingness. Examine the pattern of missingness across all the variables in nyc_scores using miss_var_summary() from the naniar package. naniar integrates with Tidyverse code styling, including the pipe operator (%>%).

There are 60 missing scores in each subject. Though there are many R packages which help with more advanced forms of imputation, such as MICE, Amelia, and mi, we will continue to use simputation and impute_median().

Create a new dataset, nyc_scores_2 by imputing Math score by Borough, but note that impute_median() returns the imputed variable as type "impute". You'll convert the variable to the numeric in a separate step.

simputation and dplyr are loaded.

Este exercício faz parte do curso

Experimental Design in R

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Load naniar
___

# Examine missingness with miss_var_summary()
___
Editar e executar o código