Covariance sample

For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.

Moderators: EViews Gareth, EViews Moderator

EF00
Posts: 12
Joined: Tue Oct 29, 2024 6:33 am

Covariance sample

Postby EF00 » Tue Nov 19, 2024 1:57 am

Hi everyone,

I have a model with 62 equations. My goal is to update the solution sample while keeping the covariance sample constant. There are two ways I can modify these samples:

- Through the Model Solve Options.
- By running a custom code.

In the Model Solve Options, I set the solution sample to 2012m12 2022m12. EViews automatically assigns the covariance sample as 1999m01 2012m11.
When I use my custom code to update the solution sample (e.g., setting it to 2024m08 2032m12), the covariance sample remains fixed at the previously assigned range (1999m01 2012m11).

My requirements:
- I want to update the covariance sample only once a year.
- I want to update the solution sample every three months.
- The updated covariance sample should remain stable for the entire year, even as I change the solution sample quarterly.

Question:
When using both the Model Solve Options and custom code, which one controls the behavior of the covariance sample? How can I ensure that my desired schedule for updating the covariance sample is maintained throughout the year?

Thanks

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

Re: Covariance sample

Postby EViews Gareth » Tue Nov 19, 2024 7:26 am

Are you using the model.stochastic(s="sample") option to set the covariance sample?
https://eviews.com/help/helpintro.html# ... 23ww178338
Follow us on Twitter @IHSEViews

EF00
Posts: 12
Joined: Tue Oct 29, 2024 6:33 am

Re: Covariance sample

Postby EF00 » Wed Nov 20, 2024 1:24 am

Not exactly.

In the "Model Solve" window of my workfile, the solution sample is set to 2012m12–2022m12, while the covariance sample is left unspecified (a black box). As a result, EViews automatically uses 1999m01 (the starting date) to 2012m11 as the covariance sample when I execute the solve command.

Later, when I run my code, I update the solution sample to 2024m08–2032m12 without specifying a new covariance sample. In the solution messages, I see the correct new solution sample, but the covariance sample remains unchanged, still set to 1999m01–2012m11.

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

Re: Covariance sample

Postby EViews Gareth » Wed Nov 20, 2024 6:11 am

And you wish it to be set to something else?
Follow us on Twitter @IHSEViews

EF00
Posts: 12
Joined: Tue Oct 29, 2024 6:33 am

Re: Covariance sample

Postby EF00 » Wed Nov 20, 2024 6:39 am

I would like to understand why it doesn't change after updating the solution sample in the code, particularly if I leave the covariance sample box blank (empty) in the model window.

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

Re: Covariance sample

Postby EViews Gareth » Wed Nov 20, 2024 7:35 am

Because the covariance sample and the solution sample are not the same. You can set them separately. The first time you solve the model, the default setting for the covariance sample is set, but it will not change after that. If you wish to fix the covariance sample to a specific set of dates, you have to set it.
Follow us on Twitter @IHSEViews

EF00
Posts: 12
Joined: Tue Oct 29, 2024 6:33 am

Re: Covariance sample

Postby EF00 » Wed Nov 20, 2024 9:22 am

Really thanks!!


Return to “Models”

Who is online

Users browsing this forum: No registered users and 0 guests