Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The question of msm #87

Closed
26pan opened this issue Dec 17, 2023 · 5 comments
Closed

The question of msm #87

26pan opened this issue Dec 17, 2023 · 5 comments

Comments

@26pan
Copy link

26pan commented Dec 17, 2023

Dear Prof. Jackson,

Thank you for providing the msm package! I am a postgraduate social science student. I am using social survey data and the msm package to analyse health state transition probabilities.

Today I am trying to reproduce a paper from Professor Chen Renjie of Shanghai Jiao Tong University, who also uses the Markov polymorphism model. The data comes from UKB, using the same attrition criteria as his, and the resulting sample size has a slight deviation due to the termination time, but it does not matter much.

The main problem is that when calculating HR and CI, there is a big gap between my results and the results of the paper, so I wonder if there is something wrong with my msm code, but I follow the msm tutorial. Because it can't be solved so I ask you for advice. Thank you very much. Figure 1 is the result of the thesis, Figure 2 is my result

1702817682620
1702817719899
1702817742320
Looking forward to your reply!

@26pan
Copy link
Author

26pan commented Dec 17, 2023

I wanted to study the effect of PM2.5 concentration on state progression and use HR to represent his risk, but my results did not seem to be statistically significant, which is obviously wrong, and I am not sure whether it is a data problem or a code method problem at present. There is less chance of problems with the data.

@chjackson
Copy link
Owner

I don't think I can answer this one, sorry. It needs someone to read the paper in detail and advise you. I'd prefer to keep this issues board for bug reports and specific questions about usage of the software.

It won't necessarily be possible to reproduce the results in a paper, unless the authors of the paper have published all of their code, data and methodology. Then you can examine in detail the differences between what they did and what you did.

@26pan
Copy link
Author

26pan commented Dec 18, 2023 via email

@26pan
Copy link
Author

26pan commented Dec 19, 2023

I don't think I can answer this one, sorry. It needs someone to read the paper in detail and advise you. I'd prefer to keep this issues board for bug reports and specific questions about usage of the software.

It won't necessarily be possible to reproduce the results in a paper, unless the authors of the paper have published all of their code, data and methodology. Then you can examine in detail the differences between what they did and what you did.

Dear Professor Jackson, I have solved the problem before, because some research objects were in state 1 and did not transition, but it only had one observation data, and the msm code showed an error, so I deleted the value that only existed in state 1, which was caused by my lack of statistical knowledge. I am very sorry. After that, I added an observation value to the research object that did not shift in state 1, and the time length was the observation cutoff time minus the baseline time, which made the final result better. But the results from state1 to state4 (death) were still poor, and the results I calculated using the cox proportional risk model were very good. Therefore, in order to make the result better, I added an observation time for states 2 and 3 that did not progress to death, and the time length was calculated as above. Although the result is better, it is still not ideal.
The above idea is obtained from cox proportional risk model and cav data that comes with R software.
Therefore, I have the following question, is there any requirement for the end observation time of the subjects who do not progress to death? These are not mentioned in the msm tutorial, so I was stuck here until now. Please give me more information and suggestions on the data structure required by the msm package. Thank you very much!

@chjackson
Copy link
Owner

You should put in whatever knowledge you have about the state. So if there is an "end observation time" at which you know the state, then you can include the state at that time.

Or if death is a state in your model, and you know the person is still alive at a particular time, but you don't know the specific living state that they are in at that time, then you can use msm(..., censor...). See e.g. https://chjackson.github.io/msm/msmcourse/timedep.html#partially-known-states and help(msm).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants