grousselet / rogme Goto Github PK
View Code? Open in Web Editor NEWRobust Graphical Methods For Group Comparisons
License: MIT License
Robust Graphical Methods For Group Comparisons
License: MIT License
Related to #4 and #6, the plot_sf()
error still seems to exist when used with shifthd_pbci()
. I'm not exactly clear what the outcome of #4 and #6 where, so starting a new issue for clarity.
The error can be reproduced with:
library(rogme)
library(ggplot2)
#> generate data
set.seed(21)
g1 <- rnorm(1000) + 6
g2 <- rnorm(1000) * 1.5 + 6
#> make tibble
df <- mkt2(g1, g2)
#> compute shift function
# sf <- shifthd(data = df, formula = obs ~ gr, nboot = 200)
sf <- shifthd_pbci(data = df, formula = obs ~ gr, nboot = 200, q = c(.1,.25,.5,.75,.9))
#> plot shift function
psf <- plot_sf(sf, plot_theme = 1)
and returns an error:
Error in if (all.equal(df$q, seq(0.1, 0.9, 0.1))) { :
argument is not interpretable as logical
Coincidentally, using sf
in plot_hd_links()
works fine.
I think that the indexing here may be the reason why.
be lovely to have it all as a single file to have all functions loaded - as an alternative as to devtools ; Rtools require compilation and on windows, doesn't always work
thx
Hello
Thanks a lot for this package. I have now a problem which is new. When I do the example in your page the black lines for quantiles don't appear. I have this error message :
`> p <- plot_scat2(df,
xlabel = "",
ylabel = "Scores (a.u.)",
alpha = .3,
shape = 21,
colour = "grey10",
fill = "grey90") #> scatterplots
p <- plot_hd_links(p, sf[[1]],
q_size = 1,
md_size = 1.5,
add_rect = TRUE,
rect_alpha = 0.1,
rect_col = "grey50",
add_lab = TRUE,
text_size = 5) #> superimposed deciles + rectangle
Warning messages:
1: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
2: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
3: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
4: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
5: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
6: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
7: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
8: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
9: Ignoring unknown parameters: fun.y, fun.ymin, fun.ymax
p <- p + coord_flip() #> flip axes
p
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
No summary function supplied, defaulting tomean_se()
`
What can I do for this ?
Thanks a lot
Even when using data frames made from the mkt2
function, I both plot_kde_rug_dec
functions throw errors. Interrogating the code a bit, I found the problems in the first two lines, which are identical for both functions.
The following lines:
cdat <- plyr::ddply(data, "gr", summarise, deciles=q1469(data))
hd05 <- plyr::ddply(data, "gr", summarise, hd=hd(data,0.5))
should be changed to
cdat <- plyr::ddply(data, "gr", summarise, deciles=q1469(obs))
hd05 <- plyr::ddply(data, "gr", summarise, hd=hd(obs,0.5))
in order to work with a tibble of variables "gr" and "obs".
Once "data" is changed to "obs" the functions seem to work correctly.
The plot_hsf_pb_dist()
function seems to be missing a definition of qseq
at L225.
Changing this line to scale_y_continuous(breaks = data$quantiles)
fixes the problem for me.
Is there a simple way to select to analyze and plot just the quartiles instead of the deciles? I tried to have a look at the functions (plot_scat2 for example) but it seemed to me to be hard coded and I do not have the abilities to rewrite the functions..
Hi there,
I just noticed an error when trying to plot a shift function with plot_sf
when one of the factor contained a space symbol.
Let me know if I can be of any help!
library(rogme) # remotes::install_github("GRousselet/rogme")
library(ggplot2)
dataset <-
data.frame(x = factor(c("Condition A", "Condition B")),
y = rnorm(100))
sf <- shifthd(data = dataset,
formula = y ~ x, nboot = 200)
plot_sf(sf)
#> Error in parse(text = elt): <text>:1:11: unexpected symbol
#> 1: Condition A
#> ^
Created on 2021-06-08 by the reprex package (v2.0.0)
Hey im looking to visualize differences between 5 groups in my plot, I noticed that the shifthd function does return the shift outputs for more than 2 groups. So the idea is to compare group1 -> group2 and then group2 -> group3, group3 -> group4 and so on. Would be amazing if theres an easy way to do that with the current implementation :)
The main {rogme} page states:
In rogme, the shift function can be calculated using:
shifthd() or shifthd_pbci() for independent groups shiftdhd() or shiftdhd_pbci() for dependent groups
Illustrations of the results is handled separately by plot_sf() and plot_pbsf()
I installed the {rogme} package today (5/16/2019) and it does not appear to exist. Did I make a mistake along the way?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.