emmeans | Estimated marginal means | Development Tools library
kandi X-RAY | emmeans Summary
kandi X-RAY | emmeans Summary
R package emmeans: Estimated marginal means.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of emmeans
emmeans Key Features
emmeans Examples and Code Snippets
Community Discussions
Trending Discussions on emmeans
QUESTION
I'm trying to install the package brms
in R so that I can rename the parameters returned from the function stan
(from the rstan
package). When I try install.package("brms", dependencies=TRUE)
, I get the (partial) output pasted at the end of this post (it's too long to paste the whole thing). At the end of the output, you can see that I get a series of "dependency errors", which makes sense because the very first error is not a dependency error, but rather a compilation error that says:
ANSWER
Answered 2022-Apr-16 at 17:24Start with
QUESTION
I am very new shiny user. I wanted to show the results of post-hoc test using emmeans function. Here's the code of my shiny app.
...ANSWER
Answered 2022-Mar-25 at 13:15Try this change to the if
statement inside your output$Tukey1
. Basically, I suggest building up the formulae, used in the lm()
and the emmeans()
calls
QUESTION
I hoping get some can help solving this mystery in my mind. The 7th coefficient in my glmer()
call is 0.28779305 on the logit scale.
This coefficient can be also obtained by using contrast()
in the emmeans
package. However, this package apparently outputs the 7th coefficient on a different scale, the response scale.
I wonder how to convert the estimate given by the contrast()
call so it matches the 7th coefficient in my glmer()
call?
ps. This answer provides some insight but I don't see a way the coefficient from these two packages might be related.
...ANSWER
Answered 2022-Mar-10 at 16:42The bottom line is that if you do
QUESTION
I am trying to use the effects
package to create plots of effects in a linear mixed model. I specify the model
ANSWER
Answered 2022-Feb-17 at 21:21Here is a simple parallel example illustrating that wrapping poly()
in scale()
is the culprit:
QUESTION
I have a dataset from participants that provided liking ratings (on a scale from 0-100) of stimuli associated with rewards of different magnitudes (factor pval, with levels small/medium/large) and delay (factor time, with levels delayed/immediate). A subset of the data looks like this:
...ANSWER
Answered 2022-Feb-14 at 22:54Regarding the first question: As is true of most summary
methods, the returned object is just a summary, and it doesn't contain the information to convert it back to an object like the one that was summarized. However, the original emmGrid
object does have all the needed content.
The other barrier is trying to work from the contrasts you don't want rather than getting the ones you do want. It is usually best to do the means and contrasts in two separate steps. It is quite simple to do:
QUESTION
The entirety of my code is running perfectly well. When I try to use Knitr to generate PDF/ HTML I get a error that says
Error in Anova(mod1, type = "III") : could not find function "Anova"
Any suggestions on what I can do differently?
...ANSWER
Answered 2022-Feb-14 at 21:23You have to add library(car)
. Anova()
function is from this package!
QUESTION
I am doing a one-way ANCOVA analysis on root colonisation data using the following example https://www.datanovia.com/en/lessons/ancova-in-r/. I am trying to remove the trendline from the resulting plot as my treatments are separate groups so I don't think it is necessary. I have tried using each of the following but I can't get any to work with this code. Is there another way I can go about this? Thanks!
...ANSWER
Answered 2022-Feb-04 at 00:07One possible way you could cheat this is by making it a boxplot instead and using the error bar as the IQR that surrounds the median. The problem is that your option uses ggline, which usually has to map a line to each group, and this way isn't as pretty, but it still achieves the purpose you are looking for:
QUESTION
I would like to plot estimated marginal means from a three-way factorial experiment with letters indicating significantly different means, adjusted for multiple comparisons. My current workflow is to fit the model with lmer()
, calculate estimated marginal means with emmeans()
, then implement the compact letter display algorithm with cld()
.
My problem is that the graph is too busy when you plot all three-way interactions on the same plot. So I would like to split up the plot and generate different sets of letters for each subplot, starting with "a". The problem is that when I use the by
argument in cld
to split it up, it does a separate correction for multiple comparisons within each by
group. Because there are now fewer tests within each group, this results in a less conservative correction. But if I try to manually split up the output of cld()
without a by
group, I would have to manually re-implement the letter algorithm for each subplot. I guess I could do that but it seems cumbersome. I am trying to share this code with a client for him to modify later, so that solution would probably be too complex. Does anyone have an easy way to either:
- Get the output of
cld()
to use one combined correction for allby
groups. - Using a relatively simple method, reduce the compact letter display for each subgroup to the minimal necessary number of letters.
Load packages and data.
...ANSWER
Answered 2022-Feb-03 at 03:44With the two separate tables (or plots?) you are displaying a total of 90 + 90 = 180 comparisons. If you want an overall multiplicity adjustment for all of these 180 comparisons, you need to be considerably less conservative than for 496 comparisons. However, it is possible to speccify a different value of level
so that the Sidak adjustment works out correctly. For example, if you want the overall alpha to be 0.05, use
QUESTION
I have this example where I'd like to have multiple comparisons across treatments. Here is the data:
...ANSWER
Answered 2022-Jan-26 at 23:14This question presumes there is a single value that can serve the stated purpose. If there is such a value, it can be found via
QUESTION
I am looking for an alternative approach to plotting results from pairwise comparisons than traditional bar plots. If possible, I would like to create a plot like the one shown below [1], but for a model that includes an interaction effect. R code for the plot below is online [2]. Is there a way to revise or add onto this code to include an interaction effect?
Example of my data set (too large to include in its entirety but I can send upon request) and the model used:
...ANSWER
Answered 2022-Jan-25 at 22:02IMO, almost anything is better than a CLD. They display non-findings rather than findings.
I suggest presenting the simple comparisons in tabular form
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install emmeans
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page