Michael T. Gastner's Quantitative Reasoning
Michael T. Gastner's Quantitative Reasoning
  • 37
  • 153 828
Introduction to Data Science: Stepwise Regression
Tutorial for Yale-NUS course 'Introduction to Data Science'.
Textbook: D. Diez et al. (2019). 'OpenIntro Statistics' (4th ed., OpenIntro). Available at www.openintro.org/book/os/
Analysing George W. Bush's approval ratings:
R code: www.michaelgastner.com/intro_to_data_science/bush_approval.R
Supplementary data: www.michaelgastner.com/intro_to_data_science/bush_approval.csv
Analysing Ebay auctions:
R code: www.michaelgastner.com/intro_to_data_science/mario.R
Supplementary data: www.michaelgastner.com/intro_to_data_science/mario.csv
Final quiz answer: 4
Переглядів: 430

Відео

R Tutorial 36: Debugging for-loops
Переглядів 4,5 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. For the code in this video, see transcript at: michaelgastner.com/R_for_QR/ Adjust your UA-cam settings to view video with HD quality and closed captions.
R Tutorial 35: for-loops
Переглядів 1,3 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. Derivation of the probabilities of the number of suits in 5 random poker cards: math.stackexchange.com/questions/224974/probability-for-suits-in-5-card-poker-hand. Link to Nicholas Metropolis, "The Beginning of the Monte Carlo Method": library.lanl.gov/cgi-bin/getfile?15-12.pdf. Adjust your UA-cam settings to view video with HD quality and closed captions. ...
R Tutorial 34: Vectors with Repeating Elements
Переглядів 8943 роки тому
Yale-NUS Quantitative Reasoning 2020. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 33: Setting the Seed of the Random Number Generator
Переглядів 2,3 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. Mersenne Twister paper: www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/mt.pdf. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 32: Random Permutations and Random Samples
Переглядів 1,6 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 31: Making Predictions on the Basis of a Linear Model
Переглядів 2 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. Download NHANES data from michaelgastner.com/data_for_QR/body_measurements.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 30: Extracting Information about a Linear Model
Переглядів 1,9 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. Download NHANES data from michaelgastner.com/data_for_QR/body_measurements.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 29: Fitting a Linear Model
Переглядів 3,8 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. Download NHANES data from michaelgastner.com/data_for_QR/body_measurements.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 28: Calculating Correlation Coefficients with R
Переглядів 40 тис.3 роки тому
Yale-NUS Quantitative Reasoning 2020. Download NHANES data from michaelgastner.com/data_for_QR/body_measurements.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 27: Visual Comparisons of Data with a Normal Model
Переглядів 1,3 тис.4 роки тому
Yale-NUS Quantitative Reasoning 2020. Download body weight data from michaelgastner.com/data_for_QR/nhanes_dvvb_ch5.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 26: Computations Related to Normal Models
Переглядів 1,5 тис.4 роки тому
Yale-NUS Quantitative Reasoning 2020. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 25: z-scores with R
Переглядів 13 тис.4 роки тому
Yale-NUS Quantitative Reasoning 2020. Download 2012 Olympic heptathlon data from michaelgastner.com/data_for_QR/hept2012.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 24: Re-expression with R
Переглядів 1 тис.4 роки тому
Yale-NUS Quantitative Reasoning 2020. Download CEO compensation data from michaelgastner.com/data_for_QR/forbes500_ceo_comp.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 23: Multi-variable Scatter Plots and Line Charts
Переглядів 11 тис.4 роки тому
Yale-NUS Quantitative Reasoning 2020. Download GDP data from michaelgastner.com/data_for_QR/gdp_usa_ussr.csv. Adjust your UA-cam settings to view video with HD quality and closed captions. Transcript available at: michaelgastner.com/R_for_QR/
R Tutorial 22: Scatter Plots and Line Charts
Переглядів 1,5 тис.4 роки тому
R Tutorial 22: Scatter Plots and Line Charts
R Tutorial 21: Multipanel Plots
Переглядів 1,9 тис.4 роки тому
R Tutorial 21: Multipanel Plots
R Tutorial 20: aggregate()
Переглядів 1,4 тис.4 роки тому
R Tutorial 20: aggregate()
R Tutorial 19: which() Indices are TRUE?
Переглядів 1,2 тис.4 роки тому
R Tutorial 19: which() Indices are TRUE?
R Tutorial 18: Missing Values (NA)
Переглядів 2,6 тис.4 роки тому
R Tutorial 18: Missing Values (NA)
R Tutorial 17: Exporting a Data Frame to CSV
Переглядів 13 тис.4 роки тому
R Tutorial 17: Exporting a Data Frame to CSV
R Tutorial 16: Exporting Graphics to a File
Переглядів 1,8 тис.4 роки тому
R Tutorial 16: Exporting Graphics to a File
R Tutorial 15: Histograms
Переглядів 1,5 тис.4 роки тому
R Tutorial 15: Histograms
R Tutorial 14: Box Plots
Переглядів 1,4 тис.4 роки тому
R Tutorial 14: Box Plots
R Tutorial 13: Summary Statistics in R
Переглядів 1,2 тис.4 роки тому
R Tutorial 13: Summary Statistics in R
R Tutorial 12: Bar Charts
Переглядів 1,1 тис.4 роки тому
R Tutorial 12: Bar Charts
R Tutorial 11: Tables
Переглядів 1,1 тис.4 роки тому
R Tutorial 11: Tables
R Tutorial 10: Counting TRUE values in logical vectors
Переглядів 1,5 тис.4 роки тому
R Tutorial 10: Counting TRUE values in logical vectors
R Tutorial 09: Logical Operators
Переглядів 1,7 тис.4 роки тому
R Tutorial 09: Logical Operators
R Tutorial 06: Extracting Values from Data Frames
Переглядів 16 тис.4 роки тому
R Tutorial 06: Extracting Values from Data Frames

КОМЕНТАРІ

  • @STEPHENKWAKUAZONGO
    @STEPHENKWAKUAZONGO Місяць тому

    pls can i get your titanic project

    • @YaleNUSQuantitativeReasoning
      @YaleNUSQuantitativeReasoning Місяць тому

      Thank you for your message. I believe I used this file for the Titanic data: michaelgastner.com/data_for_QR/titanic.csv. Please let me know if it works for you.

  • @ramoda13
    @ramoda13 8 місяців тому

    nice video

  • @rfb8499
    @rfb8499 11 місяців тому

    This is very helpful. Thank you, Michael!

    • @michaelgastner
      @michaelgastner 9 місяців тому

      You are welcome. I am glad you found it helpful.

  • @Minely182
    @Minely182 Рік тому

    The best tutorial I have found. I am taking the complete course. Thanks again.

    • @michaelgastner
      @michaelgastner Рік тому

      Thank you, @Minely182! I am glad to hear that you find the tutorial helpful.

  • @Minely182
    @Minely182 Рік тому

    I would appreciate more tutorial lessons, please.

    • @michaelgastner
      @michaelgastner Рік тому

      Thank you, @Minely182, for your interest in more tutorial lessons. I truly appreciate your request. While I am not currently working on new tutorials for this series of tutorials, I may create a new series in the future.

  • @AnthonyLopez-di5vv
    @AnthonyLopez-di5vv Рік тому

    "Unfortunately, the answer is no...a function called 'scale()', which returns the zed scores, but not as a vector" ok, but you can just convert the scores into a vector with a single line of code. e.g.: ua-cam.com/video/YLWbtw766mA/v-deo.html

    • @michaelgastner
      @michaelgastner Рік тому

      I agree, @AnthonyLopez-di5vv! However, in this series of tutorials, I am deliberately keeping things simple for beginners who have not encountered matrices and may, therefore, get confused about the output.

  • @SabiFu
    @SabiFu Рік тому

    Why does my exported csv have all columns in-line like this in Excel: 8,"UA-cam",NA,NA,NA instead of neat tables like yours?

    • @michaelgastner
      @michaelgastner Рік тому

      Thank you for reaching out. It is difficult to diagnose the issue without more information about your data and the steps you followed. However, here are a few general suggestions that might help: (1) Double-check the delimiter. Is it a comma? (2) Check for special characters that might trip up R or Excel. (3) Does the file start with a row that is not meant to be interpreted as column names?

    • @SabiFu
      @SabiFu Рік тому

      @@michaelgastner ​ hey, thanks for the reply! It's not a problem with the file, it's a problem with excel. Sure, I can go to Data > import and then go through all the steps of importing csv file with all the delimiters and such and it will look as it should. But in your video you simply clicked on it and it already formatted it properly. How did you set up excel to do that?

  • @terfand
    @terfand Рік тому

    Thank you Michael

  • @MadhusudhanAdhikari
    @MadhusudhanAdhikari Рік тому

    Super cool way of teaching. Nice and smooth

    • @michaelgastner
      @michaelgastner Рік тому

      I appreciate your positive feedback. Thanks for watching!

  • @Minely182
    @Minely182 Рік тому

    Thanks to these videos I am learning more than in one week course.

  • @Minely182
    @Minely182 Рік тому

    Thank you so much. You are so concisce. I am learning every day with your tutorials.

  • @Amazonkon
    @Amazonkon Рік тому

    Thank you!!!

  • @CP-rh1dr
    @CP-rh1dr Рік тому

    The code doesnt work :(

    • @michaelgastner
      @michaelgastner Рік тому

      Thank you for your comment. I'm sorry to hear that the code didn't work for you. Could you please provide more details on what you tried and what exactly didn't work? Were there any error messages generated by R? This will help me better understand the issue and find a solution for you.

  • @quicktemper
    @quicktemper Рік тому

    How to export data that wasn't originally imported from a CSV, but instead came from an API?

    • @YaleNUSQuantitativeReasoning
      @YaleNUSQuantitativeReasoning Рік тому

      A Google search brings up some tutorials (e.g. www.dataquest.io/blog/r-api-tutorial/, www.r-bloggers.com/2015/11/accessing-apis-from-r-and-a-little-r-programming/ and www.earthdatascience.org/courses/earth-analytics/get-data-using-apis/API-data-access-r/).

  • @feeldulfo9387
    @feeldulfo9387 Рік тому

    Really helpful series of tutorial for our Data Science class!!! Thank you very much!!!

    • @michaelgastner
      @michaelgastner Рік тому

      Thank you for kind words. I am glad to hear that you find the tutorials useful.

  • @annabondar800
    @annabondar800 Рік тому

    Your tutorials are gorgeous, everything is straightforward and clear, thank you!!!

    • @michaelgastner
      @michaelgastner Рік тому

      Thank you. I am glad to hear that you enjoy the tutorials.

  • @annabondar800
    @annabondar800 Рік тому

    clear and concise explanation, perfect for beginners in R, thank you a lot.

  • @jannatulmaowa5017
    @jannatulmaowa5017 Рік тому

    cor(bm) is not working. Should I install any library?

    • @michaelgastner
      @michaelgastner Рік тому

      Have you moved body_measurements.csv to your project directory? Have you assigned the data frame to a variable named bm? If the error persists, what is the error message?

  • @rodrigoarro7803
    @rodrigoarro7803 2 роки тому

    thanks

  • @djibrilkonate5132
    @djibrilkonate5132 2 роки тому

    Thank for video very helpful. I need textbook

    • @michaelgastner
      @michaelgastner 2 роки тому

      Our course used this book: www.amazon.com/Stats-Models-Richard-D-Veaux/dp/0321986490.

  • @franc7570
    @franc7570 2 роки тому

    thank you so much for creating this tutorial

  • @haimkichik
    @haimkichik 2 роки тому

    Thank you 3 times!

  • @rwaewae
    @rwaewae 2 роки тому

    how can we combine summary of statistics and correlation plot in one diagram. thanx

  • @hectormiguelvinuezabarroso3967
    @hectormiguelvinuezabarroso3967 2 роки тому

    Thank you, the explanation was excellent, now I got the big picture of the function.

  • @diegochavez2705
    @diegochavez2705 2 роки тому

    Excelente!!

  • @astharajesolanki3805
    @astharajesolanki3805 2 роки тому

    thank youu for the tutorials!!

  • @jackx7382
    @jackx7382 2 роки тому

    Thank you. Such a clear, well-structured explanation with a range of useful examples. Appreciated on many levels.

    • @michaelgastner
      @michaelgastner 2 роки тому

      Thank you for your kind words. I am glad you find the video useful.

  • @isahhamisu608
    @isahhamisu608 2 роки тому

    A very wonderful and presentation for both teachers and students👍

    • @michaelgastner
      @michaelgastner 2 роки тому

      Thank you very much for your kind words.

  • @berni1602
    @berni1602 3 роки тому

    Thank you so much, I was looking for exactly this. Very well explained, I'd love to know what's the other method you mention to make it in a more elegant way.

  • @JulieOrlandoSLI
    @JulieOrlandoSLI 3 роки тому

    Thank you for producing and publicly posting these tutorial videos! I teach a graduate applied stats lab in psychology, and we decided to start slowly dipping our toes into R this year (starting off with correlations only). Your videos have been the most straight-forward and easy-to-understand introduction I've found. I feel like I'm ready to start experimenting on my own, not completely lost and overwhelmed by new code.

  • @anisawak3584
    @anisawak3584 3 роки тому

    Hi Sir, can we overlay the boxplot with point plot (normal plot)?

    • @YaleNUSQuantitativeReasoning
      @YaleNUSQuantitativeReasoning 3 роки тому

      If you want to show the individual points that are summarised by the box plot, you can use stripchart(), see stackoverflow.com/questions/23675735/how-to-add-boxplots-to-scatterplot-with-jitter

  • @sia_ibk
    @sia_ibk 3 роки тому

    Hi. Please I exported data using the write.csv function, but the table gets truncated. The original table has 4,073,561 rows, but the csv file has about 700,000 rows. Please how do I rectify this?

    • @michaelgastner
      @michaelgastner 3 роки тому

      I cannot reproduce your problem. I have just tested this minimal working example: ```{r} dfr <- data.frame(random_digits = sample(0:9, 1e7, replace=TRUE)) write.csv(dfr, "very_long.csv") ``` It creates a CSV file with 10 million rows (plus one row for the header). Perhaps your spreadsheet software (Excel?) cannot load all rows, but there is no limitation in R that there cannot be more than 700,000 rows in an exported CSV file.

  • @infoplus25
    @infoplus25 3 роки тому

    Thank You so much for such clear explanation..

  • @fadhil376
    @fadhil376 3 роки тому

    nice video. But how to export the median value for the three boxplot sir?

    • @YaleNUSQuantitativeReasoning
      @YaleNUSQuantitativeReasoning 3 роки тому

      You can use aggregate() as explained in lesson 20 (ua-cam.com/video/5j8XR0fvRD0/v-deo.html): aggregate(Sepal.Width ~ Species, data = iris, FUN = median)

    • @fadhil376
      @fadhil376 3 роки тому

      @@YaleNUSQuantitativeReasoning it helps me a lot. Thank you sir

  • @juako384
    @juako384 3 роки тому

    Thanks 👏🏼

  • @mahyaf914
    @mahyaf914 3 роки тому

    Thank you so very much for these tutorials! They helped me a lot !!

  • @pongthanglaishram9413
    @pongthanglaishram9413 3 роки тому

    I can rest in peace now.

    • @michaelgastner
      @michaelgastner 3 роки тому

      Glad to hear my video has promoted world peace

  • @soulwriterqa2363
    @soulwriterqa2363 3 роки тому

    Thank you for this very clear explanation. If I want to add 2 labels to Y axis, for eg, "GDP of US, GDP of USSR" how do I do it.

    • @michaelgastner
      @michaelgastner 3 роки тому

      Usually, the y-axis label would summarise both data sets (e.g. "GDP") and a legend (e.g. different colours for different countries) would be used, as shown at 3:45.

    • @soulwriterqa2363
      @soulwriterqa2363 3 роки тому

      @@michaelgastner thank you for the reply. I wanted to clarify, if after using points function, is there any way to update the Y axis labels. I am fairly new to R, and was plotting height and weight on Y axis, with age on X axis. So after using the points function for weight, how do i update the y axis labels to show "weight,height". I am doing the legend as well, but not sure on how to show it in the y axis

    • @michaelgastner
      @michaelgastner 3 роки тому

      @@soulwriterqa2363 You can change the y-axis label with the argument ylab in plot(). For more complex layouts, there is also a function axis().

  • @killerkamatis2243
    @killerkamatis2243 3 роки тому

    how about the pnorm function?

    • @michaelgastner
      @michaelgastner 3 роки тому

      Can you please give more context?

    • @mayurdhage2478
      @mayurdhage2478 3 роки тому

      pnorm calcaulates the probability(area) for a selected value

  • @gyuchoi8272
    @gyuchoi8272 3 роки тому

    Thank you for the video!

  • @pega-ace6719
    @pega-ace6719 3 роки тому

    Thank you for teaching us how to debug Prof, it was very educational. :)

  • @pega-ace6719
    @pega-ace6719 3 роки тому

    Thank you for the video Prof! I know you said humans don't like doing repetitive tasks, so I hope making these videos aren't a huge burden for you. (Writing these comments doesn't get tiring, I hope you appreciate them!) :)

    • @michaelgastner
      @michaelgastner 3 роки тому

      Thank you for the positive feedback!

    • @pega-ace6719
      @pega-ace6719 3 роки тому

      Hello Professor Gastner, It has been a delightful 12 weeks of QR here in Yale-NUS. Thank you so much for responding to me here, on this last set of videos. I was deeply saddened when I was informed that there would be no more R tutorials, nothing more that we could learn from you for this course. These video tutorials have been unmeasurably useful to not just me, but many of my fellow colleagues here in this course for learning how to code in Rstudio. If I had to learn from anyone for any other statistics and coding courses here in Yale-NUS, it would be a pleasure to once again hear your voice in another set of videos. Once again, thank you so much for all the educational videos Prof, and I hope I'll see you around someday. To everyone else who I know is probably reading this (lol), make sure to hit that like button and subscribe to Yale-NUS Quantitative Reasoning channel, you won't find a better set of resources elsewhere. Well, this has been a fun ride. Peace out, and have a nice day! :)

  • @pega-ace6719
    @pega-ace6719 3 роки тому

    Thanks for the vid Prof Gastner, it was very educational :)

  • @annyu-anchen444
    @annyu-anchen444 3 роки тому

    "R complains that it 'cannot take a sample larger than the population when replace = FALSE'🤣🤣🤣 Prof Gastner is so cute!

  • @pega-ace6719
    @pega-ace6719 3 роки тому

    Wow! Thank you for seeding this knowledge in my mind Prof. Thank you! :)

  • @pega-ace6719
    @pega-ace6719 3 роки тому

    What a great educational lesson, thank you so much Professor Gastner! Can't wait to learn more in QR with you. :)

  • @pega-ace6719
    @pega-ace6719 3 роки тому

    Thank you for the helpful video Professor Gastner! :)

  • @pega-ace6719
    @pega-ace6719 4 роки тому

    Very nice video, thank you for posting. :)

  • @pega-ace6719
    @pega-ace6719 4 роки тому

    Thank you for the video lesson Prof Gastner! I had fun learning today once again. :)

  • @pega-ace6719
    @pega-ace6719 4 роки тому

    Hello Professor Gastner, nice to hear you again after the break, I missed these QR videos. Thanks for continuing to teach us how to code with RStudio. :)