-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpcn_full.sthlp
1390 lines (1005 loc) · 46.8 KB
/
pcn_full.sthlp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{smcl}
{* *! version 1.0.0 8jan2020}{...}
{cmd:help pcn}{right: WB:PovcalNet Team}{* {right: ({browse "some link":SJ: ???})}}
{hline}
{vieweralsosee "" "--"}{...}
{vieweralsosee "Install wbopendata" "ssc install wbopendata"}{...}
{vieweralsosee "Help wbopendata (if installed)" "help wbopendata"}{...}
{viewerjumpto "Command description" "pcn_full##desc"}{...}
{viewerjumpto "Parameters description" "pcn_full##param"}{...}
{viewerjumpto "Options description" "pcn_full##options"}{...}
{viewerjumpto "Subcommands" "pcn_full##subcommands"}{...}
{viewerjumpto "Stored results" "pcn_full##return"}{...}
{viewerjumpto "Examples" "pcn_full##Examples"}{...}
{viewerjumpto "Disclaimer" "pcn_full##disclaimer"}{...}
{viewerjumpto "How to cite" "pcn_full##howtocite"}{...}
{viewerjumpto "References" "pcn_full##references"}{...}
{viewerjumpto "Acknowledgements" "pcn_full##acknowled"}{...}
{viewerjumpto "Authors" "pcn_full##authors"}{...}
{viewerjumpto "Regions" "pcn_countries##regions"}{...}
{viewerjumpto "Countries" "pcn_countries##countries"}{...}
{center:({help pcn:Go back to Intro page})}
{p2colset 10 17 16 2}{...}
{p2col:{cmd:pcn} {hline 2}}Stata package to manage {ul:{it:PovcalNet}} files and
folders.{p_end}
{p 4 4 2}{bf:{ul:Description (short)}}{p_end}
{p 4 4 2}
The {cmd:pcn} command,command, through a set of subcommands, allows Stata users to
comprehensively manage the PovcalNet files and folders. By using the command,
the user will be able to, load data into stata, get the main aggregates,
and keep up with updates.{p_end}
{hline}
{marker sections}{...}
{title:Sections}
{pstd}
Sections are presented under the following headings:
{it:{help pcn_full##description:Command description}}
{it:{help pcn_full##syntax:Command overall syntax}}
{it:{help pcn_full##subcommands:Subcommands description}}
- {it:{help pcn_full##subload:load}}
- {it:{help pcn_full##subcreate:create}}
- {it:{help pcn_full##subgd:groupdata}}
- {it:{help pcn_full##subdownload:download}}
- {it:{help pcn_full##submaster:master}}
- {it:{help pcn_full##subprimus:primus}}
- {it:{help pcn_full##subproduction:production}}
{it:{help pcn_full##param:Parameters description}}
{it:{help pcn_full##options:Options description}}
{it:{help pcn_full##examples:Examples}}
{it:{help pcn_full##disclaimer:Disclaimer}}
{it:{help pcn_full##termsofuse:Terms of use}}
{it:{help pcn_full##howtocite:How to cite}}
{marker description}{...}
{title:Description}
{pstd}
PovcalNet is a tool that allows computing poverty and inequality indicators for more than
160 countries and regions, inside the World Bank's database of household surveys
(check {help povcalnet:povcalnet} command). The {cmd:pcn} command(s)
allows Stata users to easly navigate the PovcalNet files and folders. In other words,
the {cmd:pcn} command allows working directly with the underlining data used by the PovcalNet
tool. Therefore, giving quick and easy access to, up to date, data for more than 160
countries' household surveys and aggregate data. {p_end}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker syntax}{...}
{title:Overall Syntax}
{p 8 17 2}
{cmdab:pcn:} [{it:{help pcn_full##subcommands:subcommand}}] [{cmd:,} {it:{help pcn_full##subcommands:Parameters}} {it:{help pcn_full##options:Options}}]
{p 4 4 2} Where parameters, identify the characteristics of the file to be used. {p_end}
{p 4 4 2} {ul:{title:Subcommands}}
The available subcommands are the following:
{col 5}Subcommand{col 30}Description
{space 4}{hline}
{p2colset 5 30 29 2}{...}
{p2col:{opt load}}Loads into memory the file corresponding to the parameters given by
the user.{p_end}
{p2col:{opt master}}Loads or updates the master file sheets.{p_end}
{p2col:{opt create}}Creates a dataset containing weights and welfare.
(Relevant for PovcalNet tools.){p_end}
{p2col:{ul:{opt group}}{opt data}}Creates group data files from raw information and
updates the master file with means.{p_end}
{p2col:{opt download}}(Rarely used). Downloads the latest file(s) available. Should
be only used when major updates are released.{p_end}
{p2col:{opt primus}}Allow you to manage with ease both the pending and approved data on PRIMUS.{p_end}
{space 4}{hline}
{p 4 4 2}
Further explanation of the {help pcn_full##subcommands:subcommands} is found {help pcn_full##subcommands:below}.{p_end}
{p 4 4 2} {ul:{title:Parameters}}
The {bf:pcn} command requires the following parameters:
{col 5}Parameter{col 30}Description
{space 4}{hline}
{p2col:{opt country:}(3-letter code)}List of country codes (accepts multiples) [{it:all} is not accepted]{p_end}
{p2col:{opt years:}(numlist|string)}Four-digit year [all is not accepted] {p_end}
{p2col:{opt type:}(string)}Type of collection requested, only GMD request are accepted.{p_end}
{space 4}{hline}
{p 4 4 2}
Further explanation of the {help pcn_full##param:parameters} is found {help pcn_full##param:below}.{p_end}
{p 4 4 2} {ul:{title:Options}}
The {bf:pcn} command has the following main options available:
{col 5}Option{col 30}Description
{space 4}{hline}
{p2col:{opt clear:}}Replaces data in memory.{p_end}
{p2col:{opt lis:}}Only LIS surveys will be taken into account.{p_end}
{p2col:{opt module:}}It will search accordingly for those either "BIN" or "GPWG"\"GMD" surveys.{p_end}
{p2col:{opt load:}}[Only for master subcommand] If selected the selected sheet will be load from the master.{p_end}
{p2col:{opt upload:}}[Only for master subcommand] If selected the selected sheet will be modified in the master. [Use restricted for the time being.]{p_end}
{space 4}{hline}
{p 4 4 2}
Further explanation of the {help pcn_full##options:Options} is found {help pcn_full##options:below}. {p_end}
{p 4 4 2}
{bf: Note: pcn} requires {help missings:missings}, {help datalibweb:datalibweb}
and {help primus:primus}. [Notice: {help datalibweb:datalibweb} and {help primus:primus}
may require World Bank internal resources]
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker subcommands}{...}
{title:Subcommands}
{center: {hline 3}{it:{help pcn_full##subload:load}} - {it:{help pcn_full##subcreate:create}} - {it:{help pcn_full##subgd:groupdata}} - {it:{help pcn_full##subdownload:download}}}
{center: - {it:{help pcn_full##submaster:master}} - {it:{help pcn_full##subprimus:primus}} {hline 3}}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker subload}{...}
{dlgtab:load}
{p 4 4 2}
The {cmd:load} subcommand loads the PovcalNet data into memory (this requires access to the P drive).
In overall terms, the command checks the conditions given by the user, chiefly
{opt countries} and {opt year}, and loads the existing data that satisfies the user's request,
or deploys a list with the surveys in stock that meets the conditions. If additional
conditions, such as {opt type} or {opt version} options, are listed then the search is refined.
{p_end}
{p 4 4 2}
Four different kinds of data can be loaded, accordingly to the chosen companion word:{p_end}
{hline 73}
Subcommand + Companion{col 45}Action
{hline 25}{col 45}{hline 45}
load [gpwg] {col 45}loads the GPWG surveys (approved).
load wrk {col 45}loads the working data (Not yet approved).
laod cpi {col 45}loads the CPI data (datalibweb's).
{hline 73}
{p 4 4 2}
Options and overall structure changes according to the companion word, please keep in mind the following:{p_end}
{hline 87}
Companion{col 25}Basic recommended structure
{hline 15}{col 25}{hline 67}
gpwg {col 20}{cmd:pcn load [gpwg]}, {opt countr(3-letter code)} {opt year(####)} [{opt veralt(##)} {opt vermast(##)}]
wrk {col 20}{cmd:pcn laod wrk}, {opt countr(3-letter code)} {opt year(####)}
cpi {col 20}{cmd:pcn load cpi} [, {opt version( date |"choose"|"pick")} ]
{hline 87}
{p 4 4 2}
The different options and parameters may be described:
{col 5}Option{col 30}Description
{space 4}{hline}
{p2col:{opt country:}(3-letter code)}List of country codes (accepts multiples) [{it:all} is not accepted]{p_end}
{p2col:{opt years:}(numlist|string)}Four-digit year [all is not accepted] {p_end}
{p2col:{opt version:}}If set a particular version of the file will be used on basis
of the date given by the user. If unsure of the date, by writing "choose" or "pick", a list of the versions available will be lunch and the user may select the one to use
trought a clickcable menu. If not set the latest version is used.{p_end}
{p2col:{opt clear:}}Replaces data in memory.{p_end}
{p2col:{opt lis:}}Only LIS surveys will be taken into account.{p_end}
{p2col:{opt module:}}It will search accordingly for those either "BIN" or "GPWG"\"GMD" surveys.{p_end}
{p2col:{opt veralt(##)}}If given it will use surveys with the given alternative version.{p_end}
{p2col:{opt vermast(##)}}If given it will use surveys with the given master version.{p_end}
{space 4}{hline}
{p 4 4 2}
{center:{hline 16}}
{center:{bf:Examples}}
{center:{hline 16}}
{p 7 4 2} {bf:load gpwg}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn load, countries(col) year(2016) clear}
{p 4 4 2}
In this example, as there is more than one survey that fulfils the conditions, a list
with available options is displayed, and the user must choose among the options.{p_end}
{p 4 4 2}
Even if sometimes useful, the list is not always ideal. The user may be more specific
in order to get the specific file that she/he has in mind. For example, if the
desired file is the LIS collection the user shall use the following command line:{p_end}
{phang2}
{stata pcn load, countries(col) year(2016) lis clear}
{p 4 4 2}
The same result is obtained with:{p_end}
{phang2}
{stata pcn load, countries(col) year(2016) module(BIN) clear}
{p 4 4 2}
The use of the option {opt lis} implies {opt module(BIN)}. If options {opt lis}
and {opt module(GPWG)}, {opt lis} would take predominance.{p_end}
{p 4 4 2}
Notice that the latest master version is the one loaded in the previous examples.
Nonetheless, it may be the case that a different master or an alternative version
is the one needed. This is mainly the case for replication exercises.
The options {opt vermast} and {opt veralt} allows to retrive this particular set(s) of infomation, as follows:{p_end}
{phang2}
{stata pcn load, countries(chl) year(2000) vermast(01) veralt(04) module(GPWG)}
{p 4 4 2}
You may also specify the survey needed:{p_end}
{phang2}
{stata pcn load, countries(nor) year(2010) survey(His-lis)}
{p 4 4 2}
Finally, it is strongly recommended that, both main parameters, {opt year} and {opt countries}, are
always set. Nonetheless, only setting the country is possible, in such case the lastest
survey year is set as default.{p_end}
{phang2}
{stata pcn load, countries(chl) clear}
{p 4 4 2}
The same is not true is the missing parameter is {opt countries}. This parameter is
compulsory.{p_end}
{p 7 4 2} {bf:load wrk}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn load wrk, countries(ury) year(2011) clear}
{p 4 4 2}
It is strongly recommended that, both main parameters, {opt year} and {opt countries}, are
always set. Nonetheless, only setting the year is possible, in such case the lastest
survey year is set as default.{p_end}
{phang2}
{stata pcn load wrk, countries(ury) clear}
{p 4 4 2}
The same is not true is the missing parameter is {opt countries}. This parameter is
compulsory.{p_end}
{p 7 4 2} {bf:load cpi}{p_end}
{space 4}{hline 15}
{p 4 4 2}
The cpi structure is quite simple. Just run:{p_end}
{phang2}
{stata pcn load cpi, clear}
{p 4 4 2}
if you need to use a different version, insted of the latest one, use the option {opt version}. If you write pick, a clickcable list will be deployed:{p_end}
{phang2}
{stata pcn load cpi, version(pick) clear}
{center:(Go up to {it:{help pcn_full##subcommands:Subcommand top}})}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker subcreate}{...}
{dlgtab:create}
{p 4 4 2}
This subcommand creates a text file and other povcalnet files. The file collapses the
information generating the required weights and welfare for working with
{browse "http://iresearch.worldbank.org/PovcalNet/PovCalculator.aspx":PovcalNet tools}. {p_end}
{p 4 4 2}
{bf:{ul:Examples}}
{p 4 4 2}
A simple query is:{p_end}
{phang2}
{stata pcn create, countries(dnk) year(2013) clear}
{p 4 4 2}
Further options may be applied. In particular, is possible to include version options, such as:{p_end}
{phang2}
{stata pcn create, countries(tgo) year(2015) vermast(01) veralt(02)}
{p 4 4 2}
Also, if desired, one may specify the module as well. Nontheless, only GMD or GPWG
may be admissable.{p_end}
{phang2}
{stata pcn create, countries(tgo) year(2015) vermast(01) veralt(02) module(GMD)}
{center:(Go up to {it:{help pcn_full##subcommands:Subcommand top}})}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker subgd}
{dlgtab:groupdata}
{p 4 4 2}
This subcommand check for existing group data information and updates (or generates)
the information. {p_end}
{p 4 4 2}
{bf:{ul:Examples}}
{p 4 4 2}
To check for exiting daa or to update just run:{p_end}
{phang2}
{stata pcn groupdata, clear}
{phang2}
{stata pcn gd, clear}
{phang2}
{stata pcn group, clear}
{p 4 4 2}
Please notice that the lines above are all the same. Some of them take advantage of the
possible abbreviations to call the subcommand.{p_end}
{center:(Go up to {it:{help pcn_full##subcommands:Subcommand top}})}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker subdownload}
{dlgtab:download}
{p 4 4 2}
This subcommand downloads the survey data. Check available surveys (given the user
parameters) and downloads GPWG data from datalibweb. The file(s) is load in memory
and save in the specified folder.{p_end}
{p 4 4 2}
Four different kinds of data can be downloaded, accordingly to the chosen companion word:{p_end}
{hline 73}
Subcommand + Companion{col 45}Action
{hline 25}{col 45}{hline 45}
download [gpwg] {col 45}Downloads the GPWG surveys (approved).
download wrk {col 45}Downloads the working data (Not yet approved).
{hline 73}
{p 4 4 2}
Options and overall structure changes according to the companion word, please keep in mind the following:{p_end}
{hline 87}
Companion{col 25}Basic recommended structure
{hline 15}{col 25}{hline 67}
gpwg {col 20}{cmd:pcn download [gpwg]} [, {opt countr(3-letter code)} {opt year(####)} {opt veralt(##)} {opt vermast(##)}]
wrk {col 20}{cmd:pcn downlaod wrk} [, {opt countr(3-letter code)} {opt year(####)}]
{hline 87}
{p 4 4 2}
The different options and parameters may be described:
{col 5}Option{col 30}Description
{space 4}{hline}
{p2col:{opt country:}(3-letter code)}List of country codes (accepts multiples) [{it:all} is not accepted]{p_end}
{p2col:{opt years:}(numlist|string)}Four-digit year [all is not accepted] {p_end}
{p2col:{opt replace:}}Replaces data the existing file(s).{p_end}
{p2col:{opt veralt(##)}}If given it will use surveys with the given alternative version.{p_end}
{p2col:{opt vermast(##)}}If given it will use surveys with the given master version.{p_end}
{space 4}{hline}
{p 4 4 2}
{center:{hline 16}}
{center:{bf:Examples}}
{center:{hline 16}}
{p 5 4 2} {bf:Download gpwg}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn download, countries(chl) year(2013)}
{p 4 4 2}
Request for different versions of the surveys is posible as well:{p_end}
{phang2}
{stata pcn download, countries(ben) year(2015) veralt(02)}
{phang2}
{stata pcn download, countries(ben) year(2015) veralt(01)}
{p 4 4 2}
If you intend to replace the exising file(s) for the newer version(s), you must
declare the option {opt replace}{p_end}
{phang2}
{stata pcn download, countries(chl) year(2013), replace}
{p 6 4 2} {bf:Download wrk}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn download wrk, countries(ury) year(2011)}
{center:(Go up to {it:{help pcn_full##subcommands:Subcommand top}})}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker submaster}{...}
{dlgtab:master}
{p 4 4 2}
This subcommand allows to work with the master file. You may load the different
sheets from the master file into memory or modify the master file using the current data on memory.
{p 4 4 2}
The basic structure is as follows:
{p 8 17 2}
{cmdab:pcn:} master, {bf:action}(sheet) shape(long) version(pick\choose\select) options
{p 4 4 2}
Two actions are possible:{p_end}
{hline 73}
action{col 33}Description
{hline 25}{col 30}{hline 45}
load(sheet) {col 30}loads the selected sheet.
upload(sheet) {col 30}Modifies selected sheet (This is restricted).
{hline 73}
{p 4 4 2}
{bf:load}{p_end}
{p 4 4 2}
This option can be used to load each spreadsheet of the most recent version of the master file into memory.
Each spreadsheet is loaded in long format. The user can choose the spreadsheet
to load by specifying one of the following: cpi, ppp, gdp, population, pce,
currencyconversion, regionlookup, countrylist, countrylookup, surveyinfo, surveymean.
The load option also accepts: pick, select, choose and sheetslist. Specifying one of these allows
the users to pick each sheet manually.
The load option can be combined with the option version to choose among different versions of the master file. The user can indicate pick, select or choose within the version option.{p_end}
{p 4 4 2}
{bf:sheets}{p_end}
{p 4 4 2}
The following sheets are available:{p_end}
{hline 73}
Sheet{col 40}description
{hline 25}{col 30}{hline 45}
cpi {col 40}cpi sheet.
ppp {col 40}ppp sheet.
gdp {col 40}gdp sheet.
population {col 40}population sheet.
pce {col 40}pce sheet.
currencyconversion {col 35}currrency ratios sheet.
regionlookup {col 40}region lookup sheet.
countrylist {col 40}country list sheet.
countrylookup {col 40}countries lookup sheet.
surveyinfo {col 40}Survey info sheet.
surveymean {col 40}Survey mean sheet.
{hline 73}
{space 4}{hline}
{p 4 4 2}
{p 4 4 2} {ul:{title:Options}}
The {bf:pcn} command has the following main options available:
{col 5}Option{col 30}Description
{space 4}{hline}
{p2col:{opt shape:(long|wide)}}Replaces data in memory.{p_end}
{p2col:{opt version:}} If set a particular version of the file will be used on basis of the date given by the user. If unsure of the date, by writing "choose" or "pick", a list of the versions available will be lunch and the user may select the one to use trought a clickcable menu. If not set the latest version is used.
{p_end}
{space 4}{hline}
{center:{hline 16}}
{center:{bf:Examples}}
{center:{hline 16}}
{p 4 4 2}
The following loads the spreadsheet of the master file containing the cpi data:{p_end}
{phang2}
{stata pcn master, load(cpi)}{p_end}
{p 4 4 2}
The following loads the spreadsheet of the master file containing the cpi data and allows the user to pick a version of the master file:{p_end}
{phang2}
{stata pcn master, load(cpi) version(pick)}{p_end}
{p 4 4 2}
The following allows the user to select a version of the master file and a sheet to use:{p_end}
{phang2}
{stata pcn master, load(pick) version(select)}{p_end}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{marker subprimus}{...}
{dlgtab:primus}
{p 4 4 2}
The {cmd:primus} subcommand allows to manage with ease both the pending and approved data on PRIMUS.
{p_end}
{p 4 4 2}
Two different kinds of data be used, accordingly to the chosen companion word:{p_end}
{hline 73}
Subcommand + Companion{col 45}Action
{hline 25}{col 45}{hline 45}
primus approved {col 45}Works with approved data on primus
primus pending {col 45}Works with the pending (not yet approved) data.
{hline 73}
{p 4 4 2}
Options and overall structure is similar independent of the companion word, please keep in mind the following:{p_end}
{p 8 17 2}
{cmdab:pcn:} primus [approved | pending], [ down(estimates|transactions) | load(estimates|transactions) ] {it:{help pcn_full##options:Options}}
{p 4 4 2}
Either {opt load} or {opt down} is required.
{col 5}Option{col 30}Description
{space 4}{hline}
{p2col:{opt load:(estimates|trans)}}If selected the either the primus estimates or transactions IDs will be loaded into memory.{p_end}
{p2col:{opt down:(estimates|trans)}}If selected the either the primus estimates or transactions IDs will be downloaded or updated.{p_end}
{p2col:{opt version:}}If set a particular version of the estimates or transacions will be load on basis
of the date given by the user. If unsure of the date, by writing "choose" or "pick", a list of the versions available will be lunch and the user may select the one to use
trought a clickcable menu. If not set the latest version is used.{p_end}
{space 4}{hline}
{p 4 4 2}
{center:{hline 16}}
{center:{bf:Examples}}
{center:{hline 16}}
{space 4}{hline 15}
{p 4 4 2}
Getting the latest approved estimates:{p_end}
{phang2}
{stata pcn primus approved, load(estimates)}
{p 4 4 2}
Getting the latest approved transactions:{p_end}
{phang2}
{stata pcn primus approved, load(transactions)}
{p 5 4 2}
which is the same as:
{phang2}
{stata pcn primus approved, load(trans)}
{p 4 4 2}
If you need pending data the same holds:{p_end}
{phang2}
{stata pcn primus pending, load(estimates)}
{phang2}
{stata pcn primus pending, load(trans)}
{p 4 4 2}
If you need to load a particular version, keep in mind the {opt version} option:
{phang2}
{stata pcn primus pending, load(trans) version(list)}
{p 4 4 2}
If you need to update the information just use the {opt down} option:
{phang2}
{stata pcn primus pending, down(estimates)}
{phang2}
{stata pcn primus approved, down(trans)}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker subproduction}{...}
{dlgtab:production}
{p2colset 5 30 29 2}{...}
{p 4 4 2}
This subcommand allows the user the load or create PovcalNet production vintages.
{p_end}
{p 4 4 2}
Two actions are available:{p_end}
{hline 73}
Subcommand + Action{col 45}Result
{hline 25}{col 45}{hline 45}
production load {col 45}Loads specific vintage.
production create {col 45}Create vintage in pre-existing folder in P drive.
{hline 73}
{p 4 4 2}
Options and overall structure changes according to the companion word, please keep in mind the following:{p_end}
{hline 87}
Action{col 25}Basic recommended syntax
{hline 15}{col 25}{hline 67}
load {col 25}{cmd:pcn production load} [, {it:vintage(YYYY_VT) clear}]
create {col 25}{cmd:pcn production create} [, {it:vintage(YYYY_VT) server(string) clear}]
{hline 87}
{p 4 4 2}
Where {it:YYYY} refers to the year and {it:VT} refers to the vintage of the year, which may be a three-letter word for the month of the update (e.g, JUL for July) or a two-letter word for the WB meeting (e.g., SM for Spring meetings).
{col 5}Option{col 30}Description
{space 4}{hline}
{p2col:{opt vintage:}(YYYY_VT)}Vintage of the data{p_end}
{p2col:{opt clear:}}Replaces data in Stata memory{p_end}
{p2col:{opt replace:}}Replaces vintage file in P drive. Only available with {it:create} action. {p_end}
{space 4}{hline}
{p 4 4 2}
{center:{hline 16}}
{center:{bf:Examples}}
{center:{hline 16}}
{p 5 4 2} {bf:Load production vintage}{p_end}
{space 4}{hline 15}
{p 4 4 2}
Display list of available ("clickable") vintages:{p_end}
{phang2}
{stata pcn production load}
{p 4 4 2}
Load a specific vintage:{p_end}
{phang2}
{stata pcn production load, vintage(2020_JUL)}
{p 5 4 2} {bf:Create production vintage}{p_end}
{space 4}{hline 15}
{p 4 4 2}
Create a new vintage version. Only available for some members of the PovcalNet Team. {p_end}
{phang2}
{stata pcn production create, vintage(2020_JUL)}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker param}{...}
{title:Parameters}
{p 4 4 2}
The parameters are the key input to determine the source of the working data. Aside from
the cast subcommand, the parameters work similarly:{p_end}
{p 8 17 2}
{cmdab:pcn:} [{it:{help pcn_full##subcommands:subcommand}}] [{cmd:,}
{opt countr:ies(3-letter code)} {opt year(####)} {opt type(string)}
{it:{help pcn_full##options:Options}}]{p_end}
{p 4 4 2}
The {opt countr:ies} and {opt year} are in general mandatory. Although in some cases,
the omission will not result in an error, instead, it will deploy a list of the
available data given the parameters input. The {opt type} parameter parameter
determines the collection in which the data will be searched.{p_end}
{p 4 4 2}
The {opt countr:ies} parameter requires a list of country code(s) to be lookup in the
available Povcalnet files. The country codes correspond to the standard World Bank
three-letter codes.{p_end}
{p 4 4 2}
The {opt year} parameter requires a year to be lookup in the available Povcalnet
files. The year must be provided as a four-digit number or string
(ex. 2016, 1990 or 2008).{p_end}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker options}{...}
{title:Options}
{p 4 4 2}
The complete list of options is as follows:{p_end}
{dlgtab:Main}
{p2col:{opt clear:}}Replaces data in memory{p_end}
{dlgtab:Versions}
{p2col:{opt verm:aster(#)}}Specifies the master version to be used. If ommited, by
default the latest version is selected.{p_end}
{p2col:{opt vera:lt(#)}}Specifies the harmonization version to be used. By default,
the latest harmonization version is selected for the latest master version.{p_end}
{p2col: {opt lis}}If specified, then only LIS surveys will be taken into account.
If not specified, then the GMD collection will be used.{p_end}
{p2col: {opt w:orking}}Calls the working version. This version contains updates and
editions to the latest version available but not released.(NOT YET available,
BUT MAY BE USEFULL WHEN THE UPDATE KICKS IN){p_end}
{p2col:{opt module}}It will search, accordingly, for either "BIN" or "GPWG"|"GMD" surveys.{p_end}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{marker examples}{...}
{title:Examples}
{dlgtab:load}
{p 7 4 2} {bf:load gpwg}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn load, countries(col) year(2016) clear}
{p 4 4 2}
In this example, as there is more than one survey that fulfils the conditions, a list
with available options is displayed, and the user must choose among the options.{p_end}
{p 4 4 2}
Even if sometimes useful, the list is not always ideal. The user may be more specific
in order to get the specific file that she/he has in mind. For example, if the
desired file is the LIS collection the user shall use the following command line:{p_end}
{phang2}
{stata pcn load, countries(col) year(2016) lis clear}
{p 4 4 2}
The same result is obtained with:{p_end}
{phang2}
{stata pcn load, countries(col) year(2016) module(BIN) clear}
{p 4 4 2}
The use of the option {opt lis} implies {opt module(BIN)}. If options {opt lis}
and {opt module(GPWG)}, {opt lis} would take predominance.{p_end}
{p 4 4 2}
Notice that the latest master version is the one loaded in the previous examples.
Nonetheless, it may be the case that a different master or an alternative version
is the one needed. This is mainly the case for replication exercises.
The options {opt vermast} and {opt veralt} allows to retrive this particular set(s) of infomation, as follows:{p_end}
{phang2}
{stata pcn load, countries(chl) year(2000) vermast(01) veralt(04) module(GPWG)}
{p 4 4 2}
You may also specify the survey needed:{p_end}
{phang2}
{stata pcn load, countries(nor) year(2010) survey(His-lis)}
{p 4 4 2}
Finally, it is strongly recommended that, both main parameters, {opt year} and {opt countries}, are
always set. Nonetheless, only setting the country is possible, in such case the lastest
survey year is set as default.{p_end}
{phang2}
{stata pcn load, countries(chl) clear}
{p 4 4 2}
The same is not true is the missing parameter is {opt countries}. This parameter is
compulsory.{p_end}
{p 7 4 2} {bf:load wrk}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn load wrk, countries(ury) year(2011) clear}
{p 4 4 2}
It is strongly recommended that, both main parameters, {opt year} and {opt countries}, are
always set. Nonetheless, only setting the year is possible, in such case the lastest
survey year is set as default.{p_end}
{phang2}
{stata pcn load wrk, countries(ury) clear}
{p 4 4 2}
The same is not true is the missing parameter is {opt countries}. This parameter is
compulsory.{p_end}
{p 7 4 2} {bf:load cpi}{p_end}
{space 4}{hline 15}
{p 4 4 2}
The cpi structure is quite simple. Just run:{p_end}
{phang2}
{stata pcn load cpi, clear}
{p 4 4 2}
if you need to use a different version, insted of the latest one, use the option {opt version}. If you write pick, a clickcable list will be deployed:{p_end}
{phang2}
{stata pcn load cpi, version(pick) clear}
{dlgtab:create}
{p 4 4 2}
A simple query would be:{p_end}
{phang2}
{stata pcn create, countries(dnk) year(2013) clear}
{p 4 4 2}
Further options may be applied. In particular, is possible to include version options, such as:{p_end}
{phang2}
{stata pcn create, countries(tgo) year(2015) vermast(01) veralt(02)}
{p 4 4 2}
Also, if desired, one may specify the module as well. Nontheless, only GMD or GPWG
may be admissable.{p_end}
{phang2}
{stata pcn create, countries(tgo) year(2015) vermast(01) veralt(02) module(GMD)}
{dlgtab:groupdata}
{p 4 4 2}
To check for exiting daa or to update just run:{p_end}
{phang2}
{stata pcn groupdata, clear}
{phang2}
{stata pcn gd, clear}
{phang2}
{stata pcn group, clear}
{p 4 4 2}
Please notice that the lines above are all the same, but some of them take adventage
of the posible abbreviations to call the subcommand.{p_end}
{dlgtab:download}
{p 5 4 2} {bf:Download gpwg}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn download, countries(chl) year(2013)}
{p 4 4 2}
Request for different versions of the surveys is posible as well:{p_end}
{phang2}
{stata pcn download, countries(ben) year(2015) veralt(02)}
{phang2}
{stata pcn download, countries(ben) year(2015) veralt(01)}
{p 4 4 2}
If you intend to replace the exising file(s) for the newer version(s), you must
declare the option {opt replace}{p_end}
{phang2}
{stata pcn download, countries(chl) year(2013), replace}
{p 6 4 2} {bf:Download wrk}{p_end}
{space 4}{hline 15}
{p 4 4 2}
One of the most simple queries possible is only setting the country and a year:{p_end}
{phang2}
{stata pcn download wrk, countries(ury) year(2011)}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{dlgtab:master}
{p 4 4 2}
The following loads the spreadsheet of the master file containing the cpi data:{p_end}
{phang2}
{stata pcn master, load(cpi)}{p_end}
{p 4 4 2}
The following loads the spreadsheet of the master file containing the cpi data and allows the user to pick a version of the master file:{p_end}
{phang2}
{stata pcn master, load(cpi) version(pick)}{p_end}
{p 4 4 2}
The following allows the user to select a version of the master file and a sheet to use:{p_end}
{phang2}
{stata pcn master, load(pick) version(select)}{p_end}
{center:(Go up to {it:{help pcn_full##sections:Sections Menu}})}
{center:({help pcn:Go back to Intro page})}
{dlgtab:primus}
{p 4 4 2}
Getting the latest approved estimates:{p_end}
{phang2}
{stata pcn primus approved, load(estimates)}
{p 4 4 2}
Getting the latest approved transactions:{p_end}
{phang2}
{stata pcn primus approved, load(transactions)}
{p 5 4 2}
which is the same as:
{phang2}
{stata pcn primus approved, load(trans)}
{p 4 4 2}
If you need pending data the same holds:{p_end}