People are helping you. You have to help yourself. And help them help you.
Hello Gareth,
Yes, you're right. But I already mentioned my problem. Okay I will re-explain what I do.
I'm having the following equation with variables W, X, Y, and Z, and I need to estimate the constants C1, C2, C3, and C4. However, I want C2 to be no smaller than zero (C2>0):
W = C1 + C2*(1/X) + C3*(Y/X) + C4*(Z/X)
The post: viewtopic.php?f=4&t=48&p=99 says for one-sided constraints like c no larger than 1 we should use [1-Exp(c)] hack. Since in my case C2 should be no smaller than zero, I dont know if I should put -Exp(c) or Exp(c) or sth else. Anyway I tried both -Exp(c) or Exp(c) and I got the following results for each command:
The first command: w c(1) (@exp(c(2)))*(1/x) (y/x) (z/x)
The first output:
The second command: w c(1) (-@exp(c(2)))*(1/x) (y/x) (z/x)
The second output:
As you can in both results, I get values inside both the Exp, which I dont know if I should ignore the values or they should be considered when calculating the primary constant. Also the coefficient value that both tables show me does not make sense as any outcome of Exp should it positive.
Anyway I changed the constraint in my problem from C2>=0 to 0<=C2<= 2 so I try the logit hack, i.e. (H-L)*@Logit(c(2)) + L. So, for my constraint I used 2*@Logit(c(2)) in the equation as in the following command and I got the following results table:
The first command: w c(1) (2*@logit(c(2)))*(1/x) (y/x) (z/x)
The first output:
Though the value for coefficient makes sense, unlike the values for the Exps, I still get values inside the logit expression as you can see in the table, which I dont know if it's normal.
Just one more thing: When I use the same commands and run the estimation function, the answer for the coefficient changes constantly. I dont know why this happens. For example this is the results for a second run for the first command which is different compared to the first table of results:
I have attached my data here as well in case someone needed to do it on their PC.
Thanks so very much for your cooperation and I look forward to your help.
Regards,