-
Notifications
You must be signed in to change notification settings - Fork 25
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
survfitJM, aucJM, prederrJM require information about the date of the event when using time-varying-effect approach #108
Comments
This doesn’t bias the results because the timing of the events in the validation dataset was not used when training the model.
——
Professor of Biostatistics
Erasmus Medical Center Rotterdam
The Netherlands
…________________________________
Από: zoubirph ***@***.***>
Στάλθηκε: Saturday, November 16, 2024 12:46:16 PM
Προς: drizopoulos/JMbayes ***@***.***>
Κοιν.: Subscribed ***@***.***>
Θέμα: [drizopoulos/JMbayes] survfitJM, aucJM, prederrJM require information about the date of the event when using time-varying-effect approach (Issue #108)
Waarschuwing: Deze e-mail is afkomstig van buiten de organisatie. Klik niet op links en open geen bijlagen, tenzij u de afzender herkent en weet dat de inhoud veilig is.
Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hello,
We have modelled the link between a biological marker and the risk of an event in a time-dependent manner according to your Time-varying Effects example on the https://www.drizopoulos.com/vignettes/multivariate%20joint%20models#time-varying-effects page. i.e., we have used the equivalent of ‘Time’ instead of ‘year’, which allows us to have a wider time range and capture the change in the α(t) value in a time-dependent manner reflecting the pathophysiological reality.
However, during the external validation of the model, we noticed that the functions survfitJM, aucJM, prederrJM require information about the date of the event, which obviously biases the estimation of the model's predictive capacity and limits the application of the model for individual prediction. How can this limitation be resolved?
Thank you very much for your help and for this excellent package.
—
Reply to this email directly, view it on GitHub<#108>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADE7TT6T54TSH6EB64AJZYD2A4WARAVCNFSM6AAAAABR4X6OT6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3DIMRUGQ3TGNY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Thank you very much for your fast response! library("JMbayes") pbc2.id <- pbc2[!duplicated(pbc2$id), ] MixedModelFit1 <- mvglmer(list(log(serBilir) ~ year + (year | id)), data = pbc2, Ints_tveffect <- list("log(serBilir)_value" = ~ 0 + tve(Time, df = 8)) JMFit1_tveffect <- mvJointModelBayes(MixedModelFit1, CoxFit, timeVar = "year", aucJM(JMFit1_tveffect, pbc2, Tstart = 5, Thoriz = 8) ND <- pbc2[pbc2$id == 1, ] #######and now using pbc2_test data set without event and time of the event and you will see the following error message pbc2_test <- pbc2[ , !(names(pbc2) %in% c("event", "Time"))] ND <- pbc2_test[pbc2_test$id == 1, ] plot(sprobs) #which is not the case with a model without time varying effect particularly for the ‘survfitJM’ function JMFit1 <- mvJointModelBayes(MixedModelFit1, CoxFit, timeVar = "year") ND <- pbc2_test[pbc2_test$id == 2, ] plot(sprobs) |
Indeed, the validation dataset *must* include the event times and the event indicators. Including this information will not bias the assessment of the predictive performance.
BTW, it will be better to use the newer JMbayes2 package:
https://drizopoulos.github.io/JMbayes2/articles/Time_Varying_Effects.html
https://drizopoulos.github.io/JMbayes2/articles/Dynamic_Predictions.html
——
Professor of Biostatistics
Erasmus Medical Center Rotterdam
The Netherlands
…________________________________
Από: zoubirph ***@***.***>
Στάλθηκε: Σάββατο, Νοεμβρίου 16, 2024 17:53
Προς: drizopoulos/JMbayes ***@***.***>
Κοιν.: Dimitris Rizopoulos ***@***.***>; Comment ***@***.***>
Θέμα: Re: [drizopoulos/JMbayes] survfitJM, aucJM, prederrJM require information about the date of the event when using time-varying-effect approach (Issue #108)
Waarschuwing: Deze e-mail is afkomstig van buiten de organisatie. Klik niet op links en open geen bijlagen, tenzij u de afzender herkent en weet dat de inhoud veilig is.
Caution: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Thank you very much for your fast response!
I'll illustrate with an example that you used in the thumbnail.
library("JMbayes")
library("splines")
pbc2$Time <- pbc2$years
pbc2$event <- as.numeric(pbc2$status != "alive")
pbc2.id <- pbc2[!duplicated(pbc2$id), ]
MixedModelFit1 <- mvglmer(list(log(serBilir) ~ year + (year | id)), data = pbc2,
families = list(gaussian))
CoxFit <- coxph(Surv(Time, event) ~ drug + age, data = pbc2.id, model = TRUE)
Ints_tveffect <- list("log(serBilir)_value" = ~ 0 + tve(Time, df = 8))
JMFit1_tveffect <- mvJointModelBayes(MixedModelFit1, CoxFit, timeVar = "year",
Interactions = Ints_tveffect)
aucJM(JMFit1_tveffect, pbc2, Tstart = 5, Thoriz = 8)
prederrJM(JMFit1_tveffect, pbc2, Tstart = 5, Thoriz = 8)
ND <- pbc2[pbc2$id == 1, ]
sprobs <- survfitJM(JMFit1_tveffect, ND, M = 1000)
plot(sprobs)
###all functions work well
#######and now using pbc2_test data set without event and time of the event and you will see the following error message
#Error in Surv(Time, event) : objet 'Time' not found
pbc2_test <- pbc2[ , !(names(pbc2) %in% c("event", "Time"))]
aucJM(JMFit1_tveffect, pbc2_test, Tstart = 5, Thoriz = 8)
prederrJM(JMFit1_tveffect, pbc2_test, Tstart = 5, Thoriz = 8)
ND <- pbc2_test[pbc2_test$id == 1, ]
sprobs <- survfitJM(JMFit1_tveffect, ND, M = 1000)
plot(sprobs)
—
Reply to this email directly, view it on GitHub<#108 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADE7TT2GWRO4DKOFKF7WMN32A52CBAVCNFSM6AAAAABR4X6OT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBQGY3DGNBTG4>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hello,
We have modelled the link between a biological marker and the risk of an event in a time-dependent manner according to your Time-varying Effects example on the https://www.drizopoulos.com/vignettes/multivariate%20joint%20models#time-varying-effects page. i.e., we have used the equivalent of ‘Time’ instead of ‘year’, which allows us to have a wider time range and capture the change in the α(t) value in a time-dependent manner reflecting the pathophysiological reality.
However, during the external validation of the model, we noticed that the functions survfitJM, aucJM, prederrJM require information about the date of the event, which obviously biases the estimation of the model's predictive capacity and limits the application of the model for individual prediction. How can this limitation be resolved?
Thank you very much for your help and for this excellent package.
The text was updated successfully, but these errors were encountered: