Skip to content
Back to formatted view

Raw Message

Message-ID: <CACgv6yXjhONDiJqvJYTbT9MZobp0HtHZzavyJ1mfEnWq4vAOCA@mail.gmail.com>
Date: 2021-03-31T20:15:24Z
From: Simon Harmel
Subject: Random effects variances in R and SPSS not matching

Dear All,

For my reproducible model below, SPSS gives the variance component of
119.95 for Y1, and 127.90 for Y2.

But in `nlme::lme()` my variance components are 105.78 for Y1 and 113.73
for Y2.

Can we make the `lme()` reproduce the SPSS's variance components?

#======= Data and R code:
dat <- read.csv('https://raw.githubusercontent.com/hkil/m/master/mv.l.csv')

library(nlme)

m2 <- lme(value ~0 + name, random = ~0 + name| Student, data = dat, method
= "ML")

Random effects variance covariance matrix
             nameY1   nameY2
nameY1 105.780  60.869
nameY2  60.869 113.730

	[[alternative HTML version deleted]]