Good morning. Thank you Professor Marin for this interesting and clear explanation. I would ask just one question: where i can find the R script of this video? I would like to test interactions and other aspects of Cox Models. Could you please tell us where to find these materials? I thank you very much for your incredible work.
I don’t for survival. These are part of a course I teach. We start with linear regression, and discuss confounding there. Then we move to logistic regression, and also look at confounding there. Because the concept and assessment of confounding is the same regardless of the regression model used, for poisson regression and survival analysis (the last 2 models in the course) we just cover the models, and state that “confounding, model building, etc, is the same here”. You can see the full course video playlist here: ua-cam.com/play/PLqzoL9-eJTNBDAG955KrzpduiPCj8-_3m.html
Why did you not convert the 'Status' variable using as.factor() and only converted 'MisMatchLevel' and 'Over40'? Is it required to use Y variables as numeric in the coxph() function?
Hi Marin, thanks for sharing this useful tutorial. I have a question: in the beginning of the analysis where you changed the classes of 'Over40' and 'MisMatchLevel' variables, shouldn't we change the class of 'Status' as well and make it a factor? Or, perhaps, it was already a factor?
Please, you say we can get the R script to see further code for dealing with confounding factors and interactions, but there's no link to the script! Many others have asked for this, too, with no answer. I checked your website as well and it doesn't include any script for the survival stuff. Please help!
Many thanks for the very useful tutorial. I have a question which I'm struggling to resolve for quite a while, how I can calculate the sample size for this (multivariable cox regression)?
Some of the best R stats videos on youtube, thanks so much! I have a question: How do you know in the interpretation, that the hazard ratio (1.030 in this case) refers to exactly 1 year difference..? My guess is because in this case age is given as an integer... but what if you replaced age with a continuous memasurement that is not given as integers but with many decimal places..?
Hi, it's not because age is given as integer or real values, but because the units used for it are years. Think of it like any slope (or derivative), the value of a slope of a line indicates how much change you get in the dependent variables if the independent variables increases by 1 unit. In this case 1.030 is the slope of the linear term "age" in the model for the log of the harzard ratio.
@@pablofernandezesteberena7456 Thanks a lot! I guess for some other variables it would be easier to interpret the change per standard deviation instead of per unit...
@@alexmuller702 That is what you would get if you calculate the Z-score for your variable before doing the fit, Z=(x-mean(x))/SD(x). By dividing by the standard deviation you get a value in units of standard deviation. If that is useful for you just be careful to convert the coefficients correctly if you want to go back to x with its regular units.
could anyone explain me that in the imported data file I did not see the total number but after calculating I saw the number n=157, where it come from?
If the concordance index is less for example c-index 0.5. How we can improve this concordance index in R language? If we used optimisation method then which parameters we need to used in Coxph function. Thank you.
When we cannot estimate survival function using cox ph model, why is R giving a survival plot for "autoplot(survfit(Cox. Mod))" command... What does the plot mean?
FYI when you convert to percentage with HR - 1 at ~6:25, you say "68% MORE likely to die" but the text states "68% times AS likely to die" which I think is a different meaning. Maybe could include a textbox for clarification.
Yeah the text is a typo. I must have copied the previous text box but not changed that phrasing. UA-cam removed the ability to add a text box annotation with the correction…kind of annoying they did that. But yes what I say is correct, but the writing there is a bit off
Thank you for this great explanation of performing Cox regression on R and HR interpretation! Please help us find the r script or the source we can get it from. I really need it. @@marinstatlectures
Thank you for wondeful lecture. I am also using Cox hazard model for analysis, and I just came up with a question and wondered if anyone else is having a similar problem. I just found out that 'Coxph(Surv(time1, time2, event)~variable1+variable2)' returns the same outcome as 'Coxph(Surv(time2, event)~variable1+variable2)', meaning that onset time does not affect the result. Furthermore, if I set 'futime=time2-time2' and codes 'Coxph(Surv(time2, event)~variable1+variable2)', it returns a different result. It seems as if Coxph function only considers endtime and not onset time. Is it just me having this kind of problem?
Mmmh! Interesting... I am assuming it might have to do with the memoryless property implicitly assumed by the standard Cox. Worth some more research though
You are the best one who explain survival analysis , thanks aloooooot
The best explanation for Cox regression model on UA-cam.
Thanks a lot.
This is an excellent survival analysis video. Coxph model clearly explained.
Thank you so much for these videos on survival analysis!
Good morning. Thank you Professor Marin for this interesting and clear explanation. I would ask just one question: where i can find the R script of this video? I would like to test interactions and other aspects of Cox Models. Could you please tell us where to find these materials? I thank you very much for your incredible work.
# prepare data
library("survival")
Stan_prepare=0)
Stan
One of the best videos. Thank you
Thank you very much for such a nice explanation. Question: where can I check the dataset?
Thanks for your videos! Very clear and explaining. How can I get the whole script for all models (KM, exp, weibull)? Thanks in advance!
Where can I get the sample data?
Thanks for the clear explanation! Do you have a follow-up video assessing confounders?
I don’t for survival. These are part of a course I teach. We start with linear regression, and discuss confounding there. Then we move to logistic regression, and also look at confounding there. Because the concept and assessment of confounding is the same regardless of the regression model used, for poisson regression and survival analysis (the last 2 models in the course) we just cover the models, and state that “confounding, model building, etc, is the same here”. You can see the full course video playlist here: ua-cam.com/play/PLqzoL9-eJTNBDAG955KrzpduiPCj8-_3m.html
Why did you not convert the 'Status' variable using as.factor() and only converted 'MisMatchLevel' and 'Over40'? Is it required to use Y variables as numeric in the coxph() function?
Hi! Thank you for the videos! They are excellent! Where can I find the script for fitting a exponential model?
waiting for the script too
Hi Marin, thanks for sharing this useful tutorial.
I have a question: in the beginning of the analysis where you changed the classes of 'Over40' and 'MisMatchLevel' variables, shouldn't we change the class of 'Status' as well and make it a factor? Or, perhaps, it was already a factor?
Please, you say we can get the R script to see further code for dealing with confounding factors and interactions, but there's no link to the script! Many others have asked for this, too, with no answer. I checked your website as well and it doesn't include any script for the survival stuff. Please help!
Could you please share the dataset so that I can follow?
Where are the dataset files to practice? many thanks
Thank you for this awesome lesson!
thank you for this helpful video, gained a new sub!
Many thanks for the very useful tutorial.
I have a question which I'm struggling to resolve for quite a while, how I can calculate the sample size for this (multivariable cox regression)?
Some of the best R stats videos on youtube, thanks so much! I have a question: How do you know in the interpretation, that the hazard ratio (1.030 in this case) refers to exactly 1 year difference..? My guess is because in this case age is given as an integer... but what if you replaced age with a continuous memasurement that is not given as integers but with many decimal places..?
Hi, it's not because age is given as integer or real values, but because the units used for it are years. Think of it like any slope (or derivative), the value of a slope of a line indicates how much change you get in the dependent variables if the independent variables increases by 1 unit. In this case 1.030 is the slope of the linear term "age" in the model for the log of the harzard ratio.
@@pablofernandezesteberena7456 Thanks a lot! I guess for some other variables it would be easier to interpret the change per standard deviation instead of per unit...
@@alexmuller702 That is what you would get if you calculate the Z-score for your variable before doing the fit, Z=(x-mean(x))/SD(x). By dividing by the standard deviation you get a value in units of standard deviation. If that is useful for you just be careful to convert the coefficients correctly if you want to go back to x with its regular units.
@@pablofernandezesteberena7456 Thanks a lot Pablo!
Wonderful! Thank you for sharing!
Can you do a hypothesis test for testing if two coefficients are equal? How do we get AIC value from Cox regression model?
how to use age as timescale in.a cox regression .need help for my thesis please
Thank you! As others have said, it would tremendously useful to also access the R script. Is that possible? Couldn't find it on your website. Thanks.
could anyone explain me that in the imported data file I did not see the total number but after calculating I saw the number n=157, where it come from?
If the concordance index is less for example c-index 0.5. How we can improve this concordance index in R language? If we used optimisation method then which parameters we need to used in Coxph function. Thank you.
Thanks! Your videos are awesome!
When we cannot estimate survival function using cox ph model, why is R giving a survival plot for "autoplot(survfit(Cox. Mod))" command... What does the plot mean?
Thank you this is very helpful!!
why do my data set "heart" in R differ from it shown in video?
Where can I find your R Script?
where can I find the scripts?
What if the exp(coeff) is greater than 2?
FYI when you convert to percentage with HR - 1 at ~6:25, you say "68% MORE likely to die" but the text states "68% times AS likely to die" which I think is a different meaning. Maybe could include a textbox for clarification.
Yeah the text is a typo. I must have copied the previous text box but not changed that phrasing. UA-cam removed the ability to add a text box annotation with the correction…kind of annoying they did that. But yes what I say is correct, but the writing there is a bit off
Thank you for this great explanation of performing Cox regression on R and HR interpretation!
Please help us find the r script or the source we can get it from. I really need it.
@@marinstatlectures
very clear
Do you have a repo for the scripts?
Thank you for wondeful lecture. I am also using Cox hazard model for analysis, and I just came up with a question and wondered if anyone else is having a similar problem. I just found out that 'Coxph(Surv(time1, time2, event)~variable1+variable2)' returns the same outcome as 'Coxph(Surv(time2, event)~variable1+variable2)', meaning that onset time does not affect the result. Furthermore, if I set 'futime=time2-time2' and codes 'Coxph(Surv(time2, event)~variable1+variable2)', it returns a different result. It seems as if Coxph function only considers endtime and not onset time. Is it just me having this kind of problem?
Mmmh! Interesting... I am assuming it might have to do with the memoryless property implicitly assumed by the standard Cox. Worth some more research though
Where to get the dataset?
It's one of the datasets included in the "survival" packages in R, load it in as "hearts"
Live saver!
more clear
Where can I get some data like this to work on as practice?
2 months late but if you need it:
library(survival)
mismatchlevel
@@babelfish567 how to get the all script r coding file
Extended cox reggression with r
how can i get the dataset?
It's one of the datasets included in the "survival" packages in R, load it in as "hearts"
You can take the stanford2 dataset, which is part of the survival package and use cut() to generate Stan$Over40 and Stan$MisMatchLevels
library(survival)
mismatchlevel
@@joljolie > library(survival); > data(). then we can see: heart>----Stanford Heart Transplant data. thank you.