Blog Archives

One-proportion and goodness of fit test (in R and by hand)

May 12, 2020
By
One-proportion and goodness of fit test (in R and by hand)

Introduction In R Data One-proportion test Assumption of prop.test() and binom.test() Chi-square goodness of fit test Does my distribution follow a given distribution? Observed frequencies Expected frequencies Observed vs. expected frequencies By hand One-proportion test Verification in R Goodness of fit test Verification in R Introduction In a previous article, I presented the Chi-square test of independence in R which is used to test the independence between two categorical variables. In this article, I show how...

Read more »

A package to download free Springer books during Covid-19 quarantine

April 25, 2020
By
A package to download free Springer books during Covid-19 quarantine

Introduction Installation Download all books at once Create a table of Springer books Download only specific books By title By author By subject Acknowledgments Introduction You probably already have seen that Springer released about 500 books for free following the COVID-19 pandemic. According to Springer, these textbooks will be available free of charge until at least the end of July. Following this announcement, I already downloaded a couple of statistics...

Read more »

COVID-19 in Belgium

March 30, 2020
By
COVID-19 in Belgium

Introduction Top R resources on Coronavirus Coronavirus dashboard for your own country Motivations, limitations and structure of the article Analysis of Coronavirus in Belgium A classic epidemiological model: the SIR model Fitting a SIR model to the Belgium data Reproduction number \(R_0\) Using our model to analyze the outbreak if there was no intervention More summary statistics Additional considerations Ascertainment rates More sophisticated models Modelling the epidemic trajectory using log-linear models Estimating changes...

Read more »

How to create a simple Coronavirus dashboard specific to your country in R

March 22, 2020
By
How to create a simple Coronavirus dashboard specific to your country in R

Introduction Top R resources on Coronavirus Coronavirus dashboard: the case of Belgium How to create your own Coronavirus dashboard Additional notes Data Open source Accuracy Coronavirus dashboard: the case of Belgium Introduction The Novel COVID-19 Coronavirus is the hottest topic right now. Every day, the media and newspapers share the number of new cases and deaths in several countries, try to measure the impacts of the virus on citizens...

Read more »

How to do a t-test or ANOVA for many variables at once in R and communicate the results in a better way

March 18, 2020
By
How to do a t-test or ANOVA for many variables at once in R and communicate the results in a better way

Introduction Perform multiple tests at once Concise and easily interpretable results T-test ANOVA To go even further Photo by Teemu Paananen Introduction As part of my teaching assistant position in a Belgian university, students often ask me for some help in their statistical analyses for their master’s thesis. A frequent question is how to compare groups of patients in terms of several quantitative continuous variables. Most of us...

Read more »

Top 5 R resources on COVID-19 Coronavirus

March 11, 2020
By
Top 5 R resources on COVID-19 Coronavirus

R Shiny apps Coronavirus tracker COVID-19 outbreak R packages {nCov2019} R code Analyzing COVID-19 outbreak data with R COVID-19 Data Analysis with {tidyverse} and {ggplot2} Data Photo by CDC The Coronavirus is a serious concern around the...

Read more »

How to perform a one sample t-test by hand and in R: test on one mean

March 8, 2020
By
How to perform a one sample t-test by hand and in R: test on one mean

Introduction Null and alternative hypothesis Hypothesis testing Two versions of the one sample t-test How to compute the one sample t-test by hand? Scenario 1: variance of the population is known Scenario 2: variance of the population is unknown How to compute the one sample t-test in R? Scenario 1: variance of the population is known Scenario 2: variance of the population is unknown Confidence interval Assumptions Photo by Helloquence Introduction After having...

Read more »

The 9 concepts and formulas in probability that every data scientist should know

March 2, 2020
By
The 9 concepts and formulas in probability that every data scientist should know

What is probability? 1. A probability is always between 0 and 1 2. Compute a probability 3. Complement of an event 4. Union of two events 5. Intersection of two events 6. Independence of two events 7. Conditional probability Bayes’ theorem Example 8. Accuracy measures False negatives False positives Sensitivity Specificity Positive predictive value Negative predictive value 9. Counting techniques Multiplication Example Permutation Example By hand In R Combination Example By hand In R Photo by Josh Appel What is probability? Probability is the likelihood of an event occurring;...

Read more »

Student’s t-test in R and by hand: how to compare two groups under different scenarios

February 27, 2020
By
Student’s t-test in R and by hand: how to compare two groups under different scenarios

Introduction Null and alternative hypothesis Hypothesis testing Different versions of the Student’s t-test How to compute Student’s t-test by hand? Scenario 1: Independent samples with 2 known variances Scenario 2: Independent samples with 2 equal but unknown variances Scenario 3: Independent samples with 2 unequal and unknown variances Scenario 4: Paired samples where the variance of the differences is known Scenario 5: Paired samples where the variance of...

Read more »

Correlogram in R: how to highlight the most correlated variables in a dataset

February 21, 2020
By
Correlogram in R: how to highlight the most correlated variables in a dataset

Introduction Correlation matrix Correlogram Correlation test Code Photo by Pritesh Sudra Introduction Correlation, often computed as part of descriptive statistics, is a statistical tool used to study the relationship between two variables, ...

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)