Code Monkey home page Code Monkey logo

Comments (2)

ibecav avatar ibecav commented on May 17, 2024

Good news it's not your code. Looks like you're just running out of variance for this particular example. The problem is that as you eliminate NA's there's only 4 vore = "insecti" left so when it goes to trim it generates that "(winvar(x[[grp[j]]], tr) == 0) stop("Standard error cannot be computed because of Winsorized variance of 0 (e.g., due to ties)."

library(ggstatsplot)
library(ggplot2)
# data
# ggplot2::msleep
WRS2::t1way(formula = sleep_rem ~ vore, 
            data = ggplot2::msleep)
#> Call:
#> WRS2::t1way(formula = sleep_rem ~ vore, data = ggplot2::msleep)
#> 
#> Test statistic: F = 2.7569 
#> Degrees of freedom 1: 3 
#> Degrees of freedom 2: 9.37 
#> p-value: 0.10159 
#> 
#> Explanatory measure of effect size: 0.76

ggstatsplot::subtitle_ggbetween_rob_anova(
  data = ggplot2::msleep,
  x = vore,
  y = sleep_rem
)
#> Error in WRS2::t1way(formula = stats::as.formula(formula), data = d, tr = tr): Standard error cannot be computed because of Winsorized variance of 0 (e.g., due to ties). Try do decrease the trimming level.

# remove  vore = "insecti"
xxx <- ggplot2::msleep %>% dplyr::filter(vore != "insecti")
ggstatsplot::subtitle_ggbetween_rob_anova(
  data = xxx,
  x = vore,
  y = sleep_rem
)
#> Note: 95% CI for explanatory measure of effect size was computed with 100 bootstrap samples.
#> 
#> Note: In case of error, try reducing the trimming level 0.1 and/or increasing the number of bootstrap samples 100
#> 
#> paste(italic("F"), "(", 2, ",", "17.577", ") = ", "2.232", ", ", 
#>     italic("p"), " = ", "0.137", ", ", italic(xi), " = ", "0.370", 
#>     ", 95% CI [", "0.003", ", ", "0.605", "]", ", ", italic("n"), 
#>     " = ", 52L)

Created on 2018-09-26 by the reprex package (v0.2.1)

from ggstatsplot.

IndrajeetPatil avatar IndrajeetPatil commented on May 17, 2024

Wonderful. Thanks!

from ggstatsplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.