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

708

Version

1.1.4

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

John Mount

Last Published

June 12th, 2021

Functions in sigr (1.1.4)

add_ROC_derived_columns

Add ROC derived columns.
calcAUC

calculate AUC.
as.character.sigr_statistic

as.character
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.
Bernoulli_diff_stat

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

calculate ROC curve.
TInterval.data.frame

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

Calculate deviance.
calcSSE

Calculate sum of squared error.
find_matching_conditional_betas

Find beta shape parameters matching the conditional distributions.
render.sigr_ftest

Format an F-test
render.sigr_aucpermtest

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

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

Format an empirical test (quality of categorical prediction)
check_utility_calc

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

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

Test AUC pair results.
render.sigr_binomtest

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

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

Studentized estimate of how often a difference is below zero.
format.sigr_statistic

Format
reexports

Objects exported from other packages
getRenderingFormat

Detect rendering format (using knitr).
fit_beta_shapes

Fit beta parameters from data.
render.sigr_Bernoulli_diff_test

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

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

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

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

Format Cohen-D (effect size between groups)
resampleScoreModel

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

Compute the q-graph.
sigr

sigr: Format Significance Summaries for Reports
wrapChiSqTest.glm

Format ChiSqTest from model.
wrapBinomTest

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

Format ChiSqTest from anova of logistic model.
find_area_q

Find area matching polynomial curve.
wrapBinomTest.logical

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

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

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

Find beta-1 shape parameters matching the conditional distributions.
print.sigr_statistic

Print
render.sigr_aucpairtest

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

Format a pwr-test
wrapTTest.htest

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

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

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

Format a significance
wrapChiSqTest.summary.glm

Format ChiSqTest from model summary.
wrapCohenD.data.frame

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

Wrap fisher.test (test of categorical independence).
wrapCohenD.numeric

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

Wrap pwr test (difference in means by group).
wrapCorTest

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

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

Wrap AUC resampling test results.
sensitivity_and_specificity_s12p12n

Compute the shape1_pos, shape2_pos, shape1_neg, shape2_neg graph.
wrapCorTest.data.frame

Wrap cor.test (test of liner correlation).
wrapBinomTest.htest

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

Estimate model utility
find_AUC_q

Find area matching polynomial curve.
render.sigr_emptest

Format an empirical test (quality of categorical prediction)
permTestAUC

Perform AUC permutation test.
wrapFisherTest.data.frame

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

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

Wrap binom.test (test of Binomial/Bernoulli rate) from summary.
render.sigr_fishertest

Format fisher.test (test of categorical independence).
render.sigr_ttest

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

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

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

Format ChiSqTest from data.
wrapFTest.data.frame

Wrap quality statistic of identity relation from data.
wrapFTest.anova

Wrap quality statistic of a linear relation from anova.
wrapBinomTest.numeric

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

Wrap pwr test.
wrapFTest

Wrap F-test (significance identity relation).
wrapCorTest.htest

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

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

Wrap a significance
wrapFTestImpl

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

Wrap quality statistic of linear regression summary.
wrapFTest.htest

Wrap F-test (ratio of variances).
wrapFTest.lm

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

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

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

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