Tag Archives: Julia

Linear Regression in Julia 1.0

Julia presents various ways to carry out linear regressions. In this previous post, I explained how to run linear regression in Julia using the function linreg(). Unfortunately, linreg() is deprecated and no longer exists in Julia v1.0.

In this post I will present how to use the native function of Julia to run OLS on the following model

y = \alpha + \beta_{1} x_{1}

Continue reading Linear Regression in Julia 1.0

Generate Gamma Distributed Numbers in Julia

In Julia, one can generate random numbers that follow a Gamma distribution by using the Distribution package. Thereby one can use the rand() function that draws random numbers and specify the Gamma distribution by using the Gamma(a,b) command. The parameters a and b define the shape parameters of the Gamma distribution. This article provides a more generic overview of how to generate random numbers in Julia.

Continue reading Generate Gamma Distributed Numbers in Julia

How to set a Seed in Julia?

Julia v0.7 and older

In Julia, you can set a seed to the random number generator using the srand() function. The code example below sets the seed to 1234. Generating a random variable with rand(1) after setting the seed to 1234 will always generate the same number, i.e. it will always return 0.5908446386657102.

Continue reading How to set a Seed in Julia?

Linear Regression in Julia

Unfortunately, linreg() is deprecated and no longer exists in Julia v1.0. In case you are using Julia v1.0 or above, check out this post. In case you use a version of Julia that is older than 1.0, i.e 0.7, 0.6, etc., the following post will show you how to run a linear regression in Julia.


Julia presents various ways to carry out linear regressions. In this post I will present how to use the native function linreg() to run OLS on the following model

y = \alpha + \beta_{1} x_{1}

Continue reading Linear Regression in Julia

How to Read an Excel File dircetly form the Web in Julia Language?

In a former blog post (see here) I described how to read an Excel file into Julia. In this post I will focus on how to import an Excel file directly from the Web. This feature might be especially useful for recurring routines that rely on the most up-to-date data. Continue reading How to Read an Excel File dircetly form the Web in Julia Language?

How to Read an Excel File in Julia Language? An example.

This article shortly describes how to read an Excel file into Julia. Generally, one can use different libraries to read Excel files, including XLSXReaderExcelReaders or Taro. In this tutorial I will focus on Taro as it created the fewest problems and provides – at least in my eyes – an easy to understand syntax.
Continue reading How to Read an Excel File in Julia Language? An example.