asdfree icon indicating copy to clipboard operation
asdfree copied to clipboard

download and read pnadc interviews microdata

Open DjalmaPessoa opened this issue 7 years ago • 6 comments

would it be possible to download and read pnadc interviews in

ftp://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Dados/

using lodown?

DjalmaPessoa avatar Dec 09 '17 13:12 DjalmaPessoa

hi, how do these differ from the non-annualized data? why would a user select these extracts and not the main files?

ajdamico avatar Dec 09 '17 13:12 ajdamico

there are news about pnadc. They seem to have included income variables that were in PNAD before. So, now it is possible to estimate Gini using pnadc microdata.
For that,  IBGE used data from the first interview of the year and not data for the quarter.

ajdamico avatar Dec 09 '17 13:12 ajdamico

To replicate the estimates in

https://biblioteca.ibge.gov.br/visualizacao/livros/liv101390.pdf

we have to use the microdata in

ftp://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Dados/PNADC_2016_entr1_20171201.zip

DjalmaPessoa avatar Dec 09 '17 13:12 DjalmaPessoa

The estimates mentioned by Miguel also used the microdata in

ftp://ftp.ibge.gov.br/Trabalho_e_Rendimento/Pesquisa_Nacional_por_Amostra_de_Domicilios_continua/Anual/Microdados/Dados/PNADC_2016_entr1_20171201.zip

This stresses the need to download and read them using lodown.

DjalmaPessoa avatar Dec 11 '17 12:12 DjalmaPessoa

@DjalmaPessoa i made some changes to pnadc.R so we'll see if this now includes the annual files

ajdamico avatar May 24 '18 17:05 ajdamico

Hi! I re-installed and it worked very well. If you want to update the book follow:

#2016 1st interview

  • pnadc_cat <- subset( pnadc_cat , year == 2016 & interview == '1' )

  • pnadc_df <- readRDS( file.path( path.expand( "~" ) , "PNADC" , "pnadc 2016 entr1.rds" ) )

#change the weight variable, annual is v1031 pre_stratified <- svydesign( ids = ~ upa , strata = ~ estrato , weights = ~ v1031 , data = pnadc_df , nest = TRUE )

  • change the pop. projection variable, annual is v1030 df_pos <- data.frame( posest = unique( pnadc_df$posest ) , Freq = unique( pnadc_df$v1030 ) )

Thanks a million

sfleite avatar May 24 '18 22:05 sfleite