1
I’m looking to analyze the 1999 PNAD and expand its results to the population, so I’m using the package Survey
and , however, my problem lies in the import and construction phase of the sampling plan.
In my references I’m having trouble:
On import with package
lodown
are not lowering in theget_catalog
PNAD 1999 data according to http://asdfree.com/pesquisa-nacional-por-amostra-de-domicilios-pnad.html.In this reference, the link:
source_url( "https://raw.githubusercontent.com/ajdamico/asdfree/master/Pesquisa%20Nacional%20por%20Amostra%20de%20Domicilios/download%20all%20microdata.R", prompt = FALSE , echo = TRUE )
is not working, which is "Master script to take care of all the download steps": https://www.linkedin.com/pulse/como-ler-pnad-r-jo%C3%A3o-Victor-dias/? originalSubdomain=en
It is possible to force the 1999 PNAD lodown
and consequently appear in the get_catalog
?
lodown( "pnad" , output_dir = file.path( path.expand( "~" ) , "PNAD" ) )
library(lodown)
# examine all available PNAD microdata files
pnad_cat <-
get_catalog( "pnad" ,
output_dir = file.path( path.expand( "~" ) , "PNAD" ) )
# 2011 only
pnad_cat <- subset( pnad_cat , year == 2011 )
# download the microdata to your local computer
pnad_cat <- lodown( "pnad" , pnad_cat )