I am trying to run random effect models in Julia instead of R, as they are much faster for big data. I am doing it via calls from R (and “JuliaCall”). The models work great but I cannot for the life of me extract the variance components as a data.frame as I do in R (w/ names of factors and variance components).
Here is a piece of code that gets you to an example of a table with two such components.
using Tables, MixedModels
Dyestuff = columntable((batch = string.(repeat(‘A’:‘F’, inner=5)),
yield = [1545, 1440, 1440, 1520, 1580, 1540, 1555, 1490, 1560, 1495, 1595, 1550, 1605,
1510, 1560, 1445, 1440, 1595, 1465, 1545, 1595, 1630, 1515, 1635, 1625, 1520, 1455,
1450, 1480, 1445]));
m1 = fit(MixedModel, @formula(yield ~ 1 + (1|batch)), Dyestuff)
m2 = VarCorr(m1)
m2 is of type VarCorr, I can see fieldnames, but they don’t seem to contain the variances. In R you can just as.data.frame(m2). But nothing like that seems to work in Julia (nor on an m2 object returned to R).
Tony
Thanks.