[R-sig-ME] lme4: Obtaining the SE of difference in two fixed-effects
Lenth, Russell V
ru@@e||-|enth @end|ng |rom u|ow@@edu
Thu Oct 29 14:42:35 CET 2020
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 using gmail.com>
To: r-sig-mixed-models <r-sig-mixed-models using r-project.org>
Subject: [R-sig-ME] lme4: Obtaining the SE of difference in two
fixed-effects slope
Message-ID:
<CACgv6yVbsBJanYRLo4af7P=wUCLQn7RiyhPmE06sSVxNxbdF3Q using 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
More information about the R-sig-mixed-models
mailing list