Install CmdStan for R in Windows

Assuming that Rtools is already installed, these are the steps to install cmdstanr from RStudio in Windows 10:


This is cmdstanr version 0.5.3 – CmdStanR documentation and vignettes: – CmdStan path: C:/Users/tonis/Documents/.cmdstan/cmdstan-2.30.0 – CmdStan version: 2.30.0 A newer version of CmdStan is available. See ?install_cmdstan() to install it. To disable this check set option or environment variable CMDSTANR_NO_VER_CHECK=TRUE.


Error: Rtools42 installation found but the toolchain was not installed. Run cmdstanr::check_cmdstan_toolchain(fix = TRUE) to fix the issue. cmdstanr::check_cmdstan_toolchain(fix = TRUE)

Installing mingw32-make and g++ with Rtools42. The C++ toolchain required for CmdStan is setup properly!


The C++ toolchain required for CmdStan is setup properly!

install_cmdstan() # This check, download and install the latest release (it takes long!)


* Finished installing CmdStan to C:/Users/you/Documents/.cmdstan/cmdstan-2.31.0 CmdStan path set to: C:/Users/you/Documents/.cmdstan/cmdstan-2.31.0


«The install_cmdstan() function attempts to download and install the latest release of CmdStan. Installing a previous release or a new release candidate is also possible by specifying the version or release_url argument. The rebuild_cmdstan() function cleans and rebuilds the CmdStan installation. Use this function in case of any issues when compiling models.«

From time to time it might be worth to check if a new version is available. In such case, install_cmdstan() and rebuild_cmdstan()will do rest.

If all goes well, you can use backend = "cmdstanr« to fit brms models.

The main reference to this summary is the CmdStan User’s Guide.

Read also this page with some other recommendations, for example:

Instead of installing R in the standard location, C:\Program Files\R\R-x.y.z, I suggest that you use C:\R\R-x.y.z. Again, x.y.z is the current version of R. This will allow you to install packages in the main R library without running R with administrator privileges and may avoid problems that sometimes occur when there are spaces in paths.


DAGitty — draw and analyze causal diagrams

Visit this site to create causal diagrams online or in R.

DAGitty is a browser-based environment for creating, editing, and analyzing causal diagrams (also known as directed acyclic graphs or causal Bayesian networks). The focus is on the use of causal diagrams for minimizing bias in empirical studies in epidemiology and other disciplines. For background information, see the «learn» page.

Worth reading: Is this the future of assessment? (Christodoulou, D., 2022)

Another interesting «worth to read» piece is found in TES magazine with the title: «Is this the future of assessment?».  The author is Daisy Christodoulou and she introduces the topic as follows:

Calls for exams to be scrapped have grown louder in the wake of the Covid-19 pandemic. But rather than getting rid of exams, we may just need to reimagine them

Some of my takeaways are:

  • Scores (numbers) are better than grades (letters) to assess students.
  • The war against «traditional summative closed-book  exams» in school education seems to be a worldwide trending topic.
  • However, «Many non-exam assessment techniques introduce grey areas and ambiguities into the assessment process that are vulnerable to being exploited» and, as Daisy also points out: «Teacher assessment is subject to human biases«.
  • On the other hand, on-screen assessments can play an important complementary role but adopters must be aware of that it introduces complexity with both opportunities and risks. (i.e., mode effect , backwash-effect and other consequences).
  • The arrival of  ChatGPT AI will have strong multi-level consequences in education. Thus, practitioners must start thinking how to deal with these AI technologies in the near (immediate) future.

Enjoy the reading!

Worth reading: A Critical Perspective on Effect Sizes (Quentin A., 2022)

Effect sizes (ES) are usually required by journal editors to help readers to better understand research outcomes. However, ES should be understood and, when reported, researcher must provide not only which ES metric is used (Hedge’s g, Cohen’s d, and the Glass Δ,  η2 and ηp2 …) but also additional information such as sample sizes and statistical power to detect small effect sizes of interest (sesoi) to make them fully informative.:

In this post «A Critical Perspective on Effect Sizes (Quentin A., 2022)» the André Quentin introduces the topic as follows:

In this blog post, I am sharing a slightly-modified version of a presentation I gave to HEC Montreal’s “Research Day on Open Science and Replications in Marketing”. It is called “A Critical Perspective on Effect Sizes”.

I start with a quick refresher on what effect sizes are, discuss the conditions under which effect sizes contain useful information, and conclude by offering some heuristics to evaluate effect sizes.

Enjoy the reading 🙂

Protegido: Questionable research findings

Este contenido está protegido por contraseña. Para verlo, por favor, introduce tu contraseña a continuación:

Covid-19: Cuarentena día 6. La situación de hoy en España

El post de hoy es un gráfico que muestra la tasa de infectados por cada 100.000 habitantes en las comunidades autónomas (regiones) de España:

Tasa diaria de infectados por n-Covid19 por cada 100.000 habitantes en las distintas Comunidades Autónomas (Regiones) de España.

Tasa diaria de infectados por n-Covid19 por cada 100.000 habitantes en las distintas Comunidades Autónomas (Regiones) de España.

Se aprecia que La Rioja (1ª) y Navarra (3ª) comparten con Madrid (2ª) las tres primeras posiciones a pesar de que de las dos primeras apenas se habla. Las dos líneas verticales señalan fechas importantes en la evolución de la pandemia en España. La negra corresponde al 8 de marzo y la roja al 15 de marzo.

Covid-19: Cuarentena día 4. Dr. Tedros, la PCR y los datos de Italia.

En este segundo post que escribo en el 4ª día de cuarentena (leer aquí el primero) hablaré de tres asuntos  relacionados con la pandemia #Covid-19. Queda para una próxima entrada seguir analizando las herramientas para ofrecer soporte y feedback educativo online sobre las que ya hablé en el post anterior.


El Lunes, 16 de Marzo, mientras los españoles comenzábamos oficialmente la cuarentena de 15 días impuesta por el gobierno, el Dr. Tedros Adhanom Ghebreyesus Director-General de la Organización Mundial de la Salud (OMS) comparecía en rueda de prensa y anunciaba:

Continue reading ‘Covid-19: Cuarentena día 4. Dr. Tedros, la PCR y los datos de Italia.’ »

Covid-19: Cuarentena día 3. Soporte y Feedback educativo a distancia

Durante esta cuarentena causada por la grave extensión de la pandemia #Covid-19 en España voy a recoger algunas ideas en este blog que últimamente tengo abandonado. Además de preparar tareas para mis alumnos, estar pendiente de sus dudas y asistir a una formación virtual con mis compañeros me estoy dedicando a descargar y analizar con R los datos que ofrecen las autoridades sanitarias europeas y españolas sobre la evolución de la enfermedad.

En esta primera entrada expondré algunas ideas sobre los retos de dar soporte online a los estudiantes desde la perspectiva del profesor. Al final dejaré uno de los gráficos que obtuve hoy sobre la evolución de la pandemia causada por el virus n-Covid-19.

Soporte online a los alumnos

Es bien conocido que las autoridades educativas nos piden a los profesores que enviemos tareas a nuestros alumnos para que no pierdan el ritmo de las clases. Además nos sugieren que demos a través de las nuevas tecnologías soporte a sus dudas y preguntas. ¿De qué tecnologías disponen los centros para esta tarea? Revisemos algunas de ellas empezando por la más «sencilla». Continue reading ‘Covid-19: Cuarentena día 3. Soporte y Feedback educativo a distancia’ »