| Library: | metrics |
| See also: | panfix panhaus pandyn |
| Macro: | panhaus | |
| Description: | Hausman Test for a correlation between the regressors and the individual effects |
| Usage: | output = panhaus(Z,siga,sige,m {,T} ) | |
| Input: | ||
| Z | Dataset ordered by Individuals (i) 1st column: Index of Individuals 2nd column: Dependent variable 3rd ... column: Explanatory variables (without const!) NT x k+2 Matrix | |
| siga | variance estimate of individual effects | |
| sige | variance estimate of the remaining error | |
| m | The first m explanatory variables are treated as corre- lated with the fixed effects, the remaining variables are assumed to be uncorrelated with the individual effects (= mixed specification) | |
| T | Number of time periods for a BALANCED Dataset IMPORTANT: No column for the Index of Individuals! (Optional, only for a Dataset with the same T for all Individuals = BALANCED PANEL) | |
| Output: | ||
| output | String of output table | |
library("metrics")
z=read("earnings")
z1 =z[,1:2]~log(z[,3])~z[,4]~(z[,4]^2)
{output,siga,sige}=panfix(z1,2)
panhaus(z1,siga,sige,2)
[ 1,] "=====================================================" [ 2,] "Hausman Specification Test for the null hypothesis: " [ 3,] " 2 Variables x(i,t) are uncorrelated with a(i) " [ 4,] "=====================================================" [ 5,] " d = beta(between)-beta(within) SE t-value" [ 6,] "=====================================================" [ 7,] " d [ 1 ] = -0.0705 0.0402 -1.754" [ 8,] " d [ 2 ] = 0.0001 0.0008 0.113" [ 9,] "=====================================================" [10,] "P-Value (RANDOM against FIXED effects): 0.0000" [11,] "====================================================="
| Library: | metrics |
| See also: | panfix panhaus pandyn |