From b9a39cb321e70f0be0d4ac8b50fc1b2d1964bcb3 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 10:42:52 +0100 Subject: [PATCH 1/9] Fix error in vignette --- vignettes/parameters.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/parameters.Rmd b/vignettes/parameters.Rmd index a65a39e38..f92b1bf14 100644 --- a/vignettes/parameters.Rmd +++ b/vignettes/parameters.Rmd @@ -281,7 +281,7 @@ plot(result, show_intercept = TRUE) ## Model Parameters of Meta-Analysis models ```{r} -mydat <- data.frame( +mydat <<- data.frame( effectsize = c(-0.393, 0.675, 0.282, -1.398), standarderror = c(0.317, 0.317, 0.13, 0.36) ) From 67dabdc873cdbf9743b0dcd40acafc7df57956c7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 11:06:25 +0100 Subject: [PATCH 2/9] fix --- vignettes/parameters.Rmd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vignettes/parameters.Rmd b/vignettes/parameters.Rmd index f92b1bf14..e70c970aa 100644 --- a/vignettes/parameters.Rmd +++ b/vignettes/parameters.Rmd @@ -323,7 +323,8 @@ dat <- escalc( ) dat$author <- make.unique(dat$author) dat$disease <- sample(c("Cancer", "CVD", "Depression"), size = nrow(dat), replace = TRUE) -model <- rma(yi, vi, mods = ~disease, data = dat, digits = 3, slab = author) +mydat <<- dat +model <- rma(yi, vi, mods = ~disease, data = mydat, digits = 3, slab = author) result <- model_parameters(model) result From 2376baf827cafb3a464c8906ae16570ecbfcc2fd Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 15:01:34 +0100 Subject: [PATCH 3/9] fix scoping --- vignettes/parameters.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/parameters.Rmd b/vignettes/parameters.Rmd index e70c970aa..cf22b1ddf 100644 --- a/vignettes/parameters.Rmd +++ b/vignettes/parameters.Rmd @@ -417,7 +417,7 @@ plot(result) ### From simulated model parameters ```{r fig.height=8} -simulated_parameters <- simulate_model(model1, component = "conditional") +simulated_parameters <<- simulate_model(model1, component = "conditional") result <- equivalence_test(simulated_parameters) result From 732893625cea387b3ae27b7169d142a0a7e5b9e4 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 15:27:53 +0100 Subject: [PATCH 4/9] remove non working example --- vignettes/parameters.Rmd | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vignettes/parameters.Rmd b/vignettes/parameters.Rmd index cf22b1ddf..a67424730 100644 --- a/vignettes/parameters.Rmd +++ b/vignettes/parameters.Rmd @@ -414,16 +414,6 @@ result plot(result) ``` -### From simulated model parameters - -```{r fig.height=8} -simulated_parameters <<- simulate_model(model1, component = "conditional") -result <- equivalence_test(simulated_parameters) -result - -plot(result) -``` - ## p-value function and consonance/compatibility plot _([related function documentation](https://easystats.github.io/parameters/reference/p_function.html))_ From b9d1521d6099feded6d8a21c5468a5c77e6955a2 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 15:35:24 +0100 Subject: [PATCH 5/9] fix --- vignettes/performance.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/performance.Rmd b/vignettes/performance.Rmd index 83ad11b29..dd293a913 100644 --- a/vignettes/performance.Rmd +++ b/vignettes/performance.Rmd @@ -72,7 +72,7 @@ plot(result) Example where model **is** a good fit. ```{r} -model <- glm(am ~ mpg + vs + cyl, data = mtcars, family = "binomial") +model <- suppressWarnings(glm(am ~ mpg + vs + cyl, data = mtcars, family = "binomial")) result <- binned_residuals(model) result From 54d41afd71a9a4d216d0a8bb5ab48a1bd020fba6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 15:45:31 +0100 Subject: [PATCH 6/9] fix --- vignettes/performance.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/performance.Rmd b/vignettes/performance.Rmd index dd293a913..bca3bcc07 100644 --- a/vignettes/performance.Rmd +++ b/vignettes/performance.Rmd @@ -151,7 +151,7 @@ _([related function documentation](https://easystats.github.io/performance/refer ```{r} model <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) -result <- check_normality(model) +result <<- check_normality(model) ``` ### Density Plot From 7232a9201b457b07416740922fee410403293918 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 16:01:52 +0100 Subject: [PATCH 7/9] fix --- vignettes/performance.Rmd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vignettes/performance.Rmd b/vignettes/performance.Rmd index bca3bcc07..689b96f46 100644 --- a/vignettes/performance.Rmd +++ b/vignettes/performance.Rmd @@ -150,26 +150,26 @@ plot(result, type = "bars") _([related function documentation](https://easystats.github.io/performance/reference/check_normality.html))_ ```{r} -model <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) -result <<- check_normality(model) +model2 <<- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) +result2 <<- check_normality(model2) ``` ### Density Plot ```{r} -plot(result, type = "density") +plot(result2, type = "density") ``` ### QQ Plot ```{r} -plot(result, type = "qq") +plot(result2, type = "qq") ``` ### PP Plot ```{r} -plot(result, type = "pp") +plot(result2, type = "pp") ``` ## Check for Normal Distributed Random Effects From 42a1d2921233c61407138651ed6c033699620bdc Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 16:03:30 +0100 Subject: [PATCH 8/9] fix --- vignettes/performance.Rmd | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/vignettes/performance.Rmd b/vignettes/performance.Rmd index 689b96f46..ab06cb394 100644 --- a/vignettes/performance.Rmd +++ b/vignettes/performance.Rmd @@ -150,25 +150,34 @@ plot(result, type = "bars") _([related function documentation](https://easystats.github.io/performance/reference/check_normality.html))_ ```{r} -model2 <<- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) -result2 <<- check_normality(model2) +model2 <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars) +result2 <- check_normality(model2) ``` ### Density Plot -```{r} +```{r echo=FALSE} +plot(result2, type = "density", data = model2) +``` +```{r eval=FALSE} plot(result2, type = "density") ``` ### QQ Plot -```{r} +```{r echo=FALSE} +plot(result2, type = "qq", data = model2) +``` +```{r eval=FALSE} plot(result2, type = "qq") ``` ### PP Plot -```{r} +```{r echo=FALSE} +plot(result2, type = "pp", data = model2) +``` +```{r eval=FALSE} plot(result2, type = "pp") ``` From 6bbf6ee2941d4798f8b502feb7549791f0a43899 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 2 Feb 2024 16:16:52 +0100 Subject: [PATCH 9/9] fix --- vignettes/performance.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/performance.Rmd b/vignettes/performance.Rmd index ab06cb394..1032e8182 100644 --- a/vignettes/performance.Rmd +++ b/vignettes/performance.Rmd @@ -208,7 +208,7 @@ _([related function documentation](https://easystats.github.io/performance/refer ```{r} model <- lm(len ~ supp + dose, data = ToothGrowth) result <- check_homogeneity(model) -plot(result) +suppressWarnings(plot(result)) ``` ## Posterior Predictive Checks