How do I randomize the order of data?

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

jennystats
Posts: 6
Joined: Thu Feb 07, 2013 8:32 pm

How do I randomize the order of data?

Postby jennystats » Tue Mar 05, 2013 9:45 pm

Hi,

I have a dataset with about 400 observations. I want to sort them randomly but I'm not sure how.

Any help appreciated. Thanks!

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

Re: How do I randomize the order of data?

Postby EViews Gareth » Tue Mar 05, 2013 11:57 pm

Generate a series of random numbers:

Code: Select all

Series myrand = @rnd
Then sort the workfile by it (sort button).

jennystats
Posts: 6
Joined: Thu Feb 07, 2013 8:32 pm

Re: How do I randomize the order of data?

Postby jennystats » Wed Mar 06, 2013 12:08 am

Hey Gareth,

Thanks for the help. I generated the random series but when I open my other series (let's just call it Series1) there is only the option to sort in ascending or descending order, not by another series.

It says:

Sort key
<Observation Order> or SERIES1 in a dropdown box

and then Ascending or Descending in another dropdown box immediately to the right

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

Re: How do I randomize the order of data?

Postby EViews Gareth » Wed Mar 06, 2013 7:36 am

Sorry, use Proc->sort workfile page when looking at a workfile.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests