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

prevalence.msm censtime question #94

Closed
slee-101 opened this issue Feb 16, 2024 · 4 comments
Closed

prevalence.msm censtime question #94

slee-101 opened this issue Feb 16, 2024 · 4 comments

Comments

@slee-101
Copy link

slee-101 commented Feb 16, 2024

Hi, thank you for this incredible work. I am new to R and msm and have been going through your vignettes / tutorials. With censtime, my understanding is if you have an absorbing state such as death and it occurs before censtime, then that value would be removed from the prevalence data for times after censtime.

Using the psor data set, I have tried using censtime with default (Inf), 10, and 30. The values of state 4 seem to stay constant with the total just prior to the censtime value. For instance, with censtime =10, state 4 = 8 for times >= 10 and for censtime = 30, this equals 57 times >= 30. I would have expected state4 totals to decrease after reaching censtime. Is my interpretation of this correct or does censtime only exclude values that occur after?

I will try creating an array of censtime for subject specific values later, but I wanted to ensure appropriate understanding before continuing.

censtime_psor_Inf_10_30

@chjackson
Copy link
Owner

It's not clear why you'd expect the state 4 totals to decrease after reaching censtime? The constant value you see is the number of people who have died before censtime. Those who die after censtime don't get added to this total, but we don't "forget about" the people whose deaths we have observed under the assumed observation scheme. Is there a sentence in the help file with a misleading wording?

@slee-101
Copy link
Author

slee-101 commented Feb 17, 2024 via email

@chjackson
Copy link
Owner

Deaths for people in the data who die after censtime are not included in the counts of death after censtime. However deaths before censtime are included in the counts of deaths both before and after censtime. So the count can't go up, but it can't go down either. If a person dies before their censtime, we don't exclude them from the count after censtime, because we are trying to imitate how a similar dataset might be observed in real life - if we observed that a person died before the end of the study we would know they are dead forever.

@slee-101
Copy link
Author

slee-101 commented Feb 17, 2024 via email

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