whgyu 发表于 2013-7-3 19:01
tokennize 多打了个n
太感谢您了,改了之后能运行多一点,但是又出现了以下错误,是因为我没设置初始值吗?
- quietly{
- replace `lnca'=`z0'+`z4'*ln(`y')+0.5*`z44'*(ln(`y'))^2+`z14'*ln(`y')*ln(`k1'*`pl')+`z24'*ln(`y')*ln(`k2'*`pk')
> +`z34'*ln(`y')*ln(`k3'*`pe')+`z1'*ln(`k1'*`pl')+`z2'*ln(`k2'*`pk')+`z3'*ln(`k3'*`pe')+0.5*`z11'*(ln(`k1'*`pl'))^2+0.5*
> `z22'*(ln(`k2'*`pk'))^2+0.5*`z33'*(ln(`k3'*`pe'))^2+`z12'*ln(`k1'*`pl')*ln(`k2'*`pk')+`z13'*ln(`k1'*`pl')*ln(`k3'*`pe'
> )+`z23'*ln(`k2'*`pk')*ln(`k3'*`pe')+`z15'*ln(`k1'*`pl')*`t'+`z25'*ln(`k2'*`pk')*`t'+`z35'*ln(`k3'*`pe')*`t'+`z5'*`t'+0
> .5*`z55'*`t'^2+`z45'*ln(`y')*`t'+ln((`z1'+`z15'*`t'+`z11'*ln(`k1'*`pl')+`z12'*ln(`k2'*`pk')+`z13'*ln(`k3'*`pe')+`z14'*
> ln(`y'))/`k1'+(`z2'+`z25'*`t'+`z12'*ln(`k1'*`pl')+`z22'*ln(`k2'*`pk')+`z23'*ln(`k3'*`pe')+`z24'*ln(`y'))/`k2'+(`z3'+`z
> 35'*`t'+`z13'*ln(`k1'*`pl')+`z32'*ln(`k2'*`pk')+`z33'*ln(`k3'*`pe')+`z34'*ln(`y'))/`k3')+ln(1/`b') `if'
= replace __00000G=__00002I+__000035*ln(y)+0.5*__000038*(ln(y))^2+__00002M*ln(y)*ln(__000031*pl)+__00002N*ln(y)*
> ln(__000032*pk)+__00002O*ln(y)*ln(__000033*pe)+__00002J*ln(__000031*pl)+__00002K*ln(__000032*pk)+__00002L*ln(__000033*
> pe)+0.5*__00002S*(ln(__000031*pl))^2+0.5*__00002W*(ln(__000032*pk))^2+0.5*__000030*(ln(__000033*pe))^2+__00002T*ln(__0
> 00031*pl)*ln(__000032*pk)+__00002U*ln(__000031*pl)*ln(__000033*pe)+__00002X*ln(__000032*pk)*ln(__000033*pe)+__00002P*l
> n(__000031*pl)*t+__00002Q*ln(__000032*pk)*t+__00002R*ln(__000033*pe)*t+__000036*t+0.5*__000039*t^2+__000037*ln(y)*t+ln
> ((__00002J+__00002P*t+__00002S*ln(__000031*pl)+__00002T*ln(__000032*pk)+__00002U*ln(__000033*pe)+__00002M*ln(y))/__000
> 031+(__00002K+__00002Q*t+__00002T*ln(__000031*pl)+__00002W*ln(__000032*pk)+__00002X*ln(__000033*pe)+__00002N*ln(y))/__
> 000032+(__00002L+__00002R*t+__00002U*ln(__000031*pl)+__00002Z*ln(__000032*pk)+__000030*ln(__000033*pe)+__00002O*ln(y))
> /__000033)+ln(1/__000034) if __000002
- replace `sl'=((`z1'+`z15'*`t'+`z11'*ln(`k1'*`pl')+`z12'*ln(`k2'*`pk')+`z13'*ln(`k3'*`pe')+`z14'*ln(`y'))/`k1')
> /((`z1'+`z15'*`t'+`z11'*ln(`k1'*`pl')+`z12'*ln(`k2'*`pk')+`z13'*ln(`k3'*`pe')+`z14'*ln(`y'))/`k1'+(`z2'+`z25'*`t'+`z12
> '*ln(`k1'*`pl')+`z22'*ln(`k2'*`pk')+`z23'*ln(`k3'*`pe')+`z24'*ln(`y'))/`k2'+(`z3'+`z35'*`t'+`z31'*ln(`k1'*`pl')+`z32'*
> ln(`k2'*`pk')+`z33'*ln(`k3'*`pe')+`z34'*ln(`y'))/`k3') `if'
= replace __000011=((__00002J+__00002P*t+__00002S*ln(__000031*pl)+__00002T*ln(__000032*pk)+__00002U*ln(__000033*
> pe)+__00002M*ln(y))/__000031)/((__00002J+__00002P*t+__00002S*ln(__000031*pl)+__00002T*ln(__000032*pk)+__00002U*ln(__00
> 0033*pe)+__00002M*ln(y))/__000031+(__00002K+__00002Q*t+__00002T*ln(__000031*pl)+__00002W*ln(__000032*pk)+__00002X*ln(_
> _000033*pe)+__00002N*ln(y))/__000032+(__00002L+__00002R*t+__00002Y*ln(__000031*pl)+__00002Z*ln(__000032*pk)+__000030*l
> n(__000033*pe)+__00002O*ln(y))/__000033) if __000002
- replace `sk'=((`z2'+`z25'*`t'+`z12'*ln(`k1'*`pl')+`z22'*ln(`k2'*`pk')+`z23'*ln(`k3'*`pe')+`z24'*ln(`y'))/`k2')
> /((`z1'+`z15'*`t'+`z11'*ln(`k1'*`pl')+`z12'*ln(`k2'*`pk')+`z13'*ln(`k3'*`pe')+`z14'*ln(`y'))/`k1'+(`z2'+`z25'*`t'+`z12
> '*ln(`k1'*`pl')+`z22'*ln(`k2'*`pk')+`z23'*ln(`k3'*`pe')+`z24'*ln(`y'))/`k2'+(`z3'+`z35'*`t'+`z31'*ln(`k1'*`pl')+`z32'*
> ln(`k2'*`pk')+`z33'*ln(`k3'*`pe')+`z34'*ln(`y'))/`k3') `if'
= replace __00001M=((__00002K+__00002Q*t+__00002T*ln(__000031*pl)+__00002W*ln(__000032*pk)+__00002X*ln(__000033*
> pe)+__00002N*ln(y))/__000032)/((__00002J+__00002P*t+__00002S*ln(__000031*pl)+__00002T*ln(__000032*pk)+__00002U*ln(__00
> 0033*pe)+__00002M*ln(y))/__000031+(__00002K+__00002Q*t+__00002T*ln(__000031*pl)+__00002W*ln(__000032*pk)+__00002X*ln(_
> _000033*pe)+__00002N*ln(y))/__000032+(__00002L+__00002R*t+__00002Y*ln(__000031*pl)+__00002Z*ln(__000032*pk)+__000030*l
> n(__000033*pe)+__00002O*ln(y))/__000033) if __000002
- }
------------------------------------------------------------------------------------------- end nlsurmytrans ---
- }
--------------------------------------------------------------------------------------- end nlsur.FunctionEval ---
- forvalues i = 1/$NLS_neqn {
= forvalues i = 1/3 {
- capture assert ${NLS_yhat`i'} < . if `touse'
= capture assert __00000G < . if __000002
- if _rc {
- noi di in red "could not evaluate equation `i'"
= noi di in red "could not evaluate equation 1"
could not evaluate equation 1
- noi di in red "starting values invalid or some RHS variables have missing values"
starting values invalid or some RHS variables have missing values
- exit 480
}
qui replace ${NLS_resid`i'} = ${NLS_yname`i'} - ${NLS_yhat`i'} if `touse'
}
----------------------------------------------------------------------------------------------- end nlsur.MinSSQ ---
----------------------------------------------------------------------------------------------- end nlsur.Estimate ---
---------------------------------------------------------------------------------------------------------- end nlsur ---
r(480);