Description Usage Arguments Value References Examples
This function generates data as in Hansen (2007).
1 |
alpha |
Scalar determining the rate of decay. |
n |
The sample size. |
r2 |
The population coefficient of determination. |
J |
The number of variables to observe. |
JJ |
The number of terms to use to approximate infinite sums. |
rho |
The correlation. |
equi |
Logical, if |
include.intercept |
Logical, if |
Returns a list with the following:
X |
An n * J matrix containing the independent variables. |
y |
An n * 1 matrix containing the dependent variable. |
mu |
An n * 1 matrix containing the true conditional mean. |
Hansen, Bruce (2007) Least Squares Model Averaging, Econometrica, 75(4):1175-1189.
1 2 | ## Generate data as in Hansen:
## Not run: data <- Hansen(alpha = 0.5, n = 50, r2 = 0.5, J = ceiling(3*50^(1/3)), JJ = 1000, rho = 0, equi = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.