# Error G0025: Undefined symbol

0

I am trying to write code to solve problem 5 chapter 16 of Greene's Econometric Analysis 6th edition.  I have a single sample has the weibull distribution.  Gauss keeps telling me that my alpha and beta are unidentified.

However, I'm not sure what I am doing wrong.  I have the solution to the problem but I want to run the code to see if I get the correct result. Here is my code:

```load data[20,1] =C:\Users\Assma\Desktop\GAUSS\HW3Data.txt;
x=data[.,1];

//initializing global variables
beta>0;
alpha>0;

n=rows(data);

proc f(x);
local fcn;
fcn=n*ln(alpha)+n*ln(beta)+(beta-1)*sumc(ln(x))-alpha*sumc(x^beta);
retp( -sumc(fcn) );
endp;
```

0

Are you meaning to assign alpha and beta to be equal to zero? If so, you need to change these two lines:

```//initializing global variables
beta > 0;
alpha > 0;
```

to use the equals sign like this:

```//initializing global variables
beta = 0;
alpha = 0;
```

Making this change will remove the error you are reporting.

The code as you originally had i.e (beta > 0;) is evaluating whether beta is greater than zero. It will return a 1 if beta is greater than zero or a 0 if not. However, in this case since they were not assigned, it will just give the "Undefined symbol" error.

0

Are you meaning to assign alpha and beta to be equal to zero? If so, you need to change these two lines:

```//initializing global variables
beta > 0;
alpha > 0;
```

to use the equals sign like this:

```//initializing global variables
beta = 0;
alpha = 0;
```

Making this change will remove the error you are reporting.

The code as you originally had i.e (beta > 0;) is evaluating whether beta is greater than zero. It will return a 1 if beta is greater than zero or a 0 if not. However, in this case since they were not assigned, it will just give the "Undefined symbol" error.

• ### Aptech Systems, Inc. Worldwide Headquarters

Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286

Phone: 360.886.7100
FAX: 360.886.8922

• ### Training & Events

Want more guidance while learning about the full functionality of GAUSS and its capabilities? Get in touch for in-person training or browse additional references below.

• ### Tutorials

Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.

• ### Want to find out more?

Get a real answer from a real person

• ### Have a Specific Question?

Get a real answer from a real person

• Need Support?
• ### Support Plans

Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.

• ### User Forums

Join our community to see why our users are considered some of the most active and helpful in the industry!