Search found 152 matches

by diggetybo
Mon Mar 21, 2016 8:42 am
Forum: Data Manipulation
Topic: Random Split Data
Replies: 10
Views: 3720

Re: Random Split Data

Ok great, thanks again.

If I wanted to run some tests in the remaining 20% of the data in isolation would that be possible in the way you suggested?

Would subtracting the 80% sample from @all give me the 20%? or do samples not work like that?
by diggetybo
Mon Mar 21, 2016 8:34 am
Forum: Data Manipulation
Topic: Random Split Data
Replies: 10
Views: 3720

Random Split Data

Hey everyone, I'm aware that certain sample selection methods can be used to do in-sample predictions and measure test error, but I would like to know if eviews has a built-in way to do a random split on the data in the workfile. A browse through the command reference suggests it is not supported. B...
by diggetybo
Sun Mar 13, 2016 9:53 pm
Forum: Programming
Topic: Multiple Series XY Line Graph
Replies: 2
Views: 1340

Re: Multiple Series XY Line Graph

Ohh, that's great. Thank you so much!
by diggetybo
Sun Mar 13, 2016 9:41 pm
Forum: Programming
Topic: Multiple Series XY Line Graph
Replies: 2
Views: 1340

Multiple Series XY Line Graph

Hello, I have been trying to create a rather complicated xy line graph in eviews for a while now, the closest I got was using the copypage command. I have two issues that I would like to resolve with the following code. Most of the complications are due to the fact I'm trying to plot things from a m...
by diggetybo
Tue Mar 08, 2016 12:27 am
Forum: Program Repository
Topic: Hierarchical Clustering / Lance - Williams Algorithm
Replies: 1
Views: 6569

Re: Hierarchical Clustering / Lance - Williams Algorithm

I have coded a companion program for the above hierarchical clustering algorithm. The following code will produce a dendrogram output matrix that can be plotted easily in excel. It must be run after the above hierarchical clustering program. The results are compiled in x y coordinate format in an ob...
by diggetybo
Thu Feb 25, 2016 10:42 pm
Forum: Programming
Topic: Counting String Cases Based on Multipe Target Strings
Replies: 3
Views: 1606

Re: Counting String Cases Based on Multipe Target Strings

Good news and bad news, Bad news is I misunderstood the way @instr worked, that's totally my fault. It actually returns the character position within the string, not a count. Good news is, I did find a workaround that uses @instr if you wanted to count things in a string: vector counter_vector svect...
by diggetybo
Thu Feb 25, 2016 9:18 am
Forum: Programming
Topic: Counting String Cases Based on Multipe Target Strings
Replies: 3
Views: 1606

Re: Counting String Cases Based on Multipe Target Strings

Good news, All this time explaining my question helped me hone in on a possible solution: !instr_1 = @instr(%list, "a/b") !instr_2 = @instr(%list, "c/d") if !instr_1 >= 1 and !instr_2 >=1 then !string_count = !string_count+1 endif I'll leave this code here in case anyone else was...
by diggetybo
Thu Feb 25, 2016 3:27 am
Forum: Programming
Topic: Counting String Cases Based on Multipe Target Strings
Replies: 3
Views: 1606

Counting String Cases Based on Multipe Target Strings

Hey I rewrote this post, because I don't think my initial example was very good or concise. Let me get down to it, I'm looking to add a criterion to the target string argument in the @instr command, so that the resulting integer value is calculated not just by how many times a singular target string...
by diggetybo
Thu Feb 18, 2016 10:58 am
Forum: Programming
Topic: String Loop on Existing String Variable
Replies: 2
Views: 1279

Re: String Loop on Existing String Variable

easy as that, thank you!
by diggetybo
Thu Feb 18, 2016 7:59 am
Forum: Programming
Topic: String Loop on Existing String Variable
Replies: 2
Views: 1279

String Loop on Existing String Variable

Hello again, I have a question on the following code: %labels = "height width length weight density" %labels_xys = %labels for %i height width length weight density %labels_xys = @replace(%labels_xys, %i, %i+"_x "+%i+"_y ") next Can I somehow use a string loop on an exi...
by diggetybo
Wed Feb 17, 2016 2:59 am
Forum: Program Repository
Topic: Hierarchical Clustering / Lance - Williams Algorithm
Replies: 1
Views: 6569

Hierarchical Clustering / Lance - Williams Algorithm

Hey everyone, This time I've used Eviews programming to write a popular data science algorithm. It's not terribly complicated, but it has been the most challenging but nonetheless enjoyable project I've worked on so far. Of course I didn't invent any of this stuff, but I did take the trouble to code...
by diggetybo
Wed Feb 10, 2016 9:57 am
Forum: Programming
Topic: Retrieving non-zero minimum value of matrix column
Replies: 5
Views: 2158

Re: Retrieving non-zero minimum value of matrix column

Oh that does cut down on things, good idea:) Last question! Let's say I save that as a variable

Code: Select all

!min = @cmin(v1)


Is there anyway I can search the original matrix "m1" and return the row+column number for !min?
by diggetybo
Wed Feb 10, 2016 9:37 am
Forum: Programming
Topic: Retrieving non-zero minimum value of matrix column
Replies: 5
Views: 2158

Re: Retrieving non-zero minimum value of matrix column

yea, thanks for thinking it through with me. This is the best I could do:

(existing matrix called: m1)

Code: Select all

vector v1 = @columnextract(m1,1)

for !i = 1 to @rows(v1)
     if v1(!i) = 0 then
          v1 = v1.@droprows(!i)
     exitloop
     endif
next

scalar v1_min = @cmin(v1)
by diggetybo
Wed Feb 10, 2016 8:07 am
Forum: Programming
Topic: Retrieving non-zero minimum value of matrix column
Replies: 5
Views: 2158

Retrieving non-zero minimum value of matrix column

Hey there, I'm having trouble retrieving the minimum of a matrix column, because it has to be non-zero. The @cmin command doesn't seem to work for this purpose, as to be expected, it retrieves the true min. Is there anything that can I can bring to bear in this situation? I'd rather not resort to tr...
by diggetybo
Sun Feb 07, 2016 9:11 pm
Forum: Program Repository
Topic: Symmetry Plot Output Matrix
Replies: 0
Views: 5258

Symmetry Plot Output Matrix

Hey everyone, I haven't contributed much to the community, so I want to improve on that. I have made a simple output matrix for the symmetry plot. As it stands, this isn't built-in in Eviews, but that could change. Until then this program could provide some valuable automation if you are working wit...

Go to advanced search