Repeated measure with 2 between subject factors

1 回表示 (過去 30 日間)
AN NING
AN NING 2018 年 2 月 9 日
編集済み: AN NING 2018 年 2 月 9 日
I have a mixed repeated measure data, how to fit it into the matlab data, and my code doesn't work,always error.
Data=[ PND28W0 PND64W6 PND82W9 PND94W11];
LTdata=Data(1:77,:);% Load data from Long term
LTCHSD=CHSD(1:77,1);% Load factor 1 : CHSD
LTPhA=PhA(1:77,1);% Load factor 1 : PhA
%%%%%%%%%%%%%%%%Store the data in a table array.
t = table(LTCHSD,LTPhA,LTdata(:,1),LTdata(:,2),LTdata(:,3),LTdata(:,4),'VariableNames',{'LTCHSD','LTPhA','meas1','meas2','meas3','meas4'});
Meas = table([1 2 3 4]','VariableNames',{'Measurements'}); % Repeated measure part of data loading table
%%%%%%%%%%%%%%%%%%Fit a repeated measures model, where the measurements are the responses and the species is the predictor variable.
rm = fitrm(between,'meas1-meas4~LTCHSD*LTPhA','WithinDesign',Meas);
% Descriptive data
GS = grpstats(rm,{'LTCHSD','LTPhA'},{'mean','std',@skewness,@kurtosis}); %%%%%%%%%%%%%%%%%%%%Perform repeated measures analysis of variance.
ranovatbl = ranova(rm);
disp(ranovatbl)

回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by