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.0

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

John Mount

Last Published

September 15th, 2020

Functions in sigr (1.1.0)

TInterval

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

Calculate deviance.
calcAUC

calculate AUC.
Bernoulli_diff_stat

Compute the distribution of differences of replacement samples of two Binomial or Bernoulli experiments.
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.
TIntervalS

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

Objects exported from other packages
render

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

Add ROC derived columns.
find_AUC_q

Find area matching polynomial curve.
getRenderingFormat

Detect rendering format (using knitr).
permTestAUC

Perform AUC permutation test.
format.sigr_statistic

Format
as.character.sigr_statistic

as.character
render.sigr_cohend

Format Cohen-D (effect size between groups)
render.sigr_pwr_htest

Format a pwr-test
render.sigr_cortest

Format cor.test (test of liner correlation).
render.sigr_significance

Format a significance
permutationScoreModel

Empirical permutation test of significance of scoreFn(modelValues,yValues) >= scoreFn(modelValues,perm(yValues)).
wrapBinomTest.numeric

Wrap binom.test (test of Binomial/Bernoulli rate).
wrapChiSqTest.data.frame

Format ChiSqTest from data.
wrapBinomTestS

Wrap binom.test (test of Binomial/Bernoulli rate) from summary.
wrapChiSqTest.glm

Format ChiSqTest from model.
render.sigr_aucpermtest

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

Format an empirical test (quality of categorical prediction)
build_ROC_curve

calculate ROC curve.
print.sigr_statistic

Print
render.sigr_Bernoulli_diff_test

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

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

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

Format an AUC-test (quality of a probability score)
resampleScoreModelPair

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

Calculate sum of squared error.
render.sigr_aucpairtest

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

Format an empirical test (quality of categorical prediction)
render.sigr_ftest

Format an F-test
render.sigr_fishertest

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

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

Wrap binom.test (test of Binomial/Bernoulli rate).
wrapFTest.data.frame

Wrap quality statistic of identity relation from data.
wrapFisherTest.table

Wrap fisher.test (test of categorical independence).
wrapFTest.lm

Wrap quality statistic of identity r regression.
estimateDifferenceZeroCrossing

Studentized estimate of how often a difference is below zero.
render.sigr_chisqtest

Format a chi-square test (quality of categorical prediction)
render.sigr_binomtest

Format binom.test (test of rate of a Binomial/Bernoulli experiment).
wrapChiSqTest.anova

Format ChiSqTest from anova of logistic model.
wrapCohenD.numeric

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

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

Wrap pwr test (difference in means by group).
render.sigr_tinterval

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

Wrap cor.test (test of liner correlation).
resampleTestAUC

Wrap AUC resampling test results.
wrapFisherTest.htest

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

Wrap fisher.test (test of categorical independence).
wrapTTest

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

Wrap cor.test (test of liner correlation).
testAUCpair

Test AUC pair results.
wrapCorTest.htest

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

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

sigr: Format Significance Summaries for Reports
run_sigr_tests

Run sigr package tests.
wrapCohenD.data.frame

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

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

Wrap F-test (significance identity relation).
wrapFTest.summary.lm

Wrap quality statistic of linear regression summary.
wrapChiSqTestImpl

Format quality of a logistic regression roughly in "APA Style" ( American Psychological Association ).
wrapBinomTest.data.frame

Wrap binom.test (test of Binomial/Bernoulli rate).
wrapChiSqTest.summary.glm

Format ChiSqTest from model summary.
wrapFTestezANOVA

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

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

Wrap t.test (difference in means by group).
wrapFTest.anova

Wrap quality statistic of a linear relation from anova.
wrapPWR.power.htest

Wrap pwr test.
wrapSignificance

Wrap a significance
wrapFTestImpl

Wrap F-test (significance of identity relation).
wrapTTest.htest

Wrap t.test (difference in means by group).
wrapTTest.numeric

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