[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: Return r(111) this time
From
[email protected]
To
[email protected]
Subject
Re: st: RE: Return r(111) this time
Date
Sun, 15 Mar 2009 17:21:13 -0400
My data combine 4 regions together with dummy variables as following
sm se t d1 d2
.6592281 .027027 1 1 0
.7192982 .0263158 2 1 0
.7461538 .0230769 3 1 0
.7723577 .0243902 4 1 0
.7862595 .0229008 5 1 0
.8114285 .0171429 6 1 0
.8058823 .0176471 7 1 0
.8171428 .0171429 8 1 0
.7743902 .0182927 9 1 0
.7607362 .0245399 10 1 0
.755102 .0272109 11 1 0
.7569444 .0208333 12 1 0
.7588652 .0212766 13 1 0
.7536232 .0217391 14 1 0
.736 .024 15 1 0
.725 .0333333 16 1 0
.7629629 .0222222 17 1 0
.760274 .0273973 18 1 0
.5359314 .0367697 1 0 1
.5833333 .0357143 2 0 1
.62 .04 3 0 1
.6037736 .0377358 4 0 1
.6962963 .0222222 5 0 1
.6805556 .0208333 6 0 1
.7375 .01875 7 0 1
.7484277 .0188679 8 0 1
.7465754 .0205479 9 0 1
.7191781 .0273973 10 0 1
.7142857 .0225564 11 0 1
.7152778 .0208333 12 0 1
.7092199 .0212766 13 0 1
.6953125 .03125 14 0 1
.7177419 .0322581 15 0 1
.7213115 .0327869 16 0 1
.7122302 .0215827 17 0 1
.7103449 .0275862 18 0 1
.6496138 .041598 1 0 0
.7070707 .040404 2 0 0
.6952381 .047619 3 0 0
.7102804 .0373832 4 0 0
.7272727 .0363636 5 0 0
.7438017 .0330578 6 0 0
.7537314 .0298507 7 0 0
.7569444 .0347222 8 0 0
.7357143 .0357143 9 0 0
.76 .0266667 10 0 0
.78125 .025 11 0 0
.7449664 .0268456 12 0 0
.7375886 .035461 13 0 0
.7142857 .037594 14 0 0
.7251908 .0305344 15 0 0
.7209302 .0310078 16 0 0
.7307692 .0384615 17 0 0
.7132353 .0367647 18 0 0
.6315789 .0345543 1 0 0
.6315789 .037594 2 0 0
.6258993 .0431655 3 0 0
.6090226 .0451128 4 0 0
.620438 .0437956 5 0 0
.610687 .0458015 6 0 0
.6736111 .0416667 7 0 0
.6394558 .0408163 8 0 0
.6470588 .0392157 9 0 0
.6547619 .0357143 10 0 0
.6566265 .0361446 11 0 0
.6526946 .0299401 12 0 0
.6521739 .0310559 13 0 0
.6325301 .0361446 14 0 0
.6369048 .0416667 15 0 0
.6453488 .0406977 16 0 0
.6436782 .045977 17 0 0
.6436782 .045977 18 0 0
.6698113 .0260135 1 0 0
.6698113 .0283019 2 0 0
.6697248 .0275229 3 0 0
.6666667 .0285714 4 0 0
.6315789 .0263158 5 0 0
.6694915 .0254237 6 0 0
.716129 .0258065 7 0 0
.7356322 .0344828 8 0 0
.7368421 .0233918 9 0 0
.7431694 .0218579 10 0 0
.7235294 .0235294 11 0 0
.70625 .025 12 0 0
.7142857 .0310559 13 0 0
.7586207 .0413793 14 0 0
.6923077 .027972 15 0 0
.6766917 .037594 16 0 0
.6842105 .037594 17 0 0
.7007299 .0437956 18 0 0
.6422764 .0373636 1 0 0
.6422764 .0406504 2 0 0
.6446281 .0495868 3 0 0
.6341463 .0487805 4 0 0
.632 .04 5 0 0
.6532258 .0322581 6 0 0
.6814815 .0296296 7 0 0
.6595744 .0283688 8 0 0
.6758621 .0206897 9 0 0
.7012987 .025974 10 0 0
.7019867 .0198676 11 0 0
.6973684 .0263158 12 0 0
.69375 .025 13 0 0
.7065868 .0239521 14 0 0
.7025316 .0316456 15 0 0
.7168674 .0301205 16 0 0
.7142857 .0357143 17 0 0
.718232 .0220994 18 0 0
.6666667 .0167117 1 0 0
.6666667 .0181818 2 0 0
.6666667 .0175439 3 0 0
.671875 .015625 4 0 0
.6836734 .0204082 5 0 0
.7040817 .0204082 6 0 0
.733945 .0183486 7 0 0
.75 .015873 8 0 0
.7572464 .0144928 9 0 0
.7695035 .0177305 10 0 0
.7676057 .0176056 11 0 0
.7822878 .0184502 12 0 0
.7814815 .0185185 13 0 0
.755814 .0232558 14 0 0
.756 .02 15 0 0
.7448559 .0246914 16 0 0
.6525822 .028169 17 0 0
.6359649 .0263158 18 0 0
Does the time variable cause the problem?
Jingjing
Quoting Eva Poen <[email protected]>:
Jingjing,
I'm not sure I understand you here. Are you referring to the line
replace `lnc' = 5+`aq'*`lnq' ...
where there is a hard coded 5 (not a starting value! This is a set
value.), and did you replace this value of 5 by another parameter,
e.g. `a0'? In terms of the program, that is not a problem as long as
you adjust your code. It would be easiest if you put this parameter
last, since this saves you the pain of changing all your `at'[1,x]
statements to `at'[1,x+1]. Therefore, my suggestion would be to code
scalar `dmm'=`at'[1,61]
tempname a0
scalar `a0' =`at'[1,62]
quietly {
replace `lnc' = `a0'+ ....
}
Now, for the debugging, just follow my suggestions earlier, and invoke
your program directly. You need to create a matrix of initial values,
e.g. zeros for all coefficients. If you have 62 parameters, you do
matrix a = J(1,62,0)
which gives you a row vector of 62 zeros. Next create copies of all
your dependent variables, and invoke your program:
set trace on
nlsurwellbehav "copies of dep. variables" "right hand side variables" , at(a)
and see where the problem lies.
Eva
2009/3/15 <[email protected]>:
Hi,
First, I corrected all the typo.
Then I changed constant item 5 to a0 in the first equation. I setted
constant item a0 as a strating value 5 in my previous codes, because they
did so in the example. Now I decide to scalar a new coef. a0. Is that ok? Or
I need to set the constant item at other starting value?
Second, I typed -set trace on- before running the stuff. Here's the error
record:
}
-------------------------------------------------------------- end
nlsurwellbehav ---
- }
- if _rc {
- di as error "nlsur`eqn' returned " _rc
= di as error "nlsurwellbehav returned " _rc
nlsurwellbehav returned 111
- di as error "verify that nlsur`eqn' is a function evaluator program"
= di as error "verify that nlsurwellbehav is a function evaluator program"
verify that nlsurwellbehav is a function evaluator program
- exit _rc
}
}
---------------------------------------------------------------- end
nlsur.Estimate ---
end nlsur ---
r(111);
I am thinking there maybe another kind of errors in my codes. Say there's
two items in my equation: a*lne and b*lne*lne. I think I should define
them as:
replace `lnc'=`a'*`lne'+`b'*``lnpe'*`lne''
In my previous codes I defined them as:
`lnc'=`a'*`lne'+`b'*`lnpe'*`lne'
Does it cause the r(111)?
Jingjing
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |