Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Cluster Based Multiple Comparisons

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
NotificationsYou must be signed in to change notification settings

SGS2000/ClustMC

Repository files navigation

R-CMD-checkcodecovLifecycle: experimentalCRAN status

🇬🇧 ClustMC implements cluster-based multiple comparisons tests. Thesetests apply clustering techniques to group the means of differenttreatments into non-overlapping clusters, with treatments consideredstatistically different if they are in separate groups.

All tests included in the package share similar features:

  • Inspired by theagricolaepackage, it is possible to work with either two vectors (one for theresponse variable and one for the treatments) or a model (created withlm() oraov()). In the latter case, the name of the variable withthe treatments must be specified.
  • After applying the corresponding method, a table containing thetreatments and their group (indicated by a number) is printed to theconsole. Treatments within the same group are not significantlydifferent. The user can choose not to display the table.
  • By default, a dendrogram is plotted. The dendrogram can be customizedwith any argument passed to theplot() function. In addition, thedata used to create the plot is made available to the user, so it ispossible to use other libraries such as ggplot2.

🇪🇸 ClustMC implementa pruebas de comparaciones múltiples basadas enconglomerados. Estas pruebas aplican técnicas declustering paraagrupar las medias de los distintos tratamientos en conglomerados nosuperpuestos, considerándose los tratamientos estadísticamentediferentes si se encuentran en grupos separados.

Todos los tests incluidos en el paquete tienen característicassimilares:

  • Basándose en el paqueteagricolae, es posible trabajarcon dos vectores (uno para la variable respuesta y otro para lostratamientos) o con un modelo (creado conlm() oaov()). En elsegundo caso, se debe indicar el nombre de la variable con lostratamientos a comparar.
  • Luego de aplicar el método correspondiente, se imprime en la consolauna tabla con los tratamientos y el grupo al que han sido asignados(indicado por un número). Los tratamientos dentro del mismo grupo noson significativamente diferentes. Se puede optar por no mostrar estosresultados.
  • Por defecto, se grafica un dendrograma. El dendrograma puede serpersonalizado con cualquier argumento de la funciónplot(). Además,el usuario tiene acceso a los datos usados para crearlo, por lo que esposible recurrir a otros paquetes como ggplot2.

Installation / Instalación

The package can be installed from CRAN: / El paquete puede instalarsedesde CRAN:

install.packages("ClustMC")

The development version is available from GitHub: / La versión endesarrollo está disponible en GitHub:

remotes::install_github("SGS2000/ClustMC")

Examples / Ejemplos

Tests

🇬🇧 The following example applies the Di Rienzo, Guzmán, and Casanovestest to evaluate whether there are significant differences between theyields obtained under a control and two different treatment conditions.In this case, vectors are passed as arguments.

🇪🇸 El siguiente ejemplo aplica la prueba de Di Rienzo, Guzmán yCasanoves para evaluar si existen diferencias significativas entre losrendimientos obtenidos bajo una condición de control y dos condicionesde tratamiento diferentes. En este caso, se pasan vectores comoargumentos.

library(ClustMC)data(PlantGrowth)plants_weights<-PlantGrowth$weightplants_trt<-PlantGrowth$groupdgc_test(y=plants_weights,trt=plants_trt)

Example with dgc test

#>      group#> ctrl     1#> trt1     1#> trt2     2#> Treatments within the same group are not significantly different

🇬🇧 In the following example, a dataset with results from a bread-bakingexperiment is used. An ANOVA model is fitted, with the volume of theloaves as a response variable and the amount of potassium bromate andthe variety of wheat as explanatory variables. The Jolliffe test is thenapplied to evaluate differences between the 17 varieties.

🇪🇸 En el siguiente ejemplo, se utiliza un dataset con los resultados deun experimento de panadería. Se ajusta un modelo ANOVA con el volumen delos panes como variable respuesta y la cantidad de bromato de potasio yla variedad de trigo como variables explicativas. La prueba de Jolliffese aplica luego para evaluar las diferencias entre las 17 variedades.

library(ClustMC)data(bread)anova_model<- aov(volume~variety+ as.factor(bromate),data=bread)jolliffe_test(y=anova_model,trt="variety")

Example with jolliffe test

#>   group#> M     1#> P     2#> D     2#> C     2#> Q     2#> L     2#> H     2#> G     2#> N     2#> B     2#> F     2#> I     2#> K     2#> J     2#> E     2#> A     2#> O     2#> Treatments within the same group are not significantly different

Customizing plots / Personalizar gráficos

🇬🇧 Dendrograms can be customized, using any argument available for theplot() function. In the case of the lines, arguments for theabline() function must be passed as list. For a detailed explanationand examples, checkvignette("CustomPlots").

🇪🇸 Los dendrogramas pueden ser personalizados, utilizando cualquierargumento disponible para la funciónplot(). En el caso de las líneasrectas, se debe utilizar una lista conteniendo argumentos para lafunciónabline(). Para ver una explicación detallada y ejemplos,revisevignette("CustomPlots").

About

Cluster Based Multiple Comparisons

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp