sim.sur {ldt}R Documentation

Generate Random Sample from an SUR Model

Description

This function generates a random sample from an Seemingly Unrelated Regression model.

Usage

sim.sur(sigma = 1L, coef = 1L, nObs = 100, intercept = TRUE)

Arguments

sigma

covariance matrix of the errors. If it is an integer value, it specifies the number of equations in the SUR model and covariance matrix is generated randomly.

coef

Coefficients of the model. If it is an integer value, it specifies the number of exogenous variables in each equation of the SUR model and coefficient matrix is generated randomly.

nObs

Number of observations to generate.

intercept

If TRUE, an intercept is included in the model as the first exogenous variable.

Value

A list with the following items:

y

matrix, the generated endogenous variable(s).

x

matrix, the generated exogenous variable(s).

e

matrix, the generated errors.

sigma

matrix, the covariance matrix of the disturbances.

coef

matrix, the coefficients used in the model.

intercept

logical, whether an intercept was included in the model.

See Also

sim.varma,estim.sur,search.sur

Examples

num_y <- 2L
num_x <- 3L
n_obs = 100
data <- sim.sur(sigma = num_y, coef = num_x, nObs = n_obs)

# see the examples in 'estim.sur' or 'search.sur' functions

[Package ldt version 0.5.2 Index]