BioRender uses R (version 4.2.2) to compute results for all statistical analyses.

Packages and functions used for specific statistical analyses are listed below.

All R packages

- R version 4.2.2
- rstatix version 0.7.1
- multcomp version 1.4-20
- PMCMRplus version 1.9.6
- agricolae version 1.3-5.
- dplyr version 1.0.10
- tidyr version 1.3.0
- rjson version 0.2.21
- logger version 0.2.2
- tictoc version 1.1
- jsonlite version 1.8.4
- effsize version 0.8.1
- nlraa version 1.9.3

## Assumptions tests

### Shapiro-Wilk test of normality

Parametric t-tests and one-way ANOVAs have the assumption that your dataset is normally distributed. We run the Shapiro-Wilk test of normality to check if your dataset violates this assumption. If your data passes the Shapiro-Wilk test (i.e. p>0.05), we suggest a parametric two-sample t-test or a parametric one-way ANOVA. If your data does not pass the Shapiro-Wilk test, we suggest the nonparametric versions of the t-test and the one-way ANOVA. We use the function shapiro_test from rstatix.

### Levene’s test of equal variances

Parametric t-tests and one-way ANOVAs have the assumption that the variances of each sample group are approximately equal (i.e. the standard deviation of the sample groups are approximately the same). We run Levene’s test of equal variances to check if your dataset violates this assumption. If your dataset does not have equal variances between groups, we recommend a two-sample t-test or a one-way ANOVA with Welch’s correction, which accounts for unequal variances between groups. We use the function levene_test from rstatix.

**Two-sample t-test (and nonparametric tests)**

### Unpaired two-sample t-test

We use the function t_test from the rstatix package, passing paired=FALSE, var.equal=TRUE and detailed=TRUE to get detailed results.

### Unpaired two-sample t-test with Welch’s correction (aka Welch’s t-test)

We use the function t_test from the rstatix package, passing paired=FALSE, var.equal=FALSE and detailed=TRUE to get detailed results.

### Mann-Whitney U test

We use the function wilcox_test from the rstatix package, passing paired=FALSE and detailed=TRUE to get detailed results.

### Paired t-test

We use the function t_test from the rstatix package, passing paired=TRUE and detailed=TRUE to get detailed results.

### Wilcoxon matched-pairs signed ranks test

We use the function wilcox_test from the rstatix package, passing paired=TRUE and detailed=TRUE to get detailed results.

**One-way ANOVA (and nonparametric tests) and multiple comparisons tests**

### One-way ANOVA

We use the function anova_test from the rstatix package. We pass detailed=TRUE to get detailed results.

### One-way ANOVA with Welch’s correction (aka Welch’s one-way ANOVA)

We use the function welch_anova_test from the rstatix package.

### Kruskal-Wallis test

We use the function kruskal_test from the rstatix package.

### Tukey multiple comparisons test

We use the function glht from the package multcomp, and specify “Tukey” to the multiple comparison function mcp. We calculate confidence intervals and means using confint and mean.

### Bonferroni multiple comparisons test

We use the LSD.test function from the library agricolae passing p.adj="bonferroni" to use the “Bonferroni” p-value adjustment. We calculate t critical values using the qt function, and the standard error and t statistic for each comparison manually using the formulas.

### Dunnett multiple comparisons test

We use the function glht from the package multcomp, and specify “Dunnett” to the multiple comparison function mcp. We calculate confidence intervals and means using confint and mean.

### Games-Howell multiple comparisons test

We use the function games_howell_test from the rstatix package. We divide the standard error from the result by sqrt(0.5) as that is more common to report. We pass detailed=TRUE to get more detailed results.

### Dunnett T3 multiple comparisons test

We use the dunnetT3Test function from the PMCMRplus package. We manually calculate the degrees of freedom from the sample size and variance of each group. We also calculate the standard error of the difference and confidence intervals.

### Dunn multiple comparisons test

We use the function dunn_test from the rstatix package, passing p.adjust.method="bonferroni"and detailed=TRUE to get detailed results.

**Two-way ANOVA and multiple comparisons tests**

### Two-way ANOVA

We use the function anova_test from the rstatix package. We pass detailed=TRUE to get detailed results with type set to 1 for balanced data sets or 3 for unbalanced data.

### Tukey multiple comparisons test

We use the function glht from the package multcomp, and specify “Tukey” to the multiple comparison function mcp. This is used to calculate the statistic, std.error, and degrees of freedom. We also use TukeyHSD from the package stats to obtain the confidence ranges, estimate, and adjusted p values for the contrasts.

### Bonferroni multiple comparisons test

We use the LSD.test function from the library agricolae passing p.adj="bonferroni" to use the “Bonferroni” p-value adjustment. We calculate t critical values using the qt function, and the standard error and t statistic for each comparison manually using the formulas.

### Dunnett multiple comparisons test

We use the function glht from the package multcomp, and specify “Dunnett” to the multiple comparison function mcp. We calculate confidence intervals and means using confint and mean.

**Linear Regression**

From the stats library, we use the lm function to fit linear models to the data, passing in the appropriate formula based on user-defined constraints (e.g. y-intercept = 0). The residuals function is used to extract residuals from the fitted model, with df.residual used to get the degrees of freedom of those residuals. The predict function is used for predicting values at regular linear intervals based on the fitted model, enabling us to allow us to display the best-fit line in rendered graphs, along with the qt function used to get quantiles.

**Dose-Response Regression**

From the stats library, we use the nls function to fit nonlinear models to the data, passing in formulae for stimulation or inhibition as well as other parameters based on constraints the user specifies. The confint function is used to calculate confidence intervals of model parameters to 95%. Additionally, the coef function allows us to extract the coefficients of the fitted models to be displayed in the analysis results. From the nlraa library, we use the predict_nls function for predicting responses at a linear or logarithmic interval based on the fitted models, enabling us to display the best-fit curve in rendered graphs.

#### Was this article helpful?

### Articles in this section

- Keeping Your Graph Data Secure in BioRender
- BioRender Graph
- Creating a new graph file
- How to enter data into the spreadsheet
- Performing a statistical analysis
- How to customize your graph
- How to change your data format
- How to plot and analyze continuous (XY) data in BioRender Graph
- Exporting your BioRender graph
- Using graphs in BioRender illustrations and posters