presenting MCMC visuals on rmarkdown

Welcome to the forum for R2MLwiN users. Feel free to post your question about R2MLwiN here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to R2MLwiN: Running MLwiN from within R >> http://www.bris.ac.uk/cmm/software/r2mlwin/
tjsduq64
Posts: 31
Joined: Mon Jul 15, 2019 10:04 pm

Re: presenting MCMC visuals on rmarkdown

Post by tjsduq64 »

Adding BD function works perfectly now for the sixway function.

The last error I am having is that when I have more than 6 parameters in the model and trajectories functions will have to display more than 6 plots, it only shows the first 6 plots. When I do not knit via rmarkdown and just run the code, I get multiple windows with plots, if there are more than 6 plots. It seems that rmarkdown is not able to catch multiple windows of plots.

ChrisCharlton
Posts: 1182
Joined: Mon Oct 19, 2009 10:34 am

Re: presenting MCMC visuals on rmarkdown

Post by ChrisCharlton »

This will be due to the trajectories function calling dev.new() whenever it has too many graphs to plot on one screen (see https://github.com/rforge/r2mlwin/blob/ ... ectories.R). The workarounds that I can think of are to either plot the trajectories in smaller subset chunks or adapt the code from within the function to create the plots yourself. The actual plotting code in this function is relatively small.

Post Reply