How to code a repeated measure variable that is the independent variable for a mixed effect model

4 visualizaciones (últimos 30 días)
Hello,
I am a total beginner. I am trying to run a mixed effect model with memory performance (LDI) as a dependent variable, and a functional measure that was taken from the same brain region in the left and in the right hemisphere as an independent variable (CVR HIP). In addition I would like to control for age, sex and site (data was collected at 2 different scanning sites).
The problem I have is that I seem to not be able to figure out how to code the 2 brain measures as one independent variable with a left and right variable in order to include it into the model.
This is how I coded the data:
and then I ran:
fit1=fitlme(data, 'LDI~CVRHIP+hemisphere+age+sex+site+(1|subject)')
But I am pretty sure that this is not correct. When I look at the fixed effects coefficients table I believe the effect 'hemisphere_2' gives me the effect for the hemisphere 2 on memory performance in comparison to hemisphere 1 but I want to look at the effect of CVR in hemisphere 2 on memory in comparison to effect of CVR in hemisphere 1.
I hope I explained everything in an understandable way. I would very much appreciate any comments or suggestions. Thank you very much in advance!
Carolin

Respuestas (1)

Hitesh
Hitesh el 21 de Oct. de 2024
Hi Caroline chwiesko,
You can get effect of "CVR_HIP" in "hemisphere" 2 in comparison to effect of "CVR_HIP" in "hemisphere" 1 by using below "fitlme" expression'. You can also remove constant variable such as "site" which is always 1 as it doesn't contribute any useful information.
fit1 = fitlme(data, 'LDI ~ CVR_HIP * hemisphere + age + sex + (1|subject)');
This model includes both the main effects of "CVR_HIP" and "hemisphere" as well as their interaction "CVR_HIP * hemisphere". This means that the model can estimate how the effect of "CVR_HIP" on "LDI" differs between hemisphere 1 and hemisphere 2. "CVR_HIP:hemisphere" represents how the effect of "CVR_HIP" on "LDI" changes when moving from hemisphere 1 to hemisphere 2.
For more information on "fitlme", refer to the below MATLAB documentation:

Categorías

Más información sobre MRI en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by