In this paper, published by DANE’s journal, we review some adjusted estimators of the population total by means of the Propensity Score (PS) technique to address nonresponse. In order to evaluate the performance of this approach, Monte Carlo simulations were implemented under without replacement proportional to size sampling (PIPS). We also used the proposed estimators in the … Sigue leyendo Using propensity score to calibrate estimators in complex surveys
Compressing big data files in R
Right now I am working with a big data file (+ 1million rows and several columns). Let's suppose that the name of the file is bigdata.txt. The size of this file is around 128MB; thus copying it into my Dropbox is not a good idea. However, after compressing my file in R, now the size … Sigue leyendo Compressing big data files in R
#PredictiveCOL (Update #1)
This is the first update of our predictions for the Colombian presidential run. Note that at this time, we still do not know if Martha Lucía Ramírez will be supported by the Conservative Party. This way, if election were held today, this is the SNAPSHOT (mere opinion) of the run. On the other hand, having into … Sigue leyendo #PredictiveCOL (Update #1)
Write this code on Mac’s Terminal if you have R issues with spanish accents
If you are writing in spanish inside R for MAC, maybe you will face an encoding issue when you type particular symbols as: ñ, á, é, í, ó, ú, etc. You can stop suffering by typing the following command on your terminal:defaults write org.R-project.R force.LANG en_US.UTF-8
No, it is not a survey, it is a poll!
I disagree with all of the political analysts when it comes to Colombian Presidential Elections (CPE). Everybody start to talk, chat and conclude about what is happening and what is going to happen if elections would be held today. Of course the source of that conclusions (by the way, misleading conclusions!!!) are the political polls … Sigue leyendo No, it is not a survey, it is a poll!
¡Que no, que no y que no! No es una encuesta, es un sondeo
No puedo estar de acuerdo con todos los analistas políticos cuando se trata de las elecciones presidenciales colombianas. Todo el mundo empieza a hablar, conversar y concluir sobre lo que está sucediendo y lo que va a suceder si las elecciones se celebraran hoy. Por supuesto, la fuente de que las conclusiones (por cierto, engañosas … Sigue leyendo ¡Que no, que no y que no! No es una encuesta, es un sondeo
samplesize4surveys R package (ss4s) – A message to my colleagues
I have worked for more than four years for a respected institution of the government of Colombia. My consulting job there is also linked with the review of sampling plans that external companies provide in order to get information about the impact that public programs may have over the people who benefit from some interventions. … Sigue leyendo samplesize4surveys R package (ss4s) – A message to my colleagues
A chat with Cifras&Conceptos
Did you hear about the successful prediction of the senate in Colombia? Well, this was a very entertaining chat among some professors of the Faculty of Statistics of Universidad Santo Tomás and the statistical team of Cifras&Conceptos. This is just a chat; neither Universidad Santo Tomás nor I have any relationship with Cifras&Conceptos.
Guide for writing good functions in R
Have you ever wondered how the heck do the programmers of R write the code behind the summary function? Have you noted that summary performs well in a vector, linear model, anova, etc. Well, I am right now writing an R package to compute sample sizes under different scenarios and this guide was very useful … Sigue leyendo Guide for writing good functions in R
Creating R packages in RStudio
RStudio is a powerful tool in hands of the applied statistician. For example, you can create beautiful documents using KnitR, which combine both LaTeX and R; you also can make beautiful presentations with Markdown. However, RStudio also serves as a friendly platform to create R packages. The following video will guide you in this easy … Sigue leyendo Creating R packages in RStudio
Useful code to show hidden files on Mac
Sometimes when you are using RStudio, it automatically creates a .RHistory file that it is not visible to you. To show hidden files on Mac just type the following command on your terminal:defaults write com.apple.finder AppleShowAllFiles TRUE; killall FinderTo hide those files, just type the following code on your terminal:defaults write com.apple.finder AppleShowAllFiles FALSE; killall … Sigue leyendo Useful code to show hidden files on Mac
Creating R packages in Mavericks (OS X)
Creating R packages in Mac is very simple. When I first created the TeachingSampling R package in Windows, it was such a trek. I remember that I had to install a lot of apps in order to compile the library.Well, times have changed and right now I am a Mac user. Actually, one of the … Sigue leyendo Creating R packages in Mavericks (OS X)