Hi FactoMineR users!
I'm working on a dataset where my patients have been examined four times, with 86 variables at each time point. The variables are numeric and categorical and include age and date for each visit.
I've made an MFA on Visit 1 where my variables are divided into 12 groups, including one supplementary variable (age). Date is not necessary.
Moving to my repeated measurement analysis I need both age and the date for the visit to be nested within each visit. Age and date are correlated so perhaps only age and date for visit1 and then date for visit2-4 to measure the distance in time?
1) Can MFA handle this kind of repeated measurement with variable time intervals between datapoints?
2) I understand that the dataset should be something like:
| Visit 1 | Visit2 | Visit3
ID | Var1 Var2 Var 3 | Var1 Var2 Var3 | Var 1 .......
1 a b c | aa bb cc | aaa ......
Is this obtained using vectors in my df and how does MFA interpret this as I want to keep my 12 groups nested under each Visit?
Could the df instead be?
ID | Age_at_1 | Var1_visit1 Var2_visit1 Var 3_visit1 | Var1_visit_2 Var2_visit_2
1 x | a b c | aa bb
Where one of the vars is the date for the examination?
I believe the code should be something like:
MFA(mydata,
group=c(86, 86, 86, 86),
type=("n",rep("c", 4)),
name.group=c("Visit1", "Visit", "Visit3, "Visit4"),
num.group.sup=1 # age and date?
Chrono =TRUE)
But how does this handle age and date for examination?
I really hope you can help as I'm a little stuck with this problem.
Kind regards
Kristian Sandahl