Exame Nacional de Desempenho de Estudantes (ENADE)

Build Status Build status

The Exame Nacional de Desempenho de Estudantes (ENADE) evaluates the performance of undergraduate students in relation to the program content, skills and competences acquired in their training. The exam is mandatory and the student’s regularity in the exam must be included in his or her school record.

Simplified Download and Importation

The R lodown package easily downloads and imports all available ENADE microdata by simply specifying "enade" with an output_dir = parameter in the lodown() function. Depending on your internet connection and computer processing speed, you might prefer to run this step overnight.

library(lodown)
lodown( "enade" , output_dir = file.path( path.expand( "~" ) , "ENADE" ) )

Analysis Examples with base R

Load a data frame:

enade_df <- readRDS( file.path( path.expand( "~" ) , "ENADE" , "2015 main.rds" ) )

Variable Recoding

Add new columns to the data set:

enade_df <- 
    transform( 
        enade_df , 
        
        # qual foi o tempo gasto por voce para concluir a prova?
        less_than_two_hours = as.numeric( qp_i9 %in% c( 'A' , 'B' ) ) ,
        

        state_name = 
            factor( 
                co_uf_curso , 
                levels = c( 11:17 , 21:29 , 31:33 , 35 , 41:43 , 50:53 ) ,
                labels = c( "Rondonia" , "Acre" , "Amazonas" , 
                "Roraima" , "Para" , "Amapa" , "Tocantins" , 
                "Maranhao" , "Piaui" , "Ceara" , "Rio Grande do Norte" , 
                "Paraiba" , "Pernambuco" , "Alagoas" , "Sergipe" , 
                "Bahia" , "Minas Gerais" , "Espirito Santo" , 
                "Rio de Janeiro" , "Sao Paulo" , "Parana" , 
                "Santa Catarina" , "Rio Grande do Sul" , 
                "Mato Grosso do Sul" , "Mato Grosso" , "Goias" , 
                "Distrito Federal" )
            )

    )

Unweighted Counts

Count the unweighted number of records in the table, overall and by groups:

nrow( enade_df )

table( enade_df[ , "tp_sexo" ] , useNA = "always" )

Descriptive Statistics

Calculate the mean (average) of a linear variable, overall and by groups:

mean( enade_df[ , "nt_obj_fg" ] , na.rm = TRUE )

tapply(
    enade_df[ , "nt_obj_fg" ] ,
    enade_df[ , "tp_sexo" ] ,
    mean ,
    na.rm = TRUE 
)

Calculate the distribution of a categorical variable, overall and by groups:

prop.table( table( enade_df[ , "state_name" ] ) )

prop.table(
    table( enade_df[ , c( "state_name" , "tp_sexo" ) ] ) ,
    margin = 2
)

Calculate the sum of a linear variable, overall and by groups:

sum( enade_df[ , "nt_obj_fg" ] , na.rm = TRUE )

tapply(
    enade_df[ , "nt_obj_fg" ] ,
    enade_df[ , "tp_sexo" ] ,
    sum ,
    na.rm = TRUE 
)

Calculate the median (50th percentile) of a linear variable, overall and by groups:

quantile( enade_df[ , "nt_obj_fg" ] , 0.5 , na.rm = TRUE )

tapply(
    enade_df[ , "nt_obj_fg" ] ,
    enade_df[ , "tp_sexo" ] ,
    quantile ,
    0.5 ,
    na.rm = TRUE 
)

Subsetting

Limit your data.frame to Students reporting that the general training section of the test was easy or very easy:

sub_enade_df <- subset( enade_df , qp_i1 %in% c( "A" , "B" ) )

Calculate the mean (average) of this subset:

mean( sub_enade_df[ , "nt_obj_fg" ] , na.rm = TRUE )

Measures of Uncertainty

Calculate the variance, overall and by groups:

var( enade_df[ , "nt_obj_fg" ] , na.rm = TRUE )

tapply(
    enade_df[ , "nt_obj_fg" ] ,
    enade_df[ , "tp_sexo" ] ,
    var ,
    na.rm = TRUE 
)

Regression Models and Tests of Association

Perform a t-test:

t.test( nt_obj_fg ~ less_than_two_hours , enade_df )

Perform a chi-squared test of association:

this_table <- table( enade_df[ , c( "less_than_two_hours" , "state_name" ) ] )

chisq.test( this_table )

Perform a generalized linear model:

glm_result <- 
    glm( 
        nt_obj_fg ~ less_than_two_hours + state_name , 
        data = enade_df
    )

summary( glm_result )

0.18 Analysis Examples with dplyr

The R dplyr library offers an alternative grammar of data manipulation to base R and SQL syntax. dplyr offers many verbs, such as summarize, group_by, and mutate, the convenience of pipe-able functions, and the tidyverse style of non-standard evaluation. This vignette details the available features. As a starting point for ENADE users, this code replicates previously-presented examples:

library(dplyr)
enade_tbl <- tbl_df( enade_df )

Calculate the mean (average) of a linear variable, overall and by groups:

enade_tbl %>%
    summarize( mean = mean( nt_obj_fg , na.rm = TRUE ) )

enade_tbl %>%
    group_by( tp_sexo ) %>%
    summarize( mean = mean( nt_obj_fg , na.rm = TRUE ) )