As Asim suggested, I used R via RLink to estimate variance componets.
- The sample data set "Example_DataSet1.csv" is availalbe here: https://dl.dropboxusercontent.com/u/15488405/Example_DataSet1.csv. All factors in the model are regarded as random effects.
- I used the following code:
Needs["RLink`"]
InstallR[ ]
REvaluate["
{
FAC1=as.factor(example$Fac1)
FAC2=as.factor(example$Fac2)
FAC3=as.factor(example$Fac3)
FAC4=as.factor(example$Fac4)
VAR1=as.numeric(example$Var1)
}
"];
REvaluate["hist(VAR1)"]
StringJoin@Riffle[#, "\n"] &@
REvaluate["
{
library(lme4)
fit2 = lmer(formula= VAR1 ~ (1|FAC1) + (1|FAC2%in%FAC1) + (1|FAC4) + (1|FAC1:FAC4))
summary.text = capture.output(print( summary(fit2)))
}
"]