Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Problem with nlsurquaids


From   Guilherme Travassos <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Problem with nlsurquaids
Date   Mon, 13 Jan 2014 06:26:17 +0000

Dear statalisters, 

I am having some problems to estimating a Quaids system with 16 goods (15 equations) and I don't know where I am wrong. I keep on getting the messsage:

Could not evaluate equation 1
Starting values invalid or some RHS variables have missing values

I already look for missing values and no variable has them. I checked if all the variables are in numeric format too. 

Below are my codes for the nlsurquaids. 

Thank you.


program nlsurquaids

version 10

syntax varlist(min=74 max=74) if, at(name)
tokenize `varlist'

args w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 lnp1 lnp2 lnp3 lnp4 lnp5 lnp6 lnp7 lnp8 lnp9 lnp10 lnp11 lnp12 lnp13 lnp14 lnp15 lnp16 lnexp lnpindex urban norte nordeste sul centro_oeste anosestudo mulherchefe crian adolesc idoso lnMr_est fe1 fe2 fe3 fe4 fe5 fe6 fe7 fe8 fe9 fe10 fe11 fe12 fe13 fe14 fe15 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15


tempname a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16					
					
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' = `at'[1, 7]
scalar `a8' = `at'[1, 8]
scalar `a9' = `at'[1, 9]
scalar `a10' = `at'[1, 10]
scalar `a11' = `at'[1, 11]
scalar `a12' = `at'[1, 12]
scalar `a13' = `at'[1, 13]
scalar `a14' = `at'[1, 14]
scalar `a15' = `at'[1, 15]
scalar `a16' = 1 - `a1' - `a2' - `a3' - `a4' - `a5' - `a6' - `a7' - `a8' - `a9' - `a10' - `a11' - `a12' - `a13' - `a14' - `a15'	


tempname b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 b16				
					
scalar `b1'	= `at'[1, 16]
scalar `b2'	= `at'[1, 17]
scalar `b3'	= `at'[1, 18]
scalar `b4'	= `at'[1, 19]
scalar `b5'	= `at'[1, 20]
scalar `b6'	= `at'[1, 21]
scalar `b7'	= `at'[1, 22]
scalar `b8'	= `at'[1, 23]
scalar `b9'	= `at'[1, 24]
scalar `b10' = `at'[1, 25]
scalar `b11' = `at'[1, 26]
scalar `b12' = `at'[1, 27]
scalar `b13' = `at'[1, 28]
scalar `b14' = `at'[1, 29]
scalar `b15' = `at'[1, 30]
scalar `b16' = - `b1' - `b2' - `b3' - `b4' - `b5' - `b6'- `b7' - `b8' - `b9' - `b10' - `b11' - `b12' - `b13' - `b14' - `b15'


tempname g11 g12 g13 g14 g15 g16 g17 g18 g19 g110 g111 g112 g113 g114 g115 g116

tempname g21 g22 g23 g24 g25 g26 g27 g28 g29 g210 g211 g212 g213 g214 g215 g216

tempname g31 g32 g33 g34 g35 g36 g37 g38 g39 g310 g311 g312 g313 g314 g315 g316

tempname g41 g42 g43 g44 g45 g46 g47 g48 g49 g410 g411 g412 g413 g414 g415 g416

tempname g51 g52 g53 g54 g55 g56 g57 g58 g59 g510 g511 g512 g513 g514 g515 g516

tempname g61 g62 g63 g64 g65 g66 g67 g68 g69 g610 g611 g612 g613 g614 g615 g616

tempname g71 g72 g73 g74 g75 g76 g77 g78 g79 g710 g711 g712 g713 g714 g715 g716

tempname g81 g82 g83 g84 g85 g86 g87 g88 g89 g810 g811 g812 g813 g814 g815 g816

tempname g91 g92 g93 g94 g95 g96 g97 g98 g99 g910 g911 g912 g913 g914 g915 g916

tempname g101 g102 g103 g104 g105 g106 g107 g108 g109 g1010 g1011 g1012 g1013 g1014 g1015 g1016

tempname g111 g112 g113 g114 g115 g116 g117 g118 g119 g1110 g1111 g1112 g1113 g1114 g1115 g1116

tempname g121 g122 g123 g124 g125 g126 g127 g128 g129 g1210 g1211 g1212 g1213 g1214 g1215 g1216

tempname g131 g132 g133 g134 g135 g136 g137 g138 g139 g1310 g1311 g1312 g1313 g1314 g1315 g1316

tempname g141 g142 g143 g144 g145 g146 g147 g148 g149 g1410 g1411 g1412 g1413 g1414 g1415 g1416

tempname g151 g152 g153 g154 g155 g156 g157 g158 g159 g1510 g1511 g1512 g1513 g1514 g1515 g1516

tempname g161 g162 g163 g164 g165 g166 g167 g168 g169 g1610 g1611 g1612 g1613 g1614 g1615 g1616


scalar `g11' = `at'[1, 31]	
scalar `g12' = `at'[1, 32]	
scalar `g13' = `at'[1, 33]	
scalar `g14' = `at'[1, 34]	
scalar `g15' = `at'[1, 35]	
scalar `g16' = `at'[1, 36]
scalar `g17' = `at'[1, 37]
scalar `g18' = `at'[1, 38]	
scalar `g19' = `at'[1, 39]	
scalar `g110' = `at'[1, 40]	
scalar `g111' = `at'[1, 41]	
scalar `g112' = `at'[1, 42]	
scalar `g113' = `at'[1, 43]
scalar `g114' = `at'[1, 44]
scalar `g115' = `at'[1, 45]
scalar `g116' = `at'[1, 46]


scalar `g21' = `at'[1, 47]	
scalar `g22' = `at'[1, 48]	
scalar `g23' = `at'[1, 49]	
scalar `g24' = `at'[1, 50]	
scalar `g25' = `at'[1, 51]	
scalar `g26' = `at'[1, 52]
scalar `g27' = `at'[1, 53]
scalar `g28' = `at'[1, 54]	
scalar `g29' = `at'[1, 55]	
scalar `g210' = `at'[1, 56]	
scalar `g211' = `at'[1, 57]	
scalar `g212' = `at'[1, 58]	
scalar `g213' = `at'[1, 59]
scalar `g214' = `at'[1, 60]
scalar `g215' = `at'[1, 61]
scalar `g216' = `at'[1, 62]


scalar `g31' = `at'[1, 63]	
scalar `g32' = `at'[1, 64]	
scalar `g33' = `at'[1, 65]	
scalar `g34' = `at'[1, 66]	
scalar `g35' = `at'[1, 67]	
scalar `g36' = `at'[1, 68]
scalar `g37' = `at'[1, 69]
scalar `g38' = `at'[1, 70]	
scalar `g39' = `at'[1, 71]	
scalar `g310' = `at'[1, 72]	
scalar `g311' = `at'[1, 73]	
scalar `g312' = `at'[1, 74]	
scalar `g313' = `at'[1, 75]
scalar `g314' = `at'[1, 76]
scalar `g315' = `at'[1, 77]
scalar `g316' = `at'[1, 78]


scalar `g41' = `at'[1, 79]	
scalar `g42' = `at'[1, 80]	
scalar `g43' = `at'[1, 81]	
scalar `g44' = `at'[1, 82]	
scalar `g45' = `at'[1, 83]	
scalar `g46' = `at'[1, 84]
scalar `g47' = `at'[1, 85]
scalar `g48' = `at'[1, 86]	
scalar `g49' = `at'[1, 87]	
scalar `g410' = `at'[1, 88]	
scalar `g411' = `at'[1, 89]	
scalar `g412' = `at'[1, 90]	
scalar `g413' = `at'[1, 91]
scalar `g414' = `at'[1, 92]
scalar `g415' = `at'[1, 93]
scalar `g416' = `at'[1, 94]


scalar `g51' = `at'[1, 95]	
scalar `g52' = `at'[1, 96]	
scalar `g53' = `at'[1, 97]	
scalar `g54' = `at'[1, 98]	
scalar `g55' = `at'[1, 99]	
scalar `g56' = `at'[1, 100]
scalar `g57' = `at'[1, 101]
scalar `g58' = `at'[1, 102]	
scalar `g59' = `at'[1, 103]	
scalar `g510' = `at'[1, 104]	
scalar `g511' = `at'[1, 105]	
scalar `g512' = `at'[1, 106]	
scalar `g513' = `at'[1, 107]
scalar `g514' = `at'[1, 108]
scalar `g515' = `at'[1, 109]
scalar `g516' = `at'[1, 110]


scalar `g61' = `at'[1, 111]	
scalar `g62' = `at'[1, 112]	
scalar `g63' = `at'[1, 113]	
scalar `g64' = `at'[1, 114]	
scalar `g65' = `at'[1, 115]	
scalar `g66' = `at'[1, 116]
scalar `g67' = `at'[1, 117]
scalar `g68' = `at'[1, 118]	
scalar `g69' = `at'[1, 119]	
scalar `g610' = `at'[1, 120]	
scalar `g611' = `at'[1, 121]	
scalar `g612' = `at'[1, 122]	
scalar `g613' = `at'[1, 123]
scalar `g614' = `at'[1, 124]
scalar `g615' = `at'[1, 125]
scalar `g616' = `at'[1, 126]


scalar `g71' = `at'[1, 127]	
scalar `g72' = `at'[1, 128]	
scalar `g73' = `at'[1, 129]	
scalar `g74' = `at'[1, 130]	
scalar `g75' = `at'[1, 131]	
scalar `g76' = `at'[1, 132]
scalar `g77' = `at'[1, 133]
scalar `g78' = `at'[1, 134]	
scalar `g79' = `at'[1, 135]	
scalar `g710' = `at'[1, 136]	
scalar `g711' = `at'[1, 137]	
scalar `g712' = `at'[1, 138]	
scalar `g713' = `at'[1, 139]
scalar `g714' = `at'[1, 140]
scalar `g715' = `at'[1, 141]
scalar `g716' = `at'[1, 142]


scalar `g81' = `at'[1, 143]	
scalar `g82' = `at'[1, 144]	
scalar `g83' = `at'[1, 145]	
scalar `g84' = `at'[1, 146]	
scalar `g85' = `at'[1, 147]	
scalar `g86' = `at'[1, 148]
scalar `g87' = `at'[1, 149]
scalar `g88' = `at'[1, 150]	
scalar `g89' = `at'[1, 151]	
scalar `g810' = `at'[1, 152]	
scalar `g811' = `at'[1, 153]	
scalar `g812' = `at'[1, 154]	
scalar `g813' = `at'[1, 155]
scalar `g814' = `at'[1, 156]
scalar `g815' = `at'[1, 157]
scalar `g816' = `at'[1, 158]


scalar `g91' = `at'[1, 159]	
scalar `g92' = `at'[1, 160]	
scalar `g93' = `at'[1, 161]	
scalar `g94' = `at'[1, 162]	
scalar `g95' = `at'[1, 163]	
scalar `g96' = `at'[1, 164]
scalar `g97' = `at'[1, 165]
scalar `g98' = `at'[1, 166]	
scalar `g99' = `at'[1, 167]	
scalar `g910' = `at'[1, 168]	
scalar `g911' = `at'[1, 169]	
scalar `g912' = `at'[1, 170]	
scalar `g913' = `at'[1, 171]
scalar `g914' = `at'[1, 172]
scalar `g915' = `at'[1, 173]
scalar `g916' = `at'[1, 174]


scalar `g101' = `at'[1, 175]	
scalar `g102' = `at'[1, 176]	
scalar `g103' = `at'[1, 177]	
scalar `g104' = `at'[1, 178]	
scalar `g105' = `at'[1, 179]	
scalar `g106' = `at'[1, 180]
scalar `g107' = `at'[1, 181]
scalar `g108' = `at'[1, 182]	
scalar `g109' = `at'[1, 183]	
scalar `g1010' = `at'[1, 184]	
scalar `g1011' = `at'[1, 185]	
scalar `g1012' = `at'[1, 186]	
scalar `g1013' = `at'[1, 187]
scalar `g1014' = `at'[1, 188]
scalar `g1015' = `at'[1, 189]
scalar `g1016' = `at'[1, 190]


scalar `g111' = `at'[1, 191]	
scalar `g112' = `at'[1, 192]	
scalar `g113' = `at'[1, 193]	
scalar `g114' = `at'[1, 194]	
scalar `g115' = `at'[1, 195]	
scalar `g116' = `at'[1, 196]
scalar `g117' = `at'[1, 197]
scalar `g118' = `at'[1, 198]	
scalar `g119' = `at'[1, 199]	
scalar `g1110' = `at'[1, 200]	
scalar `g1111' = `at'[1, 201]	
scalar `g1112' = `at'[1, 202]	
scalar `g1113' = `at'[1, 203]
scalar `g1114' = `at'[1, 204]
scalar `g1115' = `at'[1, 205]
scalar `g1116' = `at'[1, 206]


scalar `g121' = `at'[1, 207]	
scalar `g122' = `at'[1, 208]	
scalar `g123' = `at'[1, 209]	
scalar `g124' = `at'[1, 210]	
scalar `g125' = `at'[1, 211]	
scalar `g126' = `at'[1, 212]
scalar `g127' = `at'[1, 213]
scalar `g128' = `at'[1, 214]	
scalar `g129' = `at'[1, 215]	
scalar `g1210' = `at'[1, 216]	
scalar `g1211' = `at'[1, 217]	
scalar `g1212' = `at'[1, 218]	
scalar `g1213' = `at'[1, 219]
scalar `g1214' = `at'[1, 220]
scalar `g1215' = `at'[1, 221]
scalar `g1216' = `at'[1, 222]


scalar `g131' = `at'[1, 223]	
scalar `g132' = `at'[1, 224]	
scalar `g133' = `at'[1, 225]	
scalar `g134' = `at'[1, 226]	
scalar `g135' = `at'[1, 227]	
scalar `g136' = `at'[1, 228]
scalar `g137' = `at'[1, 229]
scalar `g138' = `at'[1, 230]	
scalar `g139' = `at'[1, 231]	
scalar `g1310' = `at'[1, 232]	
scalar `g1311' = `at'[1, 233]	
scalar `g1312' = `at'[1, 234]	
scalar `g1313' = `at'[1, 235]
scalar `g1314' = `at'[1, 236]
scalar `g1315' = `at'[1, 237]
scalar `g1316' = `at'[1, 238]


scalar `g141' = `at'[1, 239]	
scalar `g142' = `at'[1, 240]	
scalar `g143' = `at'[1, 241]	
scalar `g144' = `at'[1, 242]	
scalar `g145' = `at'[1, 243]	
scalar `g146' = `at'[1, 244]
scalar `g147' = `at'[1, 245]
scalar `g148' = `at'[1, 246]	
scalar `g149' = `at'[1, 247]	
scalar `g1410' = `at'[1, 248]	
scalar `g1411' = `at'[1, 249]	
scalar `g1412' = `at'[1, 250]	
scalar `g1413' = `at'[1, 251]
scalar `g1414' = `at'[1, 252]
scalar `g1415' = `at'[1, 253]
scalar `g1416' = `at'[1, 254]


scalar `g151' = `at'[1, 255]	
scalar `g152' = `at'[1, 256]	
scalar `g153' = `at'[1, 257]	
scalar `g154' = `at'[1, 258]	
scalar `g155' = `at'[1, 259]	
scalar `g156' = `at'[1, 260]
scalar `g157' = `at'[1, 261]
scalar `g158' = `at'[1, 262]	
scalar `g159' = `at'[1, 263]	
scalar `g1510' = `at'[1, 264]	
scalar `g1511' = `at'[1, 265]	
scalar `g1512' = `at'[1, 266]	
scalar `g1513' = `at'[1, 267]
scalar `g1514' = `at'[1, 268]
scalar `g1515' = `at'[1, 269]
scalar `g1516' = `at'[1, 270]


scalar `g161' = - `g11' - `g21' - `g31' - `g41' - `g51' - `g61' - `g71' - `g81' - `g91' - `g101' - `g111' - `g121' - `g131' - `g141' - `g151'						
scalar `g162' = - `g12' - `g22' - `g32' - `g42' - `g52' - `g62' - `g72' - `g82' - `g92' - `g102' - `g112' - `g122' - `g132' - `g142' - `g152'						
scalar `g163' = - `g13' - `g23' - `g33' - `g43' - `g53' - `g63' - `g73' - `g83' - `g93' - `g103' - `g113' - `g123' - `g133' - `g143' - `g153'						
scalar `g164' = - `g14' - `g24' - `g34' - `g44' - `g54' - `g64' - `g74' - `g84' - `g94' - `g104' - `g114' - `g124' - `g134' - `g144' - `g154'						
scalar `g165' = - `g15' - `g25' - `g35' - `g45' - `g55' - `g65' - `g75' - `g85' - `g95' - `g105' - `g115' - `g125' - `g135' - `g145' - `g155'							
scalar `g166' = - `g16' - `g26' - `g36' - `g46' - `g56' - `g66' - `g76' - `g86' - `g96' - `g106' - `g116' - `g126' - `g136' - `g146' - `g156'
scalar `g167' = - `g17' - `g27' - `g37' - `g47' - `g57' - `g67' - `g77' - `g87' - `g97' - `g107' - `g117' - `g127' - `g137' - `g147' - `g157'
scalar `g168' = - `g18' - `g28' - `g38' - `g48' - `g58' - `g68' - `g78' - `g88' - `g98' - `g108' - `g118' - `g128' - `g138' - `g148' - `g158'
scalar `g169' = - `g19' - `g29' - `g39' - `g49' - `g59' - `g69' - `g79' - `g89' - `g99' - `g109' - `g119' - `g129' - `g139' - `g149' - `g159'
scalar `g1610' = - `g110' - `g210' - `g310' - `g410' - `g510' - `g610' - `g710' - `g810' - `g910' - `g1010' - `g1110' - `g1210' - `g1310' - `g1410' - `g1510'
scalar `g1611' = - `g111' - `g211' - `g311' - `g411' - `g511' - `g611' - `g711' - `g811' - `g911' - `g1011' - `g1111' - `g1211' - `g1311' - `g1411' - `g1511'
scalar `g1612' = - `g112' - `g212' - `g312' - `g412' - `g512' - `g612' - `g712' - `g812' - `g912' - `g1012' - `g1112' - `g1212' - `g1312' - `g1412' - `g1512'
scalar `g1613' = - `g113' - `g213' - `g313' - `g413' - `g513' - `g613' - `g713' - `g813' - `g913' - `g1013' - `g1113' - `g1213' - `g1313' - `g1413' - `g1513'
scalar `g1614' = - `g114' - `g214' - `g314' - `g414' - `g514' - `g614' - `g714' - `g814' - `g914' - `g1014' - `g1114' - `g1214' - `g1314' - `g1414' - `g1514'
scalar `g1615' = - `g115' - `g215' - `g315' - `g415' - `g515' - `g615' - `g715' - `g815' - `g915' - `g1015' - `g1115' - `g1215' - `g1315' - `g1415' - `g1515'
scalar `g1616' = - `g116' - `g216' - `g316' - `g416' - `g516' - `g616' - `g716' - `g816' - `g916' - `g1016' - `g1116' - `g1216' - `g1316' - `g1416' - `g1516'


tempname l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16						
						
scalar `l1'	= `at'[1, 271]	
scalar `l2'	= `at'[1, 272]	
scalar `l3'	= `at'[1, 273]	
scalar `l4'	= `at'[1, 274]	
scalar `l5'	= `at'[1, 275]		
scalar `l6'	= `at'[1, 276]
scalar `l7'	= `at'[1, 277]	
scalar `l8'	= `at'[1, 278]	
scalar `l9'	= `at'[1, 279]	
scalar `l10' = `at'[1, 280]	
scalar `l11' = `at'[1, 281]		
scalar `l12' = `at'[1, 282]
scalar `l13' = `at'[1, 283]	
scalar `l14' = `at'[1, 284]		
scalar `l15' = `at'[1, 285]
scalar `l16' = - `l1' - `l2' - `l3' - `l4' - `l5' - `l6' - `l7' - `l8' - `l9' - `l10' - `l11' - `l12' - `l13' - `l14' - `l15'


tempname r11 r12 r13 r14 r15 r16 r17 r18 r19 r110

tempname r21 r22 r23 r24 r25 r26 r27 r28 r29 r210

tempname r31 r32 r33 r34 r35 r36 r37 r38 r39 r310

tempname r41 r42 r43 r44 r45 r46 r47 r48 r49 r410

tempname r51 r52 r53 r54 r55 r56 r57 r58 r59 r510

tempname r61 r62 r63 r64 r65 r66 r67 r68 r69 r610

tempname r71 r72 r73 r74 r75 r76 r77 r78 r79 r710

tempname r81 r82 r83 r84 r85 r86 r87 r88 r89 r810

tempname r91 r92 r93 r94 r95 r96 r97 r98 r99 r910

tempname r101 r102 r103 r104 r105 r106 r107 r108 r109 r1010

tempname r111 r112 r113 r114 r115 r116 r117 r118 r119 r1110

tempname r121 r122 r123 r124 r125 r126 r127 r128 r129 r1210

tempname r131 r132 r133 r134 r135 r136 r137 r138 r139 r1310

tempname r141 r142 r143 r144 r145 r146 r147 r148 r149 r1410

tempname r151 r152 r153 r154 r155 r156 r157 r158 r159 r1510


scalar `r11' = `at'[1, 286]
scalar `r12' = `at'[1, 287]
scalar `r13' = `at'[1, 288]
scalar `r14' = `at'[1, 289]
scalar `r15' = `at'[1, 290]
scalar `r16' = `at'[1, 291]
scalar `r17' = `at'[1, 292]
scalar `r18' = `at'[1, 293]
scalar `r19' = `at'[1, 294]
scalar `r110' = `at'[1, 295]

scalar `r21' = `at'[1, 296]
scalar `r22' = `at'[1, 297]
scalar `r23' = `at'[1, 298]
scalar `r24' = `at'[1, 299]
scalar `r25' = `at'[1, 300]
scalar `r26' = `at'[1, 301]
scalar `r27' = `at'[1, 302]
scalar `r28' = `at'[1, 303]
scalar `r29' = `at'[1, 304]
scalar `r210' = `at'[1, 305]

scalar `r31' = `at'[1, 306]
scalar `r32' = `at'[1, 307]
scalar `r33' = `at'[1, 308]
scalar `r34' = `at'[1, 309]
scalar `r35' = `at'[1, 310]
scalar `r36' = `at'[1, 311]
scalar `r37' = `at'[1, 312]
scalar `r38' = `at'[1, 313]
scalar `r39' = `at'[1, 314]
scalar `r310' = `at'[1, 315]

scalar `r41' = `at'[1, 316]
scalar `r42' = `at'[1, 317]
scalar `r43' = `at'[1, 318]
scalar `r44' = `at'[1, 319]
scalar `r45' = `at'[1, 320]
scalar `r46' = `at'[1, 321]
scalar `r47' = `at'[1, 322]
scalar `r48' = `at'[1, 323]
scalar `r49' = `at'[1, 324]
scalar `r410' = `at'[1, 325]

scalar `r51' = `at'[1, 326]
scalar `r52' = `at'[1, 327]
scalar `r53' = `at'[1, 328]
scalar `r54' = `at'[1, 329]
scalar `r55' = `at'[1, 330]
scalar `r56' = `at'[1, 331]
scalar `r57' = `at'[1, 332]
scalar `r58' = `at'[1, 333]
scalar `r59' = `at'[1, 334]
scalar `r510' = `at'[1, 335]

scalar `r61' = `at'[1, 336]
scalar `r62' = `at'[1, 337]
scalar `r63' = `at'[1, 338]
scalar `r64' = `at'[1, 339]
scalar `r65' = `at'[1, 340]
scalar `r66' = `at'[1, 341]
scalar `r67' = `at'[1, 342]
scalar `r68' = `at'[1, 343]
scalar `r69' = `at'[1, 344]
scalar `r610' = `at'[1, 345]

scalar `r71' = `at'[1, 346]
scalar `r72' = `at'[1, 347]
scalar `r73' = `at'[1, 348]
scalar `r74' = `at'[1, 349]
scalar `r75' = `at'[1, 350]
scalar `r76' = `at'[1, 351]
scalar `r77' = `at'[1, 352]
scalar `r78' = `at'[1, 353]
scalar `r79' = `at'[1, 354]
scalar `r710' = `at'[1, 355]

scalar `r81' = `at'[1, 356]
scalar `r82' = `at'[1, 357]
scalar `r83' = `at'[1, 358]
scalar `r84' = `at'[1, 359]
scalar `r85' = `at'[1, 360]
scalar `r86' = `at'[1, 361]
scalar `r87' = `at'[1, 362]
scalar `r88' = `at'[1, 363]
scalar `r89' = `at'[1, 364]
scalar `r810' = `at'[1, 365]

scalar `r91' = `at'[1, 366]
scalar `r92' = `at'[1, 367]
scalar `r93' = `at'[1, 368]
scalar `r94' = `at'[1, 369]
scalar `r95' = `at'[1, 370]
scalar `r96' = `at'[1, 371]
scalar `r97' = `at'[1, 372]
scalar `r98' = `at'[1, 373]
scalar `r99' = `at'[1, 374]
scalar `r910' = `at'[1, 375]

scalar `r101' = `at'[1, 376]
scalar `r102' = `at'[1, 377]
scalar `r103' = `at'[1, 378]
scalar `r104' = `at'[1, 379]
scalar `r105' = `at'[1, 380]
scalar `r106' = `at'[1, 381]
scalar `r107' = `at'[1, 382]
scalar `r108' = `at'[1, 383]
scalar `r109' = `at'[1, 384]
scalar `r1010' = `at'[1, 385]

scalar `r111' = `at'[1, 386]
scalar `r112' = `at'[1, 387]
scalar `r113' = `at'[1, 388]
scalar `r114' = `at'[1, 389]
scalar `r115' = `at'[1, 390]
scalar `r116' = `at'[1, 391]
scalar `r117' = `at'[1, 392]
scalar `r118' = `at'[1, 393]
scalar `r119' = `at'[1, 394]
scalar `r1110' = `at'[1, 395]

scalar `r121' = `at'[1, 396]
scalar `r122' = `at'[1, 397]
scalar `r123' = `at'[1, 398]
scalar `r124' = `at'[1, 399]
scalar `r125' = `at'[1, 400]
scalar `r126' = `at'[1, 401]
scalar `r127' = `at'[1, 402]
scalar `r128' = `at'[1, 403]
scalar `r129' = `at'[1, 404]
scalar `r1210' = `at'[1, 405]

scalar `r131' = `at'[1, 406]
scalar `r132' = `at'[1, 407]
scalar `r133' = `at'[1, 408]
scalar `r134' = `at'[1, 409]
scalar `r135' = `at'[1, 410]
scalar `r136' = `at'[1, 411]
scalar `r137' = `at'[1, 412]
scalar `r138' = `at'[1, 413]
scalar `r139' = `at'[1, 414]
scalar `r1310' = `at'[1, 415]

scalar `r141' = `at'[1, 416]
scalar `r142' = `at'[1, 417]
scalar `r143' = `at'[1, 418]
scalar `r144' = `at'[1, 419]
scalar `r145' = `at'[1, 420]
scalar `r146' = `at'[1, 421]
scalar `r147' = `at'[1, 422]
scalar `r148' = `at'[1, 423]
scalar `r149' = `at'[1, 424]
scalar `r1410' = `at'[1, 425]

scalar `r151' = `at'[1, 426]
scalar `r152' = `at'[1, 427]
scalar `r153' = `at'[1, 428]
scalar `r154' = `at'[1, 429]
scalar `r155' = `at'[1, 430]
scalar `r156' = `at'[1, 431]
scalar `r157' = `at'[1, 432]
scalar `r158' = `at'[1, 433]
scalar `r159' = `at'[1, 434]
scalar `r1510' = `at'[1, 435]


tempname u1 u2 u3 u4 u5	u6 u7 u8 u9 u10 u11 u12 u13 u14 u15				
					
scalar `u1'	= `at'[1, 436]
scalar `u2'	= `at'[1, 437]
scalar `u3'	= `at'[1, 438]
scalar `u4'	= `at'[1, 439]
scalar `u5'	= `at'[1, 440]
scalar `u6'	= `at'[1, 441]
scalar `u7'	= `at'[1, 442]
scalar `u8'	= `at'[1, 443]
scalar `u9'	= `at'[1, 444]
scalar `u10' = `at'[1, 445]
scalar `u11' = `at'[1, 446]
scalar `u12' = `at'[1, 447]
scalar `u13' = `at'[1, 448]
scalar `u14' = `at'[1, 449]
scalar `u15' = `at'[1, 450]


tempname d1 d2 d3 d4 d5	d6 d7 d8 d9 d10 d11 d12 d13 d14 d15				
					
scalar `d1'	= `at'[1, 451]
scalar `d2'	= `at'[1, 452]
scalar `d3'	= `at'[1, 453]
scalar `d4'	= `at'[1, 454]
scalar `d5'	= `at'[1, 455]
scalar `d6'	= `at'[1, 456]
scalar `d7'	= `at'[1, 457]
scalar `d8'	= `at'[1, 458]
scalar `d9'	= `at'[1, 459]
scalar `d10' = `at'[1, 460]
scalar `d11' = `at'[1, 461]
scalar `d12' = `at'[1, 462]
scalar `d13' = `at'[1, 463]
scalar `d14' = `at'[1, 464]
scalar `d15' = `at'[1, 465]


	  
quietly {
        * The b(p) term in the QUAIDS model:
        tempvar bofp
        gen double `bofp' = 0
        forvalues i = 1/16 {
            replace `bofp' = `bofp' + `lnp`i''*`b`i''                                                     
        }
        replace `bofp' = exp(`bofp')
        // Finally, the expenditure shares for 15 of the 16
        // goods (the equation 16 is dropped to avoid singularity)
		                                                    
		
   replace `w1' = (`a1' + `g11'*`lnp1' + `g12'*`lnp2' + `g13'*`lnp3' + `g14'*`lnp4' + `g15'*`lnp5' + `g16'*`lnp6' + `g17'*`lnp7' + `g18'*`lnp8' + `g19'*`lnp9' + `g110'*`lnp10' + `g111'*`lnp11' + `g112'*`lnp12' + `g113'*`lnp13' + `g114'*`lnp14' + `g115'*`lnp15' + `g116'*`lnp16' + `b1'*(`lnexp' - `lnpindex') + `l1'/`bofp'*(`lnexp' - `lnpindex')^2 + `r11'*`urban' + `r12'*`norte' + `r13'*`nordeste' + `r14'*`sul' + `r15'*`centro_oeste' + `r16'*`anosestudo' + `r17'*`mulherchefe' + `r18'*`crian' + `r19'*`adolesc' + `r110'*`idoso' + `u1'*`lnMr_est')*`F1' + `d1'*`fe1'   

   replace `w2' = (`a2' + `g21'*`lnp1' + `g22'*`lnp2' + `g23'*`lnp3' + `g24'*`lnp4' + `g25'*`lnp5' + `g26'*`lnp6' + `g27'*`lnp7' + `g28'*`lnp8' + `g29'*`lnp9' + `g210'*`lnp10' + `g211'*`lnp11' + `g212'*`lnp12' + `g213'*`lnp13' + `g214'*`lnp14' + `g215'*`lnp15' + `g216'*`lnp16' + `b2'*(`lnexp' - `lnpindex') + `l2'/`bofp'*(`lnexp' - `lnpindex')^2 + `r21'*`urban' + `r22'*`norte' + `r23'*`nordeste' + `r24'*`sul' + `r25'*`centro_oeste' + `r26'*`anosestudo' + `r27'*`mulherchefe' + `r28'*`crian' + `r29'*`adolesc' + `r210'*`idoso' + `u2'*`lnMr_est')*`F2' + `d2'*`fe2'

   replace `w3' = (`a3' + `g31'*`lnp1' + `g32'*`lnp2' + `g33'*`lnp3' + `g34'*`lnp4' + `g35'*`lnp5' + `g36'*`lnp6' + `g37'*`lnp7' + `g38'*`lnp8' + `g39'*`lnp9' + `g310'*`lnp10' + `g311'*`lnp11' + `g312'*`lnp12' + `g313'*`lnp13' + `g314'*`lnp14' + `g315'*`lnp15' + `g316'*`lnp16' + `b3'*(`lnexp' - `lnpindex') + `l3'/`bofp'*(`lnexp' - `lnpindex')^2 + `r31'*`urban' + `r32'*`norte' + `r33'*`nordeste' + `r34'*`sul' + `r35'*`centro_oeste' + `r36'*`anosestudo' + `r37'*`mulherchefe' + `r38'*`crian' + `r39'*`adolesc' + `r310'*`idoso' + `u3'*`lnMr_est')*`F3' + `d3'*`fe3'

   replace `w4' = (`a4' + `g41'*`lnp1' + `g42'*`lnp2' + `g43'*`lnp3' + `g44'*`lnp4' + `g45'*`lnp5' + `g46'*`lnp6' + `g47'*`lnp7' + `g48'*`lnp8' + `g49'*`lnp9' + `g410'*`lnp10' + `g411'*`lnp11' + `g412'*`lnp12' + `g413'*`lnp13' + `g414'*`lnp14' + `g415'*`lnp15' + `g416'*`lnp16' + `b4'*(`lnexp' - `lnpindex') + `l4'/`bofp'*(`lnexp' - `lnpindex')^2 + `r41'*`urban' + `r42'*`norte' + `r43'*`nordeste' + `r44'*`sul' + `r45'*`centro_oeste' + `r46'*`anosestudo' + `r47'*`mulherchefe' + `r48'*`crian' + `r49'*`adolesc' + `r410'*`idoso' + `u4'*`lnMr_est')*`F4' + `d4'*`fe4'

   replace `w5' = (`a5' + `g51'*`lnp1' + `g52'*`lnp2' + `g53'*`lnp3' + `g54'*`lnp4' + `g55'*`lnp5' + `g56'*`lnp6' + `g57'*`lnp7' + `g58'*`lnp8' + `g59'*`lnp9' + `g510'*`lnp10' + `g511'*`lnp11' + `g512'*`lnp12' + `g513'*`lnp13' + `g514'*`lnp14' + `g515'*`lnp15' + `g516'*`lnp16' + `b5'*(`lnexp' - `lnpindex') + `l5'/`bofp'*(`lnexp' - `lnpindex')^2 + `r51'*`urban' + `r52'*`norte' + `r53'*`nordeste' + `r54'*`sul' + `r55'*`centro_oeste' + `r56'*`anosestudo' + `r57'*`mulherchefe' + `r58'*`crian' + `r59'*`adolesc' + `r510'*`idoso' + `u5'*`lnMr_est')*`F5' + `d5'*`fe5'
                                                                                                                                                                                                                                                                                                                                                                            
   replace `w6' = (`a6' + `g61'*`lnp1' + `g62'*`lnp2' + `g63'*`lnp3' + `g64'*`lnp4' + `g65'*`lnp5' + `g66'*`lnp6' + `g67'*`lnp7' + `g68'*`lnp8' + `g69'*`lnp9' + `g610'*`lnp10' + `g611'*`lnp11' + `g612'*`lnp12' + `g613'*`lnp13' + `g614'*`lnp14' + `g615'*`lnp15' + `g616'*`lnp16' + `b6'*(`lnexp' - `lnpindex') + `l6'/`bofp'*(`lnexp' - `lnpindex')^2 + `r61'*`urban' + `r62'*`norte' + `r63'*`nordeste' + `r64'*`sul' + `r65'*`centro_oeste' + `r66'*`anosestudo' + `r67'*`mulherchefe' + `r68'*`crian' + `r69'*`adolesc' + `r610'*`idoso' + `u6'*`lnMr_est')*`F6' + `d6'*`fe6'

   replace `w7' = (`a7' + `g71'*`lnp1' + `g72'*`lnp2' + `g73'*`lnp3' + `g74'*`lnp4' + `g75'*`lnp5' + `g76'*`lnp6' + `g77'*`lnp7' + `g78'*`lnp8' + `g79'*`lnp9' + `g710'*`lnp10' + `g711'*`lnp11' + `g712'*`lnp12' + `g713'*`lnp13' + `g714'*`lnp14' + `g715'*`lnp15' + `g716'*`lnp16' + `b7'*(`lnexp' - `lnpindex') + `l7'/`bofp'*(`lnexp' - `lnpindex')^2 + `r71'*`urban' + `r72'*`norte' + `r73'*`nordeste' + `r74'*`sul' + `r75'*`centro_oeste' + `r76'*`anosestudo' + `r77'*`mulherchefe' + `r78'*`crian' + `r79'*`adolesc' + `r710'*`idoso' + `u7'*`lnMr_est')*`F7' + `d7'*`fe7'

   replace `w8' = (`a8' + `g81'*`lnp1' + `g82'*`lnp2' + `g83'*`lnp3' + `g84'*`lnp4' + `g85'*`lnp5' + `g86'*`lnp6' + `g87'*`lnp7' + `g88'*`lnp8' + `g89'*`lnp9' + `g810'*`lnp10' + `g811'*`lnp11' + `g812'*`lnp12' + `g813'*`lnp13' + `g814'*`lnp14' + `g815'*`lnp15' + `g816'*`lnp16' + `b8'*(`lnexp' - `lnpindex') + `l8'/`bofp'*(`lnexp' - `lnpindex')^2 + `r81'*`urban' + `r82'*`norte' + `r83'*`nordeste' + `r84'*`sul' + `r85'*`centro_oeste' + `r86'*`anosestudo' + `r87'*`mulherchefe' + `r88'*`crian' + `r89'*`adolesc' + `r810'*`idoso' + `u8'*`lnMr_est')*`F8' + `d8'*`fe8'

   replace `w9' = (`a9' + `g91'*`lnp1' + `g92'*`lnp2' + `g93'*`lnp3' + `g94'*`lnp4' + `g95'*`lnp5' + `g96'*`lnp6' + `g97'*`lnp7' + `g98'*`lnp8' + `g99'*`lnp9' + `g910'*`lnp10' + `g911'*`lnp11' + `g912'*`lnp12' + `g913'*`lnp13' + `g914'*`lnp14' + `g915'*`lnp15' + `g916'*`lnp16' + `b9'*(`lnexp' - `lnpindex') + `l9'/`bofp'*(`lnexp' - `lnpindex')^2 + `r91'*`urban' + `r92'*`norte' + `r93'*`nordeste' + `r94'*`sul' + `r95'*`centro_oeste' + `r96'*`anosestudo' + `r97'*`mulherchefe' + `r98'*`crian' + `r99'*`adolesc' + `r910'*`idoso' + `u9'*`lnMr_est')*`F9' + `d9'*`fe9'

   replace `w10' = (`a10' + `g101'*`lnp1' + `g102'*`lnp2' + `g103'*`lnp3' + `g104'*`lnp4' + `g105'*`lnp5' + `g106'*`lnp6' + `g107'*`lnp7' + `g108'*`lnp8' + `g109'*`lnp9' + `g1010'*`lnp10' + `g1011'*`lnp11' + `g1012'*`lnp12' + `g1013'*`lnp13' + `g1014'*`lnp14' + `g1015'*`lnp15' + `g1016'*`lnp16' + `b10'*(`lnexp' - `lnpindex') + `l10'/`bofp'*(`lnexp' - `lnpindex')^2 + `r101'*`urban' + `r102'*`norte' + `r103'*`nordeste' + `r104'*`sul' + `r105'*`centro_oeste' + `r106'*`anosestudo' + `r107'*`mulherchefe' + `r108'*`crian' + `r109'*`adolesc' + `r1010'*`idoso' + `u10'*`lnMr_est')*`F10' + `d10'*`fe10'

   replace `w11' = (`a11' + `g111'*`lnp1' + `g112'*`lnp2' + `g113'*`lnp3' + `g114'*`lnp4' + `g115'*`lnp5' + `g116'*`lnp6' + `g117'*`lnp7' + `g118'*`lnp8' + `g119'*`lnp9' + `g1110'*`lnp10' + `g1111'*`lnp11' + `g1112'*`lnp12' + `g1113'*`lnp13' + `g1114'*`lnp14' + `g1115'*`lnp15' + `g1116'*`lnp16' + `b11'*(`lnexp' - `lnpindex') + `l11'/`bofp'*(`lnexp' - `lnpindex')^2 + `r111'*`urban' + `r112'*`norte' + `r113'*`nordeste' + `r114'*`sul' + `r115'*`centro_oeste' + `r116'*`anosestudo' + `r117'*`mulherchefe' + `r118'*`crian' + `r119'*`adolesc' + `r1110'*`idoso' + `u11'*`lnMr_est')*`F11' + `d11'*`fe11'

   replace `w12' = (`a12' + `g121'*`lnp1' + `g122'*`lnp2' + `g123'*`lnp3' + `g124'*`lnp4' + `g125'*`lnp5' + `g126'*`lnp6' + `g127'*`lnp7' + `g128'*`lnp8' + `g129'*`lnp9' + `g1210'*`lnp10' + `g1211'*`lnp11' + `g1212'*`lnp12' + `g1213'*`lnp13' + `g1214'*`lnp14' + `g1215'*`lnp15' + `g1216'*`lnp16' + `b12'*(`lnexp' - `lnpindex') + `l12'/`bofp'*(`lnexp' - `lnpindex')^2 + `r121'*`urban' + `r122'*`norte' + `r123'*`nordeste' + `r124'*`sul' + `r125'*`centro_oeste' + `r126'*`anosestudo' + `r127'*`mulherchefe' + `r128'*`crian' + `r129'*`adolesc' + `r1210'*`idoso' + `u12'*`lnMr_est')*`F12' + `d12'*`fe12'

   replace `w13' = (`a13' + `g131'*`lnp1' + `g132'*`lnp2' + `g133'*`lnp3' + `g134'*`lnp4' + `g135'*`lnp5' + `g136'*`lnp6' + `g137'*`lnp7' + `g138'*`lnp8' + `g139'*`lnp9' + `g1310'*`lnp10' + `g1311'*`lnp11' + `g1312'*`lnp12' + `g1313'*`lnp13' + `g1314'*`lnp14' + `g1315'*`lnp15' + `g1316'*`lnp16' + `b13'*(`lnexp' - `lnpindex') + `l13'/`bofp'*(`lnexp' - `lnpindex')^2 + `r131'*`urban' + `r132'*`norte' + `r133'*`nordeste' + `r134'*`sul' + `r135'*`centro_oeste' + `r136'*`anosestudo' + `r137'*`mulherchefe' + `r138'*`crian' + `r139'*`adolesc' + `r1310'*`idoso' + `u13'*`lnMr_est')*`F13' + `d13'*`fe13'

   replace `w14' = (`a14' + `g141'*`lnp1' + `g142'*`lnp2' + `g143'*`lnp3' + `g144'*`lnp4' + `g145'*`lnp5' + `g146'*`lnp6' + `g147'*`lnp7' + `g148'*`lnp8' + `g149'*`lnp9' + `g1410'*`lnp10' + `g1411'*`lnp11' + `g1412'*`lnp12' + `g1413'*`lnp13' + `g1414'*`lnp14' + `g1415'*`lnp15' + `g1416'*`lnp16' + `b14'*(`lnexp' - `lnpindex') + `l14'/`bofp'*(`lnexp' - `lnpindex')^2 + `r141'*`urban' + `r142'*`norte' + `r143'*`nordeste' + `r144'*`sul' + `r145'*`centro_oeste' + `r146'*`anosestudo' + `r147'*`mulherchefe' + `r148'*`crian' + `r149'*`adolesc' + `r1410'*`idoso' + `u14'*`lnMr_est')*`F14' + `d14'*`fe14'

   replace `w15' = (`a15' + `g151'*`lnp1' + `g152'*`lnp2' + `g153'*`lnp3' + `g154'*`lnp4' + `g155'*`lnp5' + `g156'*`lnp6' + `g157'*`lnp7' + `g158'*`lnp8' + `g159'*`lnp9' + `g1510'*`lnp10' + `g1511'*`lnp11' + `g1512'*`lnp12' + `g1513'*`lnp13' + `g1514'*`lnp14' + `g1515'*`lnp15' + `g1516'*`lnp16' + `b15'*(`lnexp' - `lnpindex') + `l15'/`bofp'*(`lnexp' - `lnpindex')^2 + `r151'*`urban' + `r152'*`norte' + `r153'*`nordeste' + `r154'*`sul' + `r155'*`centro_oeste' + `r156'*`anosestudo' + `r157'*`mulherchefe' + `r158'*`crian' + `r159'*`adolesc' + `r1510'*`idoso' + `u15'*`lnMr_est')*`F15' + `d15'*`fe15'
 
}                                       
end
                                                                                                                                                                                                                                                                        

nlsur quaids @ w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 lnp1 lnp2 lnp3 lnp4 lnp5 lnp6 lnp7 lnp8 lnp9 lnp10 lnp11 lnp12 lnp13 lnp14 lnp15 lnp16 lnexp lnpindex urban norte nordeste sul centro_oeste anosestudo mulherchefe crian adolesc idoso lnMr_est fe1 fe2 fe3 fe4 fe5 fe6 fe7 fe8 fe9 fe10 fe11 fe12 fe13 fe14 fe15 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15, ifgnls nolog nequations(16) nparam(465) 		 	   		  
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index