Dear Community,

I am using a probit model to analyze the factors that influence the decision of a woman whether or not to participate in the labor market.

realearnings is monthly income, it is to be used in conjunction with the bracket weight

How do I generate the log of the sum of household income minus the earnings of the woman herself (a measure the income of everyone else in the household except the woman)?

The data is a survey that spans through many years and it looks like this:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double uqnr int year byte gender float(realearnings bracketweight)
101000102 1995 1  7431.066  627.6182
101000103 1995 2  8160.452  880.0883
101000103 1995 1 16609.768  959.8002
101000104 1995 1 14443.277  711.5717
101000104 1995 2  6138.393  628.5513
101000105 1995 1  9027.048  494.9445
101000106 1995 1 13721.114  305.6876
101000106 1995 2 4332.9834 276.05228
101000107 1995 1 14443.277 296.85025
101000107 1995 2 14443.277 296.85025
101000109 1995 2  9604.779  336.5614
101000109 1995 1  34161.96  344.2217
101000113 1995 1 13071.166 301.50455
101000203 1995 1  380338.4  571.5556
101000203 1995 1  3249.737 289.71906
101000204 1995 1  72216.38  940.1255
101000204 1995 2  6105.896  328.8185
101000206 1995 2 4332.9834   326.207
101000301 1995 2 1444.3276  367.9313
101000302 1995 2  7943.803  340.1607
101000306 1995 2 10160.846  586.3346
101000312 1995 1  42427.13  500.4212
101000402 1995 1  54162.29  461.7992
101000505 1995 1 18054.096   500.413
101000509 1995 2   9388.13   423.987
101000601 1995 2  9749.212  356.9105
101000602 1995 1  4694.065 569.63416
101000603 1995 2  8431.263  422.1538
101000603 1995 1 4188.5503  399.1938
101000603 1995 1  12998.95  442.0488
101000605 1995 2  3610.819 285.58636
101000605 1995 2  3910.517  270.6086
101000605 1995 1 3130.5806  270.6086
101000607 1995 2 1263.7867  368.7036
101000608 1995 2  8304.884  550.8992
101000608 1995 1  7221.639  792.0349
101000610 1995 2  7149.422 292.00928
101000610 1995 1  5885.635  313.9468
101000702 1995 1  7041.098  423.9609
101000703 1995 2 1408.2195  362.8186
101000704 1995 2  4694.065  419.3345
101000704 1995 1  7221.639  422.1966
101000705 1995 1  4694.065   335.224
101000706 1995 1   6257.55  408.8057
101000706 1995 1  2697.282  411.8804
101000707 1995 1  4694.065  415.0588
101000707 1995 1  4694.065  415.0588
101000709 1995 2  2502.298 487.27905
101000709 1995 1 3130.5806 487.27905
101000711 1995 1  4694.065  407.8692
101000801 1995 2  3610.819  396.0446
101000801 1995 2  3249.737  375.5482
101000802 1995 1  8304.884  357.7208
101000802 1995 2  6499.475  344.6045
101000804 1995 1  6318.934 164.44913
101000804 1995 1  2888.655  153.0698
101000804 1995 2  3249.737  153.0698
101000805 1995 2  3610.819   310.845
101000805 1995 2  3249.737 294.75793
101000805 1995 1  4513.524  326.4951
101000805 1995 1 1444.3276 294.75793
101000806 1995 1  8846.508  483.6343
101000807 1995 1  7221.639  396.2699
101000807 1995 1  7221.639  396.2699
101000808 1995 1  3610.819  376.2609
101000808 1995 2 4332.9834  376.2609
101000809 1995 2 10832.458  382.8769
101000809 1995 1 16248.688 398.76245
101000810 1995 1  7221.639  477.6986
101000810 1995 2  2661.174   428.027
101000901 1995 2  3910.517  373.0515
101000901 1995 1 3130.5806  373.0515
101001004 1995 2  4694.065  472.6763
101001008 1995 1  2888.655  295.2639
102000101 1995 2 11735.163  606.8656
102000101 1995 2 14472.164  632.0444
102000103 1995 1  5777.311  584.8707
102000107 1995 1  26781.45  626.2286
102000107 1995 1  9778.099 588.43365
102000109 1995 2  7232.471 1020.6075
102000109 1995 1  9153.427  914.4837
102000111 1995 1 4332.9834  491.0057
102000111 1995 1 10832.458   962.743
102000112 1995 1 15710.675  851.8323
102000112 1995 2 2347.0325  700.3807
102000202 1995 1 17602.744  436.8143
102000205 1995 1  58376.11  688.1635
102000205 1995 1  5477.613  505.2517
102000205 1995 2 10951.615  549.2001
102000206 1995 1  15645.68  384.1558
102000207 1995 1 11735.163  435.3659
102000207 1995 2  7824.646  415.7717
102000210 1995 2   9388.13  501.7711
102000210 1995 1  4632.681 480.32275
102000301 1995 1  9027.048   313.803
102000301 1995 2  3177.521  271.1899
102000302 1995 1 14865.743   591.067
102000302 1995 2  4954.044 538.30444
102000304 1995 1 18054.096  434.9514
102000312 1995 1 28886.555 285.81586
end
label values gender gender
label def gender 1 "1. Male", modify
label def gender 2 "2. Female", modify
Thank you.