Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    It is not clear what the problem is anymore. So, you changed w1 to `w1', etc.? If so are you still getting errors, and what are they? Show us the most recent code and output, using code tags (see pt. 12 of the FAQ) Like Nick and I said before, I would also try running the commands with trace on. It might then be obvious to you what the problem is, or at least where it is located. And, like I also suggested before, starting with fewer variables and then gradually adding more might help to identify the problem. Unless you are willing and able to share the data, it is hard to look through a very long block of code and easily identify the problem, so you need to help us out a bit more.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #17
      Dear Colleagues and Richard Williams

      First some information concerning to previous post, I tried to change nlsur nlsurquaidsNPS into nlsur nlsurquaid13 on purpose to check but didn't worked,

      and

      I am using Stata 13.1

      wp= is log of prices
      w= is expenditure share of goods,
      x= household demographics
      Moreover, I have tried to reduce variables from 7 goods to 4 goods from 5 demographics to 2 but anywhere the results of 7 or 4 goods coming up with this error message:

      nlsurnlsurquaidsNPS returned 199
      verify that nlsurnlsurquaidsNPS is a function evaluator program
      r(199);


      and all my other changes didn't save, because didn't worked and didn't helped

      Therefore, codes more less similar to previous one:

      Thank you


      Code:

      cap program drop nlsurquaidsNPS
      #delimit;
      program nlsurquaidsNPS;
      version 13.1;
      syntax varlist(min=20 max=20) if, at(name);
      tokenize `varlist';
      args w1 w2 w3 w4 w5 w6 w7 wp1 wp2 wp3 wp4 wp5 wp6 wp7 lnexp x1 x2 x3 x4 x5;

      ************************************************
      ***parameters are best viewed as a single vector
      ***********************************************
      ********first 7 alphas*************************
      tempname a1 a2 a3 a4 a5 a6 a7;
      scalar `a1' = `at'[1,1];
      scalar `a2' = `at'[1,2];
      scalar `a3' = `at'[1,3];
      scalar `a4' = `at'[1,4];
      scalar `a5' = `at'[1,5];
      scalar `a6' = `at'[1,6];
      scalar `a7' = 1 - `a1' - `a2' - `a3'- `a4' - `a5'- `a6';

      ******first 7 betas****************************
      tempname b1 b2 b3 b4 b5 b6 b7;
      scalar `b1' = `at'[1,7];
      scalar `b2' = `at'[1,8];
      scalar `b3' = `at'[1,9];
      scalar `b4' = `at'[1,10];
      scalar `b5' = `at'[1,11];
      scalar `b6' = `at'[1,12];
      scalar `b7' = -`b1' - `b2' - `b3' - `b4'- `b5' - `b6';

      ****vector gamma star k rows and columns of gamma***

      tempname g11 g12 g13 g14 g15 g16 g17;
      tempname g21 g22 g23 g24 g25 g26 g27;
      tempname g31 g32 g33 g34 g35 g36 g37;
      tempname g41 g42 g43 g44 g45 g46 g47;
      tempname g51 g52 g53 g54 g55 g56 g57;
      tempname g61 g62 g63 g64 g65 g66 g67;
      tempname g71 g72 g73 g74 g75 g76 g77;

      scalar `g11' = `at'[1,13];
      scalar `g12' = `at'[1,14];
      scalar `g13' = `at'[1,15];
      scalar `g14' = `at'[1,16];
      scalar `g15' = `at'[1,17];
      scalar `g16' = `at'[1,18];
      scalar `g17' = -`g11' - `g12' - `g13' - `g14'- `g15' - `g16';

      scalar `g21' = `g12';
      scalar `g22' = `at'[1,19];
      scalar `g23' = `at'[1,20];
      scalar `g24' = `at'[1,21];
      scalar `g25' = `at'[1,22];
      scalar `g26' = `at'[1,23];
      scalar `g27' = -`g21' - `g22' - `g23' - `g24'- `g25' - `g26';

      scalar `g31' = `g13';
      scalar `g32' = `g23';
      scalar `g33' = `at'[1,24];
      scalar `g34' = `at'[1,25];
      scalar `g35' = `at'[1,26];
      scalar `g36' = `at'[1,27];
      scalar `g37' = -`g31' - `g32' - `g33' - `g34'- `g35' - `g36';

      scalar `g41' = `g14';
      scalar `g42' = `g24';
      scalar `g43' = `g34';
      scalar `g44' = `at'[1,28];
      scalar `g45' = `at'[1,29];
      scalar `g46' = `at'[1,30];
      scalar `g47' = -`g41' - `g42' - `g43' - `g44'- `g45' - `g46';

      scalar `g51' = `g15';
      scalar `g52' = `g25';
      scalar `g53' = `g35';
      scalar `g54' = `g45';
      scalar `g55' = `at'[1,31];
      scalar `g56' = `at'[1,32];
      scalar `g57' = -`g51' - `g52' - `g53' - `g54'- `g55' - `g56';

      scalar `g61' = `g16';
      scalar `g62' = `g26';
      scalar `g63' = `g36';
      scalar `g64' = `g46';
      scalar `g65' = `g56';
      scalar `g66' = `at'[1,33];
      scalar `g67' = -`g61' - `g62' - `g63' - `g64'- `g65' - `g66';

      scalar `g71' = `g17';
      scalar `g72' = `g27';
      scalar `g73' = `g37';
      scalar `g74' = `g47';
      scalar `g75' = `g57';
      scalar `g76' = `g67';
      scalar `g77' = -`g71' - `g72' - `g73' - `g74'- `g75' - `g76';

      ******first 7 lambdas***************************
      tempname l1 l2 l3 l4 l5 l6 l7;
      scalar `l1' = `at'[1,34];
      scalar `l2' = `at'[1,35];
      scalar `l3' = `at'[1,36];
      scalar `l4' = `at'[1,37];
      scalar `l5' = `at'[1,38];
      scalar `l6' = `at'[1,39];
      scalar `l7' = - `l1' - `l2' - `l3' - `l4'- `l5' - `l6';

      *******constant and household demographics**************

      tempname r11 r12 r13 r14 r15;
      tempname r21 r22 r23 r24 r25;
      tempname r31 r32 r33 r34 r35;
      tempname r41 r42 r43 r44 r45;
      tempname r51 r52 r53 r54 r55;
      tempname r61 r62 r63 r64 r65;
      tempname r71 r72 r73 r74 r75;

      scalar `r11' = `at'[1,40];
      scalar `r12' = `at'[1,41];
      scalar `r13' = `at'[1,42];
      scalar `r14' = `at'[1,43];
      scalar `r15' = `at'[1,44];


      scalar `r21' = `at'[1,45];
      scalar `r22' = `at'[1,46];
      scalar `r23' = `at'[1,47];
      scalar `r24' = `at'[1,48];
      scalar `r25' = `at'[1,49];

      scalar `r31' = `at'[1,50];
      scalar `r32' = `at'[1,51];
      scalar `r33' = `at'[1,52];
      scalar `r34' = `at'[1,53];
      scalar `r35' = `at'[1,54];

      scalar `r41' = `at'[1,55];
      scalar `r42' = `at'[1,56];
      scalar `r43' = `at'[1,57];
      scalar `r44' = `at'[1,58];
      scalar `r45' = `at'[1,59];

      scalar `r51' = `at'[1,60];
      scalar `r52' = `at'[1,61];
      scalar `r53' = `at'[1,62];
      scalar `r54' = `at'[1,63];
      scalar `r55' = `at'[1,64];

      scalar `r61' = `at'[1,65];
      scalar `r62' = `at'[1,66];
      scalar `r63' = `at'[1,67];
      scalar `r64' = `at'[1,68];
      scalar `r65' = `at'[1,69];

      scalar `r71' = `at'[1,70];
      scalar `r72' = `at'[1,71];
      scalar `r73' = `at'[1,72];
      scalar `r74' = `at'[1,73];
      scalar `r75' = `at'[1,74];


      // calculate the expenditure shares.
      quietly {;
      // price index
      // with set a_0 = 5
      tempvar lnpindex;
      gen double`lnpindex'= 5 + `a1'*`wp1' + `a2'*`wp2' + `a3'*`wp3' + `a4'*`wp4'+ `a5'*`wp5' + `a6'*`wp6' + `a7'*`wp7';
      forvalues i= 1/7 {;
      forvalues j= 1/7 {;
      replace`lnpindex'=`lnpindex' + 0.5*`g`i'`j''*`wp`i''*`wp`j'';
      };
      };
      // The b(p) term in the QUAIDS model:
      tempvar bofp;
      gen double`bofp'= 0;
      forvalues i= 1/7 {;
      replace`bofp'=`bofp' + `lnp`i''*`b`i'';
      };
      replace`bofp'=exp(`bofp');

      // Finally, the expenditure shares for 6 of the 7
      // goods (the fourth is dropped to avoid singularity)
      replace w1=(`a1' + `g11'*`wp1' + `g12'*`wp2' + `g13'*`wp3' + `g14'*`wp4' + `g15'*`wp5' + `g16'*`wp6' + `g17'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
      +`l1'/`bofp'*(`lnexp' - `lnpindex')^2 + `r11'*`x1' +`r12'*`x2' +`r13'*`x3' +`r14'*`x4'+`r15'*`x5');

      replace w2=(`a2' + `g21'*`wp1' + `g22'*`wp2' + `g23'*`wp3' + `g24'*`wp4' + `25'*`wp5' + `g26'*`wp6' + `g27'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
      + `l2'/`bofp'*(`lnexp' - `lnpindex')^2 + `r21'*`x1' +`r22'*`x2' +`r23'*`x3' +`r24'*`x4'+`r25'*`x5');

      replace w3=(`a3' + `g31'*`wp1' + `g32'*`wp2' + `g33'*`wp3' + `g34'*`wp4' + `35'*`wp5' + `g36'*`wp6' + `g37'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
      + `l3'/`bofp'*(`lnexp' - `lnpindex')^2 + `r31'*`x1' +`r32'*`x2' +`r33'*`x3' +`r34'*`x4'+`r35'*`x5');

      replace w4=(`a4' + `g41'*`wp1' + `g42'*`wp2' + `g43'*`wp3' + `g44'*`wp4' + `45'*`wp5' + `g46'*`wp6' + `g47'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
      + `l4'/`bofp'*(`lnexp' - `lnpindex')^2 + `r41'*`x1' +`r42'*`x2' +`r43'*`x3' +`r44'*`x4'+`r45'*`x5');

      replace w5=(`a5' + `g51'*`wp1' + `g52'*`wp2' + `g53'*`wp3' + `g54'*`wp4' + `55'*`wp5' + `g56'*`wp6' + `g57'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
      + `l5'/`bofp'*(`lnexp' - `lnpindex')^2 + `r51'*`x1' +`r52'*`x2' +`r53'*`x3' +`r54'*`x4'+`r55'*`x5');

      replace w6=(`a6' + `g61'*`wp1' + `g62'*`wp2' + `g63'*`wp3' + `g64'*`wp4' + `65'*`wp5' + `g66'*`wp6' + `g67'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
      + `l6'/`bofp'*(`lnexp' - `lnpindex')^2 + `r61'*`x1' +`r62'*`x2' +`r63'*`x3' +`r64'*`x4'+`r65'*`x5');

      replace w7=(`a7' + `g71'*`wp1' + `g72'*`wp2' + `g73'*`wp3' + `g74'*`wp4' + `75'*`wp5' + `g76'*`wp6' + `g77'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
      + `l7'/`bofp'*(`lnexp' - `lnpindex')^2 + `r71'*`x1' +`r72'*`x2' +`r73'*`x3' +`r74'*`x4'+`r75'*`x5');
      };
      end;

      nlsur nlsurquaidsNPS @ w1 w2 w3 w4 w5 w6 w7 wp1 wp1 wp2 wp3 wp4 wp5 wp6 wp7 lnexp x1 x2 x3 x4 x5, ifgnls nequations(7) parameters(a1 a2 a3 a4 a5 a6 a7 b1///
      b2 b3 b4 b5 b6 b7 g11 g12 g13 g14 g15 g16 g17 g22 g23 g24 g25 g26 g27 g33 g34 g35 g36 g37 g44 g45 g46 g47 g55 g56 g57 g66 g67 g77 l1 l2 l3 l4 l5 l6 ///
      l7 r11 r12 r13 r14 r15 r21 r22 r23 r24 r25 r31 r32 r33 r34 r35 r36 r37 r41 r42 r43 r44 r45 r46 r47 r51 r52 r53 r54 r55 r61 r62 r63 r64 r65 r71 r72 r73///
      r74 r75) nolog;


      Thank you

      Comment


      • #18
        You have not told us what the error message that results from the code you presented in #12 and #17.

        Please review the Statalist FAQ linked to from the top of the page, as well as from the Advice on Posting link on the page you used to create your post. See especially sections 9-12 on how to best pose your question.

        Having done that, try the following. I am assuming you continue to use #delimit ; and you should use the log option rather than the nolog option until you get your program to work.

        Code:
        program dir;
        nlsur nlsurquaidsNPS @ w1 w2 w3 w4 w5 w6 w7 wp1 wp1 wp2 wp3 wp4 wp5 wp6 wp7 lnexp x1 x2 x3 x4 x5, ifgnls neq(7) parameters(a1 a2 a3 a4 a5 a6 a7 b1 b2 b3 b4 b5 b6 b7 g11 g12 g13 g14 g15 g16 g17 g22 g23 g24 g25 g26 g27 g33 g34 g35 g36 g37 g44 g45 g46 g47 g55 g56 g57 g66 g67 g77 l1 l2 l3 l4 l5 l6 l7 r11 r12 r13 r14 r15 r21 r22 r23 r24 r25 r31 r32 r33 r34 r35 r36 r37 r41 r42 r43 r44 r45 r46 r47 r51 r52 r53 r54 r55 r61 r62 r63 r64 r65 r71 r72 r73 r74 r75) log;
        This was copied from #12 above. If as in #17 you now use /// to break long lines, be sure to leave a space before the ///.

        Then copy from your Stata results window everything between the program dir command and the error message Stata presents and paste this into a Statalist post using CODE delimiters, as described in section 12 of the FAQ.

        In case the instructions for creating CODE delimiters are not clear to you, here is an example of how to create them manually.

        [code]
        // sample code
        sysuse auto, clear
        describe
        [/code]

        will be presented in the post as the following CODE block:
        Code:
        // sample code
        sysuse auto, clear
        describe
        Last edited by William Lisowski; 18 Jan 2016, 08:53.

        Comment


        • #19
          Try inserting spaces before the single quotes within

          Code:
          gen double`lnpindex'= 
          
          replace`lnpindex'=
          
          gen double`bofp'= 0;
          (and others of the same kind)

          i.e.

          Code:
          gen double `lnpindex'= 
          
          replace `lnpindex'=
          
          gen double `bofp'= 0;
          (and others of the same kind)

          Comment


          • #20
            Dear William Lisowski

            do you mean this:
            Code:
            //
            
            . program dir;
                      5926  nlsurquaidsNPS
              ado      334  _find_tsops
              ado     1251  tsunab
              ado      481  _vce_parse.ParseVCE
              ado     3477  _vce_parse
              ado      878  opts_exclusive
              ado      445  _get_diopts.Wrapon
              ado     3120  _get_diopts
              ado      905  _on_colon_parse
              ado      186  _vce_parserun.MYRESULT
              ado      282  _vce_parserun.WgtMessage
              ado      475  _vce_parserun.unabVCEtype
              ado      245  _vce_parserun.Check4Level
              ado      509  _vce_parserun.ParseVCErest
              ado     7442  _vce_parserun
              ado      512  nlsur.CalcErrCov
              ado     3192  nlsur.MinSSQ
              ado     1109  nlsur.FunctionDeriv
              ado      561  nlsur.FunctionEval
              ado     2233  nlsur.NLSURout
              ado    20018  nlsur.Estimate
              ado      594  nlsur
             mata     2328  nlsur.CalcRobustVCE()
             mata     1408  nlsur.CalcReg()
             mata      904  nlsur.CalcSumSQ()
              ado      673  label
              ado     1969  winsor
              ado      181  rename
             mata      424  rename.ordinal_suffix()
             mata      380  rename.expand_varlist()
             mata      524  rename.list_subtract()
             mata     1056  rename.nonuniqrows()
             mata      688  rename.match_debug()
             mata      836  rename.dump_options()
             mata      784  rename.dump_xlate_tt()
             mata     2180  rename.dump_pattern()
             mata      656  rename.error_subscripts_in_old()
             mata      768  rename.error_subscript_invalid()
             mata      988  rename.error_newnumber_subscripted()
             mata      632  rename.error_inside_brackets()
             mata      600  rename.error_no_right_bracket()
             mata      964  rename.error_wildcardmatch_hash()
             mata     1020  rename.error_wildcardmatch_qm()
             mata     1760  rename.error_too_many_wildcards()
             mata      848  rename.error_missing_ETnum()
             mata      772  rename.error_strlist_length()
             mata     1476  rename.error_too_many_renumbers()
             mata      820  rename.error_patternlengths_unequal()
             mata      532  rename.error_ETnum_f_too_long()
             mata      192  rename.error_parens_unbalanced()
             mata      856  rename.error_dot_in_oldname()
             mata      760  rename.error_equal_in_oldname()
             mata     1096  rename.error_hashhash_not_allowed_old()
             mata      796  rename.error_starstar_not_allowed()
             mata      224  rename.error_u_base_syntax_opening()
             mata      604  rename.option_number_misspecified()
             mata      220  rename.option_not_allowed()
             mata      848  rename.error_following_dash()
             mata      732  rename.error_preceding_dash()
             mata      868  rename.error_syntax()
             mata     1580  rename.errprint_bf_string()
             mata     1064  rename.errprint_bf_list()
             mata      320  rename.confirm_not_empty()
             mata     1400  rename.confirm_new_varnames_valid()
             mata      372  rename.corresponding_names()
             mata     1696  rename.confirm_names_unique_1()
             mata      232  rename.confirm_names_unique()
             mata      320  rename.names_not_jointly_unique()
             mata     1360  rename.dryrun_note2()
             mata      992  rename.dryrun_note1()
             mata     1244  rename.perform_dryrun()
             mata      568  rename.perform_rename_intermediary()
             mata      384  rename.perform_rename_straight()
             mata      564  rename.perform_test()
             mata      380  rename.perform_set_r()
             mata     1616  rename.confirm_newnames_new()
             mata     1388  rename.perform_renames()
             mata     1160  rename.build_toren()
             mata      416  rename.fmt_ETnum_f_r()
             mata      528  rename.fmt_ETnum_f()
             mata     1416  rename.fillin_new_varnames_u_u()
             mata      636  rename.fillin_new_varnames_u()
             mata      336  rename.fillin_new_varnames()
             mata      584  rename.fillin_new_varnames_recase()
             mata      624  rename.sort_on_field()
             mata      448  rename.j_of_number()
             mata      328  rename.j_of_renumber()
             mata      548  rename.sort_appropriate_field()
             mata      296  rename.sort_old_varnames()
             mata      472  rename.post_match_piece()
             mata      328  rename.mstargiveback()
             mata     1032  rename.match_ETstar_left()
             mata     1152  rename.match_ETnum_v()
             mata      424  rename.match_ETqm()
             mata      840  rename.match_ETnum_f()
             mata      640  rename.match_ETstr()
             mata      640  rename.match_fixed()
             mata      528  rename.match_simplification()
             mata      224  rename.match_query_done()
             mata      648  rename.match_step_3p()
             mata      384  rename.match_step_2()
             mata      416  rename.match_step_1()
             mata      976  rename.match_step()
             mata      388  rename.match_setup()
             mata      508  rename.matchvarname()
             mata      364  rename.rename_matchdf()
             mata      496  rename.varlist_el()
             mata      392  rename.varlistpattern()
             mata     2320  rename.fillin_old_varnames_u()
             mata      380  rename.fillin_old_varnames()
             mata      316  rename.find_next_wildcard()
             mata      336  rename.is_wildcard()
             mata      288  rename.count_wildcards()
             mata      504  rename.printable_wildcard()
             mata      784  rename.confirm_wildcards_link()
             mata      376  rename.pelidx_of_wcidx()
             mata      780  rename.link_patterns_u()
             mata      432  rename.map_subscript()
             mata      768  rename.rename_linklocdf_next()
             mata      208  rename.rename_linklocdf_init()
             mata      340  rename.rename_linklocdf()
             mata      920  rename.check_and_fix_ETnum()
             mata      504  rename.link_patterns()
             mata      476  rename.build_recase_newpattern()
             mata      472  rename.make_patternlist_lengths_equal()
             mata      976  rename.set_pat_ETnum_f()
             mata      600  rename.set_pat_ETqm()
             mata      696  rename.set_pat_ETodot()
             mata      696  rename.set_pat_ETeq()
             mata      800  rename.set_pat_ETnum_v()
             mata      792  rename.set_pat_ETstar()
             mata      440  rename.set_pat_str()
             mata      364  rename.set_pat_ETstrlist()
             mata      912  rename.set_subscript()
             mata     2668  rename.parse_cmd_pat_el()
             mata     1228  rename.parse_cmd_pat_els()
             mata     1232  rename.parse_cmd_options_u_number()
             mata      948  rename.parse_cmd_options_u_std()
             mata      404  rename.parse_cmd_options_u()
             mata     1100  rename.confirm_options_consistent()
             mata      648  rename.parse_cmd_options()
             mata     1008  rename.getarg()
             mata      568  rename.parse_cmd_commaloc()
             mata     1316  rename.parse_cmd()
             mata      660  rename.xeq_recase()
             mata     1044  rename.xeq_old_to_new()
             mata      600  rename.rename_cmd_u()
             mata      496  rename.can_do_fast()
             mata      336  rename.rename_cmd()
             mata      312  rename.rename_renamedf()
             mata      356  rename.rename_optiondf_init()
             mata      728  rename.rename_optiondf()
             mata      416  rename.rename_patterndf()
             mata      276  rename.rename_peldf()
              ado     1283  unab
              ado     3882  order
                  --------
                    159183

            Comment


            • #21
              Thank you for using code delimiters, that is much more readable than what you posted previously.

              I requested that you run the program dir command immediately followed by the nlsur command (using the log option) and that you copy everything from the program dir command through the error message from nlsur and paste it into a code block. If you do not show us exactly what commands you have issued and exactly what Stata did in response, we can only guess about what the problem might be.

              With that said, Nick's advice certainly points out one set of problems that are causing you trouble. You should correct them.
              Last edited by William Lisowski; 18 Jan 2016, 09:58.

              Comment


              • #22
                Dear Nick

                Thank you and I inserted spaces and checked all the spaces as well still not working and the same error message:
                nlsurnlsurquaidsNPS returned 199
                verify that nlsurnlsurquaidsNPS is a function evaluator program
                r(199);

                Comment


                • #23
                  You previously told us you ran the command
                  Code:
                  nlsur nlsurquaidsNPS @ ...
                  but your error message
                  Code:
                  nlsurnlsurquaidsNPS returned 199
                  tells us you ran the command
                  Code:
                  nlsur nlsurnlsurquaidsNPS @ ...
                  and of course Stata did not find a program named nlsurnlsurquaidsNPS
                  Last edited by William Lisowski; 18 Jan 2016, 10:03.

                  Comment


                  • #24
                    Yes, it is right after running

                    Code:
                    //nlsur quaidsNPS  @  w1 w2 w3 w4 w5 w6 w7 wp1 wp1 wp2 wp3 wp4 wp5 wp6 wp7 lnexp x1 x2 x3 x4 x5, ifgnls nequations(7) parameters(a1 a2 a3 a4 a5 a6 a7 b1 ///
                    b2 b3 b4 b5 b6 b7 g11 g12 g13 g14 g15 g16 g17 g22 g23 g24 g25 g26 g27 g33 g34 g35 g36 g37 g44 g45 g46 g47 g55 g56 g57 g66 g67 g77 l1 l2 l3 l4 l5 l6  ///
                    l7 r11 r12 r13 r14 r15 r21 r22 r23 r24 r25 r31 r32 r33 r34 r35 r36 r37 r41 r42 r43 r44 r45 r46 r47 r51 r52 r53 r54 r55 r61 r62 r63 r64 r65 r71 r72 r73 ///
                    r74 r75) log;
                    I am getting this error message:
                    Code:
                    //
                    nlsurquaidsNPS returned 103
                    verify that nlsurquaidsNPS is a function evaluator program
                    //

                    Comment


                    • #25
                      The output of help rc 103 tells us

                      [P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 103
                      too many variables specified;
                      The command does not allow as many variables as you specified.
                      For example, tabulate takes only one or two variables. See the
                      syntax diagram for the command.
                      So somewhere within your program nlsurquaidsNPS you have a command that specifies too many variables. You might consider removing the quietly { and the matching } to see where the error occurs.

                      It is possible your problem stems from this statement, if you haven't already corrected it.
                      Code:
                      replace w2=(`a2' + `g21'*`wp1' + `g22'*`wp2' + `g23'*`wp3' + `g24'*`wp4' + `25'*`wp5' + `g26'*`wp6' + `g27'*`wp7' + `b1'*(`lnexp' - `lnpindex')///
                      + `l2'/`bofp'*(`lnexp' - `lnpindex')^2 + `r21'*`x1' +`r22'*`x2' +`r23'*`x3' +`r24'*`x4'+`r25'*`x5');
                      which is missing the letter g in `25'*`wp5'.
                      Last edited by William Lisowski; 18 Jan 2016, 10:31.

                      Comment


                      • #26
                        Dear Mr. William Lisowski,

                        Right there was missed the letter " g" now I have changed it :

                        Code:
                        replace w1 = (`a1' + `g11'*`wp1' + `g12'*`wp2' + `g13'*`wp3' + `g14'*`wp4' + `g15'*`wp5' + `g16'*`wp6' + `g17'*`wp7' + `b1'*(`lnexp' - `lnpindex') + `l1'/`bofp'*(`lnexp' - `lnpindex')^2 + `r11'*`x1' + `r12'*`x2' + `r13'*`x3' + `r14'*`x4' + `r15'*`x5');
                        
                        replace w2 = (`a2' + `g21'*`wp1' + `g22'*`wp2' + `g23'*`wp3' + `g24'*`wp4' + `g25'*`wp5' + `g26'*`wp6' + `g27'*`wp7' + `b1'*(`lnexp' - `lnpindex') + `l2'/`bofp'*(`lnexp' - `lnpindex')^2 + `r21'*`x1' + `r22'*`x2' + `r23'*`x3' + `r24'*`x4' + `r25'*`x5');
                        
                        replace w3 = (`a3' + `g31'*`wp1' + `g32'*`wp2' + `g33'*`wp3' + `g34'*`wp4' + `g35'*`wp5' + `g36'*`wp6' + `g37'*`wp7' + `b1'*(`lnexp' - `lnpindex') + `l3'/`bofp'*(`lnexp' - `lnpindex')^2 + `r31'*`x1' + `r32'*`x2' + `r33'*`x3' + `r34'*`x4' + `r35'*`x5');
                        
                        replace w4 = (`a4' + `g41'*`wp1' + `g42'*`wp2' + `g43'*`wp3' + `g44'*`wp4' + `g45'*`wp5' + `g46'*`wp6' + `g47'*`wp7' + `b1'*(`lnexp' - `lnpindex') + `l4'/`bofp'*(`lnexp' - `lnpindex')^2 + `r41'*`x1' + `r42'*`x2' + `r43'*`x3' + `r44'*`x4' + `r45'*`x5');
                        
                        replace w5 = (`a5' + `g51'*`wp1' + `g52'*`wp2' + `g53'*`wp3' + `g54'*`wp4' + `g55'*`wp5' + `g56'*`wp6' + `g57'*`wp7' + `b1'*(`lnexp' - `lnpindex') + `l5'/`bofp'*(`lnexp' - `lnpindex')^2 + `r51'*`x1' + `r52'*`x2' + `r53'*`x3' + `r54'*`x4' + `r55'*`x5');
                        
                        replace w6 = (`a6' + `g61'*`wp1' + `g62'*`wp2' + `g63'*`wp3' + `g64'*`wp4' + `g65'*`wp5' + `g66'*`wp6' + `g67'*`wp7' + `b1'*(`lnexp' - `lnpindex') + `l6'/`bofp'*(`lnexp' - `lnpindex')^2 + `r61'*`x1' + `r62'*`x2' + `r63'*`x3' + `r64'*`x4' + `r65'*`x5');
                        
                        replace w7 = (`a7' + `g71'*`wp1' + `g72'*`wp2' + `g73'*`wp3' + `g74'*`wp4' + `g75'*`wp5' + `g76'*`wp6' + `g77'*`wp7' + `b1'*(`lnexp' - `lnpindex') + `l7'/`bofp'*(`lnexp' - `lnpindex')^2 + `r71'*`x1' + `r72'*`x2' + `r73'*`x3' + `r74'*`x4' + `r75'*`x5');
                        
                        end;
                        also removed the quietly { however still not working

                        Thank you

                        Comment


                        • #27
                          If you cannot, as repeatedly requested, copy everything starting at the nlsur command and ending at the error message, including everything in between, and paste that into your posts, then I cannot help you.

                          Comment


                          • #28
                            I am sorry for disturbing all of you,

                            Comment


                            • #29
                              Question:
                              for the
                              Command :
                              Code:
                              nlsur quaids  @
                              which AIDS has to be installed ?

                              Code:
                              package st0028_1, ////  package st0268 //// package st0268_1 ////, package  st0029_1
                              Thank you,


                              Comment


                              • #30
                                Dear Colleagues,


                                I have found which package has to be installed from: http://www.stata-journal.com/sjpdf.h...lenum=st0029_1

                                Code:
                                 . net sj 8-4
                                  . net install st0029_1

                                Comment

                                Working...
                                X