How to solve problem with NumSeries error in mvregress function?

조회 수: 2 (최근 30일)
Ali Motahharynia
Ali Motahharynia 2020년 6월 15일
댓글: Ali Motahharynia 2020년 6월 15일
I tried to do longitudinal analysis using mvregress function, and I follow the instruction on mathwork at https://uk.mathworks.com/help/stats/longitudinal-analysis.html#d120e51334, however when I try to run this part I get this error
Error using statcheckmvnr (line 42)
Invalid number of series in cell array elements (should be NumSeries).
Error in mvregress (line 251)
statcheckmvnr(Data, Design, Param0, Covar0, isequal(EstMethod,3));
Error in geneExpression_ranova (line 32)
[b,sig,E,V,loglikF] = mvregress(X,Y);
my data is like this:
The matrix Y contains response data for 4 mice. The response is the fold change measured at 7 time points. Each row of Ycorresponds to a mouse (a total of four mice), and each column corresponds to a time point. The first two subjects are sham, and the second two subjects are treated mice.
Y = receptor_Name;
figure()
t = [3,6,9,12,15,18,21];
plot(t,Y)
hold on
hf = plot(t,Y(1:2,:),'^');
hm = plot(t,Y(3:4,:),'o');
legend([hf(1),hm(1)],'sham','treated','Location','NorthEast')
title('Longitudinal Response')
ylabel('Fold Change')
xlabel('Time')
hold off
X1 = Y(1:2,:);
X2 = Y(3:4,:);
X = cell(2,1);
X(1:2) = {X1};
X(3:4) = {X2};
[b,sig,E,V,loglikF] = mvregress(X,Y);
[b sqrt(diag(V))]
  댓글 수: 2
the cyclist
the cyclist 2020년 6월 15일
Can you upload your data in a MAT file (using the paper clip icon), so we can run exactly what you are running?
Ali Motahharynia
Ali Motahharynia 2020년 6월 15일
yes here is the mat file
thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by