Excellent! I just say and answered this comment, Jean! Thanks a lot for such a generous feedback! I hope other videos would also be useful for you. Warm welcome to my channel! :)
Thank you! That's what I was looking for! I have a statistical analysis to do and this will help me to present it in a simple, precise, and informative way.
I came across this UA-cam channel by chance. How AMAZING your channel is!. Sunmarizing such an important package in 12 minutes (in FULL DETAILS), with such an easy and confident way is absolute brilliance. I'm definitely gonna watch every single video in your channel. From the bottom of my heart, thank you for your great work.
Thanks a ton for such a positive feedback! gtsummary is certainly one of my favourite packages and is incredibly useful in everyday work! I hope you like other videos on other packages too! :) Thanks for watching!
Your videos are always amazing. I've been using the gtsummary package but hadn't explored the tbl-merge function. Absolutely love it. Will explore more
@@yuzaR-Data-Science pardon me, but i would like to ask you a question. If i have a set of categorical variables in my data and i'm trying to conduct a logistic regression using a binary outcome on Y. Is it even possible to have a decent model following such an approach?
Hello colleague, I also work at the uni. Glad it helped! Other videos might be useful too, because until now, I only have done videos on things I use every day. Thank you for watching!
@@yuzaR-Data-Science hello! thanks for replying. i have looked at your blog and some of your other videos. theres some really good content that will help me with my R studio journey.
Glad it was helpful! I also love gtsummary and use it everyday. Hope you find the rest of my content useful as well. Thanks for your nice feedback and for watching!
i have learnt alot in the video, thanks alot teacher i would also want to know how possible it is to add superscripts indicating the statistical difference across and along the table. this is important to me thank you Yury
Yeah, it's definitely possible, either with gtsummary, or with gt. I did that once, but couldn't find the script. Have a look at this one: stackoverflow.com/questions/74555622/gtsummary-how-to-add-caption-for-specific-variables Thank you for watching!
Really this video helped me a lot, really amazing for the beginners like me. Please if you can make more videos for more functions that do tables in R like summary_factorlist and others
Love these videos! Question: We loose the light gray outlines that separate the variables in the table when saving from R to PNG/word. Is there a way to keep and edit these in the final product?
Not that I know of from the top of my head. But the {gt} package has enormous functionality, so I guess you just google the problem and, if it's possible, you'll find a solution quickly. Thanks for your feedback and thank you for watching!
@@yuzaR-Data-Science Thanks again! One solution that worked for me was converting and saving my table with ... %>% as_gt() %>% gt::gtsave(filename = ".png")
Hi! Thank you so much for the video. I am trying to use add_global_p() to a linear model with interactions to a lm with interactions, but it is giving me error. I was wondering what I could do
Thank you for the great video! After updating R i now get slightly different Q1 and Q3 values in some of my variables. I found out it might be due to a change in the method gtsummary uses to calculate the quartiles. Method 7 and method 8.. Is there a way to change this back to what it was before?
Glad it helped! I don't know about the methods switch after update. But I know that the author of the package is responsive and you can ask him via github or twitter or any other way. He'll give much better answer.
Hi, thanks soo much for your valuable feedback. Sure, I share scripts of the videos, which include code and explanations with the members of the channel. Members just go to the community tab and ask for it. Cheers :)
Thanks man! Hope the rest of the videos is also useful! I send the code to the members of the channel, thus, join if you wish. It's of coarse not necessary, because youtube is free and you can just stop the video at any moment and write off the code. Kind regards!
it works in the html very good.pdf, I didn't even try, because it was never needed. and you can export the tables in word or png format. for example become part of the paper. so, the work-around would be to produce a word document with the table of your choise and then create a pdf out of it. cheers
for me PDF or PNG makes no difference, because it's not editable, but PDF can not be added to any other document, while PNG can be converted to PDF easily. cheers
@@yuzaR-Data-Science Thanks. That makes sense. But it would be extremely convenient to directly create tables in pdf file. It saves time to copy and paste when we write academic papers. That's why we use Rmarkdown or Quarto markdown. We integrate the codings and literature writings. So we don't need to re-copy and paste when there are any changes or data updates on the tables.
Hello Sir. Is it possible to display only one category of the dichotomous variable provided with the "by" parameter. For example I only want to display the percentage of people who said Yes (sport-Oui). library(gtsummary) library(questionr) data("hdv2003") hdv2003 %>% tbl_summary( include = c("sexe", "relig", "relig"), by = "sport", percent = "row", statistic = all_categorical() ~ "{p}%" ) . The objective is that I would subsequently like to combine several tables where in the column I will have the percentages of several variables.
Yes it’s possible. Check out the arguments of the Funktion please yourself, I am away from my computer for a week. And you can combine several tables easily via tbl_merge
sure, it's somewhere inside of the video: - label - changes variable names - missing_text - changes the name of the missing data - modify_header(list( label ~"**Model Outcome**", estimate ~ "**Treatment Coef.**" )) etc. if it's not what you want, just rename things in your table and use gtsummary on top of it
@@kennethgottfredsen767 I think it is, I never particularly needed it, but I think that {gt} packages can make it happen. {gtsummary} is build on top of gt, so, you'll most likely find some options online. let me know whether you'll be able to find something on that. it will be useful for the whole community here in comments.
How helpful is this to use in basic exploratory data analysis representation ? Most of the times, i dont need to publish any stat summary, but just a basic table/pivot table. Does this have table transformation to pivot table ?
Sir, can you please make a video to make a table for experimental designs like split-plot analysis? I want some help to write the mean grouping analysis from the results to table, this includes superscripting the grouping letters on the mean values.
thanks for your request! I'll put it on the list for sure! But since I already planned to make lots videos on other topics, the video on split-plot might take a while.
can u explain this, how i handle it with an seperate outcome column? Because when i build a faktorcombination with the outcome, then plto table. It seems that the package just use the count, not die outcome. The outcome gets a seperate summary.. what is complete useless.
sorry, I don't know what do you mean by separate outcome. if you want to do a survival analysis, then look at this: www.danieldsjoberg.com/gtsummary/reference/tbl_survfit.html
@@yuzaR-Data-Science im new in R. I have my obersvation column and i have my grouping column. Now i want to know the percentage of the groups based on my oberservation, not on counted of the group column. I dont know hoe i should fix this otherwise than building a df with interact and acast. But this isnt pritty nice. Maybe there is an option in the tbl_summary command. My grouping column have charakters not numeric. the numerics are in the oberservation column
I still struggle to understand what you want to calculate. If you have numeric variable, how and why do you want percentage ... of what? you can compare groups and get average of similar of your numeric column. Or you can count groups in categorical column, but you can't get percentage of a numeric column.
you don't copy them into word, you extract them, which is later in the video fancy_table %>% as_flex_table() %>% save_as_docx(path = "fancy_table.docx")
I still havent got this.. tbl_summary(DescripCLSA15T, by = SROH)%>% add_p()%>% add_overall()%>% add_stat_label( label = all_continuous()~"Mean(sd)" This is one such code which is working. How do I export this table to a word document. Kindly help..Pardon me for the inconvenience
sure, save your code which worsk as a "fancy_table", then export fancy_table % add_p()%>% add_overall()%>% add_stat_label( label = all_continuous()~"Mean(sd)" fancy_table %>% as_flex_table() %>% save_as_docx(path = "fancy_table.docx") Let me know whether this worked. And by the way watch the video completely to the end, because the solution is in there ;)
actually, yes. but it of coarse depends on the complexity. start with checking out this function "tbl_svysummary", but then browse in internet for more survey functions from gtsummary.
Great suggestion! I definitely plan to go into modelling and make a few videos on deep learning in R. But since I want to make videos on visualisation first and then on modelling, including all the other classical models first, the DL videos would take a while. Until then, if you still don't know the StatQuest youtube channel, check it out. This channel make tons of videos about them, less with programming, but more for an intuitive understanding. hope that helps. and thank you for watching!
@@yuzaR-Data-Science which is I already did and it was so entertainingly informative. Thanks to him, I was able to create an LSTM function for time series forecasting similar to nnetar from forecast package.
thanks :) you probably only subscribed. I send the code to people, who joined. It's a different button, where people support me monthly with a small pay. but you don't need to do that at all, you just can pause the video and write down the code, it's even better for a learning purposes to tipp out the code yourself. kind regards
hey Arsène, the technical issues are solved, I splitted the code into two blog-posts: yuzar-blog.netlify.app/posts/2022-10-31-gtsummary/ yuzar-blog.netlify.app/posts/2022-11-25-gtsummary2/ Enjoy!
I have no more words to say how useful your videos are.
Have a great day, Sir.
Glad it is useful! Cheers
Thanks Dr.
I found this after your coment yesterday on linkedin.
Very clear!
Excellent! I just say and answered this comment, Jean! Thanks a lot for such a generous feedback! I hope other videos would also be useful for you. Warm welcome to my channel! :)
Thank you! That's what I was looking for! I have a statistical analysis to do and this will help me to present it in a simple, precise, and informative way.
Glad it was helpful!
Your videos and blog are extremly helpful for me as a psych student working in research. Thank you!
Glad it's useful for more then me ;) Thanks for your nice feedback, it means a lot to me! And motivates to continue. And thanks for watching!
I came across this UA-cam channel by chance. How AMAZING your channel is!.
Sunmarizing such an important package in 12 minutes (in FULL DETAILS), with such an easy and confident way is absolute brilliance.
I'm definitely gonna watch every single video in your channel. From the bottom of my heart, thank you for your great work.
Thanks a ton for such a positive feedback! gtsummary is certainly one of my favourite packages and is incredibly useful in everyday work! I hope you like other videos on other packages too! :) Thanks for watching!
Your videos are always amazing. I've been using the gtsummary package but hadn't explored the tbl-merge function. Absolutely love it. Will explore more
Glad it's useful! Thanks you for nice feedback and for watching! If you think, it will be useful for others, feel free to share the video. Cheers
I love your videos, very clear, fun to watch and most importantly we learn so much. Thank you so much
Happy to hear that! Thanks for your feedback! I look forward to produce more content next year.
@@yuzaR-Data-Science i look forward to it !
@@staedtler8479 👍
@@yuzaR-Data-Science pardon me, but i would like to ask you a question. If i have a set of categorical variables in my data and i'm trying to conduct a logistic regression using a binary outcome on Y. Is it even possible to have a decent model following such an approach?
@@staedtler8479 if you have 0 and 1 as a response variable, then yes, you can do logistic regression. all the other variables are then predictors.
This is amazing, ive been working on a university project in r for days now. your video has helped me so much. thank you sir!
Hello colleague, I also work at the uni. Glad it helped! Other videos might be useful too, because until now, I only have done videos on things I use every day. Thank you for watching!
@@yuzaR-Data-Science hello! thanks for replying. i have looked at your blog and some of your other videos. theres some really good content that will help me with my R studio journey.
enjoy ;)
awesome presentation. Big fan of the gtsummary package and now fan of your channel, kudos!
Much appreciated! And thanks for watching!
One of the best videos of all time
Thanks a ton! :) Glad you enjoyed it. My other videos might also be useful, if you liked this one. Cheers
by far the best video I have seen on gtsummary. And thanks for those Uni/multi var results, which I had requested.
Most welcome 😊 Thanks for cool request and especially for watching!
Be blessed sir. I can't lie, I always come here to get packages. ☺ Thank you sir for the clear explanations.
Always welcome!
Love the editing. Well done! Great content too!
Thanks for feedback and for watching!
Thank you for this great video. Can you please share again the script on your channel please? Have a nice day!
just updated the link for 50 PDFs, this one is there too. Enjoy! ;)
Wow!! I am speechless how useful this is.!!!
Glad it was helpful! I also love gtsummary and use it everyday. Hope you find the rest of my content useful as well. Thanks for your nice feedback and for watching!
i have learnt alot in the video, thanks alot teacher
i would also want to know how possible it is to add superscripts indicating the statistical difference across and along the table. this is important to me
thank you Yury
Yeah, it's definitely possible, either with gtsummary, or with gt. I did that once, but couldn't find the script. Have a look at this one: stackoverflow.com/questions/74555622/gtsummary-how-to-add-caption-for-specific-variables
Thank you for watching!
Nice work. Have shared this video with a few friends, :)
Thanks for sharing!
Thank for the nice editting and informative video.
You are very welcome! Thanks you for watching!
Really this video helped me a lot, really amazing for the beginners like me.
Please if you can make more videos for more functions that do tables in R like summary_factorlist and others
Thanks 🙏 I’ll see whether I’ll find enough useful material for another video.
Congrats. Keep on!
Thanks! I'll do my best ;)
Love these videos! Question: We loose the light gray outlines that separate the variables in the table when saving from R to PNG/word. Is there a way to keep and edit these in the final product?
Not that I know of from the top of my head. But the {gt} package has enormous functionality, so I guess you just google the problem and, if it's possible, you'll find a solution quickly. Thanks for your feedback and thank you for watching!
@@yuzaR-Data-Science Thanks again! One solution that worked for me was converting and saving my table with ... %>% as_gt() %>% gt::gtsave(filename = ".png")
cool, mate! thanks for sharing! It'll be useful for the community and I'll use it too.
Hi! Thank you so much for the video. I am trying to use add_global_p() to a linear model with interactions to a lm with interactions, but it is giving me error. I was wondering what I could do
That actually works on my computer:
library(gtsummary)
m % add_global_p()
so, probably some packages need an update
Thank you for the great video!
After updating R i now get slightly different Q1 and Q3 values in some of my variables. I found out it might be due to a change in the method gtsummary uses to calculate the quartiles. Method 7 and method 8..
Is there a way to change this back to what it was before?
Glad it helped! I don't know about the methods switch after update. But I know that the author of the package is responsive and you can ask him via github or twitter or any other way. He'll give much better answer.
@yuzaR-Data-Science i will try that, thank you
@@thomaswiggersmller8983 👍
I really love your videos. Thnks for all this valuable content and guidelines. Do you have a place where we can find your scripts from your videos?
Hi, thanks soo much for your valuable feedback. Sure, I share scripts of the videos, which include code and explanations with the members of the channel. Members just go to the community tab and ask for it. Cheers :)
Great Job!! Thank you, sir.
Glad it was helpful! Thanks for watching!
This takes me two days to do in SPSS. Thank you for saving my time. You just won yourself a subscriber! How do I get the code?
Thanks man! Hope the rest of the videos is also useful! I send the code to the members of the channel, thus, join if you wish. It's of coarse not necessary, because youtube is free and you can just stop the video at any moment and write off the code. Kind regards!
p %>%
+ tbl_summary(by = ptys)
Error: 'yaml_body' is not an exported object from 'namespace:xfun'
Try to install the newest version of the 'xfun' package. Update all the other packages, your R and RStudio. Restart everything, your PC and RStudio
Could you please show how to make the settings work for pdf file? Many settings do not work in pdf file output.
it works in the html very good.pdf, I didn't even try, because it was never needed. and you can export the tables in word or png format. for example become part of the paper. so, the work-around would be to produce a word document with the table of your choise and then create a pdf out of it. cheers
@@yuzaR-Data-Science Thanks. But it would be better if it can create a nice pdf table directly.
for me PDF or PNG makes no difference, because it's not editable, but PDF can not be added to any other document, while PNG can be converted to PDF easily. cheers
@@yuzaR-Data-Science Thanks. That makes sense. But it would be extremely convenient to directly create tables in pdf file. It saves time to copy and paste when we write academic papers. That's why we use Rmarkdown or Quarto markdown. We integrate the codings and literature writings. So we don't need to re-copy and paste when there are any changes or data updates on the tables.
Is it possible that alongwith P value we also have Chi Square Statistics value & df value etc in GtSummary table..if yes what's the code
Not straight forward unfortunately. You could create a data frame and use flextable and the export it in word or png
Hello Sir. Is it possible to display only one category of the dichotomous variable provided with the "by" parameter. For example I only want to display the percentage of people who said Yes (sport-Oui). library(gtsummary)
library(questionr)
data("hdv2003")
hdv2003 %>%
tbl_summary(
include = c("sexe", "relig", "relig"),
by = "sport",
percent = "row",
statistic = all_categorical() ~ "{p}%"
) . The objective is that I would subsequently like to combine several tables where in the column I will have the percentages of several variables.
Yes it’s possible. Check out the arguments of the Funktion please yourself, I am away from my computer for a week. And you can combine several tables easily via tbl_merge
@@yuzaR-Data-Science Thank you
I found modify_column_hide function that can do it
you are very welcome!
cool! thanks for posting "modify_column_hide()" here, it will be beneficial for the whole community. glad, you could solve this one!
Amazing video. Thank you.
Glad you liked it! Thanks for watching!
Can i rename all the text in the table. Or Can i only rename the labels?
sure, it's somewhere inside of the video:
- label - changes variable names
- missing_text - changes the name of the missing data
- modify_header(list(
label ~"**Model Outcome**",
estimate ~ "**Treatment Coef.**"
))
etc.
if it's not what you want, just rename things in your table and use gtsummary on top of it
@@yuzaR-Data-Science What about the background color in the table, is that also customizable?
@@kennethgottfredsen767 I think it is, I never particularly needed it, but I think that {gt} packages can make it happen. {gtsummary} is build on top of gt, so, you'll most likely find some options online. let me know whether you'll be able to find something on that. it will be useful for the whole community here in comments.
@@yuzaR-Data-Science Yes it is possible! I did find a video on this matter. I'll send you the link once im done testing my code.
Thank you so much for your video !!!!
You are welcome 🙏 thanks for watching!
How helpful is this to use in basic exploratory data analysis representation ? Most of the times, i dont need to publish any stat summary, but just a basic table/pivot table. Does this have table transformation to pivot table ?
of coarse! tbl_cross() function, or percentages with tbl_summary() for columns, rows or cells
@@yuzaR-Data-Science Thanks, will take a look into them
@@ambhat3953 you are welcome!
Hello. What was the code used to create the object "bm_table"? That is, the multivariate model? Thanks a lot, Sir
Yes, correct:
bm
@@yuzaR-Data-Science Thanks sir, awesome content 😃👍 Keep going!!
@@demigod4504 Will do. Thank you for watching!
Sir, can you please make a video to make a table for experimental designs like split-plot analysis? I want some help to write the mean grouping analysis from the results to table, this includes superscripting the grouping letters on the mean values.
thanks for your request! I'll put it on the list for sure! But since I already planned to make lots videos on other topics, the video on split-plot might take a while.
@@yuzaR-Data-Science No worries sir! Thank you!
@@kandanooldivya4763 👍
can u explain this, how i handle it with an seperate outcome column? Because when i build a faktorcombination with the outcome, then plto table. It seems that the package just use the count, not die outcome. The outcome gets a seperate summary.. what is complete useless.
sorry, I don't know what do you mean by separate outcome. if you want to do a survival analysis, then look at this: www.danieldsjoberg.com/gtsummary/reference/tbl_survfit.html
@@yuzaR-Data-Science im new in R. I have my obersvation column and i have my grouping column. Now i want to know the percentage of the groups based on my oberservation, not on counted of the group column. I dont know hoe i should fix this otherwise than building a df with interact and acast. But this isnt pritty nice. Maybe there is an option in the tbl_summary command. My grouping column have charakters not numeric. the numerics are in the oberservation column
I still struggle to understand what you want to calculate. If you have numeric variable, how and why do you want percentage ... of what? you can compare groups and get average of similar of your numeric column. Or you can count groups in categorical column, but you can't get percentage of a numeric column.
thank you for the great video :)
You are very welcome! Thanks for watching!
I am experiencing some difficulty in copying these tables into a word document... therefore, could you please help me in this ?
you don't copy them into word, you extract them, which is later in the video
fancy_table %>%
as_flex_table() %>%
save_as_docx(path = "fancy_table.docx")
I still havent got this..
tbl_summary(DescripCLSA15T, by = SROH)%>%
add_p()%>%
add_overall()%>%
add_stat_label(
label = all_continuous()~"Mean(sd)"
This is one such code which is working. How do I export this table to a word document. Kindly help..Pardon me for the inconvenience
sure, save your code which worsk as a "fancy_table", then export
fancy_table %
add_p()%>%
add_overall()%>%
add_stat_label(
label = all_continuous()~"Mean(sd)"
fancy_table %>%
as_flex_table() %>%
save_as_docx(path = "fancy_table.docx")
Let me know whether this worked. And by the way watch the video completely to the end, because the solution is in there ;)
@@yuzaR-Data-Science Thank you so much. Amazing
@@praveenbhoopathi9487 you are very welcome! ;)
Is there a way I can do this for complex suvrey?
actually, yes. but it of coarse depends on the complexity. start with checking out this function "tbl_svysummary", but then browse in internet for more survey functions from gtsummary.
Awesome!
Thank you! Cheers!
Awesome 😁😁
Thanks!
How did u get mutivariable model?
Is the code below not part of the video?
bm
Great vid, sir! May I request you to create a video about deep learning in R?
Great suggestion! I definitely plan to go into modelling and make a few videos on deep learning in R. But since I want to make videos on visualisation first and then on modelling, including all the other classical models first, the DL videos would take a while. Until then, if you still don't know the StatQuest youtube channel, check it out. This channel make tons of videos about them, less with programming, but more for an intuitive understanding. hope that helps. and thank you for watching!
@@yuzaR-Data-Science which is I already did and it was so entertainingly informative. Thanks to him, I was able to create an LSTM function for time series forecasting similar to nnetar from forecast package.
nice! I love Josh Starmers channel.
@@yuzaR-Data-Science I really appreciate his work. Yours, as well. I hope we can collaborate in the future
Just awesome
Glad you liked it!
Can i export of csv or xlsx
I don't think so. May be with "gt" package. Please, let me know, when you figure it out. cheers
How to export tables into LaTeX?
Described here: www.danieldsjoberg.com/gtsummary/articles/rmarkdown.html
@@yuzaR-Data-Science Thanks.
@@denizgoktas1535 You are welcome! Thanks for watching!
God bless you!
Thanks 🙏
It was Amazing
Glad you liked it! ;) Thanks for watching!
Amazing
Thanks 🙏
amazing!! I have joined the channel...Please can you share the codes? it will be helpful while using the package
thanks :) you probably only subscribed. I send the code to people, who joined. It's a different button, where people support me monthly with a small pay. but you don't need to do that at all, you just can pause the video and write down the code, it's even better for a learning purposes to tipp out the code yourself. kind regards
Very good job. Please, the link oh the code
Thanks for watching! I have some technical issues with my blog / github. So, need to fix it soon. Please, check for new blog-articles later.
hey Arsène, the technical issues are solved, I splitted the code into two blog-posts:
yuzar-blog.netlify.app/posts/2022-10-31-gtsummary/
yuzar-blog.netlify.app/posts/2022-11-25-gtsummary2/
Enjoy!
@@yuzaR-Data-Science thank you very much Professor
Yep, this will probably blow my teachers mind lol
Plots and tables are all you need;)
> amscr1 % select(CFS, EVS, IHS, Resistance) %>%
+ tbl_summary(by = Resistance) %>%
+ bold_labels() %>%
+ add_n() %>%
+ add_overall() %>%
+ add_ci() %>%
+ add_n() %>%
+ add_difference(method = "test",
+ test = list(method = "odds.ratio",
+ conf.level = 0.95))
Error in add_difference(., method = "test", test = list(method = "odds.ratio", :
unused argument (method = "test")
I think you have to many argument inside of add_difference. Just google the function add_difference and learn about it more online. cheers
Be blessed sir. I can't lie, I always come here to get packages. ☺ Thank you sir for the clear explanations.
I am glad it's useful. Thanks for watching!
One of the best videos of all time
Thanks a ton! :) Glad you enjoyed it. My other videos might also be useful, if you liked this one. Cheers