Ordinary Least Squares

Simulation App

Cristian Santa
statistician

Download

OLS

Ordinary Least Squares is a method for estimating the unknown parameters in a linear regression model, with the goal of minimizing the differences between the observed responses in some arbitrary dataset and the responses predicted by the linear approximation of the data.

The App

In this App you will manipulate the dataset and fit model, change the options of the plot, as well as on/off the intercept of the model, change the proportional scheme, and Set Seed for randomly data.

The data is generating by two normal random variables like this.


\[x\sim N(0,\sigma_{x}+2)\]
\[u\sim N(0,\sigma_{u})\]

Models & Data Generating Process

Data Generating Process

\(y=2+3x+u\)

\(y=2+3x-0.5x^2+u\)

\(y=-10-1.5x+x^2+u\)

\(y=-2x-0.5x^2+u\)

\(y=5+x-0.1e^{x}+u\)

\(y=0.2e^{x}+u10\)

\(y=-4-2x^2+0.4e^{x}-x^2+u^5\)

\(y=-1-2x+1.5x^2-1.5x^3-0.05x^4+10^{-4}x^5+u^5\)

Fit Models

\(y\sim x\)
\(y\sim x^2\)
\(y\sim e^{x}\)
\(y\sim x+x^2\)
\(y\sim x+e^{x}\)
\(y\sim x+x^2+e^{x}\)
\(y\sim x+x^2+x^3+x^4+x^5\)

Run The App