Fixed effect design matrix must be of full column rank--even though it is?

9 views (last 30 days)
Hi!
I want to predict a continuous variable "rating" with a linear mixed model. Ratings are done by two different groups of people (exp and control). People in the experimental group do the rating twice in two different blocks. I therefore have the between subject factor group and a within factor ( block). I set up the design matrix as follows (here on random data)
rating=rand(40,1); group=[ones(20,1); repmat(2,20,1)];
block=[zeros(20,1); repmat(1,10,1);repmat(2,10,1)];
design=[group block]
When I check the rank (design) it`s 2 (so full rank?!). However, when I run the following
T= table(rating,categorical(group),categorical(block));
test=fitlme(T,'rating~Var2*Var3')
I get the message that my design matrix is not of full column rank. Can anyone help me out here?
  1 Comment
Laurie König
Laurie König on 4 Dec 2024
I am sorry, I just realized that my above described problem does not make a lot of sense. However, I could analyze this data in a mixed anova. Could anyone help me to translate it to Linear Mixed Model?

Sign in to comment.

Answers (0)

Categories

Find more on Vector Fields in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!