## Simulation Setup: No Violations

#### Estimated Model:

$$y= \hat{\alpha} + \hat{\beta}_1 x + \hat{\beta}_2 z + \hat{\sigma} u$$

#### Simulation Results

Set values at left, click 'Simulate!' button to run, and wait 3-15 seconds for results to appear.

#### What happens to OLS estimates if there are no violations?

There are no violations to OLS's underlying assumptions about the true DGP.

The OLS estimates should be unbiased and efficient.

#### Where should I look to see that?

##### On the 'Main' tab...
Unbiased: Top two rows should match/be close for all columns; top row should fall in between values in 3rd and 4th rows for all columns.
Efficient: Mathematical in nature, because 'efficiency' technically refers to 'OLS's estimates will have the smallest possible SEs, compared to all other tools we could use.' The SE's average value (5th row) from this scenario will serve as a rough reference for all the other scenarios' SEs, to give us a *very* imperfect heuristic.

## Simulation Setup: Omitted Variable

#### Violation-Specific Options:

** Can also demonstrate multicollinearity's effect. Set |Corr(X,Z)| to 0.85-0.99 **
** Can also demonstrate effect of omitting a relevant variable, but one uncorrelated with x. Set Corr(X,Z) to 0 **

#### Estimated Model:

$$y= \hat{\alpha} + \hat{\beta}_1 x + \hat{\sigma} u$$

#### Simulation Results

Set values at left, click 'Simulate!' button to run, and wait 3-15 seconds for results to appear.

#### What happens to OLS estimates if we omit a relevant variable?

OLS requires that any variable correlated with both x and y is included in the model, if we are to recover x's effect on y. Since we omit z in our specification, we violate this assumption.

The OLS estimates will be biased but efficient. This will manifest in our estimate of x's effect on y because the omitted variable is correlated with x.

#### Where should I look to see that?

##### On the 'Main' tab...
Biased: Top two rows won't match for x's coefficient; top row won't fall in between values in 3rd and 4th rows for this column.
Efficient: 5th row's values should match/be close to No Violation's 5th row (provided that all common slider/field values are identical).

Technical side note: E(u)=0 only guarantees Corr(x,u)=0 when covariates are nonstochastic (Gujarati 2003). The simulation uses stochastic covariates.

## Simulation Setup: E(u)!=0

#### Estimated Model:

$$y= \hat{\alpha} + \hat{\beta}_1 x + \hat{\beta}_2 z + \hat{\sigma} u$$

#### Simulation Results

Set values at left, click 'Simulate!' button to run, and wait 3-15 seconds for results to appear.

#### What happens to OLS estimates if the error doesn't average to zero?

The random error will sometimes be high in value and sometimes be low in value, but overall, these high and lows should cancel each other out. Otherwise, there's something systematically affecting the error's value. (Which makes the random error not random.) For this reason, OLS assumes that the random error averages to zero. If it doesn't, we've violated this assumption.

The OLS estimates will be biased but efficient. This will manifest in our estimate of the intercept, since a non-zero error would appear as another constant term in the DGP.

#### Where should I look to see that?

##### On the 'Main' tab...
Biased: Top two rows won't match for intercept; top row won't fall in between values in 3rd and 4th rows for this column.
Efficient: 5th row's values should match/be close to No Violation's 5th row (provided that all common slider/field values are identical).

Technical side note: E(u)=0 only guarantees Corr(x,u)=0 when covariates are nonstochastic (Gujarati 2003). The simulation uses stochastic covariates.

## Simulation Setup: Heteroscedasticity

#### Estimated Model:

$$y= \hat{\alpha} + \hat{\beta}_1 x + \hat{\beta}_2 z + \hat{\sigma} u$$

#### Simulation Results

Set values at left, click 'Simulate!' button to run, and wait 3-15 seconds for results to appear.

#### What happens to OLS estimates when the error's heteroscedastic?

OLS assumes that the random error is random. That means there's no way for us to predict the error's values. If errors are heteroscedastic, it means that their dispersion (how tightly they cluster around the regression line) changes as a function of a covariate's values.

The OLS estimates will be unbiased but inefficient. This will manifest in our SE estimate of the variable with which the errors are heteroscedastic (here, x), since we could use information about x's values to tell us something about the (not-so-)random errors' values.

#### Where should I look to see that?

##### On the 'Main' tab...
Unbiased: Top two rows should match/be close for all columns; top row should fall in between values in 3rd and 4th rows for all columns.
Inefficient: For x, 5th row's values won't match No Violation's 5th row (provided that all common slider/field values are identical).

## Simulation Setup: Autocorrelation

#### Estimated Model:

$$y= \hat{\alpha} + \hat{\beta}_1 x + \hat{\beta}_2 z + \hat{\sigma} u$$

#### Simulation Results

Set values at left, click 'Simulate!' button to run, and wait 3-15 seconds for results to appear.

#### What happens to OLS estimates when the error's autocorrelated?

OLS assumes that the random error is random. That means there's no way for us to predict the error's values. If errors exhibit autocorrelation, it means that we can use one observation's error value to predict the value of another observation's error.

The OLS estimates will be unbiased but inefficient. This will manifest in our SE estimates for all variables.

#### Where should I look to see that?

##### On the 'Main' tab...
Unbiased: Top two rows should match/be close for all columns; top row should fall in between values in 3rd and 4th rows for all columns.
Inefficient: 5th row's values won't match No Violation's 5th row (provided that all common slider/field values are identical).

## Simulation Setup: Non-Linear in Parameters

#### Estimated Model:

$$y= \hat{\alpha} + \hat{\beta}_1 x + \hat{\beta}_2 z + \hat{\sigma} u$$

#### Simulation Results

Set values at left, click 'Simulate!' button to run, and wait 3-15 seconds for results to appear.

#### What happens to OLS estimates when true DGP isn't linear in parameters?

OLS makes an assumption about the DGP's functional form. Specifically, it assumes that y is produced by a linear function whose parameters are not transformed in any way (i.e., no exponentiation, no logging, no raising to any power other than 1, no multiplying or dividing by other parameters, no trig functions). We use the phrase 'linear in parameters' to describe a DGP with these properties. For these simulations, y is generated by an exponential function. The DGP's parameters are therefore non-linear.

The OLS estimates will be biased and inefficient. Violations of this assumption can also induce other violations (e.g., heteroscedasticity). This is why many texts encourage practitioners to check for functional form violations first, before checking for evidence of other assumption violations.

#### Where should I look to see that?

##### On the 'Main' tab...
Biased: Top two rows won't match for all columns; top row won't fall in between values in 3rd and 4th rows for all columns.
Inefficient: 5th row's values won't match No Violation's 5th row (provided that all common slider/field values are identical).