CecileProust-Lima / lcmm

R package lcmm
https://CecileProust-Lima.github.io/lcmm/
54 stars 13 forks source link

Large Number of Covariates #150

Closed sophieschneemelcher closed 1 year ago

sophieschneemelcher commented 1 year ago

Dear Cécile, Dear Viviane,

I just came across this forum and I am so very thankful for all these useful information and answers!

I use the lcmm package to analyse data of an intervention study with three measurement time points. I included 13 different covariates in the model and right now, I am looking at the Odds Ratio values.

This is my code:

image

So, when I use the function summary(model) I get this output:

Screenshot_20221209_153735

This leads me to the following questions:

  1. First of all, I am wondering about the missing values of Se, Wald, p-value at the Fixed effects in the class-membership model and the Fixed effects in the longitudinal model. Might there be a mistake in my code?
  2. The values that the output shows (coef) are Odds Ratio values if I´ve understood it correctly. Many values are negative (but I thought the value range of Odds Ratio is between 0 und ∞). Therefore, I´m not sure whether my values are correct.
  3. Do you see any problem with including 13 covariates in the model? Or is it alright to include such a large number of covariates?

Thank you very much in advance and best regards from Germany Sophie

VivianePhilipps commented 1 year ago

Hi Sophie,

The coef in the class-membership model refers to the unconstrained parameters, so the exp(coef) will be odds ratios. Here, the model has not converged, that's way you don't have the SE. At the beginning of the summary, you will probably see the message "Maximum number of iterations reached without convergence". The large number of covariates could be the reason. Many parameters will cause many numerical issues and also identifiability problems.

Best,

Viviane

sophieschneemelcher commented 1 year ago

Dear Viviane,

thank you very much for your very helpful answer! I calculated my model with exemplary 3 covariates and it converged. I got 2 questions about it:

  1. Sorry for this very trivial question, but where should I now have a look at if I want to analyse the impact of the covariates (the Fixed effects in the class-membership model or the Fixed effects in the longitudinal model?).

  2. Do you maybe have an idea how to decide which covariates I should include in the model, e.g. by factor analysis?

Again: Thank you so much and best regards, Sophie

image
VivianePhilipps commented 1 year ago

These are different assumptions if you put the covariates in the classmb part or in the longitudinal part. If you put them in classmb, the covariates will affect the probability to belong to each class. If you put them in the longitudinal model, you will assume that, in each class, the trajectory will be different according to the covariates value. Both can be considered.

Regarding which covariates you should include, you can consider different strategies if you need to reduce their number, for example a step by step selection. But there is no preferred method for that.

Viviane

sophieschneemelcher commented 1 year ago

Thank you very much, Viviane!