Odds Ratio, Relative Risk & Risk Difference with R | R Tutorial 4.11| MarinStatsLectures

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024

ความคิดเห็น • 46

  • @marinstatlectures
    @marinstatlectures  5 ปีที่แล้ว +4

    👋🏼In this #R video, we learn to calculate relative risk, odds ratio and risk difference (attributable risk) using the epiR package in R (with example). These are numeric summaries for analyzing 2x2 tables. To learn the concept of relative risk, odds ratio and risk difference watch this video ( th-cam.com/video/JmuciUfCJ_w/w-d-xo.html ); Like to support us? You can Donate (bit.ly/2CWxnP2), Share our Videos, Leave us a Comment and Give us a Like 👍🏼! Either way We Thank You! 🦄

  • @williamstan1780
    @williamstan1780 4 ปีที่แล้ว

    One question, at 6:35, you mentioned that the confident interval covering 1 indicating that the odd ratio is not significant. could you elaborate more on this? many thanks

  • @sofianeaitwahmane8367
    @sofianeaitwahmane8367 8 ปีที่แล้ว +3

    Hi Prof Marin, thank u alot for this intresting video..I just have a probleme with analysis of my results, its about association of genotype and disease, so I've 3 rows instead of 2, so it's a 2x3 table (a/a, A/a, A/A) ?? Thanks alot for ur attention.
    Best Regards,

  • @evacasadesusrendos5006
    @evacasadesusrendos5006 7 ปีที่แล้ว +4

    THANK YOU FOR THIS VIDEO YOU JUST SAVED MY GRADE AND MY LIFE

  • @mahimkhan108
    @mahimkhan108 4 ปีที่แล้ว +1

    what if the variables are not 2x2.... and I have 3 variable (3 way contingency table). can u show any such example... I saw in one of the research papers they have performed mantel Haenszel test... can u please demonstrate any such example

  • @V99899
    @V99899 3 หลายเดือนก่อน

    Thank you so much for these videos. You are a lifesaver.

  • @herbiembunk
    @herbiembunk 5 ปีที่แล้ว +1

    Hello Marin, thanks for your really helpful videos. Please how can we adjust for parameters like age or sex in the the epi.2by2 while calculating odd ratios?

    • @marinstatlectures
      @marinstatlectures  5 ปีที่แล้ว +2

      Hi, we can't adjust easily in a simple 2x2 table setting. BUT, you can find a logistic regression model, and adjust for other variables.
      *model

  • @angelub8629
    @angelub8629 ปีที่แล้ว

    Creo que salvaste mis deberesss!

  • @meshackamimo1945
    @meshackamimo1945 10 ปีที่แล้ว +1

    Prof,
    I tell people that u, Phil Chan and edd boone got me hooked to r.....or just a wonderful tutor.
    Kindly do us an r tutorial on Winbugs and kalman filters...just very basic introductory concepts in r...Bayesian stats in r have been such a challenge.
    Let me wish you Gods blessings n long life as you carry on the good job.

  • @yennmo88
    @yennmo88 4 ปีที่แล้ว +1

    The videos are great I have been watching them non-stop for a week! Thanks so much for taking the time.

  • @moluscosm
    @moluscosm 2 ปีที่แล้ว

    I FUCKING LOVE YOU MAN!!!!!!

  • @johnm5211
    @johnm5211 7 หลายเดือนก่อน

    Thank you for the demonstration. Just a suggestion: it would be helpful to demonstrate with a dataset since that is what most people will be using to compute their analyses.

  • @ziadkhatib78
    @ziadkhatib78 3 ปีที่แล้ว

    Hi , strangely I get these errors. Any idea how to fix them please?
    > boxplot(LungCap ~ Smoke)
    Error in eval(predvars, data, env) : object 'Smoke' not found
    > TAB

  • @ndenormal3345
    @ndenormal3345 2 ปีที่แล้ว

    Muchas gracias por el tutorial e interpretación, me ayudo mucho || Thank you very much for the tutorial and interpretation, it helped me a lot

  • @chiaraarcangeli9592
    @chiaraarcangeli9592 3 ปีที่แล้ว

    Hi Professor Martin. I have a question for you. I have to use this package but how can I Say that the test is significative? Where can I found the pvalue?
    Thanks a lot

  • @nl7247
    @nl7247 2 ปีที่แล้ว

    Thank you for this clear instructions for easily and quickly calculate RR or OR of a the numbers in a 2x2 table. Very enjoy learning from your videos. Thank you so much for explaining the details.

  • @organ1181
    @organ1181 3 ปีที่แล้ว

    how can I get the data of this video to practie in R, please
    Thanks

  • @aryen89
    @aryen89 5 ปีที่แล้ว

    4:32 you can just reorder the levels of the factor in your data frame.
    df$gender

    • @marinstatlectures
      @marinstatlectures  5 ปีที่แล้ว

      Thanks! The beauty of programming is that there are so many different ways to accomplish something

  • @jiwangurung6177
    @jiwangurung6177 6 ปีที่แล้ว

    Hello sir, thank you so much for this video. This video is very was very helpful for me. Can you post the video how can we do Hardy-Weinberg equilibrium, haplotype, linkage disequilibrium analyses and linkage disequilibrium plot in R .

  • @marcoventura9451
    @marcoventura9451 3 ปีที่แล้ว

    Very instructive; many functions of R are involved: data manipulation, plot e stats.

  • @dr.navidsoltani4326
    @dr.navidsoltani4326 3 ปีที่แล้ว

    Hi! Do you have any videos on producing adjusted RRs? I.e. feeding multiple variables in to a model to produce crude, age-adjusted and "fully"-adjusted RRs depending on number of variables available?

    • @marinstatlectures
      @marinstatlectures  3 ปีที่แล้ว

      Yes, you can do that with Poisson regression. I have videos for that, just putting on the finishing touches, and will be releasing over the next few weeks. They’re lectures for week 9 of this series: th-cam.com/play/PLqzoL9-eJTNBDAG955KrzpduiPCj8-_3m.html

  • @holy0612
    @holy0612 4 ปีที่แล้ว

    You have no idea how much this video has helped me!!!! Nevertheless, I use this to reorder : Cigarrillo

    • @danimedi555
      @danimedi555 4 ปีที่แล้ว

      x2 jajajaja también aprendí bastante sobre R en esta cuarentena, hice algunos videos en español sobre temas relacionados, si quieres les das un vistazo u.u

  • @priscilasantos6668
    @priscilasantos6668 6 ปีที่แล้ว

    Eu queria agradecer pela gentileza de compartilhar seus conhecimentos. Muito obrigada! Muito proveitoso!
    Aluna do Brasil.

  • @양혜원-b5c
    @양혜원-b5c 5 ปีที่แล้ว

    How can I calculate odd ratio or relative ratio in subset data group?

  • @marianaalexandratorresbust7103
    @marianaalexandratorresbust7103 3 ปีที่แล้ว

    Hello! Thank u for your video. I have a question. You use the function cbind to change the order of columns, but If also i need to change the order of the rows too. How I do it?

    • @marinstatlectures
      @marinstatlectures  3 ปีที่แล้ว

      You can use rbind() to bind data together in row-wise fashion

  • @anastasia.2007.
    @anastasia.2007. 8 ปีที่แล้ว

    Hi Mike,
    First, thank you for this great R tutorial!
    Second, I had a question regarding this video in particular and the calculation of odds ratio. I did everything exactly (at least I think so) as you described in the video, but my result for odds ratio’s confidence interval, although similar, was not exactly the same (command epi.2by2(TAB3, method = "cohort.count", conf.level=0.95) or epi.2by2(TAB3, method = "cohort.count”)):
    Odds ratio (W) 1.42 (0.88, 2.28)
    (Your result can be seen here: th-cam.com/video/V_YNPQoAyCc/w-d-xo.html#t=394)
    Does this detail have any importance for the calculation of odds ratio with the epiR package? Could my epiR package, that I downloaded using the commands you described in earlier videos, be using some different parameters, corrections, etc.?
    Thanks!

    • @marinstatlectures
      @marinstatlectures  8 ปีที่แล้ว

      Hi +Anastasia Levchenko , I'm not sure on the exact reason why they differ slightly, but my guess is that the approximation the package uses to estimate the SE and the confidence interval has probably been changed slightly. i made this video about 2.5 years ago, and so they must have made some minor updates to how they are approximating the confidence interval. but the difference is minor, and in no way any error on your part.

  • @hossammohamed7096
    @hossammohamed7096 5 ปีที่แล้ว

    How can i get p-value for the OR or RR ?

  • @zeno9154
    @zeno9154 9 ปีที่แล้ว

    hello Dear Marin, thank you for the wonderful tutorial. Just a small question when i do the correlation between two numeric variables, the results shows " NA ". What does that means?

    • @marinstatlectures
      @marinstatlectures  9 ปีที่แล้ว

      Hi H.E Aljofi , that sounds like it's most likely due to having some missing values in there...do you have some NA's in the data? if so, you can use *cor(x,y, use="complete.obs")* to calculate the correlation between X and Y, using only the complete cases is doing so.

    • @zeno9154
      @zeno9154 9 ปีที่แล้ว +1

      MarinStatsLectures it worked well after i used the function use="complete,obs".
      it seems my data have missing values. Thank you Marin.

  • @klfjakldf18
    @klfjakldf18 9 ปีที่แล้ว

    Great work Marin. I was wondering if you could give us a lecture in how to test difference in Sharpe ratio, or at least guide me through it? I tried to use paired t test, but then a recalled Sharpe ratio has an asymptotic distribution. The paired t test is a wrong approach, right?

    • @marinstatlectures
      @marinstatlectures  9 ปีที่แล้ว

      Hi klfjakldf , that's not a topic I'm very familiar with, but id suggest to check out the "SharpeR" package in R. if you visit the R-project website, you can find documentation for the SharpeR package there, and see if it's what you're looking for.

  • @sawadeejar
    @sawadeejar 9 ปีที่แล้ว

    Hello Marin,
    Is there a way to avoid rounding in epi.2by2() function?
    A problem I've encountered is that there are zero cell entries in the original 2x2 table that cause some inf value in the result. So I added 0.5 to every cell. The result turned out to be the same (containing inf) with a warning message saying that:
    In fisher.test(dat, conf.int = TRUE, conf.level = conf.level) :
    'x' has been rounded to integer: ........
    Thanks.

    • @marinstatlectures
      @marinstatlectures  9 ปีที่แล้ว

      Sawadee Jar im not sure how to change the rounding in the epi2by2 function...to be honest, i don't think that "epiR" is a very good package.
      but i can say a few things about why you're getting that error message. first off, if you have a 0 cell count, its really not a good idea to be doing any of these tests in general.
      with Fisher's Test, it can only work with integer values. the p-value is calculated by taking all permutations of possible tables, and using as the numerator the number of tables that are more extreme in their dependance than the observed table. so, it can only work with integer values....and it ends up rounding the 0.5 down to 0. to correct for this, you can fill in a value of 1 where there are cell counts of 0. as i mentioned, doing this is NOT A GOOD IDEA in terms of statistics, but it will correct for the error message you are getting.

    • @sawadeejar
      @sawadeejar 9 ปีที่แล้ว

      MarinStatsLectures
      Dear Marin,
      Thank you for the reply.
      In that case, would you point me to any tests or packages that are suitable for zero cell entry?

    • @marinstatlectures
      @marinstatlectures  9 ปีที่แล้ว

      Sawadee Jar i would suggest collecting more data, as there is not a "statistical fix" for having not observed something. if you haven't, say, observed any occurrences of some event under a certain condition, then that is what it is. you would either need to collect more data to observe an occurrence, or possibly look at redefining the "occurrence" so that you have at least one observed event in each cell. i don't know the context of your data, but you may be able to work with a different definition of "occurrence".

  • @pushpakoirala1360
    @pushpakoirala1360 3 ปีที่แล้ว

    after seeing 1000 videos have got the perfect video for OR.Many thanks to you. and I have one more qtn. May can you please give me an idea to calculate two diff times in R from the big data set?

    • @marinstatlectures
      @marinstatlectures  3 ปีที่แล้ว +1

      I’m sorry, I don’t understand your question.

    • @pushpakoirala1360
      @pushpakoirala1360 3 ปีที่แล้ว

      @@marinstatlectures calculating time difference in R.