Search found 10 matches

by cap
Wed Mar 02, 2011 1:29 pm
Forum: Help With Programming
Topic: Computing Autocovariances
Replies: 1
Views: 4828

Computing Autocovariances

Greetings, I am trying to use RATS to compute the autocovariances of a series. I use correlate(covariances, results=mycovs) myvar I am wondering if you can tell me what formula this instruction uses to compute these autocovariances. I tried looking in the reference manual under "correlate"...
by cap
Thu Sep 03, 2009 2:35 pm
Forum: Help With Programming
Topic: use string to reference scalar variable
Replies: 3
Views: 7370

Re: use string to reference scalar variable

In my program I am specifying the string name of a certain variable, and then the program computes a variety of tests on that variable, typically using a reference such as %s(&series_name). But for one particular test, I need to divide two scalars. One of these scalars has a name that is pattern...
by cap
Mon Aug 31, 2009 3:48 pm
Forum: Help With Programming
Topic: use string to reference scalar variable
Replies: 3
Views: 7370

use string to reference scalar variable

Hello, I have a pre-existing scalar variable, and I'd like to refer to it in a computation by using a string that is equal to the variable's name. How can I do this? An example I thought would work would be something like this: compute myvar = 10 declare string mystr compute mystr = "my" +...
by cap
Fri Nov 14, 2008 1:06 pm
Forum: Help With Programming
Topic: Syntax coloring / other text editors
Replies: 0
Views: 5931

Syntax coloring / other text editors

Can anyone recommend a text editor to use aside from the one inside RATS? I have just found one called Kedit which has support for RATS (meaning, syntax coloring for the RATS language), and just thought I would ask if anyone else can recommend whatever they might be using. The editor in RATS is the ...
by cap
Tue Sep 23, 2008 10:31 am
Forum: Data: Reading, Writing, Transforming
Topic: Opening a data file within a dofor loop
Replies: 2
Views: 9317

It works great now, thanks very much for your help.
by cap
Mon Sep 22, 2008 5:27 pm
Forum: Data: Reading, Writing, Transforming
Topic: Opening a data file within a dofor loop
Replies: 2
Views: 9317

Opening a data file within a dofor loop

Hello, I am trying to open a data file within a dofor loop. When I run the code outside of a loop, it works fine, but when it is inside the loop, upon my first attempt to use one of the variables from the file, i get the syntax error message "##SX11 Identifier is not recognizable" --------...
by cap
Mon Sep 22, 2008 3:17 pm
Forum: Help With Programming
Topic: How to loop over strings, or specific numbers
Replies: 1
Views: 7169

Nevermind, I got it.



declare vector[integer] myvec(3)

compute myvec(1)=7
compute myvec(2)=20
compute myvec(3)=21


dofor i=myvec
disp i
end dofor




declare string mystr

dofor mystr= "aaa" "bbb" "ccc"

disp mystr

end dofor
by cap
Mon Sep 22, 2008 2:58 pm
Forum: Help With Programming
Topic: How to loop over strings, or specific numbers
Replies: 1
Views: 7169

How to loop over strings, or specific numbers

Hello, I'd like to create a do loop where the index variable takes on the values of certain strings, or certain numbers, such as the following (which of course doesn't actually work): -------------------------------- do i="aaa" "bbb" "ccc" disp i end do i --------------...
by cap
Fri Sep 19, 2008 10:24 am
Forum: Help With Programming
Topic: RATS unresponsive
Replies: 1
Views: 6856

RATS unresponsive

I am having a problem where RATS becomes completely unresponsive and will not evaluate even the simplest code submitted, and shows no errors in the output window. I began with the following code, which works fine: -------------------------- compute counter = 0 do i=1,10 if condition { compute counte...
by cap
Mon Aug 18, 2008 2:00 pm
Forum: Graphics, Reports, and Other Output
Topic: How to graph multiple series, when stored in a vector series
Replies: 1
Views: 8140

How to graph multiple series, when stored in a vector series

Hello, I have number of series stored in a vector series. The total number of series is variable. Is there a way to graph all of the series at once? It appears the graph instruction requires an explicit number and then a listing of all the series, which as far as I can tell makes it impossible to gr...