Message-ID: <CH2PR04MB6855CBF23FA4AC298D9CDE9EF1140@CH2PR04MB6855.namprd04.prod.outlook.com>
Date: 2020-10-29T13:42:35Z
From: Lenth, Russell V
Subject: lme4: Obtaining the SE of difference in two fixed-effects
Do this:
a <- c(0, 1, -1)
V <- vcov(fit)
sqrt(t(a) %*% V %*% a)
Russ
-----Original Message-----
Message: 2
Date: Wed, 28 Oct 2020 21:29:53 -0500
From: Simon Harmel <sim.harmel at gmail.com>
To: r-sig-mixed-models <r-sig-mixed-models at r-project.org>
Subject: [R-sig-ME] lme4: Obtaining the SE of difference in two
fixed-effects slope
Message-ID:
<CACgv6yVbsBJanYRLo4af7P=wUCLQn7RiyhPmE06sSVxNxbdF3Q at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Dear All,
I'm interested in obtaining standard error (SE) of [*meanses - ses]* estimate
in my model below which serves as the contextual effect coefficient.
Is there a way to obtain this SE in R?
hsb <- read.csv('
https://raw.githubusercontent.com/rnorouzian/e/master/hsb.csv')
fit <- lmer(math ~ ses + meanses + (1|sch.id), data = hsb)
coef(summary(fit))
Estimate Std. Error t value
(Intercept) 12.661262 0.1493726 84.762956
ses 2.191165 0.1086673 20.163983
meanses 3.675037 0.3776607 9.731055