Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: retruned r(198) in -nlsur-


From   [email protected]
To   Statalist <[email protected]>
Subject   st: retruned r(198) in -nlsur-
Date   Fri, 13 Mar 2009 20:37:35 -0400

Hi all,

I tried to modify the func_prog program. The program 'welllll' seems being successfully modefied. However, when I typed -nlsur-, there comes the error:

nlsurwelllll returned 198
verify that nlsurwe is a function evaluator program
r(198);

What kind of problem may cause the error? I list all my codes following to ask if there is any big construction error here. Thanks!


program nlsurwelllll

        version 10

        syntax varlist(min=63 max=63) if, at(name)

        tokenize 'varlist'
args lnc sl sk sm lnpl lnpk lnpm lnpe lnq halflnqlnq lnpllnq lnpklnq lnpmlnq lnpelnq lnqt lnqd1 lnqd2 lnqd3 lnqd4 lnqd5 lnqd6 t halftt lnplt lnpkt lnpmt lnpet d1 d2 d3 d4 d5 d6 td1 td2 td3 td4 td5 td6 lnpld1 lnpld2 lnpld3 lnpld4 lnpld5 lnpld6 lnpkd1 lnpkd2 lnpkd3 lnpkd4 lnpkd5 lnpkd6 lnpmd1 lnpmd2 lnpmd3 lnpmd4 lnpmd5 lnpmd6 lnped1 lnped2 lnped3 lnped4 lnped5 lnped6

        tempname al ak am ae
        scalar 'al'='at'[1,1]
        scalar 'ak'='at'[1,2]
        scalar 'am'='at'[1,3]
        scalar 'ae'= 1-'al'-'ak'-'am'

        tempname aq aqq
        scalar 'aq'='at'[1,4]
        scalar 'aqq'='at'[1,5]

        tempname blq bkq bmq beq
        scalar 'blq'='at'[1,6]
        scalar 'bkq'='at'[1,7]
        scalar 'bmq'='at'[1,8]
        scalar 'beq'=-'blq'-'bkq'-'bmq'

        tempname bqt bq1 bq2 bq3 bq4 bq5 bq6
        scalar 'bqt'='at'[1,9]
        scalar 'bq1'='at'[1,10]
        scalar 'bq2'='at'[1,11]
        scalar 'bq3'='at'[1,12]
        scalar 'bq4'='at'[1,13]
        scalar 'bq5'='at'[1,14]
        scalar 'bq6'='at'[1,15]

        tempname at att blt bkt bmt bet
        scalar 'at'='at'[1,16]
        scalar 'att'='at'[1,17]
        scalar 'blt'='at'[1,18]
        scalar 'bkt'='at'[1,19]
        scalar 'bmt'='at'[1,20]
        scalar 'bet'= -'blt'-'bkt'-'bmt'

        tempname d1 d2 d3 d4 d5 d6 bt1 bt2 bt3 bt4 bt5 bt6
        scalar 'd1'='at'[1,21]
        scalar 'd2'='at'[1,22]
        scalar 'd3'='at'[1,23]
        scalar 'd4'='at'[1,24]
        scalar 'd5'='at'[1,25]
        scalar 'd6'='at'[1,26]
        scalar 'bt1'='at'[1,27]
        scalar 'bt2'='at'[1,28]
        scalar 'bt3'='at'[1,29]
        scalar 'bt4'='at'[1,30]
        scalar 'bt5'='at'[1,31]
        scalar 'bt6'='at'[1,32]

tempname bl1 bl2 bl3 bl4 bl5 bl6 bk1 bk2 bk3 bk4 bk5 bk6 bm1 bm2 bm3 bm4 bm5 bm6 be1 be2 be3 be4 be5 be6
        scalar 'bl1'='at'[1,33]
        scalar 'bl2'='at'[1,34]
        scalar 'bl3'='at'[1,35]
        scalar 'bl4'='at'[1,36]
        scalar 'bl5'='at'[1,37]
        scalar 'bl6'='at'[1,38]
        scalar 'bk1'='at'[1,39]
        scalar 'bk2'='at'[1,40]
        scalar 'bk3'='at'[1,41]
        scalar 'bk4'='at'[1,42]
        scalar 'bk5'='at'[1,43]
        scalar 'bk6'='at'[1,44]
        scalar 'bm1'='at'[1,45]
        scalar 'bm2'='at'[1,46]
        scalar 'bm3'='at'[1,47]
        scalar 'bm4'='at'[1,48]
        scalar 'bm5'='at'[1,49]
        scalar 'bm6'='at'[1,50]
        scalar 'be1'='at'[1,51]
        scalar 'be2'='at'[1,52]
        scalar 'be3'='at'[1,53]
        scalar 'be4'='at'[1,54]
        scalar 'be5'='at'[1,55]
scalar 'be6'=-'bl1'-'bl2'-'bl3'-'bl4'-'bl5'-'bl6'-'bm1'-'bm2'-'bm3'-'bm4'-'bm5'-'bm6'-'be1'-'be2'-'be3'-'be4'-'be5'

        tempname dll dkl dkk dml dmk dmm
        scalar 'dll'='at'[1,56]
        scalar 'dkl'='at'[1,57]
        scalar 'dkk'='at'[1,58]
        scalar 'dml'='at'[1,59]
        scalar 'dmk'='at'[1,60]
        scalar 'dmm'='at'[1,61]



        tempname gll glk glm gle
        tempname gkl gkk gkm gke
        tempname gml gmk gmm gme
        tempname gel gek gem gee
        scalar 'gll'=-'dll'+'al'-'al*al'
        scalar 'glk'=-'dll*dkl'-'al*ak'
        scalar 'glm'=-'dll*dml'-'al*am'
        scalar 'gle'=-'gll'-'glk'-'glm'

        scalar 'gkl'='glk'
        scalar 'gkk'=-'dkl*dkl'-'dkk*dkk'+'ak'-'ak*ak'
        scalar 'gkm'=-'dkl*dml'-'dkk*dmk'-'ak*am'
        scalar 'gke'=-'gkl'-'gkk'-'gkm'

        scalar 'gml'='glm'
        scalar 'gmk'='gkm'
        scalar 'gmm'=-'dml*dml'-'dmk*dmk'-'dmm*dmm'+'am'-'am*am'
        scalar 'gme'=-'gml'-'gmk'-'gmm'

        scalar 'gel'='gle'
        scalar 'gek'='gke'
        scalar 'gem'='gme'
        scalar 'gee'=-'gel'-'gek'-'gem'



       quietly {
                tempvar lnpindex
gen double 'lnpindex' = 5+'al'*'lnpl'+'ak'*'lnpk'+'am'*'lnpm'+'ae'*'lnpe'
                forvalues i=l/e {
                        forvalues j = l/e {
replace 'lnpindex'='lnpindex'+0.5*'g'i''j''*'lnp'i''*'lnp'j''
                        }
                }
replace 'lnc' = 'aq'*'lnq'+'al'*lnpl+'ak'*'lnpk'+'am'*'lnpm'+'ae'*'lnpe'+'blq'*'lnpllnq'+'bkq'*'lnpklnq'+'bmq'*'lnpmlnq'+'beq'*'lnpelnq'+'aqq'*'halflnqlnq'+'at'*'t'+'att'*'halftt'+'blt'*'lnplt'+'bkt'*'lnpkt'+'bmt'*'lnpmt'+'bet'*'lnpet'+'bqt'*'lnqt'+'ad1'*'d1'+'ad2'*'d2'+'ad3'*'d3'+'ad4'*'d4'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q lnpmlnq lnpelnq lnqt lnqd1 lnqd2 lnqd3 lnqd4 lnqd5 lnqd6 t halftt lnplt lnpkt lnpmt lnpet d1 d2 d3 d4 d5 d6 td1 td2 td3 td4 td5 td6 lnpld1 lnpld2 lnpld3 lnpld4 lnpld5 lnpld6 lnpkd1 lnpkd2 lnpkd3 lnpkd4 lnpkd5 lnpkd6 lnpmd1 lnpmd2 lnpmd3 lnpmd4 lnpmd5 lnpmd6 lnped1 lnped2 lnped3 lnped4 lnped5 lnped6, parameters(al ak am aq aqq blq bkq bmq bqt bq1 bq2 bq3 bq4 bq5 bq6 at att blt bkt bmt d1 d2 d3 d4 d5 d6 bt1 bt2 bt3 bt4 bt5 bt6 bl1 bl2 bl3 bl4 bl5 bl6 bk1 bk2 bk3 bk4 bk5 bk6 bm1 bm2 bm3 bm4 bm5 bm6 be1 be2 be3 be4 be5 dkl dkk dml dmk dmm) neq(4) ifgnls



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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index