- Listwise Deletion: By default, fitrm uses listwise deletion for rows with any missing data in the response variables. This means that if any of the response variables (var_t1 to var_t4) have missing values for a particular observation, that entire observation will be excluded from the analysis.
- Impact on Results: If missing data is not missing completely at random (MCAR), listwise deletion can introduce bias. It's important to consider the mechanism of missingness and whether the missing data might skew your results.
Missing data in repeated measure model
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am using the matlab function fitrm to fit repeated measures model in order to investigate whether elements grouped according to Grouping1 have statistically different means for the variable measured at time t1,t2,t3,t4 (var_t1,var_t2,var_t3,var_t4).
My data look like the ones in the table: (better formatted here http://stackoverflow.com/questions/32475023/missing-data-in-repeated-measure-model)
Grouping1 Grouping2 Gender Age BMI var_t1 var_t2 var_t3 var_t4
______ ___________ ______ ______ ______ ____________ ____________ ____________ ____________
C B Male 60 24.802 836 608 746 NaN
C A Male 67 19.818 242 544 460 483
... ...
D C Female 65 21.631 621 468 NaN NaN
As you can see from I have some missing data for var_t3 and var_t4. Can I still use fitrm?
If fit a repeated measures model, where var_t1,-var_t4 are the responses and Grouping1, Grouping2, Gender, Age and BMI are the predictor variables
Time = [1:4]';
rm = fitrm(table,'var_t1-var_t4 ~ Grouping1 + Grouping2 + Gender + Age + BMI','WithinDesign',Time)
the function doesn't return error, but I don't know if the results have any meaning...
0 Commenti
Risposte (1)
Aditya
il 8 Feb 2025
Hi Gabrielle,
When using fitrm in MATLAB to fit a repeated measures model, handling missing data is an important consideration. MATLAB's fitrm function can handle missing data to some extent, but it's crucial to understand how it affects your results and what assumptions are being made.
Handling Missing Data:
Example code:
% Define the within-subject factor
Time = table([1; 2; 3; 4], 'VariableNames', {'Time'});
% Fit the repeated measures model
rm = fitrm(dataTable, 'var_t1-var_t4 ~ Grouping1 + Grouping2 + Gender + Age + BMI', 'WithinDesign', Time);
% Display the results
ranovatbl = ranova(rm);
disp(ranovatbl);
0 Commenti
Vedere anche
Categorie
Scopri di più su Repeated Measures and MANOVA in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!