diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT21.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT21.html index 964f943a7..da170d90a 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT21.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT21.html @@ -3,3 +3,7 @@ html{font-size:14px}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}.dropdown-submenu{position:relative}.dropdown-submenu a::after{transform:rotate(-90deg);position:absolute;right:6px;top:.8em}.dropdown-submenu .dropdown-menu{top:0;left:100%;margin-left:.1rem;margin-right:.1rem}.checkbox-fix{margin-top:15px}#grid{height:calc(75vh)}#spreadsheet{width:100%;height:calc(75vh)}.text-block{padding-top:10px;padding-bottom:10px;text-align:justify;line-height:150%;font-size:16px}table.dataframe{border:1px solid #808080;background-color:#fff;width:100%;text-align:center;border-collapse:collapse}table.dataframe td,table.dataframe th{border:1px solid #808080;padding:3px 13px}table.dataframe tbody td{font-size:13px;text-align:center;padding:3px 13px}td:nth-child(1){background:#ccc}table.dataframe th{font-size:15px;background-color:#ccc;text-align:center}.k-button{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.k-button:focus,.k-button.focus{color:#fff;background-color:#449d44;border-color:#255625}.k-button:hover{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active:hover,.k-button.active:hover,.open>.dropdown-toggle.k-button:hover,.k-button:active:focus,.k-button.active:focus,.open>.dropdown-toggle.k-button:focus,.k-button:active.focus,.k-button.active.focus,.open>.dropdown-toggle.k-button.focus{color:#fff;background-color:#398439;border-color:#255625}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{background-image:none}.k-button.disabled:hover,.k-button[disabled]:hover,fieldset[disabled] .k-button:hover,.k-button.disabled:focus,.k-button[disabled]:focus,fieldset[disabled] .k-button:focus,.k-button.disabled.focus,.k-button[disabled].focus,fieldset[disabled] .k-button.focus{background-color:#5cb85c;border-color:#4cae4c}.k-button .badge{color:#5cb85c;background-color:#fff}.k-numeric-wrap{width:100px}.disabledpanel{pointer-events:none;opacity:.4} + +

InVivoStat Equivalence TOST Test Analysis

+ +

Unfortunately not all combinations of the levels of the treatment factors are present in the experimental design. We recommend you manually create a new factor corresponding to the combinations of the levels of the treatment factors.

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT22.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT22.html index 964f943a7..968c2ca12 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT22.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT22.html @@ -3,3 +3,280 @@ html{font-size:14px}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}.dropdown-submenu{position:relative}.dropdown-submenu a::after{transform:rotate(-90deg);position:absolute;right:6px;top:.8em}.dropdown-submenu .dropdown-menu{top:0;left:100%;margin-left:.1rem;margin-right:.1rem}.checkbox-fix{margin-top:15px}#grid{height:calc(75vh)}#spreadsheet{width:100%;height:calc(75vh)}.text-block{padding-top:10px;padding-bottom:10px;text-align:justify;line-height:150%;font-size:16px}table.dataframe{border:1px solid #808080;background-color:#fff;width:100%;text-align:center;border-collapse:collapse}table.dataframe td,table.dataframe th{border:1px solid #808080;padding:3px 13px}table.dataframe tbody td{font-size:13px;text-align:center;padding:3px 13px}td:nth-child(1){background:#ccc}table.dataframe th{font-size:15px;background-color:#ccc;text-align:center}.k-button{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.k-button:focus,.k-button.focus{color:#fff;background-color:#449d44;border-color:#255625}.k-button:hover{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active:hover,.k-button.active:hover,.open>.dropdown-toggle.k-button:hover,.k-button:active:focus,.k-button.active:focus,.open>.dropdown-toggle.k-button:focus,.k-button:active.focus,.k-button.active.focus,.open>.dropdown-toggle.k-button.focus{color:#fff;background-color:#398439;border-color:#255625}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{background-image:none}.k-button.disabled:hover,.k-button[disabled]:hover,fieldset[disabled] .k-button:hover,.k-button.disabled:focus,.k-button[disabled]:focus,fieldset[disabled] .k-button:focus,.k-button.disabled.focus,.k-button[disabled].focus,fieldset[disabled] .k-button.focus{background-color:#5cb85c;border-color:#4cae4c}.k-button .badge{color:#5cb85c;background-color:#fff}.k-numeric-wrap{width:100px}.disabledpanel{pointer-events:none;opacity:.4} + +

InVivoStat Equivalence TOST Test Analysis

+ +

Response and equivalence bounds

+ +

The Resp11 response is currently being analysed by the Equivalence (TOST) test Analysis module.

+ +

The lower equivalence bound is defined as 10.00 and the upper equivalence bound is defined as 20.00. As both boundaries are defined a two one-sided (TOST) equivalence test has been performed.

+ +

Scatterplot of the observed data

+ +

+

Tip: Use this plot to identify possible outliers.

+ +

Warning

+ +

Unfortunately the residual degrees of freedom are low (less than 5). This may make the estimation of the underlying variability, and hence the results of the statistical tests, unreliable. This can be caused by attempting to fit too many factors, and their interactions, in the statistical model. Where appropriate we recommend you fit some of the 'Treatment' factors as 'Other design' factors. This will remove their interactions from the statistical model and therefore increase the residual degrees of freedom.

+ +

Model coefficients

+ + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + +
EstimateStd. Errort-valuep-value
(Intercept) 0.91200.6380 1.43 0.2260
Treat141-0.51370.9300 -0.55 0.6101
Treat142-0.60670.9300 -0.65 0.5497
+
+
+ +

All pairwise equivalence assessments

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Comparison Difference Lower one-sided 95% CI Upper one-sided 95% CI Lower equivalence bound Upper equivalence bound Equivalence assessment
A - B +0.093 +-3.440 +3.626 +10 +20 +Not equivalent +
A - C +-1.634 +-4.860 +1.591 +10 +20 +Not equivalent +
B - C +-1.727 +-4.953 +1.498 +10 +20 +Not equivalent +
+
+
+ +

Plot of the comparisons between the predicted means with 95% one-sided confidence intervals along with equivalence bounds

+ +

+

Conclusion

+ +

Conclusion: There are no equivalent means.

+ +

Diagnostic plot

+ +

Residuals vs. predicted plot

+ +

+

Tip: On this plot look to see if the spread of the points increases as the predicted values increase. If so the response may need transforming.

+ +

Tip: Any observation with a residual less than -3 or greater than 3 (SD) should be investigated as a possible outlier.

+ +

Analysis description

+ +

The data were analysed using a Two One-Sided (TOST) equivalence test, see Limentani et al. 2005, with Treat14 as the treatment factor.

+ +

For more information on the theoretical approaches that are implemented within this module, see Bate and Clark (2014).

+ +

References

+ +

When referring to InVivoStat, please cite 'InVivoStat, version 4.3'.

+ +

Bate, S.T. and Clark, R.A. (2014). The Design and Statistical Analysis of Animal Experiments. Cambridge University Press.

+ +

Limentani, G.B., Ringo, M.C., Ye, F., Bergquist, M.L. and MCSorley E.O. (2005). Beyond the t-test: Statistical equivalence testing. Analytical Chemistry, 77(11), 221-226.

+ +

R references

+ +

R Development Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org.

+ +

Lecoutre, Eric (2003). The R2HTML Package. R News, Vol 3. N. 3, Vienna, Austria.

+ +

Barret Schloerke, Jason Crowley, Di Cook, Francois Briatte, Moritz Marbach, Edwin Thoen, Amos Elberg and Joseph Larmarange (2018). GGally: Extension to 'ggplot2'. R package version 1.4.0. https://CRAN.R-project.org/package=GGally

+ +

Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. R package version 1.1-2. https://CRAN.R-project.org/package=RColorBrewer

+ +

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

+ +

Kamil Slowikowski (2019). ggrepel: Automatically Position Non-Overlapping Text Labels with 'ggplot2'. R package version 0.8.1. https://CRAN.R-project.org/package=ggrepel

+ +

H. Wickham. Reshaping data with the reshape package. Journal of Statistical Software, 21(12), 2007.

+ +

Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL http://www.jstatsoft.org/v40/i01/.

+ +

Hadley Wickham and Dana Seidel (2019). scales: Scale Functions for Visualization. R package version 1.1.0. https://CRAN.R-project.org/package=scales

+ +

Gabor Grothendieck, Louis Kates and Thomas Petzoldt (2016). proto: Prototype Object-Based Programming. R package version 1.0.0. https://CRAN.R-project.org/package=proto

+ +

Torsten Hothorn, Frank Bretz and Peter Westfall (2008). Simultaneous Inference in General Parametric Models. Biometrical Journal 50(3), 346--363.

+ +

Spencer Graves, Hans-Peter Piepho and Luciano Selzer with help from Sundar Dorai-Raj (2019). multcompView: Visualizations of Paired Comparisons. R package version 0.1-8. https://CRAN.R-project.org/package=multcompView

+ +

John Fox and Sanford Weisberg (2019). An {R} Companion to Applied Regression, Third Edition. Thousand Oaks CA: Sage. URL: https://socialsciences.mcmaster.ca/jfox/Books/Companion/

+ +

Russell Lenth (2020). emmeans: Estimated Marginal Means, aka Least-Squares Means. R package version 1.4.6. https://CRAN.R-project.org/package=emmeans

+ +

Analysis dataset

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Observation Resp11 Treat14
1 +0.654 +A +
2 +0.143 +A +
3 +0.566 +B +
4 +0.045 +B +
5 +0.543 +C +
6 +0.854 +C +
7 +4.700 +C +
+
+
+ +

Analysis options

+ +

Response variable: Resp11

+ +

Treatment factor(s): Treat14

+ +

Equivalence bounds type: absolute

+ +

Lower equivalence bound: 10

+ +

Upper equivalence bound: 20

+ +

Output residuals vs. predicted plot (Y/N): Y

+ +

Output normal probability plot (Y/N): N

+ +

Significance level: 0.05

+ +

Output least square (predicted) means (Y/N): N

+ +

Control group: NULL

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT40.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT40.html index b55853344..9048dc692 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT40.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT40.html @@ -57,7 +57,7 @@

Model coefficients

Table of the back-transformed geometric means with 95% confidence intervals

-

As the response was log transformed prior to analysis the least square (predicted) means are presented on the log scale. These results can be back transformed onto the original scale. These are known as the back-transformed geometric means.

+

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT41.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT41.html index 7cbd97fd0..dd9a7dfed 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT41.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT41.html @@ -57,7 +57,7 @@

Model coefficients

Table of the back-transformed geometric means with 95% confidence intervals

-

As the response was log transformed prior to analysis the least square (predicted) means are presented on the log scale. These results can be back transformed onto the original scale. These are known as the back-transformed geometric means.

+

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT42.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT42.html index 244c51302..95a8f4ea3 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT42.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT42.html @@ -57,7 +57,7 @@

Model coefficients

Table of the back-transformed geometric means with 95% confidence intervals

-

As the response was log transformed prior to analysis the least square (predicted) means are presented on the log scale. These results can be back transformed onto the original scale. These are known as the back-transformed geometric means.

+

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT43.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT43.html index 33970bd06..eec1e863b 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT43.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT43.html @@ -57,7 +57,7 @@

Model coefficients

Table of the back-transformed geometric means with 95% confidence intervals

-

As the response was log transformed prior to analysis the least square (predicted) means are presented on the log scale. These results can be back transformed onto the original scale. These are known as the back-transformed geometric means.

+

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT49.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT49.html index 68f35f6af..26896e51b 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT49.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT49.html @@ -57,7 +57,7 @@

Model coefficients

Table of the back-transformed geometric means with 95% confidence intervals

-

As the response was log transformed prior to analysis the least square (predicted) means are presented on the log scale. These results can be back transformed onto the original scale. These are known as the back-transformed geometric means.

+

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT50.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT50.html index b2e302d55..5b5597bf0 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT50.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT50.html @@ -57,7 +57,7 @@

Model coefficients

Table of the back-transformed geometric means with 95% confidence intervals

-

As the response was log transformed prior to analysis the least square (predicted) means are presented on the log scale. These results can be back transformed onto the original scale. These are known as the back-transformed geometric means.

+

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT55.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT55.html index 964f943a7..50d99956c 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT55.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT55.html @@ -3,3 +3,944 @@ html{font-size:14px}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}.dropdown-submenu{position:relative}.dropdown-submenu a::after{transform:rotate(-90deg);position:absolute;right:6px;top:.8em}.dropdown-submenu .dropdown-menu{top:0;left:100%;margin-left:.1rem;margin-right:.1rem}.checkbox-fix{margin-top:15px}#grid{height:calc(75vh)}#spreadsheet{width:100%;height:calc(75vh)}.text-block{padding-top:10px;padding-bottom:10px;text-align:justify;line-height:150%;font-size:16px}table.dataframe{border:1px solid #808080;background-color:#fff;width:100%;text-align:center;border-collapse:collapse}table.dataframe td,table.dataframe th{border:1px solid #808080;padding:3px 13px}table.dataframe tbody td{font-size:13px;text-align:center;padding:3px 13px}td:nth-child(1){background:#ccc}table.dataframe th{font-size:15px;background-color:#ccc;text-align:center}.k-button{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.k-button:focus,.k-button.focus{color:#fff;background-color:#449d44;border-color:#255625}.k-button:hover{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active:hover,.k-button.active:hover,.open>.dropdown-toggle.k-button:hover,.k-button:active:focus,.k-button.active:focus,.open>.dropdown-toggle.k-button:focus,.k-button:active.focus,.k-button.active.focus,.open>.dropdown-toggle.k-button.focus{color:#fff;background-color:#398439;border-color:#255625}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{background-image:none}.k-button.disabled:hover,.k-button[disabled]:hover,fieldset[disabled] .k-button:hover,.k-button.disabled:focus,.k-button[disabled]:focus,fieldset[disabled] .k-button:focus,.k-button.disabled.focus,.k-button[disabled].focus,fieldset[disabled] .k-button.focus{background-color:#5cb85c;border-color:#4cae4c}.k-button .badge{color:#5cb85c;background-color:#fff}.k-numeric-wrap{width:100px}.disabledpanel{pointer-events:none;opacity:.4} + +

InVivoStat Equivalence Test Analysis

+ +

Response and equivalence bound

+ +

The Resp 1 response is currently being analysed by the Equivalence (TOST) test Analysis module.

+ +

The upper equivalence bound is defined as a 10 % (increase) change from the overall response mean. This is equivalent to an absolute change of size 0.16. As only an upper bound has been defined a one-sided equivalence test has been performed.

+ +

Scatterplot of the observed data

+ +

+

Tip: Use this plot to identify possible outliers.

+ +

Model coefficients

+ + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EstimateStd. Errort-valuep-value
(Intercept) 1.6159 0.0266 60.80 < 0.0001
Treat11-0.2174 0.0473 -4.60 < 0.0001
Treat12-0.0520 0.0456 -1.14 0.2575
Treat13-0.0550 0.0456 -1.20 0.2321
+
+
+ +

Table of the least square (predicted) means with 95% confidence intervals

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mean ID Treat1 Mean Lower 95% CI Upper 95% CI
1 +D0 +1.399 +1.288 +1.509 +
2 +D1 +1.564 +1.459 +1.668 +
3 +D10 +1.561 +1.457 +1.665 +
4 +D3 +1.940 +1.836 +2.045 +
+
+
+ +

Plot of the least square (predicted) means with 95% confidence intervals

+ +

+

All pairwise equivalence assessments

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Comparison Difference Upper one-sided 95% CI Upper equivalence bound Equivalence assessment
D0 - D1 +-0.165 +-0.038 +0.16 +Equivalent +
D0 - D10 +-0.162 +-0.036 +0.16 +Equivalent +
D0 - D3 +-0.542 +-0.415 +0.16 +Equivalent +
D1 - D10 +0.003 +0.126 +0.16 +Equivalent +
D1 - D3 +-0.376 +-0.253 +0.16 +Equivalent +
D10 - D3 +-0.379 +-0.256 +0.16 +Equivalent +
+
+
+ +

Plot of the comparisons between the predicted means with 95% one-sided confidence interval along with equivalence bound

+ +

+

Conclusion

+ +

Conclusion: The following means are deemed equivalent at the 5% level: D0 and D1, D0 and D10, D0 and D3, D1 and D10, D1 and D3, D10 and D3.

+ +

Diagnostic plot

+ +

Residuals vs. predicted plot

+ +

+

Tip: On this plot look to see if the spread of the points increases as the predicted values increase. If so the response may need transforming.

+ +

Tip: Any observation with a residual less than -3 or greater than 3 (SD) should be investigated as a possible outlier.

+ +

Analysis description

+ +

The data were analysed using a one-sided equivalence test, see Limentani et al. 2005, with Treat1 as the treatment factor.

+ +

For more information on the theoretical approaches that are implemented within this module, see Bate and Clark (2014).

+ +

References

+ +

When referring to InVivoStat, please cite 'InVivoStat, version 4.3'.

+ +

Bate, S.T. and Clark, R.A. (2014). The Design and Statistical Analysis of Animal Experiments. Cambridge University Press.

+ +

Limentani, G.B., Ringo, M.C., Ye, F., Bergquist, M.L. and MCSorley E.O. (2005). Beyond the t-test: Statistical equivalence testing. Analytical Chemistry, 77(11), 221-226.

+ +

R references

+ +

R Development Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org.

+ +

Lecoutre, Eric (2003). The R2HTML Package. R News, Vol 3. N. 3, Vienna, Austria.

+ +

Barret Schloerke, Jason Crowley, Di Cook, Francois Briatte, Moritz Marbach, Edwin Thoen, Amos Elberg and Joseph Larmarange (2018). GGally: Extension to 'ggplot2'. R package version 1.4.0. https://CRAN.R-project.org/package=GGally

+ +

Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. R package version 1.1-2. https://CRAN.R-project.org/package=RColorBrewer

+ +

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

+ +

Kamil Slowikowski (2019). ggrepel: Automatically Position Non-Overlapping Text Labels with 'ggplot2'. R package version 0.8.1. https://CRAN.R-project.org/package=ggrepel

+ +

H. Wickham. Reshaping data with the reshape package. Journal of Statistical Software, 21(12), 2007.

+ +

Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL http://www.jstatsoft.org/v40/i01/.

+ +

Hadley Wickham and Dana Seidel (2019). scales: Scale Functions for Visualization. R package version 1.1.0. https://CRAN.R-project.org/package=scales

+ +

Gabor Grothendieck, Louis Kates and Thomas Petzoldt (2016). proto: Prototype Object-Based Programming. R package version 1.0.0. https://CRAN.R-project.org/package=proto

+ +

Torsten Hothorn, Frank Bretz and Peter Westfall (2008). Simultaneous Inference in General Parametric Models. Biometrical Journal 50(3), 346--363.

+ +

Spencer Graves, Hans-Peter Piepho and Luciano Selzer with help from Sundar Dorai-Raj (2019). multcompView: Visualizations of Paired Comparisons. R package version 0.1-8. https://CRAN.R-project.org/package=multcompView

+ +

John Fox and Sanford Weisberg (2019). An {R} Companion to Applied Regression, Third Edition. Thousand Oaks CA: Sage. URL: https://socialsciences.mcmaster.ca/jfox/Books/Companion/

+ +

Russell Lenth (2020). emmeans: Estimated Marginal Means, aka Least-Squares Means. R package version 1.4.6. https://CRAN.R-project.org/package=emmeans

+ +

Analysis dataset

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Observation Resp 1 Treat1
1 +1.17 +D0 +
2 +1.30 +D0 +
3 +1.72 +D0 +
4 +1.17 +D0 +
5 +1.39 +D0 +
6 +1.44 +D0 +
7 +1.60 +D0 +
8 +1.57 +D0 +
9 +1.33 +D0 +
10 +1.57 +D0 +
11 +1.66 +D0 +
12 +1.47 +D0 +
13 +1.72 +D0 +
14 +1.17 +D0 +
15 +1.06 +D0 +
16 +1.24 +D0 +
17 +1.60 +D0 +
18 +0.99 +D0 +
19 +1.37 +D1 +
20 +1.50 +D1 +
21 +1.59 +D1 +
22 +1.37 +D1 +
23 +1.50 +D1 +
24 +1.37 +D1 +
25 +1.64 +D1 +
26 +1.53 +D1 +
27 +1.50 +D1 +
28 +1.59 +D1 +
29 +1.77 +D1 +
30 +1.86 +D1 +
31 +1.26 +D1 +
32 +1.64 +D1 +
33 +1.53 +D1 +
34 +1.77 +D1 +
35 +1.44 +D1 +
36 +1.92 +D1 +
37 +1.86 +D1 +
38 +1.26 +D1 +
39 +1.26 +D10 +
40 +1.77 +D10 +
41 +1.67 +D10 +
42 +1.64 +D10 +
43 +1.53 +D10 +
44 +1.77 +D10 +
45 +1.92 +D10 +
46 +1.37 +D10 +
47 +1.86 +D10 +
48 +1.26 +D10 +
49 +1.80 +D10 +
50 +1.19 +D10 +
51 +1.37 +D10 +
52 +1.44 +D10 +
53 +1.92 +D10 +
54 +1.37 +D10 +
55 +1.50 +D10 +
56 +1.59 +D10 +
57 +1.80 +D10 +
58 +1.19 +D10 +
59 +2.03 +D3 +
60 +2.20 +D3 +
61 +2.28 +D3 +
62 +1.72 +D3 +
63 +1.75 +D3 +
64 +1.81 +D3 +
65 +1.86 +D3 +
66 +1.64 +D3 +
67 +2.25 +D3 +
68 +1.88 +D3 +
69 +1.69 +D3 +
70 +1.82 +D3 +
71 +2.26 +D3 +
72 +1.61 +D3 +
73 +2.06 +D3 +
74 +2.18 +D3 +
75 +1.99 +D3 +
76 +1.69 +D3 +
77 +1.62 +D3 +
78 +2.48 +D3 +
+
+
+ +

Analysis options

+ +

Response variable: Resp 1

+ +

Treatment factor(s): Treat1

+ +

Equivalence bounds type: percentage

+ +

Upper equivalence bound: 0.162152333641026

+ +

Output residuals vs. predicted plot (Y/N): Y

+ +

Output normal probability plot (Y/N): N

+ +

Significance level: 0.05

+ +

Selected effect (for pairwise mean comparisons): Treat1

+ +

Output least square (predicted) means (Y/N): Y

+ +

Control group: NULL

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT56.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT56.html index 964f943a7..18a351924 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT56.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT56.html @@ -3,3 +3,908 @@ html{font-size:14px}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}.dropdown-submenu{position:relative}.dropdown-submenu a::after{transform:rotate(-90deg);position:absolute;right:6px;top:.8em}.dropdown-submenu .dropdown-menu{top:0;left:100%;margin-left:.1rem;margin-right:.1rem}.checkbox-fix{margin-top:15px}#grid{height:calc(75vh)}#spreadsheet{width:100%;height:calc(75vh)}.text-block{padding-top:10px;padding-bottom:10px;text-align:justify;line-height:150%;font-size:16px}table.dataframe{border:1px solid #808080;background-color:#fff;width:100%;text-align:center;border-collapse:collapse}table.dataframe td,table.dataframe th{border:1px solid #808080;padding:3px 13px}table.dataframe tbody td{font-size:13px;text-align:center;padding:3px 13px}td:nth-child(1){background:#ccc}table.dataframe th{font-size:15px;background-color:#ccc;text-align:center}.k-button{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.k-button:focus,.k-button.focus{color:#fff;background-color:#449d44;border-color:#255625}.k-button:hover{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active:hover,.k-button.active:hover,.open>.dropdown-toggle.k-button:hover,.k-button:active:focus,.k-button.active:focus,.open>.dropdown-toggle.k-button:focus,.k-button:active.focus,.k-button.active.focus,.open>.dropdown-toggle.k-button.focus{color:#fff;background-color:#398439;border-color:#255625}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{background-image:none}.k-button.disabled:hover,.k-button[disabled]:hover,fieldset[disabled] .k-button:hover,.k-button.disabled:focus,.k-button[disabled]:focus,fieldset[disabled] .k-button:focus,.k-button.disabled.focus,.k-button[disabled].focus,fieldset[disabled] .k-button.focus{background-color:#5cb85c;border-color:#4cae4c}.k-button .badge{color:#5cb85c;background-color:#fff}.k-numeric-wrap{width:100px}.disabledpanel{pointer-events:none;opacity:.4} + +

InVivoStat Equivalence Test Analysis

+ +

Response and equivalence bound

+ +

The Resp 1 response is currently being analysed by the Equivalence (TOST) test Analysis module.

+ +

The upper equivalence bound is defined as a 10 % (increase) change from the control group mean. This is equivalent to an absolute change of size 0.16. As only an upper bound has been defined a one-sided equivalence test has been performed.

+ +

Scatterplot of the observed data

+ +

+

Tip: Use this plot to identify possible outliers.

+ +

Model coefficients

+ + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EstimateStd. Errort-valuep-value
(Intercept) 1.6159 0.0266 60.80 < 0.0001
Treat11-0.2174 0.0473 -4.60 < 0.0001
Treat12-0.0520 0.0456 -1.14 0.2575
Treat13-0.0550 0.0456 -1.20 0.2321
+
+
+ +

Table of the least square (predicted) means with 95% confidence intervals

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mean ID Treat1 Mean Lower 95% CI Upper 95% CI
1 +D0 +1.399 +1.288 +1.509 +
2 +D1 +1.564 +1.459 +1.668 +
3 +D10 +1.561 +1.457 +1.665 +
4 +D3 +1.940 +1.836 +2.045 +
+
+
+ +

Plot of the least square (predicted) means with 95% confidence intervals

+ +

+

All to one pairwise equivalence assessments

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Comparison Difference Upper one-sided 95% CI Upper equivalence bound Equivalence assessment
D0 - D1 +-0.165 +-0.038 +0.16 +Equivalent +
D10 - D1 +-0.003 +0.121 +0.16 +Equivalent +
D3 - D1 +0.376 +0.500 +0.16 +Not equivalent +
+
+
+ +

Plot of the comparisons between the predicted means with 95% one-sided confidence interval along with equivalence bound

+ +

+

Conclusion

+ +

Conclusion: The following means are deemed equivalent at the 5% level: D0 and D1, D10 and D1.

+ +

Diagnostic plot

+ +

Residuals vs. predicted plot

+ +

+

Tip: On this plot look to see if the spread of the points increases as the predicted values increase. If so the response may need transforming.

+ +

Tip: Any observation with a residual less than -3 or greater than 3 (SD) should be investigated as a possible outlier.

+ +

Analysis description

+ +

The data were analysed using a one-sided equivalence test, see Limentani et al. 2005, with Treat1 as the treatment factor.

+ +

For more information on the theoretical approaches that are implemented within this module, see Bate and Clark (2014).

+ +

References

+ +

When referring to InVivoStat, please cite 'InVivoStat, version 4.3'.

+ +

Bate, S.T. and Clark, R.A. (2014). The Design and Statistical Analysis of Animal Experiments. Cambridge University Press.

+ +

Limentani, G.B., Ringo, M.C., Ye, F., Bergquist, M.L. and MCSorley E.O. (2005). Beyond the t-test: Statistical equivalence testing. Analytical Chemistry, 77(11), 221-226.

+ +

R references

+ +

R Development Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org.

+ +

Lecoutre, Eric (2003). The R2HTML Package. R News, Vol 3. N. 3, Vienna, Austria.

+ +

Barret Schloerke, Jason Crowley, Di Cook, Francois Briatte, Moritz Marbach, Edwin Thoen, Amos Elberg and Joseph Larmarange (2018). GGally: Extension to 'ggplot2'. R package version 1.4.0. https://CRAN.R-project.org/package=GGally

+ +

Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. R package version 1.1-2. https://CRAN.R-project.org/package=RColorBrewer

+ +

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

+ +

Kamil Slowikowski (2019). ggrepel: Automatically Position Non-Overlapping Text Labels with 'ggplot2'. R package version 0.8.1. https://CRAN.R-project.org/package=ggrepel

+ +

H. Wickham. Reshaping data with the reshape package. Journal of Statistical Software, 21(12), 2007.

+ +

Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL http://www.jstatsoft.org/v40/i01/.

+ +

Hadley Wickham and Dana Seidel (2019). scales: Scale Functions for Visualization. R package version 1.1.0. https://CRAN.R-project.org/package=scales

+ +

Gabor Grothendieck, Louis Kates and Thomas Petzoldt (2016). proto: Prototype Object-Based Programming. R package version 1.0.0. https://CRAN.R-project.org/package=proto

+ +

Torsten Hothorn, Frank Bretz and Peter Westfall (2008). Simultaneous Inference in General Parametric Models. Biometrical Journal 50(3), 346--363.

+ +

Spencer Graves, Hans-Peter Piepho and Luciano Selzer with help from Sundar Dorai-Raj (2019). multcompView: Visualizations of Paired Comparisons. R package version 0.1-8. https://CRAN.R-project.org/package=multcompView

+ +

John Fox and Sanford Weisberg (2019). An {R} Companion to Applied Regression, Third Edition. Thousand Oaks CA: Sage. URL: https://socialsciences.mcmaster.ca/jfox/Books/Companion/

+ +

Russell Lenth (2020). emmeans: Estimated Marginal Means, aka Least-Squares Means. R package version 1.4.6. https://CRAN.R-project.org/package=emmeans

+ +

Analysis dataset

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Observation Resp 1 Treat1
1 +1.17 +D0 +
2 +1.30 +D0 +
3 +1.72 +D0 +
4 +1.17 +D0 +
5 +1.39 +D0 +
6 +1.44 +D0 +
7 +1.60 +D0 +
8 +1.57 +D0 +
9 +1.33 +D0 +
10 +1.57 +D0 +
11 +1.66 +D0 +
12 +1.47 +D0 +
13 +1.72 +D0 +
14 +1.17 +D0 +
15 +1.06 +D0 +
16 +1.24 +D0 +
17 +1.60 +D0 +
18 +0.99 +D0 +
19 +1.37 +D1 +
20 +1.50 +D1 +
21 +1.59 +D1 +
22 +1.37 +D1 +
23 +1.50 +D1 +
24 +1.37 +D1 +
25 +1.64 +D1 +
26 +1.53 +D1 +
27 +1.50 +D1 +
28 +1.59 +D1 +
29 +1.77 +D1 +
30 +1.86 +D1 +
31 +1.26 +D1 +
32 +1.64 +D1 +
33 +1.53 +D1 +
34 +1.77 +D1 +
35 +1.44 +D1 +
36 +1.92 +D1 +
37 +1.86 +D1 +
38 +1.26 +D1 +
39 +1.26 +D10 +
40 +1.77 +D10 +
41 +1.67 +D10 +
42 +1.64 +D10 +
43 +1.53 +D10 +
44 +1.77 +D10 +
45 +1.92 +D10 +
46 +1.37 +D10 +
47 +1.86 +D10 +
48 +1.26 +D10 +
49 +1.80 +D10 +
50 +1.19 +D10 +
51 +1.37 +D10 +
52 +1.44 +D10 +
53 +1.92 +D10 +
54 +1.37 +D10 +
55 +1.50 +D10 +
56 +1.59 +D10 +
57 +1.80 +D10 +
58 +1.19 +D10 +
59 +2.03 +D3 +
60 +2.20 +D3 +
61 +2.28 +D3 +
62 +1.72 +D3 +
63 +1.75 +D3 +
64 +1.81 +D3 +
65 +1.86 +D3 +
66 +1.64 +D3 +
67 +2.25 +D3 +
68 +1.88 +D3 +
69 +1.69 +D3 +
70 +1.82 +D3 +
71 +2.26 +D3 +
72 +1.61 +D3 +
73 +2.06 +D3 +
74 +2.18 +D3 +
75 +1.99 +D3 +
76 +1.69 +D3 +
77 +1.62 +D3 +
78 +2.48 +D3 +
+
+
+ +

Analysis options

+ +

Response variable: Resp 1

+ +

Treatment factor(s): Treat1

+ +

Equivalence bounds type: percentage

+ +

Upper equivalence bound: 0.156389997335

+ +

Output residuals vs. predicted plot (Y/N): Y

+ +

Output normal probability plot (Y/N): N

+ +

Significance level: 0.05

+ +

Selected effect (for pairwise mean comparisons): Treat1

+ +

Output least square (predicted) means (Y/N): Y

+ +

Control group: D1

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT57.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT57.html index 964f943a7..e06723dd3 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT57.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT57.html @@ -3,3 +3,912 @@ html{font-size:14px}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}.dropdown-submenu{position:relative}.dropdown-submenu a::after{transform:rotate(-90deg);position:absolute;right:6px;top:.8em}.dropdown-submenu .dropdown-menu{top:0;left:100%;margin-left:.1rem;margin-right:.1rem}.checkbox-fix{margin-top:15px}#grid{height:calc(75vh)}#spreadsheet{width:100%;height:calc(75vh)}.text-block{padding-top:10px;padding-bottom:10px;text-align:justify;line-height:150%;font-size:16px}table.dataframe{border:1px solid #808080;background-color:#fff;width:100%;text-align:center;border-collapse:collapse}table.dataframe td,table.dataframe th{border:1px solid #808080;padding:3px 13px}table.dataframe tbody td{font-size:13px;text-align:center;padding:3px 13px}td:nth-child(1){background:#ccc}table.dataframe th{font-size:15px;background-color:#ccc;text-align:center}.k-button{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.k-button:focus,.k-button.focus{color:#fff;background-color:#449d44;border-color:#255625}.k-button:hover{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active:hover,.k-button.active:hover,.open>.dropdown-toggle.k-button:hover,.k-button:active:focus,.k-button.active:focus,.open>.dropdown-toggle.k-button:focus,.k-button:active.focus,.k-button.active.focus,.open>.dropdown-toggle.k-button.focus{color:#fff;background-color:#398439;border-color:#255625}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{background-image:none}.k-button.disabled:hover,.k-button[disabled]:hover,fieldset[disabled] .k-button:hover,.k-button.disabled:focus,.k-button[disabled]:focus,fieldset[disabled] .k-button:focus,.k-button.disabled.focus,.k-button[disabled].focus,fieldset[disabled] .k-button.focus{background-color:#5cb85c;border-color:#4cae4c}.k-button .badge{color:#5cb85c;background-color:#fff}.k-numeric-wrap{width:100px}.disabledpanel{pointer-events:none;opacity:.4} + +

InVivoStat Equivalence Test Analysis

+ +

Response and equivalence bound

+ +

The Resp 1 response is currently being analysed by the Equivalence (TOST) test Analysis module.The response has been log10 transformed prior to analysis.

+ +

The upper equivalence bound is defined as a 10.00 % (increase) change. As only an upper bound has been defined a one-sided equivalence test has been performed.

+ +

Scatterplot of the observed data (on the log10 scale)

+ +

+

Tip: Use this plot to identify possible outliers.

+ +

Model coefficients

+ + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EstimateStd. Errort-valuep-value
(Intercept) 0.2008 0.0073 27.67 < 0.0001
Treat11-0.0609 0.0129 -4.72 < 0.0001
Treat12-0.0098 0.0125 -0.78 0.4353
Treat13-0.0127 0.0125 -1.02 0.3118
+
+
+ +

Table of the back-transformed geometric means with 95% confidence intervals

+ +

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mean ID Treat1 Geometric mean Lower 95% CI Upper 95% CI
1 +D0 +1.380 +1.288 +1.479 +
2 +D1 +1.553 +1.454 +1.658 +
3 +D10 +1.542 +1.444 +1.647 +
4 +D3 +1.924 +1.802 +2.055 +
+
+
+ +

Plot of the back-transformed geometric means with 95% confidence intervals

+ +

+

All to one pairwise equivalence assessments

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Comparison % change Upper one-sided 95% CI Upper % change equivalence bound Equivalence assessment
D0 / D1 +-11.107 +-3.725 +10 +Equivalent +
D10 / D1 +-0.669 +7.352 +10 +Equivalent +
D3 / D1 +23.916 +33.922 +10 +Not equivalent +
+
+
+ +

Plot of the comparisons between the predicted means with 95% one-sided confidence interval along with equivalence bound

+ +

+

Conclusion

+ +

Conclusion: The following means are deemed equivalent at the 5% level: D0 and D1, D10 and D1.

+ +

Diagnostic plot

+ +

Residuals vs. predicted plot

+ +

+

Tip: On this plot look to see if the spread of the points increases as the predicted values increase. If so the response may need transforming.

+ +

Tip: Any observation with a residual less than -3 or greater than 3 (SD) should be investigated as a possible outlier.

+ +

Analysis description

+ +

The data were analysed using a one-sided equivalence test, see Limentani et al. 2005, with Treat1 as the treatment factor. The response was log10 transformed prior to analysis to stabilise the variance.

+ +

For more information on the theoretical approaches that are implemented within this module, see Bate and Clark (2014).

+ +

References

+ +

When referring to InVivoStat, please cite 'InVivoStat, version 4.3'.

+ +

Bate, S.T. and Clark, R.A. (2014). The Design and Statistical Analysis of Animal Experiments. Cambridge University Press.

+ +

Limentani, G.B., Ringo, M.C., Ye, F., Bergquist, M.L. and MCSorley E.O. (2005). Beyond the t-test: Statistical equivalence testing. Analytical Chemistry, 77(11), 221-226.

+ +

R references

+ +

R Development Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org.

+ +

Lecoutre, Eric (2003). The R2HTML Package. R News, Vol 3. N. 3, Vienna, Austria.

+ +

Barret Schloerke, Jason Crowley, Di Cook, Francois Briatte, Moritz Marbach, Edwin Thoen, Amos Elberg and Joseph Larmarange (2018). GGally: Extension to 'ggplot2'. R package version 1.4.0. https://CRAN.R-project.org/package=GGally

+ +

Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. R package version 1.1-2. https://CRAN.R-project.org/package=RColorBrewer

+ +

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

+ +

Kamil Slowikowski (2019). ggrepel: Automatically Position Non-Overlapping Text Labels with 'ggplot2'. R package version 0.8.1. https://CRAN.R-project.org/package=ggrepel

+ +

H. Wickham. Reshaping data with the reshape package. Journal of Statistical Software, 21(12), 2007.

+ +

Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL http://www.jstatsoft.org/v40/i01/.

+ +

Hadley Wickham and Dana Seidel (2019). scales: Scale Functions for Visualization. R package version 1.1.0. https://CRAN.R-project.org/package=scales

+ +

Gabor Grothendieck, Louis Kates and Thomas Petzoldt (2016). proto: Prototype Object-Based Programming. R package version 1.0.0. https://CRAN.R-project.org/package=proto

+ +

Torsten Hothorn, Frank Bretz and Peter Westfall (2008). Simultaneous Inference in General Parametric Models. Biometrical Journal 50(3), 346--363.

+ +

Spencer Graves, Hans-Peter Piepho and Luciano Selzer with help from Sundar Dorai-Raj (2019). multcompView: Visualizations of Paired Comparisons. R package version 0.1-8. https://CRAN.R-project.org/package=multcompView

+ +

John Fox and Sanford Weisberg (2019). An {R} Companion to Applied Regression, Third Edition. Thousand Oaks CA: Sage. URL: https://socialsciences.mcmaster.ca/jfox/Books/Companion/

+ +

Russell Lenth (2020). emmeans: Estimated Marginal Means, aka Least-Squares Means. R package version 1.4.6. https://CRAN.R-project.org/package=emmeans

+ +

Analysis dataset

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Observation Resp 1 Treat1
1 + 0.0684 +D0 +
2 + 0.1146 +D0 +
3 + 0.2347 +D0 +
4 + 0.0683 +D0 +
5 + 0.1416 +D0 +
6 + 0.1587 +D0 +
7 + 0.2043 +D0 +
8 + 0.1961 +D0 +
9 + 0.1248 +D0 +
10 + 0.1959 +D0 +
11 + 0.2193 +D0 +
12 + 0.1685 +D0 +
13 + 0.2347 +D0 +
14 + 0.0683 +D0 +
15 + 0.0268 +D0 +
16 + 0.0948 +D0 +
17 + 0.2043 +D0 +
18 +-0.0055 +D0 +
19 + 0.1369 +D1 +
20 + 0.1766 +D1 +
21 + 0.2002 +D1 +
22 + 0.1369 +D1 +
23 + 0.1766 +D1 +
24 + 0.1369 +D1 +
25 + 0.2151 +D1 +
26 + 0.1855 +D1 +
27 + 0.1766 +D1 +
28 + 0.2002 +D1 +
29 + 0.2480 +D1 +
30 + 0.2688 +D1 +
31 + 0.1016 +D1 +
32 + 0.2151 +D1 +
33 + 0.1855 +D1 +
34 + 0.2480 +D1 +
35 + 0.1596 +D1 +
36 + 0.2826 +D1 +
37 + 0.2688 +D1 +
38 + 0.1016 +D1 +
39 + 0.0998 +D10 +
40 + 0.2482 +D10 +
41 + 0.2238 +D10 +
42 + 0.2151 +D10 +
43 + 0.1855 +D10 +
44 + 0.2480 +D10 +
45 + 0.2826 +D10 +
46 + 0.1368 +D10 +
47 + 0.2688 +D10 +
48 + 0.1016 +D10 +
49 + 0.2554 +D10 +
50 + 0.0746 +D10 +
51 + 0.1369 +D10 +
52 + 0.1596 +D10 +
53 + 0.2826 +D10 +
54 + 0.1368 +D10 +
55 + 0.1766 +D10 +
56 + 0.2002 +D10 +
57 + 0.2554 +D10 +
58 + 0.0746 +D10 +
59 + 0.3067 +D3 +
60 + 0.3415 +D3 +
61 + 0.3584 +D3 +
62 + 0.2347 +D3 +
63 + 0.2421 +D3 +
64 + 0.2578 +D3 +
65 + 0.2697 +D3 +
66 + 0.2143 +D3 +
67 + 0.3523 +D3 +
68 + 0.2746 +D3 +
69 + 0.2289 +D3 +
70 + 0.2607 +D3 +
71 + 0.3540 +D3 +
72 + 0.2071 +D3 +
73 + 0.3132 +D3 +
74 + 0.3383 +D3 +
75 + 0.2988 +D3 +
76 + 0.2271 +D3 +
77 + 0.2086 +D3 +
78 + 0.3948 +D3 +
+
+
+ +

Analysis options

+ +

Response variable: Resp 1

+ +

Response variable transformation: log10

+ +

Treatment factor(s): Treat1

+ +

Equivalence bounds type: percentage

+ +

Upper equivalence bound: 10

+ +

Output residuals vs. predicted plot (Y/N): Y

+ +

Output normal probability plot (Y/N): N

+ +

Significance level: 0.05

+ +

Selected effect (for pairwise mean comparisons): Treat1

+ +

Output least square (predicted) means (Y/N): Y

+ +

Control group: D1

diff --git a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT58.html b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT58.html index 964f943a7..d7bc3f681 100644 --- a/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT58.html +++ b/SilveR.IntegrationTests/ExpectedResults/EquivalenceTOSTTest/ETT58.html @@ -3,3 +3,948 @@ html{font-size:14px}a.navbar-brand{white-space:normal;text-align:center;word-break:break-all}.dropdown-submenu{position:relative}.dropdown-submenu a::after{transform:rotate(-90deg);position:absolute;right:6px;top:.8em}.dropdown-submenu .dropdown-menu{top:0;left:100%;margin-left:.1rem;margin-right:.1rem}.checkbox-fix{margin-top:15px}#grid{height:calc(75vh)}#spreadsheet{width:100%;height:calc(75vh)}.text-block{padding-top:10px;padding-bottom:10px;text-align:justify;line-height:150%;font-size:16px}table.dataframe{border:1px solid #808080;background-color:#fff;width:100%;text-align:center;border-collapse:collapse}table.dataframe td,table.dataframe th{border:1px solid #808080;padding:3px 13px}table.dataframe tbody td{font-size:13px;text-align:center;padding:3px 13px}td:nth-child(1){background:#ccc}table.dataframe th{font-size:15px;background-color:#ccc;text-align:center}.k-button{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.k-button:focus,.k-button.focus{color:#fff;background-color:#449d44;border-color:#255625}.k-button:hover{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{color:#fff;background-color:#449d44;border-color:#398439}.k-button:active:hover,.k-button.active:hover,.open>.dropdown-toggle.k-button:hover,.k-button:active:focus,.k-button.active:focus,.open>.dropdown-toggle.k-button:focus,.k-button:active.focus,.k-button.active.focus,.open>.dropdown-toggle.k-button.focus{color:#fff;background-color:#398439;border-color:#255625}.k-button:active,.k-button.active,.open>.dropdown-toggle.k-button{background-image:none}.k-button.disabled:hover,.k-button[disabled]:hover,fieldset[disabled] .k-button:hover,.k-button.disabled:focus,.k-button[disabled]:focus,fieldset[disabled] .k-button:focus,.k-button.disabled.focus,.k-button[disabled].focus,fieldset[disabled] .k-button.focus{background-color:#5cb85c;border-color:#4cae4c}.k-button .badge{color:#5cb85c;background-color:#fff}.k-numeric-wrap{width:100px}.disabledpanel{pointer-events:none;opacity:.4} + +

InVivoStat Equivalence Test Analysis

+ +

Response and equivalence bound

+ +

The Resp 1 response is currently being analysed by the Equivalence (TOST) test Analysis module.The response has been loge transformed prior to analysis.

+ +

The upper equivalence bound is defined as a 10.00 % (increase) change. As only an upper bound has been defined a one-sided equivalence test has been performed.

+ +

Scatterplot of the observed data (on the loge scale)

+ +

+

Tip: Use this plot to identify possible outliers.

+ +

Model coefficients

+ + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
EstimateStd. Errort-valuep-value
(Intercept) 0.4624 0.0167 27.67 < 0.0001
Treat11-0.1402 0.0297 -4.72 < 0.0001
Treat12-0.0225 0.0287 -0.78 0.4353
Treat13-0.0292 0.0287 -1.02 0.3118
+
+
+ +

Table of the back-transformed geometric means with 95% confidence intervals

+ +

As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mean ID Treat1 Geometric mean Lower 95% CI Upper 95% CI
1 +D0 +1.380 +1.288 +1.479 +
2 +D1 +1.553 +1.454 +1.658 +
3 +D10 +1.542 +1.444 +1.647 +
4 +D3 +1.924 +1.802 +2.055 +
+
+
+ +

Plot of the back-transformed geometric means with 95% confidence intervals

+ +

+

All pairwise equivalence assessments

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Comparison % change Upper one-sided 95% CI Upper % change equivalence bound Equivalence assessment
D0 / D1 +-11.107 +-3.725 +10 +Equivalent +
D0 / D10 +-10.509 +-3.077 +10 +Equivalent +
D0 / D3 +-28.264 +-22.306 +10 +Equivalent +
D1 / D10 +0.673 +8.802 +10 +Equivalent +
D1 / D3 +-19.300 +-12.784 +10 +Equivalent +
D10 / D3 +-19.840 +-13.367 +10 +Equivalent +
+
+
+ +

Plot of the comparisons between the predicted means with 95% one-sided confidence interval along with equivalence bound

+ +

+

Conclusion

+ +

Conclusion: The following means are deemed equivalent at the 5% level: D0 and D1, D0 and D10, D0 and D3, D1 and D10, D1 and D3, D10 and D3.

+ +

Diagnostic plot

+ +

Residuals vs. predicted plot

+ +

+

Tip: On this plot look to see if the spread of the points increases as the predicted values increase. If so the response may need transforming.

+ +

Tip: Any observation with a residual less than -3 or greater than 3 (SD) should be investigated as a possible outlier.

+ +

Analysis description

+ +

The data were analysed using a one-sided equivalence test, see Limentani et al. 2005, with Treat1 as the treatment factor. The response was loge transformed prior to analysis to stabilise the variance.

+ +

For more information on the theoretical approaches that are implemented within this module, see Bate and Clark (2014).

+ +

References

+ +

When referring to InVivoStat, please cite 'InVivoStat, version 4.3'.

+ +

Bate, S.T. and Clark, R.A. (2014). The Design and Statistical Analysis of Animal Experiments. Cambridge University Press.

+ +

Limentani, G.B., Ringo, M.C., Ye, F., Bergquist, M.L. and MCSorley E.O. (2005). Beyond the t-test: Statistical equivalence testing. Analytical Chemistry, 77(11), 221-226.

+ +

R references

+ +

R Development Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org.

+ +

Lecoutre, Eric (2003). The R2HTML Package. R News, Vol 3. N. 3, Vienna, Austria.

+ +

Barret Schloerke, Jason Crowley, Di Cook, Francois Briatte, Moritz Marbach, Edwin Thoen, Amos Elberg and Joseph Larmarange (2018). GGally: Extension to 'ggplot2'. R package version 1.4.0. https://CRAN.R-project.org/package=GGally

+ +

Erich Neuwirth (2014). RColorBrewer: ColorBrewer Palettes. R package version 1.1-2. https://CRAN.R-project.org/package=RColorBrewer

+ +

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

+ +

Kamil Slowikowski (2019). ggrepel: Automatically Position Non-Overlapping Text Labels with 'ggplot2'. R package version 0.8.1. https://CRAN.R-project.org/package=ggrepel

+ +

H. Wickham. Reshaping data with the reshape package. Journal of Statistical Software, 21(12), 2007.

+ +

Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. URL http://www.jstatsoft.org/v40/i01/.

+ +

Hadley Wickham and Dana Seidel (2019). scales: Scale Functions for Visualization. R package version 1.1.0. https://CRAN.R-project.org/package=scales

+ +

Gabor Grothendieck, Louis Kates and Thomas Petzoldt (2016). proto: Prototype Object-Based Programming. R package version 1.0.0. https://CRAN.R-project.org/package=proto

+ +

Torsten Hothorn, Frank Bretz and Peter Westfall (2008). Simultaneous Inference in General Parametric Models. Biometrical Journal 50(3), 346--363.

+ +

Spencer Graves, Hans-Peter Piepho and Luciano Selzer with help from Sundar Dorai-Raj (2019). multcompView: Visualizations of Paired Comparisons. R package version 0.1-8. https://CRAN.R-project.org/package=multcompView

+ +

John Fox and Sanford Weisberg (2019). An {R} Companion to Applied Regression, Third Edition. Thousand Oaks CA: Sage. URL: https://socialsciences.mcmaster.ca/jfox/Books/Companion/

+ +

Russell Lenth (2020). emmeans: Estimated Marginal Means, aka Least-Squares Means. R package version 1.4.6. https://CRAN.R-project.org/package=emmeans

+ +

Analysis dataset

+ + +

+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Observation Resp 1 Treat1
1 + 0.157 +D0 +
2 + 0.264 +D0 +
3 + 0.540 +D0 +
4 + 0.157 +D0 +
5 + 0.326 +D0 +
6 + 0.365 +D0 +
7 + 0.470 +D0 +
8 + 0.452 +D0 +
9 + 0.287 +D0 +
10 + 0.451 +D0 +
11 + 0.505 +D0 +
12 + 0.388 +D0 +
13 + 0.540 +D0 +
14 + 0.157 +D0 +
15 + 0.062 +D0 +
16 + 0.218 +D0 +
17 + 0.470 +D0 +
18 +-0.013 +D0 +
19 + 0.315 +D1 +
20 + 0.407 +D1 +
21 + 0.461 +D1 +
22 + 0.315 +D1 +
23 + 0.407 +D1 +
24 + 0.315 +D1 +
25 + 0.495 +D1 +
26 + 0.427 +D1 +
27 + 0.407 +D1 +
28 + 0.461 +D1 +
29 + 0.571 +D1 +
30 + 0.619 +D1 +
31 + 0.234 +D1 +
32 + 0.495 +D1 +
33 + 0.427 +D1 +
34 + 0.571 +D1 +
35 + 0.367 +D1 +
36 + 0.651 +D1 +
37 + 0.619 +D1 +
38 + 0.234 +D1 +
39 + 0.230 +D10 +
40 + 0.571 +D10 +
41 + 0.515 +D10 +
42 + 0.495 +D10 +
43 + 0.427 +D10 +
44 + 0.571 +D10 +
45 + 0.651 +D10 +
46 + 0.315 +D10 +
47 + 0.619 +D10 +
48 + 0.234 +D10 +
49 + 0.588 +D10 +
50 + 0.172 +D10 +
51 + 0.315 +D10 +
52 + 0.367 +D10 +
53 + 0.651 +D10 +
54 + 0.315 +D10 +
55 + 0.407 +D10 +
56 + 0.461 +D10 +
57 + 0.588 +D10 +
58 + 0.172 +D10 +
59 + 0.706 +D3 +
60 + 0.786 +D3 +
61 + 0.825 +D3 +
62 + 0.541 +D3 +
63 + 0.557 +D3 +
64 + 0.593 +D3 +
65 + 0.621 +D3 +
66 + 0.493 +D3 +
67 + 0.811 +D3 +
68 + 0.632 +D3 +
69 + 0.527 +D3 +
70 + 0.600 +D3 +
71 + 0.815 +D3 +
72 + 0.477 +D3 +
73 + 0.721 +D3 +
74 + 0.779 +D3 +
75 + 0.688 +D3 +
76 + 0.523 +D3 +
77 + 0.480 +D3 +
78 + 0.909 +D3 +
+
+
+ +

Analysis options

+ +

Response variable: Resp 1

+ +

Response variable transformation: loge

+ +

Treatment factor(s): Treat1

+ +

Equivalence bounds type: percentage

+ +

Upper equivalence bound: 10

+ +

Output residuals vs. predicted plot (Y/N): Y

+ +

Output normal probability plot (Y/N): N

+ +

Significance level: 0.05

+ +

Selected effect (for pairwise mean comparisons): Treat1

+ +

Output least square (predicted) means (Y/N): Y

+ +

Control group: NULL

diff --git a/SilveR.IntegrationTests/SilveR.IntegrationTests.csproj b/SilveR.IntegrationTests/SilveR.IntegrationTests.csproj index 62ff8e603..22c49b721 100644 --- a/SilveR.IntegrationTests/SilveR.IntegrationTests.csproj +++ b/SilveR.IntegrationTests/SilveR.IntegrationTests.csproj @@ -7,7 +7,7 @@ - + diff --git a/SilveR.IntegrationTests/StatsTests/EquivalenceTOSTTestTests.cs b/SilveR.IntegrationTests/StatsTests/EquivalenceTOSTTestTests.cs index 9b3f8475f..490c63e67 100644 --- a/SilveR.IntegrationTests/StatsTests/EquivalenceTOSTTestTests.cs +++ b/SilveR.IntegrationTests/StatsTests/EquivalenceTOSTTestTests.cs @@ -31,6 +31,9 @@ public async Task ETT1() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp 1"; model.Treatments = new string[] { "Resp 1" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -53,6 +56,9 @@ public async Task ETT2() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp6"; model.Treatments = new string[] { "Treat1" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -75,6 +81,9 @@ public async Task ETT3() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp 1"; model.Treatments = new string[] { "Treat7" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -98,6 +107,9 @@ public async Task ETT4() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp 1"; model.Treatments = new string[] { "Tre at4" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -120,6 +132,9 @@ public async Task ETT5() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp4"; model.Treatments = new string[] { "Treat1" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -143,6 +158,9 @@ public async Task ETT6() model.Response = "Resp 1"; model.Treatments = new string[] { "Treat1" }; model.Covariates = new string[] { "Cov4" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -165,6 +183,9 @@ public async Task ETT7() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp5"; model.Treatments = new string[] { "Treat1" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -189,6 +210,9 @@ public async Task ETT8() model.Treatments = new string[] { "Treat1" }; model.Covariates = new string[] { "Cov5" }; model.PrimaryFactor = "Treat1"; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -211,6 +235,9 @@ public async Task ETT9() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp 1"; model.Treatments = new string[] { "T reat5" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -233,6 +260,9 @@ public async Task ETT10() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp 1"; model.Treatments = new string[] { "Treat6" }; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.LowerBoundPercentageChange = 10; + model.UpperBoundPercentageChange = 20; //Act HttpResponseMessage response = await client.PostAsync("Analyses/EquivalenceTOSTTest", new FormUrlEncodedContent(model.ToKeyValue())); @@ -336,7 +366,7 @@ public async Task ETT14() model.Covariates = new string[] { "Cov2" }; model.CovariateTransformation = "Log10"; model.PrimaryFactor = "Treat1"; - model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Absolute; model.LowerBoundAbsolute = 10; model.UpperBoundAbsolute = 20; @@ -364,7 +394,7 @@ public async Task ETT15() model.Covariates = new string[] { "Cov3" }; model.CovariateTransformation = "Loge"; model.PrimaryFactor = "Treat1"; - model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; + model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Absolute; model.LowerBoundAbsolute = 10; model.UpperBoundAbsolute = 20; @@ -528,6 +558,7 @@ public async Task ETT21() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp8"; model.Treatments = new string[] { "Treat12", "Treat13" }; + model.SelectedEffect = "Treat12"; model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Absolute; model.LowerBoundAbsolute = 10; model.UpperBoundAbsolute = 20; @@ -553,6 +584,7 @@ public async Task ETT22() model.DatasetID = _factory.SheetNames.Single(x => x.Value == "Equivalence TOST").Key; model.Response = "Resp11"; model.Treatments = new string[] { "Treat14" }; + model.SelectedEffect = "Treat14"; model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Absolute; model.LowerBoundAbsolute = 10; model.UpperBoundAbsolute = 20; @@ -612,7 +644,7 @@ public async Task ETT25() IEnumerable errors = await Helpers.ExtractErrors(response); //Assert - Assert.Contains("The field Lower bound percentage must be between 0 and 100.", errors); + Assert.Contains("User cannot select a negative Percentage change.", errors); Helpers.SaveOutput("EquivalenceTOSTTest", testName, errors); } @@ -637,7 +669,7 @@ public async Task ETT26() IEnumerable errors = await Helpers.ExtractErrors(response); //Assert - Assert.Contains("The field Lower bound percentage must be between 0 and 100.", errors); + Assert.Contains("User cannot select a negative Percentage change.", errors); Helpers.SaveOutput("EquivalenceTOSTTest", testName, errors); } @@ -1531,7 +1563,7 @@ public async Task ETT55() model.Treatments = new string[] { "Treat1" }; model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; //model.LowerBoundAbsolute = 0.2m; - model.UpperBoundAbsolute = 10m; + model.UpperBoundPercentageChange = 10m; model.Significance = "0.05"; model.PRPlotSelected = true; model.SelectedEffect = "Treat1"; @@ -1572,7 +1604,7 @@ public async Task ETT56() model.Treatments = new string[] { "Treat1" }; model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; //model.LowerBoundAbsolute = 0.2m; - model.UpperBoundAbsolute = 10m; + model.UpperBoundPercentageChange = 10m; model.Significance = "0.05"; model.PRPlotSelected = true; model.SelectedEffect = "Treat1"; @@ -1614,7 +1646,7 @@ public async Task ETT57() model.Treatments = new string[] { "Treat1" }; model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; //model.LowerBoundAbsolute = 0.2m; - model.UpperBoundAbsolute = 10m; + model.UpperBoundPercentageChange = 10m; model.Significance = "0.05"; model.PRPlotSelected = true; model.SelectedEffect = "Treat1"; @@ -1646,7 +1678,7 @@ public async Task ETT58() model.Treatments = new string[] { "Treat1" }; model.EquivalenceBoundsType = EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage; //model.LowerBoundAbsolute = 0.2m; - model.UpperBoundAbsolute = 10m; + model.UpperBoundPercentageChange = 10m; model.Significance = "0.05"; model.PRPlotSelected = true; model.SelectedEffect = "Treat1"; diff --git a/SilveR/Scripts/EquivalenceTOSTTest.R b/SilveR/Scripts/EquivalenceTOSTTest.R index 26efe26f2..ece039928 100644 --- a/SilveR/Scripts/EquivalenceTOSTTest.R +++ b/SilveR/Scripts/EquivalenceTOSTTest.R @@ -900,10 +900,10 @@ if(showLSMeans =="Y") { HTML.title(CITitle2, HR=2, align="left") if (GeomDisplay == "geometricmeansandpredictedmeansonlogscale") { - HTML("As the response was log transformed prior to analysis the least square (predicted) means are presented on the log scale. These results can be back transformed onto the original scale. These are known as the back-transformed geometric means.", align="left") + HTML("As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.", align="left") } if (GeomDisplay == "geometricmeansonly") { - HTML("As the response was log transformed prior to analysis the least square (predicted) means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.", align="left") + HTML("As the response was log transformed prior to analysis the means are presented back transformed onto the original scale. These are known as the back-transformed geometric means.", align="left") } #Calculate LS Means Table diff --git a/SilveR/SilveR.csproj b/SilveR/SilveR.csproj index 0df5881f5..72cfd6bfe 100644 --- a/SilveR/SilveR.csproj +++ b/SilveR/SilveR.csproj @@ -34,9 +34,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/SilveR/StatsModels/AnalysisModelBase.cs b/SilveR/StatsModels/AnalysisModelBase.cs index de031881e..493950591 100644 --- a/SilveR/StatsModels/AnalysisModelBase.cs +++ b/SilveR/StatsModels/AnalysisModelBase.cs @@ -13,12 +13,7 @@ protected AnalysisModelBase(string scriptFileName) this.ScriptFileName = scriptFileName; } - public string CustomRCode { get; private set; } - - public void SetCustomRCode(string rCode) - { - CustomRCode = rCode; - } + public string CustomRCode { get; set; } public abstract ValidationInfo Validate(); diff --git a/SilveR/StatsModels/EquivalenceTOSTTestModel.cs b/SilveR/StatsModels/EquivalenceTOSTTestModel.cs index 23cef82d6..b364a4206 100644 --- a/SilveR/StatsModels/EquivalenceTOSTTestModel.cs +++ b/SilveR/StatsModels/EquivalenceTOSTTestModel.cs @@ -84,11 +84,11 @@ public enum EquivalenceBoundsOption { Absolute = 0, Percentage = 1 } public Nullable UpperBoundAbsolute { get; set; } [DisplayName("Lower bound percentage")] - [Range(0, 100)] + [Range(0, 1000, ErrorMessage = "User cannot select a negative Percentage change.")] public Nullable LowerBoundPercentageChange { get; set; } [DisplayName("Upper bound percentage")] - [Range(0, 100)] + [Range(0, 1000, ErrorMessage = "User cannot select a negative Percentage change.")] public Nullable UpperBoundPercentageChange { get; set; } public EquivalenceTOSTTestModel() : base("EquivalenceTOSTTest") { } diff --git a/SilveR/StatsModels/RRunnerModel.cs b/SilveR/StatsModels/RRunnerModel.cs index bf0f729b1..f05b86593 100644 --- a/SilveR/StatsModels/RRunnerModel.cs +++ b/SilveR/StatsModels/RRunnerModel.cs @@ -14,9 +14,6 @@ namespace SilveR.StatsModels { public class RRunnerModel : AnalysisDataModelBase { - [Required] - public string CustomRCode { get; set; } - [Required] [DisplayName("Variable A")] public IEnumerable VariableA { get; set; } @@ -78,11 +75,14 @@ public override string GetCommandLineArguments() arguments.Append(" " + argFormatter.GetFormattedArgument(VariableD)); //10 - IEnumerable argumentLines = Regex.Split(RawArguments, "\r\n|\r|\n"); - - foreach (string line in argumentLines.Where(x => !String.IsNullOrWhiteSpace(x))) + if (!String.IsNullOrWhiteSpace(RawArguments)) { - arguments.Append(" " + line.Trim()); + IEnumerable argumentLines = Regex.Split(RawArguments, "\r\n|\r|\n"); + + foreach (string line in argumentLines.Where(x => !String.IsNullOrWhiteSpace(x))) + { + arguments.Append(" " + line.Trim()); + } } return arguments.ToString().Trim(); @@ -95,8 +95,6 @@ public override void LoadArguments(IEnumerable arguments) this.CustomRCode = argHelper.LoadStringArgument(nameof(CustomRCode)); - this.SetCustomRCode(this.CustomRCode); - this.VariableA = argHelper.LoadIEnumerableArgument(nameof(VariableA)); this.VariableB = argHelper.LoadIEnumerableArgument(nameof(VariableB)); this.VariableC = argHelper.LoadIEnumerableArgument(nameof(VariableC)); diff --git a/SilveR/Validators/EquivalenceTOSTTestValidator.cs b/SilveR/Validators/EquivalenceTOSTTestValidator.cs index 56f79833f..ceafbf21d 100644 --- a/SilveR/Validators/EquivalenceTOSTTestValidator.cs +++ b/SilveR/Validators/EquivalenceTOSTTestValidator.cs @@ -105,6 +105,15 @@ public override ValidationInfo Validate() ValidationInfo.AddErrorMessage("The lower bound selected is higher than the upper bound, please check the bounds as the lower bound should be less than the upper bound."); } + if(etVariables.EquivalenceBoundsType == EquivalenceTOSTTestModel.EquivalenceBoundsOption.Absolute && (etVariables.LowerBoundAbsolute.HasValue == false && etVariables.UpperBoundAbsolute.HasValue == false)) + { + ValidationInfo.AddErrorMessage("Absolute selected but bounds not entered."); + } + else if (etVariables.EquivalenceBoundsType == EquivalenceTOSTTestModel.EquivalenceBoundsOption.Percentage && (etVariables.LowerBoundPercentageChange.HasValue == false && etVariables.UpperBoundPercentageChange.HasValue == false)) + { + ValidationInfo.AddErrorMessage("Percentage equivelence bounds selected but no bounds entered."); + } + //if get here then no errors so return true return ValidationInfo; } diff --git a/SilveR/Views/Analyses/EquivalenceTOSTTest.cshtml b/SilveR/Views/Analyses/EquivalenceTOSTTest.cshtml index 1ccb02c67..d7bbf8a49 100644 --- a/SilveR/Views/Analyses/EquivalenceTOSTTest.cshtml +++ b/SilveR/Views/Analyses/EquivalenceTOSTTest.cshtml @@ -23,7 +23,7 @@

@ViewBag.Title

- Help + Help
diff --git a/SilveR/Views/Home/Index.cshtml b/SilveR/Views/Home/Index.cshtml index 07c6a1c28..4f1ddf981 100644 --- a/SilveR/Views/Home/Index.cshtml +++ b/SilveR/Views/Home/Index.cshtml @@ -37,10 +37,10 @@ (within R) with a user interface that is both easy to use and intuitive to the non-statistician.

diff --git a/SilveR/wwwroot/js/stats/rrunner.min.js b/SilveR/wwwroot/js/stats/rrunner.min.js index 569e58301..e430ac856 100644 --- a/SilveR/wwwroot/js/stats/rrunner.min.js +++ b/SilveR/wwwroot/js/stats/rrunner.min.js @@ -1 +1 @@ -function openItem(n){$.ajax({type:"POST",url:"/Values/OpenUrl",data:{url:n}})}$(function(){$("#Responses").kendoMultiSelect({dataSource:theModel.availableVariables,value:theModel.responses});$("#Transformation").kendoDropDownList({dataSource:theModel.transformationsList});$("#FirstCatFactor").kendoDropDownList({dataSource:theModel.availableVariablesAllowNull});$("#SecondCatFactor").kendoDropDownList({dataSource:theModel.availableVariablesAllowNull});$("#ThirdCatFactor").kendoDropDownList({dataSource:theModel.availableVariablesAllowNull});$("#FourthCatFactor").kendoDropDownList({dataSource:theModel.availableVariablesAllowNull});$("#Significance").kendoNumericTextBox({format:"#.#",decimals:1,spinners:!0})}); \ No newline at end of file +function openItem(n){$.ajax({type:"POST",url:"/Values/OpenUrl",data:{url:n}})}$(function(){$("#VariableA").kendoMultiSelect({dataSource:theModel.availableVariables,value:theModel.variableA});$("#VariableB").kendoMultiSelect({dataSource:theModel.availableVariables,value:theModel.variableB});$("#VariableC").kendoMultiSelect({dataSource:theModel.availableVariables,value:theModel.variableC});$("#VariableD").kendoMultiSelect({dataSource:theModel.availableVariables,value:theModel.variableD})}); \ No newline at end of file diff --git a/Silver.UnitTests/Silver.UnitTests.csproj b/Silver.UnitTests/Silver.UnitTests.csproj index 4ba2d531a..924c918cc 100644 --- a/Silver.UnitTests/Silver.UnitTests.csproj +++ b/Silver.UnitTests/Silver.UnitTests.csproj @@ -10,7 +10,7 @@ - + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 78a6d3d2f..2959d56fe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -133,7 +133,7 @@ jobs: - job: Linux dependsOn: Test pool: - vmImage: 'ubuntu-16.04' + vmImage: 'ubuntu-18.04' steps: