diff --git a/docs/404.html b/docs/404.html index 774ad32..d45caa6 100644 --- a/docs/404.html +++ b/docs/404.html @@ -67,7 +67,7 @@
diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index 6df8225..6d7631b 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -67,7 +67,7 @@ diff --git a/docs/CONTRIBUTING.html b/docs/CONTRIBUTING.html index 6994540..e66189c 100644 --- a/docs/CONTRIBUTING.html +++ b/docs/CONTRIBUTING.html @@ -67,7 +67,7 @@ diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 3ddb524..4870d13 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -67,7 +67,7 @@ diff --git a/docs/articles/custom-plot.html b/docs/articles/custom-plot.html index 6f56cfd..7f5b001 100644 --- a/docs/articles/custom-plot.html +++ b/docs/articles/custom-plot.html @@ -31,7 +31,7 @@ @@ -101,7 +101,7 @@This vignette exemplifies different ways to plot the specification curve. For most casces, the function plot_specs()
takes care of the overall process. However, more specific customizations are possible if we use the more specific functions plot_curve()
and plot_choices
. Furthermore, we can extend the overall plot with the additional function plot_samplesizes()
. All of these functions produce objects of the class ggplot that can be customized further using the grammar of graphics provided by the package ggplot2.
This vignette exemplifies different ways to plot the specification curve. For most cases, the function plot_specs()
takes care of the overall process. However, more specific customization is possible if we use the more specific functions plot_curve()
and plot_choices
. Furthermore, we can extend the overall plot with the additional function plot_samplesizes()
. All of these functions produce objects of the class ggplot that can be customized further using the grammar of graphics provided by the package ggplot2.
Second, we can alternatively use the function plot_variance()
to obtain a visualization. The function calls icc_specs()
automatically. We can hence pass the multilevel results object directly. Further customizations via the ggplot2 is possible.
Second, we can alternatively use the function plot_variance()
to obtain a visualization. The function calls icc_specs()
automatically. We can hence pass the multilevel results object directly. Further customization via ggplot2 is possible.
plot_variance(m1) +
ylim(0, 100)
The console will show a progress bar during estimation. For more information and additional customizations of the progress bar, see the documentation of the package progress
.
The console will show a progress bar during estimation. For more information, see the documentation of the package progress
.
[==========================================================-------------] 81% (156/192) Finished in 1s
There are several numeric variables. In this exampkle, we assume that x
represents independent variables, y
represents dependent variables, c
represents control variables, and group
denotes potential grouping variables that can be used for subsetting the data.
There are several numeric variables. In this example, we assume that x
represents independent variables, y
represents dependent variables, c
represents control variables, and group
denotes potential grouping variables that can be used for subsetting the data.
The output contains summary statistics such as the median, the median absolute deviation, … as well as the number of observations that were used for each model. Bear in mind that due to subsetting or missing data, sample sizes can vary considerably which, in turn, affects the results (e.g., the p-value).
-However, in order to grasp how the different analytical choices affect the outcome of interest (in this case, the estimate refers to the unstandarized regression coefficient b), it is reasonable to plot a specification curve. The function plot_specs()
to produces the typical visualization of the specification curve and how the analytical choices affected the obtained results.
However, in order to grasp how the different analytical choices affect the outcome of interest (in this case, the estimate refers to the unstandardized regression coefficient b), it is reasonable to plot a specification curve. The function plot_specs()
to produces the typical visualization of the specification curve and how the analytical choices affected the obtained results.
# Plot specification curve analysis
plot_specs(results)
Masur P, Scharkow M (2019). -“specr: Statistical functions for conducting specification curve analyses (Version 0.2.0).” +“specr: Statistical functions for conducting specification curve analyses (Version 0.2.1).” https://github.com/masurp/specr.
@Misc{, - title = {specr: Statistical functions for conducting specification curve analyses (Version 0.2.0)}, + title = {specr: Statistical functions for conducting specification curve analyses (Version 0.2.1)}, author = {Philipp K. Masur and Michael Scharkow}, year = {2019}, url = {https://github.com/masurp/specr}, diff --git a/docs/index.html b/docs/index.html index 24e990f..831de5f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@@@ -114,13 +114,13 @@
We do see a lot of value in investigating how analytical choices affect a statistical outcome of interest. However, we strongly caution against using specr
as a tool to somehow arrive at a better estimate. Running a specification curve analysis does not make your findings any more reliable, valid or generalizable than a single analyis. The method is only meant to inform about the effects of analytical choices on results, and not a better way to estimate a correlation or effect.
We do see a lot of value in investigating how analytical choices affect a statistical outcome of interest. However, we strongly caution against using specr
as a tool to somehow arrive at a better estimate. Running a specification curve analysis does not make your findings any more reliable, valid or generalizable than a single analysis. The method is only meant to inform about the effects of analytical choices on results, and not a better way to estimate a correlation or effect.
Simonsohn, U., Simmons, J. P., & Nelson, L. D. (2019). Specification Curve: Descriptive and Inferential Statistics for all Plausible Specifications. Available at: http://dx.doi.org/10.2139/ssrn.2694998
+Simonsohn, U., Simmons, J. P., & Nelson, L. D. (2019). Specification Curve: Descriptive and Inferential Statistics for all Plausible Specifications. Available at: https://doi.org/10.2139/ssrn.2694998
Steegen, S., Tuerlinckx, F., Gelman, A., & Vanpaemel, W. (2016). Increasing Transparency Through a Multiverse Analysis. Perspectives on Psychological Science, 11(5), 702-712. https://doi.org/10.1177/1745691616658637
a logical value indicating whether the icc should also be printed as percentage. Defaults to TRUE.
a logical value indicating whether the ICC should also be printed as percentage. Defaults to TRUE.
Hox, J. J. (2010). Multilevel analysis: techniques and applications (2nd ed). New York: Routledge.
Hox, J. J. (2010). Multilevel analysis: techniques and applications. New York: Routledge.
This functions creates a simple barplot that visually displays how much variance in the outcome (e.g., the regression coeficient) different analytical choices or combinations therefor account for. To use this approach, one needs to estimate a multilevel model that includes all analytical choices as grouping variables (see examples and vignettes). This function uses icc_specs()
to compute the intraclass correlation coefficients (ICCs), which provides the data basis for the plot (see examples).
This functions creates a simple barplot that visually displays how much variance in the outcome (e.g., the regression coefficient) different analytical choices or combinations therefor account for. To use this approach, one needs to estimate a multilevel model that includes all analytical choices as grouping variables (see examples and vignettes). This function uses icc_specs()
to compute the intraclass correlation coefficients (ICCs), which provides the data basis for the plot (see examples).
plot_variance(model)@@ -154,7 +154,7 @@
a ggplot object.
icc_specs()
to produce a tibble that details the variance decomposion.
icc_specs()
to produce a tibble that details the variance decomposition.
@@ -172,17 +172,17 @@# Step 1: Run spec curve analysis diff --git a/docs/reference/run_specs.html b/docs/reference/run_specs.html index fc8d61b..b9122bd 100644 --- a/docs/reference/run_specs.html +++ b/docs/reference/run_specs.html @@ -69,7 +69,7 @@@@ -193,7 +193,7 @@R
-
@@ -212,21 +212,21 @@- +
Simonsohn, U., Simmons, J. P., & Nelson, L. D. (2019). Specification Curve: Descriptive and Inferential Statistics for all Plausible Specifications. Available at: http://dx.doi.org/10.2139/ssrn.2694998
Simonsohn, U., Simmons, J. P., & Nelson, L. D. (2019). Specification Curve: Descriptive and Inferential Statistics for all Plausible Specifications. Available at: https://doi.org/10.2139/ssrn.2694998
Steegen, S., Tuerlinckx, F., Gelman, A., & Vanpaemel, W. (2016). Increasing Transparency Through a Multiverse Analysis. Perspectives on Psychological Science, 11(5), 702-712. https://doi.org/10.1177/1745691616658637
Examp group2 = unique(example_data$group2))) # Check results frame -results
#> # A tibble: 192 x 12 +results#> # A tibble: 192 x 12 #> x y model controls estimate std.error statistic p.value conf.low -#> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> -#> 1 x1 y1 lm c1 + c2 4.95 0.525 9.43 3.11e-18 3.92 -#> 2 x2 y1 lm c1 + c2 6.83 0.321 21.3 1.20e-57 6.20 -#> 3 x1 y2 lm c1 + c2 -0.227 0.373 -0.607 5.44e- 1 -0.961 -#> 4 x2 y2 lm c1 + c2 0.985 0.324 3.04 2.62e- 3 0.347 -#> 5 x1 y1 lm c1 5.53 0.794 6.97 2.95e-11 3.96 -#> 6 x2 y1 lm c1 8.07 0.557 14.5 6.90e-35 6.98 -#> 7 x1 y2 lm c1 0.0461 0.466 0.0989 9.21e- 1 -0.872 -#> 8 x2 y2 lm c1 1.61 0.394 4.10 5.72e- 5 0.837 -#> 9 x1 y1 lm c2 5.15 0.625 8.24 9.95e-15 3.92 -#> 10 x2 y1 lm c2 6.50 0.466 13.9 5.38e-33 5.58 -#> # … with 182 more rows, and 3 more variables: conf.high <dbl>, obs <int>, -#> # subsets <chr>+#> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 x1 y1 lm c1 + c2 4.95 0.525 9.43 3.11e-18 3.92 +#> 2 x2 y1 lm c1 + c2 6.83 0.321 21.3 1.20e-57 6.20 +#> 3 x1 y2 lm c1 + c2 -0.227 0.373 -0.607 5.44e- 1 -0.961 +#> 4 x2 y2 lm c1 + c2 0.985 0.324 3.04 2.62e- 3 0.347 +#> 5 x1 y1 lm c1 5.53 0.794 6.97 2.95e-11 3.96 +#> 6 x2 y1 lm c1 8.07 0.557 14.5 6.90e-35 6.98 +#> 7 x1 y2 lm c1 0.0461 0.466 0.0989 9.21e- 1 -0.872 +#> 8 x2 y2 lm c1 1.61 0.394 4.10 5.72e- 5 0.837 +#> 9 x1 y1 lm c2 5.15 0.625 8.24 9.95e-15 3.92 +#> 10 x2 y1 lm c2 6.50 0.466 13.9 5.38e-33 5.58 +#> # … with 182 more rows, and 3 more variables: conf.high <dbl>, obs <int>, +#> # subsets <chr>
@@ -185,51 +185,51 @@#> # A tibble: 8 x 4 + controls = c("c1", "c2"))#> # A tibble: 8 x 4 #> x y model controls -#> <chr> <chr> <chr> <chr> -#> 1 x1 y1 lm c1 + c2 -#> 2 x2 y1 lm c1 + c2 -#> 3 x1 y1 lm c1 -#> 4 x2 y1 lm c1 -#> 5 x1 y1 lm c2 -#> 6 x2 y1 lm c2 -#> 7 x1 y1 lm no covariates -#> 8 x2 y1 lm no covariates+#> <chr> <chr> <chr> <chr> +#> 1 x1 y1 lm c1 + c2 +#> 2 x2 y1 lm c1 + c2 +#> 3 x1 y1 lm c1 +#> 4 x2 y1 lm c1 +#> 5 x1 y1 lm c2 +#> 6 x2 y1 lm c2 +#> 7 x1 y1 lm no covariates +#> 8 x2 y1 lm no covariates