Learn R Programming

⚠️There's a newer version (1.1.5) of this package.Take me there.

sigr

Concise formatting of significances in R.

Please see Adding polished significance summaries to papers using R for some discussion.

See also:


sigr is a small package that concentrates on computing summary statistics and reporting in an appropriate format.

For example here is formatting the quality of a logistic regression.

d <- data.frame(x=c(1,2,3,4,5,6,7,7),
      y=c(TRUE,FALSE,FALSE,FALSE,TRUE,TRUE,TRUE,FALSE))
model <- glm(y~x,data=d,family=binomial)
summary(model)
## 
## Call:
## glm(formula = y ~ x, family = binomial, data = d)
## 
## Deviance Residuals: 
##      Min        1Q    Median        3Q       Max  
## -1.37180  -1.09714  -0.00811   1.08024   1.42939  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)
## (Intercept)  -0.7455     1.6672  -0.447    0.655
## x             0.1702     0.3429   0.496    0.620
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 11.090  on 7  degrees of freedom
## Residual deviance: 10.837  on 6  degrees of freedom
## AIC: 14.837
## 
## Number of Fisher Scoring iterations: 4
library("sigr")
cat(render(wrapChiSqTest(model),
           pLargeCutoff=1, format='markdown'))

Chi-Square Test summary: pseudo-R2=0.02282 (χ2(1,N=8)=0.2531, p=0.6149).


To install, from inside R please run:

install.packages("sigr")

Copy Link

Version

Install

install.packages('sigr')

Monthly Downloads

793

Version

1.1.2

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

John Mount

Last Published

October 1st, 2020

Functions in sigr (1.1.2)

as.character.sigr_statistic

as.character
Bernoulli_diff_stat

Compute the distribution of differences of replacement samples of two Binomial or Bernoulli experiments.
find_ROC_matching_ab1

Find beta-1 shape parameters matching the conditional distributions.
reexports

Objects exported from other packages
render.sigr_Bernoulli_diff_test

Format sigr_Bernoulli_diff_test (test of difference of Bernoulli processes).
check_utility_calc

Check a few things we expect to be true for the utility frame.
render.sigr_ftest

Format an F-test
TInterval

Wrap TInterval (test of Binomial/Bernoulli rate).
calcSSE

Calculate sum of squared error.
render.sigr_aucpairtest

Format an AUC-test (quality of a probability score)
render.sigr_pwr_htest

Format a pwr-test
render

Format summary roughly in "APA Style" ( American Psychological Association ).
build_ROC_curve

calculate ROC curve.
estimateDifferenceZeroCrossing

Studentized estimate of how often a difference is below zero.
sigr

sigr: Format Significance Summaries for Reports
wrapChiSqTest

Wrap quality of a categorical prediction roughly in "APA Style" ( American Psychological Association ).
render.sigr_significance

Format a significance
testAUCpair

Test AUC pair results.
fit_beta_shapes

Fit beta parameters from data.
permutationScoreModel

Empirical permutation test of significance of scoreFn(modelValues,yValues) >= scoreFn(modelValues,perm(yValues)).
print.sigr_statistic

Print
render.sigr_binomtest

Format binom.test (test of rate of a Binomial/Bernoulli experiment).
render.sigr_chisqtest

Format a chi-square test (quality of categorical prediction)
model_utility

Estimate model utility
TIntervalS

Student-T tolerance-style interval around an estimate of a mean from summary.
wrapCohenD.numeric

Wrap Cohen's D (effect size between groups).
wrapChiSqTest.anova

Format ChiSqTest from anova of logistic model.
find_AUC_q

Find area matching polynomial curve.
add_ROC_derived_columns

Add ROC derived columns.
render.sigr_permtest

Format an empirical test (quality of categorical prediction)
wrapCorTest

Wrap cor.test (test of liner correlation).
render.sigr_tinterval

Format a Student-T tolerance-style interval around an estimate of a mean.
permTestAUC

Perform AUC permutation test.
render.sigr_ttest

Format a T-test (difference in means by group)
getRenderingFormat

Detect rendering format (using knitr).
render.sigr_aucpermtest

Format an AUC-test (quality of a probability score)
format.sigr_statistic

Format
render.sigr_aucresamptest

Format an AUC-test (quality of a probability score)
render.sigr_emptest

Format an empirical test (quality of categorical prediction)
sensitivity_and_specificity_s12p12n

Compute the shape1_pos, shape2_pos, shape1_neg, shape2_neg graph.
sensitivity_from_specificity_q

Compute the q-graph.
resampleTestAUC

Wrap AUC resampling test results.
wrapFisherTest

Wrap fisher.test (test of categorical independence).
render.sigr_fishertest

Format fisher.test (test of categorical independence).
wrapBinomTest

Wrap binom.test (test of Binomial/Bernoulli rate).
wrapBinomTest.numeric

Wrap binom.test (test of Binomial/Bernoulli rate).
render.sigr_cohend

Format Cohen-D (effect size between groups)
wrapFisherTest.data.frame

Wrap fisher.test (test of categorical independence).
render.sigr_cortest

Format cor.test (test of liner correlation).
resampleScoreModel

Studentized bootstrap variance estimate for scoreFn(yValues,modelValues).
resampleScoreModelPair

Studentized bootstrap test of strength of scoreFn(yValues,model1Values) > scoreFn(yValues,model1Values).
wrapBinomTestS

Wrap binom.test (test of Binomial/Bernoulli rate) from summary.
wrapBinomTest.htest

Wrap binom.test (test of Binomial/Bernoulli rate).
wrapBinomTest.logical

Wrap binom.test (test of Binomial/Bernoulli rate).
run_sigr_tests

Run sigr package tests.
wrapFTest

Wrap F-test (significance identity relation).
wrapChiSqTest.data.frame

Format ChiSqTest from data.
wrapFTest.anova

Wrap quality statistic of a linear relation from anova.
wrapBinomTest.data.frame

Wrap binom.test (test of Binomial/Bernoulli rate).
wrapCorTest.htest

Wrap cor.test (test of liner correlation).
wrapCorTest.data.frame

Wrap cor.test (test of liner correlation).
wrapTTest.data.frame

Wrap t.test (difference in means by group).
wrapFTestImpl

Wrap F-test (significance of identity relation).
wrapFTestezANOVA

Wrap quality statistic of a linear relation from ezANOVA (package ez).
wrapTTest.htest

Wrap t.test (difference in means by group).
wrapCohenD.data.frame

Wrap Cohen's D (effect size between groups).
wrapCohenD

Wrap Cohen's D (effect size between groups).
wrapChiSqTestImpl

Format quality of a logistic regression roughly in "APA Style" ( American Psychological Association ).
wrapChiSqTest.summary.glm

Format ChiSqTest from model summary.
wrapFTest.lm

Wrap quality statistic of identity r regression.
wrapFTest.data.frame

Wrap quality statistic of identity relation from data.
wrapPWR

Wrap pwr test (difference in means by group).
wrapFTest.htest

Wrap F-test (ratio of variances).
wrapChiSqTest.glm

Format ChiSqTest from model.
wrapFTest.summary.lm

Wrap quality statistic of linear regression summary.
wrapTTest.numeric

Wrap t.test (difference in means by group).
wrapPWR.power.htest

Wrap pwr test.
wrapTTest

Wrap t.test (difference in means by group).
wrapSignificance

Wrap a significance
wrapFisherTest.table

Wrap fisher.test (test of categorical independence).
wrapFisherTest.htest

Wrap fisher.test (test of categorical independence).
TInterval.data.frame

Student-T tolerance-style interval around an estimate of a mean from a data.frame.
TInterval.numeric

Student-T tolerance-style interval around an estimate of a mean from observations.
calcAUC

calculate AUC.
calcDeviance

Calculate deviance.
find_ROC_matching_ab

Find beta shape parameters matching the conditional distributions.
find_area_q

Find area matching polynomial curve.