Exec Error at line 343: log: FUNC SINGULAR: x = 0

Dear GAMS Users,

I am trying to estimate some parameters.

using this equations:

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));

It works fine. However when I extend the process to the whole data set, I get Exec Error at line 343: log: FUNC SINGULAR: x = 0

Therefore I introduce these conditions (trying with both gt0 and gt1) on my parameters

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) $ (FOOD1(T1)and trend1(T1) and GDP1(T1) gt 0) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));


and it does not work.

Any idea about the proper way of treating this issue?

Thank you very much in advance!

Adriano


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hello Adriano
I don’t know too much about Gams parameter estimation, bu to limit a variable (in your case a parameter to be estimated), you need to fix its lower bounds greater then zero:
FOOD1.lo(T1) = 0.0001;
trend1.lo(T1) = 0.0001;
GDP1.lo(T1) = 0.0001;
I hope I am right and it could help you.
Edson


2011/3/9 adriano spinelli

Dear GAMS Users,

I am trying to estimate some parameters.

using this equations:

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));

It works fine. However when I extend the process to the whole data set, I get Exec Error at line 343: log: FUNC SINGULAR: x = 0

Therefore I introduce these conditions (trying with both gt0 and gt1) on my parameters

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) $ (FOOD1(T1)and trend1(T1) and GDP1(T1) gt 0) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));


and it does not work.

Any idea about the proper way of treating this issue?

Thank you very much in advance!

Adriano


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\

Edson Valle
edsoncv@gmail.com


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hi! trend1 and GDP1 are the model variables? If so, then you should apply a bound to these variables. In the blog http://yetanothermathprogrammingconsultant.blogspot.com/2009/05/domain-error-with-log.html are some way to fix the problem.

Hope this helps.

Regards,

Fabián

2011/3/9 adriano spinelli

Dear GAMS Users,

I am trying to estimate some parameters.

using this equations:

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));

It works fine. However when I extend the process to the whole data set, I get Exec Error at line 343: log: FUNC SINGULAR: x = 0

Therefore I introduce these conditions (trying with both gt0 and gt1) on my parameters

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) $ (FOOD1(T1)and trend1(T1) and GDP1(T1) gt 0) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));


and it does not work.

Any idea about the proper way of treating this issue?

Thank you very much in advance!

Adriano


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Reply-to: gamsworld@googlegroups.com

Edson and Fabian,

Thanks for your help and tips. Actually I solved the problem as follow:

fit1(T1)$(FOOD1(T1) and trend1(T1) and GDP1(T1))… log(FOOD1(T1)) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));
Best regards,
Adriano


2011/3/9 Fabián Mancilla

Hi! trend1 and GDP1 are the model variables? If so, then you should apply a bound to these variables. In the blog http://yetanothermathprogrammingconsultant.blogspot.com/2009/05/domain-error-with-log.html are some way to fix the problem.

Hope this helps.

Regards,

Fabián

2011/3/9 adriano spinelli

Dear GAMS Users,

I am trying to estimate some parameters.

using this equations:

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));

It works fine. However when I extend the process to the whole data set, I get Exec Error at line 343: log: FUNC SINGULAR: x = 0

Therefore I introduce these conditions (trying with both gt0 and gt1) on my parameters

obj1… sse1 =n= 0;
fit1(T1)… log(FOOD1(T1)) $ (FOOD1(T1)and trend1(T1) and GDP1(T1) gt 0) =e= constant1 + tc1log(trend1(T1)) + income1log(GDP1(T1));


and it does not work.

Any idea about the proper way of treating this issue?

Thank you very much in advance!

Adriano


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.