我想在MATLAB中计算线性混合效应模型(fitlme)中对比度的标准误差。
y = randn(100,1);
area = randi([1 3],100,1);
mea = randi([1 3],100,1);
sub = randi([1 5],100,1);
data = array2table([area mea sub y],'VariableNames',{'area','mea','sub','y'});
data.area = nominal(data.area,{'A','B','C'});
data.mea = nominal(data.mea,{'Baseline','+1h','+8h'});
data.sub = nominal(data.sub);
lme = fitlme(data,'y~area*mea+(1|sub)')
% Plot Area A on three measurements
coefv = table2array(dataset2table(lme.Coefficients(:,2)));
bar([coefv(1),sum(coefv([1 4])),sum(coefv([1 5]))])
计算对比度意味着,例如area1-measurement1 vs area1-measurement2 vs area1-measurement3可以通过对相关系数参数求和来完成。但是,有谁知道如何计算相关的标准误差?
我知道可以通过coefTest(lme,H)进行假设检验,但只能提取p值。
区域A的示例如下所示: