Skip to contents

Stan

Working with cmdstanr.

stan()
Compile and sample with cmdstanr
save_model()
Save CmdStanFit object as RDS with a cross-platform consistent name
precis() extract() erect()
Posterior summary and extraction from CmdStanFit objects
extract2()
R6 representation of posterior samples
get_pars()
Select/Filter parameters from precis/extract data frames
as_posterior_array()
Convert posterior data frame to a list of array
get_sim_param_info()
Get parameter information of a simulation
get_stan_param_info()
Infer parameter data structure from Stan's parameter names
test_cmdstanr()
Test cmdstanr compilation
prepare_drive_model()
Gather Stan models for Google Drive upload

Stats

Utilities for stats.

rbern()
Bernoulli Random Number Generator
rordlogit()
Random Number Generator from Ordered Logit Distribution
rtnorm()
Random Number Generator for Truncated Normal Distribution
rgampois2()
Random Number Generator from Gamma-Poisson Distribution
rlkjcorr()
Random Number Generator for Cholesky LKJ Correlation Distribution
logit() inv_logit() logistic()
Links and Inverse Links for Logistic Regression
erf() inv_erf() inv_tanh()
Links for mapping reals to values between -1 and 1.
softmax()
Numerically stable softmax function
standardize()
Standardize a vector to fixed mean and std
simplex() min_max()
Commonly used statistical transformation
log_mix()
log_mix from stan

Linguisitics

Utilities for linguistics.

TTR() MATTR() MSTTR() HDD() ATTR() MTLD() YuleK()
Lexical diversity measures
VOCD()
Implementation of CLAN's VOCD command

Evaluation

Utilities for evaluating models.

prob_input() confusion_input()
Sensitivity and Specificity calculation

Wrangling

Utilities for data wrangling.

as_vec()
Handy vector construction from string
year() month() day()
Extract Year/Month/Day from date string
fstem()
R equivalent of Python pathlib's Path.stem

Plotting

Utilities for plotting.

plot_forest()
Forest plot for multiple densities
col.alpha() shade()
Functions stolen from the rethinking package
curve_mvnorm()
Add multivariate normal contour to plot
par2()
Get graphical parameters
vals2cols()
Convert numerical values to divergent colors

Image conversion

Conversion between various image formats

pdf2png() pdf2svg() svg2pdf() svg2png()
Vector graphics conversion
mutool_convert()
Convert PDF to images by mutool

Data I/O

Reading and writing data.

write_tcsv() read_tcsv()
I/O for data frames and typed CSVs

Documentation

Helpers for documenting scripts in Markdown.

image_combine()
Joining multiple images into a single one
as_vec()
Handy vector construction from string
inline() inline_zh()
Format vectors as inline text
as_c_num() as_c_chr()
Vector object as R input string
xclip() fclip()
Copy to and from clipboard
export_docs() export_docs_pdf() export_docs_html()
Extract docstring from R script to various output formats
inkscape_pdf_pager()
Construct output file paths based on input PDF page numbers
pandoc_pdf() pandoc_html()
Pandoc wrappers for converting markdown to pre-styled documents
pdf2png() pdf2svg() svg2pdf() svg2png()
Vector graphics conversion

Command Line Builder

Helpers for command line programs.

get_cli_programs()
Get stom cmd programs
to_unix_path() to_gitbash_path() print_paths()
Normalize to Unix paths
cmd_get_value() cmd_has() cmd_parse_date()
Primitive parsing of command line arguments
cmd_parse_args() cmd_parse_key_val()
(Deprecated) Full parsing of command line arguments

Index

All functions.

array_type()
Simplified array data type of R to match Stan's parameter dimensions Vector: 1D; matrix: 2D; array: 3D or above
as_c_num() as_c_chr()
Vector object as R input string
as_posterior_array()
Convert posterior data frame to a list of array
as_vec()
Handy vector construction from string
bin_ext()
Returns binary extension depending on OS
cmd_get_value() cmd_has() cmd_parse_date()
Primitive parsing of command line arguments
cmd_parse_args() cmd_parse_key_val()
(Deprecated) Full parsing of command line arguments
col.alpha() shade()
Functions stolen from the rethinking package
curve_mvnorm()
Add multivariate normal contour to plot
erf() inv_erf() inv_tanh()
Links for mapping reals to values between -1 and 1.
export_docs() export_docs_pdf() export_docs_html()
Extract docstring from R script to various output formats
extract2()
R6 representation of posterior samples
fstem()
R equivalent of Python pathlib's Path.stem
get_cli_programs()
Get stom cmd programs
get_pars()
Select/Filter parameters from precis/extract data frames
get_sim_param_info()
Get parameter information of a simulation
get_stan_param_info()
Infer parameter data structure from Stan's parameter names
ignore_dollars_with_begin_equation()
Spcial function to deal with conflicts between $$ and equation env in latex
image_combine()
Joining multiple images into a single one
inkscape_pdf_pager()
Construct output file paths based on input PDF page numbers
inkscape_run_through_pages()
Run Inkscape through pages of PDF input, where page info is given by the out_info arg obtained through inkscape_pdf_pager()
inline() inline_zh()
Format vectors as inline text
logit() inv_logit() logistic()
Links and Inverse Links for Logistic Regression
log_mix()
log_mix from stan
lst2message()
Print named lists as formatted messages
mutool_convert()
Convert PDF to images by mutool
n_samples()
Get number of samples (chains combined) from CmdStanFit
pandoc_pdf() pandoc_html()
Pandoc wrappers for converting markdown to pre-styled documents
par2()
Get graphical parameters
pat_depth()
Stan parameter regex pattern
pdf2png() pdf2svg() svg2pdf() svg2png()
Vector graphics conversion
plot_forest()
Forest plot for multiple densities
precis() extract() erect()
Posterior summary and extraction from CmdStanFit objects
prepare_drive_model()
Gather Stan models for Google Drive upload
prob_input() confusion_input()
Sensitivity and Specificity calculation
rbern()
Bernoulli Random Number Generator
replace_file_ext()
Replace file extension
rgampois2()
Random Number Generator from Gamma-Poisson Distribution
rlkjcorr()
Random Number Generator for Cholesky LKJ Correlation Distribution
rordlogit()
Random Number Generator from Ordered Logit Distribution
rtnorm()
Random Number Generator for Truncated Normal Distribution
save_model()
Save CmdStanFit object as RDS with a cross-platform consistent name
simplex() min_max()
Commonly used statistical transformation
softmax()
Numerically stable softmax function
stan()
Compile and sample with cmdstanr
stan2bin()
Convert stan file path to stan binary file path
standardize()
Standardize a vector to fixed mean and std
test_cmdstanr()
Test cmdstanr compilation
to_unix_path() to_gitbash_path() print_paths()
Normalize to Unix paths
TTR() MATTR() MSTTR() HDD() ATTR() MTLD() YuleK()
Lexical diversity measures
vals2cols()
Convert numerical values to divergent colors
VOCD()
Implementation of CLAN's VOCD command
write_tcsv() read_tcsv()
I/O for data frames and typed CSVs
xclip() fclip()
Copy to and from clipboard
year() month() day()
Extract Year/Month/Day from date string