Quantile Regression Reporting Made Easy: How to Create Stunning Plots and Tables in Minutes!

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024
  • In the previous episode, I presented four reasons why Quantile Regression (QR) is a better alternative to classic linear regression. However, I discovered that reporting QR results can be quite demanding. To make the process easier, I created better plots for model estimates and predictions, a comprehensive table of model results, including contrasts between groups and p-values. I found this code so useful that I thought you guys might benefit from it too. Besides, I really enjoyed programming it
    If you only want the code (or want to support me), consider join the channel (join button below any of the videos), because I provide the code upon members requests.
    Enjoy! 🥳
    Welcome to my VLOG! My name is Yury Zablotski & I love to use R for Data Science = "yuzaR Data Science" ;)
    This channel is dedicated to data analytics, data science, statistics, machine learning and computational science! Join me as I dive into the world of data analysis, programming & coding. Whether you're interested in business analytics, data mining, data visualization, or pursuing an online degree in data analytics, I've got you covered. If you are curious about Google Data Studio, data centers & certified data analyst & data scientist programs, you'll find the necessary knowledge right here. You'll greatly increase your odds to get online master's in data science & data analytics degrees. Boost your knowledge & skills in data science and analytics with my engaging content. Subscribe to stay up-to-date with the latest & most useful data science programming tools. Let's embark on this data-driven journey together!

Комментарии • 45

  • @aak5421
    @aak5421 10 месяцев назад

    Thank you! your videos are very helpful and easy to follow. I really appreciate your effort.

  • @AbdullahN8
    @AbdullahN8 10 месяцев назад

    Thanks for sharing, Prof.

  • @joaoalexissantibanezarment4766
    @joaoalexissantibanezarment4766 5 месяцев назад

    I'm doing better analysis of my PhD data because of your videos, thanks a lot!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  5 месяцев назад +1

      I am glad my content is helpful! Thanks for watching and commenting! That’s the best support 🙏

  • @HammadiSliti
    @HammadiSliti 3 месяца назад

    Very good job, thanks a lot.

  • @hikeaway1596
    @hikeaway1596 10 месяцев назад +1

    useful as always! thanks!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  10 месяцев назад

      Glad to hear that! Thank you for watching!

    • @OnLyhereAlone
      @OnLyhereAlone 10 месяцев назад

      This one is completely out of the world. I need to watch this a couple more times to absorb the sea of knowledge from this video. HOWEVER, I have a couple of questions:
      I was thinking why not write a small package to help people do this, but eventually you provided the code. Do you still think it's worth making a package on?
      2. I heard at the beginning you saying means and predictions, are these really different? When using the emmeans package, are we not just getting the average of the dependent variable for individual groups based on the model? On a related note doesn't the emmeans function and ggpredict function produce the same results?
      I'll stop here for now...
      Thanks again for the wonderful work you do and the unique video presentation style you use.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  10 месяцев назад

      thanks a lot, mate! There are some reason I don't plan to create a package: I don't have much programming knowledge about how to create a package, only few unrelated functions here and there are a mess and will not fit together, and I don't have much time, due to a normal job. And I work a lot. However, there is a possibility to write a feature request on the github pare of quantreg package. I might do it myself, but I think it sounds a bit needy when I request them to use my function ;) you could ask them if you wish ;)

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  10 месяцев назад

      oh, no, ggemmeans and emmens produce the same result. ggpredict, or ggeffect produce slightly different estimates.

  • @ww-qk9mz
    @ww-qk9mz 7 месяцев назад

    Thank you so much for sharing this amazing way of making figures! One question is, how to switch the y and x-axis if I want to show tau on the x-axis?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      Thanks 🙏 for the feedback! Sure, just delete the coord_flip() line

  • @Endrumpf
    @Endrumpf 10 месяцев назад

    Thanks for the demonstration. Can you please make a detailed video of Multivariate Probit model???

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  10 месяцев назад +1

      Noted. It might take me some time since the list is long and I have a day job. But I planned it already anyway. Thanks for watching!

    • @Endrumpf
      @Endrumpf 10 месяцев назад

      @@yuzaR-Data-Science Thank you very much..

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  10 месяцев назад

      @@Endrumpf You are very welcome!

  • @muhammedhadedy4570
    @muhammedhadedy4570 7 месяцев назад

    Another great tutorial. Thank you so much, my dear professor.
    I have just one question. I'm using the ANCOVA model for my pre-post-test analysis, where the outcome is the post-test, the independent variable is my group, and the covariate is the pre-test value. I use the emmeans package to get adjusted means.
    My question is, how can I get an adjusted median in quantile regression for non-parametric data?

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      The QR doesn't care whether the data is non-parametric. So, just use QR and emmeans as described in the video. Here is the code for you:
      library(emmeans)
      emmeans(qr_all,
      pairwise ~ education,
      by = "tau",
      tau = c(.1, .9),
      weights = "prop") # infer = T
      That will give you the adjusted medians + 95% CIs.

    • @muhammedhadedy4570
      @muhammedhadedy4570 7 месяцев назад

      @@yuzaR-Data-Science
      Sir, I don't know how to thank you. I'm very grateful for your fast reply.
      I owe you a lot. Greetings from Egypt.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      you are very welcome! the best support you can do is actually free - just continue watching, liking, commenting and sharing my videos. and, by the way, you'll learn some useful things ;) thanks!

  • @RiyazBashaRK
    @RiyazBashaRK 5 месяцев назад

    Hi professor.Is there any way we can dynamically adjust line in quantile regression plot and it should affect other plots

  • @0000deutschland
    @0000deutschland 7 месяцев назад

    Hi Professor, is there a method to determine the best predictors per quantile, or the best model per quantile
    thank you

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      that's an amazing question! actually the t-values in a boring summary function could be considered the measure of importance. here is a code example, where you can display all the t-values for all quantiles:
      qr_all

  • @0000deutschland
    @0000deutschland 8 месяцев назад

    Thank you so much for this insightful video! Can I have the code please

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  8 месяцев назад

      unfortunately, my blog was shut down. but even if it werent, I don't recommend to copy paste. just make each step work and then you'll be able to connect them. you'll learn so much more. thanks for watching

    • @0000deutschland
      @0000deutschland 8 месяцев назад

      @@yuzaR-Data-Science plot_models(lr, qr10, qr50, qr90,
 show. values = TRUE,
      +
      m. labels = c("LR","QR 10%", "QR 50%", "QR 90%"),
      legend. title = "Model type")
      it doesn't work for me, I've tried many times Error: unexpected symbol in "plot_models(lr, q10, r50, 9r90" Could not recover model data from environment. Please make sure your data is available in
      your workspace.

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад

      Hi, could it be just a typing mistake? Because I see " 9r90" istead of "qr90". If it is, don't beat yourself up to strong :) 90% of coding mistakes are typos ;) Let me know if it is still not working and I'll do my best to help!

  • @0000deutschland
    @0000deutschland 7 месяцев назад

    Thanks for your replay, the last part is not running, can you please explain what should I put in the ncol = ??, nrow = ??. thanks again

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      :) 2 for two rows in nrows and 3 (or how many you want) for three columns in ncol ;) ... oh by the way, nice name, I am also based in Germany .... Munich. cheers mate

  • @josepmarti2025
    @josepmarti2025 8 месяцев назад

    I have tried to replicate your video, however, I am facing a problem when I run the following code:
    q_plot

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  8 месяцев назад +1

      It still works at my PC. I guess the data frame which contains UCL is somehow not ready for the function. Or some packages, like broom or rstatix are not installed yet. Check this and get back to me whether it worked. Cheers

    • @josepmarti2025
      @josepmarti2025 8 месяцев назад

      Got it, thanks! I managed to fix the code, and it's working now. Appreciate your quick response. Keep those helpful videos coming!@@yuzaR-Data-Science

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  8 месяцев назад +1

      glad it works now! please, produce some kick ass science with that ;) I'll do my best to produce more useful content. Thanks for support!

  • @murilomotta6040
    @murilomotta6040 10 месяцев назад

    Does that work for panel data?? Thanks!!

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  10 месяцев назад +1

      I never tried. I know that quantile regression works with panel data, but I am not sure about emmeans. Have a look at rqpd package

  • @0000deutschland
    @0000deutschland 7 месяцев назад

    hello everyone, please for those who managed to run the code, I'm struggling with the plat layout as I have only numeric variables; this is the error I got
    Error in plot_layout(ncol = 3, nrow = 2) + plot_annotation(title = "XXX", :
    non-numeric argument to binary operator
    Any help is much appreciated. Thank you so much
    >

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      hallo again, just answered you previous comment. this error message does not point our a specific problem. could you run the code line by line and then identify where the problem exactly is? the plot_layout needs number of columns and number of rows for creating subplots of already pre-produced plots, so you need to expect 6 subplots, but if you don't have them (hard to know what you exactly do without data), it won't work. so, first question can you run that:
      job + age + edu_hs + edu_sc + edu_coll + edu_high +
      plot_layout(ncol = 3, nrow = 2)
      or that:
      job + age + edu_hs + edu_sc + edu_coll + edu_high
      ???

    • @0000deutschland
      @0000deutschland 7 месяцев назад

      @@yuzaR-Data-Science Thank you for your replay, I have a 10 independent variables, all of them are numeric, so there is no subcategory. I don't know what to put in the intercept and estimate... ie I have a var named lnepu , I don't understand what to put in intercept and estimate when I call the function cool QR: lnepu

    • @yuzaR-Data-Science
      @yuzaR-Data-Science  7 месяцев назад +1

      oh, don't worry about those two when the rest is running. they are only for the labels, last part of the function, and are just a peace of text you want on the x-axis of the plot. numeric predictors are fine, like the predictor "age" in the video. So, similarly to "age":
      cool_QR_plot("age", "age = 0", "increasing age")
      this should work:
      cool_QR_plot("lnepu", "lnepu = 0", "increasing lnepu")

  • @HenriqueSantos-xd1eg
    @HenriqueSantos-xd1eg 9 месяцев назад

    Hello. Do you want to make a video about tidyclust?