필터 지우기
필터 지우기

Problem rank design matrix glme

조회 수: 1 (최근 30일)
Hans van der Horn
Hans van der Horn 2021년 1월 6일
댓글: Hans van der Horn 2021년 1월 6일
Dear all,
I encounter a problem with fitglme.
I'm trying to fit the following model:
y ~ age + sex + education + g2*time + g3*time + g4*time + (1|subject)
The first group (g1) only has one timepoint instead of 2 for the other groups (so I use this one as a reference, and use the other groups dummycoded), so I tried filling in NaN or just 0 for Time for that group.
However, Matlab keeps giving me the error that the design matrix is not full rank during validation of inputs.
This also happens when I simply use groups as one column vector without seperately dummy coding them, and doing: y ~ age + sex + education + group*time + (1|subject)
How would you approach this problem? Can I still put everything in 1 model?
Thanks very much.
  댓글 수: 2
John D'Errico
John D'Errico 2021년 1월 6일
You cannot use a model with 3 time variables like that. If you did, you could just combine them all into one time vector, with one coefficient. There is only one piece of information there to be estimated.
Filling in a point with NaN essentially just eliminates that point. And using 0 for time for some points arbitrarily is little better.
But sadly, it is difficult to really know what you did, and why the problem is rank deficient, without actually seeing what you did. Describing vaguely what you did is not enough.
Hans van der Horn
Hans van der Horn 2021년 1월 6일
Thanks for your answer John. What I would like to do is fit a model with 4 groups and 2 time points, and one of the groups has no second time point. In addition I would like to add 3 covariates. How would you approach this?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by