Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make comparism between lines and check #71

Open
BB1464 opened this issue Dec 28, 2023 · 2 comments
Open

How to make comparism between lines and check #71

BB1464 opened this issue Dec 28, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@BB1464
Copy link

BB1464 commented Dec 28, 2023

Good day all,

I know when working with the emmeans package I can make comparism between many lines and check variety. that is the aim is to select all lines that out perform the check. But I don't know how to achieve this using your pacakge. Thank you very much for writing this package. Merry Christmas and Happy New Year in Advance.

Here is an example of what I want to achieve:

Load Packages

library(tidyverse)
library(agridat) # To get the omer.sorghum dataset
library(lmerTest)
library(emmeans)
library(biometryassist)

Model

model <- lmer(yield ~ gen + env+(1 | rep), data = omer.sorghum)

summary(model)
test <- anova(model, ddf = "Kenward-Roger", type = 3)
test

Post Hoc Test

comparisons.G18 <- emmeans(model, specs = trt.vs.ctrl ~ gen, ref = 18)
#str(comparisons.G18)
#names(comparisons.G18)

comparisons.G18

comparisons.G18$contrasts # Get the contrast

comparisons.G18$contrasts %>%
as_tibble() %>%
arrange(desc(estimate))

This does not work

multiple_comparisons(model.obj = model,classify = 'gen',specs = trt.vs.ctrl ~ gen, ref = 18)

@rogerssam
Copy link
Contributor

Good day all,

I know when working with the emmeans package I can make comparism between many lines and check variety. that is the aim is to select all lines that out perform the check. But I don't know how to achieve this using your pacakge. Thank you very much for writing this package. Merry Christmas and Happy New Year in Advance.

Here is an example of what I want to achieve:

Load Packages

library(tidyverse)
library(agridat) # To get the omer.sorghum dataset
library(lmerTest)
library(emmeans)
library(biometryassist)

Model

model <- lmer(yield ~ gen + env+(1 | rep), data = omer.sorghum)

summary(model)
test <- anova(model, ddf = "Kenward-Roger", type = 3)
test

Post Hoc Test

comparisons.G18 <- emmeans(model, specs = trt.vs.ctrl ~ gen, ref = 18)
#str(comparisons.G18)
#names(comparisons.G18)

comparisons.G18

comparisons.G18$contrasts # Get the contrast

comparisons.G18$contrasts %>%
as_tibble() %>%
arrange(desc(estimate))

This does not work

multiple_comparisons(model.obj = model,classify = 'gen',specs = trt.vs.ctrl ~ gen, ref = 18)

Hi @BB1464, this isn't currently implemented, but I will add it as a feature request and see what I can do to make it happen.

@rogerssam rogerssam added the enhancement New feature or request label Dec 29, 2023
@rogerssam rogerssam self-assigned this Dec 29, 2023
@BB1464
Copy link
Author

BB1464 commented Dec 29, 2023

Thanks @rogerssam, I will be looking forward to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants