codes in 2016 and I cannot open them in 2017 version

Hi,

I have some files for codes written in GAUSS 2016 and cannot open them in 2017 version. How shall I deal with this problem please?

 

Here is the link for the codes under bc-progs.zi  section:

http://qed.econ.queensu.ca/jae/datasets/banerjee003/

 

Regards

Souhaila

8 Answers



0



Hello Souhaila,

I downloaded and loaded the data into GAUSS version 17 successfully without problem. Usually, a problem like this occurs because the code references a path that would work for the older version, but not for the newer version. This could be because:

  1. The code uses a relative path and the newer GAUSS is using a different working directory. For example, if the data is in the folder C:\gauss16\mydata and the GAUSS 16 working directory is set to C:\gauss16, then either of these lines would work in GAUSS 16:
    load france[123,19]=mydata/france.txt;
    
    france = csvReadM("mydata/france.txt", 2, 1, " ");

    However, if you ran these statements in GAUSS version 17 with a working directory of C:\gauss17, GAUSS 17 would look for the data in C:\gauss17\mydata. Since the data is actually in C:\gauss16\mydata, GAUSS 17 would not find it.

    .

  2. The newer version of GAUSS is on a new computer and the old path does not exist on the new computer.

In either case, the solution is to make sure that the data is in the path that GAUSS is looking, by either changing the path in GAUSS or moving the folder.

If this does not solve your problem, please post the error that you are getting from GAUSS as well as the line of code that is trying to load the data.

aptech

1,773


0



Dears,

 

Many thanks for your reply.

 

It was working first but I am trying now again to run the codes and I am getting an error massage as follow: ‘G0014 : File not found 'c:\france.txt' [brkfactors_heterog_2sb.gssline 3]’

 

My data is in   C   in Gauss 17 as it is shown in screen shot I have attached. I also attached the screen shot for the codes with the error massage. I am not sure why it cannot find the France data file as I save them in C  in folder Gauss17 as shown in screen shot I have attached.

 

Furthermore, in your previous email, you mentioned file my data in Gauss 17 as follow: c:\gauss17\mydata but there is no mydata folder in my gauss 17 as you can see from screenshot. THERE ARE : DLIB, EXAMPLES, HELP, LIB, Im, New folder, plugins, pthreads, res, src, tmp as you will find in screenshot.

 

Could you please advise me what shall I do.

 

Regards

Souhaila

 



0



Since the screenshots were not imported, can you paste the results of these commands to aid in the diagnosis of your problem:

//Print GAUSS current working directory
print cdir(0);

//List all .txt files in current working directory
print filesa("*.txt");

aptech

1,773


0



hi,

 

I have got these results:

C:\gauss17

Austria.txt
canada.txt
denmark.txt
Finland.txt
france.txt
Germany.txt
Greece.txt
Ireland.txt
Italy.txt
LICENSE.txt
myhostid.txt
Netherlands.txt
ols_output.txt
Portugal.txt
README.gdt.txt
README.txt
README.vwr.txt
Spain.txt
year_month.txt

 

I have sent you an email with the screenshot for my PC



0



OK, I think I know what the problem is. Let's see if I am correct.

1. Can you run this command successfully?

load france[123,19]=france.txt;

2. What is the exact code on line 3 of brkfactors_heterog_2sb.gss?

aptech

1,773


0



I was able to see the screenshots that you sent and I see the problem. Line 3 of brkfactors_heterog_2sb.gss is this:

load france[123,19] = C:\france.txt;

This is telling GAUSS to look for the file, france.txt only on the root of the C drive, meaning only in the folder C:\. You need to change that line, and all of the other load statements to not use any path like this:

load france[123,19] = france.txt;

Then GAUSS will look in your current working directory.

aptech

1,773


0



Hi,

Many thanks for your reply and really appreciate your help.

It does work but I am getting another error massage not sure why and what does it mean:

 

G0176 : Argument out of range [factcoint_msb.src, line 280]

 

Currently active call:

    File factcoint_msb.src, line 280, in factcoint_msb
        du=zeros(m_tb[i,1],1)|ones(t-m_tb[i,1],1);

Traceback:

    File factcoint_msb.src, line 79, in factcoint_iter
        {e, Fhat, csi, m_tbe} = factcoint_msb(y_temp,x,model[1]|0,m_tbe_opt,k); @ estimation of the common factors, assuming the estimated breaks as known @
    File brkfactors_heterog_2sb.gss, line 92, in <main>
        {mat_e_idio,fhat,csi,m_tbe,final_iter}=factcoint_iter(cpi,llog~e,model,zeros(n,3),k,tolerance,max_iter); @ Matrix of idiosyncratic disturbance terms @

 

Many thanks

S



0



The error message "G0176: Argument out of range" means that one of the input arguments to a function on that line are not in the valid range. For this line of code:

du=zeros(m_tb[i,1],1)|ones(t-m_tb[i,1],1);

The cause is most likely that m_tb[i,1] is greater than or equal to t. This would cause the first input argument to ones, which determines how many rows to create, would be either 0 or a negative number. Neither zero or negative numbers are valid inputs to ones.

To resolve this problem you should check to see how large t is and also check to see what the range of the loop is, so you can find out if t is too small, or the loop is executing too many iterations.

aptech

1,773

Your Answer

8 Answers

0

Hello Souhaila,

I downloaded and loaded the data into GAUSS version 17 successfully without problem. Usually, a problem like this occurs because the code references a path that would work for the older version, but not for the newer version. This could be because:

  1. The code uses a relative path and the newer GAUSS is using a different working directory. For example, if the data is in the folder C:\gauss16\mydata and the GAUSS 16 working directory is set to C:\gauss16, then either of these lines would work in GAUSS 16:
    load france[123,19]=mydata/france.txt;
    
    france = csvReadM("mydata/france.txt", 2, 1, " ");

    However, if you ran these statements in GAUSS version 17 with a working directory of C:\gauss17, GAUSS 17 would look for the data in C:\gauss17\mydata. Since the data is actually in C:\gauss16\mydata, GAUSS 17 would not find it.

    .

  2. The newer version of GAUSS is on a new computer and the old path does not exist on the new computer.

In either case, the solution is to make sure that the data is in the path that GAUSS is looking, by either changing the path in GAUSS or moving the folder.

If this does not solve your problem, please post the error that you are getting from GAUSS as well as the line of code that is trying to load the data.

0

Dears,

 

Many thanks for your reply.

 

It was working first but I am trying now again to run the codes and I am getting an error massage as follow: ‘G0014 : File not found 'c:\france.txt' [brkfactors_heterog_2sb.gssline 3]’

 

My data is in   C   in Gauss 17 as it is shown in screen shot I have attached. I also attached the screen shot for the codes with the error massage. I am not sure why it cannot find the France data file as I save them in C  in folder Gauss17 as shown in screen shot I have attached.

 

Furthermore, in your previous email, you mentioned file my data in Gauss 17 as follow: c:\gauss17\mydata but there is no mydata folder in my gauss 17 as you can see from screenshot. THERE ARE : DLIB, EXAMPLES, HELP, LIB, Im, New folder, plugins, pthreads, res, src, tmp as you will find in screenshot.

 

Could you please advise me what shall I do.

 

Regards

Souhaila

 

0

Since the screenshots were not imported, can you paste the results of these commands to aid in the diagnosis of your problem:

//Print GAUSS current working directory
print cdir(0);

//List all .txt files in current working directory
print filesa("*.txt");
0

hi,

 

I have got these results:

C:\gauss17

Austria.txt
canada.txt
denmark.txt
Finland.txt
france.txt
Germany.txt
Greece.txt
Ireland.txt
Italy.txt
LICENSE.txt
myhostid.txt
Netherlands.txt
ols_output.txt
Portugal.txt
README.gdt.txt
README.txt
README.vwr.txt
Spain.txt
year_month.txt

 

I have sent you an email with the screenshot for my PC

0

OK, I think I know what the problem is. Let's see if I am correct.

1. Can you run this command successfully?

load france[123,19]=france.txt;

2. What is the exact code on line 3 of brkfactors_heterog_2sb.gss?

0

I was able to see the screenshots that you sent and I see the problem. Line 3 of brkfactors_heterog_2sb.gss is this:

load france[123,19] = C:\france.txt;

This is telling GAUSS to look for the file, france.txt only on the root of the C drive, meaning only in the folder C:\. You need to change that line, and all of the other load statements to not use any path like this:

load france[123,19] = france.txt;

Then GAUSS will look in your current working directory.

0

Hi,

Many thanks for your reply and really appreciate your help.

It does work but I am getting another error massage not sure why and what does it mean:

 

G0176 : Argument out of range [factcoint_msb.src, line 280]

 

Currently active call:

    File factcoint_msb.src, line 280, in factcoint_msb
        du=zeros(m_tb[i,1],1)|ones(t-m_tb[i,1],1);

Traceback:

    File factcoint_msb.src, line 79, in factcoint_iter
        {e, Fhat, csi, m_tbe} = factcoint_msb(y_temp,x,model[1]|0,m_tbe_opt,k); @ estimation of the common factors, assuming the estimated breaks as known @
    File brkfactors_heterog_2sb.gss, line 92, in <main>
        {mat_e_idio,fhat,csi,m_tbe,final_iter}=factcoint_iter(cpi,llog~e,model,zeros(n,3),k,tolerance,max_iter); @ Matrix of idiosyncratic disturbance terms @

 

Many thanks

S

0

The error message "G0176: Argument out of range" means that one of the input arguments to a function on that line are not in the valid range. For this line of code:

du=zeros(m_tb[i,1],1)|ones(t-m_tb[i,1],1);

The cause is most likely that m_tb[i,1] is greater than or equal to t. This would cause the first input argument to ones, which determines how many rows to create, would be either 0 or a negative number. Neither zero or negative numbers are valid inputs to ones.

To resolve this problem you should check to see how large t is and also check to see what the range of the loop is, so you can find out if t is too small, or the loop is executing too many iterations.


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.