| model_space | R Documentation |
This function calculates all possible models with M regressors that can be constructed out of K regressors.
model_space(data, M = NULL, g = "UIP", HC = FALSE)
data |
Data set to work with. The first column is the data for the dependent variable, and the other columns is the data for the regressors. |
M |
Maximum number of regressor in the estimated models (default is K - total number of regressors). |
g |
Value for g in the g prior. Either a number above zero specified by the user or: |
HC |
Logical indicator (default = FALSE) specifying whether a heteroscedasticity-consistent covariance matrix should be used for the estimation of standard errors (MacKinnon & White 1985). |
A list with model_space objects:
x_names - vector with names of the regressors
ols_results - table with the model space - contains ols objects for all the estimated models
MS - size of the mode space
M - maximum number of regressors in a model
K- total number of regressors
x1 <- rnorm(20, mean = 0, sd = 1)
x2 <- rnorm(20, mean = 0, sd = 2)
x3 <- rnorm(20, mean = 0, sd = 3)
x4 <- rnorm(20, mean = 0, sd = 1)
x5 <- rnorm(20, mean = 0, sd = 2)
x6 <- rnorm(20, mean = 0, sd = 4)
e <- rnorm(20, mean = 0, sd = 0.5)
y <- 2 + x1 + 2*x2 + e
data <- cbind(y,x1,x2,x3,x4,x5,x6)
modelSpace <- model_space(data, M = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.