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

689

Version

1.1.3

License

GPL-2 | GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

John Mount

Last Published

October 16th, 2020

Functions in sigr (1.1.3)

as.character.sigr_statistic

as.character
calcDeviance

Calculate deviance.
TInterval

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

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

Add ROC derived columns.
format.sigr_statistic

Format
find_AUC_q

Find area matching polynomial curve.
render

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

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

Objects exported from other packages
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_cortest

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

Format Cohen-D (effect size between groups)
testAUCpair

Test AUC pair results.
wrapBinomTest

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

Find beta-1 shape parameters matching the conditional distributions.
wrapBinomTest.data.frame

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

Format an F-test
build_ROC_curve

calculate ROC curve.
calcSSE

Calculate sum of squared error.
render.sigr_permtest

Format an empirical test (quality of categorical prediction)
find_area_q

Find area matching polynomial curve.
wrapBinomTest.htest

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

Fit beta parameters from data.
find_matching_conditional_betas

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

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

Format a significance
render.sigr_Bernoulli_diff_test

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

Format a pwr-test
resampleScoreModelPair

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

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

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

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

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

Check a few things we expect to be true for the utility frame.
print.sigr_statistic

Print
wrapFTest.summary.lm

Wrap quality statistic of linear regression summary.
wrapPWR.power.htest

Wrap pwr test.
wrapCorTest

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

Detect rendering format (using knitr).
wrapChiSqTestImpl

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

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

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

Wrap a significance
permutationScoreModel

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

Perform AUC permutation test.
model_utility

Estimate model utility
render.sigr_emptest

Format an empirical test (quality of categorical prediction)
wrapBinomTest.logical

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

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

Format a T-test (difference in means by group)
wrapCohenD.numeric

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

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

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

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

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

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

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

Wrap AUC resampling test results.
wrapFisherTest.table

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

Compute the shape1_pos, shape2_pos, shape1_neg, shape2_neg graph.
wrapChiSqTest.anova

Format ChiSqTest from anova of logistic model.
wrapChiSqTest.data.frame

Format ChiSqTest from data.
wrapFTest.htest

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

Wrap quality statistic of identity r regression.
render.sigr_fishertest

Format fisher.test (test of categorical independence).
wrapFTest.anova

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

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

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

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

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

Compute the q-graph.
wrapTTest.data.frame

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

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

sigr: Format Significance Summaries for Reports
wrapChiSqTest.glm

Format ChiSqTest from model.
wrapCorTest.htest

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

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

Wrap t.test (difference in means by group).
wrapChiSqTest.summary.glm

Format ChiSqTest from model summary.
wrapFTest

Wrap F-test (significance identity relation).
calcAUC

calculate AUC.
TInterval.data.frame

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

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

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