Modeling heteroskedasticity for dummies

#1
Hello there!

Im trying to model heteroskedasticity with known form using MATLAB. The only source I found was a uni-variate example, but Im working with multiple-variate models.

http://www.econometricsbysimulation.com/2012/11/modeling-heteroskedasticity.html

My questions are the following

1. Am I supposed to first generate a random X?

2. To make things simple, I want the heteroskedasticity form to be X:),1). In this case, is it correct to generate u ~ Normal(0, X:),1))?

3. Then the real problem comes. How do I generate y if both 1 and 2 are correct? In the source, the author used "4" as the coefficient, which seems to be randomly assigned. Is it correct to use random coefficients for my case as well?

Answers will be much appreciated! :)
 

maartenbuis

TS Contributor
#2
Most of that blog post is dedicated to simulation not estimation. If you want to estimate a heteroscedastic model you should not create random variables or assign parameter values; that is the simulation part not the estimation part.

To answer your question we need to be sure: Do you want to estimate or simulate?
 
#3
Thanks, mate. I first apologize for late reply, due to my recent travel.

Frankly, I am not sure if what I am doing is simulation or estimation, or maybe both. What I want to do is to generate a set of random instances. Then I validate my algorithm to see if it works on those random instances. Since the real data with heteroskedasticity (plus collinearity) is not so easily accessible, this would be a good way for validation.

Now, this is how I resolved my problem

1. Generate random X ~ N(0, \Sigma) % highly correlated

2. Generate error u according to some known functional h(X)

3. Generate dependent var y = X*e + u for e = [1,....,1]'

Thanks!
Liam