필터 지우기
필터 지우기

linear mixed effect modeling - hypotheses testing

조회 수: 1 (최근 30일)
yuval
yuval 2018년 5월 12일
hello, I'm comparing between between and within person models and testing different hypotheses on the models (specified in H). My problem is that the coefTest results are identical in the between and within-person models, and I'm not sure what I'm doing wrong. I've compared the results with spss results, and they are identical in the between person model, but obviously the spss within-person model results are different. Thank you!
H =
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
% Conditional Between-Person Model
CBPM = fitlme(Data, 'outcome ~ time*group','FitMethod','REML');
for i = 1:length(H)
CBPM_tests(i) = coefTest(CBPM,H(i,:));
end
% Conditional Within-Person Model
CWPM = fitlme(Data, 'outcome ~ time*group + (1 | PersonID)','FitMethod','REML');
for i = 1:length(H)
CWPM_tests(i) = coefTest(CWPM,H(i,:));
end
spss syntax:
ECHO 'Conditional Between-Person Model'.
ECHO 'With Contrasts for Time and Group'.
MIXED outcome WITH time1 treat
/METHOD = REML
/PRINT = SOLUTION TESTCOV R
/FIXED = time1 treat time1*treat
/TEST = 'Mean: Control Group at Pre-Test' intercept 1 time1 0 treat 0 time1*treat 0
/TEST = 'Mean: Control Group at Post-Test' intercept 1 time1 1 treat 0 time1*treat 0
/TEST = 'Mean: Treatment Group at Pre-Test' intercept 1 time1 0 treat 1 time1*treat 0
/TEST = 'Mean: Treatment Group at Post-Test' intercept 1 time1 1 treat 1 time1*treat 1
/TEST = 'Time Effect for Control Group' time1 1 time1*treat 0
/TEST = 'Time Effect for Treatment Group' time1 1 time1*treat 1
/TEST = 'Group Effect at Pre-Test' treat 1 time1*treat 0
/TEST = 'Group Effect at Post-Test' treat 1 time1*treat 1
.
ECHO 'Conditional Within-Person Model'.
ECHO 'With Contrasts for Time and Group'.
MIXED outcome BY PersonID WITH time1 treat
/METHOD = REML
/PRINT = SOLUTION TESTCOV R
/FIXED = time1 treat time1*treat
/RANDOM = intercept | SUBJECT(PersonID)
/TEST = 'Mean: Control Group at Pre-Test' intercept 1 time1 0 treat 0 time1*treat 0
/TEST = 'Mean: Control Group at Post-Test' intercept 1 time1 1 treat 0 time1*treat 0
/TEST = 'Mean: Treatment Group at Pre-Test' intercept 1 time1 0 treat 1 time1*treat 0
/TEST = 'Mean: Treatment Group at Post-Test' intercept 1 time1 1 treat 1 time1*treat 1
/TEST = 'Time Effect for Control Group' time1 1 time1*treat 0
/TEST = 'Time Effect for Treatment Group' time1 1 time1*treat 1
/TEST = 'Group Effect at Pre-Test' treat 1 time1*treat 0
/TEST = 'Group Effect at Post-Test' treat 1 time1*treat 1

답변 (0개)

카테고리

Help CenterFile Exchange에서 Model Building and Assessment에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by