Hello all,
I am working on my dissertation which aims to evaluate the impact of a scheme on sex ratio at birth in India. I am using generalized propensity score matching analysis along with dose-response. In order to conduct the matching, I used the following stata command:
wherein sexratio1991 is the variable on which I want to match upon and did is the treatment indicator. My unit of observation is district (referred as sdist in the dataset)
However, upon running this command I get the following error: could not calculate numerical derivatives discontinuous region with missing values encountered r(430);
I probed more into my dataset which contains 651 districts (as displayed by the count command). However, when I plot the sexratio2011 against the districts, the graph plots the two variables against more than 900 districts. This is confusing as I do not have more that 651 districts in my dataset. I have attached the graph to show what I mean. I suspect that the issue is related to this point. But, I am not sure.
My datset is as follows:
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input int sdist float sexratio2011
1 596.7742
2 642.8571
3 862.069
4 644.0678
5 1184.2106
6 781.25
7 414.6342
8 954.5455
9 906.9767
10 962.963
11 636.3636
12 909.0909
13 913.0435
14 1392.857
15 711.1111
16 970.5883
17 764.7059
18 977.2727
19 673.0769
20 1418.6046
21 567.56757
22 1343.75
23 1000
24 833.3333
25 1428.5714
26 1035.7142
27 777.7778
28 615.3846
29 909.0909
30 709.6774
31 1045.4546
32 675
33 607.1429
34 750
36 645.1613
37 586.2069
38 633.3333
39 600
40 833.3333
41 1588.2354
42 1333.3334
44 591.83673
45 1062.5
46 710.5263
47 1400
48 514.2857
49 685.7143
50 1419.355
51 956.5217
52 696.9697
53 583.3333
54 709.6774
55 640
56 589.7436
57 727.2727
58 1400
59 758.6207
60 606.0606
61 533.3333
62 900
63 1074.0741
64 566.6667
65 1361.111
66 1586.207
67 1071.4286
68 875
69 484.8485
70 909.0909
71 1147.0588
72 450
73 709.6774
74 916.6667
75 1343.75
76 675
77 1058.8235
78 1185.1852
79 681.8182
80 560.9756
82 852.9412
83 758.6207
84 743.5897
85 571.4286
86 621.6216
87 756.7568
88 542.8571
89 897.9592
99 936.1702
100 1086.9565
101 805.5555
102 898.3051
103 750
104 759.2593
105 918.3674
106 1203.3898
107 833.3333
108 844.4445
109 941.1765
110 647.0588
111 1000
112 814.8148
end
I would be really grateful if someone can help me with this issue.
Many thanks in advance!
Kanika
I am working on my dissertation which aims to evaluate the impact of a scheme on sex ratio at birth in India. I am using generalized propensity score matching analysis along with dose-response. In order to conduct the matching, I used the following stata command:
Code:
gpscore sexratio1991 , t(did) gpscore(pscore) predict(hat_treat) sigma(sd) cutpoints(phase) index(p50) nq_gps(5) t_transf(ln) detail
However, upon running this command I get the following error: could not calculate numerical derivatives discontinuous region with missing values encountered r(430);
I probed more into my dataset which contains 651 districts (as displayed by the count command). However, when I plot the sexratio2011 against the districts, the graph plots the two variables against more than 900 districts. This is confusing as I do not have more that 651 districts in my dataset. I have attached the graph to show what I mean. I suspect that the issue is related to this point. But, I am not sure.
My datset is as follows:
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
input int sdist float sexratio2011
1 596.7742
2 642.8571
3 862.069
4 644.0678
5 1184.2106
6 781.25
7 414.6342
8 954.5455
9 906.9767
10 962.963
11 636.3636
12 909.0909
13 913.0435
14 1392.857
15 711.1111
16 970.5883
17 764.7059
18 977.2727
19 673.0769
20 1418.6046
21 567.56757
22 1343.75
23 1000
24 833.3333
25 1428.5714
26 1035.7142
27 777.7778
28 615.3846
29 909.0909
30 709.6774
31 1045.4546
32 675
33 607.1429
34 750
36 645.1613
37 586.2069
38 633.3333
39 600
40 833.3333
41 1588.2354
42 1333.3334
44 591.83673
45 1062.5
46 710.5263
47 1400
48 514.2857
49 685.7143
50 1419.355
51 956.5217
52 696.9697
53 583.3333
54 709.6774
55 640
56 589.7436
57 727.2727
58 1400
59 758.6207
60 606.0606
61 533.3333
62 900
63 1074.0741
64 566.6667
65 1361.111
66 1586.207
67 1071.4286
68 875
69 484.8485
70 909.0909
71 1147.0588
72 450
73 709.6774
74 916.6667
75 1343.75
76 675
77 1058.8235
78 1185.1852
79 681.8182
80 560.9756
82 852.9412
83 758.6207
84 743.5897
85 571.4286
86 621.6216
87 756.7568
88 542.8571
89 897.9592
99 936.1702
100 1086.9565
101 805.5555
102 898.3051
103 750
104 759.2593
105 918.3674
106 1203.3898
107 833.3333
108 844.4445
109 941.1765
110 647.0588
111 1000
112 814.8148
end
I would be really grateful if someone can help me with this issue.
Many thanks in advance!
Kanika
Comment