Questions tagged [lsmeans]

An R package for obtaining least-squares means for many linear, generalized linear, and mixed models. Compute contrasts or linear functions of least-squares means, and comparisons of slopes. Plots and compact letter displays.

111 questions
0
votes
0 answers

using lsmeans of lmer function results in error Can't handle an object of class “ref.grid”

I am trying to get estimates of Linear mixed model using lmer from lme4 R package for explanatory variables. My code looks like: lmm31<-lmer(logvalue~concentration+variable+species+species:concentration+(1|idsp), data=prirstart2) lsmeans(lmm31,…
Ladislav
  • 11
  • 6
0
votes
0 answers

R LSmeans by group

Is there a way to summarize a dataframe by LSmean values by group? In this example I have 3 different studies, where each one is a RCB design dat = data.frame(expand.grid(study=1:3, trt=1:3, …
Juanchi
  • 1,147
  • 2
  • 18
  • 36
0
votes
1 answer

Meaning of SE for lsmeans type="response"

am trying to plot a Poisson model on scale of original response variable. My advisor would like me to plot mean +/- SE for egg production by bumble bees. I don't understand the meaning of the 'SE' term when using "type="response"". On the scale of…
0
votes
0 answers

plot marginal means and confidence intervals R

I am very very new to R and I am doing my best to understand it, but at the moment I find it trivial to use therefore I ask your help. I fit a model using library("lme4") model_fit = lmer(Resp~fixed1 + fixed2 + (1|random1),…
gabboshow
  • 5,359
  • 12
  • 48
  • 98
0
votes
2 answers

I can't get lsmeans output in glmer

List. I have a generalized mixed model using lmer.test package and calling glmer. I can get a good model, however I can't get the output of the LSMEANS and Diff means. Here's what I…
Dan
  • 143
  • 4
  • 13
-1
votes
1 answer

Estimate predicted value from linear model in R

Given a regression model: y = b0 + b1(x) where both x and y are continuous. After fitting the model, I'd like to estimate the predicted mean and 95%CI of y when x is at a certain value, say, 100. In Stata, it can be achieved with margins: reg y…
Penguin_Knight
  • 1,289
  • 8
  • 13
1 2 3 4 5 6 7
8