how to generate three series, whose covariance are not zero?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

tony
Posts: 59
Joined: Wed Jan 07, 2009 7:59 am

how to generate three series, whose covariance are not zero?

Postby tony » Thu Dec 06, 2012 8:54 pm

I want to generate x1,x2,x3, whose means are all 0, and their covariance matrix are
[10 2 5
0 1 4
2 3 9]
How to do that in EViews 7
Thanks!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: how to generate three series, whose covariance are not z

Postby EViews Gareth » Thu Dec 06, 2012 11:20 pm


tony
Posts: 59
Joined: Wed Jan 07, 2009 7:59 am

Re: how to generate three series, whose covariance are not z

Postby tony » Fri Dec 07, 2012 10:05 am

Is there any available function in EViews 7 to do this?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: how to generate three series, whose covariance are not z

Postby EViews Gareth » Fri Dec 07, 2012 10:12 am

There is no function to randomly draw from a multivariate normal distribution, no. But you can find the cholesky decomposition of a matrix, using @cholesky, so implementing the standard technique is pretty simple.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: how to generate three series, whose covariance are not z

Postby EViews Gareth » Fri Dec 07, 2012 10:14 am



Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests