Archive

Archive for the ‘econometrics’ Category

Multiple Regression

March 19, 2010 Leave a comment

Testing Multiple Linear Restrictions: the F-test

March 18, 2010 Leave a comment

The t-test is to test whether or not the unknown parameter in the population is equal to a given constant (in some cases, we are to test if the coefficient is equal to 0 – in other words, if the independent variable is individually significant.)

The F-test is to test whether or not a group of variables has an effect on y, meaning we are to test if these variables are jointly significant.




Looking at the t-ratios for “bavg,” “hrunsyr,” and “rbisyr,” we can see that none of them is individually statistically different from 0. However, in this case, we are not interested in their individual significance on y, we are interested in their joint significance on y. (Their individual t-ratios are small maybe because of multicollinearity.) Therefore, we need to conduct the F-test.


SSRUR = 183.186327 (SSR of Unrestricted Model)

SSRR=198.311477 (SSR of Restricted Model)

SSR stands for Sum of Squares of Residuals. Residual is the difference between the actual y and the predicted y from the model. Therefore, the smaller SSR is, the better the model is.

From the data above, we can see that after we drop the group of variables (bavg,” “hrunsyr,” and “rbisyr”), SSR increases from 183 to 198, which is about 8.2%. Therefore, we can conclude that we should keep those 3 variables.

q: number of restriction (the number of independent variables are dropped). In this case, q=3.

k: number of independent variables

q: numerator degrees of freedom

n-k-1: denominator degrees of freedom

In order to find Critical F, we can look up the F table. I also have found a convenient website for critical-F value http://www.danielsoper.com/statcalc/calc04.aspx.


We can calculate F in STATA by using the command

test bavg hrunsyr brisyr

Here is the output

Our F statistic is 9.55.

****NOTE****: When we calculate F test, we need to make sure that our unrestricted and restricted models are from the same set of observations. We can check by looking at the number of observations in each model and make sure they are the same. Sometimes there are missing values in our data, so there may be fewer observations in the unrestricted model (since we account for more variables) than in the restricted model (using fewer variables).

In our example, our observations are 353 for both unrestricted and restricted models.

If the number of observations differs, we have to re-estimate the restricted model (the models after dropped some variables) using the same observations used to estimate unrestricted model (the original model).

Back to our example, if our observations were different in the two models, we would

if bavg~=. means if bavg is not missing,

if bavg~=. & hrunsyr ~=. & rbisyr~=. means if bavg, hrunsyr, rbisyr are ALL not missing (notice the “&” sign). That means even if one value of either one variable is missing, STATA will not take that observation into account while generating the regression.

========================================

==============================

===============

There is one special case of F-test that we want to test the overall significance of a model. In other words, we want to know if the regression model is useful at all, or we would need to throw it out and consider other variables. This is rarely the case, though.



~~~~~~~~~~~000~~~~~~~~~~~

This was such a painful and lengthy post. It has so many formulas that I had to do it in Microsoft Words and then convert it into several pictures…. I hope I made sense, though. =)

Let’s just keep in mind that the F test is for joint significance. That means we want to see whether or not a group of variables should be kept in the model.

Also, unlike the t distribution (bell shaped curve), F distribution is skewed to the right, with the smallest value is 0. Therefore, we would reject the null hypothesis if F-statistic (from the formula) is greater than critical-F (from the F table).

Single Linear Combinations of Parameters

March 7, 2010 Leave a comment

Single Linear Combinations of Parameters means we are to test the linear relationship between two parameters in our multiple regression analysis. The simplest case can be

H0: β1 = β2

Or H0:  β1 = 10β2

Our hypothesis can be pretty much anything, as long as β1 and β2 has linear relationship.

Note that we are to test whether or not the effects of the two x variables on y have a linear relationship, NOT the linear relationship between the two x variables on each other (that is the case of perfect multicollinearity).

For example, we are interested in testing

H0: β1 = β2

H1: β1 ≠ β2


FIRST METHOD

Set θ = β1 – β2, then we will have

H0: θ = 0
H1: θ ≠ 0

Set α (if not given, assume it to be .05)

Find critical value: df=n-k-1 (k is the number of x variables), then use the t-table to find critical value.

Calculate test statistic:

(That output above was an example from my class notes.)

Therefore,

Decision: to reject H0 or not (by comparing t0 ­ with the critical value)

Conclusion:

If we reject H0 1 = β2), we will conclude that β1 is statistically different from β2 at α level.

If we fail to reject H0 1 = β2), we will conclude that β1 is not statistically different from β2 at α level.

=========

Crazy enough, huh? There is another method that may look easier:

SECOND METHOD

-Set θ = β1 – β2, then β1 = θ + β2


-Substitute β1 in our original model by θ + β2


y= β0 + β1x1 +  β2x2 +  β3x3 + u

y= β0 + (θ + β2)x1+  β2x2 +  β3x3 + u  = β0 + θx1+  β2(x1+x2) + β3x3 + u

Now our 3 variables in the model are x1, x1+x2, x3


-Construct a new variable that is the sum of x1 and x2 (in STATA) by using the command

gen totx12 =  x1 + x2

“totx12” is just the name of the new variable.


-Run the regression of y on x1, totx12, and x3


-Test:

H0: θ = 0
H1: θ ≠ 0

Now we can look at the t-ratio or p-value of the coefficient on x1 (coefficient on x1 is now θ) then make our decision whether or not to reject H0.

Statistical vs. Economic Significance

March 5, 2010 Leave a comment

Last week, I learned how to distinguish the statistical significance and economic significance while doing the regression analysis in my econometrics class.

-Statistical Significance: We will look at the t-tests or p-values to determine whether or not to reject the null hypothesis (which says that the parameter is equal to 0) at a certain level of significance.

+ Statistical significance can be driven from a large estimate or a small standard error (which may result from a large sample size, meaning there are more variance in x variables)

+ A lack of statistical significance may be driven from small sample size or multicollinearity (meaning that there are correlations between x variables)

-Economic significance: we will look at the magnitude and the sign of the estimated coefficient. If the number turns out to be so small, that x variable does not really affect y.

In short, an coefficient is

statistically significant when it is quite precisely estimated,

and

economically significant when it is important.

Here is one example from my class notes:

#cars: numbers of cars

inctotal: total annual income (in dollars)

familysize: the size of family (number of people)

age: measured in years

In the example above, all the parameters are statistically significant (the t-ratios are 8.81, 9.91, 2.26, 3.36, which is reasonable for us the reject the null hypothesis in a significance test).

However, the magnitude of “age” (measured in years) is really small (.0046911), which means a year increase in age will increase the number of cars owned by .0046911, on average, all else equal. In other words, all else equal, on average, in order to the number of cars owned to increase by 1, age must increase by over 200 years (=1/.0046911), which does not sound realistic!!

In conclusion, even though the estimated coefficient of “age” is statistically significant, it is NOT economically significant.


Note: The magnitude of “inctotal” is a small number too (.0000691), but it makes some sense. That means all else equal, a dollar increase in total income will increase the number of cars owed by .0000691, on average. That sounds possible, since if you had an extra dollar per year, you would not think of buying another car!! Well, it still does not make good sense to you, let’s put it this way: all else equal, on average, in order for a person to own another car, his/her annual income needs to increase by about $14,471 (=1/.0000691). Sounds reasonable, right? Therefore, the estimated coefficient of “inctotal” is both statistically and economically significant.

We need to watch out for the units as well. A small number doesn’t necessarily imply an economic insignificance.