Skip to content

Instantly share code, notes, and snippets.

View casallas's full-sized avatar

Juan Sebastián Casallas casallas

  • Iowa State University, Arts et Métiers ParisTech
  • Chalon-sur-Saône, France
View GitHub Profile
@casallas
casallas / sentence_case.tex
Created March 20, 2015 05:12
Convert string to sentence case in LaTeX
\usepackage{stringstrings} % \capitalize, \caselower
\newcommand{\sentencecase}[1]{\caselower[e]{#1}\capitalize{\thestring}}
@casallas
casallas / rjags_mac.md
Last active January 31, 2024 23:16
Installing rjags on a Mac

To install

  1. Install jags: in the terminal using homebrew brew install jags
  2. Install rjags: in R
install.packages("rjags")
library(rjags)

Potential issues

@casallas
casallas / read_writing_res.md
Last active May 5, 2023 17:22
Reading/Writing resources

Writing

Jones, Simon. How to write a great research paper: Seven simple suggestions. Great talk, mostly focused on CS, but applicable in other disciplines. https://www.youtube.com/watch?v=g3dkRsTqdDA

Goodson, Patricia. "Becoming an Academic Writer 50 Exercises for Paced, Productive, and Powerful Writing". General (e.g. get in the habit of writing) and concrete (i.e. per section) exercises to become a better writer. Additional book resources (writing log, article template). http://www.sagepub.com/goodson/study/resources.htm

Silvia, Paul. "How to write a lot"

Strunk, William. Elements of Style. Ithaca, N.Y.: Priv. print. [Geneva, N.Y.: Press of W.P. Humphrey], 1918; Bartleby.com, 1999. www.bartleby.com/141/. [Date of Printout].

@casallas
casallas / multinomial.md
Last active January 14, 2023 22:12
R Packages/Functions/Resources for multinomial (ordinal & categorical) regression
Package Ordinal Multinomial Partial proportional odds Scale Effects Random Effects
nnet no multinom N/A N/A No
MASS polr No No No No
ordinal clm/clm2 all X's in nominal (may not converge) offending X's in nominal via scale clmm/clmm2
VGAM yes ? ? ? No
MCMCglmm yes ? ? ? ?
Mixcat yes ? ? npmlt
mlogit ? mlogit N/A N/
@casallas
casallas / pub-bib.md
Last active September 6, 2021 20:47
Publishing clean bibtex files

These tricks require BibTool, which can be installed using homebrew.

To extract only the used fields call bibtool -x on a .aux file, e.g.

bibtool -x doc.aux -o output.bib

To delete fields that you don't want to share, e.g. notes and file locations,

bibtool -- "delete.field {annote}" -i input.bib -o output.bib
@casallas
casallas / controversial_stuff.md
Last active April 9, 2021 07:53
Stats resources

NHST

@casallas
casallas / rep_rowR.md
Last active September 21, 2020 21:03
Repeating rows in R
@casallas
casallas / ng_lmm.md
Last active January 4, 2016 02:59
(non | generalized) linear mixed-effects models (or multi-level [non | generalized] linear models), and ANOVA
@casallas
casallas / osx_mod.md
Created January 18, 2014 19:56
OS-X Modifications

Mavericks

gnutar

gnutar is no longer shipped with Mavericks, this may cause some issues, e.g. when running R devtools.Solution, based on this blogpost:

brew install gnu-tar
cd /usr/bin
sudo ln -s  `brew --prefix gnu-tar`/libexec/gnubin/tar /usr/bin/gnutar
@casallas
casallas / pooling.md
Created January 11, 2014 21:00
Pooling/no. pooling