linear mixed-effects model (fitlme) add array variable
1 次查看(过去 30 天)
显示 更早的评论
Hello community!
I would like to run a linear mixed-effect model using fitlme and include one fixed effect which instead of having one value per observations has an array (i.e., a reflectance spectrum) for each observation. The other fixed (and random) effect are instead single values.
I want to understand the variance contribution from the entire array (i.e., full spectrum) on my response variable rather than from its individual elements (i.e., reflectance at single wavelengths). How to modify the fitlme synthax for this?
Thank you in advance for any suggestion.
0 个评论
回答(2 个)
Jeff Miller
2023-1-24
I'm pretty sure the predictors have to be single values, so you can't feed in an array as a single unified predictor. You could feed in the individual elements, but you say you don't want to do that.
The only other possibility would be to use a single categorical predictor to represent the whole spectrum array for each case. For example, if you had only two spectrum patterns across your whole dataset, then you could use a predictor variable coding them as type A and type B (or whatever). Something like this would work if you can group the different spectrum arrays into a small-ish number of categories; otherwise, I have no idea.
2 个评论
Jeff Miller
2023-1-25
Just out of curiousity, can you describe what sort of output you would hope to get if you could get fitlme to handle a vector-type predictor? I'm having trouble envisioning just what is meant by the "variance contribution from the entire array" as opposed to the individual elements. If you mean contributions due to (say) products of pairs of elements, products of triples, etc, then you could form those in advance and feed them into the equation as further individual predictors, like in polynomial regression.
the cyclist
2023-1-25
I am by no means an expert on image processing, but one possibility is to preprocess your images to extract individual "features" that can then be used in a regression model. If you have an m-by-n array (of some kind of reflectance measure), then you have m*n features in the original data space. That will capture a certain amount of noise, but if you do some kind of dimensional reduction technique (such as PCA), then you might be able to extract a smaller number of more meaningful features (e.g. things like "overall reflectance", or "left-brighter-than-right") that could be predictors of the response.
You will not have one fit coefficent for "fixed effect of image", but you may end up with just a few.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Analysis of Variance and Covariance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!