diff --git a/DESCRIPTION b/DESCRIPTION index 56580f4..efb5351 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -9,7 +9,7 @@ Authors@R: c( person("Louis", "Laurencelle", email = "louis.laurencelle@gmail.com", role = c("aut", "ctb")) ) -Author: Denis Cousineau [aut, cre], +Author: Denis Cousineau [aut, ctb, cre], Louis Laurencelle [aut, ctb] Maintainer: Denis Cousineau BugReports: https://github.com/dcousin3/ANOPA/issues/ diff --git a/R/ANOPA-plot.R b/R/ANOPA-plot.R index dc2d93a..56cc35c 100644 --- a/R/ANOPA-plot.R +++ b/R/ANOPA-plot.R @@ -82,18 +82,18 @@ #' anopaPlot(w, allowImputing = TRUE) #' #' # We can place the factor `Diel` on the x-axis (first): -#' anopaPlot(w, ~ Diel * Trophism * Location ) +#' #anopaPlot(w, ~ Diel * Trophism * Location ) #' #' # Change the style for a plot with bars instead of lines -#' anopaPlot(w, plotStyle = "bar") +#' #anopaPlot(w, plotStyle = "bar") # to speed tests, we comment these two lines #' #' # Changing the error bar style -#' anopaPlot(w, plotStyle = "bar", errorbarParams = list( width =0.1, linewidth=0.1 ) ) +#' #anopaPlot(w, plotStyle = "bar", errorbarParams = list( width =0.1, linewidth=0.1 ) ) #' #' # Illustrating the main effect of Location (not interacting with other factors) #' # and the interaction Diel * Trophism separately -#' anopaPlot(w, ~ Location ) -#' anopaPlot(w, ~ Diel * Trophism ) +#' #anopaPlot(w, ~ Location ) # to speed tests, we comment these two lines +#' #anopaPlot(w, ~ Diel * Trophism ) # to speed tests, we comment these two lines #' #' # All these plots are ggplot2 so they can be followed with additional directives, e.g. #' library(ggplot2) diff --git a/R/ANOPA-posthocProportions.R b/R/ANOPA-posthocProportions.R index 33a4836..5f7be23 100644 --- a/R/ANOPA-posthocProportions.R +++ b/R/ANOPA-posthocProportions.R @@ -70,8 +70,7 @@ #' # There is a near-significant interaction of Trophism * Diel (if we consider #' # the unadjusted p value, but you really should consider the adjusted p value...). #' # If you generate the plot of the four factors, we don't see much: -#' anopaPlot(w) -#' +#' # anopaPlot(w) #' #... but with a plot specifically of the interaction helps: #' anopaPlot(w, ~ Trophism * Diel ) #' # it seems that the most important difference is for omnivorous fishes diff --git a/R/ArringtonEtAll2002.R b/R/ArringtonEtAll2002.R index 31ce5b4..1c6680a 100644 --- a/R/ArringtonEtAll2002.R +++ b/R/ArringtonEtAll2002.R @@ -25,7 +25,7 @@ #' @references #' \insertAllCited{} #' -#' @source \doi{10.1890/0012-9658(2002)083} +#' @source \doi{10.1890/0012-9658(2002)083[2145:HODFRO]2.0.CO;2} #' #' @examples #' diff --git a/docs/articles/D-ArringtonExample.html b/docs/articles/D-ArringtonExample.html index ad321e1..eb01510 100644 --- a/docs/articles/D-ArringtonExample.html +++ b/docs/articles/D-ArringtonExample.html @@ -219,7 +219,7 @@

References Arrington, D. A., Winemiller, K. O., Loftus, W. F., & Akin, S. (2002). How often do fishes “run on empty”? -Ecology, 83(8), 2145–2151. https://doi.org/10.1890/0012-9658(2002)083 +Ecology, 83(8), 2145–2151. https://doi.org/10.1890/0012-9658(2002)083[2145:HODFRO]2.0.CO;2
Warton, D. I., & Hui, F. K. (2011). The arcsine is diff --git a/docs/index.html b/docs/index.html index 2a243e3..5057950 100644 --- a/docs/index.html +++ b/docs/index.html @@ -135,7 +135,7 @@ #e <- emProportions(w, ~ SES | MofDiagnostic ) #summary(e)

Follow-up analyses include contrasts examinations with contrastProportions(); finally, post-hoc pairwise comparisons can be obtained with posthocProportions().

-

Prior to running an experiment, you might consider some statistical power planning on proportions using anopaPower2N() or anopaN2Power() as long as you can anticipate the expected proportions. A convenient effect size, the f-square and eta-square can be obtained with anopaPropTofsq().

+

Prior to running an experiment, you might consider some statistical power planning on proportions using anopaPower2N() or anopaN2Power() as long as you can anticipate the expected proportions. A convenient effect size, the f-square and eta-square can be obtained with anopaPropTofsq().

Finally, toCompiled(), toLong() and toWide() can be used to present the proportion in other formats.

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 338fdf7..43c8d7b 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -8,7 +8,7 @@ articles: D-ArringtonExample: D-ArringtonExample.html E-ArcsineIsAsinine: E-ArcsineIsAsinine.html F-TestingTypeIError: F-TestingTypeIError.html -last_built: 2024-03-16T23:15Z +last_built: 2024-03-17T00:27Z urls: reference: https://dcousin3.github.io/ANOPA/reference article: https://dcousin3.github.io/ANOPA/articles diff --git a/docs/reference/ANOPA-package.html b/docs/reference/ANOPA-package.html index d7441e3..83c55dd 100644 --- a/docs/reference/ANOPA-package.html +++ b/docs/reference/ANOPA-package.html @@ -154,7 +154,7 @@

ANOPA: Analyses of Proportions using Anscombe Transform

toCompiled(w) # the only format that cannot be used as input to anopa

The package includes additional, helper, functions:

  • anopaPower2N() to compute sample size given effect size;

  • anopaN2Power() to compute statistical power given a sample size;

  • -
  • anopaPropTofsq() to compute the effect size;

  • +
  • anopaPropTofsq() to compute the effect size;

  • anopaPlot() to obtain a plot of the proportions with error bars;

  • GRP() to generate random proportions from a given design.

and example datasets, some described in the article:

  • ArringtonEtAl2002 illustrates a 3 x 2 x 4 design;

  • diff --git a/docs/reference/ArringtonEtAl2002.html b/docs/reference/ArringtonEtAl2002.html index f172749..58b5d2f 100644 --- a/docs/reference/ArringtonEtAl2002.html +++ b/docs/reference/ArringtonEtAl2002.html @@ -111,14 +111,14 @@

    Format

References

Arrington DA, Winemiller KO, Loftus WF, Akin S (2002). “How often do fishes “run on empty”?” Ecology, 83(8), 2145--2151. -doi:10.1890/0012-9658(2002)083 +doi:10.1890/0012-9658(2002)083[2145:HODFRO]2.0.CO;2 .

Warton DI, Hui FK (2011). “The arcsine is asinine: The analysis of proportions in ecology.” Ecology, 92, 3--10.

diff --git a/docs/reference/anopaN2Power.html b/docs/reference/anopaN2Power.html index 7afafad..cb863bc 100644 --- a/docs/reference/anopaN2Power.html +++ b/docs/reference/anopaN2Power.html @@ -90,7 +90,7 @@

Computing power within the ANOPA.

anopaN2Power(N, P, f2, alpha) -anopaPropTofsq(props, unitaryAlpha, method="approximation")
+anopaProp2fsq(props, ns, unitaryAlpha, method="approximation")
@@ -143,7 +143,7 @@

Value

Details

-

Note that for anopaPropTofsq(), the expected effect size $f^2$ +

Note that for anopaProp2fsq(), the expected effect size $f^2$ depends weakly on the sample sizes. Indeed, the Anscombe transform can reach more extreme scores when the sample sizes are larger, influencing the expected effect size.

diff --git a/docs/reference/index.html b/docs/reference/index.html index deaf892..bfeb8b5 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -96,7 +96,7 @@

Main functions

posthocProportions: post-hoc analysis of proportions.

-

anopaPower2N() anopaN2Power() anopaPropTofsq()

+

anopaPower2N() anopaN2Power() anopaProp2fsq()

Computing power within the ANOPA.

diff --git a/docs/reference/rBernoulli.html b/docs/reference/rBernoulli.html index 9eb9d86..a34174f 100644 --- a/docs/reference/rBernoulli.html +++ b/docs/reference/rBernoulli.html @@ -84,7 +84,7 @@

Generating random proportions with GRP

-
GRP( prob, n, BSdesign=NULL, WSDesign=NULL, sname = "s" )
+    
GRP( props, n, BSDesign=NULL, WSDesign=NULL, sname = "s" )
 
 rBernoulli(n, p)
@@ -107,7 +107,7 @@

Arguments

A list with the within-subject factor(s) and the categories within each;

-
prob
+
props

(optional) the proportion of succes in each cell of the design. Default 0.50;

diff --git a/docs/reference/unitaryAlpha.html b/docs/reference/unitaryAlpha.html index e169b0b..7dbe3aa 100644 --- a/docs/reference/unitaryAlpha.html +++ b/docs/reference/unitaryAlpha.html @@ -90,12 +90,12 @@

unitary alpha

-
unitaryAlpha( matrix )
+
unitaryAlpha( m )

Arguments

-
matrix
+
m

A data matrix for a group of observations.

diff --git a/inst/REFERENCES.bib b/inst/REFERENCES.bib index e4a1fc7..0cba6cf 100644 --- a/inst/REFERENCES.bib +++ b/inst/REFERENCES.bib @@ -100,7 +100,7 @@ @article{a02 number = {8}, pages = {2145--2151}, year = {2002}, - doi = {10.1890/0012-9658(2002)083} + doi = {10.1890/0012-9658(2002)083[2145:HODFRO]2.0.CO;2} } @article{wh11, diff --git a/man/ArringtonEtAl2002.Rd b/man/ArringtonEtAl2002.Rd index 9982f8a..20fe28a 100644 --- a/man/ArringtonEtAl2002.Rd +++ b/man/ArringtonEtAl2002.Rd @@ -8,7 +8,7 @@ A data frame. } \source{ -\doi{10.1890/0012-9658(2002)083} +\doi{10.1890/0012-9658(2002)083[2145:HODFRO]2.0.CO;2} } \usage{ ArringtonEtAl2002 diff --git a/man/anopa_asn_trans1.Rd b/man/anopa_asn_trans1.Rd index bdfcf81..ed5a927 100644 --- a/man/anopa_asn_trans1.Rd +++ b/man/anopa_asn_trans1.Rd @@ -84,18 +84,18 @@ anopaPlot(w) anopaPlot(w, allowImputing = TRUE) # We can place the factor `Diel` on the x-axis (first): -anopaPlot(w, ~ Diel * Trophism * Location ) +#anopaPlot(w, ~ Diel * Trophism * Location ) # Change the style for a plot with bars instead of lines -anopaPlot(w, plotStyle = "bar") +#anopaPlot(w, plotStyle = "bar") # to speed tests, we comment these two lines # Changing the error bar style -anopaPlot(w, plotStyle = "bar", errorbarParams = list( width =0.1, linewidth=0.1 ) ) +#anopaPlot(w, plotStyle = "bar", errorbarParams = list( width =0.1, linewidth=0.1 ) ) # Illustrating the main effect of Location (not interacting with other factors) # and the interaction Diel * Trophism separately -anopaPlot(w, ~ Location ) -anopaPlot(w, ~ Diel * Trophism ) +#anopaPlot(w, ~ Location ) # to speed tests, we comment these two lines +#anopaPlot(w, ~ Diel * Trophism ) # to speed tests, we comment these two lines # All these plots are ggplot2 so they can be followed with additional directives, e.g. library(ggplot2) diff --git a/man/posthocProportions.Rd b/man/posthocProportions.Rd index c2c36f8..0b2bd10 100644 --- a/man/posthocProportions.Rd +++ b/man/posthocProportions.Rd @@ -72,8 +72,7 @@ summary(w) # There is a near-significant interaction of Trophism * Diel (if we consider # the unadjusted p value, but you really should consider the adjusted p value...). # If you generate the plot of the four factors, we don't see much: -anopaPlot(w) - +# anopaPlot(w) #... but with a plot specifically of the interaction helps: anopaPlot(w, ~ Trophism * Diel ) # it seems that the most important difference is for omnivorous fishes