diff --git a/R/regressionlogistic.R b/R/regressionlogistic.R index f1aae796..aaed4f13 100644 --- a/R/regressionlogistic.R +++ b/R/regressionlogistic.R @@ -354,8 +354,10 @@ RegressionLogisticInternal <- function(jaspResults, dataset = NULL, options, ... rows <- vector("list", length(glmObj)) for (midx in seq_along(glmObj)) { - .linregAddPredictorsInModelFootnote(jaspResults[["modelSummary"]], - options[["modelTerms"]][[midx]][["components"]], midx) + + if (options$method == "enter") + .linregAddPredictorsInModelFootnote(jaspResults[["modelSummary"]], + options[["modelTerms"]][[midx]][["components"]], midx) mObj <- glmObj[[midx]] if (midx > 1) { if (options$method == "forward" || diff --git a/inst/help/Correlation.md b/inst/help/Correlation.md index c0e5d65d..c5938144 100755 --- a/inst/help/Correlation.md +++ b/inst/help/Correlation.md @@ -54,7 +54,7 @@ The Correlation analysis allows estimation of the population correlation, as wel #### Assumption checks - Multivariate normality - - Shapiro: Computes the Shapiro-Wilk statistic to test the null hypothesis that the selected variables have multivariate normal distribution. + - Shapiro: Generalized Shapiro-Wilk test for multivariate normality by Villasenor-Alva and Gonzalez-Estrada (2009), using the mvShapiroTest package. - Pairwise normality - Shapiro: For each possible combination of the selected variables, computes the Shapiro-Wilk statistic to test the null hypothesis that the variable pair has a bivariate normal distribution. @@ -108,6 +108,7 @@ The Correlation analysis allows estimation of the population correlation, as wel - Whitlock, M. C., & Schluter, D. (2015). *The analysis of biological data (2nd ed.)*. Greenwood Village, Colorado: Roberts and Company Publishers. - Sellke, T., Bayarri, M. J., & Berger, J. O. (2001). Calibration of *p* values for testing precise null hypotheses. *The American Statistician, 55*(1), 62-71. - Caruso, J.C., & Cliff, N. (1997). Empirical Size, Coverage, and Power of Confidence Intervals for Spearman's Rho. *Educational and Psychological Measurement, 57*(4), 637-654. +- Villasenor-Alva, J.A. and Gonzalez-Estrada, E. (2009). A generalization of Shapiro-Wilk's test for multivariate normality. *Communications in Statistics: Theory and Methods*, 38, 1870-1883. - Xu, W., Hou, Y., Hung, Y.S., & Zou, Y. (2013). A comparative analysis of Spearman’s rho and Kendall’s tau in normal and contaminated normal models. *Signal Processing, 93*, 261-276. ### R Packages diff --git a/tests/testthat/test-correlation.R b/tests/testthat/test-correlation.R index 57d5bf30..660e8ab9 100644 --- a/tests/testthat/test-correlation.R +++ b/tests/testthat/test-correlation.R @@ -24,19 +24,19 @@ results <- jaspTools::runAnalysis("Correlation", "debug.csv", options) test_that("Shapiro-Wilk Test for Multivariate Normality table results match", { table <- results[["results"]][["assumptionsContainer"]][["collection"]][["assumptionsContainer_multivariateShapiro"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.878989128563944, 6.30818027438384e-06)) + list(0.951937236443559, 1.26292374637229e-05)) }) test_that("Shapiro-Wilk Test for Bivariate Normality table results match", { table <- results[["results"]][["assumptionsContainer"]][["collection"]][["assumptionsContainer_pairwiseShapiro"]][["data"]] jaspTools::expect_equal_tables(table, - list(0.901474720121716, 1.65965808553626e-06, "-", "contNormal", "contGamma", - 0.966220519133756, 0.0114432512312019, "-", "contNormal", "contcor1", - 0.966282842281815, 0.0561697740909883, "-", "contNormal", "debMiss30", - 0.873628887299087, 9.84839266547295e-08, "-", "contGamma", "contcor1", - 0.862918050703853, 1.7604538483754e-06, "-", "contGamma", "debMiss30", - 0.990143883746405, 0.861444767503725, "-", "contcor1", "debMiss30" - )) + list(0.920133622718739, 9.26266088028011e-09, "-", "contNormal", "contGamma", + 0.975095766862836, 0.0197633225756002, "-", "contNormal", "contcor1", + 0.97421223116433, 0.108462090826961, "-", "contNormal", "debMiss30", + 0.930015026431291, 8.89751236523928e-08, "-", "contGamma", "contcor1", + 0.933648725575745, 2.37704417812631e-05, "-", "contGamma", "debMiss30", + 0.98166946114741, 0.416182497522526, "-", "contcor1", "debMiss30" + )) }) test_that("Correlation plot matches", {