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.


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 deal with other statistical measures, like Cronbach's Alpha, Cramer's V, Phi etc.

The comprised tools include:

  • For regression and mixed models: Coefficient of Variation, Root Mean Squared Error, Residual Standard Error, Coefficient of Discrimination, R-squared and pseudo-R-squared values, standardized beta values
  • Especially for mixed models: Design effect, ICC, sample size calculation, convergence and overdispersion tests

Other statistics:

  • Cramer's V, Cronbach's Alpha, Mean Inter-Item-Correlation, Mann-Whitney-U-Test, Item-scale reliability tests

To install the latest development snapshot (see latest changes below), type following commands into the R console:

library(devtools)
devtools::install_github("sjPlot/sjstats")

     

To install the latest stable release from CRAN, type following command into the R console:

install.packages("sjstats")

In case you want / have to cite my package, please use citation('sjstats') for citation information.

News

sjstats 0.7.1

  • Package depends on R-version >= 3.3.
  • prop() gets a digits-argument to round the return value to a specific number of decimal places.

sjstats 0.7.0

  • Largely revised the documentation.
  • prop() to calculate proportion of values in a vector.
  • mse() to calculate the mean square error for models.
  • robust() to calculate robust standard errors and confidence intervals for regression models, returned as tidy data frame.

sjstats 0.6.0

  • split_half() to compute the split-half-reliability of tests or questionnaires.
  • sd_pop() and var_pop() to compute population variance and population standard deviation.
  • se() now also computes the standard error from estimates (regression coefficients) and p-values.

sjstats 0.5.0

  • Added S3-print-method for mwu()-function.
  • get_model_pval() to return a tidy data frame (tibble) of model term names, p-values and standard errors from various regression model types.
  • se_ybar() to compute standard error of sample mean for mixed models, considering the effect of clustering on the standard error.
  • std() and center() to standardize and center variables, supporting the pipe-operator.
  • se() now also computes the standard error for intraclass correlation coefficients, as returned by the icc()-function.
  • std_beta() now always returns a tidy data frame (tibble) with model term names, standardized estimate, standard error and confidence intervals.
  • r2() now also computes alternative omega-squared-statistics, if null model is given.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("sjstats")

0.11.1 by Daniel Lüdecke, 5 days ago


https://github.com/strengejacke/sjstats


Report a bug at https://github.com/strengejacke/sjstats/issues


Browse source code at https://github.com/cran/sjstats


Authors: Daniel Lüdecke <d.luedecke@uke.de>


Documentation:   PDF Manual  


GPL-3 license


Imports broom, coin, dplyr, lme4, lmtest, glmmTMB, MASS, Matrix, modelr, nlme, purrr, pwr, rlang, sandwich, sjlabelled, sjmisc, tidyr, tibble

Depends on stats, utils

Suggests AER, arm, car, ggplot2, graphics, Hmisc, lmerTest, pbkrtest, pROC, survey, rstanarm, tidyverse, knitr


Imported by EMAtools, ggeffects, sjPlot.

Suggested by sjmisc.


See at CRAN