fitrm with NaN values

조회 수: 3 (최근 30일)
Leila
Leila 2018년 4월 19일
댓글: Kameron Clayton 2020년 9월 10일
Hello: I am having difficulties fitting a repeated measures model (fitrm) for matrices that contain a large amount of NaN values. I have seen few posts in this regard but haven't found a way to resolve it. Any suggestions?
  댓글 수: 1
KSSV
KSSV 2018년 4월 19일
What difficulty? You getting any error?

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

채택된 답변

Leila
Leila 2018년 4월 19일
Yes, I get an error as below:
Subscript indices must either be real positive integers or logicals.
Error in classreg.regr.modelutils.designmatrix>dummyVars (line 460) X0(end,:) = -1;
Error in classreg.regr.modelutils.designmatrix (line 290) [Xj,dummynames] = dummyVars(dummyCoding{j},Xj,catLevels{j});
Error in RepeatedMeasuresModel.fit (line 1326) = classreg.regr.modelutils.designmatrix(ds(~missing,:),...
Error in fitrm (line 67) s = RepeatedMeasuresModel.fit(ds,model,varargin{:});
Error in multistats (line 62) rm = fitrm(NewT,strcat('stimnod1-stimnod',num2str(s),'~Var1'),'WithinDesign',STIMNOD)
Error in script_NHP_v15 (line 534) [tblAmp3,tbmAmp3,NewTAmp3,LabelStatsAmp3]=multistats(AmpStimOut2Nod,AmpStimOut2Neighb,AmpStimOut2Out);
  댓글 수: 2
Kameron Clayton
Kameron Clayton 2020년 9월 10일
Was a solution for this issue ever found?
Kameron Clayton
Kameron Clayton 2020년 9월 10일
% Rows with missing values cannot be used in the fit
missing = findMissing(ds,formula.Terms,responseCols);
It seems the answer is in fit_rm code ln. 1307

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Repeated Measures and MANOVA에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by