Subject ▸ Latex

Software for honours students

I spoke to our new crop of honours students this morning. Here are my slides, example files and links. Managing References Mendeley Zotero Paperpile Data analysis and computation Download R Download Rstudio Online R tutorial R packages for time series R packages for econometrics R packages for finance Writing your thesis LaTeX Windows: Download MikTeX Mac OSX: Download MacTeX Linux: Check your usual software source for TeXLive; otherwise install TeX Live directly.

Read More…

Monash Rmarkdown templates on github

Rmarkdown templates for staff and students in my department are now available on github. For a thesis, fork the repository MonashThesis.

For other templates, install the R package MonashEBSTemplates R package. This provides templates for

  • beamer slides
  • working papers
  • exams
  • letters

Rmarkdown template for a Monash working paper

This is only directly relevant to my Monash students and colleagues, but the same idea might be useful for adapting to other institutions. Some recent changes in the rmarkdown and bookdown packages mean that it is now possible to produce working papers in exactly the same format as we previously used with LaTeX.Just install the MonashEBSTemplates package from github. You also need a recent version of LaTeX. Then from within RStudio, create a new document by selecting “Rmarkdown”, “From Template”, and select “Monash EBS Working Paper”.

Read More…

Reproducibility in computational research

Jane Frazier spoke at our research team meeting today on “Reproducibility in computational research”. We had a very stimulating and lively discussion about the issues involved. One interesting idea was that reproducibility is on a scale, and we can all aim to move further along the scale towards making our own research more reproducible. For example Can you reproduce your results tomorrow on the same computer with the same software installed?

Read More…

Mathematical annotations on R plots

I’ve always struggled with using plotmath via the expression function in R for adding mathematical notation to axes or legends. For some reason, the most obvious way to write something never seems to work for me and I end up using trial and error in a loop with far too many iterations. So I am very happy to see the new latex2exp package available which translates LaTeX expressions into a form suitable for R graphs.

Read More…

Dark themes for writing

I spend much of my day sitting in front of a screen, coding or writing. To limit the strain on my eyes, I use a dark theme as much as possible. That is, I write with light colored text on a dark background. I don’t know why this is not the default in more software as it makes a big difference after a few hours of writing. Most of the time, I am writing using either Sublime Text, RStudio or TeXstudio.

Read More…

biblatex for statisticians

I am now using biblatex for all my bibliographic work as it seems to have developed enough to be stable and reliable. The big advantage of biblatex is that it is easy to format the bibliography to conform to specific journal or publisher styles. It is also possible to have structured bibliographies (e.g., divided into sections: books, papers, R packages, etc.) Here is my default setting which should be suitable for almost all statistics and econometrics journals.

Read More…

Creating a handout from beamer slides

I’m about to head off on a speaking tour to Europe (more on that in another post) and one of my hosts has asked for my powerpoint slides so they can print them. They have made two false assumptions: (1) that I use powerpoint; (2) that my slides are static so they can be printed. Instead, I produced a cut-down version of my beamer slides, leaving out some of the animations and other features that will not print easily.

Read More…

Generating tables in LaTeX

Typing tables in LaTeX can get messy, but there are some good tools to simplify the process. One I discovered this week is tablesgenerator.com, a web-based tool for generating LaTeX tables. It also allows the table to saved in other formats including HTML and Markdown. The interface is simple, but it does most things. For complicated tables, some additional formatting may be necessary. Similar functionality is available via plugins in Excel, OpenOffice and Libreoffice — useful if the data for the table is already stored in a spreadsheet.

Read More…

Getting a LaTeX system set up

Today I was teaching the honours students in econometrics and economics about LaTeX. Here are some brief instructions on how to set up a LaTeX system on different operating systems.MS-Windows Download and run the setup program for MikTeX. Choose the “basic” system. Download and run the installer program for TeXstudio. Then run TeXstudio and start typing. Mac OS Download and install MacTeX. Then run TeXshop and start typing.

Read More…