The following code produces confidence intervals in R using the normal distribution and confidence intervals using the t-distribution.

The code reproduces the figure 1 presented in this post.

Continue reading Confidence Intervals R Code Part 1The following code produces confidence intervals in R using the normal distribution and confidence intervals using the t-distribution.

The code reproduces the figure 1 presented in this post.

Continue reading Confidence Intervals R Code Part 1This blog post explains the difference between confidence intervals that use the t-distribution and confidence intervals that use the Normal distribution. Thereby, the post will not focus on the theoretical/mathematical differences of the two distributions, but rather compare the two types of confidence intervals using simulation studies. Furthermore, in case you are interested in replicating the presented results or simply play around with it yourself, I provide the R code to conduct the simulation exercises and to replicate the figures.

Continue reading What is the difference between using the t-distribution and the Normal distribution when constructing confidence intervals?In this post, I will show how one can easily construct confidence intervals in R. Assume you have a vector of numbers and you want to construct a confidence interval around the mean of this vector. The subsequent R code shows one easy way to calculate the confidence interval around the mean of this vector. The following code loads a function that allows you to pass on the vector and returns the confidence intervals. Per default the function returns the 95% confidence interval. However, the parameter ‘conf_level’ allows you to specify the interval you want.

Continue reading Confidence Intervals in RThis post is part of the series on the omitted variable bias and provides a simulation exercise that illustrates how omitting a relevant variable from your regression model biases the coefficients. The R code will be provided at the end. Continue reading Omitted Variable Bias: An Example

In a previous post, we discussed how to obtain clustered standard errors in R. While the previous post described how one can easily calculate cluster robust standard errors in R, this post shows how one can include cluster robust standard errors in stargazer and create nice tables including clustered standard errors.

Continue reading Cluster Robust Standard Errors in Stargazer

In a previous post, we discussed how to obtain robust standard errors in R. While the previous post described how one can easily calculate robust standard errors in R, this post shows how one can include robust standard errors in stargazer and create nice tables including robust standard errors.

A Venn diagram (also sometimes also called primary diagram or set diagram) is a diagram that depicts all possible logical relations between a collection of sets. Certain subjects, such as omitted variable bias, can be best be explained by using a Venn diagram. This post shows how to construct a Venn diagram in R.

What are the commands for the most important mathematical operations in Julia and R? The following table translates the most common Julia commands into R language.

Continue reading Julia-R Cheatsheet – Mathematical Operations

How to access vector and matrix elements in Julia and R? The following table translates the most common Julia commands into R language.

Continue reading Julia-R Cheatsheet – Accessing Vector/Matrix Elements

How to manipulate vectors and matrices in Julia and R? The following table translates the most common Julia commands into R language.

Continue reading Julia-R Cheatsheet – Manipulating Vectors and Matrices