sjstats: Collection of Convenient Functions for Common Statistical Computations

Collection of convenient functions for common statistical computations, which are not directly provided by R's base or stats packages. This package aims at providing, first, shortcuts for statistical measures, which otherwise could only be calculated with additional effort (like standard errors or root mean squared errors). Second, these shortcut functions are generic (if appropriate), and can be applied not only to vectors, but also to other objects as well (e.g., the Coefficient of Variation can be computed for vectors, linear models, or linear mixed models; the r2()-function returns the r-squared value for 'lm', 'glm', 'merMod' or 'lme' objects). The focus of most functions lies on summary statistics or fit measures for regression models, including generalized linear models and mixed effects models. However, some of the functions also deal with other statistical measures, like Cronbach's Alpha, Cramer's V, Phi etc.

Install the latest version of this package by entering the following in R:
AuthorDaniel Lüdecke <>
Date of publication2017-04-11 10:50:06 UTC
MaintainerDaniel Lüdecke <>

View on CRAN

Man pages

boot_ci: Standard error and confidence intervals for bootstrapped...

bootstrap: Generate nonparametric bootstrap replications

check_assumptions: Check model assumptions

chisq_gof: Chi-square goodness-of-fit-test

cod: Tjur's Coefficient of Discrimination

converge_ok: Convergence test for mixed effects models

cv: Coefficient of Variation

cv_error: Test and training error from model cross-validation

deff: Design effects for two-level mixed models

efc: Sample dataset from the EUROFAMCARE project

eta_sq: Eta-squared of fitted anova

get_model_pval: Get p-values from regression model objects

hoslem_gof: Hosmer-Lemeshow Goodness-of-fit-test

icc: Intraclass-Correlation Coefficient

inequ_trend: Compute trends in status inequalities

levene_test: Levene-Test for One-Way-Anova

mean_n: Row means with min amount of valid values

mn: Sum, mean and median for vectors

mwu: Mann-Whitney-U-Test

nhanes_sample: Sample dataset from the National Health and Nutrition...

odds_to_rr: Get relative risks estimates from logistic regressions or...

overdisp: Check overdispersion of GL(M)M's

pred_accuracy: Accuracy of predictions from model fit

pred_vars: Get predictor and response variables from models

prop: Proportions of values in a vector

r2: Compute r-squared of (generalized) linear (mixed) models

reliab_test: Check internal consistency of a test or questionnaire

re_var: Random effect variances

rmse: Compute model quality

robust: Robust standard errors for regression models

se: Standard Error for variables or coefficients

se_ybar: Standard error of sample mean for mixed models

sjstats-package: Collection of Convenient Functions for Common Statistical...

smpsize_lmm: Sample size for linear mixed models

std_beta: Standardized beta coefficients and CI of linear and mixed...

svyglm.nb: Survey-weighted negative binomial generalised linear model

table_values: Expected and relative table values

var_pop: Calculate population variance and standard deviation

weight: Weight a variable

wtd_sd: Weighted statistics for variables

xtab_statistics: Measures of association for contingency tables


autocorrelation Man page
boot_ci Man page
boot_p Man page
boot_se Man page
bootstrap Man page
check_assumptions Man page
chisq_gof Man page
cod Man page
converge_ok Man page
cramer Man page
cronb Man page
cv Man page
cv_compare Man page
cv_error Man page
deff Man page
efc Man page
eta_sq Man page
get_model_pval Man page
get_re_var Man page
heteroskedastic Man page
hoslem_gof Man page
icc Man page
inequ_trend Man page
levene_test Man page
md Man page
mean_n Man page
mic Man page
mn Man page
mse Man page
multicollin Man page
mwu Man page
nhanes_sample Man page
normality Man page
odds_to_rr Man page
or_to_rr Man page
outliers Man page
overdisp Man page
phi Man page
pred_accuracy Man page
pred_vars Man page
prop Man page
props Man page
r2 Man page
reliab_test Man page
resp_val Man page
resp_var Man page
re_var Man page
rmse Man page
robust Man page
rse Man page
sd_pop Man page
se Man page
se_ybar Man page
sjstats Man page
sjstats-package Man page
sm Man page
smpsize_lmm Man page
split_half Man page
std_beta Man page
svy Man page
svyglm.nb Man page
table_values Man page
var_pop Man page
weight Man page
weight2 Man page
wtd_sd Man page
wtd_se Man page
xtab_statistics Man page
zero_count Man page

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.