# “Input to EIG must not contain NaN or Inf” error in fitrm for 18 subjects and 6 levels

Hi,

I am getting the following Matlab error: “Input to EIG must not contain NaN or Inf.” when I run the fitrm function.

I am trying to test the differences between the 6 levels.

I have 18 subjects and 6 levels.

My table with the formatted data looks like this:

The code:

The output from the console window is:

I have traced the problem to line 1347 in RepeatedMeasuresModel.m. Here, the variable dfe is equal to zero and thus the covariance becomes 0 as well.. How do I avoid this?

The variable dfe is given by dfe = size(Xmat,1)-size(Xmat,2); , where Xmat is a 18x18 matrix and thus dfe becomes zero….

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help , Finance Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Hello, I have a similar problem and don’t understand how to solve it. I tried looking for missing values but don’t seem to find them. This is my code:

V1 = (41 + 47 + 42)/x;

V2 = (54 + 97 + 58)/x;

V3 = (46 + 49 + 26)/x;

V4 = (28 + 40 + 45)/x;

V5 = (104 + 126 + 70)/x;

S1 = [V1 31 51 35 34];

S2 = [V2 22 75 42 55];

S3 = [V3 45 83 31 24];

S4 = [V4 54 67 10 55];

S5 = [V5 71 156 61 91];

vehicle = [S1(1) S2(1) S3(1) S4(1) S5(1)];

cloz_0_08 = [S1(2) S2(2) S3(2) S4(2) S5(2)];

cloz_0_1 = [S1(3) S2(3) S3(3) S4(3) S5(3)];

cloz_0_3 = [S1(4) S2(4) S3(4) S4(4) S5(4)];

cloz_1 = [S1(5) S2(5) S3(5) S4(5) S5(5)];

animals{1} = ‘rat4’;

animals{2} = ‘rat15’;

animals{3} = ‘rat20’;

animals{4} = ‘rat21’;