Installing module CItest2b

I am trying to install CItest2b, but error messages almost immediately.

I enter the following into the Program Input/output window:

load z[172,9] =Alcohol.txt;

/*z=ln(z);*/

y = z[1:obs,1];
x = z[1:obs,2:var];
obs = rows(y);

n = obs;

call main(y,x,4,2,12);
end;

But I get this error message:

(0) : error G0156 : 'obs' : Illegal redefinition of procedure

Not sure what I doing wrong? I am new user of GAUSS

1 Answer



0



The problem in this code is that the code tries to use obs in the line:

y = z[1:obs,1];

but obs has not been defined until two lines later. You need to move the definition of obs up to before it is used, like this:

load z[172,9] =Alcohol.txt;

/*z=ln(z);*/
obs = rows(y);
y = z[1:obs,1];
x = z[1:obs,2:var];

n = obs;

call main(y,x,4,2,12);
end;

aptech

1,773

Your Answer

1 Answer

0

The problem in this code is that the code tries to use obs in the line:

y = z[1:obs,1];

but obs has not been defined until two lines later. You need to move the definition of obs up to before it is used, like this:

load z[172,9] =Alcohol.txt;

/*z=ln(z);*/
obs = rows(y);
y = z[1:obs,1];
x = z[1:obs,2:var];

n = obs;

call main(y,x,4,2,12);
end;

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.