Using other software (JMP), they clearly give different results:

upper panel without random effect, and lower panel with the random effect. The one with the random effect gives a p value the same to ttest.

9 views (last 30 days)

Show older comments

considering the data attached.

tbl = readtable('t.txt');

mdl1 = fitlme(tbl, 'y ~ g + (1|match)')

mdl2 = fitlme(tbl, 'y ~ g')

Why do they give exactly the same outputs? Presumebly the first model should be equivalent to a paird t-test

[h, p] = ttest(tbl.y(tbl.g == 1), tbl.y(tbl.g == 0))

Ive J
on 8 Aug 2021

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!