0. ■ - ' Computer Programs for Demographic Analysis U.S. Department of Commerce BUREAU OF THE CENSUS ■^^■■^H IjMMHHI ■B mm HPHH Prepared Undera Resources Support Services Agreement with the U.S. AGENCY FOR INTERNATIONAL DEVELOPMENT Office of Population International Statistical Programs Center Computer Programs for Demographic Analysis is one of a series of publications of the International Statistical Programs Center (ISPC), U.S. Bureau of the Census. The publications include demographic and socioeconomic reports and studies that were originally prepared for program sponsors or for presentation at conferences. Efforts are made continually to keep the data presented in the reports as accurate and complete as source availability and the technology for tabulating and analyzing data permit. Comments from users of the reports are welcome. Development. Collaborative arrangements have also been made with the United Nations and many of its affiliates. The Center's staff of demographers, economists, statisticians, programmers, educators, social science and systems analysts, and overseas consultants main- tain a steady exchange of information with domestic and foreign planning and research organizations, by both formal and informal means. Publications of the Center include: ISPC conducts most of the Census Bureau's inter- national statistical activities. The Center's programs cover demographic, economic, and social subjects, systems analysis, data processing, and statistical methodology. Some of the Center's principal objectives are to: help the developing nations of the world achieve improvements in their statistics and statistical systems through training courses given in ISPC's own classrooms and by correspondence, through overseas workshops and consultation, and by the development of methodological materials. maintain an international demographic sta- tistics and information center to provide planners, researchers, and others with source materials for studies and analyses. provide statistical assistance to the Agency for International Development in evaluating programs and determining policies, partic- ularly in the population field. construct mathematical models to help developing nations project trends and quan- tify the impacts of alternative demographic, economic, education, and health policies. Major financial support for the programs is provided by the Office of Population, Agency for International Demographic reports and profiles on se- lected foreign countries Demographic estimates and projections for the world, its regions, and countries Family planning statistics for the develop- ing countries of Africa, Asia, and Latin America Research documents, which include con- ference reports, addresses, and papers on various demographic subjects Socioeconomic studies of selected foreign countries Computer data processing programs for socioeconomic analysis, with associated reference manuals Computer data processing programs for tabulating census and survey results, with associated reference manuals World fertility, growth, and mortality maps Many of the publications are translated into Spanish and French. For more information about ISPC's publication and information programs, address inquiries to the Chief, Documentation Branch, International Statistical Pro- grams Center, Bureau of the Census, Washington, D.C. 20233. ISP-TR-2 Computer Programs for Demographic Analysis by Eduardo Arriaga Patricia Anderson Larry Heligman CONTENTS Page in INDEX OF SUBROUTINES BY MAJOR DEMOGRAPHIC CATEGORY INTRODUCTION-Chapter 1 PURPOSES OF THE SUBROUTINES-Chapter 2 Curve Fitting, Smoothing, and Graduation Evaluation Fertility Mortality Printing Projections Stable Population INSTALLATION AND OPE RATI ON-Chapter 3 Subroutines and Main Programs Computer Memory Size Preparation of Input to the Computer Modifications Required 10 10 10 DOCUMENTATION-Chapter 4 I «3 i [Q. 4) IO ; Issued June 1976 '^ 6 -i9i 6 © ABREV 15 ADJBG 31 ADJFR 43 AGESX 55 BEERS 67 BLT 81 BRASF 93 BRASM 109 ELT 125 FWDRV 143 GTCON 179 INTRP 185 INTRT 199 INTSP 209 IRDID 225 LIFIT 237 MDRNS 249 MLT 257 MORDJ 271 NRSFR 283 APPENDIX Linking of Subroutines Example 1 Example 2 ONECN PBEER PKREG PLT PPROJ PREVR PROJ5 PSPP PYRMD QXADJ REVR5 RVFWD SMOTH SPP SRX10 SURVI TWOCN UNSMH 293 313 317 333 337 343 347 391 397 419 431 463 487 499 517 529 541 559 573 575 578 U.S. Department of Commerce Elliot L. Richardson, Secretary ACKNOWLEDGEMENTS This publication was prepared in the international Statistical Programs Center under the general direction of Samuel Baum, Assistant Chief for Demographic Research, and under the supervision of Eduardo E. Arriaga, Chief, Data Evaluation Branch. The authors wish to acknowledge the contributions of Phillip Heinrichs, who prepared the preliminary formats of the computer programs, and Vernon L. Small wood who contributed substantially to the final programming and editing of the computer programs. Valuable assistance in preparing the materials for publication was provided by Patricia Stedman, Patricia Kirkpatrick, Marjorie Petit and John Gibson. Helpful comments and suggestions regarding presentation of materials were received from the staffs of the Computer Methods and the Demographic Analysis Branches of ISPC, from the Population Division of the Bureau of the Census, as well as from the Data Evaluation Branch of the Population Division of the United Nations. Their comments contributed significantly to the improvement of the original draft. Appreciation is also expressed to Carol Van Horn, who, under the supervision of Lloyd Freese, Chief, Documentation Branch, assumed primary responsibility for the editing and publication of this document. The authors also express their thanks to the many other persons who directly or indirectly assisted in preparing and improving this publication. This report was prepared under a Resources Support Services Agreement with the Office of Population, Bureau for Population and Humanitarian Assistance, Agency for International Development. Users of this publication are invited to send their comments to the Chief, International Statistical Programs Center, U.S. Department of Commerce, Washington, D.C. 20233. SUGGESTED CITATION U.S. Bureau of the Census, Computer Programs for Demographic Analysis, by Eduardo Arriaga, Patricia Anderson, and Larry Heligman. For sale by Subscriber Services (Publications), Bureau of the Census, Washington, D.C. 20233. Postage stamps not acceptable; currency submitted at sender's risk. Remittances from foreign countries must be by international money order or by a draft on a U.S. bank. $5.50 per copy. INDEX OF SUBROUTINES BY MAJOR DEMOGRAPHIC CATEGORY Curve fitting, Stable Smoothing, and Evaluation Fertility Mortality Printing Projections population Graduation ABREV AGESX ADJFR BLT PBEER ADJFR ADJBG BEERS FWDRV BRASF BRASM PLT MORDJ INTRT INTRP IRDID NRSFR ELT PPROJ NRSFR INTSP MDRNS PYRMD GTCON PREVR PRO J 5 NRSFR SMOTH REVR5 LIFIT PSPP QXADJ ONECN UNSMH RVFWD SMOTH UNSMH MLT MORDJ PKREG QXADJ SRXIO SURVI TWOCN ■ SPP ABREV: To equalize the number of age groups in two distributions. ADJBG: To estimate quasi -stable crude vital rates. ADJFR: To change the level of age-specific fertility rates. AGESX: To calculate age and sex ratios. BEERS: To separate grouped data into five parts. BLT: To calculate a life table for both sexes combined. BRASF: Brass' fertility estimate technique. BRASM: Brass' mortality estimate technique. ELT: To calculate an abridged life table from M or q values. X A FWDRV: To adjust age-sex population distributions. GTCON: To obtain constants or coefficients for subroutines ADJBG, BRASM, and MLT, INTRP: To make a linear or exponential interpolation. INTRT: To calculate an intrinsic growth rate. INTSP: To calculate a stable population. IRDID: To compare two age-group distributions. LIFIT: To compare two sets of survival rates. MDRNS: To rank a set of values and give the median. MLT: To calculate a Coale-Demeny model life table, by sex. MORDJ: To calculate a set of survival rates. NRSFR: To calculate age-specific fertility rates. ONECN: To calculate stable or quasi-stable parameters. PBEER: To print results from using BEERS. PKREG: To select a pattern of mortality from Coale-Demeny model life tables. PLT: To print the functions of a life table. PR0J5: To make a population projection. PPROJ: To print the results of a population projection. PREVR: To print the results of a population rejuvenation. PSPP: To print a stable population distribution and its parameters. PYRMD: To construct a population pyramid. QXADJ: To estimate a set of q life table values. n x REVR5: To make a population rejuvenation. RVFWD: To evaluate age group 0-4 in a population distribution. SMOTH: To smooth a population distribution of 5-year age groups. SPP: To calculate a stable population. SRX10: To calculate survival rates for open-ended age groups. SURVI: To calculate survival rates. TWOCN: To estimate a life table and crude rates from two population distributions, UNSMH: To smooth a population distribution of 5-year age groups with a United Nations formulas. Chapter 1 INTRODUCTION During the last two decades, the use of computers for manipulating and analyzing demographic data has become an accepted and increasingly widespread practice. This trend toward computerization started with the tabulation of census and survey results, later incorporated the techniques of statistical analysis, and now has expanded to include the techniques and methodologies of demographic analysis. The main advantages of using a computer for demographic analysis are the ready availability of proven demographic and statistical techniques, the time saved, and the assurance that calcula- tions are made without error. This manual presents a set of computer programs, or subroutines, which are designed to analyze the quality of population data as well as to calculate and estimate numerous demographic parameters. These subroutines can be used for such purposes as estimating levels and trends of fertility and mortality from census and survey data, projecting populations by age and sex, constructing model or empirical life tables, and performing stable population analysis. The subroutines have been written in a level of FORTRAN language that is acceptable to any computer with a FORTRAN compiler. The documentation of the subroutines is presented in a simple, straightforward style, avoiding technical computer terminology as much as possible. This approach was adopted so that the documentation will be under- standable to users who are not experienced programmers. Also, instructions given in the documentation permit use of the subroutines without a thorough knowledge of the demographic methodologies involved. It is strongly advised, however, that before employing any of the subroutines the user be fully aware of the demographic and statistical techniques utilized. Computers are not able to judge the quality of the data, the methods, or the results from a 2 COMPUTER PROGRAMS FOR DEMOGRAPHIC ANALYSIS demographic point of view. It is the user's responsibility to decide whether or not the data and methods used in the subroutines are proper and adequate for the analysis being conducted. Following this introduction are three additional chapters and an Appendix. Chapter 2 describes the purpose of each subroutine. Chapter 3 discusses the relationship between the subroutines and the main programs which control their operation in the computer, and notes several technical aspects that must be taken into consideration in using the pro- grams in any computer facility. Chapter 4 presents the documentation of each subroutine and an explanation of its use. The Appendix provides technical programming instructions on the writing of additional main programs for use of the subroutines beyond those given in this manual . The subroutines presented here were developed in the International Statistical Pro- grams Center for use in estimating trends and levels of fertility and mortality and for evaluating the results of population censuses of countries which have limited statisti- cal resources and data. A previous publication issued by the Center, Technical Paper No. 25 3 Demographic Computer Library 3 contained earlier versions of some of the sub- routines. A major addition in this publication is the set of main programs which are needed to control and operate the subroutines. Chapter 2 PURPOSES OF THE SUBROUTINES This chapter describes the purpose of each of the subroutines included in this pub- lication. The listing of subroutines is arranged by demographic category or calculation for which the subroutine can be used. The categories are a) curve fitting, smoothing, and graduation; b) evaluation; c) fertility; d) mortality; e) printing; f) projections; and g) stable population. Some subroutines have been listed under more than one category because they can be used in different demographic analyses. For instance, if a subroutine's purpose is to calculate age-specific fertility rates, given a fertility pattern, a life table, the net reproduction rate, and the proportion of female births to total births, that sub- routine is classified not only under "fertility," but also under "projections" and "stable population." The purpose of each subroutine is described in the first category under which it is listed; only the name is given in succeeding categories. The "print- ing" category includes those subroutines which are used for printing standard results -- for instance, a life table, a population age distribution in a projection, etc. References in the descriptions below to "Coale-Demeny" are to Ansley J. Coale and Paul Demeny, Regional Model Life Tables and Stable Populations, Princeton University Press, Princeton, New Jersey, 1966. Similarly, the references to "United Nations" are United Nations, Methods for Population Projections by Sex and Age, ST/SOA Series A, Population Studies No. 25, New York, 1956 and Accuracy Tests for Census Age Distributions Tabulated in Five-Year and Ten-Year Groups, Population Bulletin, No. 2, October 1952, pp. 59-79. Curve Fitting, Smoothing, and Graduation ABREV - To adjust the number of age groups in a distribution to be the same as the num- ber of age groups in the second distribution. The distribution with the larger number of age groups is adjusted to contain the same number of age groups as 4 COMPUTER PROGRAMS FOR DEMOGRAPHIC ANALYSIS that of the other distribution. The distributions can be either two populations, two sets of survival rates, or a population and a set of survival rates. BEERS - To separate grouped data into five parts. For instance, to obtain a single-year age distribution from a population given in 5-year age groups, or to obtain values for single years of age of the life table function rL . INTRP - To make a linear or exponential interpolation between two values. The sub- routine can be used to interpolate between population totals, age-specific fer- tility rates, survival rates, life expectancies, or other such demographic indicators. MDRNS - To rank a given set of values and determine the median. SMOTH - To smooth a population distribution of 5-year age groups. The subroutine first groups the 5-year age groups into 10-year age groups, then separates the 10- year age groups into 5-year age groups under three different assumptions. UNSMH - To smooth a population distribution in 5-year age groups, except for the first two and last two 5-year age groups, using a formula derived by the United Nations. Evaluation AGESX - To calculate age and sex ratios for a population distribution by sex and 5-year age groups. The sex-ratio score, age-ratio score, and joint age-sex ratio score -- as defined by the United Nations -- are calculated. FWDRV - To adjust age-sex distributions obtained from two population censuses taken 10 years apart. The results present the original and smoothed population distri- butions and the differences between them for each of the enumeration dates. IRDID - To compare the age distributions of two populations by calculating the Index of Relative Difference and the Index of Dissimilarity. PYRMD - To make one or two age pyramids by sex from one or two age and sex population distributions, respectively. REVR5 - To rejuvenate, five years backward in time, each sex of a population distribution, by 5-year age groups. The rejuvenation utilizes survival rates and number of migrants, by 5-year age groups. If there are no migrants, the variable rep- resenting them is zero. Although this subroutine makes the rejuvenation only for a 5-year period, a population rejuvenation can be made for a time period varying from 5 to 50 years by using the main program as given in this publication. PURPOSES OF THE SUBROUTINES RVFWD - To obtain an estimate of the underenumeration of age group 0-4 in a population census, under the assumption that fertility has remained constant during the past 10 to 15 years. This subroutine uses a population distribution by sex and 5-year age groups, 5-year survival rates for each sex, migrants by sex and 5-year age groups, and the sex ratio at birth. If there are no migrants, the variable representing them is zero. Other subroutines frequently used in connection with evaluation techniques: SMOTH - See Curve Fitting, Smoothing, and Graduation. UNSMH - See Curve Fitting, Smoothing, and Graduation. Fertility ADJFR - To calculate new age-specific fertility rates from a given set of age-specific fertility rates and a pattern of change. The pattern of change can be given in three ways: 1) a proportional change for each age-specific fertility rate; 2) an absolute change in the total fertility rate and the percent distribution of this change among the age groups; 3) an absolute change for each age-specific fertility rate. BRASF - To estimate 5-year age-specific fertility rates from survey or census information on the average number of children ever born per woman and a set or pattern of age-specific fertility rates. NRSFR - To calculate age-specific fertility rates, given a pattern of fertility rates, a life table, the net reproduction rate, and the proportion of female births to total births. Mortality BLT - To calculate a Coale-Demeny regional model life table for both sexes combined, given a life expectancy at birth for both sexes combined, a region (north, south, east, west) of the model life tables, and the sex ratio at birth. The subroutine accepts the Coale-Demeny differential by sex of the life expectancy at age 10 for calculating the life table for both sexes combined. BRASM - To estimate the level of infant and child mortality, based on tabulations of the average number of children ever born and the average number of children surviving, by age of mother. ELT - To calculate an abridged life table from age-specific mortality rates (j-M ) or A the probabilities of dying Lq ) between exact ages x and x+5. The life table Z) A 6 COMPUTER PROGRAMS FOR DEMOGRAPHIC ANALYSIS is by 5-year age groups except for ages under five, which are divided into age and the age group 1-4. GTCON - To obtain the constants or coefficients required for applying the techniques presented in subroutines ADJBG, BRASM, and MLT. GTCON is used only in conjunc- tion with these three subroutines. LI FIT - To compare two sets of survival rates in 5-year age groups from two different life tables, by calculating the differences between the two sets, by age MLT - To calculate a. regional model life table corresponding to a given life expect- ancy at birth, sex, and region using Coale-Demeny regression coefficients/ After generating the model life table for a particular sex, this subroutine can be used to obtain the model life table for the opposite sex by assuming Coale-Demeny sex differentials in life expectancy at age 10. MORDJ - To estimate a set of survival rates by 5-year age groups for a particular level of life expectancy at birth, using a given set of survival rates from a life table and the life expectancy at birth from the life table. The first survival rate in each set must be from birth to age 0-4. PKREG - To determine which regional pattern of survival rates in the Coale-Demeny region- al model life tables has the smallest difference from a given pattern of survival rates for a particular sex. QXADJ - To estimate a set of ,-q values (probability of dying between exact age x and x+5) for a particular level of life expectancy at birth, using a given set of 5 q values from a life table and the life expectancy at birth from the life table. For ages under 5, the values are for age and age group 1-4. SRX10 - To calculate survival rates for open-ended age groups for a period of 10 years -- x and over over surviving to x+10 and over -- from two population distributions enumerated or estimated 10 years apart. SURVI - To calculate survival rates by 5-year age groups from two populations enumerated or estimated 5, 10, or 15 years apart. TW0CN - To estimate the life expectancy at birth, crude birth rate, and crude death rate from two population distributions by 5-year age groups. The enumeration dates must be 5, 10, or 15 years apart. PURPOSES OF THE SUBROUTINES PBEER - To print out the results of the BEERS subroutine. This subroutine is used only in connection with BEERS. It is advisable to read the documentation for the BEERS subroutine for a better understanding of PBEER. PLT - To print out the functions of a life table. This subroutine is used in con- junction with ELT or MLT. It is advisable to read the documentation for these subroutines for a better understanding of PLT. PPROJ - To print out the results of a population projection. The subroutine prints the population by 5-year age groups, the rate of natural increase, rate of growth, crude birth rate, crude death rate, general fertility rate, total fertility rate, and the male and female life expectancies at birth. This subroutine is used in connection with PR0J5 and is best understood if the documentation for that subroutine is read first. PREVR - To print out the results of rejuvenating a population. The subroutine prints the population by 5-year age groups, the rate of natural increase, rate of growth, crude birth rate, crude death rate, general fertility rate, and the male and female life expectancies at birth. This subroutine is used in con- nection with REVR5 and is best understood if the documentation for that sub- routine is read first. PSPP - To print out the distribution of a stable population by 5-year age groups, the cumulative distribution, and other parameters of the stable population distri- bution. This subroutine is used in connection with SPP and is better understood if the documentation for that subroutine is read first. Projections PR0J5 - To project a population distribution by sex and 5-year age groups for a period of five years, using survival rates by 5-year age groups for each sex, 5-year age-specific fertility rates, and the number of migrants by sex and 5-year age groups during the 5-year period. Although the subroutine makes a projection for a period of five years only, a population projection can be made for a time period varying from 5 to 50 years by using the main program as given in this publication. Other subroutines frequently used in making population projections: ADJFR - See Fertility MORDJ - See Mortality 8 COMPUTER PROGRAMS FOR DEMOGRAPHIC ANALYSIS NRSFR - See Fertility QXADJ - See Mortality Stable Population ADJBG - To estimate the crude birth and death rates and the gross reproduction rate un- der quasi -stable population conditions. The estimates are obtained from the intrinsic birth rate, the gross reproduction rate, and information on the num- ber of years that mortality has been declining. INTRT - To determine the intrinsic growth rate, given the female life table function ,-L in the childbearing ages and age-specific fertility rates based only on female births. INTSP - To estimate a stable population distribution and the life table pertaining to such a population, given the intrinsic growth rate and another stable population parameter. ONECN - To calculate stable or quasi-stable estimates of the crude birth and death rates from the age distribution and the rate of natural increase of a population. The estimates are based on Coale-Demeny stable populations. SPP - To generate a stable population distribution and its parameters from the ,-L column of a life table and an intrinsic growth rate. Another subroutine frequently used in connection with stable population estimates: NRSFR - See Fertility. Chapter 3 INSTALLATION AND OPERATION This chapter provides several definitions and technical instructions which are essen- tial for the user to know. It defines subroutines and main programs and describes their relationship. It also discusses, in brief and general terms, several technical factors that must be considered before installing and using the subroutines. These factors include differences in the size of computer memory, procedures for entering the main programs and subroutines into a computer, and modifications required in the programs and subroutines before installing them in the computer. Subroutines and Main Programs Two fundamental aspects that should be understood are 1) the nature and function of a subroutine and a main program, and 2) the relationship between the two -- the link- ing process through which data are transmitted to the subroutines and the results sent back to the main program. A subroutine is a computer program designed to perform specific calculations. How- ever, a subroutine by itself cannot be submitted to and run on the computer; for this purpose a main program is needed. The main program "calls" the subroutine (or subrou- tines) to perform specific calculations. It may "call" a subroutine or several differ- ent subroutines as often as needed. The main program and subroutine are connected by the CALL and SUBROUTINE statements. The CALL statement in the main program contains the word "CALL," the name of the subrou- tine, the variables — data -- to be transferred to the subroutine, and the variables -- results -- that the main program will receive from the subroutine. Examples of CALL statements are given in the documentation of each main program. Each subroutine begins with a SUBROUTINE statement. This statement receives infor- mation from the CALL statement in the main program and also transmits the results of the 10 COMPUTER PROGRAMS FOR DEMOGRAPHIC ANALYSIS subroutine's calcaulation to the CALL statement of the main program. Examples of SUB- ROUTINE statements are given in the documentation of each subroutine. In summary, main programs are needed to command a subroutine to do a specific set of calculations with the information provided by the main program. Main programs to use each of the subroutines in this publication are provided in the documentation. A main program, the subroutine, and explanations of how to use them constitute the documentation of each subroutine. Computer SVIemory Size The main programs and subroutines given here were designed to operate on computers with a small memory (core) size. The amount of core needed depends on the size of the main program, the number of subroutines involved, and the type of FORTRAN compiler in the computer, Most of the main programs and subroutines require a memory size of less than 64K (64,000 bytes), according to experience in using the subroutines on com- puters with that core size. A few combinations of subroutines may require slightly more memory. When the computer memory is expressed in "words," the required memory size must be established by relating the number of bytes per word to the total number in words. Preparation of input to the Computer Chapter 4 contains computer listings of all main programs and subroutines included in this publication. Each line in a listing represents input coding or data that are contained in one punch card. The programs and subroutines can be entered into the com- puter by preparing punch cards from these listings. Copies of the programs and subrou- tines on punch cards or on magnetic tapes can be obtained from the U.S. Bureau of the Census, as indicated on the Acknowledgement page. The "comment" cards (those with 'C in column 1) are for clarification and instructions to the user. They are not part of the subroutine's calculations, and need not be punched for the programs to run. However, the comment cards are helpful in understanding and using the programs and it is advisable to include them in the input to the computer. Modifications Required The subroutines and main programs given here are written in American National Standard (ANS) FORTRAN. This version of FORTRAN is acceptable at any computer facility with a FORTRAN compiler. Nevertheless, in most cases changes will be required in those cards which indicate the units used for input and output. PURPOSES OF THE SUBROUTINES 11 Every computer facility assigns identifying numbers (called unit designators) to the various units at the facility -- the card reader, the printer, the tape units, the disc units, the operators' console, etc. The programs in this publication were written for a computer facility in which the card reader is designated "Unit 1," and the printer is designated "Unit 15." If these designations are different at the user's facility, either the computer control cards used must reflect the difference, or two cards in each main program and one card in each subroutine must be changed. If the modifications are made through the computer control cards, all changes will depend on the particular control cards used at a computer facility, and it is advisable to consult with the appropriate technicians at the facility. To modify the programs by changing the unit designator number, the user should request the numbers that the com- puter facility uses for the card reader and printer. The cards that must be changed in the main programs are the following: NREAD = 1 NPRNT = 15 Number 1 should be changed to the number used to designate the card reader at the par- ticular facility. Number 15 should be changed to designate the printer at the facility. These two cards are near the beginning of each main program. They usually are located immediately following the DIMENSION statement. It is necessary to change only the following card in the subroutines: NPRNT = 15 As for the main programs, the number 15 should be changed to the number used for desig- nating the printer. This card is located near the beginning of each subroutine, usually following the DIMENSION statement. Chapter 4 DOCUMENTATION This chapter contains detailed documentation for all of the subroutines and main pro- grams presented in the manual. The documentation of each subroutine consists of five sections. Sections I and II contain a description of the subroutines and the demographic methodology used in it. Section III presents instructions on how to use the main program and subroutine. This section has three subsections. The first, subsection III. A, is designed for users who wish to write their own main programs (see also the Appendix). Subsection III.B applies to users who will submit their main programs and subroutines on card decks. Subsection III.C describes how to punch the input data for the main program. This subsection is presented for those users submitting the subroutines and main programs on cards as well as those users who have already installed the subroutines and main programs on a computer. In the latter case, the main programs and subroutines can be used by submitting a card deck consisting only of the computer control cards, the cards for the input data required for the main program as given in this subsection, and the card indicating the end of the deck. Section IV describes the SUBROUTINE statement which receives the information from the main program and transmits the results of the calculations performed by the subroutine back to the main program. Definitions are also given for each variable transmitted from the main program to the subroutine and vice versa. Section V has computer listings of the main program and subroutine. It also has sam- ple input data that should be used to test the main programs and subroutines. In order to verify whether or not the programs and subroutines have been correctly punched in cards or properly installed on a computer, the user should use the sample input data presented here. The computer results obtained from using this input data should be the 13 14 COMPUTER PROGRAMS FOR DEMOGRAPHIC ANALYSIS same as the sample output presented in the documentation. If they are the same, no errors were made in the punching or installation process. The documentation of each main program and subroutine presented here were prepared so that a knowledge of FORTRAN is not required. However, in the documentation there are a few subsections (III. A and IV. A) directed toward users writing their own main programs; these subsections require some knowledge of FORTRAN. Users lacking FORTRAN experience can ignore these subsections and still understand how to use the subroutines and their main programs. ABREV I. DESCRIPTION OF PROGRAM A. PURPOSE To adjust the number of age groups in a distribution to be the same as the number of age groups in a second distribution. The distribution with the larger number of age groups is adjusted to contain the same number of age groups as that of the other distribution. The distributions can be either two populations, two sets of survival rates, or a population and a set of survival rates. B. DATA NEEDED Two distributions in 5-year age groups which are either: 1. Two population distributions in 5-year age groups, 2. Two sets of 5-year survival rates, or 3. One population distribution and one set of 5- year survival rates. In this case, it is assumed that the population is always the first distribution, II. MET HODOLOGY A. MATHEMATICAL DERIVATION The technigue to be used in reducing the number of groups in a distribution depends on whether the distribution is a population or a set of survival rates. 1. Reduction of the number of age groups in a population When a population distribution containing m age groups is to be reduced to n age groups (where the last age group is the open-ended age group in both cases) , the nth group, the open-ended age group for the reduced distribution, is calculated as follows: y-5 where +4 5 P. represents the population in age group j,j x is the beginning age of the open-ended age group in the reduced population distribution. y is the beginning age of the open-ended age group in the population distribution to be reduced, 2. Reduction of the number of groups in a set of survival rates. Bhen a set of survival rates containing m rates is to be reduced to n rates (where the last rate in both cases is the open-ended survival rate,) the nth survival rate, the open-ended survival rate for the reduced distri- bution, is calculated as follows: S = V? (1) V T 15 16 DOCUMENTATION where T is the function of a life table representing the number of years to be lived by the life table population after age x. Although the T x function is not known, the ratio of T x and T x+ - can be obtained from the survival rates. The following formulas explain how to reduce a set of survival rates from age y+ to age x+. T^ = C L + -L ., + • • • + C L + T ... (2) x+ 5 x 5 x+5 5 y y+5 where T = T y+5+ y+5 and _L = T - T . _ 5 y y y+5 similarly 5 y " 5 5 S y-5 Therefore replacing 5 L from (6) into (7) 5y " 5 5 S y-5' S y+ * Following the same procedure 5V10- 5 S y _ 10 ' 5 S y _ 5 -S y+ (1 -V } (3) U) and T = -f t5 - (5) y s y+ then replacing (5) into (4) ^^•'-V (6) It*— (7) Tx! V--(1-S.J (8) !y+5 ; /- _ C > (9) ABREV 17 Therefore T y-10 ~ 5 L y-iO + 5 L y-5 + T y (10) replacing (5), (8), and (9) into (10) T = y-10 T y+5 V 1 - S . 1 - S , y+ , y i 1 5 S y _10'5 S y-5 5 S y-5 similarly T = y-15 T Y+5 V 1 - S , 1 - S . y+ , y+ , 1 - s ^ y+ 5 S y-i5* 5 S y-l0* 5 S y-5 5 S y-iO*5 S y-5 5 S y-5 (11) + 1 (12) Therefore for calculating the survival rate for the open age group x+ from (1) T , C /S , will cancel out and the guotient is a function of y+5 y+ the survival rates as v = Z-f y-5 «, j=x+5,5 IT 5 1 i=.1.5 y " 5 1 - s 1 i V* v+ 1 2- y-5 s j=x,5 W 5 i i=j»5 (13) B. COHBENTS This subroutine makes the number of groups in two distributions be the same. In the case where the first distribution is a population and the second distribution is a set of survival rates a particular aspect has to be taken into account. Since both distributions Hill have the same number of groups, and where the first survival rate would be for births during a 5-year period surviving to ages 0-a, then, the beginning age of the open-ended group in the population would be 5 years older than the beginning age of the open-ended group of the survival rates. III. MAIN PBOGRAN A. BEQOIREUENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. 18 DOCUMENTATION The form of the CALL statement for this subroutine is as follows: CALL ABPEV (K0DE,D1, D2,NG) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variable nam-^s D1 and D2 in the argument string are arrays. The following dimension statement must be included in any main program using this subroutine* DIMENSION 01(17), D2<17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package None 2. Library functions None 3. Card diagram of main program and subroutines / / CARDS INDICATING END /_ OF DECK /I / 1 _/ i / / INPUT / DATA / / /I 1 1 1 1 i / / COMPUTER CONTROL / CARDS /I / 1 _ J 1 1 / 1 / 1/ / / SUBROUTINE &BREV /I 1 / 1 1 J 1 1/ / / t / / MAIN PROGRAM / /I 1 / /I 1 / 1 1/ 1 / 1 / 1/ / / COMPUTER CONTROL CARDS / _ . /I / 1 / 1 ABREV 19 C. FORMAT REQUIREMENTS FOR INPUT DATA CARD FOE THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of th& input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition I I I 1 I I 2 | 1 2-53 54-80 1 I J 3-80 I 3 ( ! 9-16 6 72-80 I i I H I 1-8 I I 9-16 « I «*9-56 57-80 NXT KODE D1 D1 Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. Any other number punched in column 1 indicates another set of data follows this one. The selector used to in groups given in D1 and in column 2 indicates t are both population dis punched in column 2 ind tributions contain sets three punched in column distribution is a popul the second distribution rates. Whenever one di distribution and the ot survival rates, the pop always be punched in ca of survival rates punch Blank dicate the types of D2. A one punched he two distributions tributions. A two icates the two dis- of survival rates. A 2 indicates the first ation distribution and is a set of survival stribution is a population her distribution a set of ulation distribution must rds 3 and 4 and the set ed in cards 5 and 6. First 5-year group of the first distribution. The decimal point should be somewhere in the eight columns. Second 5-year group of the first distribution. The decimal point should be somewhere in the eight columns. Tenth 5-year group of the first distribution. The decimal point should be somewhere in the eight columns. Eleventh 5- year group of the first distribution, The decimal point should be somewhere in the eight columns. Twelfth 5-year group of the first distribution. The decimal point should be somewhere in the eight columns. Seventeenth group of the first distribution. This is the open-ended group. The decimal point should be somewhere in the eight columns. Blank The variable D1 always requires two cards. The first card (card no. 3) must always contain data whereas the second 20 DOCUMENTATION card (card no. 4) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 72-80 1-8 9-16 49-56 57-80 D2 D2 First 5-year group of the second distribution The decimal point should be somewhere in the eight columns. Second 5-year group of the second distribution. The decimal point should be somewhere in the eight columns. Tenth 5-year group of the second distribution. The decimal point should be somewhere in the eight columns. Eleventh 5-year group of the second distribution. The decimal point should be somewhere in the eight columns. Twelfth 5-year group of the second distribution. The decimal point should be somewhere in the eight columns. Seventeenth group of the second distribution. This is the open-ended group. The decimal point should be somewhere in the eight columns. Blank The variable 02 always reguires two cards. The first card (card no. 5) must always contain data whereas the second card (card no. 6) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. IV. SUBROUTINE A. SUBROUTINE STATEMENT &11 external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE ABREV (KODE, D 1, D2,NG) B. DESCRIPTION OF ARGUHENTS Name KODE How Obtained Definition Transferred In J I Indicates the type of distribution | given in D1 and D2. If both distribu- tions are populations, then K0DE=1. If Iboth distributions are sets of survival I rates, then K0DE=2. If the first distri- bution is a population and the second (distribution a set of survival rates, (then Kode=3. When giving two different (types of distributions, the population (distribution must be in D1 and the set jof survival rates in D2, If KODE has I any other value, the subroutine will | write out error message number 0101 land return to the calling program. I ABREV 21 D1 D2 NG Transferred In Transferred In Transferred Out The first distribution of either a 5-year population distribution or a set of 5-year survival rates. In the case of a population distribu- tion, D1 contains the population in age qroups 0-4, 5-9, 10-4, etc., with the last group being the open-ended age group. A maximum of 17 age groups can be given. In the case of a set of survival rates, D1 contains the survival rates of birth to 0-4, 0-4 to 5-9, 5-9 to 10-14, etc., with the last group being the open-ended survival rate. If the population distribution contains an intermediate value less than one or the set of survival rates contain an intermediate value less than zero or greater than one, error message number 0102 will be written out and the subroutine will return to the calling program. The second distribution of either a 5-year population distribution or a set of five- year survival rates. See the descrip- tion of argument D1 for more details. The number of groups in the two distribu- tions after they have been made the same length. C. ERROR MESSAGES 0101 *** ABREV ERROR NO. 0101 — INPUT ERROR IN KODE *** INPUT DATA DESCRIBING THE TYPES OF ARRAYS AND ADJUSTMENT MADE MUST BE 1, 2, or 3. 0102 *** ABREV ERROR NO. 0102 — INPUT ERROR EITHER D1 OR D2 *** EITHER ONE OR BOTH OF THE INPUT DISTRIBUTIONS ARE ALL ZERO OR HAVE AN ERROR IN AN INTERMEDIATE VALUE. *** IF K0DE=3, D1 MUST CONTAIN THE POPULATION AND D2 THE SURVIVAL RATIOS. V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c C MAIN PROGRAM FOR ABREV c . c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN FOUR READ G STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS 10 READ IN THE C INDICATOR (N XT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET C FOLLOWING THIS ONE AND THE SELECTOR (KODE) TO DETERMINE THE TYPE C OF REDUCTION TO BE MADE. C NXT IS IN COLUMN 1 OF THIS CARD. A ZERO IN COLUMN 1 INDICATES c THIS IS THE LAST DATA SET> ANY OTHER NUMBER IN COLUMN 1 c INDICATES THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. 22 DOCUMENTATION C- KODE IS IN COLUMN 2 OF THIS CARD. & ONE IN" COLUMN 2 INDICATES C-, T HAT IH£ T WO DISTRIBUTIONS ARE BOTH POPULATION c - DISTRIBUTIONS. A TWO IN COLUMN 2 INDICATES THAT THE TWO c DISTRIBUTIONS BOTH CONTAIN SURVIVAL RATES. A THREE IN C COLUMN 2 INDICATES THAT THE FIRST DISTRIBUTION IS A c _ POPULATION DISTRIBUTION AND THE SECOND DISTRIBUTION HAS C-. SURVIVAL RATES. C C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE FIRST C DISTRIBUTION (D1) OF THE SET WHICH ARE TO BE COMPARED FOR POSSIBLE C REDUCTION IN THE NUMBER OF GROUPS CONTAINED IN ONE OF THE SETS. C— — D 1 VALUES ARE ON TWO CARDS. FOR EACH D1 VALUE EIGHT COLUMNS c ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS OF THE c FIRST CARD. EACH VALUE MUST CONTAIN A DECIMAL POINT AND BE C— WITHIN THE FIRST EIGHT DIGITS ALLOWED. THUS, ONLY TEN c VALUES CAN APPEAR ON THE FIRST CARD. THE SECOND CARD HAS c SEVEN VALUES WITH THE SEVENTEENTH VALUE BEING IN COLUMNS c 49-56. IF LESS THAN SEVENTEEN VALUES ARE TO BE GIVEN, TWO C- CARDS MUST STILL BE USED WITH DATA ONLY IN THE NUMBER OF C _-_ — COLUMNS NECESSARY FOR THE NUMBER OF D1 VALUES TO BE GIVEN. C C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE SECOND C DISTRIBUTION (D2) OF THE SET WHICH ARE TO BE COMPARED FOR POSSIBLE C REDUCTION IN THE NUMBER OF GROUPS CONTAINED IN ONE OF THE SETS. C D2 VALUES ARE ON TWO CARDS AND HAVE THE SAME REQUIREMENTS AS c __ THE D 1 VALUES. £ — — -. — — — ——— — — — — —..— — _ — .— —,.— — — .— — —. — — — — — — — — — — — — — — — — — — — — - — ——————— — — — — — — — _-.,— ..— — — — c _ _ _ DIMENSION D1 (17) ,D2(17) NPRNT = 15 NREAD * 1 10 READ (NREAD, 11) 11 FORMAT (1X,52H ) READ (NREAD, 22) NXT, KODE 22 FORMAT(2I1) READ (NREAD, 33) (D 1 (I) ,1 = 1 , 17) 33 FORMAT (10F8.0) R£AD(NREAD,33) (D2 (I) ,1=1 , 17) WRITE (NPRNT, 4U) U4 FORMAT (1H1) WRITE (NPRNT, 11) CALL ABREV(KODE,D1 ,D2,NG) WRITE(NPRNT,55) 55 FORMAT (6X,2HD1,15X,2HD2) DO 20 1=1,17 20 WRITE(NPRNT,66) D1 (I) , D2 (I) 66 FORMAT(/, 1X,F13.5, 3X,F13.5) WRITE (NPRNT, 77) NG 77 FORMAT (/,1X,19HNUMBER OF GROUPS = ,12) IF (NXT) 10,30,10 30 CONTINUE STOP END 3. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE ABREV (KODE, D1 , D2,NG) C -_ — c : C — PROGRAM NO. 0100 c _-___ C-- KODE, D1, AND D2 ARE INPUT ARGUMENTS c _„_ — NG IS AN OUTPUT ARGUMENT C KODE INDICATES THE TYPE OF INPUT VALUES IN D1 AND D2, AND THE c _„ RELATION THAT SHOULD EXIST BETWEEN THE NUMBER OF VALUES IN c _ D1 AN D T HE NUMBER OF VALUES IN D2. c D 1 is THE FIRST DISTRIBUTION WHOSE LENGTH IS TO BE COMPARED. C D2 IS THE SECOND DISTRIBUTION WHOSE LENGTH IS TO BE COMPARED. C NG IS THE NUMBER OF VALUES IN D1 AND D2 AFTER THE TWO c DISTRIBUTIONS HAVE BEEN ADJUSTED. c c _ DIMENSION D1(17), D2(17), SX(17) M = ABREV 23 N = NT = MT = NPRNT= 15 C VERIFY INPUT ARGUMENT VALUES c „__ C 100 NERR= IF (KODE-1) 1010,10,50 10 CONTINUE DO 15 1=1,17 IF (D2(I)-.999) 30,30,14 14 N = N + 1 15 CONTINUE 20 CONTINUE DO 25 1=1,17 IF (Dl(I)-.999) 40,40,24 24 M = M + 1 25 CONTINUE GO TO 174 30 CONTINUE IF (NT) 35,35,15 35 NT = I GO TO 15 40 CONTINUE IF (MT) 45,45,25 45 MT = I GO TO 25 50 CONTINUE DO 56 I = 1,17 IF (D2(I)-. 000001) 85,85,54 54 CONTINUE IF (D2(I)-1.) 55,55,85 55 N = N + 1 56 CONTINUE IF (KODE-2) 1010,65,60 60 CONTINUE IF (KODE-4) 20,20,1010 65 DO 71 I = 1,17 IF (D1 (I)-. 000001) 75,75,69 69 CONTINUE IF (D1(I)-1.) 70,70,75 70 M = B ♦ 1 71 CONTINUE GO TO 174 75 CONTINUE IF (HT) 80,80,71 80 MT = I GO TO 71 85 CONTINUE IF (NT) 90,90,56 90 NT = I GO TO 56 1010 NERR= 1 IRITE (NPHNT,111) 111 FORMAT (/,1X,47H*** ABREV ERROR NO. 0101 — INPUT ERROR IN KODE, */,89H *** INPUT DATA DESCRIBING THE TYPES OF ARRAYS AND ADJUSTMENT * HADE MUST BE 1, 2, 3, OR 4.) GO TO 190 170 NERR= 1 WRITE (NPRNT,222) 222 FORMAT (/,59H *** ABREV ERROR NO. 0102 — INPUT ERROR IN EITHER D1 * OR D2,/,106H *** EITHER ONE OR BOTH OF THE INPUT DISTRIBUTIONS AR *E ALL ZERO OR HAVE AN ERBOR IN AN INTERMEDIATE VALUE.) GO TO 180 174 CONTINUE IF (N) 170,170,175 175 CONTINUE IF (NT) 170,177,176 176 CONTINUE IF (N-NT+1) 170,177,170 177 CONTINUE IF (M) 170,170,178 178 CONTINUE IF (MT) 170,180,179 24 DOCUMENTATION 179 CONTINUE IP (M-MT+1) 170,180,170 180 CONTINUE IF (NERR) 190,200,190 190 WRITE (NPRNT,333)KODE,D1,D2 333 FORMAT ( */,27H ABREV INPUT ARGUMENTS , * /11H KODE= ,16, * / 9H D1= ,8F13.5 /9X,8F13.5,/,9X,F13. 5 * / 9H D2= ,8F13.5 /9X,8F13. 5,/,9X,F13. 5) NG= GO TO 1000 C c C CALCULATE NUMBER OF AGE GROUPS WITH DATA c C 200 N1= M N2= N NG= N2 C c C DETERMINE IF D1 OR D2 IS TO BE SHORTENED. c C IF (N1-N2) 240,1000,230 C c C BRANCH ACCORDING TO INPUT TYPE CODE, KODE c C 230 NG = N2 K = N1 L = N2 LP1 = L + 1 IF (KODE-2) 235,390,235 C c C SHORTEN POPULATION DISTRIBUTION IN D1 r^ ............................ .... ...... ............ c 235 CONTINUE DO 336 I = LP1,K D1 (L) = D1(L) ♦ D1(I) 336 D1 (I) =0.0 GO TO 1000 240 NG = N1 260 K = N2 L = Nl IF (KODE-1) 265,370,265 C c C SURVIVAL RATES IN D2 TO BE SHORTENED. c . C 265 CONTINUE DO 270 I = 1,17 270 SX(I) = D2(I) 275 A= 1.0 B= 1.0 SB= 0.0 SA = 0.0 KB1 = K -1 LP1= L*1 X= 1.0 -SX{K) C c C CALCULATE NEW TERMINAL SURVIVAL RATE c C DO 320 J=L,KH1 DO 280 I = L,KH1 k = A * SX (I) 280 B = B * SX(I) IF (J-L) 310*310,300 300 SA = SA + (X/A) 310 SB ~ SB * JX/BJ ABREV 25 A = 1.0 320 B = 1.0 SX(L) = (1. ♦ SA) / (1. + SB) C c C zeko REMAINING SOBVIVAL BATES c C DO 330 I=LP1,17 330 SX(I) = 0.0 IF (M-N) 350,1000,340 C c c PUT SHORTENED SURVIVAL RATES IN D1 c C 340 CONTINUE DO 345 I = 1,17 345 D1 (I) = SX(I) GO TO 1000 C c c p 0T SHORTENED SURVIVAL RATES IN D2 c C 350 CONTINUE DO 355 I = 1,17 355 D2(I) = SX(I) GO TO 1000 C c C SHORTEN POPULATION IN D2 c C 370 LP1 = L+1 DO 371 I = LP1,K D2(L) = D2(L) ♦ D2{I) 371 D2{I) = 0.0 NG = N1 GO TO 1000 C c C SURVIVAL RATES IN D1 TO BE SHORTENED c C 390 CONTINUE DO 395 I = 1,17 395 SX(I) = D1 (I) GO TO 275 1000 RETURN END 26 DOCUMENTATION s 0- ln 0> «x> % »>» 0> vn mi o» v9 o» VS »»- s O v& vS o> s 5 Do CM 0o o» 2 — Oo Oo CM s £ a *■ O *■ t; CJ~ D Q 3~ t u> o- 0- o^ o- S M> 0> ov o> s s — — — ~- " Cf- -. — •» c 2 S • s 2 13 " 2 o m O krt £ O C5 m ~ ;; rv o- •^ 0- C 0O rv (v. o- J^ s m C\l u> CJ e ^ m m CM e s o- r- CJ- f^- CM T> s r>- CVJ CM m s s CM CM CM c4 2 Cf CM o) CM <4> >0 S • •J) s s s to |v ~. r>- *^» 3 f- tv. — 3 s oo v9 0» sS S »<\ 09 03 M) S 3 o- OO o~ 0O s fj~ o» Ov Oo s 3 Oo v9 0» vS 3 — 00 00 Vft 3 5 vS |v vS l^. S OO vS MJ- rv S £ OJ CM CM CM S o- CM CM CM S S • s K E E X CM O CM o S CM CM o S 2 3- 3- 3- *- "S tv t-^ 3- 3- 3- K S o v» o vS S K CJ» O O M) S 2 OJ <*> CM IO 3- >n CM CM «% s S s — CM — CM S Oo CM — — CM H s cc «v m "^ <»\ z o» 3- TV v9 O *S O ■A o «n ■— iv. o- (v. «n CM 5 s Ul v» rO OO in vi) rp» Oo 3 3 OO t^ O rn vS 00 in 3 3 -1 m vj> •n Tl «% 3 3 o 3 * • 3 3 o UJ o. 3 3 3 r- Cf~ CM CM \S -J o- CM CM 3 Cf» CM O- O CM vS 3 S sj> in UJ s o ~ vt> v9 M> t»v m ~- S S *» o — rr» o S o — m ex s l~- CM o — . O CM m O S s — OO O »r> — Oo O o s Oo r>» — Oo -~ (V. cs m 5 s z in rn (^ * z »r> rr» f>- ii_ u> OO OO m «^ m |v rv 3- % s o 3- i- cc 3- 2- Ul 2 O" t^- 3- Q. 3- 3- 2 s t-1 2: CD • » O s a r- l~ 2 o_ — ar o OO h- Oo O 0o t» CO 2 O OO CS co rv vS S -J vS> CM o- T- C: V0 CM fj~ UJ S t^ f- VS CM Uj v9 CM 0r~ rv s s 2S oo CU 0o Oo at Oo c\J OO (- S *- CM 0» CM -J 0» CVJ 03 Oo ° a Cl- r»- m lo o- t- f^ w» lr> «c a CM — rv m s 1 rr> — m — CO CVJ s a cc Oo — O e»- UJ 00 — O (-1 a^ f» — Oo — Ul 0» — o o— a a £ ©- CM O O -J o- CM vS > a In o- cr» CM > o— e^l M> vS a s UJ Oo O CM T-> or 0O o CM cc "s 1 CM v» OO O H oo O CM m a a u_ CM o~ — O- S CM O- — ■=> a o» o CM o~ 1- CM ST- — o- a 2 |v- r~ LU t^- r- co 2 CJ- o- r- «r rv fv 2 2 D U_ 2 • • CO 2 £ z LU 2 UJ 2 2 0o CM r^ CC 2 Oo 3- oo CM oo CM rv. Cr- 2 2 UJ in OO 3- — Q. in QO a- r- 3 v£ IV. in OO cs m 0> 3- — 2 2 -J O O o ir> O O o co 2 o- vS O o rv. cs O O m 2 2 CM O u% CM fTJ r-1 2 vS m. in CVJ o- in CM f»» CM 2 2 z oo — Oo — •^ 0o — • OO s 2 o- o- oo — — oo — - oo — 2 S s] • > 2 a. C= CC or • C£. in a M Oo l*> tf> •^ \-i o» rcj ir> CM n » oo in M OO KV in r*S » r- z r- rv —■ 0=> z !-- r- — o z ^ m vS r-. |v z |v. fv — OO * a: *> Ul 0O 3- •o cr- Ui 0O 3- CO OO UJ w — >n OO 3- UJ OO 3- on o- ■* t— o » > o- m, vS 3- > o- rci sS O > z] c»- vS o- ro > o~ m VS 3- ,■> Z> O ur> r- *- zs ■» OO m o in => O in rv Ln « ^ o O — Ct~ — o O -— o- lf> o Hj oo o- o — o JT> o — el- — „ ~ vo — — tr> — — CO ~ rc> • • — v/> O -~ 1 ~ Ul £ or co o - -~ — - — - c a o 4- 1 « o ■« c « o 3" O u 4- f" -o •3 c -8 a w n o a- •a a -c +- vS J 8 "0 c CM "8 ~5 k a Ci 3" cj ~5 cj "2 V O TS u 3 CD CM <. e O C «■» to 3- ~5 o o f. 3- 's a to >n 1? «s O VS J -V r- tu OO J 1- <1) in •« c CM t— UJ v> Z m ABREV 27 a < en 33 H 9 M ►J O r- Cn *~ a O M H o o o © O o O o © o © o o EH W CN) O hJ Q IT) sr 00 t^ CN CO o T— in m co © CN CO ye> co © a. < *— r» © CO O o ^o © w ■O © CN in © rn P0 >« r- a- cr m rn cn in CN f«" o fn r^ co r* t^ 1^ CO CM r» ro en m CM en lO a- in H en 00 r» m =1- n co IN fN T— i— T— II H w a ^ CO So 10 en «sl CU a +j =1 < VI &5 o to T— ^ o © © o as o © o o o o o O O © o o o © © © o a o o o o © © © © o o © © o © © © • o © o © © © o © © © © o © o © o © Cm a « o M T— 00 in rr) © en VD CM 1*. © en CO ^ T~ 00 CN 00 o SB Q r- CO 00 ^o vO d- =r 00 r^ VO r- r\i T— CN ^D vO 03 W oo m en CO © ID © CT> in 00 :» CO CN CN T- o W > en o 00 p* r- r- (N 00 Cn o CO o O CO 00 on CO. S3 © in CN 00 m vO T— ys CN on in CN cn 10 CO n a o o 00 r* in ;* m co CN CN r- T~ r- o in r- s= 28 DOCUMENTATION w to H « W H M OOOOOOOOOOO O OOOOOOOOOOO ac ooooooooooooooooo tO(N. ••••••• . . . OlD*00P~CN03O'-lfllf)tNOOOOOO W T-r~Oa , 3'VO©>0\O «>I\£>OCNif)Ornrovot^''=l - r» W fa ■a o o S cm o ^o(Nr--oa>oaor-.»-r-cNoocriO-=r oa DOiD(NoOinvO' _ vO(NO>0, 5C Ooaot«.vr)c*(nro(v)(N«-ir) e Mr- S5 ABREV 29 no o cn m cn vo o o o o © o o •a => > eh H Q CO &j Eh z OS o OS r~ «- r» cn =»- t» * oo en r- o" o oo r» ^ > 05 W t«S «c H to a ««I 14 < as « O o 03 M N CN hSJ 03 «S O M t- D3 Q «* US to w a as o EH H H E-» W C3 CQ z h H OS H OS CO ° y 03 Q 03 M EH Eh a, S Z Oj H z H M 33 I EH I CN O O i- n O H O • CQ O Z OS o OS O H os z as o M as > « W 33 as eh CO H * # * # O r- |^ ON 00 VO 00 o ON ON • • o o o o o o o o o • • cn r- vo r- O CN «- O in on a- r- CM >0 O © 0> no O O cri on © o o o r»- vo in no CN vO ctv in cn on • • © o CO vO o o to H z 30 no S t- o cn as co •4 oo oo . EH O CO a, z O r- vo o* CO CO r» o CO CM m r- o o o o o o • • no no oo r» ON * OO no cn in r- t- o o o o o o « • in cn CO vO in oo o o m cn oo r- © cn P o o o o o o o © o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o > II M M OS Q II CO o «- co r~ r- ai r* m o r*. n cn cn o o o o o o o o o o o o o o CN O O vO * < T > at- «•- O CN VO » © o\ in * * VO cn CT> 00 cn CT. r- i™ :» > o H a CO a VO oo CO CO VO 00 CN CN cn T— VO oo © O H 03 3 vo o CN m o CO CO VO t-» =r sr in 00 CT. in CN EH • U C3 o o © r» CO T— r~ i^ 00 CN P» CO o> in CN CT. VO * in H < o to 03 o o © © CT. 00 r~ in sr CO CO CN CN T™ i— V" W ts a M «S o o o © © © to M Q o • • • • • z 03 H CO © © in in o J3 o •4 3 r- r~ «■ CT> +> © 03 H Oi CO m co CN d- r-~ 03 CT vo r» © O © CT. W Q H o CN r-» co © © o o o © © © © © © © O © T - o CN CT. CN O © o © o © o © © © © O © © o > H > II r— © o o © © © © © o © o © O © © o © 03 w a W M H 03 Cm 03 Q II II r- OO in co © cr> \0 CN t~ © CT> CO t— r- 00 o © o SB m Z CQ O CN Q r~ 00 00 VO 10 * sj- 00 r- VO r- CN r" CN cn H «* H «a! « Q Q 03 in cn oo o, V0 O cn m 00 * OO CN CN CN > a\ o CO i~ T— ' r» CN 00 Oi © CO © O CO r~ D # # © m CN 00 m V£> f" VO CN cn in CN cn vO r~ o * # o 00 r- in * CO CO CN CN «— T— T— CO * * T— 1 to 0j 3 o 03 IS Fn O 03 H CO a 3 Z ADJBG I. DESCRIPTION OF PROGRAM A. PURPOSE To estimate the crude birth and death rates and the gross reproduction rate under quasi-stable population conditions. The estimates are obtained from the intrinsic birth rate, the gross reproduction rate and information on the number of years that mortality has been declining. B. DATA NEEDED 1. The rate of natural increase of the population during the last inter- censal period. 2. The rate of natural increase before the mortality decline began. 3. The number of years mortality has been declining. U. The number of years between the last two censuses. 5. The eight crude birth rates corresponding to the eight stable populations generated by the intercensal rate of natural increase and the proportions of the population under ages 5, 10, 15, 20,... ,40. 6. The eight gross reproduction rates corresponding to the eight stable populations generated in the same way as the crude birth rates. II. METHODOLOGY A. MATHEMATICAL DERIVATION Stable populations are projected for a period of 40 years with steadily increasing life expectancies equivalent to the effect on the age composition of a 1-percent per year increase in fertility. For each projection period, stable population estimates of the crude birth rate and gross reproduction rate are calculated based on the age distribution at the end of the projec- tion period and the rate of natural increase during the projection period. The estimated crude birth rates and gross reproduction rates are compared with the actual rates in order to estimate adjustment factors for modifying stable population estimates of the crude birth rate and gross reproduction rate for the effect of declining mortality. The adjustment depends on the period of mortality decline, the population growth rate at the onset of tha mortality decline and the population growth rate during the last 5 or 10 years before the date for which the estimates are made. The adjusted rate is determined as R' = R (1 + 1780 • F • -§£-) where R' is the adjusted rate (CBR or GRR) ; R is the stable rate given as input; F is the appropriate adjustment factor from the table following; Dr is the absolute difference between the current growth rate and the growth rate at the onset of the mortality decline; and Dt is the number of years mortality has been declining. 31 32 DOCUMENTATION The ad-justed crude birth rate corresponds to the end of the intercensal period. The rate of natural increase corresponds to the intercensal period. Therefore, in order to estimate the quasi-stable death rate, the rate of natural increase must be adjusted to refer to the end of the intercensal period. The formula for the adjustment is . t Dr e t 2 Dt where r is the rate of natural increase at the end of the intercensal period; r is the rate of natural increase for the intercensal period given as input; t is the number of years in the intercensal period; and Dr and Dt are as defined previously. Once r is known, the quasi-stable crude death rate at the end of the e * i intercensal period can be calculated as the difference between the rate of natural increase and the crude birth rate at the end of the intercensal period. TABLES OF F FACTORS TO BE USED TO ADJUST STABLE POPULATION ESTIMATES OF THE CRUDE BIRTH RATE AMD GROSS REPRODUCTION RATE ASSUMING MORTALITY HAS BEEN DECLINING t YEARS Part (a). For use to correct stable estimates when the current rate of growth is for a 10-year intercensal period. t 5 10 15 20 25 30 35 40 5 -.016 -.030 -.015 .012 .032 .040 .043 .044 .043 Gross -.032 -.017 .010 .029 .037 .040 .041 .040 Birth rate -.027 -.025 -.019 -.023 .011 .001 .043 .034 .064 .066 .073 .085 .076 .094 .076 .096 reproduction -.035 -.014 -.027 -.011 .013 .012 .045 .045 .065 .078 .074 .096 .077 .105 .076 .108 s -.028 -.025 -.004 .021 .053 .081 .099 .106 rate -.005 -.002 .019 .045 .078 .106 .124 .131 -.033 -.027 -.006 .018 .043 .072 .096 .112 -.006 .005 .026 .051 .077 . 107 .131 .147 -.039 -.029 -.004 .022 .047 .069 .094 .116 -.005 .006 .032 .059 .085 .108 .133 .156 -.043 10 15 20 25 006 -.032 -.004 .026 .051 30 006 .073 35 40 006 .092 . 1 14 5 -.017 -.010 10 -.009 .001 15 ......... .000 .031 20 001 .062 25 005 .088 30...... .005 .111 35 006 .130 40 005 . 153 ADJBG 33 Part (b) - For use to correct stable estimates when the current rate of growth is for a 5-year intercensal period. _ _ __ -- __ __ __ __ -_ .005 -.002 -.oou .039 .024 .019 .070 .055 .045 .089 .085 .075 .096 .102 .102 .098 .109 .118 .094 .108 .123 Birth rates 5 -.003 -.007 -.010 -.012 -.013 10 010 .017 15 021 .045 20 025 .062 25 025 .068 30 025 .069 35 023 .066 40 022 .063 Gross reproduction rate 5 -.005 -.009 -.004 .005 .017 10 007 .015 .012 .016 .027 15 018 .042 .045 .042 .050 20 022 .058 .076 .073 .076 25 023 .065 .094 .103 .108 30 022 .065 .102 .120 .135 35 021 .063 .103 .127 .150 40 019 .059 .100 .126 .156 014 -.016 -.018 000 -.001 .000 021 .028 .031 045 .054 .059 068 .075 .082 095 .096 .101 117 .118 .119 129 .137 .138 021 .019 .015 034 .038 .0 34 057 .065 .066 081 .092 .096 106 .114 .120 133 .136 . 140 155 .158 .158 167 .178 . 177 Sources: Ansley J. Coale, "Estimates of Various Demographic Measures Through the Quasi- Stable Age Distribution," in Emerging Techniques in Population Research, Milbank Memorial Fund, 1963, pp. 175-193. Paul Demeny, "Estimating Vital Rates for Populations in the Process of Destabilization," Demography (Chicago), Vol. 2, 1965, pp. 516-530. United Nations, Manual IV: Methods of Estimating Basic Demographic Measures from Incomplete Data. ST/SOA/Series A42. B. COMMENTS This subroutine adjusts the birth rate and gross reproduction rate from a stable population. The adjustment is made because both rates are estimates of the actual rates of an actual population. This actual population — from which the stable population parameters were estimated — is not a stable population but rather a quasi-stable population which has registered a mor- tality decline during a period of time. It is assumed that the intrinsic growth rate of the stable population is the actual growth rate of the actual population during a specific period of 5 or 10 years. Since this subroutine is restricted to the mortality patterns of Coale- Demeiy Regional Model Life Tables, both the fertility and mortality rates are based on the patterns as given by Coale-Demeny in Regional Model Life Tables and Stable Populations. Although the stable population distribution and its parameters can be generated for either sex, when a male stable population distribution is estimated, the female fertility rates are applied to the male distribution for purposes of determining the crude birth rate and gross re- production rates. III.M A I N PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 34 DOCUMENTATION 1 . C&LL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the C&LL statement. The form of the CALL statement for this subroutine is as follows: CALL ADJBG(RNG,INT,NT,RNG1,CBR,GRR,CBRA,GRRA,CDRA) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine variable names CBR,GRR,CBRA,GRRA and CDRA in the argument string are arrays. The following DIMENSION statement must be included in any main program using this subroutine. DIMENSION CBR(8) ,GRR(8) ,CBRA (8) ,GRRA(8) , CDRA (8) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1 . Subroutines from this package GTCON 2. Library functions MOD (modulus) 3. Card diagram of main program and subroutines / / CARDS INDICATING END OF DECK /| / / INPUT DATA /| | / / COMPUTER CONTROL CARDS /| | | /III / SUBROUTINE GTCON /III/ _ _ __/ I I 1/ / / SUBROUTINE ADJBG /III/ /III/ / MAIN PROGRAM /III/ /III/ / COMPUTER CONTROL CARDS /III/ I I / ADJBG 35 C. F0HH4T REQOIREHENTS FOB CARD INPUT DATA FOR THE HAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this subroutine package are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See examnle, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1-6 7 8-9 10 11-12 13 14-19 20 21 22-80 1-6 8-13 14 RNG INT NT RNG1 NXT CBR Blank Label used to identify the output. Blank The rate of natural increase of the population during the last intercensal period. The decimal should be entered in column 2. Blank The number of years between the last two censuses. The value should end in column 9. Blank The nuTiber of years mortality has been declining. The value should end in column 12. Blank The rate of natural increase of the population before the mortality decline began. The decimal point should be entered in column 15. Blank The code indicating if there is another data set following this one. A zero punched in column 21 would indicate that this is the last set of data. Any other digit punched in column 21 would indicate that another set of data follows this one. Blank The crude birth rate corresponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 5. The deci- mal point should be entered in column 1. Blank The crude birth rate corresponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 10. The deci- mal point should be entered in column 8. Blank 36 DOCUMENTATION 15-20 50-55 56-80 1-5 6 7-11 12 13-17 4 3-47 48-80 GRR The crude birth rate corresponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 15- The deci- mal point should be entered in column 15. The crude birth rate corresponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 40. The deci- mal point should be entered in column 50. Blank The gross reproduction rate corres- ponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 5- The decimal point should be entered in column 2. Blank The gross reproduction rate corres- ponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 10. The decimal point should be entered in column 8. Blank The gross reproduction rate corres- ponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 15. The decimal point should be entered in column 14. The gross reproduction rate corres- ponding to the stable population generated by the intercensal rate of natural increase and the proportion of the population under age 40. The decimal point should be entered in column 44. Blank ADJBG 37 IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine, and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE ADJBG (RNG,INT, NT, RNG 1 , CBR, GRR, CBRA,GRR A, CDRA) B. DESCRIPTION OF ARGUMENTS Name RNG How Obtained Definition INT NT RNG1 CBR GRR CBRA GRRA CDRA Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In Transferred Out Transferred Out Transferred Out The rate of natural increase of the popu- lation during the last intercensal period. The value of RNG must be between -0.01 and 0.05. If RNG takes on any other value, error message number 0131 will be written out and the subroutine will return to the calling program. The number of years between the last two censuses. INT must equal either 5 or 10. If INT takes on any other value, error message number 0132 will be written out and the subroutine will return to the calling program. The nunb declinin greater than 40 value, e written turn to of NT mu If it is will be will ret er of years mor g. The value o than the value years. If NT t rror message nu out and the sub the calling pro st also be a mu n't, error mess written out and urn to the call tality has been f NT must be of INT but less akes on any other mber 0133 will be routine will re- gram. The value ltiple of five, age number 0134 the subroutine ing program. The rate of natural increase of the popu- lation before the mortality decline began. The value of RNG1 should be between -0.01 and 0.05. If RNG1 takes on any other value a warning message will be written out. The eight crude birth rates corresponding to the eight stable populations generated by the intercensal rate of natural increase and the proportions of the population under ages 5, 10, 15, 20, ...,45. The eight gross reproduction rates corresponding to the eight stable populations generated in the same way as the crude birth rates. The eight crude birth rates after adjustment for the effect of the mortality decline. The eight gross reproduction rates after adjustment for the effect of the mortality decline. The eight crude death rates after adjustment for the effect of the mortality decline. 38 DOCUMENTATION C. ERROR MESSAGES 0131 *** ADJBG ERROR NO. 0131 INPUT ERROR IN VARIABLE RNG *** RATE OP NATORAL INCREASE MUST BE WITHIN RANGE -0.01 TO 0.05 0132 *** ADJBG ERROR NO. 0132 INPUT ERROR IN VARIABLE INT *** THE INTERCENSAL PERIOD MOST BE FIVE OR TEN YEARS 0133 *** ADJBG ERROR NO. 0133 INPUT ERROR IN VARIABLE NT *** THE NUMBER OP YEARS MORTALITY HAS BEEN DECLINING MUST BE GREATER THAN THE LENGTH OF THE INTERCENSAL PERIOD BUT LESS THAN 40 YEARS 0134 *** ADJBG ERROR NO. 0134 INPUT ERROR IN VARIABLE NT *** THE NUMBER OF YEARS MORTALITY HAS BEEN DECLINING MUST BE A MULTIPLE OF FIVE V. PROGRAMS AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM C c C MAIN PROGRAM FOR SUBROUTINE ADJBG c c C- THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY FOUR C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C- STATEMENTS AS FOLLOWS, C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL C TO BE USED TO IDENTIFY THE OUTPUT. THIS LABEL WOULD USUALLY C- CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED C IN COLUMNS 2-53 OF THE CARD. C C- THE SECOND READ STATEMENT USES ONE DATA CARD. C -THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN (1) THE C RATE OF NATURAL INCREASE (RNG) OF THE POPULATION DURING THE LAST C INTERCENSAL PERIOD, (2) THE NUMBER OF YEARS BETWEEN THE LAST TWO C- CENSUSES (INT) , (3) THE NUMBER OF YEARS MORTALITY HAS BEEN C- DECLINING (NT), (4) THE RATE OF NATURAL INCREASE (RNG1) OF THE C~ POPULATION BEFORE THE MORTALITY DECLINE BEGAN, AND (5) THE CODE C INDICATING IF THERE IS ANOTHER DATA SET FOLLOWING THIS ONE (NXT) . C RNG IS LOCATED IN COLUMNS 1-6 WITH THE DECIMAL POINT IN COLUMN 2. C — — INT IS LOCATED IN COLUMNS 8-9, ENDING IN COLUMN 9. INT MUST c EQUAL 5 OR 10. C NT IS LOCATED IN COLUMNS 11-12, ENDING IN COLUMN 12. NT MUST c _____ BE a MULTIPLE OF 5. C— RNG1 IS LOCATED IN COLUMNS 14-19 WITH THE DECIMAL POINT IN c COLUMN 15. C -NXT IS LOCATED IN COLUMN 21. A ZERO PUNCHED IN COLUMN 21 INDI- c __ CATES THIS IS THE LAST SET OF DATA. IF ANY OTHER NUMBER c - IS poNCHED IN COLUMN 21, ANOTHER SET OF DATA FOLLOWS c _____ THIS 0NE . C C —THE THIRD BEAD STATEMENT USES ONE DATA CARD. C —THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE EIGHT C — — CRUDE BRITH RATES (CBR) CORRESPONDING TO THE EIGHT STABLE POPU- C- -LATIONS GENERATED BY THE INTERCENSAL RATE OF NATURAL INCREASE AND O THB PROPORTIONS OF THE POPULATION UNDER AGES 5, 10, 15, ...,40. C- CBR IS CONTAINED ON ONE CARD WITH THE DECIMAL POINTS IN COLUMNS c „____ 1# Qt i 5# 22, 29, 36, 43, AND 50. C C- THE FOURTH READ STATEMENT USES ONE DATA CARD. C- THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE EIGHT C -GROSS REPRODUCTION RATES (GRR) CORRESPONDING TO THE EIGHT STABLE C- -POPULATIONS GENERATED BY THE INTERCENSAL RATE OF NATURAL INCREASE C— — AND THE PROPORTIONS OF THE POPULATION UNDER AGES 5, 10, 15, ...,40. C- GRR IS CONTAINED ON ONE CARD WITH THE DECIMAL POINTS IN COLUMNS c „ 2, 8, 14, 20, 26, 32, 38, AND 44. c _ _ c . ADJBG 39 DIMENSION CBB (8) ,GRR (8) ,CBBA(8) ,GBBA (8) ,CDBA(8) NBEAD=1 NPBNT=15 1 BEAD(NBEAD,4) READ(NHEAD,5) RNG, INT, NT , RNG1 , NXT READ{NREAD,6) (CBB (I) ,1=1 , 8) READ(NREAD,7) (GRR (I) , 1=1, 8) WRITE (NPBNT,8) WRITE (NPBNT,<») CALL ADJBG(RNG,INT,NT,BNG1,CBB,GBB,CBBA,GRRA,CDRA) WHITE (NPBNT,9) DO 2 1=1,8 IAGE=5*I WRITE (NPBNT, 10) I AGE, CBB (I) ,GRB(I) ,CBRA (I) ,GBBA (I) , CDBA (I) 2 CONTINUE IF (NXT) 1,3,1 3 STOP 4 F0RMAT(1X,52H 5 FORMAT (F6. 4, 1X,I2, 1X, 12, 11, F6. «», 1 X, 11 ) 6 FOBMAT (F6.5,7(1X,F6.5)) 7 FOBMAT (F5.3,7(1X,F5.3)) 8 F0RHAT(1H1) 9 FOBMAT(/1X,3HAGE,5X, 17HSTABLE POPULATION, 1 2X, 23HQ0ASI-STABLE POPUL * AT ION, /, 9X,17HESTI MATES (INPUT) , 19X, 9HESTIHATES,/, 1 1X,3HCB8,7 X,3HG *BR,11X,3HCBR,7X,3HGBR,14X,3HCDR) 10 FORMAT (1X,I2,4X,F8.5,5X,F5.3, 6X,F8.5,5X,F5.3, 5X,F12.5) END B. COMPUTER LISTING FOB SUBBOUTINE c ___ . „ „ c _„ „ . _ SUBBOUTINE ADJBG (BNG,INT, NT, BNG1 ,CBB, GRR, CBRA,GBRA, CDRA) c _ _ „ _ — C PBOGBAM NO. 0130 c . . _ C THE INPUT ABGUMENTS TO THIS SUBBOUTINE ABE RNG, INT, NT, BNG1, C CBB, GRB, AND CBDA. C THE OUTPUT ABGUMENTS FBOM THIS SUBROUTINE ABE CBBA AND GBRA. C RNG IS THE BATE OF NATUBAL INCBEASE OF THE POPULATION DUBING THE C LAST INTERCENSAL PERIOD. C INT IS THE NUMBEB OF YEABS BETWEEN THE LAST TWO CENSUSES. C NT IS THE NUMBEB OF YEARS MOBTALITY HAS BEEN DECLINING. C BNG1 IS THE BATE OF NATUBAL INCBEASE OF THE POPULATION BEFORE THE C MORTALITY DECLINE BEGAN. C CBR ARE THE EIGHT CRUDE BIBTH BATES COBBESPONDING TO THE EIGHT c __„__ STABLE POPULATIONS GENEBATED BY THE INTEBCENSAL BATE OF C NATURAL INCBEASE AND THE PBOPG8TIONS OF THE POPULATION UNDEB C AGES 5, 10, 15, 20, ...,40„ C GBB ARE THE EIGHT GROSS BEPBODUCTION BATES COBBESPONDING TO THE C EIGHT STABLE POPULATIONS GENEBATED BY THE INTERCENSAL BATE C OF NATUBAL INCBEASE AND THE PBOPOBTIONS OF THE POPULATION C UNDEB AGES 5, 10, 15, ...,40. C CBBA ABE THB EIGHT CBUDE BIRTH RATES AFTER ADJUSTMENT FOR THE C EFFECT OF DECLINING MORTALITY. C GRRA ABE THE EIGHT GBOSS BEPBODUCTION BATES AFTEB ADJUSTMENT FOB c THE efpecT OF DECLIWING MOBTALITY. C CDBA ABE THE EIGHT CBUDE DEATH BATES AFTEB ADJUSTMENT FOB THE C EFFECT OF DECLINING MOBTALITY. c „ c __„ DIMENSION CBB (8) ,GBB (8) ,CBBA(8) ,GBBA (8) ,CDBA (8) DIMENSION CONST (8,2), BONST(78) EQUIVALENCE (BONST(1) .CONST (1,1)) NPBNT= 15 C c . C VEBIFICATION OF INPUT VABIABLES c _ „ __ . c NERR= IF (BNG ♦ 0.01) 100,110,95 9 5 CONTINUE IF (RNG - 0.05) 110,110,100 40 DOCUMENTATION 100 WRITE (NPENT, 111) 111 PORMAT(//47H *** ADJBG ERROR NO. 0131 — INPUT ERROR IN RNG, */,65H *** RATE OF NATURAL INCREASE BUST BE WITHIN RANGE -0.01 TO ♦0.05) NERR= 1 110 CONTINUE IF (INT-5) 130,140,120 120 CONTINUE IF (INT-10) 130,140,130 130 WRITE (NPRNT,222) 222 FORMAT (//47H *** ADJBG ERROR NO. 0132 — INPUT ERROR IN INT, */,50H *** THE INTERCENSAL PERIOD MUST BE 5, OR 10 YEARS) NERR= 1 140 CONTINUE IF (NT - 5) 160,150,145 145 CONTINUE IF (NT - 40) 150,150,160 160 WRITE (NPRNT,333) 333 FORMAT (//46H *** ADJBG ERROR NO. 0133 — INPUT ERROR IN NT, * /,69H *** THE NUMBER OF YEARS MORTALITY HAS BEEN DECLINING MUS *T BE GREATER, /,69H *** THAN THE LENGTH OF THE INTERCENSAL PERIOD B *UT LESS THAN 40 YEARS) NERR= 1 150 CONTINUE IF (MOD(NT,5)) 161,170,161 161 WRITE (NPRNT, 666) 666 FORMAT (//46H *** ADJBG ERROR NO. 0134 -- INPUT ERROR IN NT, * /,77H *** THE NUMBER OF YEARS MORTALITY HAS BEEN DECLINING MUS *T BE A MULTIPLE OF 5) KERR = 1 170 CONTINUE IF (RNG1 + 0.01) 180,190,175 175 CONTINUE IF (RNG1 - 0.05) 190,190,180 180 WRITE (NPRNT, 444) 444 FORMAT (//43H *** ADJBG WARNING -- INPUT WARNING IN RNG1, */,65H *** RATE OF NATURAL INCREASE MUST BE WITHIN RANGE -0.01 TO *0.05) 190 CONTINUE IF (NERR) 900,220,900 c _ C CALCULATION OF ADJUSTED CBR AND GRR c .„_„. ___ C 220 T=INT TIME=NT DK=1780.0* (RNG-RNG1)/ (TIME-T/2.) I=NT/5 K=INT/5 CALL GTCON (2, I , K, CONST) DO 23 J=1,8 CBRA (J) =CBR (J) *DK*CONST (J, 1) *CBR (J) CDRA(J) = CBRA (J) - (RNG + (T/2.0) * DK / 1780.0) 230 GRR A (J)=GRR (J) +DK*CONST (J, 2) *GRR (J) GO TO 1000 900 WRITE (NPRNT, 555) RNG, INT,NT,RNG1 , CBR, GRR 555 FORMAT (/28H ADJBG INPUT ARGUMENTS, * /10H RNG= ,F8.3 * /10H INT= ,16 * / 9H NT= ,16 * /11H RNG1= ,F8.3 * /10H CBR= ,8F8.5 * /10H GRR= ,8F8.3 DO 910 I- = 1,8 CDRA(I) * = 0.0 CBRA (I) = 0.0 910 GRRA (I) = 0.0 000 RETURN END ADJBG 41 h- a Ul -4 Q_ s s s £ V c 2 5 5 s K E s S £ X? JC s ^ a R c " s ~ K -£■ ^ C s s l« s IT. s s s 5 "s s 10 s s £ 3 3 9 s 3 5 r- V9 r>- V9 5 9 3 3- f « 5 3- — 3- — 15 T 3 O • O « 5| 3 3 « wv • rrv "t 3 3 S fl- 3 h> /-^ 1^ 5 5 S — — — v9 % § K in — «v w — S S 3 3- • — 3- • s s s O K\ O Ce f^> s 2 s O O O •f S R O tvi cr O CM s 2 to . C£ v9 . ~ ~ S 3- r« UJ 3- T> s £ s O O s S a • Uv u_ • io s S a vO O VB s fS R (VI (VI |R S s 3- . 1— 3- • X S s «V l/V V9 £ !C s 3- Ui 3- 2 S 5 O O 1- O O 3 R H O v_y • O S ft 3 •~ wv O <*> a Z g 2 • z • s s tn O f«» l*v O O IT* l*V 2 2 2 t-l vo Hi O vS 2 2 £ (- «M 3- ITk t- CM d- l*> - S 2 O ' Zi O • 2 2 a O- «■> 0. «% 2 2 a O O IA O O u-> - 3 - 0- l*> 3- 00 Q_ 1^ * Oo s S 2 3- u-> 3- IT, 2 ». C= IA O — or lr> — «, z *r> " h. u> uj O UJ O » » « ■> i«r> 0» 0- > *r» 00 0- •> v, » ^> ««V (VI cvi O vS CVI . O • • O • N N - O • fC> O • r« M - Ik CO V w C CM V 4 C_> ■» L « ■a- b to 1 -* c 01 1? 3> UJ 4- to UJ C/> "J CVI 42 DOCUMENTATION D. SAMPLE OUTPUT 1st SET SOUVENIR POPULATION AGE STABLE POPULATION QUASI -STABLE POPULATION ESTIMATES (INPUT) ESTIMATES CBR GRR CBR GRR CDR 5 0.04280 3.029 0.04230 3.083 0.00811 10 0.0*»U50 3.158 0.04450 3.248 0.01032 15 0.04630 3.293 0.04712 3.451 0.01294 20 0.04640 3.300 0.04816 3.525 0.01398 25 0.04600 3.265 0.04863 3.556 0.01445 30 0.04510 3.203 0.04871 3.561 0.01452 35 0.04470 3.167 0.04910 3.580 0.01492 40 0.04460 3.166 0.04944 3.611 0.01526 2nd SET SOUVENIR POPULATION (TEST OF ERROR 0131) *** ADJBG ERROR NO. 0131 — INPUT ERROR IN RNG *** RArE OF NATURAL INCFEASB MUST BE WITHIN RANGE -0.01 TO 0.05 ADJBG INPUT ARGUMENTS, RNG= 0. 063 INT= 5 NT= 30 RNG1= 0.020 CBR = 0.04280 0.04450 0.04630 0.04640 0.04600 0.04510 0.04470 0.04460 GRR= 3.029 3.158 3.293 3.300 3.265 3.203 3.167 3.166 AGE STABLE POPULATION ESTIMATES (INPUT) QUASI-STABLE POPULATION CBR GRR 5 0.04280 3.029 10 0.04450 3.158 15 0.04630 3.293 20 0.04640 3.300 25 0.04600 3.265 30 0.04510 3.203 35 0.04470 3.167 40 0.04460 3»166 CBR 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ESTIMATES GRR 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 CDR ADJFR I. DESCPTPTION OF PROGRAM A. PORPOSE To calculate new age-specific fertility rates from a given set of age- specific fertility rates and a pattern of change. The pattern of change can be given in three ways: 1) a proportional change for each age-specific fertility rate; 2) an absolute change in the total fertility rate and the percent distribution of this change among the age gtoups; 3) an absolute change for each age-specific fertility rate. B. DATA HEEDED 1. The seven age-specific fertility rates in 5-year age groups 15-19, 20-2U, ..., i»5-49. The magnitude of the fertility rates should be per woman, not per thousand women. 2. A code indicating the procedure to be used for adjusting the fertility rates. 3. The adjustments to the fertility rates. The adjustments can be given in three ways: a. Seven proportional changes, one for each age- specific fertility rate, can be given. b. The absolute change in the total fertility rate plus the age group percent distribution of the total change can be given. c. Seven absolute changes, one for each age-specific fertility rate, can be given. 4. A code which indicates whether the results of the subroutine are to be written out. II. HETHODOLOGY MATHEMATICAL DERIVATION There are three possibilities according to the hypothesis of how the rates will change. Case I. When the proportional change — negative for a decline -- of each age-specific fertility rate is known. In this case, the rates to be obtained are: 5^=5<- (l+ 5 V where .0 and 9 are the given and calculated age- -> x 5 x specific fertility rates, respectively. 5 V is the proportional change to the age-specific rate for ages x,x+U. 43 44 DOCUMENTATION Case II. When an absolute change in the total fertility rates is given with the pattern of change — the age-specific distribution of the total change. In this case. where 5 D is the proportion of the total change at age x,x+<» TC is the absolute change in the total fertility rate. Case III. When the absolute change in each age-specific fertility rate is given. J 2 = c 1 + ,AV 5 x 5 x 5 x where 5 AV x is the absolute change — negative for a decline of fertility — in the age-specific fertility rate at age x,x+U. ITI.M A I N PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL &DJFR (KODB,NWRIT, ASFRP, TOT, ASFR) 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the main program. For this subroutine both variable names ASFRP and ASFR in the argument string are arrays. The following DIMENSION statement must be included in any main program using this subroutine. DIMENSION ASFRP (7) , ASFR (7) ADJFR 45 B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FOBTFAN library. 1. Subroutines from this package None 2. Library functions ABS (absolute value) 3. Card diagram of main program and subroutines. / / / CARDS INDICATING END OF DECK / / /I / INPUT DATA / | / / I / /I I / / COMPUTER CONTROL CARDS / | | / / / I I/ / /I I / / SUBROUTINE ADJFR / | | / / / I I/ / /I I / / MAIN PROGRAM / | | / / 7 1 i / / COMPUTER CONTROL CARDS / | | / / / I I/ I / :. FORMAT REQUIREMENTS FOB CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V. A. The card format requirements for the main program included with this subroutine package are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. E. See example, section V.C. Variable Card Columns Name Definition 1 2-53 5U-80 1 NXT NHRTT Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. If any other number is punched in column 1, another set of data follows this one. The code indicating whether the results of the subroutine are to be printed out. A zero punched in column 2 indicates the results are not to be printed out. If any other number is punched in column 2, the results of the subroutine will be printed out. 46 DOCUMENTATION IKODE «»-8 9-80 TOT | The code indicating the procedure to be used for adjusting the fertility rates. A 1 punched in column 3 indicates that the age-specific fertility rates are to be adjusted by a proportional change for each age-specific fertility rate; a 2 punched in column 3 indicates that the adjustment Hill be by an absolute change in the total fertility rate along with the proportional age group distribution of this change; and a 3 punched in column 3 indicates the adjustment will be by an absolute change for each age-specific fertility rate. The absolute change in the total fertility rate. These columns are used only when a 2 is punched in column 3. The value should be entered with the decimal point in column 6. If the absolute change is negative, a minus sign should be entered in column 4. Blank The next card depends on the value given for KOBE in card 3. If the value for KODE is 1, the proportional change for each of the age-specific fertility rates is read in. 3 | 1-7 |ASFFP | The proportional change for age group 15-19 I . I I . I • I I • | 43-49 | I I | 50-80 | |The proportional change for age group 45-49 I j Blank If KODE has the value 2, the distribution of the absolute change in the total fertility rate is read in. 1-7 4 3-49 50-80 ASFHP | The proportion of the change in the | total fertility rate in age group 15-19 | The proportion of the change in the total fertility Irate in age group 45-49. I j Blank If KODE has the value 3, the absolute change for each age-specific fertility rate is read in 1-7 IASPEP | The absolute change for age group 15-19 • I I . I I 43-49 | I 50-80 | | The absolute change for age group 45-49 I I Blank Seven columns are allowed for each ASFRP value. Each value must be entered so that the decimal points are in columns 2, 9,..., 37, and 14. If any of the values are negative, a minus sign must be entered in the column preceding the decimal point. ADJFR 47 1-6 7-12 13-18 37-42 U3-80 ASFR | The fertility rate for age group 15-19 |The fertility rate for age group 20-24 I | The fertility rate for age group 25-29 I I I I |The fertility rate for age group 45-49 I I Blank Six columns are allowed for each ASFR value. Each value must be entered so that the decimal points are in columns 1,7,. ..,31, and 37. IV. SUBROUTI NE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE ADJFR (KODE, N WRIT, ASFRP , TOT , ASFR ) B. DESCRIPTION OF 8RGUHENTS Name How Obtained Definition KODE NWRIT ASFRP Transferred In Transferred In Transferred In The type of adjustment that is to be made to the age-specific fertility rates. KODE=1 indicates that the age-specific fertility rates are to be adjusted by a pro- portional change. RODE=2 indicates that the age-specific fertility rates are to be adjusted by con- sidering an absolute change in the total fertility rate and the age group percent distribution of the total change. KODE=3 indicates that the age-specific fertility rates are to be adjusted by an absolute change. If KODE has any other value, error message number 0161 is written out and the subroutine will return to the calling program. Code indicating whether the results of the subroutine should be printed out. NWRIT=0 indicates the results of the subroutine should not be written out. If NWRIT eguals any other number the results of the sub- routine will be written out. The adjustments to the fertility rates. These will be either 1) the proportional changes, 2) the dis- tribution of the absolute change in the total fertility rate, or 3) the absolute changes. In all cases, seven values must be given, one for each age-specific fertility rate. In all cases, all seven values of ASFBP must be within the range -1 to +1. If any value of ASFRP is outside this range, error message number 0162 will be written out and the subroutine will return to the calling program. If the second option for adjusting fertility rates is used (i .e if K0DE = 2) the sum of the 7 values of ASFRP must egual one. If it does not, error message number 0165 48 DOCUMENTATION TOT ASFR Transferred In Transferred In and Out will be written out and the subroutine will return to the calling program. If the second option for adjusting the fertility rates is used (i.e., if KODE=2) , TOT is the absolute change in the total fertility rate. If the second option is not chosen, the value of TOT is not used in the subroutine. The value of TOT must be between plus or minus one-half of the total fertility rate. If this is not the case, error message number 0163 will be written out and the subroutine will return to the calling program. The seven age-specific fertility rates that are to be ad-justed. All values of ASFR must be within the range 0.0 to 0.5. If any value is not within this range, error message number 0164 will be written out and the subroutine will return to the calling program. After completion of the adjustment procedure, ASFR has the value of the seven new adjusted age-specific fertility rates which are transferred back to the calling program. C. ERROR MESSAGES 0161 *** ADJFR ERROR NO. 0161 — INPUT ERROR IN KODE, *** THE ADJUSTMENT CODE BUST BE 1,2, or 3. 0162 *** ADJFF ERROR NO. 0162 — INPUT ERROR IN ASFRP, *** AT LEAST ONE VALUE OF THE FERTILITY RATE PATTERN OF CHANGE IS NOT BETWEEN - 1.0 TO 1.0. 0163 *** ADJFR ERROR NO. 0163 -- INPUT ERROR IN TOT, *** CHANGE IN TOTAL FERTILITY RATE MUST BE BETWEEN PLUS OR MINUS ONE HALF OF THE TOTAL FERTILITY RATE. 0164 *** ADJFR ERROR NO. 0164 — INPUT ERROR IN ASFR, *♦* AT LEAST ONE AGE-SPECIFIC FERTILITY RATE IS LESS THAN 0.0 OR GREATER THAN 0.5. 0165 *** ADJFR ERROR NO. 0165 — INPUT ERROR IN ASFRP *** THE SUM OF THE DISTRIBUTION FOR THE AGE-SPECIFIC FERTILITY ADJUSTMENTS MUST BE EQUAL TO 1.0. PROGRAM AND RESULTS COMPUTER LISTING FOR MAIN PROGRAM c c . _ _ C MAIN PROGRAM FOR ADJFR c c , C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN FOUR READ C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C — STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND c GIV E SOME INDICATION AS TO THE TYPE OF DATA CR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE C INDICATOR(NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET C FOLLOWING THIS ONE (2) THE WRITE INDICATOR (NWRIT) WHICH DETERMINES C WHETHER THE RESULTS OF THE SUBROUTINE ADJFR SHOULD BE WRITTEN C OUT, (3) THE TYPE OF ADJUSTMENT (KODE) THAT IS TO BE HADE TO THE C AGE-SPECIFIC FERTILITY RATES, AND (4) IF FERTILITY IS TO BE ADJFR 49 C ADJUSTED BY THE TOTAL FERTILITY PATE, THE TOTAL CHANGE IN THE C TCTAL FERTILITY BATE (TOT). C NXT IS IN COLOHN 1 OF THIS CARD. A ZERO IN COLOHN 1 INDICATES c THIS is THE L&ST DATA SET . any OTHER NOHEER IN COLOHN 1 c INDICATES THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. C NWRIT IS IN COLOHN 2 OF THIS CARD. A ZERO IN COLOHN 2 INDICATES c THAT THE RESULTS OF THE SOBROOTINE ADJFR ARE NOT TO BE c PRINTED OOT. FOR ANY OTHER NUMBER IN COLOHN 2 THE RESOLTS c 0F THE SOBEOUTINE ADJPR HILL BE PRINTED OOT. C KODE IS IN COLUMN 3 OF THIS CARD. A 1 IN COLOHN 3 INDICATES c T HAT THE AGE-SPECIFIC FERTILITY RATES ARE TO BE ADJOSTED BY C A PROPORTIONAL CHANGE. A 2 IN COLOHN 3 INDICATES AN C ABSOLOTE CHANGE IN THE TOTAL FERTILITY RATE WITH THE c DISTPIBOTION OF THE CHANGE GIVEN ON THE FOLLOWING CARD. A c 3 IN COLOHN 3 INDICATES THAT THE AGE-SPECIFIC FERTILITY C RATES TO BE ADJOSTED BY THE ABSOLOTE CHANGE GIVEN ON THE c FOLLOWING CARD. c T0T IS IN COLOHNS U-8 OF THIS CARD. THESE COLOMNS ARE OSED ONLY C ~ RHEN KODE = 2. THE DECIMAL POINT IS ENTERED IN COLOHN SIX c __ &ND IF T HE TOTAL FERTILITY RATE IS DECLINING THEN A MINOS C SIGN SHOOLD BE ENTERED IN COLOHN 4. C C THE THIRD READ STATEMENT OSES ONE DATA CARD. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE C PROPORTIONAL CHANGE, THE DISTRIBUTION OF THE CHANGE, OR THE C ABSOLOTE CHANGE (ASFRP) IN THE AGE-SPECIFIC FERTILITY RATES. C ASFEP VALUES ARE CONTAINED ON ONE CARD. FOR EACH ASFRP VALOE, C SEVEN COLUMNS APE ALLOWED STARTING WITH THE FIRST EIGHT C COLOMNS. EACH VALOE MUST BE ENTERED SC THAT THE DECIMAL c POINTS WILL BE IN COLUMNS 2, 9, ..., 37, AND 4U. IF ANY OF c THE VALUES ARE NEGATIVE A MINUS SIGN MOST EE ENTERED IN THE c COLOMN PRECEDING THE DECIMAL POINT. C C THE FOURTH READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO BEAD IN THE AGE- C SPECIFIC FERTILITY RATES (ASFR) THAT ARE TO BE ADJUSTED. C ASFR VALUES ARE CONTAINED ON ONE CARD. FOR EACH ASFR VALUE, SIX C COLOMNS ARE ALLOWED STARTING WITH THE FIRST SIX COLOMNS OF c THIS CARD. EACH VALOE HOST BE ENTERED SO THAT THE DECIMAL c POINTS WILL BE IN COLUMN 1, 7, ..., 31, AND 37. c . c DIMENSION ASFRP (7) , ASFR (7) NEEAD = 1 NPRNT = 15 10 READ (NREAD,11) 11 F0FMAT(1X,52H READ (NREAD,22) NXT, NWRIT, KODE, TOT 22 FORMAT (3I1,F5. 3) READ(NREAD,33) (ASFRP (I) ,1=1 ,7) 33 FORMAT (7F7. 5) READ (NREAD,o to S s h te 3 3 3 e= Ui 3 3 5 O U- 5 S * a. in t0 V 3 S o © fr- o s S 3 C: • o . 3 3 3 Q. fr- 3 3 3 v 3 3 o — O — S 3 3 to tfl IS t9 3 3 S o- CJ CM o- to CM S S S — o o — o o E S ft . • . . s s to to to s s E Ul s*- Ui *• £ s S fr- tr» fr- «» s R ee o» et OB S " e: o 0£ t» o 2 « ft o • o • S « S >- • >^ • S s a h- 1 in fr- vn S s s M — t-t — oo rS a -1 O -i o ft ft 8 l-l CM M CM K s s fr- cm > fr- • S s s C: o 0: CM s s 5 Ul « t>- Ul . r- 8 3 k u_ i o- U- o- L~_ ft s lr> ir> ft ft s t> CJ o CM 8 ° 2 i-f . M . Oi 2 s U- u> U- 2 2 5 M o r-- H M\ r^- rs" « 2 o • vs o . ts ^i" 2 £ at 1 — Ul — "2" 2 2 Q. it> a. l»k r 2 : 2 \Si • t/> . 2 2 2 1 f 2 2 a Ul Oo Ul o» 5 2 s o — . v9 CD CM tS 2 2 o-> cc • c» a: O • Co ot o> » 1 CM O CM » » - \~ • (- o » ■~ -~ to 10 to . to u. "• r> CM ■=> ~- CM ^. «> » »-> O »-> 1 O * » „ o ~ — o- O CM — o- m n " ec — • o ec — • O M ~ - — 1 . o . M - if to c a O CM — V HI to ■» c CM ADJFR 53 D. SAMPLE ODTPDT 1st SET ADJUST ASE-SPECIFIC FERTILITY PATES 1960 PROPORTION ADJUSTED AGE-SPECIFIC FERTILITY RATES 15-19 20-21 25-29 30-31 35-39 40-44 45-49 0.08118 0.25812 0.30086 0.25451 0.20150 0.08507 0.02740 2nd SET ADJOST AGE-SPECIFIC FERTILITY RATES 1960 TOT FERT ADJUSTED AGE-SPECIFIC FERTILITY RATES 15-19 20-24 25-29 30-34 35-39 40-44 45-49 0.07020 0.24680 0.25670 0.21970 0.18550 0.07140 0.01410 3rd SET adjust age-specific fertility rates 1960 absolute ADJOSTED AGE-SPECIFIC FERTILITY RATES 15-19 20-24 25-29 30-34 35-39 40-44 45-49 0.09000 0.28000 0.31000 0.25000 0.21000 0.09000 0.02000 AGESX I. DESCRIPTION OF PROGRAM A. PURPOSE To calculate aqe and sex ratios for a population distribution by sex and 5-year aqe groups. The sex-ratio score, age-ratio score, and joint age-sex ratio score - as defined by the United Nations - are calculated. B. DATA NEEDED 1. Bale population in 5-year age groups. 2. Female population in 5-year age groups. II. METHODOLOGY A. MATHEMATICAL DERIVATION Sex ratios for each age group are calculated as the number of males for every hundred females. MP K = —^ — — 100 5 x _FP X * 5 x where 5 K is the sex ratio for age group x,x + 4 MP is the male population from age x,x+4 5 FP is the female population from age x,x+U Age ratios are defined as 100 times the quotient of a particular age group divided by the arithmetic average of the two adjacent groups. That is, MP MAR = — 2_x 100< i-^x-5 + 5^ where ..MAR is the male age ratio for aqe x, up to x+5. 5 x ,-FAR , the female age ratio, is calculated the same way. 55 56 DOCUMENTATION The sex-ratio score is defined as the arithmetic mean of the absolute differences between each consecutive sex ratio no further than for tne age qroup 65-69 w-5 m Jo,5 5X 5x+5 where KS is the sex ratio score m is the number cf differences used. w is the lower bcund of the last age group of the last used sex ratio in calculating this score. The age-ratio score is the mean deviation of the age ratios from 100 percent regardless of sign. Hence: w=10 MAS = — J2 LMAR - 100.1 m x^,5 5 X where MAS is the male age-ratio score and m is the number of age ratios FAS, the female age-ratio score, is calculated in the same manner. Finally, there is another empirical index which is called the joint score and is defined as: JS = 3 KS + MAS + FAS where MAS and FAS are the male and female age ratio scores KS is the sex ratio score. Levels of the joint score under 20 are acceptable, between 20 and 40 indicate marked inaccuracies in the age reporting, and over HO indicate great errors in the aqe reporting. Reference United Nations, "Accuracy Tests for Census Age Distribution in Five-year and Ten-Year Groups," Population Bulletin, No. 2, October, 1952, pp. 59-79. B. COMMENTS Usually this subroutine is used to calculate age and sex ratios for 5-year age groups which can be analyzed for possible errors in the aqe distributions for males and females. The sex and age ratios as well as the joint score index should be used with caution when different populations are being analyzed. This is the case for populations which have experienced migration, fertility fluctuations durinq the past or any other event that may have affected the smoothness of the age-sex distribution. AGESX 57 III. MAIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1 . CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL AGESX (PM, PF) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the main program. For this subroutine both variable names, PM and PF, in the argument string are arrays. PM refers to all of the age groups for male and PF refers to all of the age groups for females. A maximum of 17 age groups can be given for each sex -- 16 5-year age groups and the open-ended age group. The following DIMENSION statement must be included in any main program using this subroutine. DIMENSION PM(17) ,PF (17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION HITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package ABREV 2. Library functions ABS (absolute value) 58 DOCUMENTATION 3. Card diaqram of main program and subroutines. / / / CARDS INDICATING END OF DECK / / 7i / INPUT DATA / | ^ _^ ^ / COMPUTER CONTROL CAhDS / | | / / / I 1/ / /I I / / SUBROUTINE ABREV / | | / / / I 1/ / /I I / / SUBROUTINE AGESX / | | / / / I 1/ / /i I / / BAIN PROGRAM / \ | / / / I (/ / /I I / / COMPUTER CONTROL CARDS / | | / / / I 1/ i / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. see example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1-8 9-16 72-80 1-8 9-16 49-56 57-80 PM PM Blank Label used to identify the output Blank Male population 0-4. The number should end in column 8. Male population 5-9. The number should end in column 16. Male population 45-49. The number should end in column 80. Male population 50-54. The number should end in column 8. Male population 55-59. The number should end in column 16. Open ended male population 80+. The number should end in column 56, Blank The variable PM always requires two cards. The first card (card no. 2) must always contain data whereas the second AGESX 59 card (card no. 3) can be all zeroes depending on the number of age groups given. The last age group given must always be the open ended age group. 1-8 9-16 72-80 1-8 9-16 • 19-56 57-80 PF PP Female population 0-1. The number should end in column 8. Female population 5-9. The number should end in column 16. Female population 45-19. The number should end in column 80- Female population 50-51. The number should end in column 8. Female population 55-59. The number should end in column 16. Open ended female population 80+. number should end in column 56. Blank The The variable PF always reguires two cards. The first card (card no. 1) must always contain data, whereas the second card (card no. 5) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 2-80 NXT I |The code indicating if there is another data | set following this one A zero punched in | column 1 indicates that this is the last | set of data. Any other digit punched in | column 1 indicates that another set of | data follows this one. I I Blank IV. SOB ROUTINE A, SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE AGESX (PM,PF) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition I I Transferred In |Male population in 5-year age groups | beginning with 0-1, The last age group |is the open-ended age group for males, lit is possible to use the subroutine with Ibetween 1 and 17 5-year age groups. If J less than four age groups are given, the I subroutine will write out error message | number 0191 and return to the calling I program. I 60 DOCUMENTATION PF | Transferred In | Female population in 5-year age groups | beginning with 0-4. The last group is the lopen-ended age group for females. It is | possible to use the subroutine with between I 4 and 17 5-year age groups. If less than Ifour age groups are given, the subroutine I will write out error message number 0191 and | return to the calling program, C. ERROR MESSAGES 0191 *** AGESX ERROR NO. 0191 — INPUT ERROR IN PM OR PF *** BOTH MALE AND FEMALE POPULATIONS MOST CONTAIN AT LEAST FOUR AGE GROUPS. V. PROGRAMS AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c C MAIN PROGRAM FOR SUBROUTINE AGESX c _ c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY FOUR C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL C TO BE USED TO IDENTIFY THE OUTPUT. THIS LABEL WOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS ^THAT IS BEING DONE. THE LABEL IS LOCATED C IN COLUMNS 2-53 OF THE CARD. C C THE SECOND READ STATEMENT USES TWO DATA CARDS, C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN THE MALE C POPULATION IN FIVE YEAR AGE GROUPS (PM) . c PH Is CONTAINED ON TWO CARDS. EACH VALUE OF PM MUST BE LOCATED C WITHIN EIGHT COLUMNS, STARTING WITH THE FIRST EIGHT C COLUMNS. A MAXIMUM OF TEN PM VALUES CAN APPEAR ON THE c FIRST CARD, ENDING IN COLUMNS 8, 16, 24, ... ,80. A C MAXIMUM OF SEVEN PM VALUES CAN APPEAR ON THE SECOND CARD, c ENDING IN COLUMNS 8, 16, 24, ... ,56. IF TEN OR FEWER PM c VALUES ARE GIVEN, THE SECOND CARD WILL BE BLANK. C C THE THIRD READ STATEMENT USES TWO DATA CARDS. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE FEMALE C POPULATION IN FIVE YEAR AGE GROUPS (PF) . c pF IS CONTAINED ON TWO CARDS. EACH VALUE OF PF MUST BE LOCATED C WITHIN EIGHT COLUMNS, STARTING WITH THE FIRST EIGHT C COLUMNS. A MAXIMUM OF TEN PF VALUES CAN APPEAR ON THE c FIRST CARD, ENDING IN COLUMNS 8, 16, 24, ... ,80. A c MAXIMUM OF SEVEN PF VALUES CAN APPEAR ON THE SECOND CARD, c ENDING IN COLUMNS 8, 16, 24, ... ,56. IF TEN OR FEWER PF c VALUES ARE GIVEN, THE SECOND CARD WILL BE BLANK. C c THE FOURTH READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE CODE C (NXT) INDICATING IF THERE IS ANOTHER DATA SET FOLLOWING THIS ONE. C NXT IS LOCATED IN COLUMN 1. A ZERO PUNCHED IN COLUMN 1 INDICATES c THIS Is THE LAST SET 0F DATA. ANY OTHER DIGIT PUNCHED IN C COLUMN 1 INDICATES ANOTHER SET OF DATA FOLLOWS THIS ONE. c c DIMENSION PM(17), PF(17) NREAD=1 NPRNT=15 1 READ(NREAD,3) READ (NREAD,4) PM READ(NREAD,4) PF READ(NR£AD,5) NXT WRITE(NPRNT,6) WRITE (NPRNT,3) CALL AGESX (PM,PF) AGESX 61 IF (NXT) 2,2,1 2 STOP 3 FORMAT (1X,52H 4 FORMAT(10F8.0/7F8.0) 5 FORMAT(H) 6 F0RMAT(1H1) END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE AGESX (PM,PF) — PROGRAM NO. 0190 • — THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE PM AND PF. • — THERE ARE NO OUTPUT ARGUMENTS FROM THIS SUBROUTINE. — PM IS THE MALE POPULATION IN FIVE YEAR AGE GROUPS. • — PF IS THE FEMALE POPULATION IN FIVE YEAR AGE GROUPS. DIMENSION PM(17) ,PF(17) DIMENSION PM5(17),PF5 (17) NPRNT=15 •—COUNT THE NUMBER OF AGE GROUPS, ABBREVIATE IF NECESSARY AND ■ — VERIFY THE INPUT DATA 120,120,118 .0000001) 122,122,121 100 NERR= DO 110 1=1,17 PM5 (I) = PM(I) 110 PF5(I) = PF (I) NM = DO 113 1=1,17 IF (PM(I) - 0.9) 114,114,112 112 NH = NM + 1 113 CONTINUE GO TO 117 114 DO 116 J=I,17 IF (ABS(PM(J)) - .0000001) 116,116,115 115 NERR = 1 116 CONTINUE 117 NF = DO 119 1=1,17 IF (PF(I) - 0.9) 118 NF = NF + 1 119 CONTINUE GO TO 123 120 DO 122 J=I,17 IF (ABS(PF(J)) - 121 NERR = 1 122 CONTINUE 123 CONTINUE IF (NERR - 125 CONTINUE IF (NM - 4) 129,126,126 126 CONTINUE IF (NF - 4) 129,130, 130 129 WRITE (NPRNT,111) 111 FORMAT ( //64H *** AGESX ERROR NO. 0191 — INPUT ERROR IN VARIABLE * PM OR PF,/,110H *** EITHER THERE ARE LESS THAN 4 AGE GROUPS IN *A DISTRIBUTION OR AN AGE GROUP (S) IS LESS THAN OS EQUAL TO 0.9) WRITE (NPRNT, 222) PM, PF 222 FORMAT (//27H AGESX INPUT ARGUMENTS, *//9H PM= ,9F12.2/9X,8F12.2 *//9H PF= , 9F12.2/9X,8F12.2) GO TO 1000 130 CALL ABREV ( 1 , PM5, PF5, NG) 135 CONTINUE IF (NG-16) 140,150,150 140 N= NG-2 GO TO 160 150 N= 14 1) 125,129,125 62 DOCUMENTATION 160 NP1 = N+1 NM1 = N-1 TDEVM =0.0 TDEVF = 0.0 TSEDF= 0.0 C c C CALCULATION AND PRINTING OF SEX RATIOS, AGE RATIOS AND DEVIATIONS c C SR2=(100.0*PM5(1{)/PF5 (1) WRITE (NPRNT,333) PH5{1) ,PF5(1) ,SR2 333 FORBAT (//29H UNITED NATIONS AGE-SEX RATIO , ///,4X, * 3HAGE, 12X, 10HPOPULATION, 13X, 9HAGE RATIO, 12X, 9HDEVIATION, * 10X, 3HSEX,/, * 3X, 5HGROUP,8X,4HMALE,7X, 6HFEHALE, 8X, 13HMALE FEMALE, * 7X,14HMALE FEMALE, 6X, 5HRATIO, 5X, 1 OHDIFFERENCE * //11H 0- 4 ,F10.0,3X,F10.0,47X,F5.1) NAGE1 = DO 170 1=2, N ARM = (200.0 * PM5(I)) / (PM5(I-1) + PM5(I + 1)) DEVM = ARM - 100. TDEVM = TDEVM + ABS(DEVM) ARF = (200.0 * PF5(I)) / (PF5(I-1) + PF5(I+1)) DEVF = ARF - 100.0 TDEVF = TDEVF + ABS(DEVF) SR1= (100.0 * PM5(I)) / PF5(I) SRDIF= SR1-SR2 SR2= SR1 TSRDF = TSRDF + ABS (SRDIF) NAGE1= NAGE1+5 NAGE2= NAGE1+4 170 WRITE (NPRNT,444) NAGE1 , N AGE2, PM5 (I) ,PF5(I) , Afc M, ARF, DEVM, DEVF, SR2 , * SRDIF 444 FORMAT (3X, 12, 1H- , 12 ,3X ,F1 0. 0, 3X, F10 . 0, 6X, F5. 1 ,4X,F5. 1 , 6X, * F5.1, 5X, F5.1, 6X, F5.1, 8X, F5. 1) NS= NAGE2 NA= NS+5 NGM1=NG-1 DO 190 I=NP1,NGM1 NAGE1= NAGE1+5 NAGE2= NAGEH-4 IF (NG-I) 180,180,190 180 NAGE2= 999 190 WRITE (NPRNT,555) NAGE1,NAGE2,PM5 (I) ,PF5 (I) 555 FORMAT (3X,I2, 1H-, 12, 3X, F10.0, 3X, F 10. 0) NAGEl=NAGE1+5 WRITE (NPRNT,556) NAGE1 , PM5 (NG) ,PF5(NG) 556 FORMAT(3X,I2,1H+,5X,F10.0,3X,F10.0) ADEVM =TDEVM /(NM1) ADEVF =TDEVF /(NM1) ASRDF = TSRDF /(NM1) AGSXR= (3.0*ASRDF)+ ADEVM + ADEVF WRITE (NPRNT,666) ADEVM, ADEVF, ASRDF, AGSXR,N A, NS 666 FORMAT (/, 2X, 38HAVERAGE AGE RATIO DEVIATION FOR MALES=,F8.2 */,2X,40HAVERAGE AGE RATIO DEVIATION FOR FEM ALES=, F8. 2 *>,2X,29HAVERAGE SEX RATIO BIFFERENCE=, F8. 2 */,2X,23HAGE-SEX ACCURACY INDEX=,F8.2, *//,2X,2lHNOTE: AGE GROUPS -,I3,27H USED TO COMPUTE AGE RATIOS */,9X,14HAGE GROUPS -,I3,27H USED TO COMPUTE SEX RATIOS ) 1000 RETURN END AGESX 63 ! i a: r- s o- in CM m s Ov m § 2 s9 o- f^ o- E vS CJ- s s OQ Ol Oo CM R Oo CJ £ R O *- in *■ C O *> E S or- o- Or- CJ- S Ct- 0- S ;c - -~ \S — " — — iC j * s " K c c es ir> o m p; O US ^ g iv O- (v o- ^ rv 0- ^ g in CM in CJ g in CJ s s o- |v o- |v VI 0- r- s 5 CM m CM ro S CM •»» s s CM CJ CM CM & CM CM c s s s s £ £ s JV — IV -~ w fv --. 3 ^> 00 vS 00 vS S 00 -3 3 to o- 00 0~ Oo S 0- 00 2 s 0» O 00 vS s 00 v» 3 s v» |v vS c- s sS (v S s CVi CJ CM cM K CM CM ffi s s s ft K ft s CM es CM O S OO O s £ =t- a- :*- a- Il- 3- £ s o vS o vS S CS vS 5 «\ CM Wl CM •T, 2 I! — CM ^ CM K — CJ ft ft re. m m ro 5 "l re, S S s 3 3 3 3 vS oo Oo rr> vS oo ro — 3 vS 00 O m 3 5 d- vS J- * * S- a- O- 5 a- vS i- 3 * vS o m O vS fCl o ~ 3 vS O 3 5 (v o» m CM r-- r^> CM O 3 r> o~ CM 3 5 v9 tn Oo IT> vS 00 in 3 vS «\ in 3 3 m f«-> <*> •^ 0£ 3 m 3 3 O 3 3 3 cz ; 5 3 o~ CU t\J in t>- CVI m a 3 CJ- CM CVI m 3 S vS vS m — Q s0 m — Hi s v9 vS m — a 3 o — m o UJ o fCl o s O — m s ft — oo o vn z — O in u. s ~- 00 in s S In Wl |v d- Ul in |v :*- s m T> «v i- s IS *■ * h- d- 3- IS ■h i- s CS r- ? £ " o c/> s " £ O Oo |v 00 3: o IV, Oo IU ~ Q OO tv 00 £ S v9 CJ 0- tv c/> vfl O- |v H s CM 0- c- n ° OO CVJ 0O DO Oo 00 Oo s Oo CJ 00 CP s a |v «■> m 0- 1 tv >*> 0- 1 s fv rn in 0- s 3 0» v9 iv vS 1 00 |v. vS 1 s 00 ^S rv vS * R m u-> 1 m m 1 s in in R s s S IC z z z s s s o «n — o CM o "» o CM s m -~ O CM s 3 n oo — CS o- l-( oo o o- l-l s 00 — sS 1— s 0- CM vS O s s er Oo O CM »^ a: 00 CM «^ a: a 00 cs CJ l*\ s g ~i CM CJ- — o- _i CM — or- -1 s CJ 0- — O- s en Z> rv r- S fv rv 3 2 r- (v 2 2 a. Q. 0. 2 2 S O o O - S 2 o. m — 3- H o o in M - O O cs in 2 2 Z. m CM m CM Z m m CM z 2 u-> CVI «s CM 2 3 IU OO — — IU Oo oo — UJ ■2, 00 — 00 —. 3 S > ■> i» 2 2 tr, IS s ts 0, m " o OO ic> ir> f^ o Oo m «s » 00 «S in m . ~ in IV. |V — oo t/> r- — Oo l/> - r~ IV — CP - " Oo * rn Or- CP IT* o- » 00 d- m CJ- x> "> c. o- m O ^> o ct- vS d- „ Or- rc> vS J- n « I— o in fv »r> r- O rv m r— ' CS m fv m « - o- O — — • o- o o- — O- CO O — CJ- — ^> ~ — — — ^ — ~ — ~ - -— — - O - Cf to cr VS CJ co ■J cr o -c *5 a £ CO -rs w a O *- a to •» c CM C o a * J- V a Si •A "5 O VS 1 a VS In V a VS « CVJ -a V. « VS VS 3- w v-j in «i CO •»- VS) ; to r~ 1 CNJ 1— IU 64 DOCUMENTATION H u H os t-oo\ooooo'-0(Noin H llll I III Cu fa M Q X W • •••»..••«.••• H H rOCNltNfNinmuor^vOOOCTivOvOO tO «fl OOOOWTNOlWWJitJKMJlW 03 r- t- i- t- 61 r^rovoa\sro' T )r>aior , ~<» .-? «4 ri-NrfOlN'-OOflOfflO aa i i i i i i ii i o h H fa EH «< H > H H (Tio>o^ci>o<^o hh H H r- r- <- r- I- HH H fa oo <* «< •4 O . 03 C4 OS r» r- • MX H h ooij-vo:**orocor-»in i- o H o ►-) .»»...•»••••• cr>oocriOOoo jc cnocr>ONcriwa>c^cftCTvcn n HH «- OT H EH II H B D t/i H * cu Cu H4lfl SB »-} a . O O «q h *- U U B Cm o o o> eh eh h ina-or-csoooT-iomfoofNooiofo « « !-; r-r~ocftin*^ , voai^oocDcrvr^r-a' oo < ro*\oeo' T )ro\ooo(N'-vocooo fa fa II . QO a ioo'Ninoi , i' | iM)h**ifl^oiinM hco hh o sbh r>-rr)T-t^r»oo(Nr».rocr>inf > »*ir) a a u w to H OH 0> CO MTI * "I 1*1 N N >- r- r- O O « DCS H H H H H •< EH HH« *0> H a OS >HH|I EH H H Cu HHHQ S ooo^oinooj*oo o << a o>©cor»«-r»ooo> hhehu do cu cu omojflOiovo»-vocM(TiinfN >< «4! «4 Q B a H H H X O Cu *o>.*cri*CT>5» , eri=» , o>^a»d-(Tis*- to CO to H to q hs »-r-fN(N' i opo*a'inif>vr)'*r~ <«i ■< «s to •• H OO I I I I I I I I I | I I I I I + «l«« | H o eh «a « OinoinOknou*)oi/)omomoin hhhh eh t» h o »-'-cvi>>o o en a «» «* O t-A •••»••• £ t I I I I I >-t . . «3 ooi-r-ao**ooao OS CK Ji CT> Cn EH tu «s 03 WW as -3- md a- it O ro U J ....... «u «aj r^ r- < 3 z o tfl Q W o Eh r« H o» Z r* D z w r»rr)^-r>-r«-ooinoo Ms T-T-iNrMfn^^ e> O i t i i i i i i i + o * omomoioomom 15 i- i- (M N C) "t ** to 10 o o H H m EH E-t o rt «d ID . 03 03 (N » «t Ot Cu CU C & ► H" S . o o «* M •" u u n cu o o IB « vo H H o o o Buki II . a a H 00 M M Z SO U to (O O O 5= S D H H M EH EH 03 =r < «* W II & m H H Bu X > > Pu M i i H M H Q a Q Q z o o H O o o to to H M H H cu cu Eh Eh Eh U a a <: *s kd < o o 03 03 03 03 03 03 D ID CD w m x y UC9HU M M •« «fl to «« CD CD «d «s M M M X CD CD CD M ■a; < «C to ». ffiwa, i H M M M M EH e» > :> CD O «S "* "S «* Z 66 DOCUMENTATION o o o © • • o in r« en IT) CN <7\ t"» en (N P0 • © H CM CTl CO CN -I T— CO ro cs) to \e r- CM Cn H M CO CN CO VO J Q i-» O in co CQ CO en r» en «8 o o o © to o o © © OS 55 04 • • • • o H a m t— © © M o CO CN © CM « 03 05 en CO vo r- w O C3 00 © CN in 05 CN «~ O H H H to D * o o © © w 04 o O © o H as as • • • • H «* in n a- f0 1 03 00 r» (■«• 00 1 1 H in it * en 1 1 h o ro O * to 10 m m ro m SB T* to EH CO T— CO *- O (7* W as H T™ ►J M H O « •» W S o o © O i-l • OS u> o o O O IH D o «s 05 • • • • W 04 as < CO en in in to O H f» \o r- 0> 04 « 03 R CO CO CO o o W a en © VO tf u M OS- 33 04 © en r~ en CO H es EH as o T— en «~ as M H T— W 03 > tx U X B (0 X w O w EH M II II CO u> H U B fa < w «1 04 04 o r~ * # en * * t" # * BEERS I. DESCRIPTION OF PROGRAM A. PURPOSE To separate grouped data into five parts. For instance, to obtain a single-year age distribution from a population given in 5-year age groups, or to obtain values for single years of age of the life table function 5 L . B. DATA NEEDED 1. The grouped data to be subdivided. 2. The number of groups plus one that will be subdivided. For instance, for a 5-year age group population distribution (0-1, 5-9. .., 65-69,70+) to be subdivided into single ages, the open age group 70+ will not be subdivided. Hence, the number of groups to be subdivided is 14, and the number to be used in this subroutine will be 15, that is the number of groups to be sudivided (14) plus one. IT. METHODOLOGY A. MATHEMATICAL DERIVATION Beers calculated these coefficients by using a fourth degree polynomial function which gives an osculatory interpolation. Two successive interpolation curves are joined so that they have a common ordinate, tangent and radius of curvature for a certain pivotal point. There are three sets of coefficients. Each set utilizes five 5-year age groups. Two sets are for breaking down the first two and the last two 5-year age groups. The third set is for breaking down the central 5-year age groups. For instance for obtaining the population at age x from a central 5- year age group the formula is P x " C 1 ,x * 5 P x-10 + C 2,x * 5 P x-5 + °3,x ' 5 ? x + C ^,x ' 5 P x+5 + °5,x * 5 P x+10 where P is the population at age x. P is the population in age group x,x+4. C J is the BEERS 1 coefficient for P i,x These coefficients are: For Ag e Groups Single Ages 0-4 5-9 10-14 15-19 20-24 .3333 -.1636 -.0210 .0796 -.0283 1 .2595 -.0780 .0130 .0100 -.0045 2 . 1924 .0064 .0184 -.0256 .0084 3 .1329 .0844 .0054 -.0356 .0129 4 .0819 . 1508 -.0158 -.0284 .0115 67 68 DOCUMENTATION b) For the second 5 -year age group For Age Groups Single Ages 0-4 5-9 10-14 15-19 20-24 5 .0404 .2000 -.0344 -.0128 .0068 6 .0093 .2268 -.0402 .0028 .0013 7 -.0108 .2272 -.0248 .0112 -.0028 8 -.0198 .1992 .0172 .0072 -.00 38 9 -.0191 . 1468 .0822 -■.0084 -.0015 c) Fcr any central 5-year age group For Age Groups Single Ages x-10,x-6 x-5,x- 1 x,x+4 x+5,x+9 x+10. X -.0117 .0804 .1570 -.0284 .0027 x+1 -.0020 .0160 .2200 -.0400 .0060 x+2 .0050 -.0280 .2460 -.0280 .0050 x + 3 .0060 -.0400 .2200 .0160 -.002 x+4 .0027 -.0284 .1570 .0804 -.0117 For breaking down the two oldest 5-year age groups, the coefficients for the two youngest 5-year age groups are reversed. Reference H. S. Beers, "Six-Term Formulas for Routine Actuarial Interpolation," Record of the American Institute of Actuaries, Vol. 34, June, 1945. B. CCMHENTS This subroutine can be used for obtaining single year distributions a) from 5-year age groups of populations, b) from a 5 L column of a life table and/or the ^ column of a life table, c) to estimate annual values of a particular variable given in 5-year intervals, etc. Nevertheless, when grouped data distributions have strong fluctuations from one group to the next, the resultant single ages or fifths might not conform to an expected behavior. This also could be the case for subdividing deaths in age group 0-4 into single ages or for separating the 5 L X and 5 d x function of the life table. Also, it should be remembered that the subroutine will separate into five parts the first grouped data assuming that such group is the first one of a distribution. Therefore, in a particular case, in which single ages are desired cnly for ages between 10 and 49, it would be better to include age group 0-4 and 5-9 as well as 50-54 and 55-59 so that the age groups 10-14 and 45-49 are separated into single ages without considering them as extreme age groups of the population. III. H A I N PROGSAH A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL BEERS (P, NP5, NP 1 , P1) BEERS 69 For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the main program. Por this subroutine both variable names P and P1 in the argument string are arrays. The following DIMENSION statement must be included in any main program using this subroutine. DIMENSION P(99) ,P1 (491) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package PREER* ♦This subroutine is not called by the subroutine BEERS, used only by a main program. Library functions Ncne Card Diagram of main program and subroutines. It is / / / CARDS INDICATING END OF DECK / / /I / INPOT DATA / J / /I I / / COMPOTER CONTROL CARDS / | | / / I I/ / /I I / / SUBROUTINE PBEER / | | / / 7 1 I / / SUBROUTINE BEERS / | | / / / I 1/ / /I I / / MAIN PROGRAM / | | / / / I 1/ / /I I / / COHFUTER CONTROL CARDS / | | / I / BEGINNING OF DECK I / 1/ / / 70 DOCUMENTATION C. FORMAT REQUIREMENTS POR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given belov. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1-4 5 6-8 9 10 11-80 1-8 9-16 7 3-80 IV AL NP5 NXT Blank Label used to identify the output Blank The youngest single year of age of the population to be subdivided. The number should end in column 4. Blank The number of groups to be separated into five parts plus one. The number should end in column 8. Blank The code indicating if there is another data set following this one. A zero in column 10 indicates this is the last set of data. Any other digit punched in column 10 indicates that another set of data follows this one. Blank The first group to be separated into five parts. It should have a decimal point somewhere in the eight columns. The second group to be separated into five parts. It should have a decimal point somewhere in the eight columns. The tenth group to be separated into five parts. It should have a decimal point somewhere in the eight columns. Note: P can have any number of values between 6 and 99. The number of cards to be used depends on the number of values given. There are 10 values on each card, so, the number of cards tc be used can be from 1 to 10. IV. S0BR00TINE A. SOBROOTINE STATEMENT All external subroutines begin with the word SOBROOTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE BEERS (P, NP5, NP1, P1) B. DESCRIPTION OF ARGUMENTS BEERS 71 Name NP5 NP1 P1 How Obtained Transferred In Transferred In Transferred In Transferred Out Definition Grouped data that is to be separated into five parts. If there is less than five groups the subroutine will write out error message number 0221 and return to the calling program. This subroutine has been written assuming that most of the time the subroutine will be used for separating 5-year age groups con- taining an open-end group. For this reason, the argument P always includes the open-end group, although it is not considered for separating the grouped data into five parts. The open-end group is later transferred out as the last group of the subdivided distribution. For grouped data which has no open-end group, it is necessary to assume an open-end group which would be "zero". Number of groups to be subdivided plus one. For instance, if there are 16 5-year age groups to be separated into single ages, this argument should be 17. Notice in this example that it is for 16 5-year age groups and the usual open-end group is not counted. The open-end group also will be trans- ferred into P but will not be separated into single ages nor should be counted as a group for determining NP5. The value of NP5 must be greater than five. If NP5 is not greater than five, the subroutine will write out error message number 0221 and return to the calling program. Number of subgroups obtained from the grouped data plus cne. For instance, in a population distribution of 5-year age groups from age to age 69 with an open-end group 70+, NP 1 will be 71. In general NP1=5xNP5-«. If NP1 is not egual to 5xNP5-U, the subroutine will write out error message number 0222 and return to the calling program. Results of separating the grouped data into five parts - there will be NP1-1 subgroups plus the last NP1 value which will be the last open-end group. The lastNPl value is the same as the last value in P. C. ERROR MESSAGES 0221 *** BEERS EPROR NO. 0221 — INP0T EBROR IN VARIABLE NP5 *** THE NUMBER OF GROOPS TO BE SPLIT OP HOST BE GREATER THAN 5 AND LESS THAN 100. 0222 *** BEERS EBROR NO. 0222 — INPOT ERROR IN VARIABLE NP 1 *** THE NOHBER OF S0BGH00PS (NP1) DOES NOT EQOAL 5(NP5-«) *** IF NF5=XXX, THEN NP1 SHOOLD EQOAL 1111 72 DOCUMENTATION V. F F G R A M AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c _ . c C BAIN PROGRAM FOR BEERS AND PBEER SUBROUTINES c c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY THREE C READ STATEMENTS. THE DATA CARDS ARE RELATED TC EACH OF THE READ C STATEMENTS AS FOLLOWS, C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE PIRST READ STATEMENT IS TO READ IN THE LABEL C TO BE USED TO IDENTIFY THE OUTPUT. THIS LABEL WOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED C IN COLUMNS 2-53 OF THE CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURFOSE OF THE SECOND READ STATEMENT IS TC READ IN (1) THE C YOUNGEST SINGLE YEAR OF AGE (IVAL) OF THE DISTRIBUTION TO BE C SUBDIVIDED, (2) THE NUMBER OF GROUPS (NP5) TO BE DIVIDED INTO C SUBGROUPS PLUS ONE, AND (3) THE CODE (NXT) INDICATING IF THERE IS C ANOTHER DATA SET FOLLOSING THIS ONE. C IVAL IS LOCATED IN COLUMNS 1- U, ENDING IN COLUMN H. C NP5 IS LOCATED IN COLUMNS 6-8, ENDING IN COLUMN 8. C NXT IS LOCATED IN COLUMN 10. A ZERO PUNCHED IN COLUMN 10 INDICATES c THIS IS THE LAST DRTA SET T0 BE SPLIT. IF ANY OTHER VALUE c Is PUNCHED IN COLUMN 10, ANOTHER SET OF DATA FOLLOWS THIS ONE. C C THE THIRD READ STATEMENT USES AT LEAST ONE DATA CARD. C THE PUFFOSE OF THE THIRD READ STATEMENT IS TO READ IN THE DATA (P) C TO BE SEPARATED INTO FIVE PARTS BY USING EEERS MULTIPLIERS. c p Is CONTAINED ON AT LEAST ONE CARD. EACH VALUE OF P MUST BE c LOCATED WITHIN EIGHT COLUMNS, STARTING WITH THE FIRST EIGHT c COLUMNS. A MAXIMUM OF TEN P VALUES CAN APPEAR ON EACH c CARD, ENDIN3 IN COLUMNS 8, 16, 24, ... ,80. IF MORE THAN c ONE DATA CARD IS NECESSARY, THE DATA SHOULD BE ENTERED ON c EftC H ADDITIONAL CARD IN THE SAME MANNER AS ON THE PREVIOUS c CARD. THE LAST P VALUE WILL NOT BE SPLIT. USUALLY c THIS VALUE WILL BE AN OPEN-ENDED GROUP. IF THE LAST VALUE c GIVEN SHOULD BE SPLIT THEN AN ADDITIONAL VALUE IS REQUIRED. C A ZERO MAY BE GIVEN FOR THIS VALUE. c c . DIMENSION P(99), P1(H9 1) NFEAD=1 NPRNT=15 6 READ (KREAD,3) FEAD(NREAD,1) IVAL, NP5, NXT READ(NPEAD,2) (P(I) ,1 = 1, NP5) WRITB (NPRNT,4) WRITE(NFRNT,3) NP1=5*NP5-tt CALL BEERS (P ,NP5,NP 1 ,P1) IF (NP1 - 99) 10,10,20 10 CALL PBEER(P,NP5,NP1,P1,IVAL) 20 CONTINUE IF (NXT) 5,5,6 5 STOP 1 FORMAT(I1, IX, 13, 1X,I1) 2 FOFHAT(10F8.0) 3 FORMAT (1X,52H ) 4 FORMAT(1H1) END BEERS 73 B. COMPUTER LISTING FOR SUBROUTINE c c SUBROUTINE BEERS (P,NP5,NP1, P1) c C PROGRAM NO. 0220 c C THF INPUT ARGUMENTS TO THIS SUBROUTINE ARE P, NP5, AND NP1. C THE OUTEUT ARGUMENT FROM THIS SUBROUTINE IS PI. c p IS THE GROUPED DATA TO BE DIVIDED INTO SUBGROUPS (INCLUDING AN C OPEN-ENDED LAST GROUP WHICH IS NOT SUBDIVIDED) . C NP5 IS THE NUMBER OF GROUPS IN P. C NP1 IS THE NUMBER OF GROUPS TN PI. c P1 xs THE OUTPUT OF SUBGROUPS. THE LAST GROUP IN PI IS SET C EQUAL TO THE OPEN-ENDED LAST GROUP IN P. c c DIMENSION P(99), P1(491) NPRNT=15 C c C VERIFICATION OF INPUT ARGUMENT VALUES c C NERR=0 IF (NP5 - 99) 22,3,1 22 CONTINUE IF (NP5-6) 1,3,3 1 NEBR=1 WRITE (NPRNT,2) 2 FORHAT( /58H *** BEERS ERROR NO. 0221 -- INPUT ERROR IN VARIABLE *NP5 ,/,90H *** THE NUMBER OF GROUPS TO BE SPLIT MUST BE GREATER TH *AN FIVE AND LESS THAN ONE HUNDRED.) 3 NR=5*NP5-U IF (NP1-NR) t,6,U « NERR=1 WFITE(NPRNT,5) NP5,NR 5 FOFMAT ( /57H *** BEERS ERROR NO. 0222 — INPUT ERROR IN VARIABLE * NP1,/,71H *** THE NUMBER OF SUBGROUPS (NP1) DOES NOT EQUAL 5 (NP5 *) - l» IF NP5 = ,13, 24H, THEN NP1 SHOUID EQUAL , IU) 6 NB1 = NI5-1 DO 8 1=1, NM1 IF (P(I)) 8,7,8 7 WRITE (NPRNT,9) 8 CONTINUE 9 FOFMAT( /50H *** BEERS WARNING -- INPUT WARNING IN VARIABLE P,/, *U7H *** AT LEAST ONE GROUP TO BE SPLIT EQUALS ZERO) IF (NEFR) 11,11,100 C c C DETERMINATION OF WHICH SET OF EQUATIONS ARE TO BE USED c C 11 K=1 GO TO 50 10 K-K+1 IF (K-3) 60,70,20 20 CONTINUE IF (K-NP5+2) 70,80,90 30 H=N + l» DO 40 1 = 1, M «0 P1 (I)=P1 (I)/10000. P1(N + 5)=P(NP5) GO TO 1000 C c C EQUATIONS FOR SPLITTING THE FIRST GROUP INTO FIFTHS. c c 50 P1(1) = 3333*P(1) -1636*P(2) -0210*P(3) + 0796*P (4) -0283*P (5) P1(2) = 2595*P(1)-0780*P(2) +0130*P(3) *0100*P(«J) -00«5*P (5) P1(3) = 192«*P(1) +006«»*P(2) +018«»*P(3) -0256*P(U) ♦008U*P(5) F1 (*4) = 1329*P(1) +08UU*P(2) +005a*P(3) -0356*P («»)+0129*P(5) P1(5) = 0819*P (1) + 1508*P(2)-0158*P(3) -028a*P(«l) +0115*P(5) GO TO 10 74 DOCUMENTATION C c C EQUATTCKS FOR SPLITTING THE SECOND GROUP INTO FIFTHS. c C 60 P1(6) = 0404*P(1) +2000*P(2) -03«H»*P(3)-0128*P(4)+0068*P(5) P1 (7) = 0093*P(1) +2268*P(2) -0402*P (3) +0028*P (U) +0013*P (5) P1 (8) =-0108*P (1)+227 2*P(2)-0248*P(3) +0112*P(fl) -0028*P(5) P1(9) = -0198*P(1) +1992*P(2) +0172*P (3) +0072*P(U) -0038*P(5) P1 (10)=-0191*P(1) + 1<*68*P(2) + 08 22*P(3)-0084*P(4)-0015*P(5) GO TO 10 C c C EQUATIONS FOR SPLITTING THE MIDDLE GROUPS INTO FIFTHS. c C 70 N=5*K-U P1(N) =-0117*P(K-2) +080tt*P(K-1)+157 0*P(K)-0284*P (K+1) +0027*P (K + 2) P1 (N+1) =-002 0*P(K-2) +0160*P(K-1)+2200*P(K)-0U00*P(K+1)+0060*P(K+2) P1 (N + 2) = 0050 *P (K-2)-0 280*P(K-1) +2460*P (K) -02 80*P (K+1) +0050*P (K+2) P1 (N + 3) = 006 0*P(K-2) -0«00*P (K-1) + 2200*P (K) +0160 + F (K + 1) -0020*P(K + 2) P1 (N+t») = 0027*P(K-2) -0 284*P(K-1) + 1570*P (K) +0804*P (K+ 1)-0 1 17*P(K+2) GO TO 10 C c C EQUATIONS FOR SPLITTING THE NEXT-TO-LAST GROUP (DISREGARDING THE C OPEN-ENEED LAST GROUP) INTO FIFTHS. c _ C 80 N=5*K-«» P1 (N) =-0015 *P (K-3) -0084*P (K-2) + 08 22*P(K-1) + 1U68*P (K) -0191*P (K+1) P1 (N+1)=-0038*P (K-3) +0072*P (K-2) + 0172*P(K-1) +1992*E(K) -0198*P (K + 1) Pl(N + 2)=-0028*P(K-3) *0112*P(K-2) -0248 *P (K-1) +2272 *P (K) -0108*P (K+ 1) P1 (N+3) = 0013*P(K-3) +0028*P(K-2) -0U02*P (K- 1) + 2268*P (K) +0093*P (K+1) P1 (N + H) = 006 8*P (K-3)-0128*P (K-2) -03«i»*P(K-1) +2000*P(K) +0404+P (K+1) GO TO 10 C c C EQUATIONS FOR SPLITTING THE LAST GROUP (DISREGARDING THE OPEN-ENDED C — LAST? GROUP) INTO FIFTHS. C c 90 N=5*K-a P1(N) = 0115*P(K-4) -0284*P (K-3)-0158*P(K-2) +1508*P(K-1) +0819*P(K) P1 (N + 1) = 0129*P(K-U) -0356*P(K-3) +005<**P (K-2) +08 « in 2 £ oo vn E E C O O ^ £ S o- r- S X g — <*% g ^ ; S s " " " £ O «% ~ o-. £ K I s - -- C \D ^ ° in IT, o oo e tn o- CM •*> O t> s CM OO s O- '*> t> CM »^ m ~- u> s S u> s s ■£> u> I s - P-- o 3 O 3 •o o» m S I s - «» 2 o- r-. s 1ft 2 3 0« — m ct- *> S t0 o- s CM S tr- CVI n% €Ti CM S s s s s 5 s £ CM a- £ I s - s s ;i- vs o 0o s s o *• Oj i O- a s CM o- — r-^ 0O K 5 — o- P- -_. s sO K s K> ITk — CM 7. CM S s CM S ^-^ S 3 o 3 o 3 s i» 0» 0- o cn m 3 z CM Oo 3 ; * NO fl f\ CL o cc ft M * -0 «r * vS o — oo r> o o 3 z o o 3 s I s - o- vS o- o CM Or f 3~ oc CM o~ 3 3 cs m o «T> Cl -. Ct *? 3 3 tn -J- •— CM UJ 3 3 •^ 3 Sr » 3 5 LU en ; en 5 3 O- cm 0- 0- o -— ec 3 o- Q= VS> CM 3 8 vS M» -~ I s - cc — UJ S 10 UJ * sS ai 5 o — CM vB CM UJ a o UJ vj> — - in » — ' vS m s S i- *- — UJ CM £ *• l*\ s en > en bsr c/> z 3 U4 1 UJ " U4 s -1 o Oo 0- o» Ln O -j n o -1 o- 0o 2 3 cr CVI m «% o- CE s or CM s S S 00 CM r- m 2 CM S s OO S O CM s s I s - w> I s - o M 3- ™ I s - — *n s s Gr 00 VS ~ 3- — or s oo cm in nS s R M in 4- CM O rr^ »-« R in i-i 3- fi a z in ■z. s 2 s c> — X Oo l*» in — > s r^v > O —. s s r> oo — s — ' =1- t^ — ~ :-> s oo r> vS — ■ 5 s o "s 1 00 CO I s - o 3 s i cm o- - CM o- UJ V* i S" 1 CM 1 0o o- s 2 i r- en * CM O fCi i 2 I s - 1 U-, a s i UJ CC i 2 1 2 s i -i i 5 1 a s Z ln — a: vS o- CO o- 2 S Ln 2 cc ~ in CC CM CM 2 n -J oo — z d- «>. Ui CM -J s oo -1 I s - -- a S rs — OC — . u. — => — s =s o 2 ». a. CO Q-. <^ Q- ^ « o 0» ro Or , O O- 3- C= — O ^ o- o o— •n ■a ■» I s - O O in I s - lr> CM •n Q£ in J- I s - O * o I s - o o m t ™ o~ o — o- J- rc» a: — — o- m O a> o — « r. •— — — £ — o. — — — N - - - -J! a o «- •» O ■» c t\l I- or cj> "g «n C a J w a o « a •o a ■o w a V s . s . ~5 Ci w a ti ■o e CM (- Hi v> € i. Q ■J 4- «r c CM -T5 •< «. > I-. Ul c CO i- Uj c CO U» 76 DOCUMENTATION CO oa w H Cn M En o\vo ,- (Ji3 , rn(NiDoo ooir-vcm^mfNi-oovcor- \omc< or-cNposriDvor-ooo^or-cNfoa-in o 55 M CO KldO ffl W N h O d |T| »- «- 00 (N CO P> e000vO^O**CO(>»vOf-.CNt-CMVOia co inoNCO©voooiu">ooa-cocNOfMO>infNC^VOf r lrO OOOM/iafflfONNi-r-f- to 03 W W eo 03 to 33 H Cm B cMr-vDtnvosf{Nco\ceoi*-r^ v oo , i< r )*ino>a-cft t-r~CN»vccn J 3 , «-t*-' T >cr>vo\©fNir>meo{Svo©f r > o > >r~-ir)ar(«.\oina'(MT" or-Nn*^nor-«)*o«-(Nmjfinior«oOffi a-a-a-a-a-^jj-a-Ji-^-iDinioinminmminin H «s Q a w a. D o 15 cr>a-a>3'cr>^-cr>^cr>a'criiJ'cri» »-T- M Q « h «s e-t <* a a W cu D O OS a-citf' r icn' r >\oco T ~coc>ir*»©*eo' T )r'COrovo inaJ , r-incr>r~-inin' v ic")in3'*en©»-cr>cKenco ciacMfii-ovCfiooDvo^NOooMnrotNo cndeococot^r~p*f^vovo\Ovo v ''inmirimmi/*) o r "(s |, )»tf)«>r>cBc^or-N' T iatnver-ooa CNfNI(N Cm D H O o to O E-< 1 1 W w 1 i-4 to 1 U< SB X] +J o «i (0 M to r- H ►J 9 D o o O vomt^o^cvicNcoeomjj-cocovor-ininroincN ui*o>romco fr 'coa>ooa , mmT-©fr)»nvD»nm «-ooococr>roCNir)^coif)' _ roo>Ot-a , \or~eo T-OOfflCOfflhiOiOiniflinaSnNNrr-O N(NNrrrrrrrrfrrrrrri-r OTS(r)*if»»Or-eodO'-Nf r l9lflvOt v IBa< BEERS 77 invcr-< T >'~r , »op~a , or»av 10 ce na H ■-3 & H h-l P in \o t^ co en orNiri * in vot» co en © tf>vevovov©r*p-p"-t'*»r»r~r^f*f~r--oo En O &< ti a Q Q W p o cc C3 I I I I I I I I I I I I I I I r-t-fNCN^fO^-:* in m vo v£> f» r^ CO 03 w « 03 N 03 in 32 Eh fa M fa O Eh 35 H as o > H O « M Eh fa «e CT*S'CN»-r* r " r, '>^'0OCNf>^-f r >©ir> rr >*v£>CN* 0(N«Nomo3r^' r >r^oo |, Of T ioooD»-r-^-(Ni-CTi r»r s -r~i*"r~r~t , *^-t*i^r"r^t^p'vo v Ovcvovovo ^•a-^-^a-inmininminminininvovovovcvo 0> CM v© t- ^ r-C\|T-»£>COS'T-r-CQi/ , )inS , in en r«i cn , f>3'(r)ovf>m©vo CNVCt'^0D < ' > © r " r- in (n «- * rnr^r-intN«-3-tN\o*■< r»in«-\eo'-a-p»s»-c) • ••••••• oo moo^vcfNp^m^-fNin rOir OrindlO h inf)i- 01**NO00 r-t-T-cnT-o© w mmmm***3-*c) mflmNNON tc r 0O(N » ONi- Eh ;fP0VO«~VC»-r- PM »- CN CO <*"> D ♦ H o o a 03 i i i I i i i in W m © m © m o m PS r-NN HWtf » u EH Crt Pm 0< «B D o < 03 6H O p H 8 a «t M Oh 03 D X O pa 03 X o o ooj © ao vo «- r~ "" in m cNin^o m in *- © * f cr>t^ so cm in in cm oo in *- en oo vo c~i^r»i^-vovovoinm in vOf~oo en © r- r>j po ^ I in © . . . . t in ^■©T-ror'-cn3-(N I (N f)9\M aoN©»- o r- r- ■ T- H tn Pu a- as in >« o Ol 03 o 85 H o • o ^, « ^ M H SO CM M H CO CN CO Ml t- O «* w H 03 00 in P3 03 O O •* « > M o K pa © W SB H H o • 10 V) CO « « O 00 n O B c* w 05 00 CO 03 EH CN ** W H •J r- en Eh CM w D tn © h4 CM © «S as H o E M CO • in P3 1 o 00 H i eh % m SB in o H «- to t* m > (N Cm as 00 D CN D M O © O » OT pa D m «" 1 . xs O © cn EH 1 o 03 © M 1 SS Pm Ml • V) 1 o CO S3 m H r> J= o O CS P 00 +> H « w CM Cft a- fcH 03 PQ as o «S w n H © ►J w as ^ D W M li cu oc P3 o pa w M H in i- CM H 03 W CM Cm CO E-i 03 cm as as o r- # * c* * * *• * « co in co © cr> r* oo 00 io to co in c* co © ^■^ c* © 00 t— i"i H o m cs com D © oo r» m a CM «- tn as W w co CQ tn 33 Eh Pu M tu O Eh © © © © © O cN co ^ in vo r» Q o H a to w 43- CT> ST O H Cm *■• t" > O + H o © Q P3 1 1 1 1 fN O © in © tn P3 T- T- B Pm <* < Eh «! o o pa CM D O 03 O © © © © © © vo r- oo ©\ © r- © © © © © © © «- cn en a m 80 DOCUMENTATION CT*< T >aoO*v0^^jfr<' r >00 o ^ on oop»r«-vo ifivovDr»© © ON t- vO in* CI rMr-OONoor^v©if>ON to 03 U H f-S eu M >-) D + o«-CMfi^mvo(\oooiOi-(>i(na'm ^. a- (9 as H W o IB MBS P3 COPfl < «4 N ts 1-t as to to *iJ OS >*> W D W SEOl n MM *■* WH V) IBM M Hh> ►J SEOi << 03OT m «a * w OS n H H SB oo M cue > SB D HO. O D OT 1 O t I w t* 1 o PM 1 to V) | SBN SB MS" JS o StsO ♦» H OS 1/) t-i «H •« at v> Hi < D V) w Pi KM O » 0< pal* m <* o r» * • o> * * r- * • SB D O « oofio o>* Nr« op oci <- ^co 9 40D h« f» CM *- (N VO vo ooo>ooovooo>moo a- co cmcm *~ © ovoor- , " - r"- VO «~ SO vo fi po a-da ui3o>a o«9o\9ot a- on a- i i i i i i i i i I i I i i I ou-ioinou-iOinoinoinoin© ^-»-CNfNi T i c>a , a , «ftini©vot"» (0 05 w H CO X OQ 10 as PM o p so H O H 10 P3 w E-" lb «s «s < o Q M Cm B O OS w »- r- oo m r~ r~ o> ©roma-t-r-fNffr^r^m on m ffaciff»(Nt-o\a , (Np>fft* , ">o T '0'-ui(N VCOVO «~ rovO 00 ooOT-NOOf^lOrNJONCOCM f»-r- mvor>ia-mvo( , oooifi' T i' _ ^ - »» » CIN t I I f (NC) nrnlNNN NN ©l-rNjr0a , U">VOr-0DON©»— CN|<"la'in\Cr--00ON n">vocOT-ooc\ir s '©*cornr~'Cc>< r ivot^©co4 r-inm (Npomss* a'ONOi-oiONONOooN'nin i— o» o»©rr>oo»cMT- «m aoNOco©ooNO*cN©oor- u "><' r > r, i©ooNCin a^a 1 r»r»r^r^vovovovovoinif)inif)ir>ina-3 , a- a- »• ©r-rMPoa , invop^eoON©«-roo(M^o>*o > ior rrir-ooor-vDin^n'^fMN'-'-oo^ooo ao oo CNjCNCN«-»-r-»-N-.-«-t-»-»-«-«- ©r-cNma-uivor^oooor-cNfria-invor^ooo^ BLT I. DESCRIPTION OF PROGRAMS A. PURPOSE To calculate a Coale-Demeny regional model life table for both sexes combined, given a life expectancy at birth for both sexes combined, a region (north, south, east, west) of the model life tables, and the sex ratio at birth. The subroutine accepts the Coale-Demeny differential by sex of the life expectancy at age 10 for calculating the life table for both sexes combined. B. DATA NEEDED 1. Life expectancy at birth for both sexes combined. 2. Sex ratio at birth. 3. A region from the Coale-Demeny model life table system. II. METHODOLOGY A. MATHEMATICAL DERIVATION Since the Coale-Demeny regression coefficients which relate e°_ with g are separated by sex, the subroutine must first estimate the life expectancies at birth for males and females which combine to produce the life expectancy at birth for both sexes combined. The subroutine assumes that the Coale-Demeny assumptions of the sex differential in life expectancy are applicable to the country being analyzed. The estimate of female life expectancy at birth is made by a linear interpolation and an iterative process as follows. For the interpolation, pivotal levels of female life expectancy at birth and the corresponding life expectancies at birth for both sexes combined are used. 1 3 _ 1 . i 2 -K e bs " e bs e f - 6f + (e f - e f ) • — — e, - e, bs bs where i o e' and e* are the pivotal values of female life expectancy at birth 1 2 e t and e, are the corresponding pivotal values of bs bs life expectancy at birth for both sexes combined e is the value of life expectancy at birth for both b s sexes combined given as input, and o e;; is the new estimate of female life expectancy at birth. 81 82 DOCUMENTATION The initial pivotal values of female life expectancy at birth are given by ej = .667 + 1.107 e bs 2 _ 1 / 1 v e f " e f " (e bs " e bs } The values of life expectancy at birth for both sexes combined corresFcnding to a given female life expectancy at birth is calculated by first using subroutine HLT to calculate the male life expectancy at birth and then calculating the both sexes life expectancy by i = K ' e m + e f (2) e bs 1 + K where K is the sex ratio at birth and e . e c , and e, are the m f bs male, female, and both sexes life expectancies at birth respectively . 3 3 With the estimate of e, calculated in formula (1), a value of e, f bs can be calculated using formula (2) . This value of e is compared with bs e , the value of life expectancy at birth for both sexes combined bs 3 given as input. If | e, - e, | > .0004, an iteration is made in D s bs 3 12 3 1 formula (1). e. will replace e r or e. and e t will replace e, or r rrbs bs o e depending on which of the two both sexes life expectancy is furthest bs from e, . bs The iterative process is repeated until l e, - e, I < .0004. 1 bs bs ' — Once this is achieved, the q x 's for the both sexes combined life table are computed from the q ' s for the underlying male and female regional model life tables by the formula bs _ n*x K • m + f 1 + K where bs m f n'V and n^x are V s f0t the fe male life table respectively. Subroutine ELT is then used to complete the life table from the q ' s. BLT 83 E. COMMENTS In generating the life table, this program assumes the sex differential in mortality implicit in the Coale-Demeny tables. IIT.M AIN PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL BLT (SRB,EO,NREG, EOF, EOM, BSMLT) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single- valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine, variable name BSMLT in the argument string is an array. The following DIMENSION Statement must be included in any main program using this subroutine. DIMENSION BSMLT (18,8) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package a . ML T \ b. ELT C. GTCON 2. Library functions Ncne 84 DOCUMENTATION 3. Card diagram of main program and subroutines. CARDS INDICATING END CF DECK / / INPUT DATA COMPUTER CONTROL CARDS SUBROUTINE GTCON SUBROUTINE ELT / SUBROUTINE MLT /I / I /I I ._/ I I /III/ / I I 1/ /III/ / I I 1/ /III/ ./ I I t/ SUBROUTINE BLT /III/ ._ / III/ MAIN PROGRAH /III/ __/ I I 1/ COMPUTER CONTHOL CARDS /III/ / I I 1/ I I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAH GIVEN IN SECTION V.A. The card format requirements for the main program included with this subroutine package are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 5«-80 1 2 3-7 8-13 14 15-80 NXT SRB EO NREG Blank Label used to identify the output Blank The indicator used to signal if there is another set of data following this one. A zero in column 1 indicates this is the last data set. Any other number indicates there is another set of data following this one. Blank The sex rate at birth. The value should be entered so that the decimal point is in column 4. The life expectancy at birth for both sexes combined. The value should be entered so that the decimal point is in column 10. The Coale-Demeny region to be used for generating a both sexes life table. A 1 punched in column 14 indicates west region, a 2 indicates north region, a 3 indicates east region, and a CO •o s g R £ £ £ £ £ C ie £ £ IS £ 1C S 2 s " " £ s ~ ~ c £ is ° e 2 s 2 u> 5 s <£ S s s S s s S s s 3 3 3 •j> s S <*> s S 3 3 3 s g o 5 s S S S s K R K £ £ £ s 15 £ s 2 S s 5 8 a K s £ S s S a 3 3 3 3 3 3 5 5 5 * 3 3 S 3 *r 3 3 ^ 3 3 3 3 •T 3 3 1 3 3 § ° s s S s o s S R r- R R £ o- S $ X — s s ' s 3 K s s S H s ^ s Z s 3 s lu ° S R > R s S ■=> s N R o s s <*> en 3 s £ M s S c~ 3 s s o s iq s u. 8 SI s s a g m s s s -i 2 2 2 en 2 2 a CC 5 S s h- s 2 2 Q: s £ *» Ul *- O 2 2 2 u. 1ft 0: *- 2 2 2 M *-S C: d- ~ 2 3 -1 CM UJ VJ9 2 Z 2 • . s 2 o> >c O UJ r- o> ^ « Ul VS -4 — • - - vO vn Q. *■ - a, a- H LO w u> "• ar o 1- o >» ^ « h- • -1 d- ' t n o — => • m n N CQ S — M M - — « - 1 . -6 « e CM "15 c -8 C i£a!l 5 "«~ 5 b 20 where rb is the average number of children ever born to women in age group (x,x+4) . 93 94 DOCUMENTATION From the age-specific fertility rate pattern, the cumulative fertility pattern up to ages 20, 25, ...,50 can be calculated as: CF = £ P0. 5 3=15,5 5 J where P0 is the pattern of the age-specific fertility rate for women 5 j in age group (j,j+*») ; and CF is the cumulative fertility pattern up to age x+5. The method calculates factors for adjusting the cumulative fertility pattern (CF x+ 5 ) to the level of fertility implied by the average number of children ever born ( b ) . J X These factors are calculated with the help of an age-specific fertility rate model distribution. The model uses a function with a fixed shape but with the possibility of determining the mean for each particular case. This function is f (x) = C • (x - s) • (s + 33 - x) 2 for s < x < s + 33 (1 ) where f (x) is the fertility rate of women aged x years, s is the starting age of the reproductive period and C is a constant. The function f (x) is taken as zero when x is outside of the age interval s to s+33. The starting age of childbearing is calculated as s = m - 13.2 where m is the mean age of childbearing. By integrating the function (1) from s to a particular age t, the cumulative fertility up to that age can be obtained. The integral is F(t) = I f (x) dx i j- (s +33 - x) 4 -11 (s+33 - x) 3 l Therefore an annual 5-ryear age-specific fertility rate for the age group i,i+5 will be .f. = -1- [F(i+5) - F(i)] BRASF 95 Similarly, by integrating F(x) between two particular ages and dividing by the aqe interval, the mean number of children ever born per woman in the age interval is found. 1 f 1 KC. = - J -' I n i n j. _ jl r_u n |_ * i+n F(x) dx i (s + 33 - x) A - -Jq- (s + 33 - x) 5 i+n Adjustment factors for each age group can then be calculated as MC - F(x) _2 3£ 5 K x - _f 5 x and the adjusted average cumulative fertility will equal r ACF = CF + C K • r P0 5 x x 5 x 5 x Finally, the age-specific fertility rate pattern can be corrected by either of the two following options Option I: -P0 • 5 'x 5 b 20 5 ACF 20 Option II: /*'- _P0 • 5 x 5 b 25 5 ACF 25 where Jl is the corrected age-specific fertility rate for age group x,x+4 according to Option I; 9 is the corrected age-specific fertility rate for age group x,x+4 according to Option II; and r b and r ACF are as defined earlier 5 x 5 x References H. Brass, A. J. Coale, P. Demeny, D. Heisel, F. Lorimer, A- Eomaniuk, and E- Van De Halle, The Demography of Tropical Africa, (Princeton, Princeton University Press), Chapter III. Methods of Estimating Basic Demographic Measures from Incomplete Data, U.N. Manual IV, United Nations, New York, 1967, Chapter II and Chapter VII. B. COMMENTS The set or pattern of age-specific fertility rates given as input usually comes from the same census or survey as the data on children ever born. However, this is not necessary. The set or pattern of rates can be from other surveys or censuses or from registration data as long as the user believes that they represent the actual pattern of fertility. , 96 DOCUMENTATION The method assumes that fertility has been constant during the past 10-15 years. The method also assumes that both the fertility pattern given by the number of births per woman for the preceding year and the level of fertility per woman under age 30 given by the number of children ever born are accurate. In censuses and surveys where there is possibly extensive age misreporting, the fertility pattern and children ever born per woman could be biased and hence the results of this method would be guestionable. III.M AIN PBOGBAH A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL BRASF(KASFR,KAGE, F, P, ASFR) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine variable names F, P, and ASFR in the argument string are all arrays. The following DIMENSION statement must be included in any main pro- gram using this subroutine. DIMENSION F (7) ,P (7) ,ASFR (7) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package None 2. Library functions None BRASF 97 3. Card Diagram of main program and subroutines. / / / CARDS INDICATING END OF DECK / / 7 1 / INPUT DATA / | / 7 1 i / / COMPUTER CONTROL CARDS / | | / / 7 1 I / / SUBROUTINE BRASF / | | / / 7 1 i / / MAIN PROGRAM / | | / / 7 1 i / / COMPUTER CONTROL CARDS / | | / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this subroutine package are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1 NXT NWRIT KASFR Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. Any other number punched in column 1 indicates another set of data follows this one. The code indicating if the results of the subroutine are to be printed out. A zero punched in column 2 indicates that the results are not to be printed out. If any ether number is punched in column 2, the results will be printed out. The code which indicates whether the age-specific fertility rates based on the correction factor for age group 20-24 or for age group 25-29 are trans- ferred back to the calling program. If a 1 is punched in column 3, the fertility rates based on the correction factor for age group 20-24 are transferred back. If a 2 is punched in column 3, the fertility rates based on the correction factor for age group 25-29 are transferred back. 98 DOCUMENTATION 4 1KAGE 5-80 1-7 8-14 43-49 50-80 The code indicating whether the data on births during the preceding year are tabulated by age of woman at the time of the survey or by age of woman at the time of the birth. & 1 punched in column 4 indicates that the age tab- ulated was at the time of the survey. A 2 punched in column 4 indicates that the age tabulated was at the time of the birth. Blank Average number of births in the pre- ceding year per woman in age group 15-19. Average number of births in the pre- ceding year per woman in age group 20-24 Average number of births in the pre- ceding year per woman in age group 45-49. Blank Seven columns are allowed for each F value. The values should be entered so that the decimal points are in columns 3,10,17,24,31,38 and 45. 1-7 8-14 43-49 50-80 I | Average number of children ever born I per woman in age group 15-19 I I Aver age number of children ever born I per woman in age group 20-24 | Average number of children ever born | per woman in age group 45-49. I I Blank Seven columns are allowed for each P value. The values should be entered so that the decimal points are in columns 3,10,17,24,31,38 and 45. IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE BRASF (KASFR, KAGE, F, P,NWRIT, ASFR) BR ASF 99 B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition KASFR KAGE NHRIT ASFR Transferred In Transferred In Transferred In Transferred In Transferred In Transferred Out Indicates which set of fertility rates will be out from this subroutin then the age-specific f based on the correction aqe group 20-24 will be If KASFR is 2, then the fertility rates based o factor for age group 25 transferred. If KASFR value, the subroutine w error message number 02 the calling program- Indicates whether birth ceding year were tabula the age of the mother a survey or at the time o If KAGE eguals 1, the d according to age at the KAGE eguals 2, the data according to age at the If KAGE equals any othe routine will write out number 0282 and return program. Average number of birth ceding year per woman f age group between ages seven values, one for e age group (i.e., 15-19, 49) . If any of the val or greater than 0.5, th will write out error me and return to the calli that occur to women und combined with births to Births that occur to wo should be combined with aged 45-49. age- specif ic transferred e. If KASFR=1, ertility rates factor for transferred. age-specific n the correction 29 will be has any other ill print out 81 and return to s during the pre- ted according to t the time of the f the birth, ata were tabulated survey date; if were tabulated date of the birth, r value, the sub- error message to the calling s during the pre- or each 5-year 15-49. There are ach 5- year 20-24,..., 45- ues are negative en the subroutine ssage number 0283 ng program. Births er age 15 should be women aged 15-19. men over age 4 9 births to women Average number of children ever born per woman by 5-year age groups between ages of 15-49. There are seven values, one for each 5-year age group (i.e., 15-19, 20-24, 25-29,..., 45-49). If any of the values are negative or greater than 10, then the subroutine will write out error message number 0284 and return to the calling program. Code indicating whether the results of the subroutine should be printed out. NWRIT=0 indicates the results of the subroutine should not be written out. If NwRIT eguals any other number the results of the sub- routine will be written out. The adjusted age-specific fertility rates as calculated by the subroutine. 100 DOCUMENTATION C. EEBOR MESSAGES 0281 *** BRASF NO. 0281 — INPUT EEBOR IN KASFR, *** THE KODE FOR THE CORRECTION FACTOR MOST BE EITHER 1 FOR AGE 20-24 OR 2 FOR AGE 25-29. 0282 *** BRASF EBBOR NO. 0282 — INPUT EBBOR IN KAGE, *** THE SELECTOR CODE FOR AGE OF FEMALES GIVING BIRTH MOST BE 1 FOB THE TIME OF THE SUEVEY OB 2 FOR THE TIME OF BIBTH 0283 *** BRASF EBROB NO. 0283 — INPUT EBBOB IN B, *** AT LEAST ONE VALOE FOR THE AVEBAGE NUMBEfi OF BIRIriS IS NEGATIVE OR GREATER THAN .5 0284 *** BRASF ERROR NO. 0284 — INPUT ERROR IN P *** AT LEAST ONE ELEMENT OF THE NUMBER OF CHILDREN EVEB BORN IS LESS THAN ZERO CB GREATER THAN TEN. 0285 *** BRASF ERROR NO. 0285 *** RATIO B (1)/B(2) IS BEYOND RANGE 0.036 TO 0.939 *** RATIO=X.XXX V. PROGRAM AND RESULTS A- COMPUTEB LISTING FOB MAIN PROGRAM c c C MAIN PROGRAM FOR BBASF c c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN FOUR BEAD C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRS1 BEAD STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE C INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET C FOLLOWING THIS ONE, (2) THE WRITE INDICATOR (N WRIT) WHICH C DETERMINES WHETHER THE RESULTS OF THE SUBBODTINE BRASF SHOULD BE C WRITTEN OUT, (3) A CODE (KASFR) WHICH DETERMINES WHETHEB THE C AGE SPECIFIC FERTILITY BATES BASED ON THE P/F BATIO FOR AGE GBOUP C 20-24 OR FOR AGE GROUP 25-29 ABE TRANSFERRED BACK TO THE C CALLING PBOGBABM, AND (4) A SELECTOB(KAGE) WHICH INDICATES C WHETHER THE WOMEN GIVING BIRTH DURING THE LAST YEAR REPORTED C THEIR AGE AS OF THE TIME OF THE SURVEY OR AS OF THE TIME OF C THE BIRTH. C NXT IS IN COLUMN 1 OF THIS CARD. A ZERO IN COLUMN 1 INDICATES c THIS IS THE LAST DATA SET . ANY OTHER NUMBER IN COLUMN 1 c INDICATES THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. C NWRIT IS IN COLUMN 2 OF THIS CARD. A ZERO IN COLUMN 2 INDICATES c THAT THE RESULTS OF THE SUBROUTINE BBASF ABE NOT TO BE c PBINTED OUT. FOB ANY OTHEB NUMBER IN COLUMN 2 THE RESULTS C OF 1HE SUBROUTINE BRASF WILL BE PRINTED OUT. C KASFR IS IN COLUMN 3 OF THIS CARD. A 1 INDICATES THAT THE C AGE-SPECIFIC FERTILITY RATES BASED ON THE P/F RATIO FOR AGE C GROUP 20-24 ARE TRANSFERRED BACK TO THE CALLING PROGRAM c THROUGH THE ARGUMENT STRING. A 2 IN COLUMN 3 INDICATES THAT c THE BATES BASED ON THE P/F RATIO FOR AGE GROUP 25-29 ABE c TBANSFEBBED BACK. IN EITHER CASE, BOTH SETS OF AGE-SPECIFIC c FEBTILITY BATES ARE CALCULATED AND PRINTED OUT IF NWRIT IS C NOT EQUAL TO ZERO. C KAGE IS IN COIUMN 4 OF THIS CARD. A 1 IN COLUMN 4 INDICATES c THAT THE AGE REPORTED WAS AT THE TIME OF THE SURVEY. A 2 c IN COLUMN 4 INDICATES THAT THE AGE REPORTED WAS AT THE TIME c 0F BIRTH. C BRASF 101 c THE PURPOSE OF THE THIED BEAD STATEMENT IS TO READ IN THE AVERAGE C NUMBER OF BIRTHS (F) IN THE PRECEDING YEAR OCURRING TO FEMALES C AGE 15-49 BY FIVE YEAR AGE GROOPS. c F VALUES ARE ON ONE CARD- FOR EACH F VALUE SEVEN COLUMNS ARE C ALLOWED STARTING ilTH THE FIRST SEVEN COLUMNS OF THE CARD. c E& CH VALUE SHOULD BE ENTERED SO THAT THE DECIMAL POINTS C WILL BE IN COLUMNS 3, 10, ..., 38, AND 45. C c THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE C AVERAGE NUMBER OF CHILDREN EVER BORN (P) IN FIVE YEAR AGE GROUPS c F OR FEMALES 15-49. c p VALUES ARE CONTAINED ON ONE CARD. FOR EACH P VALUE SEVEN C COLUMNS ARE ALLOWED STARTING WITH THE FIRST SEVEN COLUMNS C OF THE CARD. EACH VALUE SHOULD BE ENTERED SO THAT THE C DECIMAL POINT WILL BE IN COLUMNS 3, 10, , 38, AND 45. c c r ~. DIMENSION F(7) ,E(7) , ASFR (7) NPBNT = 15 NREAD = 1 10 READ(NREAD, 11) 11 FORMAT(1X,52H ) READ (NREAD, 22) NXT ,NWRIT ,KASFR,K AGE 22 FORMAT (411) & READ(NREAD,33) (F (I) ,1=1,7) 33 FORMAT (7F7. 3) READ (NREAD, 33) (P (I) ,1 = 1,7) WRITE (NPRNT,44) 44 FORMAT(1H1) WRITE(NPRNT,11) $ CALL BRASF (KASFR, KAGE,F, P, NWRIT, ASFR) IF (NXT) 10,20,10 20 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE BRASF (KASFR ,KAG E,B, P, NWRIT, ASFR) c c , C PROGRAM NO. 0280 c C KASFR, KAGE, F, AND P ARE INPUT ARGUMENTS. C ASFR IS AN OUPUT ARGUMENT C KASFR DETERMINES WHETHER THE AGE-SPECIFIC FERTILITY RATES BASED c 0N THE p/ F BATIO FOR AGE GROUP 20-24 OR FOR AGE GROUP c 25-29 ARE TRANSFERRED BACK TO THE CALLING PROGRAM. C KAGE INDICATES WHETHER WOMEN GIVING BIRTH DURING THE LAST YEAR C REPORTED THEIR AGE AS OF THE TIME OP THE SURVEY OR AS OF c THE TIHJE 0F THE bveNT. C B IS THE AVERAGE NUMBER OF BIRTHS IN THE PRECEDING YEAR OCURRING c T0 FEMALES AGES 15-49 BY FIVE YEAR AGE GROUPS. c p IS THE AVERAGE NUMBER OF CHILDREN EVER BORN IN FIVE YEAR AGE C GROUPS FOR FEMALES 15-49. C NWRIT IS THE WRITE INDICATOR WHICH DETERMINES WHETHER THE C RESULTS OF THIS SUBROUTINE WILL BE PRINTED OUT. C ASFR ARE THE AGE-SPECIFIC FETILITY RATES FOR FIVE YEAR AGE C GROUPS FOB FEMALES AGE 15-49. c c DIMENSION B(7) # P (7) ,ASFR (7) DIMENSION FCUM{8) ,FMODL (7) ,FAVG (7) ,WK (7) ,PHI (7) , SIGMA (8) , * F(7) ,PIFI(7) # ASFRX (7 ,2) ,B1B2 (8) ,N AGE (2,7) NPRNT= 15 C c C VERIFY INPUT ARGUMENT VALUES C C NERR= IF (KASFR-1) 11C,120,100 100 CONTINUE IF (KASFR-2) 110,120,110 110 WRITE (NPRNT, 111) 102 DOCUMENTATION 111 FORHAT (/,1X,48H*** BRASF ERROR NO. 0281 — INPUT ERROR IN KASFR, */#1X,89H*** THE CODE FOR THE CORRECTION FACTOR HOST BE EITHER 1 FO *R AGE 20-24 OR 2 FOR AGE 25-29.) NERR= 1 120 CONTINUE IF (KAGE-1) 140,150,130 130 CONTINUE IF (KAGE-2) 140,150,140 140 WRITE (NPRNT,222) 222 FORHAT (/,1X,47H*** BRASF ERROR NO. 0282 -- INPUT ERROR IN KAGE, */, 1X,118H*** THE SELECTOR CODE FOR AGE OF FEHALES GIVING BIRTH HUS *T BE 1 FOR THE TIHE OF THE SURVEY OR 2 FOR THE TIHE OF BIRTH.) NERR= 1 150 DO 170 1=1,7 IF (B(I)) 160,170,155 155 CONTINUE IF (B(I) - 0.5) 170,170,160 160 WRITE S 3 2 TJ 3 u> 2 | 3 S S S £ s ffi 3 s 3 8 K E; s 3 3 1^ 3 3 s S 3 ST 3 s K S 8 r s s S 's s tn O -» o "~ O ~ 5 9 ? 3 3 3 — - o — o - 3 3 3 CM a- Q CM *- u- CM a- 5 ° S — o -i — o co — o S S 3 . •-* • - er . 3 3 S M> :n v> CK •-9 5; S £ O CD 3 3 3 a- * * 3* 3- 3- 3 3 « •« w> 1- TO >o Oc. TO «n S 3 — vO ee — o O — vS 3 3 in u> S 2 a t- v» o f>> vS s 2 a -1 0» l-» >- CO t^ o. Co l>» s a s M W> vi CO >n M) z m >S s s s »- •u •■> —1 f*> s 2 s u. »- -1 — s S s CO — <£ CA — ex OB CM s S s IA CM cj -I CM CM CM CM 8 2 (Tl V) CO CM => CP «M z 00 •n s ». 2 cc CD CM >o M CM - 2 2 a 0L . in oc t«> in a 2 2 - « ««> > M» f«> i» * K> in n » 3 — o — 3 in <-> ■« c evi ■» "■* 5 o 3- J "T5 5 « CJ "5 CO ■g # a- i e» co w O CO * J- en <4 >— Ul en •« * CO CM CO Q.. o o o o o o o n) O M"> 91 O CO co cm © * vo co o\ vo m o r^ cm cn cm OCSOCNINr-O t t • t • t • o o o o o o o to cn in in co ro vo r» O o co «~ m •* o en blih eo vo r» vo r~ vo r- \ EH ^ © © o o o © Oj «a t • • t t • t 03 »- i- t- t- f- t- «- a 3 H W (0 63 hi a. < w © 10 «~ f en B S3 P W « 10 Q aa ►-» EH H « to H O PO Oh Cm o O to as P4MH Eh H CO «* CO 13 S3 SO D H B as E-t aa to 63 WW15 hJ CO « H X < 05 H IH « M 03 M W > M M > *fl Am H 4 H P to m as as 10 63 o «SS 03 Q CO 04 P4 o to o< •* H CO SB «* H Ph B CM SB W B Ph O W O 03 OQ ^ P Oh >-i m -• CO > o w o HHX W Pl, H HHH mUlH^ DMHCQ ^ Cl, H w Q to 03 «S i w SNh D t9 4 U 03 M > a o to to a 03 oa rCOIflNOWO *- en ro r- «n vo o • ••■9ft o o cn <*) a- in vo CO *" ** VO af I* 1 * »• a- o cm r- in <- co ft) in CN vO vO S3* 1- • • i t t • i © r- H 03 63 P 10 H X H EH 03 W IM P4 > H EH •S ►J a v B u p M E^ •S aa H H to PO to Oh B o Oh O W «4 ►-3 s EH «fl 33 EH M EH O 03 «S w X o as H P M as U 03 w o 03 CO Oh 03 U> W as > H H OS to s as H P M 03 03 H CO P CO to a EH H to OS D3 • H U P n J Pd H Ph O 03 O u to 03 M « M EH H n co 4 4 co s s a b W H b as tD H as «< to m w M t9 IH cs *a n X 14 BS EH « W p H W > M tl> < EH H < M H p Hi ea as as EH B w o «a (a n Ph to "« p H pa P4 T) B co c •* o>«a a'ro' , o to**) OCNrocN 9 r> m a- n 63 — ©CNcncncvlt-O C0 H 03 H p X to ©cooivomnr* eh O vOCNOvfOr^T-^" H phh cn«- <, iocnr~cN _3 \EH r- CN *- r- © o © H CK Ml t Cri 03 «- «- •" t- ^- t- «- 03 63 Ph W X > H hh vocNincNinvoc^ eh h3 ~ r- vo cn m r>> cn oo 4Hh r-vOt-CnvTiPOOO ►4EH** ©cocNinr^vocn B03 . • t . t t , S3 ca ©ocNro*min B Ph u as as os PHO eOrrlOSh"- 03 co — , *orv)Mni-u> P Oh POinCNVOVOa''- ^03— T-omcncN©»- MM #•••••• 03> ©r-CNPOinvOvO U H u P H X Ph" Ph Eh Eihh cn o co n a - * o nUh)^ a-r-CNooooco CMHCQ vO< r )00in'-CNCN *? Oh EH — • O CN CN CN CN r- © Q CO CO • t • t i • • «H I 63 OOOOOOO 33 63 Ph B O 63 > H EH «* >-) B S3 B u p w EH < xc H H to P4 to Oh B o 03 u> 63 u> h3 *4 03 £ ov j3- cr> a- cn * cn ^t r- CN CN PO ro ar a- < 1 1 1 1 1 1 1 m o m © in © m to EH t- cn cn cn m * a 63 EH O BRASF 107 B3 e< OS H CO H ■ H EH H as H 05 • O SB fa 04 H CN 'X 03 •B O as EH X 1 M 03 04 CN 1 05 S in m co • 04 CN 04 SB 03 04 BO 04 U> EH to 03 < fa EH O 05 O 03 O O 04 03 fa 09 EH < 04 CN H EH 04 05 SB 05 C3 t O H S3 03 33 EH » EH O 03 -3 W ^- < co o «- 13 Cfl M CO CO < oa fa CN «~ CQ SB SB o *- 05 03 • • O EH co O O 10 fa CO D H CQ *■ SB co Efl 05 W o »- 05 BB EH > CN * M EH 05 04 T- o a 03 H i t EH H CO as O VO H CO w 05 W fa 05 Dm 04 CJ> O a * a- (0 W O SB H rn m *c n <« H 03 04 H T- V£> M fcj > fa 03 CN CN H H CO u • t SB V) SB CJ> SB 3C SB o m M S H m a H fa S3 CO SB o fa 05 05 04 03 03 m \o CO O 05 05 3 O 04 S3 CO l*» -1 03 O 03 U in vo n 05 E-l 03 S 05 < 05 03 r- o> n M (J w m 04 05 04 S3 i i «C fa fa D O ro M H fa EH EH S- H SB «~ o s S fa S < B fa a. sc Oi o fa fa 04 CO o SB O SB SB 04 SB 33 CN CM CO H H H W H 33 H fcH 00 o) m CO 03 05 04 04 a- CO 05 O 05 O 05 SB 05 SB EH CN CO •O 03 O Cl, O EH o o O O a » * U O 05 05 U 05 05 fa vo D * * # * * ♦ * * O * * * * * * * * w « * * * * « * # BRASM I. DESCRIPTION OF PROGRAM A. PURPOSE To estimate the level of infant and child mortality, based on tabulations of the averaqe number of children ever born and the averaqe number of children surviving, by aqe of mother. B. DATA HEEDED 1. Averaqe number of children ever born per woman for each 5-year aqe qroup between aqes 15-49 (i.e., 15- 19, 20-24,. .., 45-49) . 2. Averaqe number of survivinq children per woman for each 5-year aqe qroup between aqes 15-49. 3. In this technique, multiplyinq factors are used for convertinq the proportion of children ever born who are still survivinq into survival rates from birth up to a particular aqe x. The factors necessary in each particular case are from a table, based on the averaqe number of children ever born for aqe groups 15-19 and 20-24 and on the mean aqe of the fertility schedule. Hence, if available, the mean aqe of the fertility schedule should be qiven. If the mean aqe of the fertility schedule is not known, a code indicating this must be qiven. (See options 1 and 2 in section II. A below.) 4. For each survival rate from birth to aqe x, the Coale-Demeny model life table with the same survival rate is computed and the life expectancy at birth of that life table is qiven as output. Therefore, a model life table reqion must be qiven. II. METHODOLOGY A. MATHEMATICAL DERIVATION The subroutine is based on the method developed by William Brass. When- ever a census or survey carries a question on children ever born and children surviving, an estimate of child mortality can be made. For each 5-year aqe qroup of females in childbearinq aqes, the complement of the ratio of survivinq children to children ever born is the proportion of children who have died. Q n = 1 x 5 B y where 5 SB are the surviving children reported by mothers aqe y,y+4; 5 B are the children ever born reported by mothers y,y+4; and is the proportion not survivinq from birth up to an aqe x. Dnder model conditions, the proportion of non-survivinq children reported by mothers in the aqe qroups 15-19, 20-24, 25-29, 30-34, 35-39, 40-44, and 45-49, can be used to approximate the probability of children dyinq before the 1st, 2nd, 3rd, 5th, 10th, 15th, and 20th birthday respectively. That is, the proportions of non-survivors can be used for estimatinq the q of a life table. Brass has provided factors for obtaininq such q values. x o 3 x^o 109 110 DOCUMENTATION For this purpose the table provided below gives the factors for transform- Q into q . The factors are obtained by either of two options: x o x o Option 1: mean aqe of fertility schedule (m) is qiven The factors for the aqe qroups 15-19, 20-24 and 25-29 are obtained by inter- polatinq the table presented below accordinq to the particular value of 1^ 5 B 20 The factors for the remaininq_aqe qroups are obtained from the same table, but by interpolatinq hetween two m values in the table according to the particular value of the mean aqe of the fertility schedule pertaininq to the population. Option 2: mean aqe of the fertility schedule is not qiven For all aqe qroups, the factors are obtained by interpolatinq in the table for the actual value of K. For both options, the interpolation qives a set of correction factors for each particular x q Q such that ' = °"' " c q x Q ' x f where f is the value interpolated from the table for the particular age z. By usinq the q values, a set of ^ values can be obtained for x = 1,2,3,5,10,15,20. For each ^ value, a Coale-Demeny model life table with the same 1 value is generated. The life expectancy at birth for each of these life tables is qiven as output. BRASM 111 Table of Multiplying Factors for Estimating the Proportion of Children Born Alive Who Die by Aqe x -- ^j — From the Proportion Dead Amonq Children Ever Born Reported by Women Classified in 5-year Aqe Intervals Mortality Exact limits Multiplying factors to obtain y$ (col. 1) from measure of aqe estimated interval of proportion of children reported as dead by women in the (1) women indicated aqe qroup (col. 2) for the followinq values of (2) K and m. m — 24.7 25.7 26.7 27.7 28.7 29.7 30.7 3.7 K = .387 .330 .268 .205 . 143 .090 .045 .14 1% ••• 15-20 .859 .890 .928 .977 1.041 1.129 1.254 1.425 fo '•• 20-25 .938 .9 59 .983 1.010 1.043 1.082 1.129 1. 188 3 q o ••' 25-30 .948 .962 .978 .994 1.012 1.033 1.055 1.081 5 q o •" 30-35 .961 .975 .988 1.002 1.016 1.031 1.046 1.063 10 q o '•• 35-40 .966 .982 .996 1.011 1.026 1.040 1.054 1.069 15 q o ••• 40-45 .938 .9 55 .971 .988 1.004 1.021 1.037 1.052 20% •" 45-50 .937 .953 .969 .986 1.003 1.021 1.039 1.057 Reference W. Brass, A.J. Coale, P. Demeny, D. Heisel, F. Lorimer, A. Bomaniuk, and E. Van De Walle, The Demoqraphy of Tropical Africa, Princeton University Press, Princeton, 1973, chapter III. United Nations, Methods of Estimating Basic Demographic Measures from Incomplete Data, Manual IV, New York, 1967, chapter II and chapter V. B. COMMENTS "The Brass method of estimating mortality enables the analyst to construct the survival function of a life table up to early adult ages. The conditions that would make this computation accurate are: "(1) The age specific fertility schedule has been approximately constant in the recent past (at least for the younger women) , and the approximate form of the schedule is known; "(2) Infant and child mortality rates have been approximately constant in recent years; "(3) There is no powerful association between age of mother and infant mortality or between death rates of mothers and of their children; "(4) Omission rates of dead children and of surviving children are about the same in the reported numbers ever born; "(5) The age pattern of mortality among infants and children conforms approximately to the model life tables. "Because age one to pe tality direct On the other based on the who have died effects of th The estimates various sourc three. Becau developed cou table value e perience over of the sensitivity of the estimate of the proportion dying before culiarities or defects in the data the estimate of infant mor- ly derived by this technique does not justify much confidence, hand, estimates of child mortality up to older childhood ages reports by older women of still-living children and of children are especially subject to reporting errors and also to the e possibly different mortality levels in the more distant past. that appear to reflect the best chance of minimizing error from es are those for the proportion dying before age two and age se of the prevalence of falling death rates in many of the less ntries in recent years, it should be borne in mind that the life stimated by these procedures represents the average mortality ex- the preceding four or five years in the determination of the 112 DOCUMENTATION proportion dead before the second birthday, and in the precedinq six to eight years, in the estimate of proportion dead before the third birthday ... "ihen the potential sources of bias are considered, it is evident that the estimation of child mortality by this procedure tends almost always to err on the low side, if the estimate is not accurate. The presumption of bias in this direction is based on a -judqment that respondents are much more likely to omit from a summary of their experience to date children who have died than those who have survived." (United Nations, Methods of Estimating Basic Demoqraphic Measures from Incomplete Data, 1967, pp. 35-36). III. MAIN PROGRAM A. REQUIREMENTS The main proqram is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main proqram can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writinq main proqrams using mora than one sub- routine see the Appendix. 1. CALL statement Once the main proqram has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main proqram. This communication process is made throuqh the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL BRASM (P, S ,EMBAR , NREG, N WRIT, XQO, COREO) For the purpose of amphasizinq the input arquments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be sinqle-valued or refer to a qroup of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main proqram. For this subroutine variable names P,S,XQ0, and COREO in the arqument strinq are all arrays. The follow inq DIMENSION statement must be included in any main proqram usinq this subroutine. DIMENSION P(7) ,S(7),XQ0(7) , COREO (7) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION BITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this packaqe a. GTCON b. ELT 2. Library functions ABS (absolute value) BRASM 113 3. Card diaqram of main program and subroutines / CARDS INDICATING END OF DECK / / / / INPUT DATA /I / " CO MPUTiR~CONTfiOL ~CARDS~" "~?| I / / I I / SUBROUTINE GTCON /| J | / / III/ / SUBROUTINE ELT /III/ / / III/ / SUBROUTINE BRASM /III/ / / III/ / MAIN PROGRAM /III/ / / III/ / COMPUTER CONTROL CARDS /III/ / / III/ I I / BEGINNING OF DECK I 1/ I / 1/ / / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this subroutine packaqe are as qiven below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1-5 6 7-11 12 3b 37-41 42-80 Blank Label used to identify the output Blank Averaqe number of children ever born per woman in aqe qroup 15-19. Blank Averaqe number of children ever born per woman in aqe qroup 20-24, Blank Blank Averaqe number of children ever born per woman in age qroup 45-49. Blank Five columns are reserved for each P value. The values should be entered so that the decimal points are in columns 2,8,14,20,26,32, and 38. 1-! I lAveraqe number of survivinq children per Iwoman in aqe qroup 15-19. I IBlank I 114 DOCUMENTATION 7-11 12 • 36 37-41 42-80 lAveraqe number of survivinq children per Iwoman in aqe qroup 20-24 I I Blank I i I | Blank I JAveraqe number of survivinq children per Iwoman in aqe qroup 45-49. I I Blank Five columns are reserved for each S value. The values should be entered so that the decimal points are in columns 2,8,14,20,26, 32 and 38. 1-5 10 11 12-80 EHBAF: NEEG NWRIT NXT The mean aqe of the fertility schedule. The value should be entered with the decimal point in column 3. If the mean aqe of the fertility schedule is unknovn, the number 1.0 should be punched in columns 1-5 with the decimal point in column 3. Blank The code indicatinq which Coale-Demeny reqion is beinq used to qenerate the life expectancies at birth. A 1 punched in column 7 indicates west reqion, a 2 north reqion, a 3 east reqion and a 4 south reqion. Blank The code indicatinq whether or not the results of the subroutine are to be printed out. A zero punched in column 9 indicates the output will not be printed. If any other number is punched in column 9 the output will be printed. Blank The code indicatinq if there is another data set followinq this one. A zero punched in column 11 indicates that this is the last set of data. Any other diqit punched in column 11 indicates another set of data follows this one. Blank IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument strinq enclosed in parentheses. This subroutine beqins as follows: SUBROUTINE BRASM (P ,S,EMBAR ,NR EG, NMRIT ,XQ0,CORE0) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition I ITransferred In | Average number of children ever | born per woman for aqe qroups 15-19 I20-24,... ,45-49. All values of P | must be between and 10. If P has I any other value, error message number BRASM 115 EMBAR NREG NWRIT XQO COREO Transferred In Transferred In Transferred In Transferred In Transferred Out Transferred Out 0311 will be written out and the sub- routine will return to the callinq program. The ratio of the first P value to the second P value must be between 0. 014 and 0.387. If it is not, error messaqe number 0315 will be written out and the subroutine will return to the calling program. Average number of surviving children per woman for age groups 15-19, 20-24, ...,45-49. All values of S must be between and 10. If S has any other value, error message number 0312 will be written out and the subroutine will return to the calling program. Mean age of the fertility schedule. EMBAR=1.0 indicates the mean age of the fertility schedule is unknown. If EMBAF does not egual 1.0, it must be within the range 24.7 to 31.7. If EMBAR is not within that range, error message number 0314 will be written out and the sub- routine will return to the calling program. Region from the Coale-Demeny model life table system being used. NREG=1,2,3,4 indicates respectively the west, north, east and south region. If NREG equals any other value, error message number 0313 will be written out and the subroutine will return to the calling program. Print option. If NWRIT=0 the output will not be printed. If NWRIT eguals any other number, the output will be printed. Estimated proportion of children dead by aqe x. Life expectancy at birth corresponding to XQO and the specified Coale-Demeny model life table region. If a life expectancy at birth is not between 20.0 to 80.0, error message number 0317 will be written out and the subroutine will return to the calling program. C. ERROR MESSAGES 0311 *** *** BRASM ERROR NO. 031 1 - - INPOT ERROR IN VARIABLE P NUMBER OF CHILDREN EVER BORN MUST BE BETWEEN 0.0 TO 10.0 0312 *** • ** BRASM ERROR NO. 0312 - - INPUT ERROR IN VARIABLE S NUMBER OF CHILDREN SURVIVING MUST BE BETWEEN 0.0 TO 10.0 0313 *** *** 0314 *** *** BRASM ERROR NO. 0313 - - INPUT ERROR IN VARIABLE NREG CODE INDICATING THE COALE-DEMENY REGION MUST EQUAL 1,2, 3, OR 4. BRASM EREOR NO.0314 - - INPUT ERROR IN VARIABLE EMBAR MEAN AGE OF THE FERTILITY SCHEDULE MUST BE BETWEEN 24.7 TO 31.7 OR EQUAL TO 1.0 INDICATING NOT KNOWN 0315 *** BRASM ERROR NO. 0315 - - INPUT ERROR IN VARIABLE P *** RATIO P(1)/P(2) MUST BE BETWEEN 0.014 TO 0.387 0316 *** BRASM ERROR NO. 0316 - - PROBABLE INPUT ERROR *** IMPOSSIBLE TO ESTIMATE LIFE EXPECTANCY (CHECK INPUT) 0317 *** BRASM ERROR NO. 0317 - - PROBABLE INPUT ERROR *** PROPORTION DEAD (XQO) CORRESPONDS TO A LIFE EXPECTANCY BEYOND THE COALE-DEMENY RANGE OF 20.0 TO 80.0 116 DOCUMENTATION V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR BAIN PROGRAM c _ c C MAIN PROGRAM FOR SUBROUTINE BRASH c . c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY FOUR C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS, C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL c T0 BE USED TO IDENTIFY THE OUTPUT. THIS LABEL WOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED c IN COLUMNS 2-53 OF THE CARD. C C ■ — THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN THE AVERAGE C NUMBER OF CHILDREN EVER BORN (P) PER WOMAN IN THE SEVEN FIVE-YEAR C AGE GROUPS 15-19, 20-24, ... , 1+5-49. c p IS CONTAINED ON ONE CARD AND IS ENTERED WITH THE DECIMAL c POINTS IN COLUMNS 2,8,14,20,26,32 AND 38. C C THE THIRD READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE AVERAGE c NUMBER OF CHILDREN SURVIVING (S) PER WOMAN IN THE SEVEN FIVE-YEAR C AGE GROUPS 15-19, 20-24, ... ,45-49. c s IS CONTAINED ON ONE CARD AND IS ENTERED WITH THE DECIMAL c POINTS IN COLUMNS 2,8,14,20,26,32 AND 38. C c THE FOURTH READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN (1) THE C MEAN AGE CF THE FERTILITY SCHEDULE (EMBAR) OR THE VALUE 1.0 IF THE c HEAN AGE OF THE FERTILITY SCHEDULE IS UNKNOWN, (2) THE CODE c INDICATING WHICH COALE-DEMENY REGION (NREG) IS USED TO GENERATE c THE LIFE EXPECTANCIES AT BIRTH, (3) THE CODE INDICATING WHETHER C OR HOT THE RESULTS OF THE SUBROUTINE ARE TO BE PRINTED (NWRIT), C AND (4) THE CODE INDICATING I? THERE IS ANOTHER DATA SET c FOLLOWING THIS ONE (NXT) . c EMBAR IS LOCATED IN COLUMNS 1-5 WITH THE DECIMAL POINT IN C COLUMN 3. IF THE MEAN AGE OF THE FERTILITY SCHEDULE IS NOT C KNOWN, 1.0 SHOULD BE PUNCHED IN COLUMN 3. C NREG IS LOCATED IN COLUMN 7. A 1 PUNCHED IN COLUMN 7 INDICATES C WEST REGION, A 2 INDICATES NORTH REGION, A 3 INDICATES C EAST REGION AND A 4 INDICATES SOUTH REGION. C NWRIT IS LOCATED IN COLUMN 9. A ZERO PUNCHED IN COLUMN 9 INDI- C CATES THE OUTPUT WILL NOT BE PRINTED. IF ANY OTHER NUMBER c IS PUNCHED IN COLUMN 9, THE OUTPUT WILL BE PRINTED. C NXT IS LOCATED IN COLUMN 11. A ZERO PUNCHED IN COLUMN 11 INDI- C ; — CATES THIS IS THE LAST SET OF DATA. IF ANY OTHER NUMBER c IS PUNCHED IN COLUMN 11, ANOTHER SET OF DATA FOLLOWS C THIS ONE. c c t DIMENSION P (7) , S (7 ) , XQO (7) ,CORE0 (7) NREAD=1 NPRNT=15 1 R£AD(NREAD,3) READ(NREAD,4) (P(I),I=1,7) READ(NREAD,4) (S(I) ,1=1,7) READ(NREAD,5) EMBAR, NREG, NWRIT, NXT WRITE(NPRNT,6) WRITE(NPRNT,3) CALL BR ASM (P,S, EMBAR, NREG, NWRIT, XQO, COREO) IF (NXT) 2, 2, 1 2 STOP 3 F0EMAT(1X,52H ) 4 FORMAT (F5. 3, 6F6. 3) 5 F0RMAT(F5.2,1X,I1,1X,I1,1X,I1) 6 FORMAT (1H1) END BRASM 117 A. COMPUTER LISTING FOP. SUBROUTINE SUBROUTINE BRASM (P,S ,EM BAR , NREG , NWRIT, XQO, COREO) (-■«.«.__*«.-. — _«.•«.-.-.-._ — _— — _-._-_—— — —-._— — — —-. — — — — ——-._—. — — — — — — —.•-.•.•. — — —• — — — — ——. — — — — —. c _ C PROGRAM NO. 0310 c c C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE P, S, EMBAR, NREG, AND C NHRIT. C THE OUTPUT ARGUMENTS FROM THIS SUBROUTINE ARE XQO AND COREO. c p IS THE AVERAGE NUMBER OF CHILDREN EVER BORN PER WOMAN FOR THE C — - — SEVEN FIVE-YEAR AGE GROUPS 15-19, 20-24, ... ,45-49. C S IS THE AVERAGE NUMBER OF CHILDBEN SURVIVING PER WOMAN FOR THE C SEVEN FIVE-YEAE AGE GROUPS 15-19, 20-24, ... ,45-49. C EMBAP. IS THE MEAN AGE OF THE FERTILITY SCHEDULE. EMBAR =1.0 c INDICATES THE MEAN AGE OF THE FERTILITY SCHEDULE IS UN- C-- KNOWN. C NREG IS THE CODE INDICATING WHICH REGION FROM THE COALE-DEMENY c MODEL LIFE TABLE SYSTEM IS BEING USED. C NWRIT IS THE PRINT OPTION. IF NWRIT = 0, THE OUTPUT WILL NOT BE c PRINTED. IF NWRIT EQUALS ANY OTHER NUMBER, THE OUTPUT C WILL BE PRINTED. C XQO IS THE ESTIMATED PROBABILITY OF DYING BEFORE AGE X. C COREO IS THE LIFE EXPECTANCY AT BIRTH CORRESPONDING TO XQO AND c mu SPECIFIED COALE-DEMENY MODEL LIFE TABLE REGION. c c DIMENSION P (7) , S(7), XQO (7), COREO (7) DIMENSION CONST (78), P1P2(8), FACTR(8,7), ALPHX(2,4), BETA(2), * NAGE(2,7), NX (7), FMULT(7), PD(7), SMLXC(7), SMLXL{2,7) DIMENSION SMLX5 (7) ,1IM(7) DIMENSION GOMST(78) , BON ST (78) , PON ST (2 ,78 ) ,ET (2) ,X(2) ,XP(2) DIMENSION QX (2,17) ,QXMX(18) ,XLT (18,8) EQUIVALENCE (CON ST (1 ) ,P1 P2 ( 1 ) ) , (CONST (9) ,FACTR (1 , 1 ) ) , * (CONST (65) ,ALPHX (1,1)) , (CONST (73) , BETA ( 1 ) ) NPRNT= 15 c C VERIFICATION OF INPUT ARGUMENTS c C 110 NER3= DO 140 1=1,7 IF (P(I)) 130,121,121 121 CONTINUE IF (P(I)-10.0) 120,120,130 130 WRITE (SPENT, 1 11) 111 FORMAT (//45H *** BRASM ERROR NO. 0311 -- INPUT ERROR IN P, * /,64H *** NUMBER OF CHILDREN EVER BORN MUST BE BETWEEN 0.0 TO * 10.0) NERR= 1 120 CONTINUE IF (S(I)) 135,141,141 141 CONTINUE IF (S(I)-10.0) 140,140,135 135 WPITE (NPRNT, 122) 122 FORMAT(//U5H *** BRASM ERROR NO. 0312 -- INPUT ERROR IN S, * /,64H *** NUMBER OF CHILDREN SURVIVING MUST BE BETWEEN 0.0 TO * 10.0) NERR=1 GO TO 150 140 CONTINUE 150 CONTINUE IF (NPEG-1) 160,166,166 166 CONTINUE IF (NREG-4) 165,165,160 160 WRITE (NPRNT, 222) 222 FORMAT (//48H *** BRASM ERROR tJO. 0313 -- INPUT ERROR IN NREG, * /,69H *** CODE INDICATING THE COALE-DEMENY REGION MUST EQUAL * 1, 2, 3, OR 4) NERR= 1 165 CONTINUE IF (EMBAR-24.7) 167,171,171 171 CONTINUE IF (EMBAR-31.7) 170,170,168 167 CONTINUE 118 DOCUMENTATION IF (EMBAR-.99) 168,172,172 172 CONTINUE IF (EMBAE-1.01) 170,170,168 168 WRITE(NPRNT, 169) 169 FORMAT (//49H *** BRASM ERROR NO. 0314 — INPUT ERROR IN EMBAR, */, 104H *** MEAN AGE OF FERTILITY SCHEDULE MUST BE BETWEEN 24.7 T *0 31.7 OR EQUAL 1.0 INDICATING NOT KNOWN) NERR=1 170 CONTINUE IF (NERR) 180,180,900 C c C PREPARATION OF AGE LABELS c C 180 DO 210 1=1,7 N= 10 + 5*1 NAGE (1 ,I)= N NAGE<2,I) = N + 4 IF (1-3) 190,190,200 190 NX(I) = I GO TO 210 200 NX(I) = N -25 210 CONTINUE C c C CALCULATION OF Q(O-X) c C CALL GTCON (3, 1 , 1, CONST) COREO (1) =0.0 DP= P (1) / P (2) DO 250 1=1,8 IM1= 1-1 IF (DP-P1P2(I)) 250,225,220 220 CONTINUE IF (IM1) 260,260,230 225 F1= 0.0 IH1= 1 GO TO 235 230 F1= (DP-P1P2(I)) / (P1P2(IM1)-P1P2{I) ) 235 DO 240 J=1,3 FMULT (J) = FACTR(IM1,J)*F1 + FACTR (I, J) * ( 1. 0-F 1) PD(J) = 1.0 - S (J)/P(J) XQ0(J) = PD(J) * FMULT (J) 240 SMLXC(J)= (1.0-X00(J)) * 100000.0 GO TO 252 250 CONTINUE GO TO 260 252 CONTINUE IF (EMBAF-.99) 253,256,256 256 CONTINUE IF (EMBAR-1.01) 254,254,253 253 R=EMBAR-23. 7 N=R AN=N F1=R-AN 254 N=IM1 DO 255 J=4,7 FMULT (J) =FACTE (N, J) *F 1+F ACTP (N+1 , J) * { 1-F1 ) PD(J)= 1.0 - S (J)/P(J) XQ0(J)= PD(J) * FMUIT (J) 255 SHLXC(J)= (1.0-XQO(J)) * 100000.0 GO TO 290 260 WRITE (NPP.NT,333) 333 FORMAT (//45H *** BRASM ERROR NO. 0315 — INPUT ERROR IN P, * /,56H *** RATIO P(1)/P{2) MUST BE BETWEEN 0.014 TO 0.387) GO TO 900 C c c CALCULATION OF CORRESPONDING LIFE EXPECTANCIES c C 290 CALL GTCON(1,1,NREG,GONST) CALL GTCON(1,2,NREG,BONST) DO 295 1=1,78 PONST(1,I)=GONST(I) BRASM 119 295 PON ST (2, D = BONST(I) LIM(1) = 1 LIM(2) = 2 LIM(3) = 2 LIM(4) = n 4. LIM(5) = 3 LIM(6) = 4 LIM(7) = 5 DO 350 I = 1, 7 ET(1)=35.0 DO 350 J=1, 2 ET(1)=ET (1) + 15.0 ET(2)=P0NST(1,75) + (ET(1) -PONST (1 ,76)) *PONST (1 ,77) /PONST ( 1,78) ILIH = LIB (I) DO 325 L=1,ILIM K = 4 * L-3 DO 325 N=1,2 X(N)=PONST (N,K)+PONST(N,K+1) *ET(N) XP(N)= PONST (N,K + 2) +PONST (N , K+3) *ET(N) XP(N)=10.0**XP(N)/10000. IF (XP(N)-X(N)) 310,320,330 330 CONTINOE IF (ET(N)-54.0) 320,320,340 340 QX(N,I)=XP(N) GO TO 1903 310 QX(N,I) = (X(N)+XP(N))/2. GO TO 19 03 320 QX(N,I)=X (N) 1903 CONTINUE IF (L - 1) 1905,1905,1901 1905 CONTINOE IF (N - 1) 325,325,1906 1901 CONTINUE IF (N - 1) 325,325,1907 1906 SMLX5 (1) =100000.0* ( (1.05* (1.0-QX (1,1) ) + (1 . 0-QX (2 , I) ) ) /2. 05) GO TO 325 1907 SMLX5(L) =SMLX5 (L-1) * ( (1 . 05* ( 1 . 0-QX (1 , I) ) + (1.0-QX (2,1) ) )/2. 05) 325 CONTINUE IF (I - 2) 1390,1397,1395 1395 CONTINUE IF (I - 3) 1397,1397,1399 1 390 CONTINUE SMLXL(J.I) = SHLX5(I) GO TO 350 1399 SMLXL (J, I) = SMLX5 (1-2) GO TO 350 1397 CONTINUE IF (SMLX5(1)/100000.-0.9) 1405,1405,1400 1400 ALPHA=ALPHX (I-1,NHEG) +BETA(I-1)* (SMLX5 (1 ) /1 00000. 0-0. 9) GO TO 1410 1405 ALPHA=ALPHX (I-1,NEEG) 1410 SMLXL (J,I)=ALPHA*SHLX5(1) + (1.0-ALPHA) *SHLX5 (2) 350 CONTINUE DO 491 1=1,7 ETEN1=50.0 ETEN2=65.0 SMLX1 = SMLXL(1,I) SMLX2 = SMLXL (2,1) 360 DO 460 J=1,15 IF (J-1) 308,308,309 308 CONTINUE IF (1-1) 309,309,375 309 ET(1) =ETEN1+ (ETEN2-ETEN1 ) * (SMLXC (I) -SMLX1 ) / (SHLX2-SMLX1) ET(2)=PONST (1,75) + (ET (1) -PONST (1,76) ) *PONST(1,77) /PONST (1,78) 375 KLIH = LIM(I) DO 380 L=1,KLIM K=4*L-3 DO 380 N=1,2 X(N) = PONST (N,K) +PONST(N,K + 1) *ET(N) XP (N)=PONST (N,K + 2) +PONST (N,K+3) *ET(N) XP (N) = 10. 0**XP (N) /1 0000. IF (XP(N)-X(N)) 371,372,373 373 CONTINUE IF (ET(N)-54.0) 372,372,374 374 QX(N,I)=XP(N) GO TO 899 371 QX(N,I) = (X(N)+XP(N))/2.0 120 DOCUMENTATION GO TO 899 372 QX(N,I)=X(N) 899 CONTINUE IF (L-1) 905,905,901 905 CONTINUE IF (N-1) 380,380,906 901 CONTINUE IF (N-1) 380,380,907 906 SHLX5 (1) =100000. 0* ( ( 1. 05* (1 . 0-QX (1,1) ) + (1 .0-QX (2, I) ) )/2.05) GO TO 380 907 SMLX5(L)=SMLX5(L-1)*((1.05*(1.0-QX(1,I))*(1.0-QX(2,I)))/2.05) 380 CONTINUE 370 CONTINUE IF (1-2) 390,397,395 395 CONTINUE IF (1-3) 397,397,399 390 SMLX=SMLX5(I) GO TO 420 399 SMLX=SMLX5(I-2) GO TO 420 397 CONTINUE IF (SMLX5(1)/100000.-0.9) 405,405,400 400 ALPHA=ALPHX(I-1,NK£G)+BETA (1-1)* (SMLX5 (1 ) /1 00000. 0-0. 9) GO TO 410 405 ALPHA=ALPHX (I-1,NEEG) 410 SMLX=ALPHA*SMLX5 (1 ) + ( 1. 0-ALPHA) *SMLX5 (2) 420 CONTINUE IF (ABS (SMLXC(I) -SMLX)-10.0) 490,490,430 430 CONTINUE IF (ABS(SMLX-SMLXI) -ABS ( SMLX-SMLX2) ) 440,440,450 440 SMLX2=SMLX ETEN2 = ET (1) GO TO 460 450 SMLX1=SMLX ETEN1 = ET (1) 460 CONTINUE WRITE (NPP.NT,555) 555 FORMAT (//49H *** BRASH ERROR NO. 0316 -- PROBABLE INPUT ERROR */,57H *** IMPOSSIBLE TO ESTIMATE LIFE EXPECTANCY (CHECK INPUT)) GO TO 471 490 DO 700 L=1,17 K=4*L-3 DO 700 N=1,2 X (N) =PONST (N,K) + PONST(N,K+1) *ET(N) XP(N) =PONST (N,K*2) +PONST (N,K + 3) *ET(N) XP (N) =1 0. 0**XP (N) /10000. IF (XP(N)-X(N)) 671,672,673 673 CONTINUE IF (ET(N)-54.0) 672,672,674 674 QX(N,L)=XP(N) GO TO 700 671 QX(N, L) = (X(N) +XP(N))/2.0 GO TO 700 672 QX(N,L)=X (N) 700 CONTINUE DO 750 L=1,17 750 QXMX(L) = (1.05*QX(1,L)+QX(2,L))/2.05 QXMX(18)=1.0 SEPO =0.0 SEP1 = 0.0 CALL ELT(NREG,1, 1,SEP0,SEP1 ,QXMX,XLT) IF (XL? (1,8) -20. 0) 471,492,492 492 CONTINUE IF (XLS (1,8) -80.0) 491,491,471 471 XLT(1,8) = 0.0 491 COREO (I) =XLT (1,8) C c C PRINTING OF OUTPUT c C IF (NWEIT) 1000,1000,500 500 WRITE (NPENT,777) 777 FORMAT (//1X 36X,35HBRASS TECHNIQUE MORTALITY ESTIMATES * /31X,45HBASED ON AVERAGE NUMBER OF CHILDREN EVER BORN * /34X,40HAND AVERAGE NUMBER OF CHILDREN SURVIVING ) BRASM 121 WRITE (NPENT,888) ( (NAGE (I, J) ,1=1,2) ,P (J) ,S (J) ,PD (J) ,FMULT(J) , * NX (J) ,XQO(J) ,CORE0 (J) ,J = 1,7) 888 FORMAT (/ 1 5X , 20HCHILDREN CHILDREN, 1 5X, 1 1 HMULTI PLIERS, 10X, * 28HPHOPORTIOH CORRESPONDING / 96H ♦URVIVING 1.0 - AGE *OF / 94H WOMEN P(I) S(I) * X XQO E(0) * // <5X,I2,1H-,I2,4F12.3,I8,F12. 3,F15.1)) GO TO 1000 AGE OF EVER BORN S DEAD BY AGE X VALUE S(I)/P(I) c C ZEROING OF OUTPUT AND PRINTING OF INPUT BECAUSE OF ERROR c C 900 WRITE (NPRNT,444) P, S,EMBAR, NREG,NHRIT 444 FORMAT (//29H BRASM INPUT ARGUMENTS, * / 8H P= , 7F8. 4 * / 8H S= ,7F8.4 * /12H EMBAR= ,F8.4 * /11H NREG= ,16 * /12h NHF.IT= ,16) DO 910 1= = 1,7 COREO(I) = 0,0 910 XQO (I) = 0.0 1000 RETURN END 122 DOCUMENTATION V- «r O UJ -J s to tJ s S s s c £ s 5 S c K ^ £ R £ " IC £ 5 2 £ K C £ £ K! £ C ^ ^ e g S s S S s "s 1 s s s s »« s u> s s s 3 3 3 2 2 S i« Sj 3 3 s «> u> s s S £ s S S s s K K £ £ £ K £ S 5 S S £ K S K S S K s ° S s 3 3 3 3 3 5 5 3 * 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 o o- O 0- O o- 3 3 3 o o o o o o § ■j- S rft — rft — Nl — S S 3. % 2 . • . S 5 S «s m > vO In ^ vS m s R ss O — s S s o o» 2 o OS fft O Oo s IS o — it: o — O o ~- S s vO »o z v» >o C9 m " s . • 3 • 0: . • « ^J s u-> s6 m O vS lO s s s (A c=: s s R o — l-l O •^ G: O ~. R R R o m © m UJ O Vf> fS R fi t>- 0» UJ f^ Oo r- 0a S ft R . . O . • u. • • R S R u> * o a- O o 3- s s S — J? s R o IS 2 O CS 1- o o R R S o 3- UJ 3- Oo UJ 3- Oo Si 3 r . £ . \— • * IT S * c> *- l«V s^ ai 2 I 1 a 2 5 o o- Wi fr- u> a 2 2 Cfc • • Cr . . C£ • . 2 ^ 2 l-l CVI CM h-t O o- > © o- ■> cs o- S 2 o> 3 l<^ — — 3 M» — — ■^ I*V — . — ^ <» oo O • . O . • O ♦ . » » l» CO — ~ — CO -» — — cr> — ■— — i- ■~ u> *. a. "> o o rv o o o r^ o o 1^- o u> ^> • r>» o 0» © r«- o Oo o i — o Oo o » *r m o- CJ — • o-« CM -«• • o- CVJ — . n ^ « — • • CT- — • • — — • • o- N ~ - O o k •? CM w ft fft w O 3- o 4- w V o ■» c CM « a o 3- J a o « •» c CM h- UJ CO fft «1 « CO ) Ui CO *■ o I CM BRASM 123 D. SAMPLE OUTPUT 1st SET 1970 SOUVENIR BBASS TECHNIQUE MORTALITY ESTIMATES BASED ON AVERAGE NUMBER OF CHILDREN EVER BORN AND AVERAGE NUMBER OF CHILDREN SURVIVING CHILDREN CHILDREN MULTIPLIERS PROPORTION COBRESPONDING AGE OF EVER BORN SURVIVING 1.0 - AGE DEAD BY AGE X VALUE OF WOMEN P (I) S(I) S(I)/P(I) X XQO E(0) 15-19 0. 200 0. 187 0.065 1.030 1 0.067 60.6 20-24 1.300 1.191 0.084 1.037 2 0.087 59.3 25-29 2.900 2.596 0.105 1.009 3 0.106 57.5 30-34 4.400 3.846 0.126 1.012 5 0.127 55.9 35-39 5.700 4.851 0.149 1.021 10 0. 152 54.4 40-44 6.600 5.518 0.164 0.999 15 0.164 54.1 4 5-49 6.300 5.109 0.189 0.998 20 0. 189 53.1 2nd SET 1970 SOUVENIR BEAK AGE IS UNKNOWN BRASS TECHNIQUE MORTALITY ESTIMATES BASED ON AVERAGE NUMBER OF CHILDREN EVER BORN AND AVERAGE NUMBER OF CHILDREN SURVIVING CHILDREN CHILDREN MULTIPLIERS PROPORTION CORRESPONDING AGE OF EVER BORN SURVIVING 1.0 - AGE DEAD BY AGE X VALUE OF WOMEN P(D S(I) S(I)/P(I) X XQO E(0) 15-19 0.200 0. 187 0.065 1.030 1 0.067 60.6 20-24 1.300 1. 191 0.084 1.037 2 0.087 59.3 25-29 2.900 2.596 0.105 1.009 3 0. 106 57.5 30-34 4. "00 3.846 0. 126 1.014 5 0. 128 55.8 35-39 5.700 4.851 0.149 1.023 10 0.152 54. 3 40-44 6.600 5.518 0.164 1.001 15 0.164 54.1 45-49 6. 300 5.109 0.189 1.000 20 0. 189 53.0 3rd SET 1970 SOUVENIR TEST OF ERROR 0311 *** BRASM ERROR NO. 0311 — INPUT ERROR IN P *** NUMBER OF CHILDREN EVER BORN MUST BE BETWEEN 0.0 TO 10.0 BRASM INPUT ARGUMENTS, P= 0.2000 1.3000 2.9000 4.4000 10.7000 6.6000 6.3000 S= 0.1870 1.1910 2.5960 3.8460 4.8510 5.5180 5.1090 EMBAR= 29.0000 NREG= 1 NWRIT= 1 ELT I. DESCRIPTION OF PROGRAMS A. PURPOSE To calculate an abridged life table from age-specific mortality rates ( M ) or the probabilities of dying ( g ) between exact ages x and x + 5. The life table is by 5-year age groups except for ages under 5, which are divided into age and the age group 1-4. B. DATA NEEDED 1- Probabilities of dying or age-specific mortality rates in 5-year age groups for all except the first two age groups. The first two age groups must be 0-1 years and 1-4 years respectively. 2. Death separation factors for age groups 0-1 and 1-4 must be provided for estimating , q and . q . from ,M and .H, and for estimating L and .L, from ,q and . g. If death separation factors cannot be provided, the sex of the population and a Coale-Demeny region must be provided. These will be used to generate Coale-Demeny separation factors. II. METHODOLOGY MATHEMATICAL DERIVATION For estimating ,q and .g. fron ,M and ,M. and for estimating ,L and rL, from ,q and .q,, ieath separation factors should be provided. If separation factors cannot be provided, Coale-Demeny separation factors are used. Adjustment of the n q x (or n H x ) . Since the number of n g x (or n M x ) values given as input might vary, the first step in this subroutine is to obtain 17 values of g (or M ) . The procedure is the same no matter whether q or M n x n x n^xnx are given. (The notation given is for g ) . n x If there are more than 17 values, only up to q are taken. ihen the set of ^q has less than 17 values — a up to 5 x 5 x an aqe younqer than 75 — an extrapolation of the q values is made J x up to age 75. The extrapolation is made by assuming that the q values are an exponential function. Therefore, the quotient of the qiven two oldest q values is kept constant for estimating the values up to age 75. J x 125 126 DOCUMENTATION For instance, from the given data the following rate is made a=-£s3_ 5%c where 5 q +5 is the oldest value of the given set where x < 70. Therefore, the extrapolation is made as 5^5+10 = a ' 5^5 up to obtaining c,Q-ic Computation of q . r rPx If H is given as input, the q values are computed as n x n x n • M _ n x n^ 1 + (n-k) • M n x where q is the probability of dying between exact age x and exact age x+n. M is the age-specific mortality rate for age group x to x+n. n is the aqe group interval (1 year for the first aqe qroup, 4 years far the second age group and 5 years for the remaining age groups) , and k is the death separation factor for each aqe qroup (The death separation factors for aqe groups 0-1 and 1-4 can be provided as input or Coale-Demeny death separation factors can ba used). The separation factor for all hiqher aqe groups is taken as 2.5. With the set of q , the 1 and d are obtained as n x x n x x+n x nhc and d = 1 - 1 . n x x x+n ELT 127 The L values are calculated as follows. The L and ,L, are calculated as i L o =k o' 1 o + (1 - k } h 4 L l = k l ,:L l + U " k i } x where k and k, are the death separation factors for age groups 0-1 and 1 to 4 o I respectively. The remaining _L values for x = 5, 10, .... 75 are calculated as 5 x 5 L x = -f-- (l x + 'W Finally, the open age, L ft is calculated as L 80+ =3.725 (1 8Q ) + .0000625 (l 80 ) 2 as suggested by Coale-Demeny in their model life tables. The other life table functions are calculated as follows Survival rates c - 5 L x+5 5 x ~ _L 5 x Central mortality rates d u - n x M = — n x L n x Remaining person years to be lived w T = T C L - x Z-j 5 j j=x,5 and finally life expectancies as T °e =-r x - x 1 X III.M A I N PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunctiDn with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 128 DOCUMENTATION 1 . CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main proqram. This communication process is made through the CALL statement. rhs form of the CALL statement for this subroutine is as follows: CALL ELT(NREG,NSEX, K0DE,SEP0,SEP1,QXMX,XLT) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine both variable names QXMX and XLT are arrays. The following DIMENSION Statement must be included in any main program using this subroutine. DIMENSION QXMX(18),XLT(18,8) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION HITH THE PROGRAM. Sone subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must ba in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package PLT* ♦This subroutine is not called by the subroutine ELT. It is used only by the main program. 2. Library functions None 3. Card Diagram of main program and subroutines. / / CARDS INDICATING END OF DECK /| / / INPUT DATA /| | / I I / / COMPUTER CONTROL CARDS /| | | _ _ _/ I I I / / SUBROUTINE PLT /III/ /III/ / / SUBROUTINE ELT /III/ / III/ / / MAIN PROGRAM /III/ /III/ / COMPUTER CONTROL CARDS /III/ / /III/ I I / ELT 129 C. FORMAT REQOIRBHENTS FOR CARD INPOT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this subroutine package are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1 6 7-11 12 13-17 18 19 20-80 1-8 NREG NSEX KODE SEPO SEP1 NXT QXBX Blank Label used to identify the output Blank The source of the separation factors A 1 punched in column 1 indicates the west region from the Coale-Demeny model life table system, a 2 indicates north region, a 3 east region, and a 4 indicates south region. A 5 punched in column 1 indicates empirical separation factors are being given. Blank The code indicating the sex of the life table population. A 1 punched in column 3 indicates males, a 2 indicates females, and a 3 indicates both sexes combined. Blank The code indicating whether q n x or H n x values are given. A 1 punched In colum© 5 indicates q values are given. A 2 punched in column 5 indicates M values are given n x Blank The separation factor for age group 0-1. The decimal point should appear in column 8. If Coale-Demeny separation factors are to be used, the value of 0.000 should be punched in columns 7-11. Blank The separation factor for age group 1-4. The decimal point should be located in column 14. If Coale-Demeny separation factors are to be used, the value of 0.000 should be punched in columns 7-11 Blank The code indicating if there is another set of data following this one. A zero in column 19 indicates this is the last set of data. Any other number in column 19 indicates another set of data follows this one. Blank The value of g n^x or M n x for age group 0-1. 130 DOCUMENTATION 9-16 65-72 73-80 1-8 9-16 65-72 73-80 The value of n q x or n H x for age group 1-4. The value of q or H for age group 35-39. n x n x Blank The value of g or M for age group 40-44. n x n x The value of q or H for age group 15-49. n^x n x 3 3 r The value of g or H for age group 80+. n x n x Blank Cards 3 and 4 read in the q n x or M n x values. The first two QXMX values refer to age groups 0-1 and 1-4. The remaining values refer to the 5-year age groups 5-9, 10-14, 15-19,... The last value is always assumed to refer to the open end age group. A minimum of 15 values and a maximum of 18 values can be given. Nine values will appear on the first card. A minimum of six values and a maximum of nine values will appear on the second card. The values on each card should be ahtered so that the decimal points will be in columns 2,10,18,26 34,42,50,58 and 66. IV. S0BRO0TINE A. SUBROUTINE STATEMENT All external subroutines begin with the word S0BR0BTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE ELT (NREG , NSEX ,K0DE, SEP0, SEP1 , QXMX, XLT) B. DESCRIPTION OF ARGUMENTS Name NREG How Obtained Definition NSEX K0DE Transferred In Transferred In Transferred In Indicates the source factors. NREG=1,2,3 spectively the west, south regions of the life table system pirical separation f given. If NREG has from this, error mes will be written out will return to the c of the separation ,4 indicates re- north, east, and Coale-Demeny model NREG=5 indicates em- actors are being a value different sage number 0371 and the subroutine ailing program. Indicates the sex of the population. NSEX=1,2,3 indicates males, females, and both sexes combined respectively. If NSEX has a value different from this error message 0372 will be written out and the subroutine will return to the calling program. Indicates whether q or n B x values are qiven. K0DE=1 indicates n q x values and K0DE=2 indicates M values. If KODE has n x a value different from this, error message 0373 will be written out and the sub- routine will return to the calling pro- gram. ELT 131 SEPO 1 Transferred In SEP1 QXMX XLT Transferred In Transferred In Transferred Out Separation factor for age group 0-1. SEPO must be within the range 0.002 - 0.500. If SEPO is not within the range, error message 0374 will be written out and the subroutine will return to the calling pro- gram. Separation factor for age group 1-4. SEP1 must be within the range 0.5 - 2.0. If SEP1 is not within the range, error mes- sage 0375 will be written out and the sub- routine will return to the calling program. The values of g or M n 3 x n x The first two values refer to age groups 0-1 and 1-4 re- spectively. The remaining values are all for 5-year age groups. A minimum of 15 values i I 5 E s R p; t; s £ £ £ ;c s 2 ? ; " " " £ ~ ^ ^ <** o CM o- K% o £ m fc» o ^ s =*- o O- — * Q s i- s- © s 2 o o rn o- o- O s o- o- o u> S — o O o- -- O s — -~ © 5 o o O — o O £ O a o s X • • • . • • X . . » u> S o — o o o •— s o © — s s 2 s s ■3- o OO 0» a- o s 3- a- o cs s r- tr- en >T» r~- o. s r- i^. o« s 3 vs «n m * cs rr> 3 s o * O -— o *• £ o © * s S • . • • • S . • • 3 R o o © o o O K o o O s £ £ E S 3- Oo P- — a- Oo * o cj- 0s S S 1^- — r~ * in. — 3 r- o r* — S 2 rc> vs CM — r«» t£ ^ ffl © to CS s 2 — vS © V£ — vS 2 — o •— VS s 5 O CM O o o CM h s © o o CM s S . • • • • • ° » • • • s 3 to o o o o CO 3 o -— o o 3 3 9 3 «f» Oo 3 rr» Oo ro 0» 3 3 — UJ o rr» ~- vS J -. • • 3 . . . • 3 5 o o o O cs: Co o 3 O © © © 3 3 o 3 3 SS -~ ~. — CM I- -. ~- S -~ •-~ •— -— S s o a- Oo Oe o o d- S o 3- o * S 5 o CVI — i*> ec o» CM s z o- CM CJ-. e\j R S o — o CM iL. o — s o o — o ^- S S o — o O o — s •-1 o — © — • s . • . . Z • • 1— » • • . 2 3 o O o o o o © " «c © O o O " H S! -J SJ S in r*> — t*» 1— in re, S o in rc» in ro Z s O CM CM VS •a: o CM m a. o CM o CM s s Q£ u> Lr> 3 cc VS in s s o i»- o — «C O r- s es; o h- o (~- s R o o o o ex. CO o S t~ o O o © s 8 • < . » UJ • » S x • • . s JC o o Co o CO o o s UJ © © © O Id s a s 3 o e\! ^. r^ vS i o CM s ^-^ cs CM © CM s a yi Oo Cl- X ts. o l~ Oo c>- Si X 0» O- Oo O- s 3 0= - ~- o M Oo -~ S! ^ — OO -~ Oo — ~ s Or o in £ o — 5 Co m S © o Ln ro o in s 2 — o O -~ o o •— o o 2 — o o r- O o O 2 2 i . . i • . f • . 2 i • . m . • 2 s i o o O i o o o 1 ■— Co © - i © o © o o O £ 2 \ o « o . lr> 2 l o Q 2 2 o o l*i o -i o o r- -J ~~ — in 2 _i o — in Cf © — In 2 2 CC :»- W> 2 CC * rn Of 3- m 2 ~ £ o o O e o o o S o> o O 3 S © o O UJ © o O 2 2 © • . o . . — . • • 2 o . . o • • 2 o, Or o o O Or o o o a rp» Co O .7, ex. o © O Ll. © © o — vO vS :> CM rr> u> ^ — . O O IS CJ- CM V li o- CM UJ • . c/> • • to . • ~ • • . • c - d- o o 3- o o u> o © - J- o O * o o - k. 4 CO «■ \ V. <3 o -» c CM -*5 w CO b -8 <3 CO 3- +- V « CO c CM eo V. a CO MJ to -«r c CM 1- Uj Co Uj CO »n ELT 139 D- SAMPLE OUTPUT 1st SET SOUVENIR HALE Q (X) ABRIDGED LIFE TABLE HALES EHPIRICALLY DERIVED 6E Q(X) D(X) H(X) I(X) L(X) S(X) T(X) E IX) 0.09625 9625. .10300 100000. 93447. .88912 5869956. 58. 70 1 0.04180 3778. .01076 90375. 351115. .96968 5776509. 63. 92 5 0.00880 762. .00177 86597. 431081. .99257 5425394. 62. 65 10 0.00605 519. .00121 85835. 427878. .99247 4994313. 58. 18 15 0.00901 769. .00181 85316. 424658. .98870 4566436. 53. 52 20 0.01360 1150. .00274 84 547. 419861. .98633 4141779. 48. 99 25 0.01374 1146. .00277 83397. 414122. .98477 3721918. 44. .63 30 0.01674 1377. .00338 82251. 407815. .98193 33077 97. 40. .22 35 0.01943 1571. .00392 80874. 400444. .97718 2899983. 35. 86 40 0.02627 2083. .00532 79303. 391307. .96910 2499540. 31. 52 l»5 0.03565 2753. .00726 77220. 379216. .95636 2108234. 27. 30 50 0.05192 3866. .01066 74467. 362668. .93674 1729018. 23. 22 55 0.07523 5311. .01563 70600. 339724. .90691 1366351. 19. 35 60 0.11241 7339. .02382 65289. 308098. .86127 1026628. 15. 72 65 0.16839 9758. .03677 57950. 265355. .78721 718530. 12. .40 70 0.26618 12828. .06141 48192. 208890. .67130 453175. 9. .40 75 0.41390 14637. .10438 35364. 140228. .42597 244286. 6. 91 80 1.00000 20727. .19919 20727. 104058. .0 104058. 5. 02 2nd SET SOUVENIR MALE H (X) ABRIDGED LIFE TABLE HALES EHPIRICALLY DERIVED GE Q(X) D(X) M(X) I(X) L(X) S(X) T(X) E(X) 0.09625 9625. .10300 100000. 93447. .88912 5869966. 58.70 1 0.04180 3778. .01076 90375. 351114. .96967 5776519. 63.92 5 0.00881 76 3. .00177 86597. 431077. .99257 54254 06. 62.65 10 0.00603 518. .00121 85834. 427875. .99248 4994330. 58.19 15 0.00901 769. .00181 85316. 424659. .98870 4566456. 53.52 20 0.01361 1150. .00274 84547. 419861. .98632 4141798. 48.99 25 0.01375 1147. .00277 83397. 414117. .98475 3721938. 44.63 30 0.01676 1378. .C0338 82250. 407803. .98193 3307822. 40.22 35 0.01941 1570. .00392 80871. 400433. .97720 2900019. 35.86 40 0.02625 2082. .00532 79302. 391304. .96911 2499587. 31.52 45 0.03565 2753. .00726 77220. 379217. .95636 2108283. 27.30 50 0.05192 3866. .01066 74467. 362669. .93675 1729067. 23.22 55 0.07521 5310. .01563 70601. 339729. .90692 1366399. 19.35 60 0.11241 7339. .02382 65291. 308106- .86128 1026670. 15.72 65 0.16837 9757. .03677 57952. 265365. .78722 718564. 12.40 70 0.26618 12829. .06141 48194. 208900. .67130 453199. 9.40 75 0.41389 14638. .10438 35366. 140234. .42597 244300. 6.91 80 1.00000 20728. .19918 20728. 104065. .0 104065. 5.02 140 DOCUMENTATION 3rd SET SOUVENIR MALE WITH SEPARATION FACTORS ABRIDGED LIFE TABLE HALES EMPIRICALLY DERIVED GE Q(X) D(X) M(X) I(X) MX) S(X) T(X) E(X) 0.09625 9625. .10300 100000. 93445. .88912 5869954. 58.70 1 0.04180 3778. .01076 90375. 351115. .96968 5776509. 63.92 5 0.00880 76 2. .00177 86597. 431081. .99257 5425394- 62.65 10 0.00605 519. .00121 85835. 427878. .99247 4994313. 58.18 15 0.00901 769. .00181 85316. 424658. .98870 4566436. 53.52 20 0.01360 1150. .00274 84547. 419861. .98633 4141779. 48.99 25 0.01374 1146. .00277 83397. 414122. .98477 3721918. 44.63 30 0.01674 1377. .00338 82251. 407815. .98193 3307797. 40.22 35 0.01943 1571. .00392 80874. 400444. .97718 2899983. 35.86 40 0.02627 208 3. .00532 79303. 391307. .96910 2499540. 31.52 45 0.03565 2753. .00726 77220. 379216. .95636 2108234. 27.30 50 0.05192 3866. .01066 74467. 362668. .93674 1729018. 23.22 55 0.07523 5311. .01563 70600. 339724. .90691 1366351. 19.35 60 0.11241 7339. .02382 65289. 308098. .86127 1026628. 15.72 65 0.16839 9758. .03677 57950. 265355. .78721 718530. 12.40 70 0.26618 12828. .06141 48192. 208890. .67130 453175. 9.40 75 0.41390 14637. .10438 35364. 140228. .42597 244286. 6.91 80 1.00000 20727. .19919 20727. 104058. .0 104058. 5.02 4th SET SOUVENIR HALE Q (X) EXTRAPOLATION ABRIDGED LIFE TABLE HALES EMPIRICALLY DERIVED GE Q(X) D(X) M(X) I(X) MX) S(X) T(X) E(X) 0.09625 9625. .10300 100000. 93447. .88912 5 8884 09. 58.88 1 0.04180 3778. .01076 90375. 351115. .96968 5794962. 64.12 5 0.00880 762. .00177 86597. 431081. .99257 5443847. 62.86 10 COO 605 519. .00121 85835. 427878. .99247 5012766. 58.40 15 0.00901 769. .00181 85316. 424658. .98870 4584889. 53.74 20 0.01360 1150. .00274 84547. 419861. .98633 4160232. 49.21 25 0.01374 1146. .00277 83397. 414122. .98477 3740371. 44.85 30 0.01674 1377. .00338 82251. 407815. .98193 3326250. 40.44 35 0.01943 1571. .00392 80874. 400444. .97718 2918436. 36.09 40 0.02627 208 3. .00532 79303. 391307. .96910 2517993- 31.75 45 0.03565 2753. .00726 77220. 379216. .95636 2126687. 27.54 50 0.05192 3866. .01066 74467. 362668. .93674 1747471. 23.47 55 0.07523 5311. .01563 70600. 339724. .90691 1384804. 19-61 60 0.11241 7339. .02382 65289. 308098. .86127 1045080. 16.01 65 0.16839 9758. .03677 57950. 265355. .79354 736982. 12.72 70 0.25225 12156. .05773 48192. 210568. .69401 471628. 9-79 75 0.37787 13617. .09318 36036. 146136. .44022 261060. 7.24 80 1.00000 22419. .19508 22419. 114923. .0 114923. 5.13 ELT 141 5th SET TEST OF ERROR 0373 *** ELT ERROR NO. 0373 — IMPOT ERROR IN KODE *** CODS INDICATING Q(X) VALUES OR B (X) VALUES HOST EQUAL 1 OR 2 ELT INPUT ARGUMENTS, NREG= 4 NSEX= 1 KODE= SEP0= 0.319 SEP1= 1.251 QXSX= 0.09625 0.04180 0.003 8 0.00605 0.00901 0.01360 0.01374 0.01674 0.01943 0.02627 0.03565 0.05192 0.07523 0. 11241 0.16839 0.26618 0.41390 0.64360 ABRIDGED LIFE TABLE HALES EHPIRICALLY DERIVED AGE Q(X> D(X) H(X) I(X) L(X) S(X) T(X) E(X) 0.0 0. .0 0. 0. .0 0. 0.0 1 0.0 0. .0 0. 0. .0 0. 0.0 5 0.0 0. .0 0. 0. .0 0. 0.0 10 0.0 0. .0 0. 0. .0 0. 0.0 15 0.0 0. .0 0. 0. .0 0. 0.0 20 0.0 0. .0 0. 0. .0 0. 0.0 25 0.0 0. .0 0. 0. .0 0. 0.0 30 0.0 0. .0 0. 0. .0 0. 0.0 35 0.0 0. .0 0. 0. .0 0. 0.0 40 0.0 0. .0 0. 0. .0 0. 0.0 45 0.0 0. .0 0. 0. .0 0. 0.0 50 0.0 0. .0 0. 0. .0 0. 0.0 55 0.0 0. .0 0. 0. .0 0. 0.0 60 0.0 0. .0 0. 0. .0 0. 0.0 65 0.0 0. .0 0. 0. .0 0. 0.0 70 0.0 0. .0 0. 0. .0 0. 0.0 75 0.0 0. .0 0. 0. .0 0. 0.0 80 0.0 0. .0 0. 0. .0 0. 0.0 FWDRV I. DESCRIPTION OF PROGRAM A. PURPOSE To adjust aqe-sex distributions obtained from two population censuses taken 10 years apart. The results present the original and smoothed pop- ulation distributions and the differences between them for each of the enumeration dates. B. DATA NEEDED 1. The male population in 5-year age groups for the later date. 2. The female population in 5-year age groups for the later date. 3. The male population in 5-year age groups for the earlier date. H. The female population in 5-year age groups for the earlier date. II. METHODOLOGY A. MATHEMATICAL DERIVATION The population distribution by 5-year age groups at time t ( P ) is projected 5 years up to time t+5 x JILT 5 = r pt ' .S*'^ 5 for x = 0, 5, 10, -.., w 5 x+5 5 x 5 x where P * is the projected population at time t+5 from the population at time t. r S t,t: is the survival rate for ages x,x+4 for the period t,t+5. 5 x Also, the population distribution by 5-year age groups at time t+10 2 t+5 ( P ' ^ ) is rejuvenated to year t+5 as pt+10 p 2,t+5 = 5 x+10 5 x+5 „ t+5, t+10 5 S x+5 where p 2 » t+5 is the rejuvenated population from year t + 10. 5 x+5 An average of the projected and rejuvenated population is made as «pt+5 = _1_ , p 1,t+5 + p 2,t+5^ 5^x+5 2 Vx+5 5 x+5 } 143 144 DOCUMENTATION The average population is projected to year t+10 and rejuvenated to year t as the "adjusted" population. V+1 ° = AP t+5 • q t+5 » t+1 ° 5 x+10 5 x+5 5 x+5 AP t+ 5 5 S x The survival, rates used in the last projection and rejuvenation are those used before. The percent difference between the original and the adjusted distri- butions is calculated as follows: p t+10 _ * p t+10 p D t+10 . _l_x+10 5 x+10 ' J ' *pt +1 ° 5 x+10 S x+10 * p t+10 t * t P - P PD* - _l_x L_x_ 100 5 x * t luu * 5 x B. COMMENTS The basic assumption behind this technigue is that both distributions have the same net undercounts or overcounts by age and sex. Mhen usinq the main proqram in Section v. A. and age-specific fertility rates are given as input for the first 5-year period, the comparison of the adjusted and enumerated population are valid for all age groups at both the mid-point of the interval and the date of the later distribution. Otherwise, the comparison does not apply to age group 0-4 at the mid-point or to 5-9 at the date of the later distribution. III. MAIN PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1 . CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main proqram. This communication process is made through the CALL statement. FWDRV 145 The form of the C&LL statement for this subroutine is as follows: CALL FWDRV (PMA,PPMA, PFA, PPFA,PHB, PPHB, PPB,PPPB,SXMA,SXFA,SXMB,SXF *B,ASFR1, ASFR2,SRB„YEAR1,YEAR2) Foe the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variables PMA,PPMA,PFA, PPFA, PMB, PPMB, PFB,PPFB,SXMA, SXFA,SXHB,SXFB, ASFR1, and ASFR2, in the argument string are arrays. The following dimension statement must be included in any main program using this subroutine. DIMENSION PHA(17) ,PPMA (17) ,PPA(17) ,PPFA(17) ,PMB(17) ,PPMB(17) ,PFB(1 *7) ,PPFB(17) ,SXMA(17) ,SXFA (17), SXMB (17) ,SXFB(17) ,ASFR1 (7) ,ASFR2(7) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package a. ABRBV b. PR0J5 c. REVR5 d. MLT* e. ELT* f. GTCON* * These subroutines are not called by the subroutine FWDRV. They are used only by the main program. 2. Library Functions ABS (absolute value) 146 DOCUMENTATION 3. Card Diagram of main program, subroutines, and functions. / CARDS INDICATING END OF DECK / / _/ / INPUT DATA /| / " COBPOfER~CONTROL~CABDS /] \ / SDBR00flNE~GTCON^ /| | J / ""sobrootine'elt"" "~/i I | / SDBROOTINE NLT / I I I/ /III/ _/ I I 1/ /III/ /. / / / SUBROUTINE REVR5 . / III/ SUBBOUTINE PROJ5 /111/ / 111/ SUBROUTINE ABREV /III/ / III/ SUBROUTINE FWDRV /III/ / III/ / / / COMPUTER CONTROL CARDS / RAIN PROGRAM /III/ / III/ /III/ /III/ I I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V. C. Variable Card Columns Name Definition 1 2-53 5U-80 1 2 3-4 5-6 7-10 11-1U 15-20 NXT DAT THO TEAR SRB Blank Label used to identify the output Blank A zero punched in column 1 indicates this is the last set of data. Any other digit punched in column 1 indicates another set of data follows this one. Blank Day of the month for which the later population is given Month of the year for which the later population is given. Tear for which the later population is given Blank Sex ratio at birth. FWDRV 147 21-22 IKODE 23 24-80 1-8 9-16 73-80 1-8 9-16 4 9-56 57-80 K&SF PM PH Mortality indicator used to deter- mine whether survival rates are to be provided or if Coale-Demeny Regional Model Life Tables are to be used for the two 5-year intervals. Column 21 is used as the indicator for the last half of the 10-year interval and Column 22 is used for the first half of the 10-year interval- 1 1 in Column 21 or 22 indicates that mortality for the last half or the first half, respectively, of the 10-year interval is provided by survival rates. A 2 in Column 21 or 22 indicates mortality for the last or first half, respectively, of the 10-year interval is based on the Coale- Demeny Regional Model Life Tables. Any other value is an error and the main program will stop. Fertility indicator whether age-specific are to be provided f of the 10-year inter in column 23 indicat fertility rates are date of the earlier later. If any other in column 23, the pr age-specific fertili half of the 10-year Blank which specifies fertility rates or the first half val. A one punched es age-specific provided for the distribution and five years number is punched ogram will make the ty rates for the first interval be all zeros. The male population 0-4 for the earlier distribution. The number should end in Column 8. The male population 5-9 for the earlier distribution. The number should end in Column 16. The male population 45-49 for the earlier distribution. The number should end in column 80. The male population 50-54 for the earlier distribution. The number should end in column 8. The male population 55-59 for the earlier distribution. The number should end in column 16. The male population 80+ for the earlier distribution. The number should end in column 56. Blank The variable PH always reguires two cards. The first card (Card no. 3) must always contain data, whereas the second card (Card no. 4) can contain all zeroes, depending on the number of age groups given. The last age group given must always be the open-end age group. Ill I J 5 | 1-8 |PF | The fenale population 0-4 for the earlier | | | (distribution. The number should end in | | I | column 8. 148 DOCUMENTATION 9-16 73-80 1-8 9-16 49-56 57-80 PF The female population 5-9 for the earlier distribution. The number should end in col umn 16. The female population 4 5-49 for the earlier distribution. The number should end in column 80. The female population 50-54 for the earlier distribution. The number should end in column 8. The female population 55-59 for the earlier distribution. The number should end in column 16. The female population 8 0+ for the earlier distribution. The number should end in column 56. Blank The variable PF always requires two cards. The first card (Card no. 5) must always contain data, whereas the second card (Card no. 6) can be all zeroes depending on the number of age group given. The last age group must always be the open-ended age group. 1-8 9-16 73-80 1-8 9-16 49-56 57-80 PH PH I I The male population 0-4 for the later (distribution. The number should end in [column 8. The male population 5-9 for the later distribution. The number should end in column 16. I I I I I I I I I I I I I I I I I I I I I I (The male population 80+ for the later (distribution. The number should end in | column 56. I | Blank The male population 45-49 for the later distribution. The number should end in column 80. The male population 50-54 in the later distribution. The number should end in column 8. The male population 55-59 for the later distribution. The number should end in column 16. The variable PH always reguires two cards. The first card (Card no. 7) must always contain data, whereas the second card (Card no. 8) can contain all zeroes depending on the number of age groups given. The last age group given must always be the open-end age group. 1-8 I PF | The female population 0-4 for the later (distribution. The number should end in | Col umn 8. I FIN6RV 149 10 9-16 73-80 1-8 9-16 49-56 57-80 PF The female population 5-9 for the later distribution. The number should end in Column 16. The female population 4 5-49 for the later distribution. The number should end in Column 80. The female population 50-54 for the later distribution. The number should end in Column 8. The female population 55-59 for the later distribution. The number should end in Column 16. The female population 80+ for the later distribution. The number should end in Column 56. Blank The variable PF always requires two cards. The first card (Card no. 9) must always contain data whereas the second card (Card no. 10) can be all zeroes depending on the number of age group given. The last age group must always be the open-ended age group. 111 12 13 1-8 9-16 17-80 1-8 9-16 73-80 1-8 9-16 PHMT PHM PMB The total number of migrants for the first five years of the 10-year interval. The number should end in column 8. The total number of migrants for the last five years of 10-year interval. The number should end in column 16. Blank The proportion of the total migrants during the first five years of the 10-year interval who are males age 0-4. The decimal point is in column 1. The proportion of the total migrants during the first five years of the 10-year interval who are males 5-9. The decimal point is in column 9. The proportion of the total migrants during the first five years of the 10-year interval who are males 45-49. The decimal point is in column 73. The proportion of the total migrants during the first five years of the 10-year interval who are males 50-54. The decimal point is in column 1. The proportion of the total migrants during the first 5- years of the 10-year interval who are males 55-59. The decimal point is in column 9. 150 DOCUMENTATION 49-56 57-80 I The proportion of the total migrants during j the first five years of the 10-year interval I who are males 80*. The decimal point is in (column 49. I I Blank Two cards must always be provided for the variable PMH for the first 5-year interval. Values are provided only for age groups in which there were migrants. The last group given is not assumed to be the open-ended age group unless it is the seventeenth value or is the same number of age groups as given for the population distribution. 14 15 1-8 9-16 73-80 1-8 9-16 49-56 57-80 PMF PMF The proportion of the total migrants during the first five years of the 10-year interval who are females 0-4. The decimal point is in column 1. The proportion of the total migrants during the first five years of the 10-year interval who are females 5-9. The decimal point is in column 9. The proportion of the total migrants during the first five years of the ten year interval who are females 45-59. The decimal point is in column 73. The proportion of the total migrants during the first five years of the 10-year interval who are females 50-54. The decimal point is in column 1. The proportion of the total migrants during the first five years of the 10-year interval who are females 55-59. The decimal point is in column 9. The proportion of the total migrants during the first five years of the 10-year interval for females 80+. The decimal point is in column 49. Blank The reguirements for PMF are the same as for PMM. The sum of the proportion of PMM and PMF for all ages for the first 5-year interval must add to 1.00. For the first 5-year interval the proportion of male migrants by 5-year age groups is followed by the proportion of female migrants by 5-year age groups for the first 5-year interval. So there are four cards for the first 5-year interval -- two cards for male migrants and two cards for female migrants. 16 1-8 9-16 I PMM | The proportion of the total migrants I during the last five years of the 10-year | interval who are males age 0-4. The | decimal point is in column 1. I | The proportion of the total migrants | during the last five years of the 10- J year interval who are males 5-9. The I decimal point is in column 9. I I FWDRV 151 17 73-80 1-8 49-56 57-80 | The proportion of the total migrants I during the last five years of the 10-year (interval who are males 45-49. The deci- Jmal point is in column 73. I I PHH | The proportion of the total migrants | during the last five years of the 10- lyear interval who are males 50-54. The | decimal point is in column 1- I |The proportion of the total migrants | during the last five years of the | 10-year interval who are males 80+ | The decimal point is in column 49. I | Blank Two cards must always be provided for the variable PHH for the last 5-year interval- Values are provided only for age groups in which there were migrants. The last group given is not assumed to be the open-ended age group unless it is the seventeenth value or is the same number of age groups as given for the population distribution. 18 19 1-8 73-80 1-8 9-16 49-56 57-80 PMF PHF The proportion of the total migrants during the last five years of the 10-year interval who are females 0-4. The decimal point is in column 1. The proportion of the total migrants during the last five years of the 10-year interval who are females 45-49. The decimal point is in column 7 3. The proportion of the total migrants during the last five years of the 10- year interval who are females 50-54. The decimal point is in column 1. The proportion of the total migrants during the last five-years of the 10- year interval who are females 55-59. The decimal point is in column 9. The proportion of the total migrants during the last five years of the 10-year interval for females 80+. The decimal point is in column 49. Blank The requirements for PHF are the same as for PHH. The sum of the proportion of PHH and PHF for all ages for the last 5-year interval must add to 1.00. For the last 5-year interval the proportion of male migrants by 5-year age groups is followed by the proportion of female migrants by 5-year age groups. So there are four cards for the last 5-year interval — two cards for male migrants followed by two cards for female migrants. The next group of cards depends on the value given for RODE in Columns 21 and 22 of Card 2. If K0DE=11,i.e. columns 21 and 22 of card 2 contain 11, survival rates are read for both the first and last five years of the 10-year interval. 152 DOCUMENTATION 20 21 22 23 24 1-8 9-16 73-80 1-8 49-56 57-80 1-8 9-16 73-80 1-8 49-56 57-80 1-8 SEX SRX SRX SRX SRX The survival rate for male births surviving to age 0-4 for the first five years of the 10-year interval. The decimal point should be in column 1 . The survival rate for males of age 0-4 surviving to age 5-9 for the first five years of the 10-year interval. The decimal point should be in column 9. The survival rate for males age 40-44 surviving to age 45-49 for the first five years of the 10-year interval. The decimal point is in column 73. The survival rate for males age 45- 49 surviving to age 50-54 for the first five years of the 10-year interval. The decimal point should be in column 1. The survival rate for males ages 75+ surviving to 80+ for the first five years of the 10-year interval. The decimal point is in column 4 9. Blank The survival rates for female births surviving to 0-4 for the first five years of the 10-year interval. The decimal point is in column 1. The survival rate for females 0-4 surviving to 5-9 for the first five years of the 10-year interval. The decimal point is in column 9. The survival rate for females 40-44 surviving to 45-49 for the first five years of the 10-year interval. The decimal point is in column 73. The survival rate for females 45-49 surviving to 50-54 for the first five years of the 10-year interval. The decimal point is in column 1. The survival rate for females 75+ surviving 80+ for the first five years of the 10- year interval. The decimal point is in column 49. Blank The survival rate for male births surviving to 0-4 for the last five years of the 10-year interval. The decimal point is in column 1. FWDRV 153 25 26 27 9-16 73-80 1-8 49-56 57-80 1-8 73-80 1-8 U9-56 57-80 SRX SRX SRX The survival rate for males 0-4 surviving to 5-9 for the last five year interval. The decimal point is in column 9. The survival rate for males 40-44 surviving to 45-49 for the last five years of the 10-year interval. The decimal point is in column 7 3. The survival rate for males 45-49 surviving to 50-54 for the last five years of the 10-year interval. The decimal point is in column 1. The survival rate for males 75+ surviving to 80+ for the last five years of the 10-year interval. The decimal point is in column 4. Blank The survival rate for female births surviving to age 0-4 for the last five years of the 10-year interval. The decimal point is in column 1. The survival rate for females 40-44 surviving to 45-49 for the last five years of the 10-year mortality interval. The decimal point is in column 73. The survival rate for females 45-49 surviving to 50-54 for the last five years of the 10-year interval. The decimal point is in column 1. The survival rate for females 75+ surviving to age 80+ for the last five years of the 10-year interval. The decimal point is in column 49. Blank If less than 17 survival rates are to be given for either sex in either the beginning or ending 5-year period, two cards must still be used for each sex with data in the number of columns needed. The last survival rate given for each sex for each 5-year period must be the open-ended survival rate. If K0DE=12, i.e. columns 21 and 22 of card 2 contain 12, then survival rates are read for the first five years of the 10-year interval and Coale-Demeny Regional Model Life Tables are used for the last five years of the 10-year interval. Card 20 through 23 for K0DE=11 are required. The following card is needed for the last five years of the 10-year interval. 24 1-6 EO | Life expectancy at birth for (males for the last five years I of the 10- year interval. The | decimal point should be in | column 3. I 154 DOCUMENTATION 7-12 13 14-80 I Life expectancy at birth for j females for the last five years jof the 10-year interval. | The decimal point should be in | column 9. I NREG J The region in the Coale-Demeny I Regional Model Life Tables to I be used. NREG=1,2,3, or 4 I indicates the Rest, North, East, | or South region, respectively. I | Blank If K0DE=21, i.e. columns 21 and 22 of card 2 contain 21, then Coale-Demeny Regional Model Life Tables are used for the first five years and survival rates are read for the last five years. 20 1-6 7-12 13 14-80 EO | Life expectancy at birth for | males for the first five years of the | 10-year interval. The decimal point should I be in column 3. I | Life expectancy at birth for females I for the first five years of the 10-year I interval. The decimal point should be I in column 9. I NREG | The region in the Coale-Demeny | Regional Model Life Tables to be | used. NREG=1,2,3, or 4 indicates |the Vest, North, East, or South (region, respectively. I I Blank Cards 21 through 24 are the same as Cards 24 through 27 for K0DE=11. If K0DE=22,i.e. columns 21 and 22 of card 2 contain 22, then Coale- Demeny Regional Model Life Tables are used for both the first and last five years of the 10-year interval. Card 20 is the same as Card 20 for K0DE=21. Card 21 is the same as Card 24 for K0DE=12. If KASF=1, i.e. column 23 of card 2 contains a 1, the following cards are needed. For any other number in column 23 of card 1, these cards are not needed. 21*i 22*i 1-7 8-14 43-49 50-80 1-7 ASFR ASFR Age-specific fertility rate for age group 15-19 for the date of the earlier distribution. The decimal point should be in Column 1 . Age-specific fertility rate for the age group 20-24 for the date of the earlier distribution. The decimal point should be in Column 8. Age-specific fertility rate for the age group 45-49 for the date of the earlier distribution. The decimal point should be in column 43. Blank Age-specific fertility rate for age group 15-19 for the date five years after the date of the earlier dis- tribution. The decimal point should be in Column 1. FWDRV 155 8-14 43-49 50-80 | Age-specific fertility rate for age jgroup 20-24 for the date five years lafter the date of the earlier dis- tribution. The decimal point should | be in Column 8. I I I | Age-specif ic fertility rate for age I group 45-49 for the date five years lafter the date of the earlier dis- tribution. The decimal point should |be in Column 43. I | Blank IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE FWDRV (PM A,PPMA,PFA,PPFA, PHB, PPMB, PFB, PPFB SXHA,SXFA,SXMB,SXFB,ASFR1,ASFR2,SRB,YEAR1,YEAR2) B. DESCRIPTION OF ARGUMENTS Name PHA How Obtained Definition PPBA PFA PPFA Transferred In Transferred In Transferred In Transferred In PMA contain the 5-year age groups of males for the earlier distribution. There can be a maximum of 17 age groups with the last age group being the open-ended age group. At least eleven age groups must be given and each age group given must be greater than or egual to one. If this is not the case, error message number 0431 will be written and the subroutine will return to the calling program. The number of male migrants by 5-year age groups for the first five years of the 10-year interval. There can be a maxi- mum of 17 age groups with the seventeenth one being the open- ended age group. PFA contains the 5-year age groups of females for the earlier distribution. There can be a maximum of 17 age groups with the last age group being the open- ended age group. At least eleven age groups must be given and each age group given must be greater than or egual to one. If this is not the case, error message number 0431 will be written and the subroutine will return to the calling program. The number of female migrants by 5-year age groups for the first five years of the 10-year interval- There can be a maximum of 17 age 156 DOCUMENTATION |PHB 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 i 1 1 1 1 I I Transferred In I I IPPHB (Transferred In I I I I |PFB | Transferred In I I 1 1 1 1 1 1 1 1 1 1 i 1 1 1 1 1 1 1 1 1 |PPFB |Transf erred In I ISXMA | Transferred In I I I 1 I 1 I I I I I |SXFA ITransferred In I I 1 I 1 I ITransferred In I ISXMB I I I I I I I I I I I I ISXFB ITransferred In I I I I groups with the seventeenth one being the open-ended age group. PHB contains the 5-year age groups of males for the later distribution. There can be a maximum of 17 age groups with the last age group being the open-ended age group. &t least eleven age groups must be given and each age group given must be greater than or egual to one. If this is not the case, error message number 04 31 will be written and the subroutine will return to the calling program. The number of male migrants by 5-year age groups for the last five years of the 10-year interval. There can be a maximum of 17 age groups with the seventeenth one being the open-ended age group. PFB contains the 5-year of females for the later There can be a maximum o with the last age group ended age group. At le age groups must be given age group given must be egual to one. If this i error message number 04 3 and the subroutine will calling program. age groups distribution, f 17 age groups being the open- ast eleven and each greater than or s not the case, 1 will be written return to the The number of female migrants by 5-year age groups for the last five years of the 10-year interval. There can be a maximum of 17 age groups with the last one being the open-ended age group. The 5-year survival for the first five y interval. There can and a minimum of 12 males. Each surviva than one and greater If this is not the c than 12 survival rat 0432 will be written will return to the c rates for males ears of the 10-year be a maximum of 17 survival rates for 1 rate must be less than or egual to zero, ase or if there are less es, error message number out and the subroutine ailing program. The 5-year survival rat for the first five year interval. There can be and a minimum of 12 sur females. Each survival than one and greater th If this is not the case than 12 survival rates, 0432 will be written ou will return to the call es for females s of the 10-year a maximum of 17 vival rates for rate must be less an or egual to zero. or if there are less error message number t and the subroutine ing program. The 5-year survival rates for males for the last five years of the 10-year interval. There can be a maximum of 17 and a minimum of 12 survival rates for males. Each survival rate must be less than one and greater than or egual to zero. If this is not the case or if there are less than 12 survival rates, error message number 0432 will be written out and the subroutine will return to the calling program. The 5-year survival rates for females for the last five years of the 10-year interval. There can be a maximum of 17 FWDRV 157 ASFE1 ASFR2 SRB YEAR1 YEAR2 Transferred In Transferred In Transferred In Transferred In Transferred In and a minimum of 12 survival rates for females. Each survival rate must be less than one and greater than or equal to zero. If this is not the case or if there are less than 12 survival rates, error message number 0432 will be written out and the subroutine will return to the calling program. The 5-year age-specific fertility rates for females 15-49 for the date of the earlier distribution. Each age-specific fertility rate must be greater than or egual to and less than .5. If this is not the case, error message number 0433 is written out and the subroutine will return to the calling program. The 5-year age-specific fertility rates for females 15-49 for the date five years after the date of the earlier distribution. Each age-specific fertility rate must be greater than or equal to 0. and less than .5. If this is not the case error message number 0433 is written out and the subroutine will return to the calling program. The sex ratio at birth. It must have a value between .9 and 1.1 or the sub- routine will write out error message number 0434 and return to the calling program. The year of the earlier distribution The year of the later distribution C. ERROR MESSAGES 0431 *** FWDRV ERROR NO. 0431 INPUT ERROR IN PMA,PFA,PMB OR PFB *** AT LEAST ONE DISTRIBUTION HAS DATA FOR LESS THAN 11 AGE GRODPS, OR HAS VALUES LESS THAN 1.0. 0432 *** FWDRV ERROR NO. 0432 INPUT ERROR IN SXMA,SX FA,SXMB OR SXFB *** AT LEAST ONE DISTRIBUTION OF SURVIVAL RATES HAS DATA FOR LESS THAN 12 AGE GROUPS *** DR HAS VALUES LESS THAN 0. OR GREATER THAN 1.0. 0433 *** FWDRV ERROR NO. 0433 INPUT ERROR ASFR1 OR ASFR2 *** AT LEAST ONE AGE-SPECIFIC FERTILITY RATE IS LESS THAN ZERO OR GREATER THAN .5. 0434 *** FWDRV ERROR NO. 0434 INPUT ERROR IN SRB *** THE SEX RATIO AT BIRTH MUST BE BETWEEN .9 AND 1.1. V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c C MAIN PROGRAM FOR FWDRV c c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN EIGHT READ C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS 158 DOCUMENTATION C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT OSES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE C INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET C FOLLOWING THIS ONE, (2) THE LATER DATE (DAY ,TMO, YEAR) FOR WHICH THE C LATER POPULATION DISTRIBUTION IS GIVEN, (3) THE SEX RATIO AT C BIRTH (SRB), (4) THE MORTALITY INDICATOR (KODE) USED TO SPECIFY C WHETHER AGE SPECIFIC SURVIVAL RATES ARE TO BE GIVEN OR A REGIONAL C MODEL LIFE TABLE IS TO BE USED FOR THE MIDDLE OF EACH FIVE YEAR C PERIOD, AND (5) THE FERTILITY INDICATOR (KASF) USED TO SPECIFY IF C AGE-SPECIFIC FERTILITY RATES ARE BEING PROVIDED FOR THE FIRST C HALF OF THE TEN YEAR INTERVAL. C NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 c INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER c — _ PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA c FOLLOWING THIS ONE. C DAY IS COLUMNS 3-4 OF THIS CARD. IT SHOULD BE ENTERED AS XX c so T HAT IT £NDS IN COLUMN 4, I.E. IF IT IS THE FIRST DAY OF c THE MONTH IT WOULD BE ENTERED AS 01. C TMO IS IN COLUMNS 5-6 OF THIS CARD. IT SHOULD BE ENTERED SO c THaT IT ENDS IN COLUMN 6. c YEAR IS IN COLUMNS 7-10 OF THIS CARD. C SRB IS IN COLUMNS 15-20 OF THIS CARD. IT SHOULD BE ENTERED C WITH THE DECIMAL POINT IN COLUMN 16. C KODE IS IN COLUMNS 21 AND 22 OF THIS CARD. IF THE MORTALITY c __ DaTA F0R THE first HALF OF THE TEN YEAR INTERVAL IS TO BE C PROVIDED AS SURVIVAL RATES, A 1 SHOULD BE PUNCHED IN c COLUMN 21. IF THE MORTALITY FOR THE FIRST HALF OF THE TEN c YEAR INTERVAL IS TO BE BASED ON THE COALE-DEMENY REGIONAL C MODEL LIFE TABLE A 2 SHOULD BE ENTERED IN COLUMN 21. ANY C OTHER NUMBER PUNCHED IN COLUMN 21 IS AN ERROR AND WILL CAUSE c MAIN PROGRAM TO STOP. IF THE MORTALITY DATA FOR THE LAST C HALF OF THE TEN YEAR INTERVAL IS TO BE PROVIDED AS SURVIVAL C RATES, A 1 SHOULD BE PUNCHED IN COLUMN 22. IF THE MORTAL- c ITY FOR THE LAST HALF OF THE TEN YEAR INTERVAL IS TO BE C BASED ON THE COALE-DEMENY REGIONAL MODEL LIFE TABLE A 2 C SHOULD BE ENTERED IN COLUMN 22. ANY OTHER NUMBER PUNCHED c IN COLUMN 22 IS AN ERROR AND WILL CAUSE THE MAIN PROGRAM C TO STOP. C KASF IS IN COLUMN 23 OF THIS CARD. A 1 PUNCHED IN COLUMN 23 c INDICATES THAT AGE-SPECIFIC FERTILITY RATES ARE TO BE c PROVIDED FOR THE DATE OF THE EARLIER AGE DISTRIBUTION AND c FIVE YEARS LATER. C c THE THIRD READ STATEMENT USES TWO DATA CARDS. c the PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE HALE C POPULATION AGE DISTRIBUTION (PM) IN FIVE YEAR AGE GROUPS FOR THE C EARLIER DISTRIBUTION. c PM(I,1) VALUES ARE ENTERED ON TWO CARDS. FOR EACH PM VALUE EIGHT C COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS C OF THE FIRST CARD. A MAXIMUM OF TEN PM VALUES CAN APPEAR C ON THE FIRST CARD SO THAT THE VALUES END IN COLUMNS 8, 16, c 24, ..., 72, AND 80. THE SECOND CARD CAN CONTAIN A MAXIMUM C OF SEVEN PM VALUES AND THE VALUES SHOULD BE ENTERED IN THE C SAME MANNER AS ON THE FIRST CARD EXCEPT THAT THE LAST VALUE C ON THE SECOND CARD WILL END IN COLUMN 56. IF LESS THAN C SEVENTEEN VALUES ARE TO BE GIVEN, TWO CARDS MUST STILL BE C USED WITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR c THE NUMBER OF PM VALUES. C C THE FOURTH READ STATEMENT USES TWO DATA CARDS. c THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE FEMALE C POPULATION DISTRIBUTION (PF (1,1)) IN FIVE YEAR AGE GROUPS FOR THE c EARLIER DATE PF(I,1) VALUES ARE CONTAINED ON TWO CARDS AND HAVE c THE SAME REQUIREMENTS AS PM VALUES. C c THE PURPOSE OF THE FIFTH READ STATEMENT IS TO READ IN THE MALE c POPULATION IN FIVE YEAR AGE GROUPS FOR THE LATER DATE PM(I,2). c PM(I,2) VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAME C REQUIREMENTS AS PM(I,1). C C THE PURPOSE OF THE SIXTH READ STATEMENT IS TO READ IN THE FEMALE c DISTRIBUTION FOR THE LATER DATE PF(I,2). C c THE SEVENTH READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE c SEVENTH READ STATEMENT IS TO READ IN THE TOTAL NUMBER OF MIGRANTS FWDRV 159 C (PMMT) FOP EACH FIVE TEAR INTERVAL. C PMMT IS CONTAINED ON ONE CARD. THE FIRST VALUE IS FOR THE FIRST c FIVE YEARS OF THE TEN YEAR INTERVAL AND THE SECOND VALUE c IS for THE SECOND FIVE YEAR INTERVAL. c F0R EiCH PHMT VALUE, EIGHT DIGITS ARE ALLOWED WITH THE c FIRST NUMBER ENDING IN COLUMN 8 AND THE SECOND NUMBER C ENDING IN COLUMN 16. C C THE EIGHTH READ STATEMENT USES FOUR DATA CARDS. C THE PURPOSE OF THE EIGHTH READ STATEMENT IS TO READ IN THE C PERCENT DISTRIBUTION OF THE MALE AND FEMALE MIGRANTS (PMM AND C PMF) IN FIVE YEAR AGE GROUPS FOR THE FIRST FIVE YEARS OF THE C TEN YEAR INTERVAL. THE TOTAL MALE AND FEMALE MIGRANTS (PMM C AND PMF) MUST ADD TO 1.00. THERE ARE TWO CARDS FOR MALE C MIGRANTS (PMM) FOLLOWED BY TWO CARDS FOR FEMALE MIGRANTS (PMF) . C PMM VALUES ARE CONTAINED ON TWO CARDS. THERE ARE EIGHT DIGITS C ALLOWED FOR EACH PMM VALUE WITH THE DECIMAL POINT IN C COLUMN 1,9,17, 65 AND 73. THUS, THERE ARE TEN VALUES c ON THE FIRST CARD. THE SECOND CARD CONTAINS SEVEN VALUES C WITH THE LAST VALUE IN COLUMN 49-56. C PMF VALUES ARE CONTAINED ON TWO CARDS. PMF VALUES HAVE THE C SAME REQUIREMENTS AS PMM VALUES. C C THE NINTH READ STATEMENT USES FOUR DATA CARDS. C THE PURPOSE OF THE NINTH READ STATEMENT IS TO READ IN THE C PERCENT DISTRIBUTION OF THE MALE AND FEMALE MIGRANTS (PMM AND C PMF) IN FIVE YEAR AGE GROUPS FOR THE LAST FIVE YEARS OF THE C TEN YEAR INTERVAL.. THE TOTAL MALE AND FEMALE MIGRANTS C (PMM AND PMF) MUST ADD TO 1.00. THERE ARE TWO CARDS FOR MALE C MIGRANTS (PMM) FOLLOWED BY TWO CARDS FOR FEMALE MIGRANTS (PMF). C PMM VALUES ARE CONTAINED ON TWO CARDS. THERE ARE EIGHT DIGITS C ALLOWED FOR EACH PMM VALUE WITH THE DECIMAL POINT IN C COLUMN 1,9,17, 65 AND 73. THUS, THERE ARE TEN VALUES C ON THE FIRST CARD. THE SECOND CARD CONTAINS SEVEN VALUES C WITH THE LAST VALUE IN COLUMN 49-56. c PM p VALUES ARE CONTAINED ON TWO CARDS. PMF VALUES HAVE THE C SAME REQUIREMENTS AS PMM VALUES. C C THE TENTH READ STATEMENT USES BETWEEN ONE AND EIGHT DATA CARDS. C THE PURPOSE OF THE TENTH READ STATEMENT IS TO READ IN THE C MORTALITY DATA. THIS CAN BE READ IN FOUR ALTERNATIVE WAYS. THE C ALTERNATIVE THAT IS TO BE USED DEPENDS ON THE MORTALITY INDICATOR C KODE READ BY THE SECOND READ STATEMENT. C ALTERNATIVE 1, KODE = 11, I.E. AN 11 PUNCHED IN COLUMNS 21 AND 22 C OF CARD 2, SURVIVAL RATES (SRX) ARE TO BE READ FOR BOTH c THE BEGINNING AND ENDING INTERVALS. C SRX VALUES ARE CONTAINED ON EIGHT CARDS, FOUR CARDS FOR C THE FIRST FIVE YEARS OF THE TEN YEAR INTERVAL ANDS C FOUR CARDS FOR THE LAST FIVE YEARS OF THE TEN YEAR C INTERVAL. FOR THE FIRST FIVE YEARS, THERE ARE TWO C CARDS ALLOWED FOR THE SURVIVAL RATES FOR EACH SEX. C FIRST THERE ARE TWO CARDS FOR THE MALE SURVIVAL RATES C FOLLOWED BY TWO CARDS FOR THE FEMALE SURVIVAL RATES. C FOR EACH FIVE YEAR SURVIVAL VALUE, EIGHT DIGITS ARE C ALLOWED WITH A DECIMAL POINT IN COLUMNS 1, 9, 17, C ..., 65, AND 73. THUS, THERE ARE TEN SURVIVAL C RATES FOR MALES ON THE FIRST CARD. THE SECOND CARD C CAN CONTAIN SEVEN SURVIVAL RATES FOR MALES C ENTERED IN THE SAME MANNER AS ON THE FIRST CARD. THE C LAST VALUE THAT CAN BE ON THE SECOND CARD IS IN C COLUMNS 49-56 WITH A DECIMAL POINT IN COLUMN 49. IF C LESS THAN SEVENTEEN VALUES ARE TO BE GIVEN, TWO CARDS C MUST STILL BE USED WITH DATA ONLY IN THE NUMBER OF C COLUMNS NECESSARY FOR THE NUMBER OF MALE SURVIVAL C RATES GIVEN. THE THIRD AND FOURTH CARDS ARE FOR C FEMALE SURVIVAL RATES FOR THE FIRST FIVE YEARS AND C HAVE THE SAME REQUIREMENTS AS THE FIRST TWO CARDS. C CARDS FIVE THROUGH EIGHT ARE FOR THE LAST FIVE YEARS C AND SHOULD HAVE THE DATA ENTERED IN THE SAME MANNER C AS THE FIRST FOUR CARDS. C ALTERNATIVE 2, KODE = 12 ,I.E. A 12 PUNCHED IN COLUMNS 21 AND c 22 OF CARD 2, SURVIVAL RATES (SRX) ARE TO BE READ FOR C THE FIRST FIVE YEARS OF THE TEN YEAR INTERVAL, AND C COALE-DEMENY REGIONAL MODEL LIFE TABLES ARE TO BE USED FOR c THE LAST FIVE YEARS OF THE TEN YEAR INTERVAL SO THAT LIFE c EXPECTANCIES AT BIRTH(EO) ARE NEEDED FOB EACH SEX AND A C REGION (NREG) MUST BE INDICATED. FIVE CARDS ARE NEEDED FOR 160 DOCUMENTATION c THIS ALTERNATIVE. C SRX VALUES ARE CONTAINED ON FOUR CARDS AND HOST BE C SUPPLIED ON THE FIRST FOUR CARDS THE SAME AS C SPECIFIED IN ALTERNATIVE 1. C EO VALUES ARE CONTAINED ON THE FIFTH CARD. ONE C VALUE BUST BE GIVEN FOR EACH SEX WITH SIX C DIGITS ALLOWED FOR EACH VALUE. THE VALUE FOR C MALES IS IN COLUMNS 1-6 WITH A DECIMAL POINT IN C COLUMN 3. THE VALUE FOR FEMALES IS IN COLUMNS C 7-12 WITH THE DECIMAL POINT IN COLUMN 9. C NREG IS IN COLUMN 13 OF THE FIFTH CARD. A VALUE C OR 1, 2, 3, OR 4 PUNCHED IN COLUMN 13 INDI- C CATES WEST, NORTH, EAST, OR SOUTH, RESPEC- C RTIVELY. C ALTERNATIVE 3, KODE = 21, I.E. A 21 PUNCHED IN COLUMNS 21 AND 22 c OF CARD 2, COALE-EEMENY REGIONAL MODEL LIFE TABLES ARE TO c BE 0SED por THE FIRST FIVE YEARS OF THE TEN YEAR INTERVAL c so TH AT life EXPECTANCIES AT BIRTH (EO) ARE NEEDED c poR EACH SEX AND A REGION (NREG) MUST BE INDICATED, AND C SURVIVAL RATES (SRX) ARE TO BE READ FOR THE LAST FIVE YEARS C OF THE TEN YEAR INTERVAL. FIVE CARDS ARE NEEDED FOR THIS C ALTERNATIVE. C EO VALUES ARE CONTAINED ON THE FIRST CARD OF THIS C GROUP. EXCEPT FOR BEING ON THE FIRST CARD THEY C SHOULD BE ENTERED IN THE SAME MANNER AS C SPECIFIED IN ALTERNATIVE 2. C NREG IS CONTAINED ON THE FIRST CARD AND EXCEPT FOR C THAT FACT SHOULD BE ENTERED IN THE SAME MANNER C AS SPECIFIED IN ALTERNATIVE 2. C SRX VALUES ARE CONTAINED ON FOUR CARDS. IN THIS C CASE ON CARDS TWO THROUGH FIVE AND SHOULD BE C ENTERED IN THE SAME MANNER AS THE FIRST FOUR C CARDS IN ALTERNATIVE 1. C ALTERNATIVE 4, KODE = 22,1. E. A 22 PUNCHED IN COLUMNS 21 AND 22 C OF CARD 2, COALE-DEMENY REGIONAL MODEL LIFE TABLES C ARE TO BE USED FOR BOTH THE FIRST FIVE AND LAST FIVE YEARS. c THUS, LIFE EXPECTANCIES AT BIRTH (EO) ARE NEEDED AND A C REGION (NREG) MUST BE INDICATED. TWO CARDS ARE NEEDED FOR c THIS ALTERNATIVE AND MUST BOTH BE SPECIFIED IN THE SAME C MANNER BUT WITH DATA SUPPLIED FOR THE TWO DIFFERENT DATES. c THUS, TWO CARDS MUST BE COMPLETED AS INDICATED BELOW. C EO VALUES MUST BE ENTERED AS GIVEN FOR CARD FIVE OF C ALTERNATIVE 2. C NREG MUST BE ENTERED AS GIVEN FOR CARD FIVE OF C ALTERNATIVE 2. C C IF KASF = 1,I.E. A 1 PUNCHED IN COLUMN 23 OF CARD 2, THEN THE c ELEVENTH READ IS NEEDED. IT READS IN TWO CARDS. THE PURPOSE C OF THE ELEVENTH READ STATEMENT IS TO READ IN AGE-SPECIFIC C FERTILITY RATES (ASFR) FOR THE DATE OF THE EARLIER DISTRIBUTION C AND FIVE YEARS LATER. C ASFR VALUES ARE CONTAINED ON TWO CARDS. THE FIRST CARD CONTAINS c THE AGE-SPECIFIC FERTILITY RATES FOR THE DATE OF THE c EARLIER DISTRIBUTION. THERE ARE SEVEN VALUES ON THE FIRST c caRD PERTAINING TO FEMALES AGE 15-19, 20-24, ... 45-45. c SEVEN COLUMNS ARE ALLOWED FOR EACH VALUE WITH THE DECIMAL c POINT IN COLUMN 1, 8, ... 43. THE SECOND CARD CONTAINS THE C AGE-SPECIFIC FERTILITY RATES FOR THE DATE FIVE YEARS AFTER C THE DATE OF THE -EARLIER DISTRIBUTION. c C DIMENSION PH(17,2) ,PF(17,2) ,CDMLT (18,8) ,EOM (3) ,EOF(3) ,ASFR (7,2) , *SRH (17,2) ,SRF(17,2) ,PMMT (2) ,PMH (17,2) ,PHF(17,2) , KODE (2) NREAD = 1 NPRNT = 15 C ■ C READ IN THE DATA c . C 10 READ(NREAD,11) 11 F0RHAT(1X,52H ) READ(NREAD, 22) NXT, DAY,TM0, YEAR, SRB, (KODE(I) ,1=1, 2), KASF 22 F0RMAT(I1,1X,2F2.0,F4.0,4X,F6.4,3I1) DO 12 J=1,2 READ (NREAD, 33) (PH (I, J) ,1=1,17) 33 FORMAT (10F8.0) FWDRV 161 READ(NREAD,33) (PF (I , J) ,1=1 ,17) 12 CONTINUE READ(NREAD,44) (PMMT (J) , J=1 ,2) DO 13 J=1,2 READ(NREAD,55) (PMM (I , J) ,1 = 1, 1 7) READ(NREAD,55) (PMF (I, J) , 1=1, 17) 13 CONTINDE 14 CONTINUE 44 FORMAT (2F10.0) 55 FORMAT(10F8.7,/,7F8.7) C c C DETERMINE HOW THE MORTALITY DATA IS TO BE READ AND OBTAIN C SURVIVAL RATES IF LIFE EXPECTANCY AT BIRTH IS SIVEN c C DO 126 J=1,2 IF (KODE(J) - 1) 1010,30,50 30 READ(NREAD,77) (SRM (I, J) ,1=1, 17) READ(NREAD,77) (SRF (I , J) ,1 = 1 , 17) RM = 5.0 EOH (J) =0.0 DO 37 1=1,16 IF (SRM(I + 1,1) - 0.001) 40,35,35 35 RM = RM * SRM (I, J) 37 BOH (J) = EOM(J) + RM I = 17 40 EOM(J) = EOM(J) + ((RM*SRM(I,J))/(1.0 - SRM (I, J))) RF = 5.0 EOF (J) =0.0 DO 45 1=1,16 IF (SRF(I+1,1) - 0.001) 47, 43, 43 43 RF = RF * SRF (I, J) 4 5 EOF (J) ■ EOF (J) + RF I = 17 47 EOF (J) = EOF(J) + ( ( RF*SRF (I, J) ) / (1 . - SRF(I,J))) 77 FORMAT (10F8.0) GO TO 126 50 CONTINUE IF (KODE(J) - 2) 1010,60,1010 60 READ(NREAD,88) EOM (J) ,EOF (J) , NREG 88 FORHAT(2F6.3,I1) C c C TEST EO VALUES AND NREG FOR APPROPRIATE VALUES c C IF (EOM(J)-20.0) 1020,85,80 80 CONTINUE IF (EOM(J)-80.0) 85,85,1020 85 CONTINUE IF (EOF(J) - 20.0) 1020,90,90 90 CONTINUE IF (EOF (J) - 80.0) 95,95,1020 9 5 CONTINUE IF (NREG - 1) 1030,110,100 100 CONTINUE IF (NREG - 4) 110,110,1030 110 CALL MLT(EOH(J) , 1 ,NREG,CDMLT) DO 120 I = 1,17 120 SRH(I,J) = CDHLT (1,6) CALL MLT(EOF(J),2,NREG,CDMLT) DO 125 I =1,17 125 SBF(I,J) = CDHLT(I,6) 126 CONTINUE IF (KASF - 1) 150,130,150 130 DO 140 J=1,2 READ(NREAD,99) (ASFR (I, J) , 1=1 ,7) 99 FORMAT (7F7. 6) 140 CONTINUE GO TO 200 150 DO 160 J=1,2 DO 160 1=1,7 160 ASFR (I, J) = 0.0 C c C WRITE OUT IDENTIFICATION 162 DOCUMENTATION c C 200 YEAR2 = YEAR + (. 0833* (TMO-1-) ) + (. 0027* (DAI- 1.) ) YEAR1 - YEAR2 - 10.0 WRITE(NPRNT,111) 111 FORMAT(1H1) WRITE (NPRNT, 11) C c _ _ c CALCULATE NUMBER OF MIGRANTS BY AGE AND SEX FOR EACH REVERSAL c C DO 300 1=1,2 DO 300 J=1,17 PMM(J,I) = PHM(J,I) * PMMT (I) 300 PMF(J,I) = PMF(J,I) * PMMT (I) C C C REJUVENATION LOOP c C CALL FWDRV(PM (1,1) ,PMM (1 , 1) ,PF (1 , 1) ,PMF(1,1) , PM (1 , 2) , PMM ( 1, 2) , *PF(1,2) ,PMF(1,2) ,SRM(1,1) ,SRF(1,1) ,SRM (1 ,2) ,SRF (1 ,2) , *ASFR (1,1) ,ASFR(1,2) , SRB, YEAR1 , YEAR2) IF (NXT) 10,1000,10 C c C ERRORS IN INPUT DATA FOR THE MAIN PROGRAM C C 1010 WRITE (NPRNT, 111) WRITE(NPRNT,1011) 1011 FORMAT (/, 1X,95H*** ERROR IN INPUT FOR MAIN PROGRAM -- KODE, YOU SH *0ULD CHECK ALL OF YOUR INPUT DATA CAREFULLY.) GO TO 1000 1020 WRITE (NPRNT,111) WRITE (NPRNT,1021) 1021 FORMAT (/, 1X,71H*** ERROR IN INPUT FOR MAIN PROGRAM — EO IS NOT BE *TWEEN 20-0 AND 80. 0. ,/, 5X,50HYOU SHOULD CHECK ALL OF YOUR INPUT DA *TA CAREFULLY.) GO TO 1000 1030 WRITE (NPRNT, 111) WRITE (NPRNT, 1031) 10J. FORMAT (/,1X,65H*** ERROR IN INPUT FOR MAIN PROGRAM — NREG IS NOT *1, 2, 3, OR «»-,/, 5X,50HYOi5 SHOULD CHECK ALL OF YOUR INPUT DATA CAR *EFUL1 Y.) GO TO 1000 1000 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE FWDRV (PMA,PPHA, PFA, PPFA,PMB, PPMB,PFB, PPFB, SXMA, SXFA, SXM *B,SXFB,ASFR1,ASFR2,SRB,YEAR1,YEAR2) c . c C PROGRAM NO. 0430 C c C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE PMA,PMB,PPMA,PPMB, C PFA,PFB,PPFA,PPFB,SXMA,SXMB, SXFA,SXFB, ASFR1, ASFR2, SRB,YEAR1, C AND YEAR2. C PMA IS THE MALE POPULATION IN FIVE YEAR AGE GROUPS FOR THE C EARLIER DISTRIBUTION. C PPHA IS THE MALE MIGRANTS BY FIVE YEAR AGE GROUPS FOR THE C EARLIER DISTRIBUTION. C PFA IS THE FEMALE POPULATION IN FIVE YEAR AGE GROUPS FOR THE C EARLIER DISTRIBUTION- c PPPA Is TH B FEMALE MIGRANTS IN FIVE YEAR AGB GROUPS FOR THE C EARLIER DISTRIBUTION. C SXMA IS THE FIVE YEAR SURVIVAL RATES. FOR MALES IN THE EARLIER c DISTRIBUTION. FWDRV 163 c SXFA IS THE FIVE YEAR SURVIVAL RATES FOR THE FEMALES IN THE c EARLIER DISTRIBUTION. C PUB IS THE HALE POPULATION IN FIVE YEAR AGE GROUPS FOR THE c LATER DISTRIBUTION. C PPMB IS THE HALE MIGRANTS BY FIVE YEAR AGE GROUPS FOR THE LATER c DISTRIBUTION. C PBA IS THE FEMALE POPULATION IN FIVE YEAR AGE GROUPS FOR THE c LATER DISTRIBUTION. c pp BA IS THE FEMALE MIGRANTS IN FIVE YEAR AGE GROUPS FOR THE C LATER DISTRIBUTION. C SXMB IS THE FIVE YEAR SURVIVAL RATES FOR MALES IN THE LATER c DISTRIBUTION. C SXFB IS THE FIVE YEAR SURVIVAL RATES FOR THE FEMALES IN THE c LATER DISTRIBUTION. C ASFR1 IS THE FIVE YEAR AGE-SPECIFIC FERTILITY RATES FOR FEMALES c 15-49 FOR THE EARLIER DATE. C ASFR2 IS THE FIVE YEAR AGE-SPECIFIC FERTILITY RATES FOR FEMALES c 15-49 FOR THE MID-INTERVAL DATE. C YEAR 1 IS THE YEAR OF THE EARLIER DISTRIBUTION. C YEAR 2 IS THE YEAR OF THE LATER DISTRIBUTION. c C DIMENSION PMA (17) ,PFA(17) ,PMB{17) ,PFB(17) ,SXMA(17) , SXFA (17) , * SXMB (17) , SXFB (17) ,ASFR1(7) ,ASFR2(7) ,PPMA(17) ,PPFA(17) , * PPMB (17) , PPFB(17) , PPAR1 (8) ,PPAR2 (8) , PMC (17) , PFC(17) , * ASFR3(7) ,ASFR4 (7) ,PMA1 (17) ,PFA1 (17) ,PMB1 (17) ,PFB1(17) NPRNT = 15 C C C VERIFY INPUT ARGUMENTS c _ C NERR = DO 10 1=1,17 IF (PMA(I) - 1.0) 15,10,10 10 CONTINUE GO TO 26 15 CONTINUE IF (I - 11) 90,90,20 20 DO 25 J=I,17 IF (ABS(PMA(J)) - .000001) 25,25,90 25 CONTINUE 26 DO 30 1=1,17 IF (PFA(I) - 1.0) 35,30,30 30 CONTINUE GO TO 46 35 CONTINUE IP (I - 11) 90,90,40 40 DO 45 J=I,17 IF (ABS(PFA(J)) - .000001) 45,45,90 45 CONTINUE 46 DO 50 1=1,17 IF (PMB(I) - 1.0) 55,50,50 50 CONTINUE GO TO 66 55 CONTINUE IF (I - 11) 90,90,60 60 DO 65 J=I,17 IF (ABS(PMB(J)) - .000001) 65,65,90 65 CONTINUE 66 DO 70 1=1,17 IF (PFB(I) - 1.0) 75,70,70 70 CONTINUE GO TO 100 75 CONTINUE IF (I - 11) 90,90,80 80 DO 85 J=I,17 IF (ABS(PFB(J)) - .000001) 85,85,90 85 CONTINUE GO TO 100 90 HRITE(NPRNT,111) 111 FORMAT (//,63H *** FWDRV ERROR NO. 0431 — INPUT ERROR IN PMA,PFA,P *HB, OR PFB, */, 108H *** AT LEAST ONE POPULATION DISTRIBUTION HAS DATA FOR LESS ♦THAN 11 AGE GROUPS, OR HAS VALUES LESS THAU 1.0.) NERR = 1 164 DOCUMENTATION 100 DO 110 1=1,17 IF (SXMA(I) - 0.1) 115,105,105 105 CONTINUE IF (SXMA(I) - 1.0) 110,110,190 110 CONTINUE GO TO 121 115 CONTINUE IF (I - 12) 190,190,117 117 DO 120 J=I, 17 IF (ABS (SXNA(J)) - .000001) 120,120,190 120 CONTINUE 121 DO 130 1=1,17 i? (SXFA(I) - 0.1) 135,125,125 125 CONTINUE IF (SXFA(I) - 1.0) 130,130,190 130 CONTINUE GO TO 141 135 CONTINUE IF (I - 12) 190,190,137 137 DO 140 J=I,17 IF (ABS(SXFA(J)) - .000001) 140,140,190 140 CONTINUE 141 DO 150 1=1,17 IF (SX«B(I) - 0.1) 155,145,145 145 CONTINUE IF (SXMB(I) - 1.0) 150,150,190 150 CONTINUE GO TO 161 155 CONTINUE IF (I - 12) 190,190,157 157 DO 160 J=I,17 IF (ABS(SXMB(J)) - .000001) 160,160,190 160 CONTINUE 161 DO 170 1=1,17 IF (SXFB(I) - 0.1) 175,165,165 165 CONTINUE IF (SXFB(I) - 1.0) 170,170,190 170 CONTINUE GO TO 240 175 CONTINUE IF (I - 12) 190,190,177 177 DO 180 J=I,17 IF (ABS(SXFB(J)) - .000001) 180,180,190 180 CONTINUE GO TO 240 190 HRITE(NPRNT,222) 222 FORMAT (//69H *** FWDRV ERROR NO. 0432 — INPUT ERROR IN SXMA, SXFA *, SXMB, OR SXFB, */85H *** AT LEAST ONE DISTRIBUTION OF SURVIVAL RATES BAS DATA FOB ♦LESS THAN 12 AGE GROUPS, */,52H *** OR HAS VALUES LESS THAN 0. OR GREATER THAN 1.0.) NERR = 1 240 ISH1 = 1 ISW2 = 1 DO 265 1=1,7 IF (ABS (ASFR1 (I)) - 0.000001) 258,258,252 252 CONTINUE IF (ASFR1(I)) 275,254,254 254 CONTINUE IF (ASFR1 (I) - 0.5) 256,256,275 256 CONTINUE ISH1 = 258 CONTINUE IF (ABS(ASFR2 (I)) - 0.000001) 265,265,260 260 CONTINUE IF (ASFR2(I)) 275,262,262 262 CONTINUE IF (ASFR2(I) - 0.5) 264,264,275 264 ISW2 = 265 CONTINUE IF (ISH1) 266,268,266 266 CONTINUE DO 267 1=1,7 267 ASFR1 (I) = 0.03 268 CONTINUE IF (ISH2) 280,280,269 269 CONTINUE FWDRV 165 DO 270 1=1,7 270 ASFR2(I) = 0.03 GO TO 280 275 WRITE (NPRNT, 333) 333 FORMAT (//58H *** FWDRV ERROR NO- 0433 — INPUT ERROR IN ASFR1 OR A *SFR2,/,82H *** AT LEAST ONE AGE-SPECIFIC FERTILITY RATE IS LESS TH *AN 0.0 OR GREATER THAN 0.5) NERR = 1 290 CONTINUE IF (SRB - 0.9) 300,310,295 295 CONTINUE IF (SRB - 1.1) 310,310,300 300 WRITE (NPRNT, 444) 444 FORMAT (//47H *** FWDRV ERROR NO. 0434 — INPUT ERROR IN SRB, ♦/,51H *** SEX RATIO AT BIRTH BUST BE BETWEEN 0.9 AND 1.1) NERR = 1 310 CONTINUE IF (NERR) 320,400,320 320 WRITE (NPRNT, 555) PMA, PPM A,PFA, PPFA ,PMB,PPMB,PFB, PPFB, SXMA,SXFA, * SXMB,SXFB,SRB 555 FORMAT (/26H *** FWDRV INPUT ARGUMENTS *//6H PMA= ,9F12.0,/,6X,8F12.0,//,6H PPMA = , 9F12. 0,/, 6X, 8F12.0, *//6H PFA= ,9F12.0,/,6X,8F12.0,//,6H PPFA= , 9F 12. 0,/,6X, 8F12.0, *//6H PMB= ,9F12.0,/,6X,8F12.0,//,6H PPMB= ,9F12. 0,/,6X,8F12.0, *//6H PFB= ,9F12.0,/,6X,8F12.0,//,6H PPFB= , 9F12. 0,/,6X,8F12.0, *//6H SXMA= ,9F12.4,/,6X,8F12.4,//,6H SXFA= ,9F 12. 4, /, 6X,8F12. 4, *//6H SXMB= ,9F12.4,/,6X,8F12.4,//,6H SXFB = ,9F12. 4, /, 6X, 8F12. 4, *//, 6H SRB= ,F8.3) WRITE (NPRNT, 556) ASFR 1, ASFR2, YEAR 1 , YEAR2 556 FORMAT (//,9H ASFR1= ,7F12.7,//,9H ASFR2= ,7F12.7,//, *8H YEAR1= ,F7.2,10X,8H YEAR2= ,F7.2) TPMB = 0.0 TPFB = 0.0 DO 330 1=1,17 PMB(I) = 0.0 330 PFB(I) =0.0 GO TO 1000 C c C PROJECT EARLIER POPULATION (PMA AND PFA) AND C REJUVENATE LATER POPULATION (PMB AND PFB) c C 400 CALL ABREV (1, PMA, PMB, N6) CALL ABREV (2, SXMB, SXFB, NG) CALL ABREV (2,SXHA,SXFA ,NG) CALL ABREV (3 ,PMA,SXFA, NG) CALL ABREV (3, PMB, SXFB, NG) CALL ABREV ( 1, PM A, PFA, NG) CALL ABREV (1, PMB, PFB, NG) DO 405 1=1,17 PHA1 (I) = PMA (I) PFA1 (I) = PFA (I) PMC (I) =0.0 PFC (I) = 0.0 PMB1 (I) = PMB (I) 405 PFB1 (I) = PFB (I) CALL PR0J5(PMA1,TPMA,PPMA,PFA1,TPFA,PPFA,SXMA,SXFA,ASFR1,ASFR2,SRB *,PPAR1) CALL REVR5 (PMB 1 ,T PMB, PPMB, PFB1 , TPFB, PPFB, SXMB, SXFB, PPAR 2) DO 406 1=1,7 ASFR3 (I) = PPAR2(5) 406 ASFR4(I) = PPAR2(5) C c C AVERAGE TWO POPULATIONS (PMB AND PFB) AND PROJECT TO LATER DATE c C YEAR3 = (YEAR1 + YEAR2) / 2.0 WRITE (NPRNT, 666) YEAR3 WRITE (NPRNT, 567) YEAR 1 ,YEAR2, YEAR 1 ,YEAR2 567 FORMAT (1 1X , F7. 2, 8X, F7.2, 23X,F7 .2, 8X,F7.2) WRITE (NPRNT, 566) 566 FORMAT(3X,3HAGE,/,1X,5HGROUP,3X,2 (9HPROJECTED, 6X, 8HREVERSSD,7X, *7HAVERAGE,8X) ,/) K = K4 = K + 4 166 DOCUMENTATION IF (ISW1 + ISW2) 510,510,520 510 PBC(1) = (PHB1(1) ♦ PBA1(1)) / 2.0 PPC(1) = (PFB1(1) ♦ PFA1(1)) / 2.0 WRITE (NPRMT, 588) K,K4,PHA1(1) , PMB1 (1) , PHC(1) , PFA1 (1),PFB1(1) , *PFC (1) GO TO 522 520 PMC(1) = PHB(1) PFC (1) = PFB(1) WRITE (NPRNT, 521) K,K4,PHB1 (1) ,PFB1 (1) 521 F0RHAT(1X,I2, 1H-,I2, 18X, F8. 0,36X,F8. 0) 522 NGH1 = NG - 1 DO 410 I=2,NGH1 PMC (I) » (PHB1(I) «■ PMA1(I)) / 2.0 PFC (I) = (PFB1(I) ♦ PFA1(I)) / 2.0 K = (I - 1) * 5 K4 = k + 4 WRITE (NPRNT, 588) K,K4,PHA1 (I) ,PMB1 (I) ,PHC(I) ,PFA1 (I) ,PFB1 (I) , * PFC (I) 588 FORHAT(1X,I2,1H-,I2,4X,F8.0,6X,F8.0,6X,F8.0,8X,F8.0,6X,F8.0, *6X,F8.0) PHB1 (I) = PMC (I) 410 PFB1 (I) = PFC (I) PHC(NG) = (PHAI(NG) ♦ PHB1(NG)) / 2.0 PFC(NG) = (PFA1(NG) * PFB1 (NG) ) / 2. K = 5 * (NG - 1) WRITE (NPRNT, 599) K,PMA1 (NG) ,PMB1 (NG) ,PHC(NG) ,PFA1 (NG) ,PFB1(NG) , *PFC(NG) 599 F0RHAT<2X,I2,2H* ,4X,F8. 0,6X,F8. 0,6X, F8. 0, 8X, F8.0,6X,F8.0, 6X, *F8.0) PHB1 (NG) = PMC(NG) PFB1 (NG) = PFC(NG) WRITE (NPRNT, 611) YEAR3, YEAR2,PPAR2 (3) 611 FORMAT (/, 1X,21HCR0DE BIRTH RATE FOR ,F7.2,3H - ,F7.2,3H = ,F6.4) CALL PROJ5 (PHB1,TPMB, PPMB, PFB1 ,TPFB,PPFB,SXMB,SXF B, ASFR3, ASFR4,SRB *,PPAB1) CALL REVR5 (PMC,TPMC,PPHA, PFC,TPFC , PPFA, SXMA, SXFA, PPAR2) C C C WRITE OOT RESOLTS c . C TPHC = 0.0 TPHA =0.0 TPFC = 0.0 TPFA = 0.0 WRITE(NPRNT,655) 655 FORMAT (///) 656 FORMAT (/) WRITE (NPRNT, 667) IEAR1 666 FORMAT ( 72H COMPARISON OF THE POPULATION DISTRIBOTIONS OBTAINED AT * THE MID-POINT - ,F7.2,/, 19X, 5HHALES, 40X, 7HFEMALES,/) WRITE (NPRNT, 777) 777 FORMAT(3X,3HAGE,/, 1X, 5HGR00P, 4X,2 (8HORIGINAL,4X, 1 OHCALCOLATED, *14H PERCENT DIFF,8X)/) DO 500 I=1,NGM1 PDM = 100.0 * (PMA(I)-PMC(I)) / PMC (I) PDF = 100.0 * (PFA(I)-PFC(I)) / PFC(I) TPMA = TPHA + PMA(I) TPFA = TPFA ♦ PFA (I) TPHC = TPHC + PMC (I) TPFC = TPFC ♦ PFC (I) K = (1-1) * 5 K4 = K ♦ 4 500 WRITE (NPRNT, 888) K,K4,PHA (I) , PHC (I) , PDH,PFA (I) ,PFC(I) ,PDF 888 FORMAT (1X, 12, 1H-, 12, 4X,F8.0,6X,F8.0,8X,F6. 2,8X,F8.0,6X,F8. 0,8X, *F6.2) TPHA = TPHA ♦ PHA (NG) TPFA = TPFA + PFA(NG) TPHC = TPHC + PHC(NG) TMPC = THFC ♦ PFC(NG) PDH = 100.0 * (PHA(NG) - PHC(NG)) / PHC(NG) PDF = 100.0 * (PFA (NG) - PFC(NG)) / PFC(NG) K ~ 5 * NGH1 WRITE (NPRNT, 999) K,PHA(NG) ,PHC(NG) ,PDH,PFA(NG) ,PFC(NG) , PDF 999 FORMAT (2X, 12, 2H+ , 4X,F8. 0,6X, F8.0, 8X,F6.2 ,8X,F8. 0,6X,F8-0,8X, ♦F6-2) K = FWDRV 167 PDH = 100.0 * (TPHA-TPMC) /TPHC PDF = 100-0 * (TPFA-TPFC)/TPFC WRITE(NPRNT,656) WRITE (NPRNT, 999) K,TPMA,TPMC, PDH, TPFA ,TPFC, PDF TPMA = TPMA - PMA(1) TPMC = TPMC - PMC(1) TPFA = TPFA - PFA (1) TPFC = TPFC - PFC(1) WRITE (NPRNT, 656) K = 5 PDB = 100.0 * (TPMA-TPHC) / TPMC PDF = 100.0 * (TPFC-TPFC) / TPFC WRITE (NPRNT, 999) K,TPMA , TPMC, PDM, TPFA, TPFC, PDF WRITE (NPRNT, 655) WRITE(NPRNT,667) YEAF2 667 FORMAT (/,68H COMPARISON OF ORIGINAL AND CALCULATED POPULATION DIST ♦RIBUTIONS FOR ,F7. 2,/, 19X, 5HHALES, UOX, 7HFEHALES,/) WRITE (NPRNT, 777) TPMB = 0.0 TPFB =0.0 TPMB1 = 0.0 TPFB1 = 0.0 DO 600 I=1,NGH1 PDM = 100.0 * PDF ■ 100-0 * K = (1-1) * 5 Kl» = V K ♦ U TPMB = TPMB + TPHB1 = TPHB1 TPFB = TPFB + TPFB1 = TPFB1 (PMB(I) -PMB1 (I) ) (PFB(I)-PFBI (I)) PMB(I) + PHB1 (I) PFB(I) ♦ PFB1 (I) PHB1 (I) PFB1 (I) 600 WRITE (NPRNT, 888) K,K4, PMB (I) , PMB1 (I) ,PDM,PFB (I) ,PFB1 (I) , PDF 700 TPMB = TPMB ♦ TPHB1 = TPHB1 TPFB = TPFB + TPFB1 = TPFB1 PDH = 100.0 * PDF = 100.0 * K = 5 * NGM1 WRITE (NPRNT, 999) DO 700 1=1,3 K = 5 * I TPMB = TPMB - TPHB1 = TPMB1 TPFB = TPFB - TPFB1 = TPFB1 PDM = 100.0 * PDF = 100.0 * WRITE (NPRNT, 656) WRITE (NPRNT, 999) PHB(NG) + PMB1 (NG) PFB(NG) ♦ PFB1 (NG) (PMB(NG) - (PFB(NG) - PHB1 (NG) ) PFB1 (NG) ) PHB1 (NG) PFB1 (NG) K,PMB(NG) ,PMB1 (NG) ,PDN,PFB(NG) ,PFB1(NG) , PDF PMB (I) - PHB1 (I) PFB(I) - PFB1 (I) (TPMB-TPMB1) / TPHB1 (TPFB-TPFB1) / TPFB1 K,TPMB, TPMB1 , PDM , TPFB ,TPFB1 , PDF c C RETURN TO CALLING PROGRAM c C 1000 CONTINUE RETURN END 168 DOCUMENTATION or 1- s CM O. Oo t^ o oo £ ■— vfi *■ Oo 2 o> s 1ft 3- (n. 0> £ s c 3- vS Oo ~- CM R 3- Cs m v» 3- c s VS f- O. -~ vS \o v9 va vS O- o> IO s -~ ~- " — ~~ ~ v3 r~ s ; O s O o o Of- o~ s K . " • • • S £ vS r*. Oo rr> 2 £ " r-» — O IT» ^r " g o CM O o- r^ CM t© 5 — ■— — £ CM ~- — r* Oo u> £ O S O o Q t>- CJ» s £ • S < • • £ 3 r- Q ~«. CM 3 •*> is — 3 s CM — to 3 3 lfk h- vS CM 2 3 3 0- — t~v >r> if. 3 0~ ir> v» to m S S o~ — * vS ro S tr, CM m CM in u> 3 — — — - CM s CM CM CM OO o= S! 8 O s O O o 0- o. s 5 • D", • • s u> O M> v& >*» S s S o CM m m ?i s s 3- OO o •— 2 s a oo ir> o T> 00 3- in sS 0» 3- (^ Oo — -- s s — - CM l~- CJ- r~ eft s Oo *n vS CJ 0o CM in r- K s — — — — CM O s CM o n) o CM o 0c OO S s o Q s o o O o o o o- O" s 3 • • 3 . > . . • • 3 3 ». -~ {V. ~ vS CM — «A — o r^ [5 3 3 O r-- o O vS o »r> r^ W 3 3 vS CM "% o- 0- o iTk CM d- *- " in sll vS o o m r^ Cv in ~- ■d- 8 3- CM vS i^> o~ CM W» CM CM 3 J- CM CM K> in |C» M> Ci o» o 3 3 — — — CM id o 3 *i O <« o rO Cs Oo 3- Oo I s - 3 3 O Q 3 o O c> o O O O- In o~ m 3 3 • • 3 • • • • « • . t 3 O —. f--. O ir» 0o ^ *T> Oo 9 V S vS r-~ in IT> ~ Ci lf> Oo T» 8 S S O- — «>. vS * ITk Oo «% w> S S s — t~- 3- O- — CM o~ 1^- Oo »C> CJ» s cr- -~ 3- Oo O CM o r- r-- 3- i 3 \S — Oo CM 3- -~ CJ- CM o- 3- s ~ in tCV 3- 3- if. o~ Oo Ci sS S o — — CM OJ rO o m r-. s S s o *s o lev 3- CM T} vS o la" £ ° r>- m \J> •— — vS ■A ~- OO s S a o- 3- oo O in vS o >n — •— «- s US 3- — M> CM o r- 3- «% ~- S s — o- — rf» CM Q rO CM i- CM !-- s CM r^ 3- vS m r- CM CM m .9 S a — CM M% m m o a ir» c> ir> o in o o- vS CM CM r^ rri o Is 5 S3 <^ vS Si S a -1 CM 3~ I s - o~ vS "^ vS d- 1^- m V. a «S 3- OO vS m o r- r- PO CM a 1 r> m CM Oo TC, r- *- r- >n o *- 0~ °j «% o- vS r^ 3- Oo CM r~ ro vS s Q. m CM CM rf> <»> D o Q 2 M> ca M> o M) O 0~ o o- m 2 2 o 3- O o O 2 O o O o O o o- o~ o- /°~ 2 S a. O o • S 2 • N. CM 00 rO O in o~ C5 lr> S 2 s Z -— O- CM tf> CM -~ Oo 0o CM — , " 2 2 a: — — — OO vS 1ft o o 2 2 3 CQ in r- *■ r~- o c> i- 3- rc> 0- 2 3- «s m m vS Cf 3- v» 3- 0» in 2 2 a »- c> — d- 0o ^ vS l-~ O- o- H ^ D oo o- in o- o r^ O Oo ~ ^ To cvl ro *- 3- (^ o a r» — r- O r- o O f- rc> I s - in ^ 2 o o O o s o O o o o o O 0~ o- cr- o- 2 ,* or r» o m <. M O- Oo 3- PO oo o lr» ir» vS o a o ■ - 2 -» In OJ «*i — in — in O- o - vS - u> Ui *3 OJ in CM oo co a- CM •~ — r~~ r- vS Ci — 00 — *, CM *- «^> o o- 3- o- 0- o~ 1X1 «r- «, •» o o vS IT) r— v3 o~ r~ r^. »- in CM » CM CM m f»» o- K) o o vS i— o t " o «-> rO rO in Irj o- — *> o- — CJ- — oo — . 0- ir> o— r— m ^ v> o o ~ o o o o o o r- 00 o- 0O o- ^, H — - U CO 4- c -s u o ■« e ~5 o -s a o X *3- i. a CJ> JC o ■c o o 1- « ♦- Oo ~6 +- O- +. CM w ■3 4- -15 V. a co in -a w CO -c +- "5 CO p— Or OS ~5 c a a O CM o CO -J CO 2 Ct- Oo s £ 3- M) o~ m «M R »- Ci m 3- 00 VS 3- E £ o rv o~ — V9 £ V0 vS ^9 v» VTl s £ — ^ S ~- — — \9 tv vS |v JC 2 O S Ci Ci O <>- o~ o-. o~ * c • " • • • • • • :: £ O rv ift :*• E! ^ K |v. — o- to ^ " s O CM 3- 3- S to 0O s s o^ v. c> o» to S — CM r^ to C> M> vS s s |v- o~ CM fO 0^ s © l>. o- 3- O rv CM s U> •~ — — s CM ^. — f- to IV, Oo £ $ O s O o o o- Ov er- CJ- 2 s • s . • • • . £ 3 N- CS 1*^ v» 2 S 3 — i- vn • in S S o- — 3- M> m s tM CM m cr- «\ CM in S S — — — en S (M O- Ov s S • £ . • • • • - K » «j o m fO S S s o CM 3- 3- S s 3- OS CM O £ to 3- v. -. 7, 2 Oo U> > 3~ to 3- »o O O iri «% o- CM m (v O in 3 i iv. *■ CVJ vS> K^ • 3 C£ -v r- o IT> vS i- *o f*> r i" 3 S VU rv w in — o »n — r> s S s > v. <«\ vO * kf> 3- o~ oa s m rc» Of 3- S R Ul rv *■ W- — — Cf- o- r- rc» o- R o~ — 3- 0» O CM o -~ M) o- O r* rv s S C= v» — 0» CM In ~- o CM o- *■ "S ~ wn m 3- 3- vn r-» O- to vn 0- te o s £ — ~ CM K> m o £ 3- o d- O 3- o to |v- to — to oo o- s Q o o o o o Ci O o o- rv o- to o~ (v- o~ s S C£ • ec rv — s- O- — o v» v9 £ s s 3 M> o m ± r- * 3- Wk S s s C£ in v» — — CM m r- o- s \S rv — o s s o 3- OO o m »- o CM — — »~ s vn 3- ^ M) CM o •*» Ct- to in rv. 3- >^ s s U- o- — «»» CM — m in d- CM r- 3 CM r~ 3- M> «t r» — 3- — to CM s a — CM K^ r*> in o K vn o vr> O vn O o- m o- to o- M) o- s 8 z o o S O o O O o CM O- Lo Ws o 5 3 S3 cc — O 3- d- \3 — vS t~- ~ 3 o CM 0» o- £ S _« — 3- tv. o— sS 3- vS> «R to m o S t«> * i» vS m o CM CM vr> o- r- IV, m 3 s ■=> m CM 00 «^ QO *■ «- vS r^ 3- to — CM ~ o CM rv. m 8 v> a. m CM CM «-> ro o >S o S \9 o vS o M> O o- O o- rc> or- o o- 2 2 o 3- o o o 2 o o O o O o cr- o~ Cf- o- o~ Ov v>- 2 5 a. o cs • 2 . |v. CM o» rf» CVJ r- C/» oe> m 2 2 2 z -~ o- CM IX> o — £ 2 2 cc — — — OO O o- f*- K» ~ r~ M) 3- 0° Z 2 CO in P~ > r- CM o m in m o- 2 3- >»> m vn M> 0- CM — r- to vS 3- OO 2 2 cs o- m -. i- rr> v9 CM r- o- o~ 2 v» o 0o o- in o- 3- «^ »r> 3- o rv. O 2 Z ^> CM ro *" * «>- o S (v- ~ r~ o »~- o vS «% sfi U-i rv fC» 1^ Z S o o o o 2 O o o o o o o- O- »- o- a~ o~ Ov 2 <* Or n. o CM IT> CM «s O — CM a- o >» r- ©- o- to •> "» > o Ov CM — — O CO O — — to — ^ CM 3- «>> o o- 3- v» IO vr> o r~ ro CM • CJ CM f*> m o- rr> IO vd to o O (v. ■» ™ o m (T> <"<% uo lo o- — ™ o- — o- — 0» — h- u> C/> \S CT— ir> o~ „ r. w o o ~ o o o o o O 0» o- CO o- 0° 0- to ~ - — - a v» V w a c CM CO O u IS f E a o f r- w « O O +- 3 X o w a w a O CM w O *- v a o -c •*- 3; ~6 CO g !T> in CM O S % ■=" — CM — ^ en £ i 1 r- M) in 3- K £ c ©- m *■ vS R o m CM p: D s o — is r» £ vS vS v9 £ s — £ — — ~- £ s S o o o s " > K • . • " ™ ir> 3- vS r- S ~ ^ o- 0O rv. — £ ^ g 3- i- vS CM S s s O Oo o- — «i CM r>- Oo IA s CO «v r~ Cr- s Or- o~ O- s s — — £ — — s te> s © © © IB **> s • . • £ 3 "\ -S r- Ci •ff e*> S in «ri — 3- s ie> S vS — in r- s t> 3 o- va o» ■— s in vS m S S *• vS »- — s CM m «*» s — ■— — s CM CM CM s s s © © o s ft ft • • . K u> m >o O o s S IS * *• O CM ^ S s CM o 3- OO *r S s d- »- 0O m ^ 0» 3- N Co CO 3- S s r^ o- — CM s M> c\» CO CM r^ m m K s -- — — — 7. CM O CM O CO © © S s & o O © © O © © S en S » • 3 3 tn 0- — CM CT- — N -~ 3 3 5 "— ~- »- s9 o o in Q cu CM 5 V 3 ■J s9 0r- r- o- o~ o r- O o ■s 3 s — cM CM if> OS CO o vS CM tn o £ M) O o re, 3- 3- M> S 3 o © O O -. K\ »p> 3- CM v» «n 3 CM m in rr> CM CM CM 3 3 f- • CM CM — ■— 3 N> O m © m © © 3 5! m S © © o o © © O 3 5 . 3 s 3- 3- v& * T, l»> •— r- cs in s 3 s m m o Vft — r- r- m in — s 9, s OS Ob vet 3- o- DO — «» vS :h s S s 3- O © — — o CM O — cn CM ia m d- 3- in O- 3- m <*> s CM \9 CM »»% — ~ s * © 3- O T> © © S 5 0» - o © © © o © © s <-» . to w O R s — — r- ~. O ^ CM ■n r- »- m ^ — — s s n -~ . . LU O- © CM — 3- 0o O m s — IS CM © — — 3- a s x9 C£ — t^ in d- o- — w« CM a 3- >n — CM s m © m © m © s » 0* r» f~- Q s O © © © © © <*> s • o- o- C£ Sj X s ir> m a: m vS in OO 3- 3- 3- o a -t a o- in CO O in Cj- m CM a a a • . © CM — s& r-- — o 3- 3- M> s a 3 CM U- CM d~ o o» oo 3- r~ o- s» "S 1 oo M> p^i O in 3- a S3 vS CIO *■ o- in m co ao m s o M) r- 3- 0o 3- 0- Cl- g 9> (*> r~~ r»» a in l»> m CM CM s o M) © M> © M) © © en S ©- v» vS o 3- Sj © O © © © © O s s • «. — a. o - © 5 a - **» ~ — — OO * 2 3 VT> CO CM o >*> m in f~ 3- r— " m u> vS CT- m 0- »© 3- *■ 2 2 as 0» (jo cm f*« v» CM r~ o- m — 3- 2 CO or- m o- O- 0- © 2 3 m •■» M> r> *■ 3- CM m 3 r~ © r- © r»- -— © ■— 3 S »- OO 00 O 2 o o o © o o © — Co S en • CM CM csr r- en o en - • . M er- — CM f- r- 03 *• rr» «o . © m © « K z — CM r- CM o» m CM m — K o O MS "■ U> Ul v» o — CM or CM m CM CJO « © to "> e»- CM CM ;» o o a* O — c»- CM — — « — "> O Or- d- 00 — 3- O m •n « o © O D o tn r-- rr> o- o ir> r~ v3 ♦ IO m cr «*> in CM CM O CO * « f>. W- o- O 1© m l in «<% m nl CJ- — 0» — o- — — . n ~ Or- © o «/» N © o o o o O O O r-- 0>l< r > * CT> i •=* Q m • W vC o CO r> « T- CT> « ^ 6» 1 CO H H « H iJ X <* H » O W a> fc< i a CT* O H * w a 1 o B w vo w a CTl rj EH *■» o « EH o> ■4 a B4 » M -3 EH PQ w O CD < CO 03 a H o > O M < vo EH tn D r> to H o « Ss EH •fl (0 CTN H 5f Q O O. 1 M r^ O CO CT> 85 r- pa «- o ov w H r- > SB EH M EH O < « d H M CO ft. H D W H * a* iJ D ►3 o «S O DO.E Eh en w M O M tn O *H co a, as sr w CL, EH i H & •P ss © O «s (Q «* Pl. vo H CO r- mo ■■J m t— O o as « f o Oi a K CO M M SS « W «s W Cu >• On C9 D D E «S O O O B> (0 U C9 ror~*-.*m©«-ir>ovvoco©ino*in eo)so roroinoOiNQOvotni^ooa-«-a-f*ioooo invoaKNNOfno^oifioinminw \Ov0^lT>rovD(MT-l7»r>vOi» , fO(N^'oo*oinroa>vo(N«- ait^vo *o mh r0C0r»)©oiiTr-i3-ifii^r»(T>oooo>inT-t~- ovt*oo*t-ininr-r»»on(Nooo tfo\r«vo r> r- vDrO»v£>T-(Ns»-t~-©fN00©vo*f^ rP >3-oo»r>» _ #u">r-r^o>aiCTic7>ir>oovo^inin i©00Ovin« _ l^ aeoojo*»mo votr>m<7>v05r^-(7Nr»-voin< T )(Nt-inv© , >or» 00 vo © © r- 0> It t Lf> O pq EH •al OS 03 EH « M CO W o « 172 DOCUMENTATION Cm Pm H a H ss W U « Kl Oa Q W U «— h4 i-4 «j «< « SC u o w fc P4 10 S3 i-4 o «s M as FH H o u PQ H H 05 « O EH W M Q SB O M F-" Cu «: b H< M a Q & o H Cu SB M o U w « En W «s PK ^ D U Q ►J W H 1-1 « ■< O ss H It. C5 o H M s= O o w M OS «a W CM a. O B e rt O o OS o C3 inooooooooooo»-ifiT-o o> ooooooooooooo«^ir»o u*i OOOOOOOOOOOOOOOOt- r- I II »- | CM I min(siriinrsi(N**-ir>T-(N'-inina- o«-s»-*-vo©oor-ocMir)r- t»r-oofio3«)(N'"0 cm cm n ID cm tf r- r^ in a- n a* CM t— CO OOOOOOOOOOOOOvO*vO t«- 00 ooooooooooooocMr** © © • tl««tttttt*t«»f • t oooooooooooooaan © © I I I I I CM VO © CM vo o VO er> © m r» a> in inoocM*cMr~cr>tfin©*cMo"iin< T )r- vocoiDvor*incn»-r»r-cr>a'CNr~r~-oineo V0C^r0OVV0*«~Ovt~v0in' r )(NrvlT-r- ro CM CM T- T- T- T- cor»*r»T-o>or~vocMsj-cM*»-r»'~ © cm indinvor-moT-!— '-cMCMOvomo r- m voinin'-=*vopor^ cm o> ONinsr£tr-vocooic*s* , cMr-r*-coa , CM «- «- vocr>f*)CMvoa , T-cr>r»voif(f | otNT-> , -» ro fs n i- t- t- t- o> in ^•r-rvi(N' ir )m**ininvovor-+ + + I I I I I I I I I I I I I I I IT) O If) omouiomomomoinomor- i-T-N(Nfncia'9inifnovor« FWDRV 173 pu oomooooooooooo»-o cm cm cm Pm oooooooooooooooo o o © H . • t • t • « . t t • . • « t t t • • Q ooooooooooooooo»- o o o I I I I I I I I t I I I I M U « H CM O 01 W «r e-< • 4 ^ r» co D CM W u -d 3 « «3 u O M fc. fc CO SB ■J O «s H 5= EH M D CB CD H H OS m frl V) H O as H EH h < &-. 3 H e Q 04 Eh cm S= w Q u M « H w «S CM ■J D u Q 3 H «a EH U ■* Hi D SB 5^ to «a i-J W U «* H) SB ■« H 13 IB H a ce «B 2 H (M IB O H OS 9B O O CO H as < W CM a» CB O B «o O « u CB cocn©ino'~f»)roa>J3' sroooin*-f)cocr>CMo©fn© voa-^inr-incninr-T-otfi^t-coco t>»vOt~»CMC^ r '>C p ivoCM^'cJ>r^'in^CM<'0 ino^Oir>ro«-ror in © CTv 10 t— *— m 00 VO r* f- CM © Cf> >J0 cn ■* © r- in CO \C ?— r» CM CM r" 00©0©©0000©©0©OVO ©©©o©o©o©oo©o©©m ©0©0©0©©©©©©©©©T- 1 111 1 1 1 1 1 ill ^ f" CM © © © • t • © 1 © 1 © 1 ' _ ©m* _ oooincNCTi©in\0r»cT»fNCM voi-t-fn«-tnincN©in«-oot^ rr )moo CT» r»©povocMc^©r»cnoor>©vDOcyi© cr»cor~oa-cT>r^=i - ^cnr~voa-r'>«-in^ o>vor-vomvoovo©i^inmvovooo© r-omvocNJo>or*crieor»©vo©a>© aioor»©j»cr*r-*»-cMC~vosr< T )'-3'CT>*cn5raia , cr>3'CTistcria' T-T-CNCNrOfr)**m«nvOvDP» + 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 m ©moinomoinoinoinoinor- T-^ in CM f— f* 1— r- a. <*) CM (T< CM >£> sf r*> CM a> r* rr, m c* in CM r» ^» + «• + mom 174 DOCUMENTATION M (9 i • as oi<'ioi*i'i'- ov r» vo a c» cm ft a'*l< 1 0CNCs|«-*-v— v— av a- OS • =f Q ID t W • • . • • vO O to ovr^CDrvirnrvirvin^rosj-jvjrrvexcorr)^ ov t~ M aaoDocNtr^nvoovr-ovovcvit-inin «- ov w eoov a H * W .. t » t t .. t ..... s . & • eh t-o«fovvo>inov M vo w (c-*ooNa)vooivoco*«-*noin to o> hp *vooBNNOm\ct-oinoinri^* H »- O vovO*~'Ovr'>;OvvOvO^'< r >CN< ,r > 03 *m(T)(NNi-r-r-r H Q. «< a O H VO 9B H O «S VO EH H mr-oaovr^a^ovr^voinfocN^-.- «* a«*>.f>cN»-«-»-.- r*a «v ^^ «« w> ^ w • % *w up » -* w «w ' » w ^ v 10 03 lOsrHflONlftdHOfOOnTJiOKN W SO CO O 03 H 04 Eh OH CO Ov r> «B h a a 03 © to voo\c\iin< r >ovCNovvoi"»*-voooinaa 03 ovoinovorovoov— a-^ocNr-oocN W r"vOCN\Of)CNOOOOOv' r >©J»«*1VOVO > co r» *- s» © r» * n o r- vo in m 1 O (N CNOO©OOv<* , v©a* r >\OVO a h r- > m r» *- s» © r» * n o r- vo in m «-©'-Ov©©vOOv M eh .eh ov «- in <*> co o cm «n «n r>- oo o 2 © o nr^r^oom^inmv— i*-oo©>r)fviov *s oovoo>< T >o>vo^.«-o>tr»oiaaininvovor» + ■ o db <* o i i i i i t i i i i i i i i i m n OO 03 © m © in © m © in © in © m © m © r» at coo cfl \— t- cvi cm «r> «r» «■ a m m vo vo r>» o FWDRV 175 H I I • • I t t • Q roa-CNOOOa-OOOOOOOOvOvo O I I I I I I I I I I I I I I (N I w w 03 64 o< Q o M at EH t < o tJ US 10 o C* 04 O •» ** kJ < rt « s U o w Bm Bm CO as i-5 o ■a H ss EH H S O PQ M H 03 M o e-t 10 *ODinr-OrOT- ^ ao co r^ vo m o) o t- oovocvi^ , e^r-\0'*ro ►H* D U Q 3 pa << EH u < H) Q D SB U -s M to «s (J 04 U rtJ ^ as «e H B U> H ►J H «s O as M Pm u O H 03 as O o 10 H « «S pa ou Ql U> B SB >< o O « u o r-tfroincN\or»ocNr~voin*< T )0' _ oaNvor^ «- o • >•>.. (.»»g«»««« t ■ rNrrrOOOOOOOriflinOi t" r" I I I I I I I I I I I I IN I I 00 00 VO © © c^ rn r» v£> 00 C* lO CTir-mcoo^ocnr^fNOooc^criinoin infOinfOin(Neorn*--*(N«ooo(MCji «-vovooo< r »»-»-oor-in©(Ni*-r>jjar m'-oor»a«r-cri©©3-fNr~r»o>»nr^ f^O« r )(7)VOa , T-©OOvOinroiT-fMrsjc»>©mo «- in tNT-©in»-©arinvomif)«-a-voror» cs cr> <*in*a» , f»\O00CHC^SJ-p'>*«»'ininvo\or» ♦ I I t I I I I I I I I I I I I IT ©inotnoinomoinomoinor* T-f"fM vo H . . t t . • • t . • t . t i t t • • t Q T-OOOsi-fojOOoa-OOOOOOfl *- «- *» I I Da u 03 w a, Q o w St E-t » < O tA r» OT o CT> M u »- hJ (J •4 •4 05 B U O W b fc. W 85 »A o *6 H 85 H M » U> CD. H H oc 05 o E-< to inoovocrtsrooor-eieNtNvovocMvovo lOvDaNCicDMnwoioouisvoaia- inr , »*cMvo'-invooor - »*-voaoooo«- rs»(N00f)©<»)O>vO( T >»-O"it--in*CNC0 r»eoinvof>«-n-)voji-inr~aooovor'i r*> in CO J* vO oo a- o VO o t— VO ^ oo (N CN *•■ m r» CM r- * VO U"> r~ cn (N 00 on SO o ro VO cm oo (N CM V o H EM Px < h l-J H O a CU o H Oi = w Q u W 05 M w < CM Hi =9 u « -) W •< EH u <*l ►J Q D 85 (J «S ►5 V) a hi "Sl O 95 H (t, O o H 05 as O o 10 M oa < M Cu a> O S ct «! O o 05 o CO (CooMifihnoi' , iosa , oa«)'- o^ ioo40oDinoif)»nO' _ o>i/) en • ttttttttttttftt • t-0«-CNt-^-»-OOOOOOOOsJ- o I I I I OfNvosrmcMr-poCTi^roror-fMvoin ror-a-rr>a>^n(Nf r >r«inoo*in ©©ino - »o - >oo'-vor~CMooi—voin\ovo r-csiin'-vDOO»n< ,r iinrofNr~\oo*cT( rMa»ino>T-r»t^inJS'invo ON*o>'-in»wooicoo*owffl inofo^inor-*Nait***fo<-T- in»rnrofNfsi»-^^- * m VO m in n on m CM «- T" VO * on m sr * VO VO s»- T- a* in o> in r- m on in CM f* r- a-oN*ON*ONstoN*ON*ON»ON:* t-r-cM r-^cM*=»-ioinvovDr*'» FWDRV 177 CO CO r- (N m o * O VO o r» in 00 oo VO r- o> CM ao I" f~ l*» f" t— r- CO r~ 00 a on a cr> VO ON cm o oi on en CI © r- co r- ON CM r» oo t • t 1 CM oo r- on o o © o 03 EH to to W J CO w to 33 P3 O to cu o o 05 CO M m © O © vo © m m «• n VO NN •- ON CM vO =* VO © © pv © VO 00 T- co cm in (N a> en in © rvi f" in in o © in o co a in in a on oo «- CO 00 o> a • • © © vo en vo in co vo en a Or- r- a 1- CM «• * oo cm oo in ON * ON * CM t- CM t- in o> © © CO CM o © © r- © © vo r- in © VO 00 00 V— a- vo 00 © a © r- oo © © r- vo CM CM t» ON co r» 00 CM cm r» vo CO © ON 00 CO * r» f» CO CO O CM CO ON VO ON t- * oo CM a © CM CO CM a in on a • • • I r» »- ON CO «- CM CM CO © o © o © © © © © © CO ON CO CO co vo in co oo vo oo © ON VO ON f t • • t © © o © © o o © © CO o © © o © © ro © © © © © a o r- © m t- a- a CO CO © © 00 a o © r- CO © o on p» © m r» m in in P~ co ON r- m co t^ o © © on m VO 00 © r> © CM in m VO CO CM f- r» vo CO ON oo co CO 00 00 CM co co on a CM a ON 00 in in © co oo r- © a t- r> ON r"» ON 00 ON f- on oo © © m on CO oo r*» CO VO a a CO T- m • t • i i i t t • © r- CO CM a r- VO CM © © © © © © o © O © CM CM T— r» as pa «a lb S3 Cu EH « (0 O CO w «•-) E 03 Cu o »lb < lb H « H 03 1 SB 1 o a H m «- 6H «s CO aS ■ a- f-i O O D u* CU • o Eh Cu O Cu M O 95 OT Cu w 03 as •O as o o u °s 03 co oa 03 EH oa H (0 D 4 > w m 03 h3 H O as * Eh H lb < > D * * O * * in # # ON co vo in ON CO VO T» vo © o © co vo © © «- r- m m © ON m o on in r- on r» oo O-N CM o a a vo «- CO © © r* © ON VO m a oo i- co vo 0> ON oo in CO ON m in CO VO o> ON a r>* T- VO co © VO r- CM t- on co on oo on co o> CO r- © a ON r- a r» oo m «- on in VO •" t • • t t t • 1 in co © a vo *" 00 CM © © © © © © o © CM CO r- r* CM CM © in © r» in m «- vo o © VO CO © © r- a m © a o m © CO o tt CO CM a- CM CO r» m f" VO a© CM © vo o\ r- in in cm r~ <- ON T" ON CO ON © ON CO CM vo a r^ r-> r» CO 00 in a 00 CO r- VO oo a ON ON ON ON ON ON On On ON VO m CM 00 in a r- t^ T" © VO r»- r» f • • • t • • • r- a in in ON CM CO CO © © o o © © © © CO co r- CM pa Q 03 as w < as on h • o 03 O as 03 H 03 W H 3t EH H H D 03 Cu as w a co © «- ON •" a vo in r> © © m co © o a cm in in a co in in CO ON a © r- in CM VO on r*» oo m CO © CO ON in cm r> co CO CN on a ON co ON VO ON (O on in r- ON VO ON (— CO a on © «- vo a a co a- in o> ON ON ON ON <^ ON ON a © vo co in vo a r* ON T- ON P~ on r- t t t t f t • t oo vo on r~ co co co a o © o© o © © © co CO CM CM © © © o © © © © © © O © © © o © © © © O © © CO © © o © © © © O © © © © to o\ © a h oa CM CM © © 00 P>- o © r- a in m co oo o © 1 EH r- r» CO © VO CO vo a ON CM o> *~ m r- VO VO 1 to © r- oo co r* on m co r- m CO CO r- CO a oo D (0 CM 00 p* «- co r- r» t» m cm t- r" a *- r- «— a e EH co r^ CM ON on m r- r- VO r~ CO as a i a CM co a aa H © EH E 03 D t H u> O 03 03 as •JJ EH o 03 O 03 H M EH > 03 03 O M at h •u CO » # * « * * © Cu as 03 a f" co CM T- © 1^ © ON in on m o o co © co vo On r- Cu Cu r* in CM CM CM vo o co co r» in t» ii «o lb Cu o © on m ON VO CO r- II o lb Cu Cu 00 CM m v— cm in on a vo vo © © r- co co a a cm oo © CO VO cm a v— vo co E 03 E Cu Cu © © 00 VO co a 00 CM 03 lb Cu r- in co oo r- m ON On • • o o 00 ON vo O ON t^ 00 ON 00 CM 00 CM co vo CM ON o t-- ON ON © © © © *- © r» in vo in ON on • i © o CO ON a r» oo vo oo ON • t o © II « E IX to II «s lb H 10 H to vo a P» ON VO VO ON ON • • o o ON O © r^ on r» CO ON t • © © ii co a- © © © © II © © CM © © 03 © O <* CO 00 M © © H © © © © © ro © © © © © © in a © cs to 03 »u CO -i ON a © VO 0> II II CS »- 03 03 to X CO H GTCON I. DESCRIPTION OP PROGFAH To obtain the constants cr coefficients required for applying the techniques presented in subroutines ADJBG, BRASH, and HLT. GTCON is used only in conjunction with these three subroutines. II. METHODOLOGY COMMENTS There are two versions of this subroutine. The first version uses a subroutine called BLOCK DATA. The BLOCK DATA subroutine can be used by most computers. Even some computers that do not allow data statements will accept BLOCK DATA subroutines. Because of the wide acceptance of BLOCK DATA all of the MAIN programs and subroutines in this package are written to use the version of GTCON containing the BLOCK DATA subroutine. In this version the labeled common statement is used. If your computer accepts BLOCK DATA, the subroutines GTCON and BLOCK DATA can be used as given in Section III. COMPOTE R LISTING FOR SUBROUTINE. For computers that do not accept BLOCK DATA a slight modification must be made in any MAIN program which uses the subroutines ADJBG, BRASM, or MLT; some data must be added to the input for the main program and a modification to the subroutine GTCON is also needed. The MAIN program must have the following lines inserted right after the DIMENSION statement. DIMENSION C(954) COMMON C READ (NREAD, 1) C 1 FORNAT(8(17(6x,F10.5,3x,F10.6, 1x,P9.4,4x, F9. 5, 1x,/) , 6x,F5. 2, 1x,F8. *3,1x,F8.4,1x,F6.3,1x,F7.3,1x,F7.3,1x,/,6x,F8.3, 1x,F7. 3, 1x,F7. 3, 1x, *F7.3,12x,/) ,40(7x,8(F5.3,1x) ,/) , 6x, 8F5. 4, 1x,/, 6x, F7.5, 1x,F6.5, 20x) The data to be added to the input for the main program comes from the deck of cards that make up the BLOCK DATA subroutine listed in Section III. The BLOCK DATA subroutine starts with the words BLOCK DATA. The cards for this subroutine should be sorted into two stacks. Be certain the cards within the two stacks are in the same order as in the listing in Section III. One stack will contain any card that has a letter of the alphabet on it. The other or second stack will contain cards that have an asterisk and numbers. This second stack will also contain a few cards that have a slash. None of the cards in the second stack will have an alphabetic letter on it. This second stack of cards contains 194 cards and is placed in front of the input data for the main program. These 194 cards are placed in front of the card containing the label, the first card for each main program, and are read by the read statement inserted at the beginning of the main program. In the subroutine GTCON the COMMON statement must be changed. It has to be changed from labeled COMMON to unlabeled common. This change is made by taking the /DATA/ out of the COMMON statement. Thus, the COMMON statement reads COMMON C. III. COMPUTER LISTING OF SUBROUTINE SUBROUTINE GTCON (NPR0G,ND1 ,ND2, CONST) c c C PROGRAM NO. 0490 c C NPR0G,ND1 AND ND2 ARE INPUT ARGUMENTS. C CONST IS AN OUTPUT ARGUMENT. C NPROG IS THE NUMBER OF THE SUBROUTINE REQUIRING THE CONSTANTS. 179 180 DOCUMENTATION C NPR0G=1 INDICATES NLT,NPROG=2 INDICATES ADJBG, NPROG=3 C INDICATES BRASN. C ND1 IS THE FIRST CONSTANT ARRAY CODE. C ND2 IS THE SECOND CONSTANT ARRAY CODE. c CONST IS THE ARRAY OF CONSTANTS REQUIRED BY THE SUBROUTINE FOB C ITS CALCULATIONS. c c . _ _ DIHENSION CONST (78) DIMENSION C(954) ,K(3,3) COBBON /DATA/ C K(1,1) = K(2,1) = 78 K(3,1) = 156 K(1,2) = 624 K(2,2) = 16 K(3,2) = 128 K(1,3) = 880 K(2,3) = 74 K (3 ,3) = c C CALCULATE LOCATION OF APPROPRIATE CONSTANTS IN C C ■ 11= K(2,NPROG) 12= K(1,NPROG) + (ND1-1) *K(2,NPROG) ♦ (ND2-1) *K (3, NPROG) C C TRANSFER CONSTANTS c _ DO 100 1=1,11 13= 12 +1 100 CONST (I)= C(I3) c . C RETURN TO CALLING PROGRAM — ■ c „ RETURN END c _ _-„„-_.. _. C BLOCK DATA PROGRAM SEGMENT PLACES CONSTANTS INTO C COBMON AREA NABED DATA FOR USE OF SUBROUTINE GTCON c BLOCK DATA DIHENSION C1 (78) ,C2 (78) ,C3 (78) ,C4 (78) ,C5(78) ,C6 (78) ,C7 (78) , * C8(78) ,C9(128),C10(128) ,C11(74) COBBON /DATA/ C1,C2, C3,C4,C5,C6,C7,C8,C9,C10, C11 c _ _ C NEST BALE BODEL LIFE TABLE CONSTANTS C DATA C1 / * 0.63726, -0.009958, 5.8061, -0.05338, * 0.40548, -0.006653, 7.1062, -0.08559, * 0.10393, -0.001662, 5.4472, -0.06295, * 0.07435, -0.001183, 5.0654, -0.05817, * 0.09880, -0.001539, 4.8700, -0.05070, * 0.14009, -0.002183, 5.0677, -0.05156, * 0.15785, -0.002479, 5.2660, -0.05471, * 0.18260, -0.002875, 5.3438, -0.05511, * 0.21175, -0.003312, 5.2792, -0.05229, * 0.25049, -0.003864, 5.0415, -0.04573, * 0.27894, -0.004158, 4.6666, -0.03637, * 0.33729, -0.004856, 4.4506, -0.02961, * 0.38425, -0.005190, 4.2202, -0.02256, * 0.48968, -0.006300, 4.1851, -0.01891, * 0.59565, -0.007101, 4.1249, -0.01491, * 0.73085, -0.007911, 4.1051, -0.01161, * 0.89876, -0.008695, 4.1133, -0.00895, * .33, 1.352, .0425, 1.653, 2.875, 3.013, * 58.540, 55.749, 5.046, 4.604 / c _ C NEST FEMALE BODEL LIFE TABLE CONSTANTS c _ , DATA C2 / * 0.53774, -0.008044, 5.8992, -0.05406, * 0.39368, -0.006162, 7.4576, -0.08834, * 0.10927, -0.001686, 6.2018, -0.07410, * 0.08548, -0.001320, 5.9627, -0.07181, * 0.10979, -0.001672, 5.9335, -0.06812, * 0.13580, -0.002051, 5.9271, -0.06577, GTCON 181 * 0. 15134, -0.002276, 5.8145, -0.06262, * 0.17032, -0.002556, 5.6578, -0.05875, * 0.18464, -0.002745, 5.3632, -0.05232, * 0.19390, -0.002828, 4.9600, -0.04380, * 0.20138, -0.002831, 4.5275, -0.03436, * 0.25350, -0.003487, 4.4244, -0.03004, * 0.31002, -0.004118, 4.3131, -0.02554, * 0.43445, -0.005646, 4.3439, -0.02295, * 0.53481, -0.006460, 4.2229, -0.01773, * 0.69394, -0.007713, 4.1838, -0.01376, * 0.84589, -0.008239, 4.1294, -0.00978, * .35, 1.361, .05, 1.524, 3.0, 1.627, * 55.749, 58.540, 4.604, 5.046 / c C NORTH HALE HODEL LIFE TABLE CONSTANTS c 1 DATA C3 / * 0.54327, -0.008251, 5.6151, -0.05022, * 0.46169, -0.007290, 7.2025, -0.08475, * 0.18983, -0.002974, 6.1947, -0.07195, * 0.09551, -0.001476, 5.3488, -0.06047, * 0.09666, -0.001422, 4.5662, -0.04322, * 0.13472, -0.001968, 4.6970, -0.04277, * 0.14325, -0.002103, 4.7661, -0.04372, * 0.15280, -0.002244, 4.7248, -0. 01*236, * 0.17535, -0.002589, 4.7568, -0.04197, * 0.20924, -0.003083, 4.7280, -0.03986, * 0.24673, -0.003605, 4.6020, -0.03578, * 0.28578, -0.004016, 4.3499, -0.02857, * 0.36171, -0.005037, 4.3718, -0.02682, * 0.45849, -0.006124, 4.2977, -0.02244, * 0.59986, -0.007677, 4.2858, -0.01913, * 0.82662, -0.010241, 4.3482, -0.01710, * 1.03681, -0.011906, 4.3197, -0.01357, * .33, 1.558, .0425, 1.859, 2.875, 3.013, * 56.622, 53.922, 6.112, 5.911 / c C NORTH FEHALE HODEL LIFE TABLE CONSTANTS c DATA C4 / * 0.47504, -0.006923, 5.7332, -0.05133, * 0.45025, -0.006805, 7.6298, -0.08909, * 0.19376, -0.002928, 7.1271, -0.08647, * 0.10041, -0.001497, 6.1089, -0.07192, * 0.10126, -0.001480, 5.4984, -0.05955, * 0.11261, -0.001618, 5.2649, -0.05372, * 0.13137, -0.001893, 5.2547, -0.05236, * 0.15448, -0.002239, 5.3691, -0.05339, * 0.17693, -0.002566, 5.3186, -0.05136, * 0.18440, -0.002612, 4.9099, -0.04261, * 0.19440, -0.002712, 4.6164, -0.03627, * 0.22364, -0.003011, 4.3673, -0.02961, * 0.30043, -0.004053, 4.4363, -0.02858, * 0.41033, -0.005394, 4.4163, -0.02511, * 0.56691, -0.007187, 4.4030, -0.02152, * 0.77206, -0.009334, 4.3826, -0.01784, * 0.96175, -0.010681, 4.3108, -0.01355, * .35, 1.57, .05, 1.733, 3.0, 1.627, * 53.922, 56.622, 5.911, 6.112 / C C EAST HALE HODEL LIFE TABLE CONSTANTS c DATA C5 / * 1.07554, -0.017228, 6.3796, -0.06124, * 0.55179, -0.009201, 7.8944, -0.09934, * 0.15292, -0.002523, 6.4371, -0.08076, * 0.06856, -0.001096, 5.1199, -0.05978, * 0.10060, -0.001578, 4.9229, -0.05182, * 0.14725, -0.002312, 5.1056, -0.05225, * 0.15127, -0.002381, 5.1036, -0.05207, * 0.17022, -0.002686, 5.1685, -0.05244, * 0.20786, -0.003277, 5.1986, -0.05131, * 0.24876, -0.003868, 5.0221, -0.04577, * 0.28685, -0.004320, 4.6915, -0.03697, * 0.32623, -0.004654, 4.3492, -0.02767, * 0.38906, -0.005243, 4.1849, -0.02171, * 0.49337, -0.006341, 4.1647, -0.01842, 182 DOCUMENTATION * 0.66168, -0.008182, 4.2175, -0.01634, * 0.84188, -0.009644, 4.2171, -0.01324, * 1.03876, -0.010780, 4.2155, -0.01035, * .29, 1.313, .0025, 1.614, 2.875, 3.013, * 56.664, 54.064, 5.883, 4.682 / c C EAST FEMALE MODEL LIFE TABLE CONSTANTS c DATA C6 / * 0.78219, -0.011679, 5.8529, -0.05064, * 0.46584, -0.007284, 7.2269, -0.08351, * 0.13739, -0.002136, 6.3204, -0.07590, * 0.07600, -0.001166, 5.6332, -0.06684, * 0.10067, -0.001529, 5.5780, -0.06295, * 0.13039, -0.001973, 5.5872, -0.06081, * 0.15401, -0.002335, 5.6149, -0.06004, * 0.169U1, -0.002559, 5.4593, -0.05616, * 0.18184, -0.002718, 5.1881, -0.05000, * 0.18555, -0.002718, 4.8186, -0.04209, * 0.19407, -0.002746, 4.4509, -0.03368, * 0.24415, -0.003376, 4.3702, -0.02966, * 0.34490, -0.004723, 4.4480, -0.02807, * 0.49585, -0.006651, 4.4917, -0.02544, * 0.68867, -0.008874, 4.4702, -0.02152, * 0.88452, -0.010551, 4.3759, -0.01640, * 1.07727, -0.011513, 4.2972, -0.01191, * .31, 1.324, .01, 1.487, 3.0, 1.627, * 54.064, 56.664, 4.682, 5.883 / c C SOOTH MALE MODEL LIFE TABLE CONSTANTS c DATA C7 / * 0.61903, -0.008974, 4.7096, -0.02980, * 0.70613, -0.011375, 6.3246, -0.06433, * 0.16455, -0.002674, 5.6400, -0.06389, * 0.07634, -0.001207, 4.6816, -0.05008, * 0.11449, -0.001810, 4.9454, -0.05170, * 0.17104, -0.002693, 5.2748, -0.05458, * 0.17171, -0.002710, 5.1168, -0.05152, * 0.16483, -0.002535, 4.8459, -0.04547, * 0.17905, -0.002734, 4.7660, -0.04292, * 0.20606, -0.003081, 4.5796, -0.03738, * 0.23208, -0.003370, 4.3559, -0.03116, * 0.28000, -0.003917, 4.1918, -0.02547, * 0.35245, -0.004765, 4.1492, -0.02193, * 0.49465, -0.006569, 4.2479, -0.02063, * 0.66947, -0.008608, 4.3069, -0.01863, * 0.89759, -0.010843, 4.3251, -0.01552, * 1.10111, -0.011806, 4.2684, -0.01123, * .33, 1.24 , .0425, 1.541, 2.875, 3.013, * 55.590, 53.054, 5.601, 4.755 / c _ C SOOTH FEMALE MODEL LIFE TABLE CONSTANTS c . DATA C8 / * 0.52069, -0.007051, 4.5097, -0.02566, * 0.68268, -0.010453, 5.9815, -0.05532, * 0.17066, -0.002657, 5.6479, -0.06136, * 0.09000, -0.001380, 5.1045, -0.05537, * 0.12189, -0.001851, 5.2384, -0.05494, * 0.15083, -0.002279, 5.1708, -0.05171, * 0.16073, -0.002412, 5.0949, -0.04945, * 0.16719, -0.002505, 4.9291, -0.04590, * 0.17408, -0.002583, 4.8035, -0.04280, * 0.17278, -0.002504, 4.4917, -0.03615, * 0.17800, -0.002513, 4.2693, -0.03092, * 0.22639, -0.003140, 4.1982, -0.02717, * 0.30167, -0.004130, 4.2724, -0.02588, * 0.47682, -0.006501, 4.4242, -0.02491, * 0.67440, -0.008891, 4.4554, -0.02190, * 0.92943, -0.011532, 4.4348, -0.01775, * 1.16023, -0.013009, 4.3542, -0.01296, * .35, 1.239, .05, 1.402, 3.0, 1.627, ♦53.054, 55.590, 4.755, 5.601 / c c QOASI-STABLE CBP AND GBB ADJUSTMENT CONSTANTS C 5 YEAR INTERCENSAL INTERVAL GTCON 183 DATA C9 / * -.003, .010, .021, .025, .025, .025, .023, .022, * -.005, .007, .018, .022, .023, .022, .021, .019, * -.007, .017, .045, .062, .068, .069, .066, .063, * -.009, .015, .042, .058, .065, .065, .063, .059, * -.010, .005, .039, .070, .089, .096, .098, .094, * -.004, .012, .045, .076, .094, .102, .103, .100, * -.012,-. 002, .024, .055, .085, .102, .109, .108, * .005, .016, .042, -073, .103, .120, .127, .126, * -.013, -.004, .019, .045, .075, .102, .118, .123, * .017, .027, .050, .076, .108, .135, .150, .156, * -.014,-. 000, .021, .045, .068, .095, .117, .129, * .021, .034, .057, .081, .106, .133, .155, .167, * -.016, -.001, .028, .054, .075, .096, .118, .137, * .019, .038, .065, .092, .114, .136, .158, .178, * -.018, .000, .031, .059, .082, .101, .119, .138, * .015, .034, .066, .096, .120, .140, .158, .177 / c C QUASI-STABLE CBB AND GRR ADJUSTMENT CONSTANTS C 10 YEAR INTERCENSAL INTERVAL C DATA C10 / * -.016,-. 008, .000, .005, .006, .006, .007, .006, * -.017,-. 009, .000, .004, .005, .005, .006, .005, * -.030, -.015, .012, .032, .040, .043, .044, .043, * -.032, -.017, .010, .029, .037, .040, .041, .040, * -.027,-. 019, .011, .043, .064, .073, .076, .076, * -.035,-. 027, .013, .045, .065, .074, .077, .076, * -.025, -.023, .001, .034, .066, .085, .094, .096, * -.014, -.011, .012, .045, .078, .096, .105, .108, * -.028,-. 025,-. 004, .021, .053, .081, .099, .106, * -.005,-. 002, .019, .045, .078, .106, .124, .131, * -.033,-. 027, -.006, .018, .043, .072, .096, .112, * -.006, .005, .026, .051, .077, .107, .131, .147, * -.039, -.029, -.004, .022, .047, .069, .094, .116, * -.005, .006, .032, .059, .085, .108, .133, .156, * -.043,-. 032,-. 004, .026, .051, .073, .092, .114, * -.010, .001, .031, .062, .088, .111, .130, .153 / c . C BRASS MORTALITY CONSTANTS c DATA C11 / * 0.387,0.330,0.268,0.205,0.143,0.090,0.04 5,0,014, * 0.859,0. 890,0.928,0.977,1.041,1. 129,1.254,1.425, * 0.93 8,0.959,0.983,1.010,1.043,1.08 2,1. 129,1. 188, * 0.94 8,0.962,0.978,0.994,1.012,1.0 33,1.055 1.081, * 0.961,0.975,0.988,1.00 2,1.016,1.031,1.046,1.063, * 0.966,0.982,0.996,1.011,1.026,1.040,1.054,1.069, * 0.938,0.955,0.971,0.988,1.004,1.021,1.037,1.052, * 0.937,0.953,0.96 9,0.986,1.003,1.0 21,1.039,1.057, ♦.48 64,. 2590,. 5864,. 3334,. 4 694,. 2464,. 4575,. 2075, * 1.01926,-84793 / END INTRP DESCRIPTION OF DATA A. PURPOSE To make a linear or exponential interpolation between two values. The subroutine can be used to interpolate between population totals, age-specific fertility rates, survival rates, life expectancies, or other such demographic indicators. B. DATA NEEDED 1. Reference point for the first set of data or indices. 2. Reference point for the second set of data or indices. 3. The data to which the first reference point applies or the first set of indices. 4. The data to which the second reference point applies or the second set of indices. 5. The reference point for which the interpolation is to be made. 6. The type of interpolation to be made. METHODOLOGY A. MATHEMATICAL DERIVATION Assuming that the interpolation is made for year t+s between year t and t+n — where .<. s <_ n — the formula is: 1. Linear interpolation jt+S _ jt _ S . / jt T* 411 ^ n where I t+S is the index to be interpolated. Exponential interpolation. T t +S _ T t "J- mtt* 4 */!*) 1 - I • e B. COMMENTS The variables t, n, and s do not necessarily have to be years. The interpolation can be for a specific year, an age, a population, etc. The interpolation can be used for any purpose. The only restriction is that in exponential interpolation I c cannot be zero. Empirical data can fluctuate over time and interpolations performed on such data can yield unexpected and unacceptable irregularities in the results. Therefore, the interpolated results should be carefully examined. 185 186 DOCUMENTATION III. MAIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main proqram can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main proqram. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL INTRP(LOE,NWRIT,N,YA,YB,YC,A,C,B) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement- 2. DIMENSION statement The variable names in the CALL statement may be single- valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or qreater than the variable name is dimensioned in any subroutine called by the main proqram. For this subroutine the variables names A,B, and C in the argument string are arrays. The following dimension statement must be included in any main program or subroutine using this subroutine. DIMENSION A (99) ,B(99) ,C(99) B. DTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this packaqe None 2. Library functions a. ABS (absolute value) b. ALOG (natural logarithm) c. EXP (exponential) INTRP 187 3. Card diagram of main program and subroutines. / / / / /I CARDS INDICATING END OF DECK / | / / / /I 1 INPOT DATA / | | / 1 1 / / /I 1 / COMPUTER CONTROL CARDS /J | / / / / /I 1 / SUBROUTINE INTRP / | | / / /I I / MAIN PROGRAM / | | / / - - — /I | / / COMPUTES CONTROL CARDS / | | / / / I I / I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1 4-6 NXT NWBIT LOE Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates that this is the last set of data. Any other digit punched in column 1 indicates that an- other set of data follows this one. The write indicator. If a zero is punched in column 2, the results of the subroutine INTRP will not be printed out. If any other number is punched in column 2, the subroutine INTBE will write out the results of its calculations. The indicator used to determine the type of interpolation to be done. If a one is punched in column 3, linear inter- polation will be done. If a two is punched in column 3, exponential interpolation will be done. If any other value is punched in column 3, both linear and exponential inter- polation will be done. Blank 188 DOCUMENTATION 7-14 |YA | Reference point for the first set of data. It should be entered so the value has a decimal point somewhere in the 8 columns. Ifieference point for which the interpolation is to be made. It should be entered so the value has a decimal point somewhere in the 8 columns. ; I Reference point for the second set of data. It should be entered so the value has a decimal point somewhere in the 8 columns. : !M IThe number of observations for which inter- polation is to be performed. N can be a maximum of 99. The number should be entered so that it ends in column 3 2. 33-80 I I Blank I A IThe first value of the data pertaining to reference point I A contained in columns 7-14 of card 2. It should have a decimal point some- where in the 8 columns. 9-16 | |The second value of the data pertaining to reference point YA contained in columns 7-14 of card 2. It should have a decimal point some- where in the 8 columns. 72-80 | |The tenth value of the data pertaining to reference point YA contained in columns 7-14 of card 2. It should have a decimal point some- where in the 8 columns. Note: A can have any number of values between 1 to 99. The number of cards to be used depends on the number of values given. There are 10 values on each card, so, the number of cards to be used can be from 1 to 10. i*1 i+n 1-8 9-16 73-80 The first value of the data pertaining to reference point YC contained in columns 23-30 of card 2. It should have a decimal point some- where in the 8 columns. The second value of the data pertaining to reference point YC contained in columns 23-3 of card 2. It should have a decimal point some- where in the 8 columns. The tenth value of the data pertaining to reference point YC contained in columns 23-30 of card 2. It should have a decimal point somewhere in the 8 columns. Note: C can have any number of values between 1 to 99. The number of cards to be used depends on the number of values given. There are 10 values on each card, so, the number of cards to be used can be from 1 to, 10. INTRP 189 IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SURBROUTINE IHTRP(LOE, NHRIT,N, YA, YB, YC,A,C,B) B. DESCRIPTION OF ARGUMENTS Name LOE How Obtained Definition NMRIT N YA YB YC Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In Transferred Out ERROR MESSAGES Indicates whether linear or exponential interpolation is to be performed. If LOE=1, then linear interpolation is to be performed. If LOE=2, then exponential interpolation is to be done. For any other value, both linear and exponential interpolation is to be done. If both types of interpolation are calculated, then the warning message is written out to remind the user that the returned interpolated values are the result of exponential interpolation. The indicator which determines whether the subroutine will write out the results of its calculations. If NHRIT=0, the results of the subroutine will not be written out. If NWRIT eguals any other value, the sub- routine will write out the results of its calculations. The number of values to be interpolated. The reference point for the first set of data. The reference point for which the inter- polated set of data are to be obtained. The reference point for the second set of data. The first set of data which refers to point YA. This data consists of N observations. The second set of data which refers to point YC. This data consists of N observations. The interpolated values that refer to point YB. When both linear and exponential inter- polations are made, the values returned through the argument string are the result of exponential interpolation. 0521***INTRP ERROR NO. 0521 — INPUT ERROR IN YA OR YC ♦♦♦YEARS INTERPOLATED BETWEEN ARE BOTH EQUAL TO THEY MUST NOT BE EQUAL TO EACH OTHER. 0522^+INTRP ERROR NO. 0522 — INPUT ERROR IN A ♦♦♦ONE VALUE OF A IS ZERO, EXPONENTIAL INTERPOLATION IS IMPOSSIBLE. 190 DOCUMENTATION V. PROGRAM AND BESOLTS A. COMPUTER LISTING FOB MAIN PROGRAM c c _ C MAIN PROGRAM FOR INTRP C c _ _ .... C THIS PROGRAM OSES A SET OF DATA CARDS WHICH IS READ IN FODR READ C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ c STATEMENTS AS FOLLOWS. C C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE C INFORMATION TO BE USED TO IDENTIFY THE OUTPUT. THIS INFORMATION C WOULD USUALLY IDENTIFY THE COUNTRY OR AREA WHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION AS TO THE TYPE OF DATA OR C ANALYSIS THAT ARE BEING DONE. THIS INFORMATION IS IN COLUMNS C 2-53 OF THIS CARD. C C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN THE C INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET C FOLLOWING THIS ONE, THE WRITE INDICATOR (NWRIT) WHICH DETERMINES C WHETHER THE RESULTS OF THE SUBROUTINE INTRP SHOULD BE WRITTEN C ■ OUT, THE INTERPOLATION INDICATOR (LOE) WHICH DENOTES WHETHER C LINEAR OR EXPONENTIAL OR BOTH TYPES OF INTERPOLATION ARE TO BE C DONE, THE LIMITS FOR THE INTERPOL ATION (YA AND YC) , THE POINT (YB) c T0 BE INTERPOLATED FOR AND THE NUMBER (N) OF INTERPOLATIONS TO BE C DONE. C NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 c INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER c PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA c FOLLOWING THIS ONE. C NWRIT IS IN COLUMN 2 OF THIS CARD. A ZERO PUNCHED IN COLUMN 2 c INDICATES THAT THE RESULTS OF THE SUBROUTINE INTRP ARE NOT c T0 BE pfilNTED OUT. FOR ANY OTHER NUMBER PUNCHED IN COLUMN c 2 THE RESULTS OF THE SUBROUTINE INTRP WILL BE PRINTED OUT. c L0E IS in COLUMN 3 OF THIS CARD. A ONE PUNCHED IN COLUMN 3 IN- c DICATES THAT LINEAR INTERPOLATION IS TO BE DONE. A TWO c PUNCHED IN COLUMN 3 INDICATES THAT EXPONENTIAL INTERPOLA- c T ION IS T0 BE PBRFORMED. FOR ANY OTHER VALUE PUNCHED IN c COLUMN 3 BOTH LINEAR AND EXPONENTIAL INTERPOLATION WILL BE c PERFORMED. c YA IS IN COLUMNS 7-14 OF THIS CARD. IT SHOULD BE ENTERED SO THAT c THE VALUE HAS A DECIMAL POINT AND IS IN THE EIGHT COLUMNS C ALLOWED- c YC IS IN COLUMNS 15-22 OF THIS CARD. IT SHOULD BE ENTERED IN c THESE COLUMNS IN THE SAME MANNER AS YA. c YB IS IN COLUMNS 23-30 OF THIS CARD. IT SHOULD BE ENTERED IN c THESE COLUMNS IN THE SAME MANNER AS YA. C N IS IN COLUMNS 31-32 OF THIS CARD. IT SHOULD BE ENTERED SO c T HAT THE NUMBER ENDS IN COLUMN 32. N HAS A MAXIMUM OF 99. C C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE DATA C VALUES (A) TO BE USED IN INTERPOLATING. THIS DATA PERTAINS TO c T HE POINT YA. c __ A Is CONTAINED ON AT LEAST ONE CARD. FOR EACH A VALUE C EIGHT COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT c COLUMNS OF THECARD. THE VALUE MUST BE ENTERED WITH A C DECIMAL POINT OR MUST BE ENTERED SUCH THAT EACH VALUE ENDS c IN COLUMNS 8, 16, 24, ...» 72, AND 80. IF A HAS MORE c THAN TEH VALUES AS MANY CARDS AS NEEDED SHOULD BE USED AND C SHOULD HAVE THE DATA ENTERED ON THEM IN THE SAME MANNER AS C ON THE FIRST CARD. C C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE DATA c VALUES (C) TO BE USED IN INTERPOLATING. THIS DATA PERTAINS TO c THE POINT YC. c c IS CONTAINED ON AT LEAST ONE CARD AND IS ENTERED IN THE C SAME MANNER AS A. c c . . DIMENSION A (99) ,C (99) ,B{99) NPRNT = 15 NREAD = 1 10 READ(NREAD,11) 11 FORHAT(1X,52H ) INTRP 191 READ(NREAD, 22) NXT,NWRIT,LOE, YA, YC, YB,N 22 F0RMAT(3I1,3X,3F8.3,I2) READ(NREAD,33) (A(I),I=1,N) 33 FORMAT(10F8.0) READ(NREAD,33) (C(I) , I=1,N) WRITE (NPRNT, 44) 44 FORMAT (1H1) WRITE (NPRNT, 11) CALL INTRP(LOE,NWRIT,N,YA,YB,YC,A,C,B) IF (NXT) 10,20,10 20 CONTINUE STOP END B. COHPUTER LISTING FOR SUBROUTINE SUBROUTINE INTRP (LOE, NiRIT, N, YA, YB, YC, A,C, B) c c c PROGRAM NO. 0520 c . . C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE LOE, NHRIT, N, YA, YB, C YC, A, AND C. C THE OUTPUT ARGUMENT FROM THIS SUBROUTINE IS B. c L0B INDICATES BITHER LINEAR OR EXPONENTIAL INTERPOLATION. C NHRIT PRINT INDICATOR. PRINTS WHEN NONZERO. C N IS THE NUMBER OF INTERPOLATIONS TO BE PERFORMED. c YA REFERENCE POINT FOR VALUES IN A. c y B POINT TO BE INTERPOLATED FOR. c YC REFERENCE FOR VALUES IN C. C A CONTAINS THE VALUES TO BE USED FOR THE INTERPOLATION REFERRING c T0 poiNT YA. c c CONTAINS THE VALUES TO BE USED FOR THE INTERPOLATION REFERRING c T0 poiNT YC. C B VALUES THAT WERE INTERPOLATED FOR BY THE SUBROUTINE. THEY c PERTAIN TO THE POINT YB. c C DIMENSION A (99) ,C(99) ,B(99) NPRNT = 15 C c C ERROR CHECK C c IF( YC - YA ) 70,60,70 60 WRITE (NPRNT, 222) YA 222 FORMAT (/, 1X,51H*** INTRP ERROR NO. 0521 — INPUT ERROR IN YA OR YC *,/, 1X,49H*** YEARS INTERPOLATED BETWEEN ARE BOTH EQUAL TO ,F8.3, *38H THEY MUST NOT BE EQUAL TO EACH OTHER.) 63 WRITE (NPRNT, 11) 11 FORMAT (/,5X,18HINTRP INPUT VALUES,/) DO 65 I =1,N 65 B(I) = 0.0 WRITE (NPRNT, 22) LOB, NWRIT,N, YA, YB, YC 22 FORMAT (5X,6HLOE = ,1 1,/, 5X, 8HNWRIT = ,I1,/,5X,4HN = ,12, */,5X,5HYA = ,F13.5,/,5X,5HYB = , F13. 5,/,5X, 5HYC = ,F13.5) WRITE (NPRNT, 33) (A(I),I = 1,N) 33 FORMAT(/,5X,4HA = ,5 (F13.5, 3X) ,/, 9X, 5 (F13. 5,3X) ) WRITE (NPRNT, 44) (C(I),I=1,N) 44 FORMAT (/,5X,4HC = ,5 (F13.5,3X) ,/, 9X, 5 (F13. 5,3X) ) GO TO 1000 C c C CALCULATE DISTANCE BET1EBN POINTS AND DETERMINE WHETHER LINEAR C INTERPOLATION IS TO BE DONE. c C 70 Z = ( YB - YA ) / ( YC - YA ) IF( LOE - 2 ) 80,160,80 C c C LINEAR INTERPOLATION C 192 DOCUMENTATION 80 DO 90 I = 1,N 90 B(I) - MI) " Z * ( MI) " C(I) ) 120 CONTINUE IF( LOE - 1 ) 130, 1«0,130 130 WRITE (NPRNT, 444) LOE 444 FORMAT (/,1X,19H*** INTERF WARNING: ,/, 1X, 26H+++ INTERPOLATION CODE ♦IS ,I1,85H IT HOST BE 1 (LINEAR) OR 2 (EXPONENTIAL); BOTH LINEAR A *ND EXPONENTIAL HERE COMPUTED., *A1X,52H*** EXPONENTIALLY INTERPOLATED VALOES HERE RETORNED.) 140 CONTINUE IF( NWRIT ) 150,1000,150 150 WRITE(NPRNT,555) YA,YB,YC 555 F0RHAT(/, 12X, 20HLINEAR INTERPOLATION,//, 13X,1 8HINTERPOLATED VALUE, ♦//, 1X,3(F13.5,6X),/) DO 155 I = 1,N 155 WRITE (NPRNT, 777) A (I) ,B (I) ,C(I) IF (LOE-1) 160,1000,160 C c c EXPONENTIAL INTERPOLATION C — C 160 DO 170 I = 1,N IF (ABS(A(I)) - 0.0000001) 163,163,170 163 WRITE (NPBNT, 55) 55 F0RHAT(/, 1X,44H*** INTRP ERROR NO. 0522 — INPUT ERROR IN A *,/, 1X,68H*** ONE VALUE OF A IS ZERO, EXPONENTIAL INTERPOLATION IS ♦IMPOSSIBLE. ) GO TO 63 170 B(I) = A(I) ♦ EXP(ALOG( C(I) / A(I) ) ♦ Z ) IF( NWRIT) 180,1000,180 180 WRITE (NPRNT, 666) YA,YB,YC 666 F0RHAT(/,13X,25HEXP0NENTIAL INTERPOLATION,//, 17X, 18HINTERPOLATED V ♦ALUE,//,1X, 3(F13.5,6X) ,/) 190 DO 200 I = 1,N 200 WRITE (NPRNT, 777) A (I) ,B(I) ,C(I) 777 FORMAT (IX, 3 (F13.5,6X)) 1000 RETURN END INTRP 193 r- Hj -j Q_ cr> t-5 2 o~ o LA r*. S S £ U> N. r- Cj z: £ K cn ^. ~. to E s !» O vS CM — e ~ £ o- m o o s !» ;c ~~ — • • " ^ 5 ^ ' R " " ™ o CO CO o- ~ ^ K t^ 3- ~ m ^ ° IT. Cr- Ct> 3- s s s O- vS — ~- s s s CO vS Ci O s lf> 5 OJ — • » s s $ s *o £ £ z 2 N r-- o m t s 2 0» f^ o- f> s to 3 O- O- U» OJ s s s oo C^J — — 1 3 s vfi O O C> o o s S s CO cm • • • s s s — — s s K K K £ OJ vS 0- (^ i^ o s s £ 3- S- vS OJ co <»\ -~ o K s O (^ 3- Co — r>- s v9 O S s OJ D —. r- ■— ITk CO — s s — 3- O Ki o '•O 5 O O s s UJ rr» u. r~ vr> Oo fC» 9 o 3 ■*T 3- vS 0} tfi c«> r^ \» m 5 r- 3- o 5 s o vS o l*> r^t X. OJ in 0- r- % •*> o 3 s vS r» o~ O- Oj Or — rr> o — 5 a 0» 0= S o> re, h~ U-> o CO o OJ 3 z o — 5 3 D "n CVI O • < . • 3 « • • 3 3 z N 3 >j 5 ar 5 in 3 3 o~ CO vS vS c» r^. 0- — m § • « £ o vS vS o- ^ r- r» ir. Co fc» S o in o S S r~ o ~~ O It, 0- o- t^. vS S \S O — Ci S S — Oo t^ O O o f% o Co s l^~ a vS s S £ in "Ci CO T> \» o ~ Cj — s z o- CO co s K O 3- «■> • . • • s o — • . 2 3 o; S s s u_ o s a lu 2 2 vS O o» O O e: Oo — — O ■— s; Ul 3- CC r- S s in — Oj CO •^ -~ u. -~ v9 0O CO vj> s CO O o a: r- O 3 s vS . Oo C\J o~ 3- . vS vc, 3- vS ° «c ir> rn m o- o S a o~ LT> r- r*\ CO — in tr> O 0» Ci 1^ s CO t • 3: in ir» o s s — vS 0° vS f~- *■ vS vS O CJ Ci o s m O r^ r- v9 CO CO £ s O- in IT> o- o- t • R o v» v& m o o~ • • R s cc -~ — — X LU cr- CO — S s o £ ■— iC *r LL K> — . CO r~ CC OJ O vS m S CC in s 3 0» — o 3- o OJ ~ ~~ o s o O Cj Or r- o s S! O. ■ o- CO 3- 0» li- . CS fC, hv r- k; LL in — rr> S CO cr- v9 iri CC r^ o o o O s Ol. O r-~ 3- >■ r~ rO lf> s 2 z o- N 3- C£ Ct- CC vS in ia o- ■« • 2 a M — 1— — 2 r- o- Z — 2 s 2 5 z — H 2 a er in -~ •3 o- M Ci 3- r- — 2 M 2 a vr> cS *■ i- o 2 O o cs oo O 2 * Ui . Ln Oo 0- re, o • Q r- ^ fp> Z 3: io — Oo o • vj) o 2 2 2 o O O 00 oo Q. o m rr» ^f^ rr, 2 V- • . . cs o Oo tM 2 2 M r- in OJ cr- oo ■x. vS o O O O ~ o O •<» o- a r- OJ (VI 2 3 _i o~ Oo — ir» Ut o- • • • • 3 CO r~ vS m LU o- . • 2 2 — — . S Of — 2 CO o M o~ ir» CO O » V-4 M » ~ z r-~ r-- vj» o- z rci in fr, Co - z o o z CO o r- "> LU Oo 3- — 3- UJ in vS 3- OJ ^ LU o o- UJ o o » "" :> o- <*> vS r- ^ o- CO oo o» u. > . > o- 3- n "• r> o LT> 0) O rs o O o o •» O o vS r> o o -r n o — o — • r~ ■— o CO O re, vS in o — • . n ~ en — — CO ^ ^ CD — CO — N - — — - — o - V. a CO 1. <* CO ■B C CO co i_ a so -c i. a «o w O O \ "0 o ■o c OJ 1. (3 CO Tl 3- V- -C ■1- ~5 o / a to vo L. a UJ c OJ V— Uj 5 fC» Hi 3- 194 DOCUMENTATION © So o © o © o O 0©0©0©©O©©©©0©00 «0 © ©0©©©0©©0©0©©©©0 as o ©©oo©ooooooooooo • •«f«ltfttftttl«t O O (NSOCNOvOCOvOC^fNOOO^t^OvOlO vo so vof>oro^voa-r~a , r^o>u*>*»-in( T ) *or»t^CT\»"-a0cr)O>©CNVOvOr~r\)r*-T-©o>vor»(Nr»*©vom©oom*coir> © B o m Pu o SB O o © © © in o M o ©oo©©©o©oo©o©o©o VO H 9 © O00©00©0000©0000 & E-< iJ © ©inmoifiooooinmooooifi <- «* «« t i , . t t . f t t . • . • i • t kJ t> IT) OONlflMbSNiOWr-OaiSlUir- 03 O vo cNvoo><^oo©^coir> T ~ooa>cNr-mif> E-< o o< o a> ©r»»-f r ior»' r >o>cNina-ina>' T >' r >vo D pli os w r- ooa-inmr^fivoinoofiOT-ntN^m Oi w h oo(NCTioooo «< B SB •m en m h m o i/i *- sb *3 o o©o© H © 0©0©Oo©©©0©©©0© J © ©O©©©000©00©0©0© • © ©oo©©©©©©©©©©©©© H © OOlTlfOOO^vOtNf^OCTiflT-i-OOfMOO SB r» r-0000VOv0a-*00t^V0r»fNr-(NVO>O M ^ 00m*00©v0OCTilf)00*00CN|(NT-© > r- 0>O00M-r*N000\omoo(n(»0> © ©in(Naoinvo^ - iO(NCT>ioc>irgr-'r-»- INTRP 195 05 o & o W o &-. o X o Ot O f— r^ o EH 2 o o vO H Eh w E «t B o h-l fJ o PS O «* o Pn 05 > o o in w Q o VO H W 1 vT> != EH in ^* H 1-1 VO « 1-1 o T» o «a Oi h H EH 04 S= H H « W SB H EH 55 H W M O Of Tl M a o W o rvj a* X H « M == H 6» O o © o o o © VO o (Ni^voO'-oofLnovr^QT-in'^inpooo (Ui-aXNicNnmotoooioninrno oorooooo»-'-r-T-(Nf r >=rr-fN»-ino ©ooooooooooooo'-rNco© OOOOOOOOOOOOOOOOO' - oovoinrooivor~-' - in(NovooocD' _ vo*o vOOaDS>"V0O 0>r-fNvOr>-0 eO*OOOrrrr-rNm*OOmNlOO oooooooooooooo^-csfoo ooooooooooooooooot- (Tio-o inooiooMN»Ki»ru)MninwineDo OOOOOOOOOOOOOO»-fNr0O OOOOOOOOOOOOOOOOOt- 196 DOCUMENTATION ►J *a M P-l Z M 2 o a. M M Q ss « H z Eh O CQ i-4 «a H X w » o Cm M W o o o m , z o cr> o o o © en © o © ■ ps cs © on © © © o o o o o hid meococom moooonro r- h h t • • • • ttit> z w © \o cr« a r» © vo cr> * c- q h ca to mmmm \o in m if) in z ,-j a. en w If) i- M t SB O M « nvi se 03 O Z E-l D H q » >• oooooHit^orosj-oin W z o oooo o < © a- oo a- co OT EH Q O W O OOOO CM > O CTi t~- in oo*-if>co » eh m eo« _ if)co w wo o «o tnvoifiin h * vo m v© m m H CM CM Q Oft M cf> PS PCi 05 Pd. <- >-JO»- O H H W H «S Cm Pm Q EH E-t «l H OS O 95 Z i-4 En W Cm •• U H H O SB EH Eh 05 O Cu HZ w eh s z tw os 03 z w tO Z M O 1-3 «S M O H Z H J IB EH Cm it3 W EH < S Z X u tn «S < H H H O O T- *» o w o o«-»-o CO EH EB i-3 Eh »J O OOOO O OOOO O OZ OOOOO OOOOO CQ CM Cm W OOOOO OOOOO pa as z in orrw in © *~ r- oo K HHO I • • t « • • » t t mfhfhcm ©©or-© © © \ovoifivo r^vovoiftvo W H H Pfl ON c« > r- *» D # * * O * * * in * # « INTRP 197 as M aa H © S3 u •4 M O Eh i-5 «a B a M W oa o O in © T— o O VO (N (N EH O Eh © 3C © o !*• © o o lO © «N 1*1 N H S3 H © O o © tw- os O O 6H © © © © «8 iJ X «9 D ss o H H es aa © as o r> « m a> H t- M EH OS H B <* » Ot *a sb as H M 03 M EH I V O I Eh m m EH M (0 US V) 03 m Q O H H • «1 *8 OS « M « EH 01 SB pa h o ea as pa cu in 03 OS CC M EH <* pb sb pa pa h x o * » o » » CO • » to M O > EH D 04 Cw 03 Eh © © © o o o o o o © © o © © © • t I © to © r» v9 (-. o* o* ON © © © © 00 »» © o \0 \0 O O oo r © O en ao 9 oo o o © «- • • • I o o © o ■ fi' pa as SB ' •« flO U SB 8B t« ►» «M II II II INTRT I. DESCRIPTION OF PROGRAM A„ PURPOSE To determine the intrinsic qrowth rate, given the female life table function 5 L in the childbearinq aqes and age-specific fertility rates based only on female births. B. DATA NEEDED 1. Seven e L values from a life table for females for agas 15-19, 5 x a » 20-24. 25-29, 30-34, 35-39, 40-44, and 45-49. 2. Seven age-specific fertility rates in 5-year age groups for aqes 15-19, 20-24, 25-29,. .. ,45-49. II. BETHODOLOGY A. MATHEMATICAL DERIVATION In a staple population the relation among mortality, fertility and the intrinsic growth rate for the female population is v r ' x a* = mnnno. (0 u 1 • • e dx = 100000. where x is the age. 1 is the survival function from birth to age x (the 1 life X X table function where 1 = 100000.). x is the fertility rate at age x, for female births. r is the intrinsic growth rate. u is the age at the beqinninq of the female reproductive ages. v is the aqe at the end of the female reproductive aqes. In discontinuous notation, the above formula is: Y, C L . J • e" r * (3d " 2 * 5) = H = 100000. (2) *=15,5 5 x 5x where C L is the C L value from the life table where 1 = 100,000. 5 x 5 x o To obtain the intrinsic qrowth rate the above equation orast be solved for r. This can be done by an iterative process. First, settinq r equal to Tj (for instance .01) a value of H, 199 200 DOCUMENTATION in formula 2 is obtained. Then by substituting r equal to r (for instance .04) in formula (2), a second value, H can be obtained. By interpolating between these two values an estimate of r is obtained as follows: (100000. - H ) , . r 3 = r 2 + ( F1 - r 2 ) ^ - g where r is the first approximation of the intrinsic growth rate. Substituting the value of r 3 in eguation (2) a value H 3 is obtained. If |H -100000. |< 5 then r is accepted as the intrinsic growth rate. Otherwise, the r and H from this interpolation are substituted for the r or r„ value and its corresponding H value in equation (3) and hence I 2 i obtaining r.. The r. is used to calculate H.. The value of H, is again 4 4 4 4 compared with 100000. If the difference of H, and 100000. is greater 4 than 5, then the above iterative procedure is repeated until the constraint |H -100000. |< 5 is met. B. COMMENTS The intrinsic growth rate obtained as a result of the calculations of this subroutine is for a stable population with the mortality and fertility characteristics given as input. This intrinsic growth rate will usually differ from the rate of natural increase of the population for which the mortality and fertility were given. III.B lit PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using mors than one sob- routine see the Appendix. 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL INTRT (BGLX5, ASFR, NWRIT, RNG) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a qroup of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variables BGLX5 and ASFR in the argument string are arrays. The following dimension statement must be included in any main INTRT 201 proqram usinq this subroutine. DIMENSION BGLX5(7) ,ASFR(7) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package None 2. Library functions a. EXP (base of the natural logarithm) b. ABS (absolute value) 3. Card diagram of main proqram and subroutines. / / / CARDS INDICATING END OF DECK / / / / /I / INPUT DATA / | / / I / /I I / / COMPUTER CONTROL CARDS / | | / / / 1 1/ / /I I / / SUBROUTINE INTRT / | | / / / I 1/ / /J I / / MAIN PROGRAM / | | / / COMPUTER CONTROL CARDS / | | / BEGINNING OF DECK I / 1/ / / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main proqram included with this publication are as qiven below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arquments in section IV. B. See examDle, section V. C. Card 1 Columns 1 2-53 54-80 1-7 8-14 Variable Name Definition I (Blank BGLX5 I I Label used to identify the output I | Blank I I Capital rL from the life table for females 15-19. The number should end in column 7. I I I I ICapital cL v from the life table for females 20-24. The number should end in column 14. 202 DOCUMENTATION I 3 j 4 15-21 j 1 43-49 | I I I 50-80 | I 1-7 |ASFK I 8-14 15-21 | I 43-49 | 50-80 ( I INHEIT I NXT 4-80! jCapital 5L X from the life table for females 25-29. The number should end in column 21. Capital 5 L X from the life table for females 45-49. The number should end in column 49. Blank Age-specific fertility rate for female births by females 15-19. The number should be entered with a decimal in column 2. Aqe-specific fertility rate for female births by females 20-24. The number should be entered with a decimal in column 9. Aqe-specific fertility rate for female births by females 25-29. The number should be entered with a decimal in column 16. Aqe-specific fertility rate for female births by females 45-49. The number should be entered with a decimal point in column 44. Blank Write indicator. If a zero is punched in column 1, the subroutine INTRT will not write out the results of its calculations. If any other value is punched in column 1, the subroutine INTRT will write out the results of its calculations. Blank The code indicating if there is another set of data following this one. If a zero is punched in column 3, this is the last set of data. Any other value punched in column 3 indicates another set of data follows this one. Blank I?. S U B R U T N E A. SUBROUTINE STATEMENT All external subroutines beqin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE INTRT (BGLX5,ASFR,NWRIT, RNG) B. DESCRIPTION' OF ARGUMENTS Name I IBGLK5 I Row Obtained Definition i Transferred In fThe seven Capital 5 L from a life table |for ages 15-19, 20-214, 25-29, 30-34, S35-39* 40-44 and 45-49. If any of tha Iseven 5L X are less than 60,000 or great- |ec than 472,000, the subroutine will Sprite out error message number 0551 land return to the calling program. INTRT 203 ASFR (Transferred In HHRIT RNG Transferred In Transferred Out The 5-year aqe-specific fertility rates for female births only for females aqe 15-19, 20-21, 25-29, 30-34, 35-39, 40-44, and 45-49. If any of the seven values for the aqe-specific fertility rates are negative, the subroutine will write out error message number 0552 and return to the calling proqram. The write indicator which determines whether the subroutine will write out the results of its calculations. If NWRIT is zero, the subroutine will not write out the results of its calcula- tions. For any other value the sub- routine will write out the results of its calculations. The intrinsic growth rate pertaining to a stable population with the given Capital 5 L x and aqe-specific fertility rates. C. ERROR MESSAGES 0551 *** INTRT ERROR 0551 — INPUT ERROR IN BGLX5 *** ALL VALUES OF CAPITAL L MUST BE GREATER THAN 60,000 AND LESS THAN 472J0OO. 0552 *** INTRT ERROR 0552 — INPUT ERROR IN ASFR *** ALL VALUES OF AGE-SPECIFIC FERTILITY RATES BUST BE POSITIVE. 0553 *** INTRT ERROR 0553 -- PROBABLE INPUT ERROR *** IMPOSSIBLE TO ESTIMATE INTRINSIC GROWTH RATE (CHECK INPUT) V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c c HAI ii PKOGRAM FOR SUBROUTINE INTRT c c C THIS PROGRAM USES A SET OF DTAT CARDS WHICH IS READ IN BY FOUR C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLWS. C c THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL c T0 BE 0SED T0 IDENTIFY THE OUTPUT. THIS LABEL WOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING c ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED c XN COLUMNS 2-53 OF THE CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN THE SEVEN C LIFE TABLE VALUES OF CAPITAL L (BGLX5) FOR THE 5-YEAR AGE GROUPS C 15-19 THROUGH 45-49. C BGLX5 IS CONTAINED ON ONE CARD. SEVEN COLUMNS ARE ALLOWED FOR C EACH VALUE. THE VALUES SHOULD BE ENTERED SO THAT THEY C — END IN COLUMNS7, 14, ... , 49. C C THE THIRD READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE SEVEN c VALUES OF THE AGE-SPECIFIC FERTILITY RATES FOR FEMALE BIRTHS C ONLY (ASFR) IN 5-YEAR AGE GROUPS 15-19 THROUGH 45-49. THE C FERTILITY RATES ARE EXPRESSED PER WOMAN. C ASFR IS CONTAINED ON ONE CARD. SEVEN COLUMNS ARE ALLOWED FOR c E&CH VALUE. THE VALUES SHOULD BE ENTERED SO THAT THE c DECIMAL POINTS WILL BE IN COLUMNS 1, 8, ... ,43. C C THE FOURTH READ STATEMENT USES ONE DATA CARD. 204 DOCUMENTATION C — THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN (1) THE c C0DE INDICATING WHETHER OR NOT THE RESULTS OF THE SUBROUTINE ARE c T0 BE PRINTED (NHRIT) AND (2) THE CODE INDICATING IF THERE IS C ANOTHER SET OF DATA FOLLOWING THIS ONE (NXT) . C NWP.I1 IS LOCATED IN COLUMN 1. IF A ZERO IS PUNCHED IN COLUMN 1 c THE OUTPUT HILL NOT BE PRINTED. IF ANY OTHER NUHBER IS c PUNCHED IN COLUMN 1, THE OUTPUT BILL BE PRINTED. c _-_— NXT IS LOCATED IN COLUMN 3. A ZERO PUNCHED IN COLUMN 3 c INDICATES THIS IS THE LAST SET OF DATA. ANY OTHER DIGIT c PUNCHED IN COLUMN 3 INDICATES ANOTHER SET OF DATA FOLLOWS c THIS ONE. c _ _ c _ DIMENSION BGLX5(7) ,ASFR(7) NREAD = 1 NPRNT = 15 5 READ (NREAD, 3) READ(NREAD,2) (BGLX5 (I) . 1=1 ,7) READ (NREAD, 6) (ASFR (I) , 1= 1 , 7) READ (NREAD, 1) NWRIT, NXT WRITE (NPRNT, 7) WRITE (NPRNT, 3) CALL INTET (BGLX5 , ASFR, NWRIT, RNG) IF (NXT) 4,4,5 4 CONTINUE STOP 1 FORMAT (11, 1X, 11) 2 FORMAT (7F7. 0) 3 FORMAT (1X,52H ) 7 FORMAT (1 HI) 6 FORMAT (7F7.6) END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE INTRT(BGLX5, ASFR, NWRIT, RNG) c c C PROGRAM NO. 0550 c — _ c — _ C THE INPUT ARGUMENTS ARE BGLX5, ASFR, AND NWRIT. C THE OUTPUT ARGUMENT IS RNG. C BGLX5 IS THE SEVEN LIFE TABLE VALUES OF CAPITAL L FOR THE c FEMALE 5-YEAR AGE GROUPS 15-19 THROUGH 45-49. C ASFR IS THE SEVEN AGE-SPECIFIC FERTILITY RATES IN 5-YEAR AGE c GROUPS 15-19 THROUGH 45-49. THE FERTILITY RATES ARE FOR c FEMALE BIRTHS ONLY AND ARE PER WOMAN. C NWRIT IS THE PRINT OPTION. IF NWRIT=0, THE OUTPUT WILL NOT BE c PRINTED. IF NWRIT EQUALS ANY OTHER NUMBER, THE OUTPUT WILL C BE PRINTED. C RNG IS THE INTRINISIC GROWTH RATE GIVEN AS OUTPUT. c c DIMENSION BGLX5 (7) .ASFR (7) ,AGE(7) NPRNT =15 C c C > — VERIFICATION OF INPUT ARGUMENTS c _ C NERR = DO 11 1=1, 7 IF (BGLX5 (I) - 60000.) 1,1,2 2 CONTINUE IF (BGLX5(I) - 472000.) 11,1,1 11 CONTINUE GO TO 8 1 NERR = 1 WRITE (NPRNT, 3) 3 FORMAT (//,49H *** INTET ERROR NO. 0551 — INPUT ERROR IN BGLX5,/, *80H *** ALL VALUES OF CAPITAL L MUST BE GREATER THAN 60000. AND L *ESS THAN 472000. ) 8 CONTINUE INTRT 205 DO 6 1=1,7 IF (ASFR (I) + 0.00001) 5.6,6 5 CONTINUE GO TO 9 > NERR = 1 WHITE (NPRNT, 7) 7 FORMAT(/,48H *** INTRT ERROR NO. 0552 — INPUT ERROR IN ASFR *,/,68H *** ALL VALUES OF THE AGE-SPECIFIC FERTILITY RATES BUST BE ♦POSITIVE) 9 CONTINUE IF (NERR) 4,4,70 ITERATIVE INTERPOLATION FOR ESTIMATE OF NATURAL GROWTH RATE 4 R1 = .01 R2 ■ .04 A = 0. B = 0. DO 10 I =1,7 Y = I AGE(I) = 17.5 + 5. * (Y-1) A = A + (EXP(-R1 * AGE(I))) * BGLX5 (I) * ASFR (I) 10 B = B + (EXP(-R2 * AGE(I))) * BGLX5(I) * ASFR(I) DO 50 K = 1,12 RNG = 0. C = 0. RNG = R2 + (R1-R2) * ((B-100000.) / (B-A) ) DO 20 I =1,7 20 C = C + (EXP(-RNG * AGE (I) ) ) * BGLX5(I) *ASFR(I) IF (AB3(C-100000.) - 5.) 90,90,30 30 CONTINUE IF (ABS(RNG-RI) - ABS(R2-RNG)) 40,35,35 35 R1 = RNG A = C GO TO 50 40 S2 = ENG B = C 50 CONTINUE WRITE (NPRNT, 60) 60 FORHAT(/,49H *** INTRT ERROR NO. 0553 — PROBABLE INPUT ERROR */63H *** IMPOSSIBLE TO ESTIBATE INTRINSIC GROWTH RATE (CHECK INPUT *)) PRINTING OF INPUT ARGUBENTS AND ZEROING OUT OF RNG BECAUSE OF ERRSORS. 70 WRITE (NPRNT, 80) ASFR,BGLX5, NWRIT 80 FORMAT(//27H INTRT INPUT ARGUBENTS,, *//26H ASFR= ,7F13.4 */27H CORRESPONDING BGLX5= ,7F13.0, */13H NWRIT = , 15) RNG =0.0 GO TO 1000 PRINTING OF OUTPUT AND RETURN 90 CONTINUE IF (NWRIT) 1000,1000,100 100 WRITE(NPRNT,110) 110 FORMAT (////, 2X,3HAGE,4X, 9HFERTILITY, 51, 4HL(X) ,/, 1 1 X, 5HRATES) DO 120 1=1,7 NAGE = 10 + 5 * I NAGF = NAGE +4 WRITE(NPRNT, 130) NAGE, NAGF, ASFR (I) ,BGLX5(I) 120 CONTINUE 130 FORMAT(1X,I2,1H-,I2,4X,F6.5,6X,F7.0) WRITE(NPRNT,140) RNG 140 FORBAT(//,1X,25HINTRINSIC GROWTH RATE IS ,F7.5 ) 1000 RETURN END 206 DOCUMENTATION or Q uu C-3 S ss s £ " " S s s 2 " " £ j; ~ c ^ c ° S e s s o> 5 s s «> ft s 3 s u> to s 3 s 3 ■■ s V0 ■a s VO 3 s" 1 vo s s s s at s 8 a s Kj k s £ s s s s s s 3 K >» S K 8 si S 8 s S o> r» m 3 f^ 3 9 o tc, in >o * t»s 3 CO 3 3 o- CO Oo O Q "S *» 3 4 ici o CM cs O Tj •n 3 3 • • 3 3 3 tr\ O O S •n 3 5 rt\ ~- CM — CO 5 w\ 3 3 *■ d- vS \S M) v» 3 > IT» 3 S -~ tn in CO ^O 00 £ ■»_ CO S S D o» O — O ~- S C» CO S s 3- o fCl o <»» cs S 3> Ci ft s • » • s • s s M> Oo Oo s -A £ CS OO 0» oo Oo in >o o vr, o R v» o S oo — O tcl o •Cl S OO CIO !^ s o © CM vS CO v» S c» rr, S s 3- cm CO fC «5 K\ C> s * — - S a • UJ . ■ s • S s i^ J tv r>- s rv " a o- a: CO o C>1 r- £ 3- 1^ *■ r~ s \S c*. S £ * e- Ul 3- O) * v& s * vS s » •^ in u_ »c> — r<% — s — 0a s 8 3- CM tc ~- >*% ■— s * — R s o • co . • s • Pj s 1*. o — CM CO ~ o s s o* o- CO CO CO CM 8 c*» s Ol — — r^ 3: 0- <*> ~- o- T» CO o> — <*% 2 - o v» H- VS o vr» v» Ci m IS o P» 2 5 to co -. CK 3- r- >4-> *• r~ >o - CO t*> ^ s 114 * f<% O |Ci -. O fC> — cs 2 3- CM 2 s -I . Z • • 2 • 2 2 or !«•> w> csr os or « rC 2 2 z Vf> >- r- r- o i~- r- O 2 U> a O 3- o: 2 — o- 2 2 U- IT> M5 Ui 00 |C» K 00 «v or 3 Vi> o 2 2 CM oo £ to r- UJ »r> »>>■ UI S CO CM 2 T. G: 3- evj Ui IC> — re, — o tc» o ■» 3- 1» n LU CM Ul «"> p~ «% r- io CM •0 » >• CM co j »- a- h- o- 3- i- „ CO u-> ^ • ^ O- o «c 1^ — co 1^. -~ cn - o- p^ * ~ o evi o- — • o vS o- —. uJ \s o- — U4 „ CNJ o o ~, i V/5 3- o o tc> o »- ro C) V- ~ ch o " - • — . — . — - . — - d 4- CO C <- <3 CO -£ +- 3" W O •- w cf ■» c CO c a -* a Ci t a CD to 4- a O c CJ £ a O "» c CO w « a C3 -r *- 3- ; CO CO M «1 a w « H SB H > D O (0 d- ^- sr * * c» ci tx HCOOOOOOOO HE-lOi©iOCr**-rOiO H 4Ot er a> »- cn cr Hi vC' co «* r- co \o * o in o> -j vo in =j "l c\i © co mnnrofofKN Mi> in ro OS r- ro 05 W as eft w ra or- . vO eh h O ro © in o. © Si B H I -s i % ►J in r- rt! EH ii in eh as in in m w X © en a j < s o . u ts CQ EH T- o OS W in Z Cm *a © r- W in O ■ © 05 H H -O O W D a M Bi 05 H Qj 35 ro o os s * o M eg h4 H CK II PS 41 (0 W Eh > H II « H OS 03 OS 05 H Dm EH ^ EH CM CO 05 o a -i SB in o at H «! H •a o sb EH 10 » * H * * EH * # EH (N H in en in © 4J ca a- o as 05 W Cm o > M Eh M in o en M CQ EH in © en M EH 05 «l Cm 05 m «o x EH a h M .J H 05 EH O OS OS CM- OS Cm W u EH H © Cm Qi H as 05 EH hJ M < EH CO # # M * » EH * * 10 EH 85 s © o OS «s en D a. SB OS Eh as VO C* 00 vo i- st • i" o * ro © r» o> ro t- fN © • fN O st vo ro on in © t- rsi m • (N © St I m * r» fN vO fN O CM • fN © * II m x >-s C3 CQ CJ5 t- 55 H a as o Ot II l/l II W En OS OS H Cm OS OS VlOS < U S5 INTSP I. DESCRIPTION OF PROGRAM A. PURPOSE To estimate a stable population distribution and the life table per- taining to such a population, given the intrinsic growth rate and another population parameter. B. DATA NEEDED 1. An indicator for determining which stable population parameter is to be matched. See the chart given in the section IV. B. Description of Arguments. 2. The value of the stable population parameter which is to be matched. 3. The intrinsic growth rate of the stable population whose distribution is to be obtained. U. The sex for which the stable population distribution is to be obtained. 5. The region of the Coale-Demeny Model Life Tables which is to be used in determining the stable population and life table pertaining to the given parameter and intrinsic growth rate. II. METHODOLOGY A. MATHEMATICAL DERIVATION By using the regression coefficients calculated by Coale and Demeny a model life table for a particular region is generated for a life expectancy at birth of 40 years. With this life table and the given intrinsic growth rate, a stable population and its parameters are calculated. (For this purpose the SPP subroutine is used.) The same procedure is repeated by generating a life table with a life expectancy at birth of 65 years. With the given specific stable population parameter and the similar parameter from the two above-calculated stable populations the following interpolation procedure is made (7 Z ) o3 _ o1 . ,o2 o1v v e ~ V e o " e o + (e o - e } * (z*- V where o, e is the life expectancy at birth of 40. 02 e Q is the lxfe expectancy at birth of 6 5. °3 e is the estimate of the life expectancy at birth corresponding to the given parameter that describes the stable population. z is the given parameter pertaining to the stable population that will be estimated. z ? is the stable population parameter corresponding 02 to the life table with e of 65 and the given intrinsic growth rate Z] is the stable population parameter corresponding 209 210 DOCUMENTATION °l to the life table with e of 40 and the given intrinsic qrowth rate. o * o3 o3 Once the estimate e Q is obtained, a life table corresponding to e and a stable population based on this life table are generated with the given intrinsic growth rate* This new stable population yields another estimate of the given specific parameter, that is z, . If |. - . | < « where o varies with the parameter being interpolated. 03 If the constraint is met, the process is completed. Otherwise, e Q and z. oi 03 replaces the e Q and z- (for 1=1, 2) which is furthest from e and the interpolation is repeated. This iterative process continues until the constraint is met. When the constraint is met, the life table and the stable population are accepted as representative of the given intrinsic growth rate and specific parameter. B. COMMENTS Since this subroutine is restricted to the mortality patterns of Coale-Demeny Regional Model Life Tables, both the fertility and mortality rates are based on the patterns as given by Coale-Demeny in Regional Model Life Tables and Stable Populations. Although the stable population distri- bution and its parameters can be generated for either sex, when a male stable population distribution is estimated, the female fertility rates are applied to the male distribution for purposes of determining the crude birth rate and gross reproduction rates. III. B A I N PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL INTSP(N,A,RNG,NSEX,NREG,CDMLT,S) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single -valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variables CDHLT and S in the argument string are arrays. The following statement must be included in any main program using this subroutine. DIMENSION CDMLT(18,8),S (49) INTSP 211 B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package a. MLT b. ELT c. SPP d. GTCON e. PLT* f. PSPP* * The subroutines PLT and PSPP are needed by the main program to write out the results obtained by INTSP. 2. Library functions a. ABS (absolute value) b. SQRT (sgoare root) c. EXP (base of the natural logarithm) 3. Card diagram of main program and subroutines. / CARDS INDICATING END OF DECK /I / ~ INPUT~DATA / 1 / / I / COMPUTER CONTROL CARDS /| | / / I I / SOBBODTINE PSPP /| | | / S0BROUTINl~PLT /| | | / / " S0BBO0TINE - GTCON /| | | / / / III/ / SUBROUTINE SPP /III/ / / III/ / SUBROUTINE ELT /III/ / subroutinIThlt / III/ / / III/ / SUBROUTINE INTSP /III/ / / III/ / MAIN PROGRAM /III/ ' " ""computer contr6l~cards / J I I / / III/ I I / BEGINNING OF DECK I 1/ I / 1/ / / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format reguirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 1 1 1 Blank I I 2-53 Label used to identify the output 1 | 54-80 Blank 212 DOCUMENTATION 2 I 1-2 |N 3 4-9 10 11-16 17 18 19 20 21 22-80 RNG NSEX NREG NXT The code indicating which is the stable population parameter to be used in addi- tion to the intrinsic growth rate to determine the stable population. The value for N should end in column 2. To determine the value of N see the chart in section I?.B. Description of Arguments. Blank The value of the stable population para- meter N. The decimal point must be entered. Blank The intrinsic growth rate. The decimal point should be in column 11. Blank The sex of the stable population to be generated. A one punched in column 18 indicates males. A two punched in column 18 indicates females. Blank The region from the Coale-Demeny Regional Model Life Tables to be used in generating the stable population. A one punched in column 20 indicates west region. A two punched in column 20 indicates north region. A three punched in column 20 indicates east region. A four punched in column 20 indicates south region. The code indicating if there is another data set following this one. A zero punched in column 21 indicates this is the last set of data. Any other number punched in column 21 indicates another set of data follows this one. Blank IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: B. SUBROUTINE INTSP (N,A, RNG, NSEX, NREG,CDHLT,S) DESCRIPTION OF ARGUMENTS Name N How Obtained Definition Transferred In I |The code indicating the I population parameter th | in conjunction with the irate to generate the st J distribution and Coale- | Table. The codes are a | below. Acceptable code |35 and from 37 to 49. lis not between 1-35 and I routine will write out J0581 and return to the I stable at is to be used intrinsic growth able population Demeny Model Life s given in the chart s are from 1 to If the code given 37-49, the sub- error message number calling program. INTSP 213 RMS INSEX NREG Transferred In Transferred In Transferred In Transferred In Code Variable 01 Proportion of population 0-1 02 Proportion of population 1-4 03 Proportion of population 5-9 04 Proportion of population 10-14 17 Proportion of population 75-79 18 Proportion of population 80+ 19 Proportion of population under 1 20 Proportion of population under 5 21 Proportion of population under 10 22 Proportion of population under 15 35 Proportion of population under 80 • • 37 Intrinsic Birth Rate 38 Intrinsic Death Rate 39 Average Age of the population 40 Proportion of Population 15-49 41 Ratio of births for the given sex to the proportion of population in the reproductive ages (i.e. 15-49) 42 Ratio of population under 5 to population 15-49 43 Ratio of population 5-9 to popu- lation 20-54 44 Ratio of population 5-14 to to population 5 and over 45 Ratio of the population under 15 and 65 and over to population 15-64 (Dependency Ratio) 46 Gross Reproduction Rate Mean Age of Childbearing m=27 47 Gross Reproduction Rate Mean Age of Childbearing m=29 48 Gross Reproduction Rate Mean Age of Childbearing m=31 49 Gross Reproduction Rate Mean Age of Childbearing m=33 The value of the stable parameter that correspo code given in the previ The value of the parame to determine whether it possible range of the s pertaining to the Coale Model Life Tables for s intrinsic growth rate, within this range, erro 0586 is printed out and will return to the call population nds to the ous argument, ter is tested is within the table populations -Demeny Regional ex, region and If it is not r message number the subroutine ing program. Intrinsic growth rate of the stable population distribution to be generated. If the intrinsic growth rate is not between -.01 and .05, the subroutine will write out error message number 0582 and return to the calling program. Sex of the stable population distribution to be obtained. 1=male, 2=female. Any other value is unacceptable and the subroutine will write out error message number 0583 and return to the calling program. Indicates which regional pattern of mortality of the four Coale-Demeny Regions is to be used in determining the stable population distribution and life table. 1=West, 2=North, 214 DOCUMENTATION CDMLT |3=East and 4=South. Any other value jis unacceptable and will cause the sub- routine to write out error message | number 0584 and return to the calling I program. I Transferred Out] The Coale-Demeny Regional Model Life I Table for the specified region (NREG) I which corresponds to the rate of Inatural growth (RNG) and the stable (population parameter (A). I Transferred Out|The stable population distribution (that corresponds to the given sex |(NSEX), Coale-Demeny Region (NREG), | intrinsic growth rate (RNG) , and I stable population parameter (A). C. ERROR MESSAGES 0581 *** INTSP ERROR 0581 -- INPUT ERROR IN VARIABLE N *** CODE OF STABLE POPULATION PARAMETER MUST BE BETWEEN 1-35 OR BETWEEN 37-49. 0582 *** INTSP ERROR 0582 -- INPUT ERROR IN VARIABLE RNG *** INTRINSIC GROWTH RATE MUST BE WITHIN RANGE -.01 TO .05. 0583 *** INTSP ERROR 0583 — INPUT ERROR IN VARIABLE NSEX *** SEX CODE OF POPULATION MUST EQUAL 1 OR 2. 0584 *** INTSP ERROR 0584 -- INPUT ERROR IN VARIABLE NREG *** REGION CODE MUST EQUAL 1,2,3, OR 4. 0585 *** INTSP ERROR 0585 *** ITERATION LIMIT EXCEEDED ATTEMPTING TO INTERPOLATE FOR STABLE POPULATION. 0586 *** INTSP ERROR 0586 *** VALUE OF S ( ) IS BEYOND PERMISSIBLE RANGE FOR STABLE POPULATIONS DEFINED BY *** THE GIVEN INTRINSIC GROWTH RATE AND COALE-DEMENY MODEL LIFE TABLES (CHECK INPUT) *** VALUE = RANGE = V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM ■MAIN PROGRAM FOR SUBROUTINE INTSP -THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY TWO -READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ -STATEMENTS AS FOLLOWS, -THE FIRST READ STATEMENT USES ONE DATA CARD. -THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL ■TO BE USED TO IDENTIFY THE OUTPUT. THIS LABEL WOULD USUALLY -CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING -ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF -THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED -IN COLUMNS 2-53 OF THE CARD. -THE SECOND READ STATEMENT USES ONE DATA CARD. -THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN (1) THE -CODE (N) INDICATING WHICH STABLE POPULATION PARAMETER IS BEING USED -IN ADDITION TO THE INTRINSIC GROWTH RATE, (2) THE VALUE OF -THE STABLE POPU1ATION PARAMETER (A), (3) THE INTRINSIC GROWTH RATE -INCREASE (RNG), (4) THE CODE INDICATING THE SEX OF THE POPULATION -(NSEX), (5) THE CODE INDICATING THE COALE-DEMENY REGION (NREG), -AND (6) THE CODE INDICATING IF THERE IS ANOTHER DATA SET FOLLOWING -THIS ONE. -N IS LOCATED IN COLUMNS 1-2, ENDING IN COLUMN 2, A 01,02,03, 04, ..., OR 18 PUNCHED IN COLUMNS 1 AND 2 INDICATES THE PERCENT OF THE POPULATION IN AGE GROUPS 0-1, 1-4, 5-9, 10-14,..., 80+ RESPECTIVELY. A 19, 20, 21,..., OR 35 PUNCHED IN COLUMNS 1 AND 2 INDICATES THE PERCENT OF THE INTSP 215 c POPULATION UNDER AGE 1, 5, 10, ... , 80 RESPECTIVELY. C A 37 PUNCHED IN COLUMNS 1 AND 2 INDICATES THE INTRINSIC C CRUDE BIRTH RATE. A 38 PUNCHED IN COLUMNS 1 AND 2 c INDICATES THE INTRINSIC CRUDE DEATH RATE. A 39 PUNCHED c IN COLUMNS 1 AND 2 INDICATES THE AVERAGE OF THE POPULATION. c & 40 PUNCHED IN COLUMNS 1 AND 2 INDICATES THE PROPORTION OF c THE POPULATION AGED 15-19. A 41 PUNCHED IN COLUMNS 1 AND 2 c INDICATES THE RATIO OF BIRTHS TO POPULATION AGED 15-49. C A 42 PUNCHED IN COLUMNS 1 AND 2 INDICATES THE RATIO OF c POPULATION UNDER 5 YEARS OF AGE TO THE POPULATION AGED c 15-49. A 43 PUNCHED IN COLUMNS 1 AND 2 INDICATES THE RATIO c OF THE POPULATION AGED 5-9 TO THE POPULATION AGED 20-54. C A 44 PUNCHED IN COLUMNS 1 AND 2 INDICATES THE RATIO OF THE c POPULATION AGED 5-14 TO THE POPULATION AGED 5+. A 45 c PUNCHED IN COLUMNS 1 AND 2 INDICATES THE RATIO OF THE c POPULATION AGED 0-14 PLUS THE POPULATION AGED 65* TO THE c POPULATION AGED 15-64. A 46, 47, 48, OR 49 PUNCHED IN C COLUMNS 1 AND 2 INDICATES THE GROSS REPRODUCTION RATES FOR C MEAN AGES OF CHILDBEARING 27, 29, 31, 33 RESPECTIVELY. C A IS LOCATED IN COLUMNS 4-9. THE DECIMAL POINT MUST BE c ENTERED. C -RNG IS LOCATED IN COLUMNS 11-16 WITH THE DECIMAL POINT IN C COLUMN 11. C NSEX IS LOCATED IN COLUMN 18. A 1 PUNCHED IN COLUMN 18 INDICATES c MALES AND A 2 PUNCHED IN COLUMN 18 INDICATES FEMALES. C NREG IS LOCATED IN COLUMN 20. A 1, 2, 3, OR 4 PUNCHED IN c COLUMN 20 INDICATES RESPECTIVELY THE WEST, NORTH, EAST, c OR SOUTH REGION FROM THE COALE-DEMENY MODEL LIFE TABLE C SYSTEM. C NXT IS LOCATED IN COLUMN 22. A ZERO PUNCHED IN COLUMN 22 c INDICATES THIS IS THE LAST SET OF DATA. ANY OTHER DIGIT c PUNCHED IN COLUMN 22 INDICATES ANOTHER SET OF DATA FOLLOW c THIS ONE. DIMENSION CDMLT(18,8) ,S (49) NREAD=1 NPRNT=15 5 READ(NREAD,2) READ(NREAD,1) N, A, RNG, NSEX , NREG, NXT WRITE(NPRNT,6) WRITE(NPRNT,2) CALL INTSP (N, A, RNG, NSEX, NREG, CDMLT, S) CALL PLT (CDMLT, NSEX, NREG) CALL PSPP (NREG, RNG, S (1) ,S (19) ,S (37) , NSEX, CDMLT (1 , 8) ) IF (NXT) 3,3,5 3 STOP 1 FORMAT(I2,1X,F6.0,1X,F6.5,1X,I1,1X,I1 ,1X,I1) 2 F0RMAT(1X,52H ) 6 FORMAT(1H1) END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE INTSP (N, A, RNG, NSEX, NREG, CDMLT, S) • — PROGRAM NO. 0580 ■ — THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE N, A, RNG, NSEX, AND ■ — NREG. • — THE OUTPUT ARGUMENTS FROM THIS SUBROUTINE ARE CDMLT AND S. ■ — N IS THE CODE WHICH INDICATES WHICH STABLE POPULATION PARAMETER IN ADDITION TO THE INTRINSIC GROWTH RATE IS BEING USED. ■ — A IS THE VALUE OF THE STABLE POPULATION PARAMETER INDICATED BY N. — HNG IS THE INTRINSIC GROWTH RATE • — NSEX IS THE CODE INDICATING THE SEX OF THE POPULATION. — NREG IS THE CODE INDICATING THE COALE-DEMENY REGION. ---CDMLT IS THE COALE-DEMENY MODEL LIFE TABLE GIVEN AS OUTPUT. • — S IS THE STABLE POPULATION AGE DISTRIBUTION AND THE STABLE POPULATION PARAMETERS CORRESPONDING TO THE COALE-DEMENY MODEL LIFE TABLE (CDMLT) AND THE INTRINSIC GROWTH BATE (RNG). S IS GIVEN AS OUTPUT. 216 DOCUMENTATION DIMENSION X (4) ,S (49) ,CDMLT (18,8) ,SLIM (49) NPRNT=15 C c . . _ ___ C VERIFICATION OF INPDT ARGUMENTS c — . _. c NERR=0 IF (N-36) 15,1.15 15 CONTINUE IF (N - 1) 1,3,16 16 CONTINUE IF (N - 49) 3,3,1 1 NERR=1 WRITE (NPRNT,2) 2 FORMAT {/ 45H *** INTSP ERROR NO. 0581 — INPUT ERROR IN N * ,/,79H *** CODE OF STABLE POPULATION PARAMETER MUST BE BETHEEN 1 *-35 OR BETWEEN 37-49) 3 CONTINUE IF (RNG+.01) 4,6,17 17 CONTINUE IF (RNG - .05) 6,6,4 4 NERR=1 WRITE (NPRNT,5) 5 FORMAT (/ 47H *** INTSP ERROR NO. 0582 — INPUT ERROR IN RNG * ,/,63H *** INTRINSIC GROWTH RATE MUST BE WITHIN RANGE -0.01 TO * 0.05) 6 CONTINUE IF (NSEX - 1) 7,9,18 18 CONTINUE IF (NSEX - 2) 9,9,7 7 NERR=1 WRITE (NPRNT,8) 8 FORMAT (/ 48H *** INTSP ERROR NO. 0583 -- INPUT ERROR IN NSEX *,/,52H *** SEX CCDE OF THE POPULATION MUST EQUAL 1 OR 2) 9 CONTINUE IF (NREG - 1) 10,12,19 19 CONTINUE IF (NREG - 4) 12,12, 10 10 NERR=1 WRITE(NPRNT,11) 11 FORMAT (/ 48H *** INTSP ERROR NO. 0584 — INPUT ERROR IN NREG *,/,46H *** REGION CODE MUST EQUAL 1, 2, 3, OR 4) 12 CONTINUE IF (NERR) 13,13,190 C c - _ C SET LEVELS OF ACCURACY FOR INTERPOLATION FORMULA c _ C 13 DO 14 1=1,38 14 SLIM(I)=0. 00004 SLIM(39)=0.004 DO 20 1=40,42 20 SLIM (I) =0.0004 SLIM (43) =0.004 DO 25 1=44,49 25 SLIM(I) = 0. 0004 C c c __„__- C SET BOUNDS FOR INTERPOLATION FORMULA c _ C DO 40 1=1,4 E0=I*20 CALL MLT(E0, NSEX, NREG, CDHLT) CALL SPP (NREG, RNG, CDHLT (1, 5), S(1) , S ( 1 9) ,S(37) ) X(I) = S(N) IF (ABS(S(N)-A) - SLIM(N)) 30,1000,30 30 CONTINUE IF (I - 2) 40,31,31 31 CONTINUE IF (X(I-1) - S(N)) 35,35,32 32 CONTINUE IF (A - S (N)) 40,50,33 33 CONTINUE INTSP 217 IF (A - X (1-1)) 50,50,40 35 CONTINUE IF (A - X(I-1)) 40,50,38 38 CONTINUE IF (A - S(N1) 50,50,40 40 CONTINUE GO TO 180 50 Y3 = EO Y2 = EO - 20.0 X3 = X(I) X2 = X(I-1) DO 170 1=1,15 C INTERPOLATE FOR NEW LIFE EXPECTANCY c 60 EO = (Y3-Y2)* (A-X2)/(X3-X2)+Y2 GENERATE NEW LIFE TABLE AND STABLE POPULATION 130 CALL BLT (EO,NSEX,NREG,CDBLT) CALL SPP(NREG,RNG,CDMLT(1,5),S (1) ,S(19) ,S (37) ) IF(ABS(S(N) -A) -SLIM (N)) 1000,140, 140 ■ADJUST BOUNDS FOR NEXT INTERPOLATION IF STABLE POPULATION VALUE •IS NOT SATISFACTORY 140 CONTINUE IF(ABS(E0-Y2)-ABS(E0-Y3) ) 150, 150, 160 150 Y3=E0 X3=S(N) GO TO 170 160 Y2=E0 X2=S (N) 170 CONTINUE ERROR MESSAGES, ASSIGNING OF ZEROS TO OUTPUT AND RETURN WRITE (NPRNT,175) 175 FORMAT (/21H *** INTSP ERROR 0585 */77H *** ITERATION LIMIT EXCEEDED ATTEMPTING TO INTERPOLATE FOR ST ♦ABLE POPULATION) GO TO 190 180 WRITE (NPRNT,185)N,A,X(1) ,X(4) 185 FORMAT (/21H *** INTSP ERROR 0586,/, *16H *** VALUE OF S(,I2, 64H) IS BEYOND PERMISSIBLE RANGE FOR STABL *E POPULATIONS DEFINED BY ,/,88H *** THE GIVEN RATE OF NATURAL INCR *EASE AND COALE-DEMINY MODEL LIFE TABLES (CHECK INPUT), */11H *** VALUE= ,F8.4,8H, RANGE=, F8, 4, 4H TO ,F8.4) 190 DO 200 1=1,49 200 S (I)=0.0 DO 210 1=1,18 DO 210 J=1,8 210 CDMLT(I,J)=0.0 WRITE (NPRNT, 220) N, A, RNG, NSEX, NREG 220 FORMAT (//27H INTSP INPUT ARGUMENTS,, *//9H N = ,15, */9H A = ,F10.5, */11H RNG = ,F9.5, */12H NSEX = ,15, */12H NREG = ,15) 1000 RETURN END 218 DOCUMENTATION or V- ar to. tu -4 a. £ CO co s S s £ £ O^ £ s oo s K R £ IS S £ g K s 5 j ? C C s s K £ s C g s S s s s 1? 3 2 S s 3 3 u S s s S 1? s E a s S K c K s s S IS IS s s s s s s £ s s a a s s s s s 'S 3 9 3 3 5 5 3 9 S 3 3 3 3 3 3 3 3 *r 3 5 3 8 in 3 T § — 3 3 S Ul S S S or (- ^■v si S IS Ul CC cr- R S s o cs: d- s % £ z l £ S 3 r> * in s S h- — s 1 C*l S h- Cs s s 3 2 n tv A s S Ul CO o s s a o Q- s s s a. Ul » s 3 a tU :c \ s a s Q. \- ^-^ s s s ±- 3- 8 s 5 o-> CO 1 Oo S s 3 H M o ir> R 5 3 -~ — -— -~ O o Si 3 s Or or a. i ~ 3 s ui ■— Ul K\ o *- — — Vr> s S 2 1- 1- a. CM oo 2 2 2 Ul •«" Ui — ^/ CM Oo — irv U-> S 2 5 H £ u-» O 5 S 2 o. fe* or tO o s& o \» 3 2 2 o o lu o or O 0; o 2 2 a O • Q • t- • Or • Q: • 3 3 s z z cu Ul Ui 2 2 o, o o £ m ■X. » d- o J- OJ ur> - - co CO ■o c CM -5 CO *-> u. « CO c CU Q CO VI k o CO c CM ~6 1, o o "B k a o c CV) —1 o +. l- Ul <-> 4- « CO (M UJ v> ■*- VI t- Ul CO ■» e CM k- Ul CO X Ul X *- * INTSP 219 D. SAMPLE OOTPUT 1st SET CHE SECOND PARAMETER IS PERCENT UNDER 15 ABRIDGED LIFE TABLE MALES COALE-DEMENY WEST REGION AGE Q(X) D(X) M(X) I(X) L(X) S(X) T(X) E(X) 1 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 0.09460 0.04018 0.01314 0.00976 0.01507 0.02135 0.02297 0.02618 0.03169 0.04070 0.05361 0.07445 0.10371 0.14948 0.21254 0.30446 0.43039 1.00000 9460. 3638. 1142. 837. 1280. 1786. 1880. 2093. 2468. 3069. 3879. 5097. 6572. 8490. 10267. 11582. 11388. 15071. . 10100 .01032 .00265 .00196 .00304 .00432 .00465 .00530 .00644 .00831 .01102 .01547 .02188 .03231 .04756 .07183 .10968 .21427 100000, 90540, 86902. 85759. 84922. 83642. 81856. 79976. 77883. 75415. 72346. 68467, 63369. 56798. 48308. 38041. 26459. 15071. 93662. 352525. 431652. 426703. 421409. 413745. 404582. 394649. 383245. 369401. 352031. 329591. 300418. 262764. 215871. 161249. 103825. 70337. ,89237 .96742 ,98853 ,98759 ,98181 ,97785 ,97545 ,97110 ,96388 95298 93626 ,91149 ,87466 82154 ,74697 ,64388 40386 5487650. 5393989. 5041464. 4609812. 4183110. 3761701. 3347956. 2943375. 2548727. 2165483. 1796083. 1444053. 1114463. 814046. 551282. 335411. 174162. 70337. 54.88 59.58 58.01 53.75 49.26 44.97 40.90 36.80 32.73 28.71 24.83 21.09 17.59 14.33 11.41 8.82 6.58 4.67 AGE STABLE POPOLATION MALE PROPORTION CDMDLATIVE IN AGE PROPORTION PARAMETERS -1 0.0424 0.0424 1-4 0.1464 0.1887 5-9 0.1537 0.3425 10-14 0.1281 0.4706 15-19 0. 1067 0.5773 20-24 0.0884 0.6657 25-29 0.0729 0.7385 30-34 0.0599 0.7984 35-39 0.0491 0.8475 40-44 0.0399 0.8874 45-49 0.0321 0.9195 50-54 0.0253 0.9448 55-59 0.0194 0.9642 60-64 0.0143 0.9785 65-69 0.0099 0.9885 70-74 0.0063 0.9947 75-79 0.0034 0.9981 80+ 0.0019 1.0000 LIFE EXPECTANCY AT BIRTH INTRINSIC GROWTH RATE INTRINSIC BIRTH RATE INTRINSIC DEATH RATE AVERAGE AGE PROPORTION AGE 15-49 BIRTHS/ POP. 15-49 POP. UNDER 5/ POP. 15-49 POP. 5-9/ POP. 20-54 POP. 5-14/ POP. 5+ POP. 0-14 + POP. 65+/ POP. 15-64 LIFE TABLE: COALE-DEMENY WEST REGION MODEL GRR FOR MEAN AGE OF CHILDBEARING AT AGE 27 AT AGE 29 AT AGE 31 AT AGE 33 54.88 0.0341 0.0460 0.0119 20.97 0.449 0. 102 0.420 0.418 0.347 0.969 3.010 3.242 3.504 3.805 220 DOCUMENTATION 2nd SET TH£ SECOND PARAMETER IS THE BIRTH BATE ABRIDGED LIFE TABLE HALES COALE-DEMENY EAST REGION AGE Q(X) D(X) M(X) I(X) L(X) S(X) T(X) E(X) 0.09277 9277. .09891 100000. 93785. .90106 5843972. 58.44 1 0.02560 2322. .00651 90723. 356744. .97669 5750188. 63.38 5 0.00895 791. .00180 88401. 440028. .99247 5393445. 61.01 10 0.00 609 534. .00122 87610. 436716. .99162 4953418. 56.54 15 0.01068 930. .00215 87077. 433058. .98695 4516702. 51.87 20 0.01545 1331. .00311 86117. 427406. .98445 4083645. 47.40 25 0.01565 1327. .00315 84816. 420760. .98354 3656240. 43. 11 30 0.01728 1443. .00349 83489. 413835. .98070 3235480. 38.75 35 0.02135 1752. .00432 82046. 405849. .97497 2821645. 34.39 no 0.02879 2312. .00584 80294. 395691. .96497 2415796. 30.09 45 0.04145 3233. .00847 77982. 381830. .94838 2020105. 25.90 50 0.06222 4651. .01284 74750. 362122. .92342 1638275. 21.92 55 0.09188 6441. .01926 70099. 334393. .88801 1276153. 18.21 60 0.13413 8538. .02875 63658. 296944. .83612 941761. 14.79 65 0.19824 10927. .04401 55120. 248281. .75834 644817. 11.70 70 0. 29 58 2 13073. .06943 44193. 188282. .64931 396536. 8.97 75 0.42859 13338. .10910 31120. 122254. .41296 208254. 6.69 80 1.00000 17782. .20677 17782. 86000. .0 86000. 4.84 STABLE POPULATION MALE AGE PROPORTION CUMULATIVE IN AGE PROPORTION -1 0.0409 0.0409 1-4 0.1427 0. 1835 5-9 0. 1510 0.3345 10-14 0.1263 0.4609 15-19 0.1056 0.5665 20-24 0.0879 0.6544 25-29 0.0730 0.7274 30-34 0.0605 0.7880 35-39 0.0501 0.8380 40-44 0.0412 0.8792 45-49 0.0335 0.9127 50-54 0.0268 0.9394 55-59 0.0209 0.9603 60-64 0.0156 0.9759 65-69 0.0110 0.9869 70-74 0.0070 0.9940 75-79 0.0039 0.9978 80+ 0.0022 1.0000 PARAMETERS LIFE EXPECTANCY AT BIRTH 58.44 INTRINSIC GROWTH RATE 0.0341 INTRINSIC BIRTH RATE 0.0443 INTRINSIC DEATH RATE 0.0102 AVERAGE AGE 21.50 PROPORTION AGE 15-49 0.452 BIRTHS/ POP. 15-49 0.098 POP. UNDER 5/ POP. 15-49 0.406 POP. 5-9/ POP. 20-5H 0.405 POP. 5-14/ POP. 5+ 0.340 POP. 0-14 ♦ POP, 65+/ POP. 15-64 0.942 LIFE TABLE: COALE-DEMENY EAST REGION MODEL GRR FOR MEAN AGE OF CHILDBEARING AT AGE 27 2.900 AT AGE 29 3. 115 AT AGE 31 3.356 AT AGE 33 3.631 INTSP 221 3rd SET 2D PARAMETER IS (POP 0-4)/(POP 15-49) ABRIDGED LIFE TABLE FEMALES COALE-DEMENY SOUTH REGION AGE Q(X) D{X) M(X) I(X) L(X) S(X) T(X) E(X) 0.07752 7752. .08177 100000. 94806. .91255 6490318. 64. 90 1 0.03079 2840. .00786 92248. 361471. .97685 6395512. 69. 33 5 0.00593 531. .00119 89408. 445712. .99500 6034042. 67. 49 10 0.00406 361. .00081 88877. 443484. .99503 5588330. 62, 88 15 0.00588 520. .00118 88517. 441282. .99304 5144846. 58. 12 20 0.00805 708. .00162 87996. 438210. .99129 4703565. 53. 45 25 0.00938 819. .00189 87288. 434392. . 98994 4265355. 48 .87 30 0.01073 928. .00216 86469. 430023. .98833 3830963. 44. 30 35 0.01262 1079. .00254 85541. 425005. .98561 3400940. 39, 76 40 0.01618 1367. .00326 84461. 418890. .98156 2975936. 35. 23 45 0.02074 1724. .00419 83095. 411163. .97449 2557047. 30. 77 50 0.03038 2472. .00617 81371. 400674. .96317 2145884. 26. 37 55 0.04347 3430. .00889 78899. 385918. .94307 1745211. 22. 12 60 0.07100 5359. .0147 2 75469. 363947. . 90628 1359293. 18. 01 65 0.11818 8286. .02512 70110. 329836. .84064 995347. 14. 20 70 0.20606 12740. .04595 61824. 277273. .73314 665511. 10. 76 75 0.34344 16858. .08293 49085. 203280. .47640 388237. 7. 91 80 1.00000 32227. . 17424 32227. 184958. .0 184958. 5. 74 STABLE POPULATION FEMALE AGE PROPORTION CUMULATIVE IN AGE PROPORTION -1 0.0396 0.0396 1-4 0.1385 0.1780 5-9 0.1465 0. 3245 10-14 0. 1229 0.4474 15-19 0.1031 0.5505 20-24 0.0863 0.6368 25-29 0.0722 0.7090 30-34 0.0602 0.7693 35-39 0.0502 0.8195 40-44 0.0417 0.8612 45-49 0.0345 0.8957 50-54 0.0284 0.9241 55-59 0.0231 0.9472 60-64 0.0183 0.9655 65-69 0.0140 0.9795 70-74 0.0099 0.9894 75-79 0.0061 0.9956 80+ 0.0044 1.0000 PARAMETERS LIFE EXPECTANCY AT BIRTH INTRINSIC GROWTH RATE INTRINSIC BIRTH RATE INTRINSIC DEATH RATE AVERAGE AGE PROPORTION AGE 15-49 BIRTHS/ POP. 15-49 POP. UNDER 5/ POP. 15-49 POP. 5-9/ POP. 20-54 POP. 5-14/ POP. 5+ POP. 0-14 + POP. 65+/ POP. 15-64 LIFE TABLE: COALE-DEMENY SOUTH REGION MODEL GRR FOR MEAN AGE OF CHILDBEARING AT AGE 27 AT AGE 29 AT AGE 31 AT AGE 33 64. 90 0.0341 0.0424 0.0083 22.53 0.448 0.095 0.397 0.392 0.328 0.930 2.816 3.017 3.241 3.496 222 DOCUMENTATION 4th SET TEST OF ERROR 0582 *** INTSP ERROR NO. 0582 — INPUT ERROR IN RNG *** INTRINSIC GROWTH RATE HOST BE WITHIN RANGE -0.01 TO 0.05 INTSP INPOT ARGOHENTS, N = 22 A = 0.47060 RNG = 0.06410 NSEX = 1 NREG = 1 ABRIDGED LIFE TABLE HALES COALE-DEHENY WEST REGION AGE Q(X) D(X) H(X) I(X) L(X) S(X) T(X) E(X) 0.0 0. .0 0. 0. .0 1 0.0 0. .0 0. 0. .0 5 0.0 0. .0 0. 0. .0 10 0.0 0. .0 0. 0. .0 15 0.0 0. .0 0. 0. .0 20 0.0 0. .0 0. 0. .0 25 0.0 0. .0 0. 0. .0 30 0.0 0. .0 0. 0. .0 35 0.0 0. .0 0. 0. .0 40 0.0 0. .0 0. 0. .0 45 0.0 0. .0 0. 0. .0 50 0.0 0. .0 0. 0. .0 55 0.0 0. .0 0. 0. .0 60 0.0 0. .0 0. 0. .0 65 0. 0. .0 0. 0, .0 70 0.0 0. .0 0. 0. .0 75 0.0 0. .0 0. 0. .0 80 0.0 0. .0 0. 0. .0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 AGE STABLE POPULATION HALE PROPORTION CUHULATIVE IN AGE PROPORTION PARAHETERS -1 0.0 0.0 1-4 0.0 0.0 5-9 0.0 0.0 10-14 0.0 0. 15-19 0.0 0.0 20-24 0.0 0.0 25-29 0.0 0.0 30-34 0.0 0.0 35-39 0.0 0.0 40-44 0.0 0.0 45-49 0.0 0.0 50-54 0.0 0.0 55-59 0.0 0.0 60-64 0.0 0.0 6 5-69 0.0 0. 70-74 0.0 0.0 75-79 0.0 0.0 80 + 0.0 0.0 LIFE EXPECTANCY AT BIRTH INTRINSIC GROWTH RATE INTRINSIC BIRTH RATE INTRINSIC DEATH RATE AVERAGE AGE PROPORTION AGE 15-49 BIRTHS/ POP. 15-49 POP, UNDER 5/ POP. 15-49 POP. 5-9/ POP. 20-54 POP. 5-14/ POP. 5+ POP. 0-14 ♦ POP. 65+/ POP. 15-64 LIFE TABLE: COALE-DEHENY WEST GRR FOR HEAN AGE OF REGION HODEL CHILDBEARING AT AGE 27 AT AGE 29 AT AGE 31 AT AGE 33 0.0 0.0641 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 INTSP 223 5th SET TEST OF ERRORS 0581-0584 *** INTSP ERROR NO. 0581 — INPOT ERROR IN N *** CODE OF STABLE POPULATION PARAMETER MUST BE BETWEEN 1 -35 OR BETWEEN 37-49 *** INTSP ERROR NO. 0582 — INPUT ERROR IN RNG *** INTRINSIC GROWTH RATE MUST BE WITHIN RANGE -0.01 TO 0.05 *** INTSP ERROR NO. 0583 — INPUT ERROR IN NSEX *** SEX CODE OF THE POPULATION MUST EQUAL 1 OR 2 *** INTSP ERROR NO. 0584 — INPUT ERROR IN NREG *** REGION CODE MUST EQUAL 1, 2, 3, OR 4 INTSP INPUT ARGUMENTS, N = 53 A = 0.70000 RNG = 0.06410 NSEX = 5 NREG = 5 ABRIDGED LIFE TABLE NO SEX GIVEN TO PLT EMPIRICALLY DERIVED AGE Q(X) D(X) Mp. _ _^_ 10 Q p 1 where 1 5 ? x is the given population age x,x+4 in the first distribution 5 PP x is the percent of the population age x,x*4 in the first distri- bution. P is the total of the first population. 2 The same is done for the second population obtaining PP 5 x Then, the ratio of the percent distributions and the difference between the percent distributions are calculated for each age group. = 5 PP x ^x = ^pT 10 ° 5 x _D = C PP 1 - PP 2 5 x 5 x 5 x where 5 RD X is the ratio difference for age x,x+4. 5 D X is the difference in the two percent distributions for age i,i*i», 225 226 DOCUMENTATION The index of relative difference is then calculated as follows: IRD £ Led - ioo| 2 n where IF.D is the -index of relative difference n is the number of 5-year aqe qroups. The index of dissimilarity is calculated as follows: * x=0,5 ° x where ID is the index of dissimilarity. Reference 0. S„ Bureau of the Census, The Methods and Materials of Demography by Henry S. Shryock, Jacob S. Sieqel, and Associates, U.S. Government Printing Office, Washington, D.C., 1971. B. COMMENTS This subroutine prints out the results of its calculations. The re- sults are not transferred back to the Main Program through the argument strinq. Therefore the results of this subroutine cannot be used as input to another subroutine called subsequently. III. MAIN PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main proqram can use a subroutine alone or in conjunction with othar subroutines. For a detailed explanation of writinq main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main proqram has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL IRDID(PA,PB) For the purpose of emphasizing the input arquments, they are underlined in the above CALL statement. IRDID 227 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine both variable names PA and PB in the argument string are arrays. The following DIMENSION statement must be included in any main program using this subroutine. DIMENSION PA(17) r PB{17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PBOGEAH. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package ABREV 2. Library functions ABS (absolute value) 3. Card diagram of main program and subroutines / ~ /_ CARDS INDICATING END OF DECK / / / INPUT DATA /| /" COMPUTER~C0NTR0L _ CARDS~" "~7| | / SUBROUTINE - ABREV~ ~/\ \ \ / / / III/ / SUBROUTINE IRDID /III/ / / / III/ /III/ MAIN PROGRAM / ~ ™COMPUTER~ONTR0L - CARDS /| | | / / / III/ I I / C. FORMAT BEQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format reguirements for the main program included with this subroutine package are as qiven below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V. C. Variable Card Columns Name Definition 1 2-53 54-80 Blank Label used to identify the output Blank 228 DOCUMENTATION 2 I 1-8 IPA 9-16 73-80 1-8 41-48 49-56 57-80 PA Population aqed 0-4 in first distri- bution. The value should be punched endinq in column 8. Population aqed 5-9 in first distri- bution. The value should be punched endinq in column 16. Population aged 45-49 in first distri- bution. The value should be punched endinq in column 80. Population aqed 50-54 in first distri- bution. The value should be punched endinq in column 8. Population aqed 75-79 in first distri- bution. The value should be punched endinq in column 48. Population aqed 80+ in first distri- bution. The value should be punched endinq in column 56. Blank Cards 2 and 3 contain the first aqe distribution in 5-year age qroups. If less than 17 aqe qroups are given, the remaininq columns should be left blank. If less than 11 aqe qroups are qiven, card 3 will be entirely blank. 1-8 9-16 73-80 1-8 41-48 49-56 57-80 PB PB Population aqed 0-4 in second distribution. The value should be punched endinq in column 8. Population aqed 5-9 in second distribution. The value should be punched endinq in column 16. Population aqed 45-49 in second distri- bution. The value should be punched endinq in column 80. Population aqed 50-54 in second distri- bution. The value should be punched ending in column 8. Population aqed 75-79 in second distri- bution. The value should be punched ending in column 48. Population aged 80+ in second distri- bution. The value should be punched ending in column 56. Blank Cards 4 and 5 contain the second age distribution in 5-year age groups. If less than 17 aqe qroups are qiven, the remaining columns should be left blank. If less than 11 aqe groups are given, card 5 will be entirely blank. IRDID 229 2-80 NXT (The code indicating whether another set of data I follows this one. A zero punched in column 1, | indicates this is the last set of data. If | any other number is punched in column 1 | another set of data follows this one. I I Blank IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines beqin with the word SUBROUTINE followed by a space, the name of the subroutine and the arqument string enclosed in parentheses. This subroutine beqins as follows: SUBROUTINE IRDID(PA,PB) B. DESCRIPTION OF ARGUMENTS Name PA PB How Obtained Transferred In Transferred In Definition I |The first population aqe distribution in 1 5-year aqe qroups. At least Ithree age qroups must be qiven and all lvalues of PA must be qreater than zero. |If this is not the case, the subroutine (will write out error messaqe number 0641 land return to the callinq program, I | The second population aqe distribution I in 5-year aqe qroups. At least Ithree aqe qroups must be qiven and all lvalues of PB must be greater than zero. I I f this is not the case, the subroutine (will writs out error messaqe number 10641 and return to the callinq program. C. ERROR MESSAGES 0641 *** IRDID ERROR NO. 0641 INPUT ERROR IN PA OR PB *** EACH POPULATION DISTRIBUTION MUST CONTAIN AT LEAST 3 AGE GROUPS *** AND THE POPULATION IN ALL AGE GROUPS MUST BE GREATER THAN ZERO. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM C — -• ■ — c _ — „ — __. „____„____ „ __ ,» C-- MAIN PROGRAM FOR IRDID c _ c - _ _„ ,___.„„____ C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN FOUR C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C — ■ STATEMENTS AS FOLLOWS. C-- C — THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL MOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C I THE SECOND READ STATEMENT USES TWO DATA CARDS. THE PURPOSE OF THE C-- SECOND READ STATEMENT IS TO READ IN THE FIRST POPULATION (PA) IN C > FIVE YEAR AGE GROUPS. C ._ p A VALUES ARE CONTAINED ON TWO CARDS. AT LEAST THREE PA c VALUES MUST BE GIVEN. FOR EACH PA VALUE EIGHT COLUMNS ARE C ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS OF THE FIRST C CARD. A MAXIMUN OF TEN PA VALUES CAN APPEAR ON THE FIRST C CARD SO THAT THE DECIMAL POINTS ARE IN COLUMNS 8, 16, 24, C ..., 72, AND 80. THE SECOND CARD CONTAINS SEVEN PA VALUES C WHICH ARE ENTERED IN THE SAME MANNER AS ON THE FIRST CARD 230 DOCUMENTATION C EXCEPT THAT THE LAST VALUE HILL END IK COLUMN 56. c IF LESS T HAN SEVENTEEN VALOES AEE TO BE GIVEN, BOTH CARDS c MU ST STILL BE USED WITH DATA ONLY IN THE NUMBER OP COLUMNS C NECESSARY FOR THE NUMBER OF PA VALUES GIVEN. C c the THIRD READ STATEMENT USES TWO DATA CARDS. THE PURPOSE OF C THE THIRD READ STATEMENT IS TO READ IN THE SECOND POPULATION C (PB) IN FIVE YEAR AGE GROUPS. PB VALUES HAVE THE SAME c REQUIREMENTS AS PA VALUES. C c __. THE FOURTH READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE c FOURTH READ STATEMENT IS TO READ THE INDICATOR (NXT) USED TO C SIGNAL WHETHER THERE IS ANOTHER DATA SET FOLLOWING THIS ONE. C NXT IS LOCATED IN COLUMN 1 OF THIS CARD. A ZERO IN COLUMN 1 c INDICATES THAT THIS IS THE LAST DATA SET. ANY OTHER C NUMBER IN COLUMN 1 INDICATES THAT THERE IS ANOTHER DATA c SET FOLLOWING THIS ONE. DIMENSION PA(17) ,PB(17) NREAD = 1 NPRNT = 15 10 READ(NR£AD,11) 11 F0RMAT(1X,52H ) READ(NF.EAD,22) (PA (I) ,1 = 1, 17) 22 FORMAT (10F8. 0,/,7F8.0) READ(HREAD,22) (PB (I) ,1=1 , 17) READ(NREAD,33) NXT 33 FORMAT (11) ■ RITE (NPRNT, 44) 44 FORMAT (1H1) WRITE (NPFNT, 11) CALL IP.DID(PA,PB) IF (NXT) 10,99,10 99 STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE IRDID(PA,PB) c _ c _ C PROGRAM NO. 0640 c c C ALL OF THE ARGUMENTS TO THIS SUBROUTINE ARE INPUT ARGUMENTS. c p A IS THE FIRST POPULATION DISTRIBUTION. c p B Is THE SECOND POPULATION DISTRIBUTION. c c DIMENSION PA (17) ,PB(17) ,POP1 (17) ,POP2 (17) DIMENSION fi£L(17),DIF(17) ,PCT1 (17) ,PCT2(17) NPOP1 = NPOP2 = NPRNT = 15 C c : C CHECK FOR INPUT ERRORS c . C NEfiR = DO 10 1=1,17 IF (PA(I) - 1.0) 15,5,5 5 NPOP1 = NPOP1 + 1 10 POP1 (I) = PA (I) GO TO 30 15 DO 20 J=I,17 IF (ABS(PA(J)) - 0.00001) 20,20,25 20 CONTINUE GO TO 30 25 NERR = 1 30 DO 40 1=1,17 IF (PB(I) - 1.0) 45,35,35 35 NPOP2 = NPOP2 + 1 40 POP2 (I) = PB(I) IRDID 231 GO TO 60 45 DO 50 J=I,17 IF (ABS(PB(J)J - 0.00001) 50,50,55 50 CONTINUE GO TO 60 55 NERR ■ 1 60 CONTINUE IF (NERR) 65,70,65 65 »RITE(NPRNT,66) 66 FORMAT (//53H *** IRDID ERROR NO. 0641 -- INPOT ERROR IN PA OR PB, */,68H *** EACH POPDLATION DISTRIBUTION BUST CONTAIN AT LEAST 3 AGE * GROUPS, /,68H *** AND THE POPULATION IN ALL AGE GROUPS MUST BE GRE *ATER THAN ZERO.) HRITE(NPRNT,77) 77 FORMA-(//22H IRDID INPUT ARGUMENTS,/, 5X,4HPA =) iRITE(NPRNT,88) (PA (I) ,1 = 1 , 1 7) 88 FORMAT (10 (4X,F8, 0) ,/,7 (4X, F8. 0) ) HRITE(NPRNT,99) 99 FORMAT (/,5X,4HPB = ) HRITE(NPRNT,88) (PB (I) ,1 = 1 , 1 7) GO TO 1000 70 CONTINUE IF (NPOP1 - 3) 65,75,75 75 CONTINUE IF (NP0P2 - 3) 65,80,80 C HAKE POPULATIONS EQUAL IN NUMBER OF GROUPS c . C C 80 CONTINUE IF (NP0P1 - NPOP2) 85,90,85 85 CALL ABREV(1,P0P1,P0P2, NGRUP) GO TO 95 90 NGRUP = NP0P1 COMPUTE POPULATION TOTALS 95 P1 = 0.0 P2 = 0.0 DO 100 1=1, NGRUP P1 = P1 + POP1 (I) P2 = P2 + POP2 (I) 100 CONTINUE COMPUTE PERCENTAGE DISTRIBUTIONS, RELATIVE AND ABSOLUTE DIFFERENCES, AND INDICES ERD = 0. ED = 0.0 DO 110 1=1, NGRUP PCT1 (I) = (POP1 (I) / P1) * 100.0 PCT2(I) ■ (POP2(I) / P2) * 100.0 REL(I) = 100.0 * PCT2(I) / PCT1 (I) DIF(I) = PCT2(I) - PCT1(I) BRD = ERD ♦ ABS(REL(I) - 100.0) ED = ED + &BS(DIF(I)) 110 CONTINUE AN = 2 * NGRUP ERD = ERD / AN ED = ED / 2.0 C C PRINT RESULTS C . C 200 HRITE(NPRNT,222) 222 FORMAT (//,59X,23HPERCENTAGE DISTRIBUTION, /,59X, 23 (1H-) , 1 91, *11HDIFFERENCES,/,9X,3HAGE, 13X,5H FIRST, 14X,6HSECOND, 11 X,5HFIRST, *7X,6HSECOND,8X r 8HRATIO OF, 10X,2HOF,/,8X, 5HGEOUP,9X,10HPOPULATION, *10X, 10HPOPULATION,6X, 10HPOPULATION, 3X, 10HPOPULATION, 4X, *11HPERCENTAGES,5X,11HPERCENTAGES,//) N1 = 232 DOCUMENTATION N2 = 4 NM1 = NGRUP - 1 DO 210 1=1, NM1 HEITE(NPRNT,333) N1,N2,POP1 (I) ,POP2(I) ,PCT1 (I) ,PCT2(I) ,REL(I) , *DIF F7. 2) ) WRITE (NPRNT, 555) ERD,ED 555 FORMAT (//,56X, 30HINDEX OF SELATIVE DIFFERENCE = ff F8.2„ */,77X,24HINDEX OF DISSIMILARITY =,F8.2) 1000 RETURN END IRDID 233 CC t— or O CH_ £ CC v> s 2 • g £ o f> ■» o lf> £ ft 00 i- K Co 3- K £ TV CM £ rn CM S " — — S — — IC u « 1 2 n " " £ . • . ~ • • i^ 5 o 3- r^ :*- £ r» 3- g — CM i*> O S w» O s 2 to 3- f*% w\ S t^ >r» s s vO *■ s sS 3- 2 s — — 5 — -~ 5 s S S s S S T . ^ » . s s rc» «■» r- i^> s N. to 3 2 — I»- t»- o~ 3 1^- o~ '■£ s vS (^ «*> <^» 3 to f% 3 s oo o S oo v9 S s — — S — — s s s 8 K & K s • • X . < ^ > £ s oo v« 00 O CM — oo O CM ~- S *» vi *• o- O VT» r^- s o- o IT> (^ s K oo — o- r*- <~- oo 5T o- 1^- r«- oo s s — o 09 ?. o oo s s % 3- vS M> -^ 5 * 3- o v$ Vrt O^- w- ■S \9 «% O- o- 3 3 — 3- 3- — O- CM 5 3- — CJ- cM ~ 4 — — *■ — — — 3 *- — — — § ? CJ CM 5 CM CM 3 •* t 3 5 5 5 3 • . • • S § S «T> c*- o 0~ 0- CM S o Cf- 0~ CM S S 3- CM r~ fT» — O s r» (T> — O S 5 (*\ 3- — in * r- s ~ M^ d- r» 5 S — ~ cr- CM v9 CM s cr- CM --S CM s X - vS •o s S r- o so rO l*» o s oo tC> f> o % SS <\j CM l«> fO i- 3- s rr> to 3- 3- S 8 — — »«% > o d- s to 3- O 3- £ a ro >*> — £. rc» fO S s * s S s %s s iC s • . . • . o t • ■ • s ~ o~ vr> v9 »- *- vS 5 v» Cf- 3- v9 J3 3 cr> — vj M> r^ »- ac s v» v9 !~- Of- S s rck 3- vS *• «■> CM o ~ 1 M> 3- l*V CM S s — — r- vd d- vi> CC s] r~- O 3- M3 g 2 Kl ro QC 2 fO rc» 2 2 ai 2 2 s 5 a 2 • • • . • i 2 2 00 vS s- s- r^ O a 3- 3~ 1^- O 2 ^ «c r^ cm « — t» o OO cc 2 — 1^- O 0o 2 2 H o~ m »— — 0O v9 f^. \- 2 — OP sS ««■» 2 2 «r — — CC CJ 0O 00 oo ar 3 CM oo 0O oo ".: 2" a O * rn a 5 3- (O 3 2 2 2 «. C£ ae Of T. K l-» • • M • » . M » . > • » i» Z ro 3- Z * O UJ a o vS 3- O M "• > — v^ ■> w> CM rfi 3- > •" If* CM T> 3- — z> o» — tr> O ■=> ■» oo — V> o >• « o o * — d- — O n * — 3- • — n N U1 (Si u> «■ ~ - — — - O - « CO 4- v> ■TS « o •» c C\J v. w w 4 X 3- -g a o * V9 v. o O 4- C C4 l. O a O « CO +. > -5 u O "5 d •to c CM -ts i. a O CO -4. +- 3- v. w a -c ■f- J — v- »- e CM UJ 1 234 DOCUMENTATION SO CO w w u o SS «4 M H M O M 6h U h OS H W a a. mmr-vocovos-.vcr- r» • •••••••• • V) Ph M O O » i- M r- to co H Q II h M O CJ B5 M W H OS Q H SS It, H at. W t> H EH ►J 04 OS o X M a s= o Q H as eh o < U ►J H S to Oj O J* v© id co r> oo in ro 3- r<- fNt-OCNO*t^ei-'- r-airf>CNrO'-COvOro EH Cm p o cu Oj EH S O EH w M ►J to Cu £ V O 10 < V) *— EH Cu a-o>*ai=rois»-c^ Ml w s t- r- cnj (N i*0 ro ♦ a ts o 1 1 1 1 1 1 1 1 • -a 03 oinoinomoino o « H ss w > 9 o to « r- <- (S (N fl O * IRDID 235 o cn o ID CO 3- ro (N to w w pa o o as «! W EH wow fc. u w OS H H Q 04 o^i-vovoT-ir>r»*£>vor^cNeo «U o en h as Eh W •a u CO « w a. as o as H o H Q H a as h CD O «J) H U J « w => EH 10 Cu 10 o H 04 Q W to 2S t o H H H as M EH w « «a u H i-» K h D W 04 Oj O O4 r r >m©©inror*»vo©<' r >©vOT-avrorovo o*o"*in3-r-©rofNeo3 , r»crif-vo©<'\ivc fcMJiwooaof^r^iooootNvoOioNin oer*€f»ONcria»o>encner>o©©t-^cN 3-m* _ r , -©cricr»co3'3-3-in3'©cN3^© infiro^r > oinatfi»iNNrooo inmr~' T >'-3-vo3-©T-rNr""C\iincr>vorM ir>ro'-ocnr»voinir)a-' r >(Nrsi4-ooo ID n H M « vo t-i CM H • ta CO H W to H Q II w w o o as x M H « a w as fa H 6h W > H Fh «S ►J w « o M w a as M r^ 3 ro o m in VO * r~ m r^ er. ro 00 CO vO CO o cm r- CT> O m r> eri r» r» co o CO CM r» 5= o Q H as eh o «* u ►H' w » to Oi o o. 3-©r-co»-o"\LOcrv©in©coo">©©o>r- inW»O\Oi-00V9»(NOC0v0*(Mr- o H H tO EH 06 «: H KH W D a. o 04 (Nsj-voiro3 - cor^t~-ou-i=rcrir"-vfiO o«-voaot~-voa\r*-ro©vor-voco<"om© oocMr--mCT*3 , ocovo r ' r >« _ covo3CMT- E-4 W to TJ c «* CM H P4 «U W D a o o «S 05 « O M as w > D O to 3-o>3-cn3cr>3-cn3-en3cri3cn3-C7> I I I I I I I I I I I I I I I I omoinoiooKiomoinoinoino r-i-(NNnro**ioirnovoM^oo 3- vO V0 vo VO to cn CM 3- T— H D * # * Q O * ♦ * 03 to * * * H LI FIT I. DESCRIPTION OF PROGRAM A. PURPOSE To compare two sets of survival rates in 5-year age groups from two different life tables, by calculating the differences between the two sets, by age. B. DATA NEEDED Two sets of 5-year survival rates. II. METHODOLOGY A. MATHEMATICAL DERIVATION To compare the pattern of mortality in two different life tables using survival rates, two different indices can be calculated. One index is based on differences in the survival rates for the same age group and measures the closeness of the levels of mortality. The second index is based on the differences in the ratios of consecutive survival rates. This index measures the closeness of the patterns of mortality. The first index is calculated as follows: x 5 x 5 x _AD ,;: where C AD is the difference between the first and second 5 x set of survival rates for the same age group. -S is the survival rate from age x to 5 x 3 x+5 from the first set of survival rates. 2 C S is the survival rate from age x to 5 x x+5 from the second set of survival rates. Then, the mean absolute difference of the set of survival rates is w ADM = — Y\ LRD | m x^5 5 X where m is the number of 5-year age groups. w is the lover bound of the last 5- year age group. 237 238 DOCUMENTATION The second index is calculated by first determining the ratios of survival rates for consecutive age groups, 5x .s 1 5 x S 2 5 x ,,2 5x The differences of these ratios for the same age groups is then determined. 1 2 C RD = C R - .R* 5 x 5 x 5 x Finally, the average of the absolute differences of the ratios is calculated to obtain the second index. w-5 REM = -± r 2 U<* x=0,5 5 x' B. COMMENTS The indices calculated by this subroutine do not include the survival rate for the open-ended age group. However, the survival rate for the open-ended age group is reguired as an input to the subroutine. This subroutine could be used for selecting a regional model life table with a pattern of survival rates similar to the survival rates calculated in an empirical life table. III. MAIN PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL LIFIT(SORA, SURB, NWRIT, ADH,BDM) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the LI FIT 239 main program. For this subroutine the variable names SURA and SUBB in the argument string are arrays. The following dimension statement must be included in any main program using this subroutine. DIMENSION SURA(17),SURB(17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package ABREV 2. Library functions ABS (absolute value) 3. Card diagram of main program and subroutines. / / / CARDS INDICATING END OF /I DECK / | / i / / INPUT DATA /I I / J I / I I / / COMPUTER CONTROL CARDS /I I I /I I / _/ I 1/ / /I I / SUBROUTINE ABREV / | | / / - - - /| | / / SUBROUTINE LIFIT / | | / / /I I / / MAIN PROGRAH / | | / / / I 1/ / /I I / / COMPUTER CONTROL CARDS / | | / / / I 1/ I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format reguirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See exanmle, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1 NXT Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. Any other 240 DOCUMENTATION 3-80 1-8 9» 16 73-80 1-8 9-16 49-56 57-80 NWRIT SURA SOFA digit punched in column 1 indicates that another set of data follows this one. The write indicator. If a zero is punched in column 2, the results of the subroutine will not be written out. If any other number is punched in column 2, the subroutine LIFIT will write out the results of its calculations. Blank The survival rate of birth surviving to ages 0-4 for the first set of rates. The decimal point should be in column 1. The survival rate of ages 0-4 surviving to ages 5-9 for the first set of rates. The decimal point should be in column 9. The survival rate of ages 40-44 surviving to ages 45-49 for the first set of rates. The decimal point should be in column 73. The survival rate of ages 45-49 surviving to ages 50-54 for the first set of rates. The decimal point should be in column 1. The survival rate of ages 50-54 surviving to ages 55-59 for the first set of rates. The decimal point should be in column 9. The survival rate of ages 75* surviving to ages 80+ for the first set of rates. The decimal point should be in column 49. Blank The variable SURA always reguires two cards. The first card (card no. 3) must always contain data, whereas the second card (card no. 4) can be all zeroes depending on the number of survival rates given. The last survival rate must always be the survival rate for open-ended age group. I ! 5 | 1-8 9-16 73-80 1-8 SORB SURB The survival rate of birth surviving to ages 0-4 for the second set of rates. The decimal point should be in column 1. The survival rate of ages 0-4 surviving to 5-9 for the second set of rates. The decimal point should be in column 9. I I I I I I I I I (The survival rate of ages 45-49 (surviving to ages 50-5£j for the (second set of rates. The decimal | point should be in column 1. I The survival rate of ages 40-44 surviving to ages 45-49 for the second set of rates. The decimal point should be in column 7 3. LI FIT 241 9-16 49-56 57-80 The survival rate of ages 50-54 surviving to ages 55-59 for the second set of rates. The decimal point should be in column 9. The survival rate of ages 7 5+ surviving to ages 80+ for the second set of rates. I The decimal point should end in column 49. I Blank The variable SURB always reguires two cards. The first card (card no. 5) must always contain data, whereas the second card (card no. 6) can he all zeroes depending on the number of survival rates given. The last survival rate must always be the survival rate for the open-ended age group. IV. S0BROOTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE LIFI1 (SURA, SURB, NWRIT, ADM, RDM) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition SURA SURB NHRII ADK RDM Transferred In Transferred In Transferred In Transferred Out Transferred Out C. ERROR STATEMENTS First set of 5-year age survival rates from an life table. The first is from birth surviving There can be a maximum survival rates with the being the survival rate open-ended age group. The minimum number of s that can be given are t than two survival rates subroutine will write o number 0671 and return program. -specific abridged survival rate to age 0-4. of seventeen last one for the arvival rates wo. If less are given, the ut error message to the calling Second set of 5- year age specific survival rates. They have the same requirements as SURA. The write indicator which determines whether the subroutine will write out the results of its calculations. If NHRIT=0, then the subroutine will not write out the results of its calculations. For any other value, the subroutine will write out the results of its calculations. Calculated average absolute difference in survival rates for the same age groups* Calculated average absolute difference in the ratios of consecutive survival rates for the same age groups. 0671 *** LIFIT ERROR NO. 0671 — INPUT ERROR IN SURA OR SURB *** ONE OF THE SETS OF THE SURVIVAL RATES CONTAINS A NEGATIVE OR ZERO VALUE FOR AN INTERMEDIATE AGE GROUP *** OR ONE SET CONTAINS LESS THAN TWO VALUES FOR THE SURVIVAL RATES. 242 DOCUMENTATION V. PROGRAM &ND RESULTS A. COMPUTER LISTING FOR BAIN PROGRAM c c _ C MAIN PROGRAM FOR LIFIT c , _ c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN FOUR READ c STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C c THE first READ STATEMENT USES ONE DATA CARD, c THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO c BE 0SED T0 IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN c THE SAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND c GIV E SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF c „ ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C c THE SECOND READ STATEMENT USES ONE DATA CARD. c THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE c INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET c FOLLOWING THIS ONE AND (2) THE WRITE INDICATOR (NWRIT) WHICH C DETERMINES WHETHER THE RESULTS OF THE SUBROUTINE LIFIT SHOULD BE C WRITTEN OUT. c hxT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 c INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER c _ PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF c DATA FOLLOWING THIS ONE. C NWRIT IS IN COLUMN 2 OF THIS CARD. A ZERO PUNCHED IN COLUMN 2 c INDICATES THAT THE RESULTS OF THE SUBROUTINE LIFIT ARE NOT c T0 BE pfiiNTED OUT. ANY OTHER DIGIT PUNCHED IN COLUMN 2 THE c ESULTS OF THE SUBROUTINE LIFIT WILL BE PRINTED OUT. C C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE FIRST C — — GROUP OF SURVIVORSHIP RATIOS (SURA) FROM AN ABRIDGED LIFE TABLE. C SURA VALUES ARE CONTAINED ON TWO CARDS. FOR EACH SURA VALUE c EIGHT COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT c COLUMNS OF THE FIRST CARD. EACH VALUE MUST CONTAIN A C DECIMAL POINT AND BE WITHIN THE EIGHT DIGITS ALLOWED. THUS, c ONLY TEN VALUES CAN APPEAR ON THE FIRST CARD. THE SECOND c . CARD BAY HAVE SEVEN VALUES WITH THE SEVENTEENTH VALUB BEING c iu COLUMNS 49-56. IF LESS THAN SEVENTEEN VALUES ARE TO BE c GIVEN, BOTH CARDS MUST STILL BE USED WITH DATA IN THE C NUMBER OF COLUMNS NECESSARY FOR THE NUMBER OF SURA VALUES. C C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE SECOND C GROUP OF SURVIVORSHIP RATIOS (SURB) . C SURB VALUES ARE ON TWO CARDS AND HAVE THE SAME REQUIREMENTS c &s SURA VALUES. c _ c DIMENSION SURA(17) ,SURB(17) NPRNT =15 NREAD = 1 10 READ(NREAD,11) 11 F0RHAT(1X,52H ) READ (NREAD, 22) NXT, NWRIT 22 FORMAT (211) READ (NREAD, 33) (SURA (I) ,1=1 ,1 7) 33 FORMAT (10F8.5) READ (NREAD, 33) (SURB (I) ,1=1, 17) WRITE (NPRNT, 44) 44 FORMAT (1H1) ■ RITE (NPRNT, 11) CALL LIFIT (SURA, SURB, NWRIT, ADM, RDM) IF (NXT) 10,20,10 20 CONTINUE STOP END LI FIT 243 B. COMPUTER LISTING FOB SUBROUTINE SUBROUTINE LIF1T ( SURA, SUBB, NWRIT, ADH , RDM) • — PROGRAM NO. 0670 ■ — SURA, SORB, AND NWflIT ARE ALL INPUT ARGUMENTS. ■ — ADM AND RDM ARE OUTPUT ARGUMENTS. • — SURA ARE SURVIVORSHIP RATIOS FROM A LIFE TABLE. ■ — SURB ARE SURVIVORSHIP RATIOS FROM ANOTHER LIFE TABLE. — NHRIT IS A WRITE INDICATOR. — ADM IS THE AVERAGE OF THE ABSOLUTE DIFFERENCE IN THE SURVIVORSHIP RATIOS. •-- RDM IS THE AVERAGE ABSOLUTE DIFFERENCE OF THE RATIOS OF THE SURVIVORSHIP RATIOS. DIMENSION SURA (17) , SURB (17) ,SA (17) , SB (17) # RA ( 16) ,RB (16) # AD (17) ,RD ( ♦16) ,JNUM(17) ,KNUM(17) N = NPRNT = 15 JNUM(1) ■ JNUM(2) = KNHM(1) = 1 KNUM(2) = H DO 5 1=3,17 JNUM(I) =5* (1-2) 5 KNUM(I) = JNUM (I) + 4 H = NT = MT = ARRAYS SA AND SB ARE USED FOR CALCULATING PURPOSES IN ORDER THAT THE INPUT ARRAYS iILL NOT BE CHANGED. CHECK INPUT ERRORS DO 20 I = 1,17 SA (I) = SURA (I) SB(I) = SURB(I) IF( SA(I) -.000001 ) 50,50,10 10 CONTINUE IF (SA(I) -1.) 11,50,50 11 M = M+1 12 CONTINUE IF (SB(I) - .000001) 52,52,13 13 CONTINUE IF (SB(I) -1.) 15,52,52 15 N = N + 1 20 CONTINUE IF( M - 1 ) 30,30,25 25 CONTINUE IF(N-1) 30,30,26 26 CONTINUE IF (MT) 27,28,27 27 CONTINUE IF (M-(MT-1)) 30,28,30 28 CONTINUE IF (NT) 29,55,29 29 CONTINUE IF (N-(NT-1)) 30,55,30 30 »RITE(NPRNT,111) 111 FORMAT(/, 1X,55H*»* LIFIT ERROR NO. 0671 — INPUT ERROR IN SURA OR *SURB,/,1X,111H*** ONE OF THE SETS OF THE SURVIVORSHIP RATIOS CONTA *INS A NEGATIVE OR ZERO VALUE FOR AN INTERMEDIATE AGE GROUP;,/, *1X,69H*** OR ONE SET CONTAINS LESS THAN TWO VALUES FOR THE SURVIVA *L RATIOS., 5X, 18HSURVI INPUT VALUES) WRITE (NPRNT, 222) SURA 222 FORMAT (/,5X,7HSURA = , 1 (F8.5, 2X) ,/, 1 2X,7 (F8 . 5,2X) ) MRITE(NPRNT,223) SURB 223 FORMAT(/,5X,7HSURA = , 10 (F8. 5,2X) ,/, 12X,7 (F8. 5,2X) ) 244 DOCUMENTATION RDH = 0.0 ADH =0.0 GO TO 1000 50 CONTINUE IF (MT) 51,51.12 51 MT = I GO TO 12 52 CONTINUE IF (NT) 53,53,20 53 NT = I GO TO 20 C c . . c ABREV IS USED TO HAKE BOTH SURVIVORSHIP RATIO ARRAYS THE SAME c LENGTH IN ORDER THAT THE COMPARISON HILL BE VALID. c _ , _ C 55 CALL ABREV(2,SA,SB,M) M = M - 1 L = M - 1 ADH =0.0 RDH = 0.0 DO 60 I =1,1 N = I + 1 RA(I) = SA(N) / SA(I) RB(I) = SB(N) / SB(I) AD(I) = SA(I) - SB(I) RD(I) = RA (I) - RB(I) ADM = ADM ♦ ABS ( AD (I) ) 60 RDH = RDH ♦ ABS (RD (I) ) AD(M) = SA(H) - SB(H) RH = H ADM = ( ADH + ABS ( AD (H) ) ) / RH RL = L RDH = RDH / RL C c _ _ C PRINT RESULTS IF NWRIT IS NON-ZERO c - _ . _ C IF ( NHRIT ) 70,1000,70 70 HRITE(NPRN*r,333) 333 FORHAT(/,33X,29HCOHPARISON OF SURVIVAL RATIOS,//, 3X,5H FR0M,4X,2HT *0,6X,8HSURVIVAL,5X,8HRATI0 OF, 6X, 8HSURVIVAL,5X, 8HRATIO OF,7X,13HDI *FFERENCE OF, 3X,21 HDIFFERENCE OF RATIOS ,/, 3X, 4HAGES,4X,4HAGES,6X, *5HRATI0,4X,15HSURVIVAL RATIOS, 3X, 5HRATIO, U X, 1 5HSURVIVAL RATIOS, 2X, *15HSURVIVAL RATIOS, 4 X, 18HOF SURVIVAL RATIOS,///) WRITE (NPRNT,4 s m o m o s o % en * Q i- o £ o rr. s •A M> vS o K sS S [J t*. vfi r- nD p: vS ^ O- a- o~ f> £ o~ ■Jt £ • • • • x; . C s ^ s " " " ~ v» OO Mt OO ^ Oo JJ - U> — s» — ^ — g O CM «S - s 1^ IB s O- O- O- Cr- s o- CO n> . . l • 5 ' •B s s 2 s s £ 2 \5 rev M> IT* 2 rc» Z 3 U> to ir> rfl S r*% 3 3 rr> vS •O vA s vS 3 3 «o f~ 09 N. 3 I~- 3 S o- O- ir- <*- S Cf S 3 ■ . • ■ K . S S S S 5 S 3 ■*> 1ft OO tO o~ ir> 00 rr> O- S rci O CM t- m O u> O £ s ir> — »» «% in — »- rev s o- m. 3 s Oo in i^ S- DO ir> r~ i- ST r- a- 3 3 t~ o- :*- o~ *- o» d- Ct- i- 3 o~ a- 3 3 to • • • • • . . • 3 • • 3 s lit ° S 3 > 3 3 3 * — Tl — CD *- — fCl — \9 ir> CM vS 3 f 3 CJ v9 3 3 a; Oo O Oo o~ o-> 0» o Oo <3- Ol ^ Oo 0~ S * Cj- r- 0- v» *- r- o>- O 3 CJ-. vS 3 5 in • • • • z • • . • Z 3 • • 3 3 o M M 2 3 3 i-t «r 3 3 i— rr> a- ro, — or •O *- «*% •— a. w rr» ~~ ° S CC — <*\ in Co o — tr» in OO o s Ui Oo S S Oi o- OB ir> ^ a. o— oo ir> vS Cs s to vS S s Oa — 0>» o- C£ Oo — Qa Of cr s, oo o- R s -4 O- Oo 0f» r- Ui o~ OO CJ~ r^ IU s 0- (^~ s IS ar • • • . • • • . s s ' :> ■> > ^ s s M M V-l 3 3 > vS <3 Ci *- > v» o <3 i- ■> 3 O i- 3 3 0Z — to ir> OJ o 0~ U> r> CM cs «>- lr> Z> S cr- in s 8 U"> o- o- Oo ^J) en O- 0^- Oo v» in S Oo xS s S o- 0o o~ Oo O— oo O- oo s o- OO s R Ui « • • • Ul • • • • Ui R • R s —1 -a 1 -X i5 s £ o» O 3 Cf o s s _i o- o- o~ cr- -J o~ O-- o~ o~ — 1 S O- o~ s 2 a: • . • • n 15 S £ 2 Crl cr- to — Ift 0: o- •*> — IT) cr S — in 2 2 o r-» * 1^ o 1^ * r- 2 :*- C-. 2 t O vS m i- r~- c> vS in * r^- o z 3- t-~ •t S f» \S in r~ rr> r^- lA in f-- «-> r~- " r~- m 2 3 o- o- o- o- O- o~ o~ o- o— o~ o- a o- o~ 2 2 — • • • • — . • Z 2 s 2 n C£ c= 0; m o, •> M r- *> w> (M H r~ m OP CM M „ f- oo CM » » 2 K> r-^ o. O Z m i^ o o Z ■~ ro O o - X, IU OO oo r-- ir> LU oo oo r^- in UJ u> OO r- m ^ " >■ 00 vS — ir> i> Cjo vS — ir» :=» „ Oo — lo ■n * r> OO o— o— cr- r> OO cr- o- o- r> " Oo o~ w « - O • • . < O • • . • o „ • • . n N V/> — — en ~ — N H — — - o - w a co 4. "> V ' a O c or o rc> Ti- ts o +- ± w a O X 4- io a O X -f- IS ) a lO v a c c\l TJ w o- C5 CO f. ft] H U t» §g as (0 ft] Cm O M Q Pm O O H EH ft) 4 u« pq hi 03 4 M > Pm H «M t» as CO co o H H pm 4 O 03 O hJ H -4 EH > to 4 M o 03 > H 03 EH D •4 CO OS ►J ^H 4 4 > l> O H H H H CO > > EH H 03 03 4 X D B Q3 CO CO Q Z Pm 4 O co o W SB H o O EH H CO Pm 4 H H O 03 4 03 M 4 O h! Cu H 4 h! & EH > 4 O 4 H s» u 03 > H 03 > P OS co B CO Hi pa 4 ►j > o EH 4 H H B & > EH Qj W 03 4 EH Pm B 03 9 CO O h1 eh 4 w ft] « h] CO B 04 M 13 +> CO •4 w o O H CO t- r» EH CS ox 4 =TOOOO«-r-r-CNcr|;rmcr),-tN (N«-OOOOOOOOOOOOx— ©OOOOOOOOOOOOO© ooooooooooooooo T-(NiT)vOO T "aOiO»~OOi/)^Oroo OOCO'-(Nr0^inr»COOrot^r~-r~xoincoo\ooxox OXONCJXOXOXOXOXOXOXOXOXOXOXCOr^VO oooooooooooooooo oxT-r^inaoxaint-oxat-cNr'O =fooT-oxin*cNor»oin3-ox-o r**o>oi s 'COooi>''>(N*inincntN acNOOxOxOxoxOxOxOxac-inr-xo ooooc^cr»a>cy»cy>c^o>c7\cT»cTtao x— x— t-OOOOoOOOOOOO p»cnc^\o rr >a'in»ou3mrr)n' , ooa'r- nocTir-r-r^cNinvo^-r-r^cNroro^ ax©x— cNOxxomcoovoamcNOoom axooxoxaaaaoar-vomcooxt— © cooxoxoxoxoxoxoxoxoxoxoxoxcoa^»• OOOOOOOOOOOOOOOO ox;»ox.^cjx;i'ox3 , oxa-ox-=roxa- t-x— CN H EH 4 -1 ft] 03 =5 4 ft] « CM Ov O o ft] u 2 ft) Pm &H M a •-] o co OQ 4 4 ft] I i I I I I i I I I i I « O CO O CO as H ft, o ©inoinomoinoinoinoinor- T-T-fMiNron^^min^ovor* oooooooooooooooo EhEhHEhEhEhEhEhEhEhehEhEh6hEhEh B*ox^ox;»ox.*ox*ox«rox;»ox + Eh r^fNNffinjfl'inin^io OS I I I I I I I I I I I I I I o h t» oomoinoinoinoinoinom r-x— CNCNC0C0*3-inin>J0VO EH ft] co c CN Oh D m o O ^f o aa vo U9 r-> OX OX ft) • • CO O o 4 ft] EH vO a 4 ia r- M o CM a CD l>» as OX OX a ■ * Q3 o O ft] co EH ft] a D M h) *£> CO 4 m CO Z > co VO 4 co r» EH en Ox 03 a • • o Oi o o Pm z H ft] a H in ca CO OX -1 t» rg r» in o 4 03 m «- OX CO E> 3 oo in r~ •* co Ox * OX 3- O • • • • 03 o o o o ft] N 03 • * i- CO x— o CO r~ sr CN OX o ^o m CN VO ft] H 00 o a ox t» EH as r* OX VO H 4 • • • • EH 03 o o o o 4 CJ Hi ft] 4 z > CO •* CO x— H r- ro in a 4 > 00 in \o 03 a t- a ox a CO a o» a ox r» OS z co • • • • 3 H o o o o co 4 ft] a os z EH o o \o o o =» CJ os «- CO in cn a 4 o CN O ox in os OS CO ft. Ox ox 00 vO s O o OX CO ox a CO CO H co • • ■ • H ft] O O o o S3 z 4 a 1 H H 03 •J 4 03 as CM > ox co a- a O o H Ox CN (N XO 03 OS a o x- CN o OX OS OS CO » Ox CO ox o Hi Kl 03 EH OX ox OX ox O • • • • > EH > Z o o o o H B M 4 > Oh > a 03 SB 03 EH Q H S OX CO r- in co CO CO o r» * [-" 1 (0 vo in * r^ ft] 1 W ft] vo in r-. co .-] a Hi OX OX ox OX 4 x— &H • • • • B r^ co oo o o ft] VO Pm z Pm o O H 4 i-l • CO EH r* co a cn 4 O eh as co r^ o o OS a ft] o a a t>> m a CO O 00 *o x— m os 03 oo ox Ox ox o ft] EH • • • • o 03 a ft] o o o o c^- 03 EH CO Ox ft] r- H Pm ft) o a II II 03 H o 4 4 H Pm ft] a 03 SB H z 03 D B M i-l o o in a > a # * * o * # ♦ co # * * LI FIT 247 D O O o OS vO Ul o cti w • , O o o -as H 6H 00 >J3 -s r» H o CTl 03 D • « O CM o o CH S5 H M D H 1*1 CTl •J > m © -as 03 CTi ro tf a r» * CO o o CTl :* o • • • • 03 © o o o CO PO T"- M LT) 00 ■4 > 03 CO CTl 03 L0 a o o en r- 03 25 CO • • • • D M o o o © W «S) w H BO M a H O o o =3" c_> 03 Ln cn -6 < O en in « « CO ft* CO vO o B o o o o> oo CO CO H CO • • • • H W o o © © SB 2J < D M H OS cd 03 Qj t» ^ 00 O O M CN VO 03 OS ffl O O CTl m « CO 3 CTl O « W 03 H © o cti cn O • • • • > EH > aa © © o o H D H -as > CH > 23 Q3 3 03 H S H a r> m w 1 CO co CO ft? 1 M H t-» ro M M -4 © o CTl CTl ««J i" H • • • 1] r- w © o o © M >o Pu as fc. o O H «s i-4 • CO E-l r- 00 CN *fl o EH a ro © © « aw oo r> m S CO u 00 r- in M 05 00 o CTl S * * # o * * * w * * * MDRNS I. DESCRIPTION OF PROGRAMS A. PURPOSE To rank a given set of values and determine the median. B. DATA NEEDED 1. The set of values to be ranked. 2. The number of values to be ranked. II. METHODOLOGY A. MATHEMATICAL DERIVATION Assuminq that a set of n values (where 2£nll01) is represented by X, the subroutine makes the followinq calculations. First, the X. values are ranked from smallest to largest. Second, the median of the ranked values is obtained as follows: a) if the number of X values is odd, the median value is selected as the X value, where j represents the central position of the ranked values. The central position is calculated as J 2 2 Therefore MEDIAN = x . b) if the number of X values is even, the median is calculated as the averaqe of the two central values of the ranked set, MEDIAN = -4- (x + x . .) 2 n n+1 2 2 B. COMMENTS This subroutine and its main program were written to rank from 2 to 101 values. By changing the dimension statement and the second if statement in both the subroutine and the main proqram, the subroutine can be used to rank any number of values between 2 and 9999. III. M AIN PROGRAM A. REQUIREMENTS The main proqram is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main proqram can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writinq main proqrams usinq more than one sab- routine see the Appendix. 249 250 DOCUMENTATION 1. CALL statement Once the main proqram has obtained the data required for the subroutine to do its calculations, the main proqram transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main proqram. This communication process is made throuqh the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL MDRNS (A,N , B, XMEDN ) For the purpose of emphasizinq the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be sinqle-valued or refer to a qroup of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main proqram. For this subroutine the variables A and B in the arqument strinq are arrays. The followinq dimension statement must be included in any main proqram usinq this subroutine. DIMENSION A(101), B(101) B. OTHEE SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION HITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines or functions provided by this publication or by a fortran library. 1. Subroutines from this package None 2. Library functions None 3. Card Diaqram of main proqram and subroutines. / / / CARDS INDICATING END OF DECK / ^ -^ / INPUT DATA / | / / I / /I I / / COMPUTER CONTROL CARDS / | | / / / I I / / /I I / / SUBROUTINE MDRNS / | | / / / I I / / /I I / / MAIN PROGRAM / | | / / : / I 1/ / /I I / / COMPUTER CONTROL CARDS / \ | / / / I I / I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main proqram included with this publication are as qiven below. The data should be punched in the MDRNS 251 columns specified. For a more detailed description of the input data, see the description of arquments in section IV. B. See example, section v.c. Variable Card Columns Name Definition 1 2-53 5H-80 1-4 7-80 1-8 9-16 73-80 NXT Blank Label used to identify the output. Blank Number of values to be ranked N must be between 2 and 101. For any other value, run error messaqe is written out and the main proqram will stop. Blank The code indicatinq if there is another data set followinq this one. A zero punched in column 6 indicates this is the last set of data. Any other number punched in column 6 indicates another set of data follows this one. Blank The first value in the qroup to be ranked. The decimal point must be entered somewhere in the eight columns. The second value in the qroup to be ranked. The decimal point must be entered somewhere in the eiqht columns. The tenth value in the qroup to be ranked. The decimal point must be entered somewhere in the eiqht columns. The number of cards needed for A depends on the number values to be ranked. Each card can contain a maximum of ten values. IV. SUBROOTINE A. SUBROUTINE STATEMENT All external subroutines beqin with the word SUBROUTINE followed by a space, the name of the subroutine and the arqument strinq enclosed in parentheses. This subroutine beqins as follows: SUBROOTINE MDRNS (A,N, B,XMEDN) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition I I I I A (Transferred In |The values to be ranked. I I I IN | Transferred In |The number of values to be ranked. I I I JB | Transferred Out | The values ranked in ascend inq order. I I I I XMEDN | Transferred Out | The median of the ranked values. C. ERROR MESSAGES *** MDRNS ERROR NO. 0731 — INPUT ERROR IN N *** N MUST BE BET1EEN 2 AND 101. 252 DOCUMENTATION V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c C MAIN PROGRAM FOR SUBROUTINE MDRNS c . c c THI s PROGRAM USES A SET OF DATA CARDS WHICH ARE READ IN THBEE C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C c _ T HE FIRST READ STATEMENT USES ONE DATA CARD. c TH£ PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C c THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1) THE C NUMBER OF VALUES TO BE RANKED(N) , AND (2) THE INDICATOR (NXT) c USED T0 SIGNAL WHETHER THERE IS ANOTHER DATA SET FOLLOWING C THIS ONE. c N IS LOCATED IN COLUMNS 1-4 OF THIS CARD. THE c VALUE ENDS IN COLUMN 4. c NXT Is LOCATED IN COLUMN 6 OF THIS CARD. A ZERO PUNCHED IN C COLUMN 6 INDICATES THIS IS THE LAST DATA SET. ANY OTHER c PUNCHED IN COLUMN 6 INDICATES THERE IS ANOTHER SET OF c DATA FOLLOWING THIS ONE. C C THE THIRD READ STATEMENT USES ONE DATA CARD. THE PURPOSE OP THE c THIRD READ STATEMENT IS TO READ IN THE ARRAY (A) TO BE RANKED. C A VALUES ARE CONTAINED ON ONE CARD. AT LEAST TWO A VALUES c (just BE GIVEN. FOR EACH A VALUE EIGHT COLUMNS ARE ALLOWED C STARTING WITH THE FIRST EIGHT COLUMNS. THE VALUES MUST BE C ENTERED SO THAT THE DECIMAL POINTS ARE IN COLUMNS C 8, 16, 24, ... AND 72. C c DIMENSION A (101) ,B (101) NREAD = 1 NPRNT = 15 10 READ(NREAD,11) 11 FORMAT(1X,52H ) READ (NREAD, 20) N,NXT 20 F0RMAT(I4,1X,I1) WRITE (NPRNT, 22) 22 FORMAT(1H1) WRITE(NPRNT,11) IF (N - 1) 40,40,30 30 CONTINUE IF (N - 101) 50,50,40 40 WRITE (NPRNT, 44) N 44 FORMAT (/,19H MAIN PROGRAM ERROR, /,34H N MUST BE BETWEEN 2 AND 101 * N = ,14) GO TO 99 50 READ(NREAD,55) (A(I),I=1,N) 55 FORMAT (9F8.0) CALL MDRNS(A,N,B,XHEDN) WRITE (NPRNT, 66) N,XMEDN, (A(I),B(I) ,I=1,N) 66 FORMAT(19H NUMBER OF GROUPS =,13 , 1 0X,8HMEDIAN =,F12.5,/, *10X,18HA (ORIGINAL ARRAY) , 5X, 1 6HB (SORTED ARRAY)./, *9(14X,F12.5,9X,F12.5,/)) IF (NXT) 10,99,10 99 STOP END b. computer Listing for subroutine MDRNS 253 SUBROUTINE MDRNS ( A, N,B, XMEDN) c c C PROGRAM NO. 0730 c C C THE INPUT ARGUMENTS FOR THIS SUBROUTINE ARE A AND N. C B, AND XMEDN ARE OUTPUT ARGUMENTS. C A IS THE INPUT ARRAY TO BE RANKED. C B IS THE OUTPUT ARRAY WHICH IS A SORTED VERSION OF A. c N IS THE NUMBER OF ELEMENTS IN A TO BE RANKED. C XMEDN IS THE MEDIAN OF B. c _ c DIMENSION A (101) ,B(101) NPRNT = 15 IF (N-2)20,10,10 10 CONTINUE IF (N-101) 30,30,20 20 WRITE (NPRNT, 11) N 11 FORMAT(//45H *** MDRNS ERROR NO. 0731 — INPUT ERROR IN N, */33H *** N MUST BE BETWEEN 2 AND 101.,// *5H N = ,14) N = 10 GO TO 90 30 CONTINUE DO 1 1=1 ,H 1 B(I) = A (I) 1 = 2 2 CONTINUE IF (B(I) - B(I-1)) 5,3,3 3 1 = 1+1 IF (I - N) 2,2,70 5 K = I M = I - 1 DO 7 L=1,M J = I - L IF (B(K) - B(J)) 6,3,3 6 TEMP = B (K) B(K) = B(J) B (J) = TEMP K = K - 1 7 CONTINUE GO TO 3 70 NC = N / 2 ND = NC * 2 IF (N - ND) 75,80,75 C c C N IS ODD c C 75 XMEDN = B(NC + 1) GO TO 90 C c C — - — N IS EVEN c C 80 XMEDN = (B(NC) + B(NC + 1)) / 2.0 90 CONTINUE RETURN END 254 DOCUMENTATION a. g s g s s s £ K s e C: £ 1© S £ £ S £ S S T 2 " ™ K » • ~ E! £ — o- u-» — f-- S £ £ CM cn vS s 1 S ft UJ ft ft 8 Z> s S s _i s s T >- ^c ^ 3; s ui oc ■> s s M en . n s s UJ CM Si s 8 I— o U4 G; 3 * S tn Ui cn UJ R a s C£ Z tc CQ S s s O o S. s s a 5 . 1- » . r> • s s s r- Ci Ifi —1 z CM n s s to o st * — s s s z tr> s z s s g C£ C= U4 s s 2 a O o ■> 2 2 3 S z z UJ 2 2 3 5 - 3 i • 1 . 1 • ( • 3 2 2 w» CM — — S 2 2 ar ar ar *• ar CM 2 *r 3 V- H- \~ CM V- 2 2 a cr ar cc a: 2 2 3 O O a Q 3 2 S 2 2 o> Ci C£. cs: Cr o. o, » H » H • M • n . t «, >- Z o~ Z — z -— z «"! •- i> » al — UJ — cu — fO UJ O ^S u. o in ■> > t> — s» ■» *, » ^) o- ^5 o- s O- Ci V ■» • n O o o o m n ~ Wi u-> to o^ M o, - — - - a cs ■v c CM t- Ul V) 4- a o yr o -8 o "O C OJ 1- UJ v> ■» c CM ~8 a O a O 4* c w o ■a G i. *- MDRNS 255 D. SAMPLE OUTPUT 1st SET SOUVENIR DATA - MD&NS WORST CASE NUMBER OF GROUPS = 9 MEDIAN = 5.00000 A (ORIGINAL ARRAY) B (SORTED ARRAY) 9.00000 1.00000 8.00000 2.00000 7.00000 3.00000 6.00000 4.00000 5.00000 5.00000 4.00000 6.00000 3.00000 7.00000 2.00000 8.00000 1.00000 9.00000 2nd SET SOUVENIR DATA - NO SORT NECESSARY NUMBER OF GROUPS = 9 MEDIAN = 5.00000 A (ORIGINAL ARRAY) B (SORTED ARRAY) 1.00000 1.00000 2.00000 2.00000 3.00000 3.00000 4.00000 4.00000 5.00000 5.00000 6.00000 6.00000 7.00000 7.00000 8.00000 8.00000 9.00000 9.00000 3rd SET SOUVENIR DATA - NORMAL CASE NUMBER OF GROUPS = 9 MEDIAN = 53.00000 A (ORIGINAL ARRAY) B (SORTED ARRAY) 131.00000 3.00000 241.00000 21.00000 43.00000 21.00000 211.00000 43.00000 21.00000 53.00000 53.00000 131.00000 21.00000 211.00000 1222.00000 241.00000 3.00000 1222.00000 4th SET SOUVENIR DATA - EVEN NUMBER OF VALUES MAIN PROGRAM ERROR N MUST BE BETWEEN 2 AND 101 N = 1008 MLT I. DESCRIPTION OF PROGRAMS &. PURPOSE To calculate a reqional model life table correspondinq to a given life expectancy at birth, sex and reqion usinq Coale-Demeny reqression coefficients, After qeneratinq the model life table for a particular sex, this subroutine can be used to obtain the model life table for the opposite sex by assuming Coale-Demeny sex differentials in life expectancy at aqe 10. B. DATA NEEDED 1. The life expectancy at birth, and if a Coale-Demeny model life table for the opposite sex is also desired, the code indicating this. 2. The sex of the life table population. 3. The reqion from the Coale-Demeny model life table system which is to be used. II. METHODOLOGY A. MATHEMATICAL DERIVATION Since the reqression coefficients of Coale-Demeny relate 6| to q , the subroutine must estimate the e ]Q which corresponds to the e that is qiven. This estimate is made by a linear interpolation and an iterative process as follows* For the interpolation, two initial pivotal levels of life expectancy at aqe ten are computed as: i] Q = 13.5 + 0.75 (e Q - 5) is the life expectancy at birth qiven as input. (1) i* = 13.5 + 0.75 (e Q + 5) ( 2 ) 1 2 where e j Q and e J0 are the two pivotal life expectancies at age ten, and e Q 257 258 DOCUMENTATION Using these pivotal values, their corresponding life expectancies at 1 ? birth (e and e . ) , and the life expectancy at birth given as input (e ) , a first estimate of the corresponding life expectancy at age ten is: (e - e 1 ) 3 _ 1 , / 2 1 v ve ; ,- s e io - e io + (e io " e io ) • "71 TT (3) (e " e o ) 3 vhere e, Q is an estimate of the life expectancy at age ten corresponding to e . 3 Hith the estimate of e,g and the Coale-Demeny regression coefficients, a series of g values are generated and a life table is constructed by using the 3 subroutine ELT. The life expectancy at birth (e Q ) from this life table is o compared to e, the given life expectancy at birth. If |e - eJ > .0001 , 3 2 1 3 an iteration is made in formula (3) vith e replacing e or e , and with a,,, 1 ' o r ^ o o ' 10 2 1 replacing e, Q or e, Q depending on which of the two life expectancies at birth is furthest from e . After obtaining a new value of life expectancy at age 10 4 (e. Q ) , a new life table is generated, yielding a life expectancy at birth of 4 i e . If leZ - eJ > .0001 , the iterative process is repeated. o (JO The iterative process is repeated until |e^ - eJ < .0001 . Once this is i achieved, the life table pertaining to e is accepted as an estimate of a life table pertaining to e . If it is desired to estimate a model life table for the opposite sex, this subroutine can be used again to do so. Coale-Demeny assumptions of mortality differentials in e, Q by sex can be used to generate the life ex- pectancy at age 10 for the opposite sex. The assumed relationship between e. n for males and e. n for females is 10 10 m - m _ / f -f V U) 10 10 o . vo 10 "10 where e™ and e are the expectations of life at age 10 for males and females respectively; e™ and i. are provided by Coale and Demeny and are the means of the ex- pectations of life at age 10 for males and females respectively; and a and a are provided by Coale and Demeny and are the standard deviations of m f expectation of life at birth for males and females respectively. MLT 259 Once the life expectancy at aqe 10 for the other sex is calculated, the life table can be qenerated by using the Coale-Demeny correlation coefficients. Reference A. J. Coale and P. Demeny, Regional Model Life Tables and Stable Populations, Princeton University Press, Princeton, New Jersey, 1966. B. COMMENTS This subroutine generates a Coale-Demeny model life table corresponding to a given life expectancy, sex and region. This life table will be applicable to the country being analyzed only if the age pattern of mortality in the country being analyzed is the same as the age pattern of mortality described by the model life table. If it is desired to estimate model life tables for both males and females when the life expectancy at birth for only one sex is known, this subroutine can be used in a particular way to do so. Using the main program included here, this is accomplished by reading in two sets of data. The first set of data refers to the sex whose life expectancy at birth is known. This set of data is punched according to the instructions described in section III.C which follows. The second set of data refers to the opposite sex, the sex whose life expectancy at birth is not known. This data set is punched according to the instructions given in the note at the end of section III.C. If the user is writing his own main program, he can calculate model life tables for both of the sexes either by reading in a second set of data as in the main program included in this publication or by including two CALL MLT statements in the main program; the first to generate the model life table for the sex with known life expectancy, the second to generate the corresponding model life table for the opposite sex. The arguments for both CALL statements are described in section IV. B which follows. The major difference between the two CALL statements is that the value of EO in the second CALL statement must egual 99.00. III.M AIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL MLT (EO,NSEX,NREG, CDMLT) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine variable name CDMLT in the argument string is an array. The following DIMENSION statement must be included in any main program using this subroutine. DIMENSION CDMLT(18,8) 260 DOCUMENTATION B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1, Subroutines from this package a. ELT b. GTCON c. PLT * * This subroutine is not called by the subroutine MLT. It is used by the main proqram. 2. Library functions ABS (absolute value) 3. Card diagram of the main proqram and subroutines. / /. / /. / /_ / / / / / CARDS INDICATING END OF DECK / IN PUT~DATA / | / I COMPUTER CONTROL CARDS /| | subroutine~pl:t ~/\ \ i / / III/ SUBROUTINE ELT /III/ / III/ /III/ ,__/ III/ /III/ _._/ Ill/ MAIN PROGRAM /III/ / 111/ COMPUTER CONTROL CARDS /III/ / III/ I I / SUBROUTINE GTCON SUBROUTINE MLT BEGINNING OF DECK I I/ I / I/ / / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main proqram included with this subroutine packaqe are as qiven below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arquments in section IV. B. See example^ section V.C, Card Columns 1 2-53 54-80 1-5 Variable Name Definition EO NSEX I IBlank I I Label used to identify the output I IBlank I I |The life expectancy at birth. The Idecimal point should be in column 3. I IBlank I I The code indicatinq the sex of the | life table population. A 1 punched |in column 7 indicates males. A 2 I punched in column 7 indicates females. MLT 261 10 11 12-80 NREG NXT Blank The code indicating which Coale- Demeny reqion is being used. A 1 punched in column 9 indicates vest region, a 2 indicates north region, a 3 indicates east region and a 4 indicates south region. Blank The code indicating if there is another data set following this one. A zero punched in column 11 would indicate that this is the last set of data. Any other digit punched in column 11 would indicate that another set of data follows this one. Blank NOTE: This main program can be used to estimate model life tables for both males and females when the life expectancy at birth for only one sex is known. This is accomplished by reading in two sets of data. The first set of data refers to the sex whose life expec- tancy at birth is known. This set of data is punched as described above. The second set of data will consist of two cards. The first card will contain a label punched in columns 2-53. The second card will contain the value 99.00 in columns 1-5, the sex code (NSEX) for the desired sex in column 7, the region code (NREG) in column 9 and the data set indicator (NXT) in column 11. The value of NSEX must always be opposite of that in the previous data set. The value of NREG must always be the same as that of the previous data set. If. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses* This subroutine begins as follows: SUBROUTINE HLI (EO, NSEX , NREG, CDMLT) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition I K> (Transferred In (Expectation of ICode (99.00) in | table for the o i EO must have a |or be equal to lvalue, error me |be written out I return to the c (generating the lone sex, Coale- Imortality diffe (used to generat J for the opposit |a model life ta lis desired. I life at birth or a dicating a model life pposite sex is to be generated. value between 20.00 and 60.00 99.00. If EO has any other ssage number 0762 will and the subroutine will ailing program. After model life table for Demeny assumptions of rentials by sex can be e a model life table e sex. EO=99.00 indicates ble for the opposite sex 262 DOCUMENTATION NSEX (Transferred In NBEG CDHLT Transferred In Transferred Oat The sex of the life table population. NSEX=1 indicates a male life table; NSEX=2 indicates a female life table. If NSEX equals any other number, error message number 0763 will be written out and the subroutine will return to the calling proqram. After generating the model life table for one sex, Coale- Demeny assumptions of mortality differ- entials by sex can be used to generate a model life table for the opposite sex. To qenerate the opposite sex model life table, the value of NSEX must be opposite the value of NSEX in the previous call to MLT. If this is not the case, error message number 0761 will be written out and the subroutine will return to the calling program. The code indicating which region from the Coale-Demeny model life table system is being used. NBEG=1,2,3, and 4 indi- cates respectively the west, north, east, and south regions. If NBEG equals any other value, error message number 0764 will be written out and the subroutine will return to the calling program. After generating the model life table for one sex, Coale-Demeny assumptions of mortality differentials by sex can be used to generate a model life table for the opposite sex. To generate the opposite sex model life table, the value of NBEG must be the same as the value of NBEG in the previous call to MLT. If this is not the case, error message number 0761 will be written out and the subroutine will return to the calling program. The Coale-Demeny model life table given as output. For a detailed description of this array, see the description of the argument XLT in the documentation of subroutine ELT. C. EBBOB MESSAGES 0761 *** MLT EBBOR NO. 0761 INPUT EBBOB IN VABIABLE NSEX OB NBEG *** IF EO=99,SEX CODE MOST BE THE OPPOSITE OF THE PREVIOUS SEX CODE *** AND THE BEGION CODE MUST BE THE SAME AS THE PBEVIOUS BEGION CODE *** PREVIOUS SEX CODE = XX *** PBEVIOUS BEGION CODE = XX 0762 *** MLT EBROR NO. 0762 INPUT EBBOB IN VABIABLE EO *** LIFE EXPECTANCY AT BIRTH MUST BE HITHIN RANGE 20 TO 80. 0763 *** MLT EBROR NO. 0763 INPUT ERROR IN VARIABLE NSEX *** CODE INDICATING SEX OF THE LIFE TABLE POPULATION MUST EQUAL 1 OR 2 0764 *** MLT EBBOB NO. 0764 INPUT EBBOB IN VABIABLE NBEG *** CODE INDICATING IHICH COALE-DEHENT REGION IS BEING USED MUST EQUAL 1,2,3, or 4. 0765 *** MLT EBBOR NO. 0765 *** ITERATION LIMIT EXCEEDED ATTEMPTING TO INTERPOLATE FOR MODEL LIFE TABLE. MLT 263 A. COHPUTER LISTING FOR BAIN PROGRAM c c C MAIN PROGRAM FOR SUBROUTINE MLT C c _ C ---THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY TWO C-- READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C-— -STATEMENTS AS FOLLOWS, C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL c „ T0 B£ 0SED T0 IDENTIFY THE OUTPUT. THIS LABEL MOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING C --ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED C -IN COLUMNS 2-53 OF THE CARD. C C--- — THE SECOND HEAD STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN (1) THE C LIFE EXPECTANCY AT BIRTH (EO) OR A CODE (99.00) INDICATING A MODEL C -LIFE TABLE FOR THE OPPOSITE SEX IS TO BE GENERATED, (2) THE CODE C INDICATING THE SEX OF THE LIFE TABLE POPULATION (NSEX) , (3) THE C CODE INDICATING WHICH COALE-DEMENY REGION IS BEING USED (NREG), C AND (H) THE CODE INDICATING IF THERE IS ANOTHER DATA SET FOLLOWING C THIS ONE. c E0 is LOCATED IN COLUMNS 1-5 WITH THE DECIMAL POINT IN c _. COLUMN 3. C~-~- NSEX IS LOCATED IN COLUMN 7. A 1 PUNCHED IN COLUMN 7 INDICATES c _. MALES. A 2 PUNCHED IN COLUMN 7 INDICATES FEMALES. C NREG IS LOCATED IN COLUMN 9. A 1 PUNCHED IN COLUMN 9 INDICATES C WEST REGION, A 2 INDICATES NORTH REGION, A 3 INDICATES c _ EasT EEGION, AND A U INDICATES SOUTH REGION. C NXT IS LOCATED IN COLUMN 11. A ZERO PUNCHED IN COLUMN 11 c ____. INDICATES THIS IS THE LAST SET OF DATA. IF ANY OTHER c _- NUMBER IS PUNCHED IN COLUMN 11, ANOTHER SET OF DATA c FOLLOWS THIS ONE. c __ . .- c „ . DIMENSION CDMLT (18,8) NREAD=1 NPRNT=15 1 READ(NREAD # 3) READ(NREAD,4) EO, NSEX, NREG, NXT WRITE(NPRNT,5) WRITE(NPRNT,3) CALL MLT (£0, NSEX, NREG, CDMLT) CALL PLT (CDMLT, NSEX, NREG) IF (NXT) 2,2,1 2 STOP 3 F0RMAT(1X,52H ) H FORHAT(F5. 2, 1X,I1,1X,I1, 1X,I1) 5 FORMAT (1H1) END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE MLT (EO, NSEX, NREG, CDMLT) c C PROGRAM NO. 0760 c _ _ c C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE EO, NSEX, AND NREG. C THE OUTPUT ARGUMENT FROM THIS SUBROUTINE IS CDMLT. C EO IS THE LIFE EXPECTANCY AT BIRTH OR A CODE INDICATING A LIFE c TABLE FOR THE OPPOSITE SEX IS TO BE GENERATED. C NSEX IS A CODE INDICATING THE SEX OF THE LIFE TABLE POPULATION. C NREG IS A CODE INDICATING WHICH REGION FROM THE COALE-DEMENY C MODEL LIFE TABLE SYSTEM IS BEING USED. C CDMLT IS THE COALE-DEMENY LIFE TABLE GIVEN AS OUTPUT. c c _ . 264 DOCUMENTATION DIMENSION CDMLT(18,8) DIMENSION QX(18) ,CONST(78) ,CDCON (4,17) EQUIVALENCE (CONST (1) ,CDCON (1.1)) NPBNT= 15 C c C VERIFICATION OF INPUT c _ C 100 NEBB= IF (EO - 19.9) 110,160,105 105 CONTINUE IF (EO - 80.1) 160,160,110 110 CONTINUE IF (EO - 98.9) 150,120,115 115 CONTINUE IF (EO - 99.1) 120,120,150 120 CONTINUE IF (NSEX +LSEX/2 -2) 140,130,140 130 CONTINUE IF (NEEG-LBEG) 140, 200,140 140 WRITE (NPRNT,111) LSEX,LREG 111 F0RMAT(//55H *** MLT ERBOR NO. 0761 — INPUT ERBOB IN NSEX OB NBEG * ,/,72H *** IF EO = 99, SEX CODE MUST BE THE OPPOSITE * OF THE PBEVIOUS SEX CODE,/,69H *** AND THE REGION CODE MUST BE TH *E SAME AS THE PREVIOUS REGION CODE,/, 25H *** PBEVIOUS SEX CODE = , *I6,/,28H *** PBEVIOUS REGION CODE = ,16) NERR= 1 GO TO 400 150 WRITE (NPBNT,222) 222 FORMAT (// 44H *** MLT ERROR NO. 0762 — INPUT ERROR IN EO,/, *61H *** LIFE EXPECTANCY AT BIRTH MUST BE WITHIN RANGE 20 TO 80) NERR= 1 160 CONTINUE IF (NSEX - 1) 170,180,165 165 CONTINUE IF (NSEX - 2) 180,180,170 170 WRITE (NPRNT,333) 333 FORMAT (// 46H *** MLT ERBOB NO. 0763 — INPUT ERROR IN NSEX, * /,74H *** CODE INDICATING SEX OF THE LIFE TABLE POPULATION MUS *T EQUAL 1 OR 2) NERR= 1 180 CONTINUE IF (NREG - 1) 190,200,185 185 CONTINUE IF (NREG - 4) 200,200,190 190 WRITE (NPRNT,444) 444 FORMAT (// 46H *** MLT ERROR NO. 0764 — INPUT ERROR IN NREG, * /,86H *** CODE INDICATING WHICH COALE-DEMENY REGION IS BEING U *SED MUST EQUAL 1, 2, 3, OB 4) NEBR= 1 200 CONTINUE IF (NERR) 210,210,400 C c C SET NOP = 1 IF OPPOSITE SEX CODE OPTION IS CHOSEN c C 210 NOP= EO/98. 9 C c C INTERPOLATION FOB MOBTALITY LEVEL c . C CALL GTCON ( 1 , NSEX, NREG, CONST) ET1= 0.0 ET2= 100.0 DO 390 1=1,10 IF (NOP) 230,230,220 220 ET= ETOP GO TO 27 230 CONTINUE IF (1-2) 240,240,250 240 X= 1*10 -15 ET= 13.5 +0.75* (EO + X) GO TO 270 250 CONTINUE MLT 265 IF (E02-E01) 260.420,260 260 ET= ET1 +(ET2-ET1) *(E0-E01) / (E02-E01) C c , C CALCULATION OF Q(X) VALOES c C 270 DO 310 J=1,17 X= CDCON(1,J) +CDCON(2,J) *ET XP1= CDCON(3,J) +CDCON(4,J) *ET XP= 10.0**XP1 /10000.0 IF (XP-X) 300.310,280 280 CONTINUE IF (ET-54.0) 310,310,290 290 X=XP GO TO 310 300 X= (X+XP) /2.0 310 QX(J)= X QX ( 1 8) = 1 . C c C GENERATE NEW LIFE TABLE AND TEST LIFE EXPECTANCY c C 340 CALL ELT (NREG, NSEX, 1 ,SEP0, SEP1, QX, CDMLT) IF (NOP) 350,350,420 350 CONTINUE IF (ABS(E0-CDHLT(1,8)) -0.0001) 420,420,360 C c C CHANGE INTERVAL FOR NEX INTERPOLATION C ■ c 360 CONTINUE IF (ABS(ET-ETI) -ABS (ET-ET2) ) 370,370,380 370 ET2= ET E02= CDMLT (1,8) GO TO 390 380 ET1= ET E01= CDMLT(1,8) 390 CONTINUE WRITE (NPRNT,555) 555 FORMAT (//23H *** MLT ERROR NO. 0765, /,76H *** ITERATION LIMIT EXCE ♦EDED ATTEMPTING TO INTERPOLATE FOR MODEL LIFE TABLE) 420 ETOP= CONST (75) + (ET-CONST (76) ) * CONST (77) / CONST (78) LSEX= NSEX LREG= NREG GO TO 1000 C c C PRINTING OF INPUT AND ZEROING OF OUTPUT BECAUSE OF ERROR c c 400 WRITE (NPRNT.666) EO, NSEX, NREG 666 FORMAT (//26H MLT INPUT ARGUMENTS, * / 9B E0= ,F8. 2 * /11H NSEX= ,16 * /11H NREG= ,16 ) DO 410 1=1,18 DO 410 J=1,8 410 CDMLT (I,J)= 0.0 LSEX= LREG= 1000 RETURN END 266 DOCUMENTATION 1— a: Q —t a. CO g s S K £ 2 S 5 S R K E S S S £ £ £ £ S z R c s S s; s c ^ ^ g s s s s s s IX> s s £ £ S s s iS £ •0 s 3 3 s S L^ s s 3 s 3 S s s Ol Ol S s s S K K K s S S jjR s s 3 s s £~ s s S K K s S 8 o s s "S 1 UJ 3 ^- 3 3 3 IT 5 3 * trt -~ =*- 3 3 3 => O iS 3 »» o r- (^ 3 ? 3 M o © 3 3 3j > 3 3 5 tu • . 3 3 S o: o o 3 3 5 Q- z z S 8 s S S a> u. er cs S; £ o o © * S £ a or s S S lu Ol or S s K (U LU 8 £ M ~ £ s 2* :> > S 2 o-. z> * => * 3 «** 3 In o. an «, o O © © » - ~ c/> — in cv lO <\l IS) ^ ►• I» » ^. IO "• © o © o O O o © ^, u. r i c- f~- r>- o r~ o r- l>» ■» • -, •» o- . o- . e>- . m « ~ — — o- — o- ~~ oo ~ ~ - m cr- o- in -. - « CJ < k CO Tr c CM ■ k Ci 4. b> 1 L. a c CU 1 s •»- v» t- 01 •e m u a C CM u a «• i. Ci "» c OJ tu (A I* t— IU V» c UJ CO 3- D. SAMPLE OUTPUT 1st SET 1970 SOUVENIR MALE ABRIDGED LIFE TABLE MALES COALE-DEMBNY SOUTH REGION MLT 267 AGE Q(X) D(X) M(X) I(X) L(X) S(X) T(X) E(X) 0.09625 9625. . 10288 100000. 93551. .88925 5870004. 58. 70 1 0.04180 3778. .01076 90375. 351073. .96954 5776453. 63. 92 5 0.00880 762. .00177 86597. 431080. .99257 5425380. 62. 65 10 0.00605 519. .00121 85835. 427877. .99247 4994300. 58. 18 15 0.00901 769. .00181 85316. 424657. .98870 4566423. 53. 52 20 0.01360 1150. .00274 84547. 419859. .98633 4141767. 48. 99 25 0.01374 1146. .00277 83397. 414120. .984 77 3721908. 44. 63 30 0.01674 1377. .00338 82251. 407813. .98193 3307789. 40. 22 35 0.01943 1571. .003 92 80874. 400443. .97718 2899977. 35. 86 40 0.02627 2083. .00532 79303. 391307. .96910 2499534. 31. 52 45 0.03565 2753. .00726 77220. 379215. .95636 2108228. 27. 30 50 0.05192 3866. .01066 74467. 362667. .93674 1729013. 23. 22 55 0.07523 5311. .01563 70600. 339723. .90690 1366346. 19. 35 60 0. 11241 7339. . 02382 65289. 308097. .86127 1026623. 15. 72 65 0.16839 9758. .03677 57950. 265354. .78721 718526. 12. 40 70 0.26618 12828. . 06141 48192. 208889. .67130 453172. 9. 40 75 0.41390 14637. .104 38 35364. 140 226. .42597 244283. 6. 91 80 1.00000 20727. .19919 20727. 104057. .0 104057. 5. 02 2nd SET 1970 SOUVENIR FEMALE OPPOSITE OF PREVIOUS EO ABRIDGED LIFE TABLE FEMALES COALE-DEMENY SOUTH REGION GE Q(X) D(X) M(X) KX) L(X) S(X) T(X) E(X) 0.08592 8592. .09117 100000. 94243. .90033 6263761. 62.64 1 0.03849 3518. .00988 91408. 355921. .97257 6169518. 67.49 5 0.00743 653. .00149 87890. 437816. .99377 5813597. 66.15 10 0.00501 437. .00101 87237. 435090. .99371 5375782. 61.62 15 0.00757 657. .00152 86799. 432353. .99115 4940693. 56.92 20 0.01014 873. .00204 86142. 428526. .98906 4508341. 52.34 25 0.01176 1002. .00237 85269. 423837. .98770 4079815. 47.85 30 0.01285 1083. .00259 84266. 418623. .98612 3655979. 43.39 35 0.01492 1241. .00301 83183. 412812. .98327 3237356. 38.92 40 0.01856 1521. .00375 81942. 405906. .97910 2824544. 34.47 45 0.02327 1872. .00471 80421. 397424. .97164 2418639. 30.07 50 0.03356 26 36. .00683 78549. 386154. .95944 2021216. 25.73 55 0.04780 3629. .00979 75913. 370492. .93757 1635063. 21.54 60 0.07779 5623. .01619 72284. 347364. .89809 1264571. 17.49 65 0.12805 8536. .02736 66661. 311965. .82916 917208. 13.76 70 0.21991 12782. .04941 58125. 258670. .71864 605243. 10.41 75 0.36014 16330. .08785 45343. 185890. .46363 346573. 7.64 80 1.00000 29013. .18056 29013. 160683. .0 160683. 5.54 268 DOCUMENTATION 3rd SET 1970 SOUVENIR MALE TEST OF ERROR NO. 0761 *** HIT ERROR NO. 0761 — INPUT ERROR IN NSEX OR NREG *** IF EO = 99, SEX CODE MOST BE THE OPPOSITE OF THE PREVIOUS SEX CODE *** AND THE REGION CODE MUST BE THE SAME AS THE PREVIOUS REGION CODE *** PREVIOUS SEX CODE = 2 *** PREVIOUS REGION CODE = 4 MLT INPUT ARGUMENTS, EO= 99.00 NSEX= 2 NREG= 3 ABRIDGED LIFE TABLE FEMALES COALE-DEMENY EAST REGION AGE Q(X) D(X) M(X) KX) MX) S(X) T(X) E{X) 0.0 0. .0 0. 0. .0 1 0.0 0. .0 0. 0. .0 5 0.0 0. .0 0. 0. .0 10 0.0 0. .0 0. 0. .0 15 0.0 0. .0 0. 0. .0 20 0.0 0. .0 0. 0. .0 25 0.0 0. .0 0. 0. .0 30 0.0 0. .0 0. 0. .0 35 0.0 0. .0 0. 0. .0 HO 0.0 0. .0 0. 0. .0 45 0.0 0. .0 0. 0. .0 50 0.0 0. .0 0. 0. .0 55 0.0 0. .0 0. 0. .0 60 0.0 0. .0 0, 0. .0 65 0.0 0. .0 0. 0. .0 70 0.0 0. .0 0. 0. .0 75 0.0 0. .0 0. 0. .0 80 0.0 0. .0 0. 0. .0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0. 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0,0 0. 0,0 0. 0.0 0. 0.0 0. 0.0 MLT 269 4th SET 1970 SOUVENIR HALE TEST OF ERROR NO. 0764 *** MLT ERROR NO. 0764 — INPUT ERROR IN NREG *** CODE INDICATING WHICH COALE-DEHENY REGION IS BEING USED MUST EQUAL 1, 2, 3, OR 4 MLT INPUT ARGUMENTS, E0= 58.70 NSEX= 1 NREG= 5 ABRIDGED LIFE TABLE MALES EMPIRICALLY DERIVED AGE Q(X) D(X) M(X) I(X) L (X) S (X) T(X) E(X) 0.0 0. .0 0. 0. .0 1 0.0 0. .0 0. 0. .0 5 0.0 0. .0 0. 0. .0 10 0.0 0. .0 0. 0. .0 15 0.0 0. .0 0. 0. .0 20 0.0 0. .0 0. 0. .0 25 0.0 0. .0 0. 0. .0 30 0.0 0. .0 0. 0. .0 35 0.0 0. .0 0. 0. .0 40 0.0 0. .0 0. 0. .0 45 0.0 0. .0 0. 0. .0 50 0.0 0. .0 0, 0. .0 55 0.0 0. .0 0. 0. .0 60 0.0 0. .0 0. 0. .0 65 0.0 0. .0 0. 0. .0 70 0.0 0. .0 0. 0. .0 75 0.0 0. .0 0. 0. .0 80 0.0 0. .0 0. 0. .0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 0. 0.0 MORDJ I. DESCRIPTION OF PROGRAM A. PURPOSE To estimate a set of survival rates by 5-year age groups for a particular level of life expectancy at birth, using a given set of survival rates from a life table with a different life expectancy at birth. The first survival rate in each set must be from birth to age group 0-4. B. DATA NEEDED 1. Life expectancy at birth corresponding to the given survival rates. 2. Life expectancy at birth corresponding to the set of survival rates to be estimated. 3. The survival rates from birth to age group 0-4, 0-4 to 5-9, 5-9 to 10-14,..., 70-74 to 75-79, 75+ to 80*. 4. The sex of the population. 5. The Coale-Demeny model life table region whose mortality pattern is closest to that of the survival rates. II. METHODOLOGY A. MATHEMATICAL DERIVATION The subroutine generates, for the given sex and region, two model life tables, one for each of the life expectancies at birth given as input. With the survival rates from each of these model life tables, the following ratio is calculated. 2 5 x 5 x where ,1 5 S is from the model life table with life expectancy at birth corresponding to the given set of survival rates; and 2 C S is from the model life table with life expectancy at birth 5 x r ' corresponding to the set of survival rates to be estimated. The survival rates given as input are then adjusted as follows: C S* = 1 - (1 - _S ) • A 5 x 5 x 5 x where _S is from the set of survival rates given as input; and 5 S is the estimated survival rate corresponding to the new life expectancy at birth. 271 272 DOCUMENTATION B. COMMENTS Osinq the given survival rates the method calculates the rates of not surviving and assumes that percent changes of the rates of not surviving, from its mortality level (measured by life expectancy at birth) to a new mortality level is the same percent changes as those between the rates of not survivinq from two Coale-Demeny model life tables with the same cor- responding life expectancies at birth. The life expectancy at birth calculated from the new estimated survival rates will not generally be identical to that requested by the user. These life expectancies at birth would be identical only if the survival rates supplied by the user were identical to those from the Coale-Demeny system at the given sex, region and level of mortality. III. MAIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using mora than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main proqram transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main proqram. This communication process is made throuqh the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL MORDJ (EO, EONEW, NSEX, NREG , NWRIT, SX) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variable name SX in the arqument strinq is an array. The followinq DIMENSION statement must be included in any main pro- qram using this subroutine. DIMENSION SX(17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package a. MLT b. GTCON 2. Library functions None MORDJ 273 3. Card Diagram of main proqram and subroutines / / CARDS INDICATING END OF DECK /| / / INPUT DATA /| J / / COMPUTER CONTROL CARDS /| | | /III / /_ SUBROUTINE GTCON /I J 1 / /III/ / / / SUBROUTINE MLT /III/ "SUBROUTINE MORDJ /| | | / /III/ / MAIN PROGRAM /III/ /111/ /. / COMPUTER CONTROL CARDS /III/ / / III/ I I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main proqram included with this subroutine packaqe are as qiven below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arquments in section IV. B. See example, section V. C. Variable Card Columns Name 1 2-53 54-80 1-8 9-16 • 73-80 1-8 9-16 • 57-64 65-80 Definition I I Blank I I Label used to identify the output I I Blank I I SX |The survival rate from births |to aqe qroup 0-4 I |The survival rate from age qroup |0-4 to aqe qroup 5-9 I The survival rate from aqe qroup 1 40-44 to aqe qroup 45-49 I SX |The survival rate from age qroup 45-49 |to 50-54 I |The survival rate from aqe qroup 55-59 |to 60-64 I . |The survival rate from age group 75+ to 80* I I Blank Cards 2 and 3 read in the SX values. Ten SX values will appear on the first card and eight SX values will appear on the second card. The values should be entered so that the decimal points are in columns 1, 9,. . . ,65,73. 274 DOCUMENTATION 1-6 7-12 13 14 15 16 EO EONEW NSEX NREG NXT NWRIT Life expectancy at birth which corresponds to the qiven survival rates. The value should be entered with the decimal point in column 3. The life expectancy at birth corresponding to the set of survival rates to be estimated. The value should be entered with the decimal point in column 9. The sex of the population. A 1 punched in column 13 indicates males. A 2 punched in column 13 indicates females. The Coale-Demeny model life table region which most closely resembles the mortality pattern of the survival rates. A 1 punched in column 14 indicates west region, a 2 indicates north region, a 3 indicates east region, and a 4 indicates south region. The code indicating whether another data set follows this one. A zero punched in column 15 indicates that this is the last set of data. Any other digit punched in column 1 5 indicates that another set of data follows this one. The code indicating whether the results of the subroutine are to be written out. A 1 punched in column 16 indicates the results of the sub- routine are not to be written out. Any other number punched in column 16 indicates the results are to be printed out. IV. SOB ROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE MORDJ (£0, EONEW, NSEX, NREG , NWRIT, SX) B. DESCRIPTION OF ARGUMENTS Name EO How Obtained Definition EONEW NSEX NREG Transferred In Transferred In Transferred In Transferred In Expectation of life at birth corresponding to the given survival rates. EO must have a value between 20 and 80. If EO has any other value, error message number 1361 will be written out and the subroutine will return to the calling program. Expectation of life at birth corresponding to the survival rates to be estimated. EONEW must have a value between 20 and 80. If EONEW has a different value, error message number 1362 will be written out and the sub- routine will return to the calling program. The sex of the population. NS£X=1 indicates a male life table; NSEX=2 indicates a female life table. If NSEX equals any other number, error message number 1363 will be written out and the subroutine will return to the calling program. The region from the Coale-Demeny model life table system being used. MREG=1,2,3,4 indicates respectively the west, north, east and south region. If NREG equals any other value, error message number 1364 will be written out and the subroutine will return to the calling program. MORDJ 275 NWRIT SX Transferred In Transferred In and Out The code indicating whether the results of the subroutine are to be written out. NWRIT=1 indicates the results of the subroutine are not to be written out. NWRIT equal to any other number indicates the results are to be written out. The set of 17 survival rates from births to aqe qroup 0-4, 0-4 to 5-9, 5-9 to 10-14,..., 70-74 to 75-79, 75+ to 80+. All values of SX must be between zero and one. If any value of SX is not within this ranqe, error messaqe number 1365 will be written out and the subroutine will return to the calling proqram. After the cal- culations are completed, these values are replaced by the new SX's which correspond to the new level of mortality and the new period and hence, become the output array. C. ERROR MESSAGES 1361 *** MORDJ ERROR NO. 1361 INPUT ERROR IN EO, *** LIFE EXPECTANCY AT BIRTH MOST BE BETWEEN 20.0 AND 80.0 1362 *** MORDJ ERROR NO. 1362 INP0T ERROR IN EONEW, *** LIFE EXPECTANCY AT BIRTH MUST BE BETWEEN 20.0 AND 80.0 1363 *** MORDJ ERROR NO. 1363 INPUT ERROR IN NSEX, *** SEX MUST BE EITHER 1 FOR MALE OR 2 FOR FEMALE. 1364 *** MORDJ ERROR NO. 1364 INPUT ERROR IN NREG, *** REGION MUST BE 1 FOR WEST, 2 FOR NORTH, 3 FOR EAST, OR 4 FOR SOUTH. 1365 *** MORDJ ERROR NO. 1365 INPUT ERROR IN SX, *** ALL LIFE TABLE SX VALUES MUST BE GREATER THAN OR EQUAL TO ZERO AND LESS THAN OR EQUAL TO ONE. V. PROGRAM AND RESULTS COMPUTER LISTING FOR MAIN PROGRAM c c C MAIN PROGRAM FOR MORDJ c c _ C — - — THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN THREE READ C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C — THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT USES TWO DATA CARD. C~ THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN THE AGE- C SPECIFIC SURVIVAL RATES (SX) FROM AN ABRIDGED LIFE TABLE. C SX VALUES ARE CONTAINED ON TWO CARDS. FOR EACH SX VALUE BIGHT C COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS C ON THE FIRST CARD. A MAXIMUM OF TEN SX VALUES CAN APPEAR C 0N THE FIRST CARD AND EACH VALUE SHOULD BE ENTERED SO THAT c THE DECIMAL POINT IS IN COLUMNS 1, 9, ..., 65, AND 73. c THE SECOND CARD CONTAINS SEVEN SX VALUES AND THE VALUES C SHOULD BE ENTERED THE SAME AS ON THE FIRST CARD EXCEPT C THAX THE LAST VALUE WILL END IN COLUMN 64. IF LESS THAN C SEVENTEEN VALUES ARE TO BE ADJUSTED, BOTH CARDS BUST BE C PROVIDED WITH DATA ONLY IN THE NUMBER OF COLUMNS NECCBS- C SARY FOR THE NUMBER OF SX VALUES WHICH ARE TO BE ADJUSTED. 276 DOCUMENTATION C c T HE purpose OF THE THIED READ STATEMENT IS TO BEAD IN (1)THE LIFE C EXPECTANCY AT BIETH(EO) WHICH CORRESPONDS TO THE SX VALOES GIVEN, C (2) THE LIFE EXPECTANCY AT BIRTH (EONEW) WHICH CORRESPONDS C APPROXIMATELY TO THE LIFE TABLE LIFE EXPECTANCY AT BIRTH WHICH c THE SX i S ARE T0 BE ADJUSTED TO, (3) THE SEX (NSEX) TO WHICH THE C SXS APPLY, THE (4) REGION (NREG) OF THE COALE-DEHENY MODEL LIFE C TABLES WHICH HOST CLOSELY APPROXIMATES THE MORTALITY PATTERN OF C THE SXS, (5) THE INDICATOR (N XT) USED TO SIGNAL IF THERE IS ANOTHER C DATA SET FOLLOWING THIS ONE, AND (6) THE WRITE INDICATOR (NWRIT) C WHICH DETERMINES WHETHER THE RESULTS OF THE SUBROUTINE MORDJ C SHOULD BE WRITTEN OUT. C EO IS IN COLUMNS 1-6 OF THIS CARD. IT SHOULD BE ENTERED SO THAT c THE dbcIMAL POINT IS IN COLUMN 3 AND ENDS IN COLUMN 6. C EONEW IS IN COLUMNS 7-12 OF THIS CARD. IT SHOULD BE ENTERED SO c THAT THE DECIMAL POINT IS IN COLUMN 9 AND THE NUMBER ENDS c IH COLUMN 12. C NSEX IS IN COLUMN 13. A 1 IN COLUMN 13 INDICATES MALES AND A c 2 IN COLUMN 13 INDICATES FEMALES. C NREG IS IN COLUMN 14. A 1 IN COLUMN 14 INDICATES WEST, A 2 IN- c DICATES NORTH, A 3 INDICATES EAST AND A 4 INDICATES SOUTH. C NXT IS IN COLUMN 15. A ZERO IN COLUMN 15 INDICATES THIS IS THE C LAST DATA SET. ANY OTHER NUMBER IN COLUMN 15 INDICATES THAT c THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. C NWRIT IS IN COLUMN 16 OF THIS CARD. A ZERO IN COLUMN 16 c INDICATES THAT THE RESULTS OF THE SUBROUTINE MORDJ ARE NOT c to BE PRINTED OUT. FOR ANY OTHER NUMBER IN COLUMN 16 THE C RESULTS OF THE SUBROUTINE MORDJ WILL BE PRINTED OUT. c c DIMENSION SX(17) NREAD = 1 NPRNT = 15 10 READ (NREAD, 11) 11 FORMAT(1X,52H ) READ(NREAD,22) (SX (I) ,1 = 1 , 1 7) 22 FORMAT(10F8.7,/,7F8.7) READ(NREAD, 33) EO, EONEW, NSEX, NREG, NXT, NWRIT 33 FORMAT(2F6.3,4I1) WRITE(NPRNT,44) 44 FORMAT(1H1) WRITE (NPRNT, 11) CALL MORDJ (EO, EONEW, NSEX, NREG, NW RIT, SX) IF (NXT) 20,20,10 20 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE MORDJ (EO, EONEW, NSEX, NREG, NWRIT, SX) C c c C PROGRAM NO. 1360 c _ . C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE EO, EONEW, NSEX, C AND NREG. c sx IS B oTH AN INPUT ARGUMENT AND AN OUTPUT ARGUMENT. C EO IS THE EXPECTATION OF LIFE AT BIRTH FOR THE DATE AT WHICH THE C SURVIVAL RATES ARE GIVEN. c EONEW IS THE EXPECTATION OF LIFE AT BIRTH FOR THE DATE TO WHICH c THE SURVIVAL RATES HAVE TO BE ADJUSTED. C NSEX IS THE SEX OF THE POPULATION IN QUESTION. C NREG INDICATES WHICH REGIONAL MODEL LIFE TABLE IS TO BE OSED. c sx ARE THE SURVIVAL RATES CORRESPONDING TO EO. AFTER THE C CALCDLATIONS ARE COMPLETED, THESE VALOES ARE REPLACED BY THE C NEW SXS WHICH CORRESPOND TO THE NEW LEVEL OF MORTALITY C AND HENCE BECOME THE OUTPUT ARRAY. MORDJ 277 c c DIMENSION SX (17) ,SX2 (17) ,CDMLT (18,8) C c c CHECKING INPUT ERRORS c C NPRNT = 15 NEE = N = NT = IF (EO-20.) 5,10,10 5 NEE = 1 WRITE (NPRNT, 11) 11 FORMAT (/,1X,45H*** MORDJ ERROR NO. 1361 — INPUT ERROR IN EO, */,1X,59H*** LIFE EXPECTANCY AT BIRTH MUST BE BETWEEN 20.0 AND 80.0 *.) GO TO 15 10 CONTINUE IF (EO-80.0) 15,15,5 15 CONTINUE IF (EON2W-20) 20,25,25 20 NER = 1 WRITE (NPP.NT, 22) 22 FORMAT (/,1X,48H*** MOEDJ ERROR NO. 1362 -- INPUT ERROR IN EONEW, */,1X,59H*** LIFE EXPECTANCY AT BIRTH MUST BE BETWEEN 20.0 AND 80.0 *.) GO TO 30 25 CONTINUE IF (EONEW-80.0) 30,30,20 30 CONTINUE IF (NSEX-1) 35,45,40 35 NER = 1 WRITE (NPP.NT, 33) 33 F0?MAT(/,1X,47H*** MORDJ EEROE NO. 1363 -- INPUT ERROR IN NSEX, */,lX,50H*** SEX MUST BE EITHER 1 FOR MALE OR 2 FOR FEMALE.) GO TO 45 40 CONTINUE IF (NSEX-2) 45,45,35 45 CONTINUE IF (NF.EG-1) 50,60,55 50 NER = 1 WRITE (NPRNT, 44) 44 FORMAT (/, 1X,49H*** MORDJ ERROR NO. 1364 — INPUT ERROR IN REGION,/ *,1X,71H*** REGION MUST BE 1 FOR WEST, 2 FOR NORTH, 3 FOR EAST, OR *4 FOR SOUTH.) GO TO 60 55 CONTINUE IF (NREG-4) 60,60,50 6 DO 80 1=1,17 IF (SX(I) -.000001) 86,70,70 70 CONTINUE IF (SX(I)-1.) 75,75,86 75 N = N + 1 80 CONTINUE IF (N) 83,83,81 81 CONTINUE IF (NT) 83,84,82 82 CONTINUE IF (N - (NT-1) ) 83,84,83 83 NEB = 1 WRITE (NPRNT, 56) 56 FORMAT (/,1X,45H*** MORDJ ERROR NO. 1365 -- INPUT ERROR IN SX,/ *,1X,97H*** ALL LIFE TABLE SX VALUES MUST BE GREATER THAN OR EQUAL *TO ZERO AND LESS THAN OR EQUAL TO ONE.) 84 CONTINUE IF (NER-1) 90,85,85 85 WRITE (NPRNT, 66) EO, EONEW, NSEX, NEEG 66 F0RMAT(/,1X,25H MORDJ INPUT ARGUMENTS,/, 10H EO = ,F6. 3, * /,1X,12H EONEW = ,F6.3, * /,1X,11H NSEX = ,11, * /,1X,11H NREG = ,11) WRITE (NPRNT, 77) (SX (I) , 1=1 , 1 7) 77 FORMAT (/,1X,9H SX = , 9 (F10. 7 , 2X) , * /,10X,8(F10.7,2X) ) GO TO 1000 278 DOCUMENTATION 86 CONTINUE IF (NT) 87,87,80 87 NT = I GO TO 80 C GENERATE AND STORE MODEL SXS CORRESPONDING TO EO. c C 90 CALL »LT (£0, NSEX,NREG, CDMLT) K = N N1 = N+1 DO 100 1=1,17 100 SX2(I) = 0. DO 200 1=1, K 200 SX2(I)=CDMLT (1,6) SX2 (K)=CDMLT(K + 1,7)/CDMLT(K,7) C C GENERATE MODEL SURVIVAL RATES CORRESPONDING TO EONEH. c C CALL MLT (EONEW,NSEX,NREG,CDMLT) CDMLT (K,6) =CDMLT (K + 1,7) /CDMLT (K, 7) CDBLT (N1 ,6) =0.0 C C ADJUST THE INPUT VALUES OF SURV. c C DO 210 1=1, N ALPHA=(1.0-CDMLT (1,6) )/(1.0-SX2 (I) ) 210 SX(I)=1. 0-((1.0-SX (I) )*ALPHA) C Q. -. C— — PRINTING OF OOTPUT C IF(NKEIT) 1000,1000,220 220 WRITE(NPRNT,230) 230 F0RMAT(////,3X,4HFR0M,4X,2HT0,8X,8HSURVIVAL,/,23X,5HRATE ) WRITE (NPRNT, 240) SX(1) 240 FORMAT (2X,13HBIKTH 0- U,7X,F7.5) KH1=K-1 DO 250 1=2, KM1 NAGE=5*I-10 NAG<*=NAGE + 4 NAG5=NAGE+5 NAG9=NAGE+9 WRITE (NPRHT, 26 0) N AGE, N AG4, N AG5, N AG9, SX (I) 250 CONTINUE 26 FORMAT (2X ,12, 1H-.I2, 3X, 12, 1 H-, 12 , 7X, F7. 5) NAGE=5*K-10 NAG5=NAGE+5 WRITE (N PRUT, 27 0) NAGE,NAG5,SX (K) 270 F0RMAT(3X,I2,1H+,5X,I2,1H+,8X,F7.5) 1000 BETURH END MORDJ 279 h- S 2 s OS O O CM 3 2 2 s - o <0 «, S 2 s t^ o CO 0» S S s o- o 07- OT- O s S s . o • • • s s s . s s 8 £ s s OO d- -^ o 0- £ S I s - OO r^ Cr- M> S s 2 CM r- a- U> so z a Oo ~ oo 0=> IT> s; s s e» J- tr- o- ^> s s s . » . . • s s 5 3 s 3 3 3 ; ~- -. ITl »- vS * s S w> CI- CM 07- — ■$ 3 » * - ■0 I s - oo S 3 <* CO VS OO 00 — S S s 1 X s , o- > OO CM Ir, ° ° a — a- — •»% U-ft S s s 0- ir> o- 0> C»- fO 3 s R o~ oo o~ O- OO K R a . . i . • . S S IC i ~ JQ s i Z a s O CM oo *- I»k 3 s ~ cm CM 2 l*» 00 — 3 S 3 -, CM cc -~ •*. — 3 " S 2 o- O 0Q o~ cr- Oo S s 2 a: o- 0- Gi o- Ift o- oo 2 2 2 co . . ^) • v* ft • 2 2 s o; rr> - - i Zi — ftU — — 2 2 2 r^ vB — —I * -. CM vS o 2 2 2 UJ CM -~ i- a: 1^ * « «, >- H I s - O- \0 z o» vS o cr- r- vS -- ~ » » > oo rr> O > v» O »- rr. fT> O «, ^ » Z> I s - in o- ri OO OO IA * v» o •• n O oo 0~ » Q CO . IU O- or- . „ m ~ to • . vS C/> • o» l~ • • o ~ ^ - in ir> vS « - V v» ■»» c CM (~ 111 lO ~5 ft> 1 ft. ft* V ft* D O lO >W\£>' T >f T )roa>r«voroooooo<7>oinrocD«- MEHff)r»o^<^ooooo3oopNp»iO' T )r-voo>p>-fn D OOOOOOOOOOOOOOOOO o H I I i I i i i I I I i I I I I i — oinomomoinoinoinomoift o EH « to ■d C «3 aa*o>srcfisi-CT»3-CT»*cn*cn;»* O EH T-r-f>»tNrr)r04t5fir)lrtvO»Or» + M at i I I l l i l i I • l l ! i i u-i (m HOinomoifloinomoinoinoi« to w o ►4 > i i i SB •at ffl s M ■-) «s SC W h « H SB H > D O CO «ji ino\oa>i/iiflr'>0'i) >W(»)crtCT>oocoooco OS 01 >•• s ooooooooo to i— r- f\j c\j ro po ♦ O I I I I I I I I o H oinoKioiTioms *" t- (M tM fO CO «3 0«9t«P«m« O EH r- t- CMfN CI + at at i i i i i i i m h m o in o tn o m o co 00 t- «- CM (N «*» MORDJ 281 © o in cm o o o o CM CM (N VO CO V© CO IT) CM tf • • © © o EH ►J «a D Ot H 03 o SB < m eh w en w ►J o 25 •4 O w O H © © O © O i£> CM 1- m oo oo *- cm r» • • © © © o © © CM 00 r» in oo t- CM 00 • • o © o o © © v© in co m o in CM CO CM oo ■ • o © in co « o ea OB M 10 o cn H 03 O co as W SB EH M CO «- X to O M SB ~1 03 « «C O EH ai w H •"3 »J a a p-i o -1 a «a * * * * » * 10 EH SB M S o o « o «! © o Eh © • d o in 04 O M0 SB > (N f- H© II VO II II QIIHMU « SB pq pq O o o to « BUHZ2 O © © o (N CO en *- o^ 0- a £ Ifi kft a «a >r> in a £ CM CM t CM CM CM E S <^ "O a ff> m res a £ cf\ fft K «\ CO rr, a 2 S » " " a C 0s 00 ~ OS OO OS £ " VS VS ^ vS IS M) £ s m <»* 5 fO rr» <*1 a s IT> VA S lf> lO ifi «n 3 * * «> i- 3- 3- s s rn. «% is xt «1 m <£• Itt ss s ffs «* s K\ «> rr> 3 2 i»> wv us rf\ i*> IO S us. io s IT) if> IT> S s rr> m s «** «1 rc\ S s s s K s K S 3- a- sS s * v9 3- vS 3- vS s 3 CM OJ «% CM l<% O- 0- S s KS m a r<1 f*% S s s S 5 ? S 3 CM N CM (^ CM CM W r« CM vS 5 os o Ml Os C5 vS 0s O ■W S CO t> CM r» O CM * r» O CM |v O CM I s - O 8 S CM O CM o» o~ CM S O^ o- CM o~ O- CM O- o~ S s O tv O rv *■ O 3 r- *■ O r- 3- O «v 3" 5 3 • i»\ • rr> — • 9 fp» — • rfN -~ • «1 -~ 3 9 § 3 3 w\ r*» 1^ V "> ro tr S r- tv r» iv. CM r- 9 r» CM IV IV CM |v IV CM ? a o- CM o- CVI 0» o- s CM Oo o- CM 0s 0- CM OP S a i9 r- vS r- o- \9 a r~ CJ- sS |v O- vS tv br- a s O 0>> o Oo »r> O s 0o m O OS lf> O 0s io s a • 00 • 0O o- • a CO o- • 03 <*- • 00 O- a a C\ f<^ — " «1 — 1^ — r0> — a v3 vS VS IS id s a 3- * i- a * *- a ?! to 3- 1^- * r^ d- ±- n iv a- a- IV 3- m i- tv 3- £! s » u% |v X u> r- CM 1— io 3 r> CM »o |v CM C: lf> fv CM S a >< — «- -1 — — CM Q. — a — CM c-r — — CM o — ■— CM a a _l • r- 0_ • r- ir> u. • s iv lp> Cr • |v in cr • r- ir> a a a o- cc o- c^> ^ a o- rr» z cr rn Or Or- rCJ a R CM m o~ rc% CM R a o 3- * o~ a i- 0- a a rrv Q «> a o~ a a «r Or- s o oo «c o O Oo -i 0- O OS a a — CD CM r- IT. «t 0- f- in a s . oo . 0» CM . a OS CM . CR CM . OP CM 3 s 3- * Vll s * vS 3- M> 3- 3 a CM M> 3- CM vS 3- a a Gr v o- Or • o~ r~- cz • a &- r~ or . o- t- cr • O- r- a 2 M M 0- rr> 2 a z 3" rri LT> 2 * I*> kn O Z * 1*1 a u% O Z 3- r<\ in O z d m O a 2 IU vS — KN LLI vS — tr> 0^ UJ O — 3 K> o- UJ M> — rCl o~ LU — rc> O- a 2 > o 3- ro> > o *• «o CM > O i- a N1 CM > O *• <*i Cm > 00 3- «1 CM 3 2 3 • rr> ■^ . K% => » fi s => «"> o • T> 2 » O — CM o -~ CM o ~- CM =>, O — oj o CM V, • in « Q o to » O O CO • » o O v> • o O tr> • O O » ~ cm — rv CM — 1^ CM - — rv CM — fv CM — IV. l» » Or 00 iS r «^ O- C£ 00 VS « rn o- or 00 v* rr> cr- Or 0° vS) t<^ O- f ■" li- iv CM CM tv u_ r~ CM CM r^ u. r~ CM •» CM r~ a. O CM CM |v- a. O CM CM r~ •» en . O o- — in O o~ — in O * o~ -. in • O O- — m ~ 2 o 2 o 2 o ~ 2 O 2 O ~ - — • — . — . - — . O • - (A -a O c CM w a CO a -5 w ~5 V v» •o- -5 vi f -5 CO ; ■5 a u vj C CM c "E ■0 3- ~5 CO * 10 UJ In 1— c CM ■o 3- UJ in £ in NRSFR 291 D. SAMPLE OUTPUT 1st SET NRSFR SOUVENIR DATA 11 CAPLX'S AGE SPECIFIC FERTILITY RATES 0.08023 0.23405 0. 24765 0.20341 0.15441 0.06971 0.02261 2nd SET NRSFR SOUVENIR DATA BAD CAPLX *** NRSFR ERROR NO. 0821 — INPUT ERROR IN CAPLX *** ALL VALUES FOR CAPITAL LX FOR AGES 15-49 BUST BE BETiEEN 60,000 AND 473,000 NRSFR INPUT VALUES RNRR = 1.782 SRB = 1.064 ASFPT = 0.08026 0.23413 0.24773 0.20348 0.15446 0.06973 0.02262 CAPLX = 92310. 335996. 404870. 397177. 388727 379787. 568824. 357334. 345368. 332597. 317970. 290374. 266258. 235224. 195982. 149002. 97836. 0. AGE SPECIFIC FERTILITY RATES 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3rd SET NRSFR SOUVENIR DATA BAD ASFPT *** NRSFR ERROR NO. 0822 — INPUT ERROR IN ASFPT *** THE AGE-SPECIFIC FERTILITY PATTERN MUST BE BETiEEN 0.0 AND 0.5 NRSFR INPUT VALUES RNRR = 1.782 SRB = 1.064 ASFPT = 0.08026 0.23413 0.24773 0.99999 0.15446 0.06973 0.02262 CAPLX = 92310. 335996. 404870. 397177. 388727. 379787. 368824. 357334. 345368. 332597. 317970. 290374. 266258. 235224. 195982. 149002. 97836. 0. AGE SPECIFIC FERTILITY RATES 0.0 0.0 0.0 0.0 0.0 0.0 0.0 292 DOCUMENTATION 4th SET NRSFR SOUVENIR DATA BAD RNRR *** NRSFR ERROR NO. 0823 — INPUT ERROR IN RNRR *** THE NET REPRODUCTION RATE MUST BE BETWEEN 0.5 AND 4.0 NRSFR INPUT VALUES BNHR = 0.082 SRB = 1.064 ASFPT = 0.08026 0.23413 0.24773 0.20348 0.15446 0.06973 0.02262 CAPLX = 92310. 335996. 404870. 397177. 388727. 379787. 368824. 357334. 345368. 332597. 317970. 290374. 266258. 235224. 195982. 149002. 97836. 0. AGE SPECIFIC FERTILITY RATES 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5th SET NRSFR SOUVENIR DATA ALL ERRORS *** NRSFR ERROR NO. 0821 -- INPUT EEROB IN CAPLX *** ALL VALUES FOR CAPITAL LX FOE AGES 15-49 BUST BE BETWEEN 60,000 AND 473,000 *** NRSFR ERROR NO. 0822 — INPUT ERROR IN ASFPT *** THE AGE-SPECIFIC FERTILITY PATTERN MUST BE BETWEEN 0.0 AND 0.5 *** NRSFR ERROR NO. 0823 — INPUT ERROR IN RNRR *** THE NET REPRODUCTION RATE MUSI BE BETWEEN 0.5 AND 4.0 *** NRSFR ERROR NO. 0824 — INPUT ERROR IN SRB *** THE SEX RATIO AT BIRTH MUST BE BETWEEN 0.9 AND 1.1 NRSFR INPUT VALUES RNRR = 5.082 SRB = 0.800 ASFPT = 0.08026 0.23413 0.24773 0.99999 0.15446 0.06973 0.02262 CAPLX = 92310. 335996. 404870. 397177. 388727. 379787. 824. 357334. 345368 332597. 317970. 290374. 266258. 235224. 195982. 149002. 97836. AGE SPECIFIC FERTILITY RATES 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ONECN I. DESCRIPTION OF PROGRAM A. PURPOSE To calculate stable or quasi-stable estimates of the crude birth and death rates from the aqe distribution and the rate of natural increase of a population. The estimates are based on Coale-Demeny stable populations. B. DATA NEEDED 1. The population aged 0-44 in 5-year aqe qroups 0-4, 5-9 . .., 35-39, 40-44. 2. The number of people in the total population. 3. The sex of the population. 4. The Coale-Demeny reqion beinq used. 5. The rate of natural increase of the population. If quasi-stable estimates are desired, this should be the rate of natural increase during the last intercensal period. 6. If quasi-stable estimates are desired, the number of years between the last two censuses must be qiven. 7. If quasi-stable estimates are desired, the number of years mortality has been declininq must be qiven. 8. If quasi-stable estimates are desired, the rate of natural increase be- fore the mortality decline began must be qiven. 9. An indicator of whether the results are to be printed out must be qiven. II. METHODOLOGY A. MATHEMATICAL DERIVATION The methodoloqy involved in this subroutine assumes that the population for which estimates are calculated is a stable or quasi-stable population and that the rate of natural increase is the intrinsic growth rate of the stable population. The proportion of the given population under age x for x=5, 1 0,. . . ,45 is calculated as follows, assuming that the information is by 5-year age groups. Cp t = ^o^ 5 j-5 x T,t where x CP q is the proportion of population under age x at year t 293 294 DOCUMENTATION P is the population in the 5-year age group j-5, j-1 at year t, and P is the total population at year t. Using each of these cumulative proportions, the rate of natural increase and subroutine INTSP, stable populations for each cumulative proportion are generated. Each of these stable populations will have different stable popu- lation parameters, and different life tables (INTSP uses Coale-Demeny model life tables) . The stable population having a life table whose life expectancy at birth is the median value from all these life tables is accepted as per- taining to the actual population. The intrinsic birth and death rates and the gross reproduction rate of the chosen stable population are considered to be estimates of the parameters of the actual population. If a guasi-stable condition is assumed, the above estimates are corrected by considering the time period during which the population is assumed guasi- stable and the rate of natural increase at the beginning of such period. This correction is made by using subroutine ADJBG. . Reference: United Nations, Methods of Estimating Basic Demographic Measures from Incomplete Data, Manual IV, ST/SOA/Series A/42, New York 1967. B. COMMENTS Since this subroutine is restricted to the mortality patterns of Coale- Demeny regional model life tables, both the fertility and mortality rates are based on the patterns as qiven by Coale-Demeny in Regional Model Life Tables and Stable Populations. Although the stable population distribution and its parameters can be generated for either sex, when a male stable population dis- tribution is estimated, the female fertility rates are applied to the male stable population distribution for purposes of determining the gross reproduc- tion rates. III. MAIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines* For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL ONCEN (P5,TP5,NSEX ,NREG,RNG, INT,NT, RNG1, NWRIT, CDMLT, *CBRN,CBRAM,CDRAH) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine both variable names P5 and CDMLT in the argument string are arrays. The following DIMENSION statement must be included in any main program using this subroutine. DIMENSION P5(9),CDHLT(18,8) ONECN 295 B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package a. INTSP b. ADJBG c. SPP d. MLT e. GTCON f. ELT 2. Library functions HOD (modulus) ABS (absolute value) 3. Card diagram of main program and subroutines / CARDS INDICATING END OF DECK / / "~INPUT~DATA~~ "~7| / / I / COMPUTER CONTROL CARDS /| | / / I I / SUBROUTINE ELT /| | | / ~ ~SUBROUTINi~GTCON~" "~/\ \ \ / / / III/ / SUBROUTINE MLT /III/ / / III/ / SUBROUTINE SPP /III/ / / III/ / SUBROUTINE ADJBG /III/ / _ / III/ / SUBROUTINE INTSP /III/ / * SUBROUTINE~ONicN ~/\ | | / / / III/ / MAIN PROGRAM /III/ / / III/ / COMPUTER CONTROL CARDS /III/ / / III/ I I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this subroutine package are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Card Columns 2-53 Variable Name 54-80 NSEX Definition I I Blank I | Label used to identify the output I I Blank I I | The sex of the population. A 1 (punched in column 1 indicates males, | a 2 punched in column 2 indicates | females. 296 DOCUMENTATION 4 5-9 10 11-12 13 11-15 16 17-21 22 23 24 25 26-80 1-12 13-80 NREG ENG INT NT RNG1 KWRIT NXT TP5 Blank The Coale-Demeny region being used. A 1 punched in column 3 indicates west region; a 2 indicates north region, a 3 indicates east region and a 4 indicates south reqion. Blank The rate of natural increase of the popu- lation. If quasi-stable estimates are desired, this should be the rate of natural increase durinq the last intercensal period. ENG should be given per unit and the decimal point should be entered in column 5. Blank The number of years between the last two censuses. A 5 punched in column 12 indicates a 5-year intercensal period. A 10 punched in columns 11-12 indicates a 10 year intercensal period. If quasi- stable estimates are not desired, zeros should be punched in columns 11 and 12. The variable should be entered ending in column 12. Blank The number of years mortality has been declining. NT must be a multiple of 5. If guasi-stable estimates are not desired, zeros should be punched in columns 14-15. The value should be entered ending in column 15. Blank The rate of natural increase before the mortality decline began. These columns are used only when guasi-stable estimates are calculated. The value of the rate of natural increase should be entered with the decimal point in column 17. Blank The code indicating whether or not the results of the subroutine are to be printed out. A zero punched in column 23 indicates the output will not be printed. If any other number is punched in column 23, the output will be printed. Blank The code indicating if there is another data set following this one. A zero punched in column 25 indicates this is the last set of data. Any other diqit punched in column 25 indicates another set of data follows this one. Blank Number of people in the total population Blank ONECN 297 1-10 11-20 • 61-70 71-80 1-10 11-20 21-80 P5 (Population in aqe group 0-4 I (Population in aqe qroup 5-9 I I I (Population in aqe qroup 30-34 I | Blank I I (Population in aqe qroup 35-39 I (Population in aqe qroup 40-44 I (Blank Cards 4 and 5 read in the population aqed 0-44 in 5-year aqe qroups. Ten columns are reserved for each value. The values should be entered endinq in columns 10,20,30,40,50,60,70. IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines beqin with the word SUBROUTINE followed by a space, the name of the subroutine and the arqument strinq enclosed in parentheses. This subroutine beqins as follows: SUBROUTINE ONECN (P5, T P5, NSEX, NREG, RNG, INT, NT, RNG 1 , NWRIT, *CDML?,CBR,CBEAM,CDRAM) B. DESCRIPTION OF ARGUMENTS Name P5 How Obtained Definition TP5 NSEX NBEG RNG Transferred In Transferred In Transferred In Transferred In Transferred In The population aqed 0-44 in 5-year aqe qroups. All values of P5 must be qreater than zero. If any value of P5 is not qreater than zero the subroutine will write out error messaqe number 0851 and return to the callinq proqram. The percentaqe of the population under aqe 5 (P5(1)/TP5) must be qreater than 5*. If it is not, the subroutine will write out error messaqe number 0852 and return to the callinq proqram. The percentaqe of the population under aqe 45 (l' P5 (I) /TP5) must be qreater than 45X. If it is not, the subroutine will write out error message number 0853 and return to the callinq proqram. Number of people in the total population. The sex of the population. NSEX=1 indicates males and NSEX=2 indicates females. If NSEX equals any other number, the subroutine will pLint out error messaqe number 0855 and return to the callinq proqram. The Coale-Demeny reqion being used. NREG=1, 2,3,4 indicates respectively the west, north, east and south regions of the Coale-Demeny model life table system. If NREG equals any other number, the subroutine will print out error message number 0856 and return to the calling program. The rate of natural increase of the population. For guasi-stable estimation, this should be the rate of natural increase during the last intercensal period. The value of RNG must be within the range -0.01 to 0.05. If RNG is not within this range, the subroutine will print out error message number 0854 and return to the calling program. 298 DOCUMENTATION INT NT RNG1 NBBIT CDBLT CBRM CBRAM CDRAM Transferred In Transferred In Transferred In Transferred In Transferred Out Transferred Out Transferred Out Transferred Out The number of y censuses. If q beinq performed quasi-stable es for a 5- year or respectively, the subroutine number 0857 and The number of y clininq. NT mu it is not, the error messaqe n calling program or equal to 40 subroutine will ber 0858 and re ears between the last two uasi-stable estimation is not , INT must equal zero. For timation INT must equal 5 or 10 10- year intercensal period If INT equals any other number, vill print out error messaqe return to the calling proqram. ears mortality has been de- st be a multiple of 5. If subroutine will print out umber 0859 and return to the NT must also be less than years. If it is not, the print out error messaqe num- turn to the calling program. The rate of natural increase before the mortality decline began. This value is needed only for quasi-stable estimates. The value of RNG1 must be between -0.01 and 0.05. If it is not, the subroutine will print eiat error message number 0860 and re- turn to the calling program. The code indicating whether the results of the subroutine are to be printed out. If NWRIT=0, the results will not be printed out. If NNRIT eguals any other number, the results will be printed out. The Coale-Demeny Regional Model Life Table given as output. For a detailed description of this array, see the description of the argument XLT in subroutine GLT. The life table will correspond to the median of the nine stable populations calculated (see section II. A). For quasi-stable estimation, the life table will be consistent with the quasi-stable parameters. The crude birth rate corresponding to the median stable population. The crude birth rate corresponding to the median stable population after the adjust- ment for the effect of the mortality decline. The crude birth rate corresponds to the end of the intercensal period. The crude death rate corresponding to the median stable population after the adjust- ment for the effect of the mortality decline. The crude death rate corresponds to the end of the intercensal period. C. ERROR MESSAGES 0851 *** *** 0852 *** *** 0853 *** *** 0854 *** *** 0855 *** *** 0856 *** *** ONECN ERROR NO. 0851 INP0T ERROR IN P5 ALL FIVE-YEAR AGE GROUPS HOST BE GREATER THAN ZERO ONECN ERROR NO. 0852 INPOT ERROR IN P5(1) PERCENT OF P0P0LATI0N 0NDER AGE 5 MOST BE GREATER THAN 5% ONECN ERROR NO. 0853 INPOT ERROR IN P5 PERCENT OF POPULATION UNDER AGE 45 MUST BE GREATER THAN 45X ONECN ERROR NO. 0854 - — INPOT ERROR IN RNG RATE OF NATURAL INCREASE MUST BE IITHIN RANGE -0.01 TO 0.05. ONECN ERROR NO. 0855 INPUT ERROR IN NSEX SEX CODE MUST EQUAL 1 OR 2. ONECN ERROR NO. 0856 INPUT ERROR IN NREG CODE INDICATING THE COALE-DEMENY REGION BUST EQUAL 1,2, 3, OR 4. ONECN 299 0857 *** ONECN ERROR NO. 0857 INPUT ERROR IN INT *** THE INTERCENSAL PERIOD MOST BE 0,5, OR 10 YEARS. 0858 *** ONECN ERROR NO. 0858 INPUT ERROR IN NT *** THE NUMBER OF YEARS MORTALITY HAS BEEN DECLINING MUST BE BETWEEN 5 YEARS AND 40 YEARS. 0859 *** ONECN ERROR NO. 0859 INPUT IN NT *** THE NUMBER OF YEARS MORTALITY HAS BEEN DECLINING MUST BE A MULTIPLE OF 5. 0860 *** ONECN ERROR NO. 0860 INPUT ERROR IN RNG1 *** RATE OF NATURAL INCREASE IS NOT WITHIN RANGE -0.01 TO 0.05 V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c c HAIN PROGRAM FOR SUBROUTINE ONECN c c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY FOUR C READ STAIEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS, C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL C TO BE USED TO IDENTIFY THE OUTPUT. THIS LABEL MOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED c ih COLUMNS 2-53 OF THE CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN (1) THE C CODE INDICATING THE SEX OF THE POPULATION (NSEX) , (2) THE CODE C INDICATING THE COALE-DEMENY REGION BEING USED (NREG) , (3) THE C RATE OF NATURAL INCREASE (RNG) OF THE POPULATION DURING THE LAST C INTERCENSAL PERIOD, (4) THE NUMBER OF YEARS BETWEEN THE LAST TWO C CENSUSES (INT) , (5) THE NUMBER OF YEARS MORTALITY HAS BEEN C DECLINING (NT), (6) THE RATE OF NATURAL INCREASE (RNG1) OF THE C POPULATION BEFORE THE MORTALITY DECLINE BEGAN, (7) THE CODE C INDICATING WHETHER OR NOT THE RESULTS OF THE SUBROUTINE ARE TO BE C PRINTED (NWRIT), AND (8) THE CODE INDICATING IF THERE IS ANOTHER C DATA SET FOLLOWING THIS ONE (NXT) . C NSEX IS LOCATED IN COLUMN 1. A 1 PUNCHED IN COLUMN 1 INDICATES C A MALE POPULATION. A 2 PUNCHED IN COLUMN 1 INDICATES C A FEMALE POPULATION. C NREG IS LOCATED IN COLUMN 3. A 1 PUNCHED IN COLUMN 3 INDICATES C WEST REGION, A 2 INDICATES NORTH REGION, A 3 INDICATES EAST C REGION AND A 4 INDICATES SOUTH REGION. C RNG IS LOCATED IN COLUMNS 5-9 WITH THE DECIMAL POINT IN COLUMN 5. C INT IS LOCATED IN COLUMNS 11-12, ENDING IN COLUMN 12. C NT IS LOCATED IN COLUMNS 14-15, ENDING IN COLUMN 15. C RNG1 IS LOCATED IN COLUMNS 17-21 WITH THE DECIMAL POINT IN C COLUMN 17. C NWRIT IS LOCATED IN COLUMN 23. A ZERO PUNCHED IN COLUMN 23 INDICATES c THE OUTPUT WILL NOT BE PRINTED. IF ANY OTHER NUMBER IS PUNCHED C IN COLUMN 23, THE OUTPUT WILL BE PRINTED. C NXT IS LOCATED IN COLUMN 25. A ZERO PUNCHED IN COLUMN 25 INDICATES c THIS Is THE L&ST SET 0F dat A . IF ANY OTHER NUMBER IS PUNCHED c IN COLUMN 25, ANOTHER SET OF DATA FOLLOWS THIS ONE. C C THE THIRD READ STATEMENT USES ONE CARD. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE NUMBER C OF PEOPLE IN THE TOTAL POPULATION (TP5) . C TP5 IS LOCATED IN COLUMNS 1-12, ENDING IN COLUMN 12. C 300 DOCUMENTATION C THE FOURTH READ STATEMENT OSES TWO DATA CARDS. C THE PURPOSE OF THE FOUHTH READ STATEMENT IS TO READ IN THE POPD- C LATION IN FIVE YEAR AGE GROUPS (P5) . C p5 is CONTAINED ON TWO CARDS. SEVEN VALUES SHOULD BE ENTERED ON c THE FIRST CARD, ENDING IN COLUMNS 10, 20, 30, 40. 50, 60, C AND 70. TWO VALUES SHOULD BE ENTERED ON THE SECOND CARD, C ENDING IN COLUMNS 10 AND 20. c c DIMENSION P5{9), CDMLT(18,8) NREAD= 1 NPRNT= 15 1 READ (NREAD,2) 2 FORMAT(1X,40H ) READ (NREAD.5) NSEX, NREG,RNG , INT, NT, RNG1 , NWRIT.NXT 5 FORMAT (I1,1X,I1,1X,F5.4,2(1X,I2),1X,F5.4, 1X,I1,1X,I1) READ(NREAD,6) TP5 6 FORMAT (F12. 0) READ(NREAD,3) (P5 (I) ,1=1 ,9) 3 FORMAT(7F10, 0/2F10.0) WRITE (NPRNT,4) 4 FORMAT(1H1) WRITE (NFRNT,2) CALL ONECN (P5 ,TP5,NSEX, NREG ,RNG ,INT, NT, RNG1, NWRIT,CDMLT,CBR ,CBR A, *CDRA) IF (NXT) 1000,1000,1 1000 STOP END B. COMPUTER LISTING FOR SUBROUTINE c — c SUBROUTINE ONECN (P5,TP5, NSEX, NREG, RNG, INT, NT, RNG 1.NWRIT, ♦CDMLT, CBRM, CBRAM, CDRAM) c ,__ C PROGRAM NO. 0850 c C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE P5, TP5, NSEX, NREG, C INT, NT, RNG1, AND NWRIT. c THE OUTPUT ARGUMENTS FROM THIS SUBROUTINE ARE CDMLT, CBRM, CBRAM, C AND CDRAM. c P 5 IS THE POPULATION AGED - 45 IN FIVE YEAR AGE GROUP. c TP5 IS THE NUMBER OF PEOPLE IN THE TOTAL POPULATION. C NSEX IS THE CODE INDICATING THE SEX OF THE POPULATION. C NREG IS THE CODE INDICATING THE COALE-DEMENY REGION BEING USED. C RNG IS THE RATE OF NATURAL INCREASE OF THE POPULATION DUBING THE C LAST INTERCENSAL PERIOD. C INT IS THE NUMBER OF YEARS BETWEEN THE LAST TWO CENSUSES. C-- NT IS THE NUMBER OF YEARS MORTALITY HAS BEEN DECLINING. C RNG1 IS THE RATE OF NATURAL INCREASE OF THE POPULATION BEFORE THE C MORTALITY DECLINE BEGAN. C NWRIT IS THE PRINT OPTION. IF NWRIT = 0, THE OUTPUT WILL NOT BE c PRINTED. IF NWRIT EQUALS ANY OTHER NUMBER, THE OUTPUT C WILL BE PRINTED. C CDMLT IS THE COALE-DEMENY REGIONAL MODEL LIFE TABLE GIVEN AS C OUTPUT. C CBRM IS THE CRUDE BIRTH RATE CORRESPONDING TO THE MEDIAN STABLE c POPULATION. CBRM IS GIVEN AS OUTPUT. c CBRAM IS THE CRUDE BIRTH RATE CORRESPONDING TO THE MEDIAN STABLE c POPULATION AFTER THE ADJUSTMENT FOR THE EFFECT OF DECLINING c MORTALITY. CBEAM IS GIVEN AS OUTPUT. C CDRAM IS THE CRUDE DEATH RATE CORRESPONDING TO THE MEDIAN STABLE c POPULATION AFTER THE ADJUSTMENT FOR THE EFFECT OF DECLINING C MORTALITY. CDRAM IS GIVEN AS OUTPUT. c c DIMENSION P5(9) , CDMLT (18,8) ,B(101) ,SA(49) DIMENSION PCUM(9),NAGE(2,9) ,SP(18) ,SPC(18) ,SPM(13) ,S (49) , * EOX(101) ,CDRX(9) ,CDRA(9) ,CBRX(9) ,CBRA(9) ,GRRX(9,4) ,GRRA(9) EQUIVALENCE (S (1 ) , SP ( 1) ) , (S { 19) ,SPC(1)) , (S(37) ,SPM(1)) NPRNT= 15 MFLAG = ONECN 301 ■VERIFICATION OF INPUT VARIABLES NERR= DO 5 1=1,9 IP (P5 (I) - 1. 0) b,5,5 5 CONTINUE GO TO 30 6 DO 10 J=I,9 IF (ABS(F5(J)) - 0.00001) 10,10,20 10 CONTINUE GO TO 30 20 WRITE (NPRNT,111) 111 FORMAT (//46H *** ONECN ERROR NO. 0851 -- INPUT ERROR IN P5, */,55H *** ALL FIVE YEAR AGE GROUPS MOST BE GREATER THAN ZERO) NERR= 1 30 TOT=0.0 DO 31 1=1,9 31 TOT=TOT+P5(I) TOTP=TOT/TP5 Z4P=P5(1) /TP5 IF (Z4P-.05) 40,45,45 40 WRITE(NPRNT, 222) 222 FORMAT (//49H *** ONECN ERROR NO. 0852 — INPUT ERROR IN * /,62H *** PERCENT OF POPULATION UNDER AGE 5 MUST * THAN 5%) NERR=1 45 CONTINUE IF (TOTP-0.45) 46,46,50 46 WRITE (NPRNT,223) 223 FORMAT(//46H *** ONECN ERROR NO. 0853 — INPUT ERROR IN * /,64H *** PERCENT OF POPULATION UNDER AGE 45 MUST BE *HAN 45X) NERR=1 50 CONTINUE IF (PNG + 0. 01) 60,55,55 55 CONTINUE IF (RNG - 0. 05) 70,70,60 60 WRITE (NPENT,333) 333 FORMAT (//47H *** ONECN ERROR NO. 0854 — INPUT ERROR IN RNG, * /,66H *** RATE OF NATURAL INCREASE MUST BE WITHIN RANGE *1 TO 0.0 5) NEKR= 1 70 CONTINUE IF (NSEX - 1) 150,160,75 75 CONTINUE IF (NSEX - 2) 160,160,150 150 WRITE (NPRNT,777) 777 FORMAT (//48H *** ONECN ERROR NO. 0855 — INPUT ERROR IN NSEX, */,34H *** SEX CODE MUST EQUAL 1 OR 2) NERR= 1 160 CONTINUE IF (NREG - 1) 170,800,165 165 CONTINUE IF (NREG - 4) 8 00,800,170 170 WRITE (NPF.NT,888) 888 FORMAT (//48H *** ONECN ERROR NO. 0856 — INPUT ERROR IN * /,69H *** CODE INDICATING THE COALE-DEMENY REGION * 1, 2, 3, OR 4) NERR= 1 800 CONTINUE IF (INT) 810,120,810 810 CONTINUE IF (INT-5) 820,100,820 820 CONTINUE IF (INT-10) 80,100, 80 80 WRITE (NPRN?,444) 444 FORMAT (//47H *** ONECN ERROR NO. 0857 — INPUT ERROR IN INT, */,53H *** THE INTESCENSAL PERIOD MUST BE 0, 5, OR 10 YEARS) NERR = 1 100 CONTINUE IF (NT - 5) 110,105,102 102 CONTINUE IF (NT - 40) 105,105, 110 110 WRITE (NPRNT,555) P5(1), BE GREATER P5, GREATER T -0.0 NREG, MUST EQUAL 302 DOCUMENTATION 555 FORMAT ci s s % £ s g IC IC ; J * 2 " " ^ S ~ g £ ^ ° O O g O o s id a- a- * d- tr> *d M> M» s u> v» iO ID (*k m s «> m S s a- S i- s- s 5 — — s — ~ s K «*> ro s m l*i s S Oo 00 £ Oo Oo a S «*\ l*> S fO «> s 5 5 s K ? s s s a 8 s 3 s CVI CM s Of CM s 3 in U\ ? «n in 3 3 <»» f> 3 ff> o 3 5 O o 5 O o » * i^ r>- ■s l^ >>• 3 3 * a- 9 *• 3- ¥ ? 3 3 3 5 V 5 s V V 3 3 r-» r^ 3 i>~ f>. % S o- o- S o- o- s s co Oo s Oo CO s £ U> lr> s in m R S r- (^ £ f^ r~ s S in in s m m £ "S S ■*> s 5 s ~ «o s S 2 O O 2 o o ° R © O s o o " 5 19 is s iS IS S R CM CM <— s s CM r~^ CM a S — — o s -» — s £ — r- m ~ r^ — — s t^ in o r~ £ a s 00 S 8 — UJ — aj — s O -~ 3 S ~i -1 s £J «** CD O CD o 3 Or S s *• in m O ^> m s V* »- o- K CM r^ «- 1- CM *- a- en o s- * to o ~ i- a- e: * 1- 2 s Ul o t^ . • o t^ i • - o rv uj o r- 2 id -J m ft 1-1 «» m M s n i*> >t IO 2 2 CD CO CM V> o Oo CM VI o 2 00 CM h- 0» CM 2 s o- o «*J 2 1- !*> 2 2 \-. » 0> \-y Oo v^ Oo 2 v^ Oo 2 o o» ir> — 0» in — 00 2 w> — Oo m. — 2 o. te o — — • O er O — — <£ Ce o — o. — l» or O — — <& o, - n "» OJ m Oo M •n OJ fO Oo M «\ CVJ - f> oo M K> OJ m CO » » z "«k ir* o c* z en m u> v» Z •*» Ul * vS> s» Z l»» in O O ^ .D Ul o if> r> f> Ul o ■o r*- 1^ Ul o ir> *. r- r~ MJ o ir> t^ r~ ID ■ > > o- OJ > • o- OJ > . ™ o- CVI > • o- ej ~ • O S => * => » « o a- O a- O 3- t" O a- «, ~ l/> CO ^, c/> ~ - OJ OJ CM - Of - r \- •J 1— Ul in t 306 DOCUMENTATION 05 OS 13 1 1 1 CTi (N 1 1 1 03 Q U OS m u O ^^ W M 5= > O M H EH E-i •4 03 -3 O D Cm a o H s « D U Cm Cm Eh S ss o ■-3 o EH •4 H u w ^ S H hJ to W H -4 Cm t-3 O >-l S +> ffi H O «e (0 •at « Cm (0 t— EH O O l/> Cu « > o o cnvocnsj-cftT-r^r-cN • •••••••• enencnenenenenencn r***cNa-sj-a-fft^ • •••••••« cNCNorococNtNCNtN r-if)PO*o»-r--vOT- © ^ ^" f— t - T-T-T"^ ooooooooo ooooooooo OOOOOOOOO ooooooooo ;»roC'NP000:*CNsr<*O oia-tNr-oororsjcMfn voininminu-iininin \©|-.v0©mm' r >< 1 OvO T-ro.*mvO{— p»coco • ■••••••• ooooooooo ini»©c«cNoo©«-in r-r^Oenin^^vOCT) rO;»\©00< r )t-vOcO* \00 ciT-r- r«.o>fMr»f) r- i- CM CN en ro a- I I I I I I I I I omoinomom© fnmin icop , > • P0*t— * & r- & ff) f) G\ f*» © © © CN ••«••• in • • > M Cm X Z 6J o H W H Cu, .4 h hh *h s Cm S5 o «a Cm h Q • M H f> i-J E CO oo CO «J o r- EH EH CN Ul in to m >H X SB H pa a a sb pa o Hi Q Cm ■4 i tn EH M W O ►J od H «< 03 o o o o 33 M P9 M EH EH H EH 03 «! <4 rt! H 03 03 03 oa D3 SO 33 EH H EH H •4 at « <* OHM O O SB u u «4 U H H E-t H W VJ O CO SB SB H SB H H Cm H 03 03 M 03 Eh EH CO Eh 2 Z SB H H H H Am H ►J 04 cn IS * •4 I in M r- •4 W 03 O H 4 > 4 z O H EH 03 O Cm O 03 Cm 0\ CTt * sr * in i i i m in o t- *- o H H EH H •4 03 hJ O a a. s o S 03 U Cu sa o M W EH U 03 >4 O Cm SB O M 03 Cm Cm O Cm CO j* v© r- 00 O * CN o\ cn * r» • • • • H ss cn cn en en a h OK61WWW 14(9000 pa «a «* .4 < as oo O a EH Eh EH EH U H C4 33 03 L> 33 Pm EH O D aa to cs •4 H sb as pa <4 a u pa a a 1 03 Pa o -A Pm ■4 O 03 U 03 oa •4 srr»oin«o ^-«-a>cNvocNinminvo^*o>'"o ©r-i T >a , mM3r^r~aoooa*CKC<\o'»o»cy!C<>o OOOOOOOOOOOOOOOOOt- ^rocNinr^r^POCNOincNomr-tNOcNm T-Ot^ronvOCNOO'--»'CO'Nt~roCMin< y, » *s»fNocor»«inai»iN(Mi-' , ooo o^-*-«--*-ooo©ooo©©©ooo ©©©©©©©©©©ooooooo© tf0i99t»O\tf9l9m?^4;a> r-^aiT-tr-cNfNfnroa-^ininvOvot^t^ I I I i> I II' I I ,| I I I I I I I + «-in©in©in©in©in©in©in©m© »-r-cNcNPOi i osi'»ininM3vot , -r»co ONECN 307 H x mo>mr»N«om(»)t-oo«»^»(or«»"- *^ •••••••••••••••••• ro*-OOrOr^' T >vO«r»VOOOtf^094'(NT> X f)r»O*» X -fN3 , ©*Cir , ->0 o • H M d >-] w (»)rM»-r«r»irooroofMT-T- «: x fN^-int-omoor^wfN^fioaioor*^© Eh i-j mS'-fOO^OOBhiOininohr*!- 00. V) D rO»»*3 , ClClfOff|fn(>)' , 1fllNNr-i- Du 04 O U> H ►J 10 •••••••••••• as ,-j «s o*r-cNair»3 , '-oo(Nao»-vetno(Nooo H E >h <— . OOiOI^Oi(Nio*(Ninr<'inifi'aini«>nin OQ3 O » m ©oocooocoaooor»r»t>r«f»^*oins»-co»Cr-mooOT-OOvO^C3^T-mrr)(NvC^-rN M< «! ..a x t-votNt-fNPomna-^ifioor-a^fNr^ooa' O << w i— t— OOOOoOoOOOt"^"^!!^)^^ OX O B I-OOOOOOOOOOOOOOOO'- u o W 85 F^| M — rf M »/\ ^— \ !*« A. Al MA -» . «•% CT» _ (IN ,-»* i-*t Art -A f»k. i/N rninovoaitNro^vooot-aicnocD^r^Lr) © If) »- i-l-'-r<-OIO)l , >lOIDN*(N — Mi ■— fM a, Q MX t- »- »- CN so ^ o t- o o o © o © © © © o © o © — ■ cs << (N B •** H 03 H « CO U> M a CD OS << a EH u to M 03 to co 4 u D o< ehoo^inr»«-oo r» »m tMin*oor- • •••••••• co om* **;nn © ^- ^ f t— *-^T- OOOOOOOOO • •••••••• ooooooooo (Nin^-oivor-om rMjsrt^ooooeocricn ooooooooo ooooooooo oa « 15 i as i > i (N 03 P U 03 CQ U o *-* w K| SB > o H H E-l EH < K J O O Cu ^^ « o in O 03 U a. M i-) co 35 «« i-) o EH «l M H 10 5E Eh H 1 H «* CO H Cfl i-4 CO H O >o «* 03 CM a D O O CN a tu 83 M > S o CO eocirotowjno env©ro*'>CN s*oooo f >h'ic>oh • ••#••••• cof^onororonorofOco f-*srcN*sj-*POin «s , »*«r • •••••••• lOcO^Ovoror^vOro Nino>Okoovotoo o^i»-T»c>j • •••••••• \otocom9r>^eico tNa-\or»a-coininco coanoooc^cnoAc^ • •••••••• tNtMCIrofnfMfNJtNfN ©T-^-»— »— ^ ?- 1— »— OOOOOOOOO • •••••••• ooooooooo r-m^iii-ot-r-vo^ rsi^^vjOvDtnsra-m ooooooooo • •••••••• ooooooooo *roa\poco*(NvO T-rnjj-mv0r-r>eoco • •••••••• OOOOOOOOO uiJa-or^oa>in*s*voen \o o in m o ro fo \o r> t- t^nT-r^r^oofvir-ro vor-inu")^in • nosf*" # sfr »^ ^ ro ro cnj r» o o o r>) to 03 M E-t w 93 «B 03 «S Ou a EH 03 H 03 EH «* X U SB Ml EH (J W SB U > o 04 SB H H X o EH 6H as w H «C 03 o EH 1-4 O H W «ai S 04 EH Ck i-J S3 O «S H P a 3 03 -) -J 04 tJ U 04 D o < Qj SB Cm S O «S a SB Oi H 6-. o Q M H W • M M HH EH CS X DO «S U H H EH H CO CO U CO SB SB HBHH cm h oa 03 M 03 EH EH M EH S3 SB SB M H H M h H • CNOOOOOO Men eg =r •4 I in M «- U> < M 03 C9 > en c* * ♦ » ill i m in o • m O • • » 04 • 04 04 04 04 o o o So 04 04 04 * Cm w\T ^ to in a\ in + a I m EH 03 m • vo 03 M Cm M Q o O • a as cm 04 04 o o o 04 Cm Cm + O Cm * M O ►J H 03 C9 t M EH 03 a H H Cm O H O tJ CO CO * VO T- eoosN o> cm » r~ • • • • fN rr, PO ro CS f» 0> T- CO a cn pm ro ro H 03 M M W M < u u o u a «« ^ < »si a Q EH EH EH Eh »4 oin it-»-MO' , oininp»o r-r-CT>CN>OOMinininvOT-avr-CPiC>JT-voO »oo(Nini/i»T-r>rMvoor^P0tNOin(NOinr>rMorit-r-ooo 0«-«-«-«-0000000000000 oooooooooooooooooo 3-a-a>a-<7i3-cr>si-cTia-cna'CTi r-^o\»-T"CN'> i I I l I I I i I I t I l I l I I ♦ rinomoinoinomoinoinoino ^•r-cMCNnrojj , 3 , ininvovOf>r>a ONECN 309 O a as w EH Mi to « H W a < 03 «a Oi S5 o H EH O i-1 => O & H -I oa ■vD ct> f») CO *ri O^r . lOOfl o . • m o o II il H il W aa HWMH -J i-l .-I C-i CQ CO CO U O O «J W EtHHOi to to co ts t i i H H H H 10 10 10 W io «i «a en o n o h to w Eh «a a H EH VJ H H ►J OQ «S H to I M to «S D OI O Eh Q 25 o Oi to w 03 03 o u CQ «a EH w Cu H -J u a o E >H SB w a H Q I eq >-3 «S o u 85 O H w u •J w CD 03 eh aa EH HtOB hHO H hh to a H a w ss o a Q W H P 03 I co w <1 o u X! H Eh to cuoocor-voromcooof.voin a- r» no in in NNTr ocof«o ,T i*i-ini , ir»i/if>'')04 , '*i s vo r-00*«)lpC0*l/1OT-(Nla , T-vO in* - ^mvooocr>or--d"r-crv*rorv)crir~CT> ooioiTi»-in*oun~cii-fnoifno^incn nai-<-r-(N*iom«-r*' r >cT>incNCDincNcT>\o=3*cN OC0i-!>lc0N*a*^aT-C0r-T-ifi<0 i^'-coo»>-N(NiNO(Nina'\o(Nmo o*mi~[NCfir«ifl tN icocft' r )^*3'd , t~- in*oooooor»r«.r»-r~^Jin*«-vooovo' _ COCT*CT»C?*Cr*CT»CX»icoa-' T )vornsr'-\D NINOOMNOI/liONC03'hM^(NinvO o - >OvOCT>r , »t^'CT*cr>rN( r >r-a - T— © CM CN f- C7> fNiroT-inonmr~cooof^roina^»-o^incr> chnofficftcorNvomwfOMor-^coNco (»1a-rOfyinnr0fnr0' r 1' , 0f , 0(NtNr-T- ooocoincoocrirococnoinror-^a'vo^' oaicooinint-a'aiOMKKNa-eonins OfO*M(io' r iuir i mf , )'"Cinococo* OCDT-criCOr^^oa-r^Oao^oioocNrot-oo ooocor>>p^t^t-»r--r^r~^oya'X)tnina , dT- moi^-JJ-cricn^oinr-O'-oocorj-cDOinr- (DlfllOi-00ia , MNOO*»D3 , vO' T HOO r^t-rorMrorod-^mvor-cnrotN^m^oin (NCNOOOOOOOOOO'-CNro^OOO «- ooooooooooooooo»— cm fNOfNoor-' - vflinaiooai'Nvoi Y ioco(\3' ou>ci*o'»ir^s , cocovo' , it s -voinr^'-a' COr- ^KKNKHOMDO^rr CN CO <^ ^ cf r- f~» i— r-i-i-t-i-iN(N^^VOcO'-' , llO (Ncor^inmst-maocNror^coinmaotncNO Or-'£)v£)f , 0r^O=tOLn=I'fNr-CNCn r NOO ooi— r~oi-Ocr\rM' r i^ocr>rtr^vovoi^f T it-o i-COT-rrtNNNtNn^vDOvoM^O '-O00000000000' _ r- < |lfi 91 O O ifl ©t*>r»ur>cn o H H E-t Eh «£ 03 ►J o ^■^ O.Cu o E O «— O 03 U Cu w ►J 09 2 < Hi O H «U M H CO Z E-t « 1 H «S W H O .-J OT H O -d «fl 03 Cu u S o o « H a W > s o w CM • •••••••• rr> {V) rf) fr) pr> p^ n PO ro sw*int-*oo* ojpoinminsi-s)-*** • ■••••••• mooi^ovofnr-vooo Min9iotso\oifio 0^rv«(T)(N(N«-T»fM • •••••••• popopopopopopopop'") (Ntfior-tfoominoo • •••*•••• (NrMrororOrMOJCNlfM r^inPOit-o^r^io^- O^T^^r-T—T^r- i— ooooooooo ooooooooo r»if>' r i*0'— r^vo»- po to to \o in 3 ^ m ooooooooo ooooooooo CFiSfCNr-COPOPM.^JPO T-coinmmr-cocor~ id ui ui in in in in in in a3m-=r=rtoen naiooofirwa)* lOOMinotoroioh ericor-insj-rororvirvi 1- I- N M K) fO » I I i I I I I I I OlflOlflOlflOflO T- i- CN C\l P0 P") =r a OMtN iooi«-mmT- in eiromo)r*000>nfl • PO sf *™ • ^ ^ tf f*) fl CT> <-» O o o h a a h w a s a oq O Pu- ►J Q 04 ts «ti 1 w «0 EH M W O ►J U3 ' EH •4 03 O O u u maww EH EH Eh EH 03 *S aS "0 H 03 03 03 CO sb co a EH 6H EH EH OHM X 03 CO Q U Cfl a u U < U M H HHtOtO UVIZZ w a H H Cu H 03 03 W 03 EH EH w eh a as a h h W M Pu H ►J ID * < I in w •" ft H 03 U cq «* a o H EH 03 O o 03 cu Oiffl* a- a- in i I i m m o r- *- (N Cu Cu Cu O O O Cu Cu Cu \ \\ Biinm a I H 03 m 03 K) H Q • n zoi » o 04 • Cu o cu + St m \o i • in 04 i- o Cu • •• Cu H \0 >A =r a. in *- ■* in + in • UO H Cu Pu O • HH Cu CU J o Cu I o CO sj- VO r- 00OS>IN Oi (N «* r» • • • • cn m ro po ij o r- en r- pr> w a cm rvi ino\i-t-io'*iininr>o »-T-T-CT>tNt-v£)0 si-cor\)ininsr^ , r-(NioocNinioo OoOOOOOOOOOOOOOOOr- srpo(Ninr»p»ro(Mom>'MOinr«fNorMP r ) «-op~np r )korsoo»-srcofsr--pncriinPO =r=rsj-(NOoor^^>mcj-POiN(NT-»-ooo O^-T-r-t-oOOOOOOOOOOOO OOOOOOOOOOOOOOOOOO =j-cr>sro>*cria , aisrcn3 , c«srcn »-srcsT-t-rMCN(nP0a-*ininy3vop«.t»' i i i I i i i i i i • i i i I i i -f rinoinoiflomomomoifloifio T-r-rviojpoPost^mmvouor^r^co ONECN 311 o p as M EH -=C w « w H W S J -) W ft O & tM BS W S3 w Q I W o <-] CO «] Eh W 10 i-l < qua X EH to XI a cq P I cq •-J T-inr»vo>o^©oor»'OOCT>r^*-v©cT*\onor»-T-< r >ro=3'r» aio^stLnrMrMor~r^r~r*ocNoocokOT- rNcnaoPOrot~»i>»ror^vo»- lOmNfOWOlOr-rol^i-lOCieHOlflT- miftifiitanrnfnoicNNr'-T- oooaou">r-»oor-copoi— oorooc*u">a>*- ai*OOCT>infN«-CTi^O(NrocTti 1 OvOOrOf r l \ou">cocooooooor^r»r»»e;i-tNr*ooo< r > O\n00inon0 00MOC0 00M»d , UT-r-<- oO(NOaocr»'-inir)r--(Ni , OL r iir)oocria>p~t-- cojj-st^ii-rorOHirococomroCNcN'-T- oaomoOvo^rooooomtNT-cMtNvoo'- ovDinooavmirvo*ir)r s -*o*rMot>-ror»ao\OT- OoococotDoOr«r>l v 'Nr>r«io>oind-rooi rMOC~»t^^-(NvOCTiir'-T-vors|«-(Ni-r^sJ- ^r*(N r- (Nrororos-in^ooocNOcoooaivo r-T-OOOoOOOOOOr-CNPOinocn r-OOOOOOOOOOOOOOOOr- COt"»<"MCN« _ ' , ->OcNu"ICN©0^0\0\00> T-=ro»-oa-ir^oaooo,ooo>mffvir)o r-OOOOOOOOOOOOOfCNcn© OOOOOOOOOOOOOOOOOf- or-inoin©inoinoin©inomoin© t-r-f\j fN rr, © O O ff> CD o o oo in l» m o 03 O w o IS3 O 55 O < o S3 vO EH N .OO j3 to oa Cu o +J W (M W SS a- En H > H — ' H II SB M SB II || II H « O U II M U I II r H H « h-1 Mil m H M U H II O « SB sbi-1 sain Ojiowzseehsb* M 0«4 OCu RIZg«Ha«S5 t> » * * o » # to # # PBEER I. DESCRIPTION OF PROGRAM A. PURPOSE To print out the results of the BEERS subroutine. This subroutine is used only in connection with BEERS. It is advisable to read the documentation for the BEERS subroutine for a better understanding of PBEER. B. DATA NEEDED 1. The qrouped data that was separated into five parts. 2. The number of groups that were subdivided plus one. 3. The values resultinq from separating the qrouped data into five parts. 4. The number of subqroups obtained from the qrouped data plus one. 5. The year pertaininq to the loner bound of the first qrouped data to be subdivided. II. METHODOLOGY This is a print subroutine. It prints out the informatioi supplied to it. III. MAIN PROGRAM A. REQUIREMENTS The main proqram is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main proqram can use a subroutine alone or in conjunction with othar subroutines. For a detailed explanation of writinq main proqrams usinq more than one sub- routine see the Appendix. 1. CALL statement Once the main proqram has obtained the data required for the subroutine to do its calculations, the main proqram transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main proqram. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL PBEER (P, NP5, N P1 , P1 , IVAL) For the purpose of emphasizinq the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be sinqle-valued or refer to a qroup of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the nain proqram. For this subroutine variable names F, P and ASFR in the argument string are all arrays. The following DIMENSION Statement must be included in any main pro- gram usinq this subroutine. DIMENSION P(99) ,P1 (491) 313 314 DOCUMENTATION B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION HITH THE PHOGRAH, See BEERS C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE HAIN PROGRAM GIVEN IB SECTION V.A. See BEEFS IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines beqin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument strinq enclosed in parentheses. This subroutine beqins as follows: SUBROUTINE PBEER (P,NP5,NP1,P1,IVAL) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition NP5 NP1 P1 IVAL Transferred In Transferred In Transferred In Transferred In Transferred In Input data in qroups that were to be separated by BEERS into five parts. Number of qroups that were to be subdivided by BEERS plus one. For instance, if 16 5-year aqe qroups were separated into sinqle aqes, this arqument should be 17. Nunber of subqroups obtained from sub- dividinq the qrouped data plus one. For instance, in a population distribution of 5-year aqe qroups from aqe to aqe 69 with an open-ended qroup 70+, NP1 will be 71. In qeneral NP1=5 x NP5-4. Results of separatinq the qrouped data into five parts - there are NP1-1 resultant subqroups plus the last NP1 value which is the open-ended qroup and which also is the same as the last value in the P array. The year pertaininq to the lower bound of the first qrouped data to be separated into five parts. For instance, in a population distribution of 5-year aqe qroups from aqe to aqe 69 with an open-ended qroup 70+, IVAL will equal 0. C. ERROR MESSAGES None PBEER 315 V. PROGRAM AND RESULTS A. COBPOTER LISTING FOR BAIN PSOGRAB See BEERS B. COBPUIER LISTING FOR SUBROUTINE c c _ SUBROUTINE PBEER (P,NP5,NP1 , P1 ,IV AL) c C PROGRAB NO. 0880 c C THE INPUT ARGUBENTS TO THIS SUBROUTINE ARE P, NP5, NP1, P1, AND C --IVAL. C P IS THE GROUPED DATA THAT HAS SEPARATED INTO FIVE PARTS. C NP5 IS THE NUBBKR OF GROUPS IN P. C NP1 IS THE NUHBER OF GROUPS IN P1. c pi is THE OUTPUT OF SUBGROUPS. C IVAL IS THE YOUNGEST SINGLE YEAR OF AGE OF THE DISTRIBUTION TO BE C SPLIT UP. DIBENSION P(99), P1(491> NPRNT=15 C VERIFY NP5 AND NP1 INPUT VALUES c C IF (NP5 - 99) 4,4,160 4 CONTINUE IF (NP1 - 491) 5,5,160 5 WRITE (NPRNT, 90) C c C PRINTING OF P VALUES DO 30 1=1, NP5 NAGE=IVAL+5* (1-1) LAGE=NAGE*4 IF (I-NP5) 10,20,20 10 WRITE (NPRNT, 100) NAGE,LAGE, P (I) GO TO 30 20 WRITE(NPRNT,110) NAGE, P(I) 30 CONTINUE -PRINTING OF P1 VALUES IRITE(NPRNT, 120) N=NP1/4*1 N1=N DO 80 1=1, N N1=N1+1 N2=N1+N N3=N2+N IAGE1 = IVAL ♦ I - 1 IAGE2 = IVAL + N1 - 1 IAGE3 = IVAL ♦ N2 - 1 IAGE4 = IVAL ♦ N3 - 1 IF (N3-NP1) 50,60,70 50 WRITE (NPRNT, 130) IAGE1, Pi (I) ,IAGE2,P 1 (N1 ) ,IAGE3,P1 (N2) *,IAGE4,P1 (N3) GO TO 80 60 WRITE (NPRNT, 140) IAGE1,P1 (I) ,IA3E2,P1 (N1) ,IAGE3,P1 (N2) *,IAGE4,P1 (N3) GO TO 80 70 WRITE(NPSNT, 130) IAGE1 , P1 (I) , IAGE2 ,P 1 (N 1 ) , IAGE3, P 1 (N2) 8 CONTINUE GO TO 180 90 FOBSAT (////, SOX, 20BGROOPED DATA (INPUT),//) 316 DOCUMENTATION 100 FORMA1(47X,I4,1H-,I4,8X,F10.0) 110 FORMAT (49X,I4,1H+,10X,F10.0) 120 FORMAT(///,33X,60HGROUPED DATA AFTER DIVISION INTO FIFTHS BY BEERS * MULTIPLIERS,//) 130 FORMAT(11X,4(I4,4X,F8.0,9X) ) 14 F0RMAT(11X,3{I4,4X,F8. 0,9X) , 14, 1H>, 3X r F8. 0) 160 HRITE(NPRNT, 170) NP1,NP5 170 FORMAT ( //,54H *** PBEER ERROR NO. 0881 — INPUT ERROR IN NP1 OR N *P5,/,71H *** NP1 AND NP5 MOST BE LESS THAN OR EQUAL TO 491 AND 99 ♦RESPECTIVELY,/, 11H *** NP1 = ,I5,5X,7H NP5 = ,15) 180 CONTINUE RETURN END C. SAMPLE DATA See BEERS D. SAMPLE OUTPUT See BEERS PKREG I. DESCRIPTION OF PROGRAM A. PURPOSE To determine which regional pattern of survival rates in the Coale-Demeny regional model life tables has the smallest difference from a given pattern of survival rates, for a particular sex. B. DATA NEEDED 1. An indicator that determines whether the subroutine should write out the results of its calculations. 2. The given survival rates to be compared with the Coale-Demeny Hodel Life Tables. 3. The sex to which the survival rates pertain. 4. The life expectancy at birth corresponding to the given survival rates. II. METHODOLOGY A. MATHEMATICAL DERIVATION The given set of survival rates are used in calculating the following ratio of the survival rates. RG =^±2_ 5 X 5 S x where 5 S x is the survival rate of age x,x+5 surviving to age x+5,x+10. For each of the four Coale-Demeny Regions the life table is generated for the sex and life expectancy at birth that is given. Then the ratio of the survival rates for the region are calculated. For the West region the ratios of the survival rates would be S w RW = ^L_x±L_ 5 x „w 5x where w S is the survival rate of age x,x+5 5 x surviving to age x+5,x+10 from the Best Regional Hodel Life Table. C RN , C RS . and C RE are calculated in the same manner 5 x 5 x 5x for the north, south and east regions, respectively. 317 318 DOCUMENTATION The differences in the ratios of the given survival rates and those for eajch of the model life table regions are calculated for each age group. For the west the difference in the ratios would be C RDW = RG - C RW 5 x 5 x 5 x ,-RDN , ,:RDS„ , and ,:RDE„ are calculated in the J X J X J X same manner for the north, south and east regions, respectively. The averages of the absolute difference in the ratios are then calculated. The average of the absolute differences for the west would be w-5 n-l t* 1 , where RDMW = — *r- 7. LRDW m " 1 x^5 5 X m is the number of survival rates, w is the lower bound of the last survival rate. RDMN, RDMS and ROME are calculated in the same manner for the north, south, and east regions, respectively. Then, the minimum value of the average of absolute differences, the minimum value of RDMW, RDMN, RDMS and RDME, yields the region with the survival pattern most closely resembling the pattern of the given set of survival rates. B. COMMENTS This subroutine can be used when making population projections. It determines the Coale-Demeny Model Regional Life Table pattern which most closely resembles empirical survival rates. Once a region is selected, the empirical or given survival rates can be adjusted by using the procedure explained in the subroutine MORDJ. III. BAIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL PKREG (SURA , NWRIT,EO, NSEX, NREG ) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the main program. PKREG 319 For this subroutine the argument with the variable name SDRA is an array. The following dimension statement must be included in any main program using this subroutine. DIMENSION S0RA(17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION KITH THE PROG RAH. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package a. MLT b. LIFIT c. ABREV d. ELT e. GTCON 2. Library functions 1. ABS (absolute value) 2. SQRT (Square Root) 3. Card diagram of main program and subroutines CARDS INDICATING END OF DECK / / INPUT DATA /| COMPUTER CONTROL CARDS /| | SUBROUTINE~GTCON~" " ~~/\ \ \ / / III/ SUBROUTINE ELT SUBROUTINE ABREV "sUBROUTINE~LIFlf SUBROUTINE MLT /III/ / III/ /III/ / I I I/ /III/ / III/ /III/ ./III/ SUBROUTINE PKREG / / MAIN PROGRAM /III/ / III/ /III/ ./III/ COMPUTER CONTROL CARDS BEGINNING OF DECK /III/ ./I I I/ I I / I I/ I / I/ / I/ C. FORMAT REQUIREMENTS FOR INPUT DATA CARD FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition I 1 1 | | Blank 2- 53 | I Label used to ident LfY the output. 5**- ■80 | I Blank 320 DOCUMENTATION 1 INXT 4-6 7-12 13-80 1-8 9-16 73-80 1-8 9-16 49-56 57-80 NWRIT NSEX EO SURA SURA The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. Any other digit punched in column 1 indicates another set of data follows this one. The write indicator. If a zero is punched in column 2, the results of the subroutine PKREG will not be written out. If any other number is punched in column 2 the subroutine PKREG will write out the results of its calculations. The sex for which the survival rates are given. A one punched in column 3 means the survival rates are for the male population. A two punched in column 3 means the survival rates are for the female population. Blank The life expectancy at birth for the given survival rates. The decimal point should be in column 9. Blank The survival rate from births during a 5-year period to ages 0-4. The decimal point should be in column 1. The survival rate from age 0-4 to 5-9. The decimal point should be in column 9. The survival rate from ages 40-44 to 45-49. The decimal point should be in column 73 . The survival rate from ages 45-49 to 50-54. The decimal point should be in column 1. The survival rate from ages 50-54 to 55-59. The decimal point should be in column 9. The survival rate from ages 75+ to ages 80+. The decimal point should be in column 49. Blank The variable SURA always reguires two cards. Both cards must always contain data. The first card must contain ten values and the second card can contain between 3 and 7 values. The last survival rate given must always be the survival rate, for the open-ended age group. IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE PKREG (SURA, NWRIT, EO, NSEX, NREG) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition PKREG 321 SURA NHRIT EO NSEX NREG Transferred In Transferred In Transferred In Transferred In Transferred Out Set of 5-year age-specific survival rates from an abridged life table. The first survival rate is from birth surviv- ing to ages 0-4. There can be a maximum of seventeen survival rates with the last one being the survival rate for the open- ended age group. The minimum number of survival rates that can be given is 13. If less than 13 survival rates are given, error message 0913 is written out and the subroutine will return to calling program. Write option. If NWRIT is zero, the sub- routine will not write out the results of its calculations. For any other value of NWRIT, the subroutine will write out the results of its calculations. The life expectancy at birth that corres- ponds to the given survival rates. It must be greater than or egual to 20.0 and less than or egual to 80.0; otherwise the subroutine will write out error message number 0912 and return to the calling program. The sex for which the survival rates are given. A 1 indicates males and a 2 indicates females. For any other value, the subroutine will write out error message number 0911 and return to the calling program. The region determined by the program to have the pattern most closely resembling the pattern of given survival rates. C. EBROB MESSAGES 0911 *** PKBEG EEROR NO. 0911 — INPUT ERROR IN NSEX *** ERROR IN SEX CODE. NSEX SHOULD BE 1 FOR MALES OR 2 FEMALES. FOR 0912 *** PKREG ERROR NO. 0912 — INPUT ERROR IN E0 *** ERROR IN LIFE EXPECTANCY AT BIRTH. EO SHOULD BE BETWEEN 20.0 AND 80.0. 0913 *** PKREG ERROR NO. 0913 — INPUT ERROR IN SURA *** EEROR IN SURVIVAL RATES, LESS THAN 13 SURVIVAL RATES GIVEN OB ONE OF THE INTEEMEDIATE RATIOS IS LESS THAN OB EQUAL TO ZERO. V. PBOGBAM AND BESULTS A. COMPUTEB LISTING FOR MAIN PROGRAM c c C MAIN PROGRAM FOR PKREG c c I THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN THREE READ C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C C THE FIBST BEAD STATEMENT OSES ONE DATA CARD. C THE PUEPOSE OF THE FIEST BEAD STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF Z ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE 322 DOCUMENTATION C INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET c . FOLLOWING THIS ONE AND (2)THE WRITE INDICATOR (NWRIT) WHICH C DETERMINES WHETHER THE RESULTS OF THE SUBROUTINE PKREG SHOULD BE C WRITTEN OUT, (3) THE SEX (NSEX) TO WHICH THE SURVIVAL RATES C APPLY, AND (4) THE LIFE EXPECTANCY AT BIRTH (EO) CORRESPONDING TO C THE SURVIVAL RATES. C NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 c INDICATES THIS IS THE LAST DATA SET. ANY OTHER DIGIT c PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA c FOLLOWING THIS ONE. C NWRIT IS IN COLUMN 2 OF THIS CARD. A ZERO PUNCHED IN COLUMN 2 c INDICATES THAT THE RESULTS OF THE SUBROUTINE PKREG ARE NOT c T0 BE PRINTED OUT. IF ANY OTHER DIGIT IS PUNCHED IN COLUMN c 2 THE RESULTS OF THE SUBROUTINE PKREG WILL BE PRINTED OUT. C NSEX IS IN COLUMN 3 OF THIS CARD. A ONE PUNCHED IN COLUMN 3 c INDICATES MALES. A TWO PUNCHED IN COLUMN 3 INDICATES c FEMALES. C EO IS IN COLUMNS 7-12. IT SHOULD BE ENTERED SO THAT THE VALUE C HAS A DECIMAL POINT AND IS IN THE SIX COLUMNS ALLOWED. C C THE PURPOSE OF THE THIRD BEAD IS TO READ IN THE SURVIVAL C — RATES (SURA) FROM AN ABRIGED LIFE TABLE. THE FIRST VALUE MUST BE C THE SURVIVAL RATES FOR A 5-YEAR PERIOD BIRTHS SURVIVING c T0 aGE o-4. THE SECOND VALUE SHOULD BE THE SURVIVAL RATE C FROM AGE 0-4 TO AGE 5-9. C SURA VALUES ARE ON TWO CARDS. FOR EACH SURA VALUE EIGHT COLUMNS C ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS OF THE c FIRST CARD. EACH VALUE MUST CONTAIN A DECIMAL POINT AND BE C WITHIN THE EIGHT DIGITS ALLOWED. THUS, ONLY TEN VALUES CAN C APPEAR ON THE FIRST CARD. THE SECOND CARD HAS SEVEN VALUES C WITH THE SEVENTEENTH VALUE BEING IN COLUMNS 49-56. TWO C CARDS MUST ALWAYS BE USED AND AT LEAST THIRTEEN VALUES OF c SURA MUST BE GIVEN IN ORDER TO USE THE SUBROUTINE PKREG. c c DIMENSION SURA(17) NPRNT = 15 NREAD = 1 10 READ(NREAD,11) 11 FORMAT(1X,52H ) READ (NREAD, 22) NXT, NWRIT, NSEX, EO 22 FORMAT(3I1,3X,F6.3) READ(NREAD,33) (SURA (I) ,1=1 , 17 ) 33 FORMAT(10F8.5) WRITE (NPRNT, 44) 44 FORMAT (1H1) WRITE(NPRNT,11) WRITE (NPRNT, 55) 55 FORMAT (1X,3HAND,/,1X,39HC0ALE-DEMENY REGIONAL MODEL LIFE TABLES) CALL PKREG (SUR A, NWRIT, EO, NSEX, NREG) IF (NXT) 10,20,10 20 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE PKREG (SURA, NWRIT, EO, NSEX, NREG) c c C PROGRAM NO. 0910 c c C SURA, NWRIT, EO, AND NSEX ARE INPUT ARGUMENTS. C NREG IS AN OUTPUT ARGUMENT. C SURA CONTAINS THE SURVIVAL RATES FROM A LIFE TABLE. C NWRIT IS THE WRITE INDICATOR C EO IS THE LIFE EXPECTANCY AT BIRTH CORRESPONDING TO THE C SURVIVAL RATES IN SURA. C NSEX IS THE SEX TO WHICH THE SURVIVAL RATES PERTAIN. C NREG IS THE COALE-DEMENY REGION WHOSE PATTERN MOST CLOSELY C RESEMBLES THE PATTERN OF THE SURVIVAL RATES IN SURA. c _ c . PKREG 323 DIMENSION SURA(17) ,SUR VB ( 17) .SMLT (18,8) NPBNT = 15 NER = N = MT = ERROR CHECKING IF (NSEX-1) 2000,4,3 3 CONTINUE IF (NSEX-2) 2000,4,2000 4 CONTINUE IF (EO-20.) 3000,5,5 5 CONTINUE IF (EO-80.) 6,6,3000 6 DO 10 1=1,17 IF (SORA(I) - .000001) 1500,1500,7 7 CONTINOE IF (SURA (I) - 1.0) 8,1500,1500 8 N = N ♦ 1 10 CONTINUE IF (MT) 13,13,11 11 CONTINOE IF (N-(MT-1)) 4000,12,4000 12 CONTINUE IF (N-13) 4000,13,13 13 CONTINUE IF (NER-1) 14,5000,14 DETERHINE HHICH REGIONAL PATTERN HOST CLOSELY RESEMBLES THE SURVIVAL RATES IN SURA 14 RDMIN = 9999. DO 40 1=1,4 CALL MLT(EO,NSEX,I,SMLT) DO 15 J=1,17 15 SUBVB(J) = SMLT (J, 6) 17 CALL LIFIT(SURA,SURVB, NHRIT, X, RDM) IF (RDM) 1000,20,20 20 CONTINUE IF (RDM -RDBIN) 30,40,40 30 RDMIN = RDM NREG = I 40 CONTINUE PRINT RESULTS IF NHRIT IS NONZERO IF (NHRIT) 50,1000,50 50 WRITE (NPRNT, 333) NREG 333 FORMAT (/, 1X, 1 19HTHE COALE-DEMENY MODEL LIFE TABLE REGION HAVING TH *E CLOSEST SURVIVAL RATES VALUES BASED ON THE MEAN RELATIVE DIFFERE *NCE,/,1X,26H TO THE ORIGINAL IS REGION ,I2,83H. REGIONS 1, 2, 3, *AND 4 CORRESPOND TO BEST, NORTH, EAST, AND SOUTH, RESPECTIVELY. ) GO TO 1000 C c C SET ZERO CHECK FOR POSSIBLE SURA ERROR c c 1500 CONTINUE IF (MT) 1501,1501,10 1501 MT = I GO TO 10 C c C ERROR STATEMENTS c c 2000 HRITE (NPRNT, 444) 444 F0RMAT(/,1X,47H*** PKREG BRROR NO. 0911 — INPUT ERROR IN NSEX,/, *1X,68H*** ERROR IN SEX CODE. NSEX SHOULD BE 1 FOR MALES OB 2 FOR 324 DOCUMENTATION ♦ FEMALES. ) NER = 1 GO TO H 3000 WHITE (NPRNT, 555) 555 FORMAT (/,1X,45H*»* PKREG ERROR NO. 0912 — INPUT ERROR IN EO,/,1X, *75H*** ERROR IN LIFE EXPECTANCY AT BIRTH. EO SHOULD BE BETWEEN 20 *.0 AND 80.0.) NER = 1 GO TO 6 4000 WRITE (NPRNT, 666) 666 FORMAT (/, 1X,47H*** PKREG ERROR NO. 0913 — INPUT ERROR IN SURA,/, * 1X,95H*** ERROR IN SURVIVAL RATES, LESS THAN 13 SURVIVAL RATES GI *VEN OR ONE OF THE INTE' EDIATE RATES,/, 1X, 54H*** IS LESS THAN OR E *QUAL TO ZERO OR GREAT* THAN ONE.) 5000 WRITE(NPRNI,777) NSEX /O 777 FORMAT(/,5X,18HPKREG liiPUT VALUES ,/,5X,7HNSEX = , 12,/, 5X, 5HEO = ,F ♦7.3) WRITE (NPRNT, 888) (SURA (I) ,1=1,17) 888 FORMAT (/, 5X,7HSURA = ,1 (F8.5,2X) /, 12X, 7 (F8 , 5, 2X) ) NREG = 1000 RETURN END PKREG 325 Or Q S co o s irt u> m 2 \t> g £ *■ * 3- S 3- £ K vS O vS £ >S 5 R C- N r^ t P- £ S 0- o~ cr- S CJ- S IC . • • ^? • ^C J s J B 5 s s v6 vd ^ £ M) ^ " VS ■J> v* £ v9 g o (b O S CJ s s t» 0« Oo CT» CO s ^i" o» O^ »« s o- •B £ ' • • s » ■* ts s •J> s s s 3 v* v» ■s s O ^o 2 in. tn uv s lr> 3 S to «» T» 3 ^ 3 5 0» o» to 3 oo •j> S O- *- o» S o- Co S If) 00 £ £ CO vr> CO ir» oo u> 3 S o» ± O- * CJ~ a- 2 o- *• S S • • • • • s • • s S s s 3 o ? en 3 r-. * — i- — 3- — Is * — 3 5 &- r~ d- r^ *- r^- 3- s r- i- 5 3 — . vS »r» vS m vS «r> 3 vS ur> 3 « -> oo o CO O 0o O IS o» O S i ro. o- r- o- i^- 0^ r~ \f o> r» 3 5 . . . . . • • 3 • • 5 3 o L? 3 3 vs 5 3 3 ff> :*- rcj »- ITl d- 3 rr> i- 3 S >- — •O ~ r»i — cr- 0» o- Co O- CO S o- Co S is z op — 00 — 00 — L? 0» — s s - s " tU o U) s 3 Q_ vS o z vS O \u O CJ CO ~ v9 o s a X — l*» «c — t»» H — CO Ui s — rO s s Ul CM O r- CM o cc E IC s o ro o~ «*•> M «• rr> >■ S o~ w> s s —1 o- CM ul o~ CM > o- CM K o» CM 5 s CTT — CM U_ — CM es •x CM —i S — CM £ s C£ o- X* ►-H o- <*> => O- •«> —i S Qr- K-l S s => o- ©- —1 o~ O- tn O- ©■» or S Ct- 0~ s _S| or • • • . • 2 • > 2 2 Z z Z J5J 1 2 5 to M H M - & a LU o- •O o~ ffi 0- "> a Cf- ro 2 3 —1 O ^* vS Uk 2 2 S 0= C£ 2 vS in 3 2 Ul CT- er- e: o- o- ex o~ cr- e: 2 0- o- 2 a u_ KS • • Ul tCv • • Ul <-r> • • ul S ro • • 2 s • • . s • 2 r- z - f<-> r- - >o UJ CO o» Ul CO OB UJ 0» oo Ul ^ Co oo t " > CO vS > o» >s > 0B v& > ^ Co vS n •» 3 OP Cr- rs CO O- r> Co o» => ■» CO o- -r ~ O C«J • • o C\J • • o CM • • O ». ro . • „ ~ to — u> — ■■ c CM a O fO "5 9 t 3" 1 1— Ul CO -V" 1- Ul CO CM Ul CO CO 326 DOCUMENTATION 10 10 o o H H Ch H «a M H U > S5 U> H B as co 04 Cu b h O H Q co Dm O °s U 04 SB W.-3 ss Oh m Cl, S» M 03 a o 10 CO o H H Oh «J) O 03 O -H H <* H > co < H o oa > H 03 H b «3 CO as h) J «S «a > > o H HH t> > H PS as «a O B B 03 r> 10 CO Ol »— Du » O to n o m 2 H © o H VO to h < to H O OS B 14 O Hi a PQ CM H « •4 rt! a H > H H o w w 03 Oh t* B X M to W t-3 M i-5 ■J h 03 «a H Q > o H Hi o HH o « > H en J 03 4 H >«I ►J B 03 D M «1 to O D H 03 2 O w W H IJ 10 10 CS cu M M B V iJ PS 10 M 55 < m W • S Q » W H Q a SB 1 o to M W 03 H > i-l Bm tfl a a *6 rtl o ss o to «a u aofs«~c7>r»o^inm'N©' T >vocT»cT\\o cri^fNor^cNr^t^-^or^ocNror-ai a>voc7>vo*or»voif>< 1 ooocNOT-'— a- m»-c7>a>tTicT>a\cTioCTiC^CT»O^CT*C7^C7>C7*CT»C71CT»aO t-t-ooOOOOOOOOOO© eior^^-cocnn'jvOPOinrovOvoOmvO m^-a-t^ootntTir^vo^inrorffMOT- a>^oa>tn(NC7t\0CNv0tnaoovcr«ao r-r s -wcoooaor^i**r^v©in' r >*~v©cT>0"* CT\CT>CT>a>C7»CTlCT^<7»WCT>CriC7<00r~^0 oooooooooooooooo a>r-r^inaoc7*coin*-o *oo»-triif)^(NOt~oift*0'-o a3CNowcT>cT>c7cTicor , "if)T"vo ©0©0>C7*C7\C7>0>CT*C^C7\C7>C7*C7NCO »-t-«-00©000©©00©© oovo^cNcnvoinciovoooincNOoom o6\ot^cT>oocDaooooor»^oijr)roc^T-o C0cTtC7NCT*O\CTlC7*cyt^C7>^CTtCT*C0C0f^ oooooooo©©oooooo srcn»tT>*sr* i i i i i i i i i i i i i i i in oinoinoinomomoinomor* «-T-cNtN' r >ro*j*ininvo'>er«- oooooooooooooooo EHEHEHEHEHEHEHEHEHEHHEHEHEHeHEH 33^CTi***0< + EH i- i- (N (N fO |V) tf * lO m VO «) 03 I I I I I I I I I I I I I I © h r» ooomoinomoinoinoinoin T-t-cNoicom^srininvovo m © © H U SB M 03 W Oh 03 > H EH -3 03 03 SO m © © w ss « OS 03 Oh Oh H a B i-3 O CO a < SB «8 03 n PKREG 327 lO o O H H PH FH «B H H u > a n3 w 3 ,03 to M Cn ^ h O H Q en fc. o O M H W •al u 03 a M J 03 *a M > Pu M m > M 03 Q 3 to to o H EH Cm < O 03 O -1 H «a EH > «) M « > 03 3 to >-H •a t» o H H t» H 03 «S 3 » 10 10 o H R Ph •0 O OS o *h H •« H > O H 03 > 03 a to <-i < > o H H > H 03 «! 3 03 to to o w EH o ■4 O W Pm IB tMs«1000(SM*vooiO»Oi-(TiiO a>rM^-f»iin«-^o>vo' — OO0O0OOOOOOOOOcyic?>cr>cT»cjNcr>coi^incNco r-t-r-000000000000 t-in^-a>' r >3/coe^f"»coLnr^*ina , m T-voooooaoaor«»t--r»-v£>in3-cNoor-C^Cr»CX*0*tCrtC7^cy*CT*0>Cr»C0C0r*" OOOOOOOOOOOOOOOO oi^r*ifiooaa>o>iJia>cnaor»ir»»-vo t-t-t-OOOOOOOOOOOO rr)o^*-« _ t^cNinvo*f"'r»cN r oco-* co>fi«-cNON^mm©iocomo>cocooDoocor» v oif>t r )<7>' _ o coo"\cr»o»c?icx»cocop». OOOOOOOOOOOOOOOO o CD m o o U a w 03 M H Q > H EH <* .-J M 03 a «s w s m CO o o u a &j 03 14 Ph Cm H « M EH a ►J CQ «a a < w o>*o^a , cr<*crt^cfia - c7ia'CT\^ ■ i i i i i i i i I i • i i in omoinoinomoinoinomof T-^-fnH/.^inm^o v ©r» oooooooooooooooo HHEHHEHHEHEHEHEHEHEHEHHEHEH EH rr'(N(N W H U > =5 cc 04 O m en W fci o H Q to h O °S W «* U 03 as W ►-> 03 «fl H > to H PM > M 03 Q a to to o H O 03 O ^ H < H > CO «* H O 03 > H M h o 03 < «a > > o H H H > e» h 03 03 «a S O 03 to to o aoaooooo'— Or-rvjsrvoaooOfl OOOOOOOOOOOOOOO ooooooooooooooo OOOOOOOOOOOOOOO JOOOOOriNnijioOioflOOh ^OOOOOOOOOO^r-INtNrsl OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO 33 o to H 9 10 o H H Cm < O 03 O »-3. Cb H «> a h > o «a h U 03 > 03 D CO > o H H > frt 03 «4 O 03 to t^otNoorsir^cMfNr^votMfnr^flooo r^^oo\<7*o*<*coco*o*»-if» OOO^0N^C7*C7*^0>C7^O>0^^CO • •••••••••••••a «-t-«-000000000000 md-r-roT-r«T-»-»inr»a>oo ON<7*C7*C^C7*O>CT^0\C7*C7*coo>oom^o>co*-CNr»© *oo'-a»in*«Nor»oin*o»-o p»voovor*eoa3t^mtNvoinino>(M oooot^lO'~ , * 000(J>C7>O^CT»<7>0\tr>CT»00 t-»-T-000000000000 roOWT-r-t^tNinvO^r^r^fN^ro* covoo>o>ooa3ooa3r^ , ©ir>' T >ff>' — o OOOOOOOOOOOOOOOO in O o M u 25 H as M Cm Ou H a W > H S3 4 Pi] S (N ON o o w u S5 03 w P4 O >-] o to < < W to O W X) o to 03 W I I I I I I I I I I I I I I I in omomouiomoinoinoinoi". t-r-r<srcTi*ON»w + 03 I I I I I I I I I I I I I I H I aaoinomomomomoinoin I o PKREG 329 w u a cq □a w Hi Cm H • Q X i-q e» > H H 1=H ^ (NKOrrOOTOrOOr «— «B C_) (NOOOOOOOOOOOOOO J W fNr-OOOOOOOOOOOOO MQ< ooooooooooooooo caw OOOOOOOOOOOOOOO 01 •«•••••• asm OOOOOOOOOOOOOOO <4 I I I I I I M k a a EH w s SB O EH CO OJ Z Q *-^T-O^-OOT-O©«-t->- 40 lOM^UIOOWWtflNUilNi-fMiOCn H > EH cNeo«-cnin* ©. co ( NOcr>o>^cT>o>ejiCT!CT*CT»C7»CT»C7vCr*C^00 Cd DO • •••••••••••••a 05 CO 04 t-^<— OOOOOOOOOOO© m Z H M < co as w w « B 10 O o o ioooooi/>rnciiniciniflnif>i(Nc»i(Ncn o ■* fst©o^»eoinf\i©coin *- w Q OD^OOCTvoOOOOOoocOr^vOincocTiT-O O S3 23 00C7»O0^<7\C^C><7(C7»O>o»cj\00C0r - » o EH •< • o OOOOOOOOOOOOOOOO • U> « o an H > » II "* tN to W « U Z f o>«-r»moocnooir)r-a*flo»-fNr-© a o *oo»-ifi*o»oi^oir>sro^o m h co r».voo>or>aocor»inir>in<7\(N « o a ooCT>o">a>a>cop»in«-*o w mo 00©0><^C7>0>O^CTtO^C^C^^«^a? Pu 03 h • P4 ca t-t-t-OOOOOOOOOOOO h WW « -J 03 CQ M «J EH H • a * r^oo\voro*invovoinco'-T-e^t > «invoa-r»r»'tNrr)rr|^- (/) ho oo^o r '^cocoaococor>voir)coa>r-o »cri+ oaa «« H «- r- cm o* ro m «• ar m xn \e *> u eh Pn U> «• i i i r i i I i i i i i i o <« H r» M o co o m o m o m o m o m o m o m a eh *-»~cNoinoco*»ininvo\o eh to to O O H H H FH «a -4 03 03 P« J O •* > 0] H CJ S» a « as a 03 to M fci Cu Pn O H Q 10 PM o O H EH H <4 U 03 a B4 >-5 03 «d 04 t> Pm h Pm > H 03 O 3 co co o H H Pv «a O 03 83 EH t> CO < H o 03 t» H 03 EH S < co 03 *A J < •4 > > O H H H > > EH « 03 <* D a 03 (0 CO Pm O CO o a H O EH (0 h 4j H O 03 s O -3 04 H <4 B H > O «fl H u 03 > 03 S (0 Hi < > o H H > H 03 < D 03 CO 330 DOCUMENTATION m m vO o ot w 1-4 to W Pm H h5 h1 W Q O EH M OT C CN O «s H U M X w w Cm H h1 5B H M O os 04 W 05 H 99 W > o Q «* o as o to m u «j o H 13 M « H S3 W & H a i M ►-) O CO P S5 O CN =5 H EH W m H CQ a ►j o o O 33 63 (0 as O H W 04 . n as « h W « M eh ea a &• EH as < H 1 u I 55 CM H o oi • w o as w h ca h O hJ CM os as H H e> os M O ca ca K « Cm uq # * # * # # OT M P Hi «4 > O EH O a m CM CN • as o h cn II O W W II 03 W KOTO © 00 >J5 in 00 m co CN r- in r- oo m cn st- • t o o r* it vo m co o • • o o t- ro OS CO 00 r- en co • • o © *o o t- ro CN O H > 04 D OT as H 04 O 03 04 W ST M t» ca < EH W h) « Q O S as o H W 04 as w Q I w ►J a o < o as o ot <=s u OT a* H < os w H W a 04 EH ft, o 04 O as B4 > H « OT oq EH • «* H as as o «* as > «s *4 H SB 04 > EH D OS OT S 03 OT « as En H !2a 04 04 as u 04 3 04 IB 04 W EH O EH OT O a OT 04 PiHN St4M H » O 1 OT EH I W H .-1 rn «4 •« *- os a en a o i-1 M < • > 04 OHO as > os as os a «>J o ot a 03 EH os as M H OT OT O 03 M M O hI 03 OS K M OT CM M H * * # * # * * » # 1J> to © CO en in 00 en OT w a Hi > EH © O Cm CN . as o H VO II MM II 03 W « OT O Cm as M m eo cn r» m *- co m en a* • • © © I- * \o m oo o en r« • • o o r~ ro cn co oo «- cn co • © © \o o r- ro CN © cn cn en oo • • o © cn ro cn cn r- CN cn ro cn o> « • O © en ro © r> vo m « in o> cn • • © o ro r>- co co co vo co cn • • t- o OS a OT PKREG 331 10 vO vO o 00 co cm 03 an 03 JS eh in -a m M 03 o. en M SB O Q3 03 SB IflOO in t- 03 oo m • aa en * o eh • • . o o O h 00 O Q 03 5* T- • ss as r^ * co «fl o vo m 03 CO o i-l o « cm r» < • o • • B O O O M CN S5 Cm w Z > 03 M H n Jl- O M C3 «- ro 6h 3e CM 00 EH 10 00 r- (N w 03 cm oo CQ H • • • OS «u 03 O O o W cu a P3 O CO i-3 cq Q <• a iOO h3 >-3 > «« r- CI x «j d «*i h 33 no oa«2 O 03 t» EH CM CM CO O 33 O 03 CH ao a 03 63 CO CO 3 « •• o to 03 o o a (in S3 O SB H H H 03 HH«< co 03 03 os ob en co MoWo.oaca cm cn ►H 1 03 CQ 03 33 03 "* «- CN 03 03 03 H 03 33 03 CM '1 Ml 03 Q W 03 MHO CMCM EH 3 EHCQ H WO OO 03 D O D D CO 03 I CO Oh Pm 33 OiH OiHM 03 H SCO 3 «S S3 i-3 Nl h3 hh H H H CM f) 03 XX »o o r» M)h3 | W IU |C0EH 10 m h 03 i co i a i &a iflin 03 « a «sj Hi-3 CMCM «JO«- CN H c> «* «1 •• > JO t- ^•U'-MD OO CM a CM 03 CM Ol CO _1 I-) OH O Oj O i-3 03 P4 _l «1 C3 X rtj D «( » tO • 03 • > 03 iJ r» <*> E-t OOUO OHO<< oo r» 03 z h a a a a > t> oooo who X Cm 03 a o CO vo 03 0303 03 H K3 m EH O CO CM ■a 03 03 O co O i-3 O CO 33 o <"0 •* •MO 03 03 OSEhCUCI.t-o 4-03>H03ao3aso3SB a o 03 5B 03H 03H MHC0 H l" 03 03 CO II II S Uffi UiB o 03 03 (J 03 03 MO 03O HO iJ 03X11 «J M Q 03 Q3 0303 0303 0303 03 S | K03 NS03 bS 03 CO kiWO D P4 03 ft. 03 cm oq en w m cu as 03 co BQ*1 » * * # »** OSBO * * * * *** CO t+5 5 (TP* + TP t+5 ) where TP is the total population at time t. The general fertility rate is the number of births occurring during the interval divided by the mid-period female population in childbearing ages. GFR= s LU 5 E (cFP* + J*. X=15,5 5X5. t+5x x PR0J5 349 The average annual crude death rate is the average number of deaths occurring each year during the period divided by the mid-period population. w 2 E (.MP* - c MP t+5 - MM*'** 5 + TB^ 5 + pp* - FP t+5 - JM*'^ 5 ) x=0.5 5 x 5 x 3 x 5 x 5 x 5 x ' d *,t+5 = xfO^ w 5 Z! (cMP* + c MP t+5 + JT* + JT t+5 ) x=ot5 5 x 5 x 5" x 5 x where ^t,t+5 £ s t jj e average annual crude death rate for the interval t,t+5. The average annual rate of natural increase for the interval is the crude birth rate ainus the crude death rate. „t,t+5 t,t+5 ,t,t+5 Finally, the average annual population growth rate during the 5- year projection period is GR t,t+5 _ 2 (TP t+5 - TP*) 5 (TP t+5 + TP*) B. COMMENTS Although the subroutine makes a population projection for a period of five years, the main program using this subroutine has been written for making a population projection for a period that can vary from 5 to 50 years. The main program written to accompany this subroutine reads in mortality data for the starting and ending dates of the projection and interpolates be- tween these dates for the entire projection. However, for fertility, the main program reads in age-specific fertility rates for the beginning period and for each 5-year projection period. [II. B AIM PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1 . CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL PR0J5(Pn,TPM,PMN,PF,TPF,PMF, SXM, SXF, ASFR 1 ,ASFR2, SRB, PPAR) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 350 DOCUMENTATION 2. DIMENSION stateaent The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. In this subroutine, all of the arguments in the argument string except for SRB are arrays. Therefore, all of the arguments except SBB must be dimensioned. The following dimension statement must be included in any main program using this subroutine. DIMENSION PS (17) , PF (17) ,PBF{17) ,PHH(17) ,SXM (17) ,SXF(17) ,ASFB1 (7) , *ASFR2 (7) ,PPAR(8) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PBOGBAH. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FOBTRAN library. 1. Subroutines from this package a. ABREV b. INTRP* c . ELT* d. MLT* e. PPROJ* * These subroutines are not called by the subroutine PB0J5. They are used only by the main program. 2. Library functions a. ABS (absolute value) b. EXP (exponential) c. ALOG (natural logarithm) 3. Card diagram of main program and functions / / CARDS INDICATING END / OF DECK /| / I / INPUT DATA /I I / COMPUTER CONTROL CARDS /I i I .-/III / SUBROUTINE INTRP /111/ _/ I I 1/ /. subroutine elt " _ suIboutinI~mlt" 'subr0uti»e~ppr03"" / / SUBBOUTINE MLT /| /__„ _ ___ / I / SUBROUTINE PPROJ /| | /___„ ______ . _. / I I 1/ / SUBROUTINE ABREV /III/ ^ . . ________________ _^ ^ ^ ^ / main~progIam /| | | / / . . . . / III/ / COMPUTER CONTROL CARDS /III/ / _ / III/ I I / I I / I 1/ I / 1/ / c. FOBMAT REQUIREMENTS FOR CABD INPUT DATA FOB THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. PR0J5 351 Variable Card Columns Name Definition 1 2-53 54-80 1 2 3-4 5-6 7-10 11-14 15-20 21-22 23-24 25-26 27-30 31-32 NXT DAY THO YEAB NDAT2 SRB KODE DAY1 TH01 YEAR1 DAY2 Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates that this is the last set of data. Any other digit punched in column 1 indicates that another set of data follows this one. Blank Day of the month for which the popu- lation is given. The number should end in column 4. Month of the year for which the popu- lation is given. The number should end in column 6. Year for which the population is given. Year to which the population is to be projected. Sex ratio at bicth. Mortality indicator which specifies whether age-specific survival rates are given or a regional model life table is to be used. If 11 is punched in columns 21 and 22, then age-specific survival rates are to be used for the earlier and later mortality. If 12 is punched in columns 21 and 22, the earlier mortality is given in 5-year age-specific survival rates and a regional model life table is being used for the later mortality. If 21 is punched in columns 21 and 22, then Coale- Demeny Regional Model Life Tables are to be used for the earlier mortality and age-specific survival rates are to be used for the later mortality. If 22 is punched in columns 21 and 22, then Coale- Demeny Regional Model Life Tables are used for both the earlier and later mortality. If any other number is punched in columns 21 and 22, the main program will stop and no further data will be processed. Day of the month to which the earlier set of mortality data applies. The number should end in column 24. The month of the year to which the earlier set of mortality data applies. The number should end in column 26. Year to which the earlier set of mortality data applies. Day of the month to which the later set of mortality data applies. The number should end in column 3 2. 352 DOCUMENTATION 33-34 ITM02 35-38 39 1-8 9-16 73-80 1-8 9-16 U9-56 57-80 YEAB2 NES PM PM The month of the year to which the later set of mortality data applies. The number should end in column 34. The year to which the later set of mortality data applies. The number of different projections that are to be made varying the fertility or mortality. The male population 0-4. The number should end in column 8. The male population 5-9. The number should end in column 16. The male population 45-49. The number should end in column 80. The male population 50-54. The number should end in column 8. The male population 55-59. The number should end in column 16. The male population 80+. The number should end in column 56. Blank The variable PM always refuires two cards. The first card (card no. 3) must always contain data, whereas the second card (card no. 4) can con- tain all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 73-80 1-8 9-16 49-56 57-80 PF PF The female population 0-4. The number should end in column 8. The female population 5-9. The number should end in column 16. The female population 45-49. The number should end in column 80. The female population 50-54. The number should end in column 8. The female population 55-59. The number should end in column 16. The female population 80+. The number should end in column 56. Blank The variable PF always requires two cards. The first card (card no. 5) must always contain data, whereas the second card (card no. 6) can be all zeroes depending on the number of age groups given. The last age group must always be the open-ended age group. I 2-53 I Blank I ISeries label used to identify the level of the (fertility or mortality rates. PR0J5 353 9+1 -1 9 + 1 54-80 1-7 8-1 ** 43-49 50-80 1-7 8-14 43-49 50-80 1-7 43-49 50-80 1-7 43-49 50-80 ASFR ASFR ASFB ASFR Blank Age-specific fertility rate for age group 15-19 for the beginning of the first 5- year projection interval of the first series. The decimal point should be in column 1. Age-specific fertility rate for the age- group 20-24 for the beginning of the first 5-year projection interval of the first series. The decimal point should be in column 8. Age-specific fertility rate for the age group 45-49 for the beginning of the first 5-year projection interval of the first series. The decimal point should be in column 43. Blank Age-specific fertility rate for age group 15-19 for the beginning of the second 5- year projection interval of the first series. The decimal point should be in column 1. Age-specific fertility rate for age group 20-24 for the beginning of the second 5- year projection interval of the first series. The decimal point should be in column 8. Age-specific fertility rate for age group 45-49 for the beginning of the second 5- year projection interval. The decimal point should be in column 43. Blank Age-specific fertility rate for age group 15-19 for the beginning of the last 5- year projection interval. The decimal point should be in column 1. Age-specific fertility rate for age group 45-49 for the beginning of the last 5- year projection interval. The decimal point should be in column 43. Blank Age-specific fertility rate for age group 15-19 for the end of the last 5- year projection interval for the first series. The decimal should be in column 1. Age-specific fertility rate for age group 45-49 for the end of the last 5-year projection interval for the first series. The decimal point should be in column 43. Blank The number of cards needed for the age-specific fertility rates is equal to the number of 5-year projection intervals for the first 354 DOCUMENTATION series plus intervals. se. So that i is the number of 5-year projection S f 10+1 !-8 fPHHT I 9-16 | I I I 73-80 | 1 I I j The total number of migrants for the first S 5- year projection interval. The number j should end in column 8. 1 J The total number of migrants for the second 1 5-year projection interval. The number 1 should end in column 16. J The total number of migrants for the tenth | 5-year projection interval. The number (should end in column 80. The number of values read for PHMT is the same as the number of times the population is to be projected five years. The value is positive if the total migrants are immigrants and negative if they are emigrants. This main program will project a population a maximum of ten 5 -year periods so PHMT can have between 1 to 10 values. 11+1 12+1 1-8 9-16 73-80 1-8 9-16 49-56 57-80 PHMA PHMA The proportion of the total migrants during the first 5- year projection interval who are males 0-4. The decimal point is in column 1 . The proportion of the total migrants during the first 5-year projection interval who are males 5-9. The decimal point is in column 9. The proportion of the total migrants during the first 5-year projection interval who are males 45-49. The decimal point is in column 73. The proportion of the total migrants during the first 5-year projection interval who are males 50-54. The decimal point is in column 1. The proportion of the total migrants during the first 5-year projection interval who are males 55-59. The decimal point is in column 9. The proportion of the total migrants during the first 5-year projection interval who are males 80+. The decimal point is in column 49. Blank Two cards must always be provided for the variable PUMA for each 5- year projection interval. Values are provided only for age groups in which there were migrants. The last group given is not assumed to be the open-ended age group unless it is the seventeenth value or is the same number of age groups as given for the population distribution. 13+1 1-8 9-16 I PHFA | The proportion of the total migrants I during the first 5-year projection | interval who are females 0-4. The deci- |mal point is in column 1. I | The proportion of the total migrants | during the first 5-year projection PR0J5 355 14 + 1 7 3-80 1-8 9-16 49-56 57-80 PHF3 interval who are females 5-9. decimal point is in column 9. The The proportion of the total migrants during the first 5-year projection interval who are females 45-49. The decimal point is in column 73. The proportion of the total migrants during the first 5-year projection interval who are females 50-54. The decimal point is in column 1. The proportion of the total migrants during the first 5-year interval who are females 55-59. The decimal point is in column 9. The proportion of the total migrants during the first 5-year projection interval for females 80+. The decimal point is in column 49. Blank The requirements for PHFA are the same as for PHHA. The sum of the proportion of PHHA and PHFA for all ages for each 5-year projection interval must add to 1.00. For each 5-year pro- jection interval the proportion of male migrants by 5-year age groups is followed by the proportion of female migrants by 5- year age groups for the same 5-year projection interval. So there are four cards for each 5-year projection interval -- two cards for male and two for female migrants. The next group of cards depends on the value given for KODE in card 2, If KQDE=11 r i.e. columns 21 and 22 of card 2 contain 11, survival rates are read for both the beginning and ending mortality date. J is the number of projection periods minus "8 multiplied by 4. |15+J| 1-8 JSfiX ! 9-16 16 + J 73-80 49-56 SRX The male survival rate from birth to age 0-4 corresponding to the earlier date given in card 2 columns 22 to 30 (DAY1,TH01,YEAR1 ) . The decimal point should be in column 1. The male survival rate from age 0-4 to age 0-9 corresponding to the earlier date given in card 2 columns 22 to 30 (DAY1,TH01,YEAR1) . The decimal point should be in column 9. The male survival rate from age 40-44 to age 45-49 corresponding to the earlier mortality date given in card 2 columns 22 J to 30 (DAY1,TM01,YEAR1) . The decimal point should be in column 73. The male survival rate from age 45-49 to age 50-54 corresponding to the earlier date given in card 2 columns 22 to 30 (DAY1,TM01,YEAB1) . The decimal point should be in column 1. The male survival rate from age 75+ to age 80+ corresponding to the 356 DOCUMENTATION 17+J 18+J 19+J 20+J 57-80 1-8 9-16 73-80 1-8 49-56 57-80 1-8 9-16 73-80 1-8 49-56 57-80 J I SRX SRX SRX SRX earlier date given in card 2 columns 22 to 30 (DAY1,TM01,YEAR1) . The decimal point should be in column 49 Blank The female survival rate from birth to age 0-4 corresponding to the earlier date given in card 2 columns 22 to 30 (DAT1,TM01 ,YEAR1) . The decimal point is in column 1. The survival rate for females 0-4 surviving to 5-9 for the earlier mortality date given in card 2 columns 22 to 30 (DAY1,TH01,YEAR1) . The decimal point is in column 9. The survival rate for females 40-44 surviving to 45-49 for the earlier mortality date given in card 2 columns 22 to 30 (DAY1,TH01,YEAR1) . The decimal point is in column 7 3. The survival rate for females 45-49 surviving to 50-54 for the earlier mortality date given in card 2 columns 22 to 30 (DAY1,TH01,YEAR1) . The decimal point is in column 1. The survival rate for females 75+ surviving 80+ for the earlier mortality date given in card 2 columns 22 to 30 (DAY1, TM01,YEAR1) . The decimal point is in column 49. Blank The survival rate for male births surviving to 0-4 for the later mortality date given in card 2 columns 33 to 38 (DAY2,TM02,Year2) . The decimal point is in column 1. The survival rate for males 0-4 surviving to 5-9 for the later mortality date given in card 2 columns 33 to 38 (DAY2,TH02, YEAR2) The decimal point is in column 9. The survival rate for males 40-44 surviving to 45-49 for the later mortality date given in card 2 columns 33 to 38 (DAY2,TH02,YEAR2) The decimal point is in column 73. The survival rate for males 45-49 surviving to 50-54 for the later mortality date given in card 2 columns 33 to 38 (DAY2,TH02,YEAR2) The decimal point is in column 1. The survival rate for males 75+ surviving to 80+ for the later mortality date given in card 2 columns 33 to 38 (DAY2,TH02, YEAR2) The decimal point is in column 49. Blank PR0J5 357 21+J 22+J 1-8 73-80 1-8 49-56 57-80 SRX SRX The survival rate for female births sur- viving to age 0-4 for the later mortality date given in card 2 columns 33 to 38 (DAY2,TM02,YEAB2) - The decimal point is in column 1. The survival rate for females 40-44 surviving to 45-49 for the later mortality date given in card 2 columns 33 to 38 (DAY2,TH02,YEAB2) . The decimal point is in column 73. The survival rate for the females 45-49 surviving to 50-54 for the later mortality date given in card 2 columns 33 to 38 (DAY2,TH02,TEAB2) . The decimal point is in column 1. The survival rate for females 75+ sur- viving to age 80+ for the later mortality date given in card 2 columns 33 to 38 (DAY2,TM02,YEAB2) . The decimal point is in column 49. Blank If less than 17 survival rates are to be given for either sex for either the earlier or later mortality date, two cards must still be used for each sex with data in the number of columns needed. The last survival rate given for each sex for each mortality date must be the open-ended survival rate. If K0DE=12, i.e. columns 21 and 22 of card 2 contain 12, then survival rates are read for the earlier mortality date and Coale-Demeny Begional Model Life Tables are used for the later mortality date. Cards 15+J through cards 18+J for KODE=m are required. The following card is needed for the later mortality date. I I I 19+J| 1-6 |E0 (Life expectancy at birth for males for the | later mortality date. The decimal point | should be in column 3. I !: | Life expectancy at birth for females for the j later mortality date. The decimal point | should be in column 9. I i NBEG | The region in the Coale-Demeny Begional Model | Life Tables to be used. A 1, 2, 3 or 4 in column | 13 indicates the west, north, east, or south | region, respectively. If K0DE=21, i.e. columns 21 and 22 of card 2 contain 21, then Coale-Demeny Begional Model Life Tables are used for the earlier mortality date and survival rates are read for the later mortality date. 15+J 1-6 7-12 13 I EO NBEG Life expectancy at birth for males for the earlier mortality date. The decimal point should be in column 3. Life expectancy at birth for females for the earlier mortality date. The decimal point should be in column 9. The region in the Coale-Demeny Begional Model Life Tables to be used. A 1, 2, 3, or 4 in column 13 indicates the west, north, east, or south region, respectively. Cards 16+J through 19+J are the same as cards 19+J through 22+J 358 DOCUMENTATION for KODE=11. if KODE=22, i.e. columns 21 and 22 of card 2 contain 22, then Coale-Bemeny Regional Model Life Tables are used for both the earlier and later mortality dates. Card 15+ J is the same as card 15+J for Kode=21. Card 16+J is the same as card 19+ J for K0DB=12. For each different series, cards 7 through the last are required. IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the vord SUBBOUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE PR0J5 (PH, TPM , PMH ,PF,TPF,PHF,SXM,SXF, ASFR1,ASFB2,SRB,PPAR) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition PH TPM PMM PF TPF PMF SXM Transferred In Transferred Out Transferred In Transferred In Transferred Out Transferred In Transferred In I ! SXF j Transferred In I 8 8 1 On input PM contains the 5- year age distribution of males to be projected. There can be a maximum of 17 age groups with the last age group being the open- ended age group. All age groups must be greater than or equal to 0. 9. If this is not the case, error message number 0971 will be written and the subroutine will return to the calling program. On output PM contains the projected 5-year age distribution of males. The total male population after the 5-year projection. The number of male migrants by five years of age. There can be a maximum of 17 age groups with the last one being the open- ended age group. On input PF cont distribution of There can be a m with the last ag ended age group, greater than or the case, error written and the the calling prog the projected 5- of females. ains the 5-year age females to be projected, aximum of 17 age groups e group being the open- All age groups must be equal to 0. 9. If this is not message number 0971 will be subroutine will return to ram. On output PH contains year age distribution The total female population after the 5-year projection. The number of female migrants by five years of age. There can be a maximum of 17 age groups with the last one being the open- ended age group. The 5-year survival rates for males. There can be a maximum of 17 survival rates for males. Each survival rate must be less than one and greater than or equal to zero. If this is not the case, error message number 0972 will be written and the subroutine will return to the calling program. The 5-year survival rates for females. There can be a maximum of 17 survival rates for females. Each survival rate must be less than one and greater than or equal to zero. PR0J5 359 I I I 1 J A5F1TM Transferred In ! I | ASF B2| Transferred In ! I ISRB J Transferred In I I jPPAR (Transferred Oat ! ! If this is not the case, error mes- sage number 097 2 will be written out and the subroutine will return to the calling program. The 5-year age-specific fertility rates for females 15-49 for the be- ginning of the projection period. Kach age-specific fertility rate must be greater than or equal to zero and less than .5. If this is not the case error message number 0973 is written out and the subroutine will return to the calling program. The 5-year age- specific fertility rates for females 15-49 for the ending of the projection period. lach age- specific fertility rate must be greater than or equal to zero and less than .5. If this is not the case error message number 0973 is written out and the subroutine will return to the calling prog rai£ . The sex ratio at birth. It must have a value between .9 and 1.1 or the sub- routine will write out error message number 0974 and return to the calling program. PPAB contains some of the basic para- meters of the population. They are as follows: PPAB(1) - Kate of growth PPAB (2) - Rate of natural increase PPAB (3) - Crude birth rate PPAB (4) - Crude death rate PPAB (5) - General fertility rate PPAB (6) - Total fertility rate PPAB (7) - Male life expectancy at birth PPAB (8) - Female life expectancy at birth C. ERROR MESSAGES 0971 *** PB0J5 EBBOB HO. 0971 — INPUT EBBOB IN PH OB PF *** ONE AGE GRODP OF EITHER THE HALE OB FEMALE POPULATION IS LESS THAN OR EQUAL TO 0.9. 0972 *** PROJ5 ERROR NO. 0972 -- INPUT ERROR IN SIM OR SXF *** AN INTERMEDIATE SURVIVAL RATE FOB EITHER HALES OB FEMALES IS LESS THAN OB EQUAL TO ZERO OR GREATER THAN 1. 0973 **$ PR0J5 ERROB NO. 0973 — INPUT ERROR ASFR1 OR ASFR2 *** AT LEAST ONE AGE-SPECIFIC FERTILITY BATE IS LBSS THAN ZEBO OB GBEATEB THAN .5. 0974 *** PB0J5 EBROR NO. 0974 -- INPUT ERROR IN SBB *** THE SEX BATE AT BIBTH MUST BE BETNEEN .9 AND 1.1. V. PROGBAH AND RESULTS A. COHPUTEB LISTING FOR MAIN PBOGRAH c . . _ . . c _— ______ _ , C HAIN PROGRAH FOR PR0J5 C __„ „_. c _— _. _„„__„__ _ . C — THIS PROGRAH USES A SET OF DATA CARDS IHICH IS BEAD IN NINE READ C STATEHENTS. THE DATA CARDS ARE RELATED TO BACH OF THE BEAD C STATEHENTS AS FOLLOWS. C C— THE FIRST READ STATBHENT OSES ONB DATA CARD. C THE PURPOSE OF THE FIBST BEAD STATEHBNT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABBL iOULD USUALLY CONTAIN 360 DOCUMENTATION C- THE NAME OF THE COUNTRY OB AREA WHOSE DATA ABE BEING ANALYZED AND c G iv E some INDICATION AS TO THE TYPE OF DATA OB THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLDHNS C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT OSES ONE DATA CABD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO BEAD (1)THE C INDICATOR (NXT) USED TO SIGNAL IF THESE IS ANOTHER DATA SET C FOLLOWING THIS ONE, (2) THE DATE (DAY, THO, YEAR) FOB WHICH THE C POPULATION DISTRIBUTION IS GIVEN, (3) THE YEAR (NDAT2) TO WHICH THE C POPULATION IS TO BE PROJECTED, (4) THE SEX RATIO AT BIRTH (SRB) , C (5*THE MORTALITY INDICATOR (KODE) USED TO SPECIFY WHETHER AGE C SPECIFIC SURVIVAL RATES ARE TO BE GIVEN OR A REGIONAL MODEL c LIFE TABLE IS TO BE USED, (6) THE DATE (DAY1, TH01, YEAR 1) TO WHICH C THE EARLIER SET OF MORTALITY DATA APPLIES, (7) THE DATE (DAY2, TM02, C YEAR2) TO WHICH THE LATER SET OF MORTALITY DATA APPLIES, AND (8) c THE NUMBER OF SERIES (NES) TO BE PROJECTED WITH THE SAME INITIAL C POPULATION. C NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 c INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER c PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA c FOLLOWING THIS ONE. C— DAY IS COLUMNS 3-4 OF THIS CARD. IT SHOULD BE PUNCHED AS XX C SO THAT IT ENDS IN COLUMN 4, I.E. IF IT IS THE FIRST DAY OF C THE MONTH IT WOULD BE PUNCHED AS 01. C TMO IS IN COLUMNS 5-6 OF THIS CARD. IT SHOULD BE PUNCHED SO c T HAT IT ENDS IN COLUMN 6. C YEAR IS IN COLUMNS 7-10 OF THIS CARD. C NDAT2 IS IN COLUMNS 11-14 OF THIS CARD. NDAT2 SHOULD BE THE c YEAR TO WHICH THE POPULATION IS TO BE PROJECTED. IT MUST c BE SOME MULTIPLE OF FIVE GREATER THAN YEAR AND NOT MORE c T HAN fifty YEARS GREATER THAN YEAB. C SRB IS IN COLUMNS 15-20 OF THIS CARD. IT SHOULD BE PUNCHED C WITH THE DECIMAL POINT IN COLUMN 16. C KODE IS IN COLUMNS 21-22 OF THIS CARD. IF BOTH THE BEGINNING C AND ENDING MORTALITY DATA IS TO BE PROVIDED AS SURVIVAL C RATES THEN THE NUMBER 11 SHOULD BE PUNCHED IN COLUMNS c 21-22. IF THE EARLIER MORTALITY DATA IS TO BE PROVIDED AS C SURVIVAL RATES BUT THE SECOND SET IS TO BE BASED ON C A COALE-DEMENY REGIONAL MODEL LIFE TABLE THEN THE NUMBER c 12 SHOULD BE PUNCHED IN COLUMNS 21-22. IF THE EARLIER SET C OF MORTALITY DATA IS TO BE BASED ON A COALE-DEMENY REGIONAL C MODEL LIFE TABLE AND THE SECOND SET IS TO BE PROVIDED AS C SURVIVAL RATES THEN THE NUMBER 21 SHOULD BE PUNCHED c IN COLUMNS 21-22. IF BOTH SETS OF MORTALITY DATA ABE TO BE c BASED ON COALE-DEMENY REGIONAL MODEL LIFE TABLES THEN THE C NUMBER 22 SHOULD BE PUNCHED IN COLUMNS 21-22. ANY OTHER C NUMBER IS AN ERROR AND WILL CAUSE THE MAIN PROGRAM TO STOP. C DAY1 IS IN COLUMNS 23-24 OF THIS CARD AND REFERS TO THE DAY OF c THE MONTH TO WHICH THE EARLIER MORTALITY SET APPLIES AND C SHOULD BE PUNCHED THE SAME AS DAY. C TM01 IS IN COLUMNS 25-26 OF THIS CARD AND REFERS TO THE MONTH OF c ___ — THE YEAR TO WHICH THE EARLIER MORTALITY SET APPLIES AND c SHOULD BE PUNCHED THE SAME AS TMO. C- YEAR1 IS IN COLUMNS 27-30 OF THIS CABD AND REFERS TO THE YEAR c T0 HHICH THE EARLIER MORTALITY SET APPLIES. C-- DAY2 IS IN COLUMNS 31-32 OF THIS CARD AND REFEBS TO THE DAY OF c THE HONTH TO WHICH THE LATER MORTALITY SET APPLIES. C TM02 IS IN COLUMNS 33-34 OF THIS CARD AND REFERS TO THE MONTH C OF THE YEAR TO WHICH THE LATER MORTALITY SET APPLIES. C— -- YEAR2 IS IN COLUMNS 35-38 OF THIS CARD AND IS THE YEAR TO WHICH c THE LATER MORTALITY SET APPLIES. C NES IS IN COLUMN 39. IT CAN HAVE A MAXIMUM VALUE OF 9. C C THE THIRD READ STATEMENT USES TWO DATA CARDS. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE HALE C POPULATION AGE DISTRIBUTION (PH) IN FIVB YEAR AGE GROUPS. c PH VALUES ARE PUNCHED ON TWO CARDS. FOR EACH PH VALUE EIGHT C COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS c -_ op TH E FIRST CARD. A MAXIMUM OF TEN PM VALUES CAN APPEAR C ON THE FIRST CARD SO THAT THE VALUES END IN COLUMNS 8, 16, c 24, ..., 72, AND 80. THE SECOND CARD CAN CONTAIN A MAXIMUM C OF SEVEN PH VALUES AND THE VALUES SHOULD BE PUNCHED IN THE C SAME MANNER AS ON THE FIRST CARD EXCEPT THAT THE LAST VALUE c ,_ ON THE SECOND CARD WILL END IN COLUMN 56. IF LESS THAN c SEVENTEEN VALUES ARE TO BE GIVEN, TWO CARDS MUST STILL BE c USED WITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR PR0J5 361 THE NUMBER OF PH VALUES. THE FOURTH READ STATEMENT USES TWO DATA CARDS. THE PURPOSE OF THE FOURTH READ STATEHENT IS TO READ IN THE FEHALE POPULATION DISTRIBUTION(PF) IN FIVE YEAR AGE GROUPS. PF VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAHE REQUIREHENTS AS PM VALUES. THE FIFTH READ STATEHENT USES ONE DATA CARD. THE PURPOSE OF THE FIFTH READ STATEHENT IS TO READ IN THE SERIES LABEL TO BE USED TO IDENTIFY WHETHER THE FERTILITY RATES ARE LOR, HEDIUH OR HIGH. THE SERIES LABEL IS IN COLUMN 2-53 AND HUST ALWAYS BE GIVEN EVEN IF ONLY ONE SERIES IS TO BE RUN. THE SIXTH READ STATEHENT USES ONE DATA CARD HORE THAN THE NUHBER OF FIVE YEAR TIME PERIODS THE POPULATION IS PROJECTED. THE PURPOSE OF THE SIXTH READ STATEMENT IS TO READ IN THE AGE- SPECIFIC FERTILITY RATES (ASFR) FOR EACH FIVE YEAR PERIOD. THE FIRST SET OF RATES APPLIES TO THE SAHE TIME AS THE POPULATION DISTRIBUTION. THE SECOND SET APPLIES TO FIVE YEARS LATER, THE THIRD SET TO TEN YEARS LATER, . .., AND THE LAST SET PERTAINS TO THE YEAR TO WHICH THE POPULATION IS PROJECTED. ASFR VALUES FOR FIVE YEAR AGE GROUP 15-49 ARE CONTAINED ON ONE CARD FOR EACH YEAR GIVEN. THESE RATES ARE GIVEN PER UNIT I.E. 30 PER THOUSAND WOHEN IS RECORDED AS .030. SEVEN COLUMNS ARE ALLOWED FOR EACH FIVE YEAR AGE SPECIFIC FERTILITY WITH THE DECIMAL POINT IN COLUMNS 1, 8, 15, ...» 36, AND 43. THE FIRST CARD IS FOR THE DATE FOR WHICH THE POPULATION DISTRIBUTION IS GIVEN AND FOR EACH TIME THE POPULATION IS PROJECTED THERE IS ANOTHER CARD WITH AGE SPECIFIC FERTILITY RATES. THE DATA IS PUNCHED ON ALL THESE CARDS IN THE SAME MANNER AS THE FIRST CARD OF ASFR. THE SEVENTH READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE SEVENTH READ STATEMENT IS TO READ IN THE TOTAL NUMBER OF MIGRANTS (PMHT) FOR EACH FIVE YEAR PROJECTION PERIOD. PMMT IS CONTAINED ON ONE CARD. THERE ARE AS MANY PMHT VALUES AS THERE ARE FIVE YEAR PROJECTION INTERVALS TO A HAXIHUH OF 10. THE FIRST PMMT CONTAINS THE TOTAL NUMBER OF MIGRANTS FOR THE FIRST FIVE YEAR PROJECTION INTERVALS. FOR EACH PMMT VALUE, EIGHT DIGITS ARE ALLOWED WITH THE FIRST NUMBER ENDING IN COLUMN 8. THE EIGHTH READ STATEMENT USES FOUR TIMES AS MANY CARDS AS THE NUMBER OF 5-YEAR PROJECTION INTERVALS. THE PURPOSE OF THE EIGHTH READ STATEHENT IS TO READ IN THE PERCENT DISTRIBUTION OF THE MIGRANTS (PMMA AND PHFA) IN FIVE YEAR AGE GROUPS. THE TOTAL MALE AND FEHALE MIGRANTS ADDS TO 1.00. THERE ARE TWO CARDS FOR PMMA VALUES FOLLOWED BY TWO CARDS FOR PMFA VALUES FOR EACH FIVE YEAR PROJECTION INTERVAL. PMMA VALUES ARE CONTAINED ON TWO CARDS. THERE ARE EIGHT DIGITS ALLOWED FOR EACH PMMA VALUE WITH THE DECIMAL POINT IN COLUMN 1,9,17, ...65 AND 73. THUS, THERE ARE TEN VALUES ON THE FIRST CARD. THE SECOND CARD CONTAINS SEVEN VALUES WITH THE LAST VALUE IN COLUMN 49-56. PHFA VALUES ARE CONTAINED ON TWO CARDS. PMFA VALUES HAVE THE SAME REQUIREMENTS AS PMMA VALUES. THE NINTH READ STATEMENT USES BETWEEN TWO AND EIGHT DATA CARDS. THE PURPOSE OF THE NINTH READ STATEMENT IS TO READ IN THE MORTALITY DATA. THIS CAN BE READ IN FOUR ALTERNATIVE WAYS. THE ALTERNATIVE THAT IS TO BE USED DEPENDS ON THE MORTALITY INDICATOR KODE READ BY THE SECOND READ STATEHENT. ALTERNATIVE 1, KODE = 11, I.E. COLUMNS 21 AND 22 OF CARD 2 CONTAIN 11, SURVIVAL RATES (SRX) ARE TO BE READ FOR BOTH THE EARLIER AND LATER DATES. SRX VALUES ARE CONTAINED ON EIGHT CARDS, FOUR CARDS FOR THE EARLIER DATE-DAY 1, THO 1, YEAR 1, AND FOUR CARDS FOR THE LATER DATE-DAY2, TH02, YEAR2. FOR THE EARLIER DATE, THERE ARE TWO CARDS ALLOWED FOR THE SURVIVAL RATES FOR EACH SEX. FIRST THERE ARE TWO CARDS FOR THE MALE SURVIVAL RATES FOLLOWED BY TWO CARDS FOR THE FEMALE SURVIVAL RATES. FOR EACH FIVE YEAR SURVIVAL VALUE, EIGHT DIGITS ARE ALLOWED WITH A DECIMAL POINT IN COLUMNS 1, 9, 17, ..., 65, AND 73. THUS, THERE ARE TEN SURVIVAL 362 DOCUMENTATION C— RATES FOB E&LES ON THE FIRST CARD. THE SECOND CARD C— CAN CONTAIN SEVEN SURVIVAL RATES FOR HALES C- PDNCHED IN THE SAME BANNER AS ON THE FIRST CARD. THE C- LAST VALUE THAT CAN BE ON THE SECOND CARD IS IN C-~— COLUMNS 49-56 WITH A DECIMAL POINT IN COLUMN <*9. IF C— LESS THAN SEVENTEEN VALUES ARE TO BE GIVEN, TWO CARDS C~— MUST STILL BE USED WITH DATA ONLY IN THE NUMBER OF C- — COLUMNS NECESSARY FOR THE NUMBER OF MALE SURVIVAL C- RATES GIVEN. THE THIRD AND FOURTH CARDS ARE FOR C-- FEMALE SURVIVAL RATES FOB THE EARLIER DATE AND C — -- HAVE THE SAME REQUIREMENTS AS THE FIRST TWO CARDS C WHICH WERE FOR HALES. CARDS FIVE THROUGH EIGHT ABE C— FOR THE ENDING DATE AND SHOULD HAVE THE DATA PUNCHED C- IN THE SAME MANNER AS THE FIRST FOUR CARDS. C ALTERNATIVE 2, KODE = 12, I.E. COLUMNS 21 AND 22 OF CARD 2 C CONTAIN 12, SURVIVAL RATES (SRX) ARE TO BE READ c ___ — F0R THE EARLIER DATE-DAY1,TM01,YEAR1, AND COALE-DEMENY C REGIONAL MODEL LIFE TABLES ARE TO BE USED FOR THE LATER c — — DATE-DAY2,TM02,YEAR2 SO THAT LIFE EXPECTANCIES AT BIRTH (EO) c „ ARE HEEDED FOR EACH SEX AND A REGION (NREG) MUST BE c _„_„_ INDICATED. FIVE CARDS ARE NEEDED FOR THIS ALTERNATIVE. C— SRX VALUES ARE CONTAINED ON FOUR CARDS AND MUST BE C SUPPLIED ON THE FIRST FOUR CARDS THE SAME AS C— - SPECIFIED IN ALTERNATIVE 1. C-~ — EO VALUES ARE CONTAINED ON THE FIFTH CARD. ONE C VALUE MUST BE GIVEN FOB EACH SEX WITH SIX C— — DIGITS ALLOWED FOR EACH VALUE. THE VALUE FOR C MALES IS IN COLUMNS 1-6 WITH A DECIMAL POINT IN C COLUMN 3. THE VALUE FOR FEMALES IS IN COLUMNS C 7-12 WITH THE DECIMAL POINT IN COLUMN 9. C— NREG IS IN COLUMN 13 OF THE FIFTH CARD. A VALUE C OF 1, 2, 3, OR 4 PUNCHED IN COLUMN 13 INDICATES C WEST, NORTH, EAST, OR SOUTH, RESPECTIVELY. C-- ALTERNATIVE 3, KODE = 21, I.E. COLUMNS 21 AND 22 OF CARD 2 c „_-__ CONTAIN 21, CQAL1-DEHENY REGIONAL HODEL LIFE TABLES c _„„__ aRE T0 BE DSED F0R THE eolieh DATE-DAY1,TM01, YEAR1 SO c _„„__ T hat LIFE EXPECTANCIES AT BIRTH (EO) ARE NEEDED FOR EACH SEX c _„_„_ aHD A RE GION(NREGJ MUST BE INDICATED, AND SURVIVAL c . RATES (SRX) ARE TO BE READ FOR THE LATER DATE-DAY2,TH02, c ___ — IEAR2. FIVE CARDS ARE NEEDED FOR THIS ALTERNATIVE. C EO VALUES ARE CONTAINED ON THE FIRST CABD OF THIS C GROUP. EXCEPT FOR BEING ON THE FIRST CARD THEY C— — SHOULD BE PUNCHED IN THE SAflE MANNER AS C SPECIFIED IN ALTERNATIVE 2. C NREG IS CONTAINED ON THE FIRST CABD AND EXCEPT FOR C— --- TBAT FACT SHOULD BE PUNCHED IN THE SAME HANNEB C— --- AS SPECIFIED IN ALTEBNATIVE 2. C— — - SRX VALUES ABE CONTAINED ON FOUR CABDS. IN THIS C CASE ON CARDS TWO THROUGH FIVE AND SHOULD BE C- PUNCHED IN THE SAME HANNEB AS THE FIRST FOUR C— CARDS IN ALTERNATIVE 1. C ALTERNATIVE 4, KODE = 22, I.E. COLUMNS 21 AND 22 OF CARD 2 c _„__ CONTAIN 22, COALE-DEMENY BEGIONAL HODEL LIFE TABLES C —»__ ARE T0 BE USED FOR BOTH THE EABLIEB AND LATEB DATES. c — „_. THUS, LIFE EXPECTANCIES AT BIRTH (EO) ARE NEEDED AND A C-— - REGION (NREG) MUST BE INDICATED. TWO CABDS ABE NEEDED FOB c _ THIS ALTERNATIVE AND MUST BOTH BB SPECIFIED IN THE SAME c __ MANNER BUT WITH DATA DUPPLIED FOR THE TWO DIFFERENT DATES. c ._ THUS, TWO CARDS MUST BE COMPLETED AS INDICATED BELOW. C EO VALUES MUST BE PUNCHED AS GIVEN FOR CARD FIVE OF C- ALTERNATIVE 2. C NREG MUST BE PUNCHED AS GIVEN FOB CABD FIVE OF C ALTERNATIVE 2. C C- ■ IF MORE THAN ONE SERIES I S TO BE BUN THEN BEAD STATEMENTS FIVE C— --- THROUGH SEVEN WILL BE REPEATED FOR EACH ADDITIONAL SERIES. THUS, C CARDS FOR THESE READS MUST BE SUPPLIED FOR EACH SERIES. ONE C SHOULD NOTE THAT THE MORTALITY DATA MUST BE PBOVIDED USING THE C SAHE ALTEBNATIVE FOR ALL SERIES. c _ ... _ . c _ __ DIMENSION PH(17),PF(17) ,ASFB(7,11) ,SBX (17,2,2) ,CDHLT( 18, 8) *,PPAB(8) ,SXF(17) ,SXM(17) , EO («) , ASFB1 (7) ,ASFB2(7) ,SH1 ( 17) ,SH2 (17) *,SF1 (17) ,SF2(17) ,PHI (17) ,PFI(17) ,PMHA(17,10) ,PHFA(17, 10) , * PHH(17) ,PHF(17) ,PHHT(10) NREAS = 1 SPENT = 15 PR0J5 363 C c C- READ IN THE DATA c C 10 HES1 ■ READ(NREAD,11) 11 FORMAT (1X,52H ) READ (NREAD, 22) NXT,DfcY ,THO, YEAR, NDAT2, SRB.KODE, DAY 1,TM01, YEAR 1,DAY2 *,TN02,YEAR2,NES 22 FORMAT(I1,1X,2F2.0,F4.0,I4,F6.4,I2,2(2F2.0,F4.0),I1) READ(NREAD,33) (PM (I) „ 1 = 1 , 17) 33 FORMAT (10F8.0) READ(NREAD,33) (PF (I) , 1=1 , 17) 15 READ(NREAD,55) 55 FORMAT(1X,52H ) C c „ c . CALCULATE THE NUMBER OF TIMES TO READ THE FERTILITY AND MIGRATION c C NDAT1 = YEAR ITT = (NDAT2-NDAT1) / 5 IF (ITT - 0) 1040,1040,17 17 CONTINUE IF (ITT - 10) 19,19,18 18 ITT = 10 19 DATM = YEAR ♦ (. 0833* (THO-1 .) ) + (.0027* (DAY-1 .) ) JTT = ITT+1 DO 20 J = 1,JTT READ(NREAD,66) (ASFR (I, J) ,1=1 ,7) 20 CONTINUE 66 FORMAT (7F7.6) READ(NREAD,33) (PHMT (J) ,J=1 ,ITT) DO 25 J=1,ITT READ(NREAD,89) (PMHA (I, J) ,1=1,17) READ(NREAD,89) (PMFA(I,J) ,1=1,17) 25 CONTINUE 89 FORMAT(10F8.7,/,7F8.7) C c C DETERMINE HON THE MORTALITY DATA IS TO BE READ AND OBTAIN c SURVIVAL RATES IF LIFE EXPECTANCY AT BIRTH IS GIVEN c __„_. c IF (KODE - 11) 1010,30,50 30 DO 40 K = 1,2 DO 40 J - 1,2 READ(NREAD,77) (SRX (I,J,K) , I = 1,17) 40 CONTINUE 77 FORMAT (10F8.0) GO TO 200 50 CONTINUE IF (KODE - 12) 1010,60,130 60 DO 70 J = 1,2 READ(NREAD,77) (SRX (I,J,1) ,1=1, 17) 70 CONTINUE READ(NREAD,88) EO (3) , EO (4) , NREG 88 FORMAT (2F6. 3, 11) c _ C- TEST EO VALUES AND NREG FOR APPROPRIATE VALUES c _ c 72 JI = 3 KI = 4 K = 2 75 DO 90 I = JI,KI IF (EO(I)-20. 0) 1020,90,80 80 CONTINUE IF (EO(I)-80.0) 90,90,1020 90 CONTINUE IF (NREG - 1) 1030,110,100 100 CONTINUE IF (NREG - 4) 110,110,1030 110 CALL HLT(BO(JI) , 1, NREG,CDMLT) DO 120 I = 1,17 364 DOCUMENTATION 1010,140,160 EO(1) ,EO(2),NREG (SHX (I, J, 2) ,1=1, 17) 120 SRX(I,1,K) = CDHLT(I,6) CALL MLT (EO(KI) , 2, NREG,CDMLT) DO 125 I =1,17 125 SRX(I,2,K) = CDMLT(I,6) IF (KODE -22) 200,180,200 130 CONTINOE IF (KODE - 21) 140 READ(NREAD,88) DO 150 J = 1,2 READ(NREAD,77) 150 CONTINOE JI = 1 KI = 2 K = 1 GO TO 75 160 CONTINOE IF (KODE - 22) 170 READ(NREAD,88) NCONT = 1 JI = 1 KI = 2 K - 1 GO TO 75 180 CONTINUE IF (NCONT - 1) 190 NCONT = 2 READ(NREAD,88) GO TO 72 1010,170,1010 EO(1) ,EO (2) ,NREG 200,190,200 SO (3) ,EO(4) ,NREG C c . C CALCOLATE TOTAL MALE AND FEMALE POPOLATION AND CLEAR OUT C POPOLATION PARAMETERS FOR FIRST WRITE c _ C 200 DATB = 0.0 TB = 0.0 TD = 0.0 DO 22 I = 1,8 220 PPAR(I) = 0.0 DO 230 I = 1,7 ASFR1 (I) = 0.0 230 ASFR2(I) =0.0 DO 240 I = 1,17 TPM = TPM + PM (I) TPF = TPF * PF (I) PBI(I) = PM(I) PFI (I) = PF(I) SXM (I) =0.0 24 SXF (I) =0.0 NDAY = DAY NYEAR = YEAR NHO = TMO WRITE (NPRNT, 111) 111 F0RMAT(1H1) WRITE (NPRNT, 11) WRITE (NPRNT, 55) WRITE (NPRNT, 222) NDAY , NMO,NYEAB 222 FORMAT (/, 1X, 53HPOP0LATION AT THE BEGINNING OF THE PROJECTION PERIO *D ,2(12,11) ,14) CALL PPROJ (PMI, TPM, PFI, TPF, SXM, SXF, SRB, ASFR1, ASFR2.PPAR, DATB) C c _ C PROJECTION LOOP c _ C DATA = YEAR1 + (.0833* (TM01-1 . ) ) + (.0027* (DAY1-1. ) ) DATC = YEAR2 ♦ (.0833* (TH02-1.) ) + (. 0027* (DAY2-1 .) ) 300 DO 998 IT = 1,ITT DATB = DATM ♦ 5.*(IT-1) + 2.5 C c __ C INTERPOLATE FOR SURVIVAL RATES c C IT1 = IT + 1 DO 305 1=1,17 SH1 (I) = SRI(I,1,1) PR0J5 365 SH2 (I) = SRX(I, 1,2) PMM (I) = PHMA(I,IT) * PMMT(IT) PHF(I) = PNFA(I,IT) * PNMT(IT) SF1 (I) = SRX(I,2,1) 305 SF2 (I) ■ SRX(I,2,2) CALL ABfiEV (2,Snl,SH2,M) CALL ABREV (2, SF1, SF2, N) CALL INTRP (2, 0,N,DATA,DATB,DATC , SM1, SM2, SXM) CALL INTRP (2,0,N,DATA,DATB,DATC,SF1,SF2,SXF) C c C OBTAIN AGE SPECIFIC FETILITY RATES FOR PROJECTION PERIOD c . C DO 310 I = 1,7 ASFR1(I) = ASFR(I,IT) 310 ASFR2 (I) = ASFR(I,IT1) CALL PROJ5(PMI,TPM,PHH,PFI,TPF,PMF,SXH,SXF,ASFR1,ASFR2,SRB,PPAR) NYEAR = NYEAR + 5 NRITE(NPRNT,111) WRITE (NPRNT, 11) WRITE (NPRNT, 55) WRITE (NPRNT, 333) NDAY , NHO, NYEAR 333 FORMAT (/, 1X,24HP0PULATI0N PROJECTED TO , 2 (12, 1X) , 14) CALL PPROJ(PMI,TPM,PFI,TPF, SXM, SXF,SRB, ASFR1 , ASFR2,PPAR,DATB) 998 CONTINUE NES1 = NES1 + 1 IF (NES - NES1) 999,999,15 999 CONTINUE IF (NXT) 1000,1000,10 1010 WRITE (NPRNT, 111) WRITE(NPRNT,1011) 1011 FORMAT (/,1X,95H*** ERROR IN INPUT FOR MAIN PROGRAM — KODE, YOU SH *OULD CHECK ALL OF YOUR INPUT DATA CAREFULLY.) GO TO 1000 1020 WRITE(NPRNT,111) WRITE (NPRNT, 1021) 1021 FORMAT (/, 1X,71H*»* ERROR IN INPUT FOR MAIN PROGRAM — EO IS NOT BE ♦TWEEN 20.0 AND 80 . . ,/,5X, 50HYOU SHOULD CHECK ALL OF YOUR INPUT DA *TA CAREFULLY.) GO TO 1000 1030 WRITE (NPRNT, 111) WRITE (NPRNT, 1031) 1031 FORMAT (/,1X,65H*** ERROR IN INPUT FOR MAIN PROGRAM — NREG IS NOT *1, 2, 3, OR 4. ,/,5X,50HYOU SHOULD CHECK ALL OF YOUR INPUT DATA CAR *EFULLY.) GO TO 1000 1040 WRITE (NPRNT, 1041) 1041 FORMAT (/, 1X, 91 H*** ERROR IN INPUT FOR MAIN PROGRAM -- DIFFERENCE I *N YEAR AND NDAT2 IS NOT BETWEEN AND 1.) 1000 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE PROJ5 (PH,TPM, PMM ,PF,TPF,PMF,SXM ,SXF, ASFR1, ASFR2,SRB, *PPAR) c _ c C PROGRAM NO. 0970 c C PMM, PHF, SXM, SXF, ASFR1, ASFR2 AND SRB ARE INPUT ARGUMENTS C ONLY. C PM, AND PF ARE BOTH INPUT AND OUTPUT ARGUMENTS. ON C INPUT THEY PERTAIN TO THE POPULATION BEFORE THE PROJECTION. ON C OUTPUT THEY PERTAIN TO THE POPULATION AFTER THE PROJECTION. C TPH,TPF AND PPAR ARE OUTPUT ARGUMENTS ONLY. c PH Is THE H&LE POPULATION DISTRIBUTION IN FIVE YEAR AGE GROUPS. C TPM IS THE TOTAL MALE POPULATION AFTER PROJECTION. C PMM IS THE MALE MIGRANTS IN FIVE YEAR GROUPS C pp is THE FEMALE POPULATION DISTRIBUTION IN FIVE YEAR AGE C GROUPS. C TPF IS THE TOTAL FEMALE POPULATION AFTER PROJECTION. 366 DOCUMENTATION c p H p is T HE female MIGRANTS IN PIVE YEAR AGE GROUPS c .- S XH IS TH e FIVE YEAR SURVIVAL RATES FOR BALES. c SX f IS THE FIVE YEAR SURVIVAL RATES FOR FEHALES. C — ASFR1 IS THE FIVE YEAR AGE SPECIFIC FERTILITY RATES FOR FEHALES c 15-49 AT THE BEGINNING OF THE PROJECTION PERIOD. c ASFR2 IS THE FIVE YEAR AGE SPECIFIC FERTILITY RATES FOR FEHALES c 15-49 AT THE END OF THE PROJECTION PERIOD. c SBB IS THE SEX RATIO AT BIRTH. c ppAR CONTAINS THE FOLLOWING POPULATION PARAHETERS - (1)RATE OF c GROWTH, (2) RATE OF NATURAL INCREASE, (3) CRUDE BIRTH RATE, C (4) CRUDE DEATH RATE, (5) GENERAL FERTILITY BATE, (6) TOTAL c FERTILITY RATE, (7) HALE LIFE EXPECTANCY AT BIRTH AND c ,__ (8) FEMALE LIFE EXPECTANCY AT BIRTH. c c DIMENSION PH(17) ,PF(17) ,SXH(17) ,SXF(17) ,ASFR1{7) ,ASFR2(7) , * RF1 (7) ,PPAR (8) ,PHH (17) ,PMF(17) NPRNT =15 C c _ _ C- — — VERIFY INPUT ARGUMENT VALUES c _ C 100 NERR = N = H = NT = HT = TPH =0.0 TPF = 0.0 TMHB =0.0 DO 104 1=1,17 IF (PM(I)-0.9) 112,112,101 101 H = H+1 TPH = TPH +PH (I) 102 CONTINUE IF (PF(I)-0.9) 114,114,103 103 N = N ♦ 1 TPF = TPF + PF(I) 104 THHB = THHB + PHF(I) + PHH (I) IF (M) 107,107,105 105 CONTINUE IF (MT) 107,107,106 106 CONTINUE IF (H-(MT-1)) 110,107,110 107 CONTINUE IF (N) 110,110,108 108 CONTINUE IF (NT) 116,116,109 109 CONTINUE IF (N-JNT-1)) 110,116,110 110 WRITE (NPRNT,111) 111 FORMAT (//52H *** PROJ5 ERROR NO. 0971 — INPUT ERROR IN PM OR PF, */89H *** ONE AGE GROUP OF EITHER THE HALE OR FEMALE POPULATION IS ♦LESS THAN OR EQUAL TO 0.9. ) NERR = 1 GO TO 116 112 CONTINUE IF (MT) 113,113,102 113 MT = I GO TO 102 114 CONTINUE IF (NT) 115,115,104 115 NT = I GO TO 104 116 MT = NT = N = H = DO 122 I = 1,17 IF (SXM (I) -.000001) 131,131,117 117 CONTINUE IF (SXM(I)-1.) 118,131,131 118 M = M +1 119 CONTINUE IF (SXF (I) -.000001) 133,133,120 120 CONTINUE PR0J5 367 IF (SXP(I)-I.) 121,133,133 121 N = N + 1 122 CONTINUE IF (H) 130,130,125 125 CON TIN OB IF (MT) 127,127,126 126 CONTINUE IF (H-(MT-1)) 130,127,130 127 CONTINUE IF (N) 130,130,128 128 CONTINUE IF (NT) 130,140,129 129 CONTINUE IF (N-(NT-1)) 130,140,130 130 HRITE (NPRNT,222) 222 FORMAT (//54H *** PBOJ5 ERBOR NO. 0972 — INPUT ERROR IN SIM OR SX *F,/111H *** AN INTERMEDIATE SURVIVAL RATE FOR EITHER HALES OR FEHA *LES IS LESS THAN OR EQUAL TO ZERO OR GREATER THAN 1.) NERR = 1 GO TO 140 131 CONTINUE IF (MT) 132,132,119 132 MT = I GO TO 119 133 CONTINUE IF (NT) 134,134,122 134 NT = I GO TO 122 140 DO 190 1=1,7 IF ({ASFR1 (I)*ASFR2(I)) +.000001) 180,170,170 170 CONTINUE IF (ASFR1 (I)-. 5) 171,171,180 171 CONTINUE IF (ASFR2(I)-.5) 172,172,180 172 CONTINUE GO TO 190 180 WRITE (NPRNT, 444) 444 FORMAT (//55H *** PROJ5 ERROR NO. 0973 — INPUT ERROR ASFR1 OR ASFR *2 ,/,83H *** AT LEAST ONE AGE-SPECIFIC FERTILITY RATE IS LESS THAN * ZERO OR GREATER THAN .5.) NERR = 1 GO TO 200 190 CONTINUE 200 CONTINUE IF (SRB-.9) 210,210,201 201 CONTINUE IF (SRB-1.1) 220,220,210 210 WRITE (NPRNT, 555) 555 FORMAT (//47B *** PROJ5 ERROR NO. 0974 — INPOT ERROR IN SRB, */54H *** THE SEX RATE AT BIRTH MUST BE BETWEEN .9 AND 1.1.) NERR= 1 220 CONTINUE IF (NERR) 230,250,230 230 NRITE (NPRNT, 666) PH, PHM, PF,PMF, SXM, SXF, ASFR 1,ASFR2, SRB 666 FORMAT (/26H PROJ5 INPUT ARGUMENTS * / 9H PH= ,9F12.0 /9X,8F12.0 /10H PHM= ,9F12. 0,/10X,8F12. * / 9H PF= ,9F12.0 /9X,8F12.0 /10H PMF= , 9F12. 0,/10X,8F12.0 * /10H SXH= ,9F12. 4/10X,8Fl2.4 /10H SXF= , 9F12 .4/10X,8F12.4 * /12H ASFR1= ,7F8.5 /12H ASFR2= ,7F8.5 * /10H SRB= ,F8.3 ) TPH= 0.0 TPF= 0.0 TB= 0.0 TD= 0.0 DO 240 1=1,8 240 PPAR(I) = 0.0 DO 245 1=1,17 PH(I) = 0.0 PF(I) =0.0 245 CONTINUE GO TO 1000 C c _ C PROJECTION LOOP c c 250 TB= 0.0 368 DOCUMENTATION TD= 0.0 T1= TPM+TPF TPH= 0.0 TPF= 0.0 DO 255 1=1,7 255 BF1 (I) = PF(I+3) C c . C ADJUST POPULATION, PMF5, OR SURVIVAL RATES, SHF5, c T0 COMPATIBLE NUMBER OF AGE GROUPS, NG AND MAKE CERTAIN c THE MIGRATION ARRAY IS NOT LARGER THAN NG. c C CALL ABREV (2, SXN, SXF,NG) CALL ABREV (1,PH,PF, NG) CALL ABREV (3,PH,SXH, NG) CALL ABREV (3,PF, SXF, NG) IF (NG - 17) 256,258,258 256 NGP1 = NG + 1 DO 257 J=NGP1,17 PMH(NG) = PHM (NG) + PHM (J) 257 PMF(NG) = PMF (NG) + PMF (J) C c _ c PROJECT POPULATION, AND SUM TOTAL BIRTHS INTO TB c C 258 NG1 ■ NG - 1 PM (NG) = PM (NG) + PM(NG1) PF(NG) = PF(NG) + PF(NG1) DO 260 1=1,7 260 TB= TB+ (ASFR1 (I)*PF (1 + 3)) DO 280 IX=2,NG1 1= NG1-IX+2 PM(I)= PM (I-1)*SXM(I)+.25*PMM(I-1) *(1.+SXM(I) ) +.25*PMM (I) * (1 .+ *SXM (1 + 1)) TPM= TPM+PM(I) PF(I)= PF(I-1) *SXF(I)+.25*PHF (1-1) *(1.+SXF(I) ) +.25*PMF (I) * (1 . ♦ ♦SXF (1 + 1)) TD=TD+PHM (I) +PMF (I ) 280 TPF= TPF+PF(I) PM(NG) = PM(NG) *SXH(NG) + (. 25*PMH (NG1) +. 5*PMH (NG) ) * (1. +SXM (NG) ) PF(NG) =PF (NG) *SXF(NG)+ (.25*PMF (NG1) +. 5*PMF (NG) ) * (1 .+SXF (NG)) TPF = TPF ♦ PF(NG) TPH = TPM + PM(NG) TD = TD+PMH(NG) + PMF (NG) + PHM(1) + PMF(1) DO 285 1=1,7 285 TB= TB+(ASFB2(I)*PF(I + 3)) C c C CALCULATE BIRTHS (TB) , DEATHS (TD) , TOTAL POPULATION (TPM AND TPF) c C TB= TB*2.5 TBF= TB/(1 .0+SRB) TBM= TBF*SRB PM(1)= TBM*SXM(1) +.25*PMM (1 ) * (1 . +SXM (2) ) PF(1)= TBF*SXF(1)+.25*PMF(1)*(1.+SXF(2)) TPH= TPH+PM(1) TPF= TPF+PP(1) T2 = TPM + TPF TD = T1 - T2 + TD + TB C c C CALCULATE CRUDE VITAL RATES (CBR AND CDR) , C AND GROWTH RATES (RNG AND BG) c C THID= (T1+T2)*2.5 PPAR(3) = TB/TMID PPAR(4)= TD/THID PPAR(2) = PPAR(3) - PPAR (4) PPAR(1)= (T2-T1)/THID C C C CALCULATE TOTAL AND GENERAL FERTILITY RATES (TFR AND GFR) c j. PR0J5 369 C RF= 0.0 TFR= 0.0 DO 300 1=1,7 RP= RF+RF1 (I) *PF (1 + 3) 300 TFB= TPR+ASFR1 (I) +ASFR2 (I) PPAR(5) = TB/(BF*2. 5) PPAR(6)= TFR*2.5 C c C CALCULATE LIFE EXPECTANCY AT BIRTH {EOH AND EOF) c C RH= 5.0 EOH= 0.0 DO 320 1=1,16 IF (SXH (I+1)-0. 001) 330,310,310 310 Rfl= RH*SXM(I) 320 EOH= EOH+RH 1= 17 330 EOH= EOH+((RB*SXM(I))/(1.0-SXH(I))) RF= 5.0 EOF= 0.0 DO 350 1=1,16 IF (SXF (I+1)-0.001) 360,340,340 340 RF= RF*SXF(I) 350 EOF= EOF+RF 1= 17 360 EOF= EOF*( (RF*SXF(I))/(1.0-SXF(I) )) PPAR(7) = EOH PPAR(8) = EOF C c C RETURN TO CALLING PROGRAH c C 1000 RETURN END 370 DOCUMENTATION o — 1 S s CM a s CC R — ^ s £ S m *. 5 CJ» Oo in O- S ;; *■ vS c\l £ *- O l^ 3- Oo o- ir> C £ vS IV. Ml <£> s9 MS \S %s in o Ov S> V -v IC — ~ v. v& r- |v r~ K o ' O O Ci CJ- Ov o. o« 2 R • c • • • • . K C vS h- ~ K ~ |v — ^ ^ g V0 CM g 00 oo CM 00 S i* O- — 0O s — CM |v OO Q Oo rv S S r» 0- o- s o 0" C»- 3- O OO cu — -. IV oo IV. Oo s •« o s o o o o~ O- »s 0- 2 £ < s > . • . s 3 r- o 2 s S — »- •j> 3 'J iTv IV s )^ o 00 > 3 2 o- — m 3 o- lo iS CO o <>n vS 3 s o- — in s rn m fT4 0- cu cu CM tv Oo oo Oo ffi s o S o o O cy o~ •>. O^ S I? s O v9 '& S s o S 5 B» lr» 00 s- in v& Oo 3- |v 0s (V. oo |v. m — o- -~ E ; o — CM (V «% s 0o «> \B CM 0o CM CM IV 3- Of. vS o Oo K s r- — — Ol o s CM O m O CVJ O OO — f ^*- *> <^ 0» $ s o o s O o O O O — M> CM IV. 0o 0> 3 5 — — ■» • «> o 3 tn Ci "> O w> o oo st an O Co rv 00 3 3 o o S O o o o O o o> vS o- (V. o- vS Ov 3 5 s 3 o v. IV O u> * d- *• S % S CK V- rv >A >o — CO tr% t»» s en s u_ o — m <•» a- o»

CM vS s 5 IV iv 3- »- — o O O m 0- s o- — i- w» o CM a ~- vS O- CO o if> s S Q o- vS — 0O CM . * o- 3- s — m "> 3- •=h m |v Cf- Do ir» CJ- «■> — s n u> — — . — tn o s: 3- O 3- o 3- o 0o IV OO — Oo c»~ Qv K S K v9 o o o o O o o o o~ r> Cj- 0» o~ rv O- s 3 O o in «« in IU o |v. ■^ *■ O' — — — Si £ S h-> KV ^ o l*> *- o o o n s s O CM in vS — — CM CM CM o vS |v. ~~ o 3- cy- C5 ° s or v9 * 0» o IT, • . — — a u~> 3> — vS CM O ««"> Or 0o in CM rv o s s Q_ ©» o- — trt CM CM r- s ■TO |v 3- ^s "n |v- — 3- — Oo •O m 3- s a — — CM m o s m O m o in O cy in o~ oo o» vS o- s s 2. vO |v |v fv o o s o o o o o o o- 0o o- 0» CJ~ 0O C3- s s O o O* Cl- 0- s * M o 3- 3- 3- o in in ir> a * s t~ r*» m 0- f»> CM CM «M CM a N a a: — o 3- * ve • . < s o CM oo o- d~ m CM £ 5 —i — 3- (v. ©> \C in o a ro 3- oo i& fn o CVJ CM m Ct- 3- CM O a g r> m CM 0» »o d- o- s m a- Ml |v 3- 0» ~- CM ~ o •n o 3- s 2 o. XV CM CM |v IV. |v <5 o en v» O v» o v9 o o- O o- m. O- -~ CT- 2 2 o 3- M> o O O o CO o o o o O o o~ CI- o- o- o~ O- O- 2 £ a_ o — — ■— . 2 • r» CM OO ««% I*> w> K> o 2 •£• 2 z "■» o- CM in CM »- • • • • O s 2 * cc o — -- — 0» z O 2 |v. VS > w v9 rv oo 2 S CO rv m |v * IV. as O fO o- " 3- »*> <«» l« >S o- CM — (V- 0O 3- CM o 2 2 K 0* o> fr» ~- a- t-t «• OO o> tn o- o- 2 IS o 0O o- In o- i- IC> •^ J- ••^ &- 3- 2 - ^> ■— <\J f«% a >B >* v& — |v. o a (v — |v o |v o M> "% v» iO r- m rv Z S o CM CM CM o. «> i-i o- as 3- ICl OP • • . O «, » r» *= — ir» CM rr> — s - o » f u. Uj vS CM m CM OO s o i> |v- o- <3~ o» cr- c»~ CM u. " > O o- CM v- — M CM CM CM o Cjo •— n CM 3- «■> o a- 3- -o m m o 3- 3- •n «, ■» 3 o v* trt |v. ^9 Q o O O o LO CM ^ CJ CM m m o- rc* CP OO vS o- in o ~, " tn s o O O o o ~ O o O o O © CO o- CJO o- OD O- o- M - ~ - w 4* « Co c CO •O L. CM * 3- CM •5 £ CM •g <-> % CM PR0J5 371 g £ -^ ^ -^ -- -». JC * o J •a o o s B • £ • • • " s M} f^ £ £ I I I I i R r- -— £ c g ■s OJ s s o~ ~. oo s -^ CM ts. 2 s h~ O- cr- s o ©> 0> S s -~ 2 CM "- ~ S X O X cs o o S £ s • • • £ 2 r» O 5 S s -. 3- s s s in r~ £ MB 3 cr- — m 3 Cr* m vS s S o- -^. m s f*> CM "^ s £ ^ CM en CM CM CM (Tv S a E O o o s K • S • • K £ o v» £ u> S o CM i. s 8 «■> 3- 0» 5 S £ o-. oo ir> oo £ 3- m vS oo 3* t*- 00 s 2 m — CM r^- S l»V Oo m \0 CM Oo CM s £ «£ f<"> — • — CM 3 O CM O CM O CM o 7, S -*- ii O ° o o o o o o <-> S 5 • t- 3 5 Q. 0- ~. r-- •~ 3 3 5 O IC» o CM CM — o O 5 -. — ■ — 5 3 «M O r- o O M) in o ■s vj> 03 M> 3 S ~- CO vS CM •»» o~ eg CM CVJ 3- •s 3- in vS M> o o »«\ CM CM CM 3 * — r-- 3- CM vS fc> o O o CM 5 CM 3- CM CM m in <*> o O O 3 3 CM •^. ~~ • • t^ 3 c m © to O m O • 3 * r» o o 3 o o o o O o O 3 3 • r- 3 3 ^- r- o in d- o O % 3- 3- 3- 3 S o K> r- ir> vn — m CM oo £ H> m m S •s * vS o -- rr> vJ> * 06 00 r~ S Oo oo Oo 3 s — . r» r~ » O- — O O o c-. S o~ % O 3- ca 3- o 3- O £ £ oo 1— ■s o o cs o o o O o S or r- "-> ^s o lr> 3- o o a- S o o o z s -- o CM >o O ~. — CM CM ~ S CM CM CM ° s In o= vS *. 0o O m . — £ -. u-, 3- — vS CM o • • s s o- O- O- Ct- ~- IM OJ CM s r- CM r- 3- vS m r*. s "» o» 1 0- Z o — ~« cs^ •n CM CM C" CM s CM CM cx CM o * 3- V* 1- . . 3 . • Pi 3 in -i CM *- 1^. O- vS z IT) 3 o rr> 3- CO i9 •«» O 3 s 0- ^> rr> CM OO PT) ar * S o- T» o~ v» C-- 3- 0o s "IT «i a. m CM CM hi r~- in m vi 2 o 19 O vS o vO c> r~- r~ r- 2 s o- o 3- cr vS> in m o 2 o O o o o o o v9 .J> vS> 2 a 0_ o cc ~. •— — • - • • . . . — — — - a r^ CM oo ro > en ><% rn O S m m t<» a s 2 —• CJ- CVJ m OJ • • o S 1— . • • ^ s CJ- cc o — ^*. — 00 >- o 2 z s 3 o CO r» Wr> c«- 3- r- H- o pn 2 Cr- 3- «*> K> u-> vS 0- i- 3- o Oo w- in o- , ►1 0o o» oo s s vS ^j ~ CM rr> _l v* 19 3- — 1^- 2 O r*. — r*- o r- o o O Oc vS vS vS s s o- o HI oo 00 o» o o O O o O o o o Oo — ct Oo Oo OO 2 <■. Cc vS r- CM CM CM i» CM CM CVJ e> - M a~ OO a- tr> OO er » • • o «. o- PC» • • • - ~ Z — in CVI «■> — UJ o r- m <$> £ - » vS Ui i» CU l^ CM OO u_ o ^ => u. » -— > O O-- C\l -~. — CVJ o o o oo „, — CM 3- •«> o o- -t- O O i-( CM CM CM ^ * cm 3 o v& Lr> r- VS > o o o o m * CM CM CM «v •o o- «»» 0- o a O o O o £ o O O N - ■ — ir> vS • • • - tO CVJ i -is CO u co -s c CM C_3 CI CJ3 •f- ± -6 w ti 1X1 C_5 CO 1- "5 tr CJ> a O- CT +- O -8 "5 -e CM c in i o" CO OO cj- CO o cu -J5 +- CO CO G CO CVI u a V) »n CM Cf «o * 3- cM ft CM J t— Ul CO +■ CO c 372 DOCUMENTATION ^- ce Q UJ -j O- £ cj s s s 2 £ E se S 2 £ CM 3- O «n f; CM *• O v*i C £ vj> \S M> \9 S vS M) M> M> S K — — -» ~» " •" ~ — ~~ JC S O a O o S o o o Co S £ • • • • " • . . " £ ~ ~ c ^ ^ S g s s OO ~ CM fv S oo — CM r~. m s o> o o» v> 3 o- o o~ o- s £ — Cm ~- — S — CM — — s S o o © O S O o o o s £ • • « s ■ s 3 3 3 3 S 3 3 S S 3 in &• m vS 5 vn o- vn vS 3 S m «*k CM o o rn CM s CM CM d- :J- vn vS vS o Q ««% $ 3 CM OJ 3- CM OJ m vn fn o 3 © o CM CM 3- CM CM <"n vn rn 3 3 TO o K\ o •TV O <>n O • 3 • • >o © m © m O m © 3 3 © o O o O o O O 3 O O © O O © © O 3 5 *» 3 s~ § vn vn t ft «n 25 vS — ft s oo S 00 a- ft ft TO o- o- — 3- w> Cj CM © ft o o l*> O- ©■ — 3- oo O CM ft s o» 3- — vn TO, * ^> vn • s • • Cj *• © 3- o 3- O ft o o o o O o O o O © o © © © O Q 3 a in ft vn vn ft — S *• OS 2 s o S o O ft s CM ° CM CVJ g R — — vn 3- -» vS CNJ o • R • — — m 3- — vS CM © R S CM r- CM r*. 3- vS <•<■. r- ™ CM I*- CM r- 3- s9 m r- a S vn o in o m o vn © ft vn o >n o vn © in o R S O o O o O C) O O c~- S vn in © o O o o O O o S £ 0- s CM vn a S vn s vS M? s 5 h- CM a CM CM a a z • s a s Vn o m 3- Oo nS •n O cc 3 vn o «n 3- OO -S •n o a 8 3- o- to o» \S r- *- oo n S *• o- m cr- v9 1^ 3- Oo s 2 vS o vS o vS o vS O Or r- S VT> vn v& o vS o vS © M) © 2 CO O © O o o o o O «*> O a B o >. s • O £ 2 o h- s o •T 2 o fO o- 3- rn rc> vr> vS CJ- * d- M " o m o- *- »n m vn sS o- *- 3- S 2 w-> o- OJ- vS O W» o- vn <»- — 1 OO ~ in vr> in o~ o- vS © OO 0?- vn ct- 2 g -~ r» o e»» — t^ o (^ O O © »— 1 v& 3 <*- CM — r- O l^> — r^ © r- o O O 3 2 o o o O O o o © «>» — J- oo 2 oo O- © © o © o © © o OO — 2 a C£ CM <7, OJ CM o, » O o- m UJ • » ♦ • © 0- TO » - o vn s» u. >- O vn vS r- i. o CO o a. "> o CO — OJ 3- rr> o o- :*- O © * CM •» o o o oo ~- CM 3- ^n O Ct- s- Co O n ■» o vn CM OJ CM m K> M~ m o- O o O » f*> vS o vr> CM CM CM «^> fn o~ •■n o~ CO ■r m — ©- — o- — C3- — QD ■— M o- „ <»- o~ — o~ — o- — c>- — 0O — . n N o o O o o o o © sS o i o IM o o O o o o O o o o vS o ~ - vr» vS in vS - •J m a vn ^5 M) in ~5 w 3- -5 or a CO ■o c 3- 3- CO 3- ~5 o CO OO 3- 3- "5 Co £ o vn 1 — UJ vo "B c CM PR0J5 373 cc Ck Ui G_ £ a: s C s sS r^- >s S v» v» vt> £ s — X? -~ — — £ ; o S 2 0- in v9 s S o- ~ l<\ S >»> CM rO s s -~ CVI £i CVI CM CJ £ s o s O O S £ • s . K S O v9 £ S E O CM E s 3- 00 2 S £ oo m Oo i- m -s 00 3- I s - 00 E 2 ~ CVJ r- cn s 00 •»> v» CVI 00 CVI S K - — CVJ s CVI 3 3 -» — • ■ • m C> «r >*v l»i «\ O 3 3 o O 3 O O 3 3 5 3 -» I s - O m ^~ *- * 3 3 Si — I s - ITk u> — ">. m "* S a\ s O — rev vS *- 0» OO Oo s s IS N. r- 3- O- — o O O "^ O- s 0- — ^~ 00 CM s s O- M> — Oo CVJ • • • 0- d- s — Uv n 3- 3- lO s — -~ •*~ ro O s *• *• O 3- O s o o CO O O s s o m u> vr> 2 £> o r- — i- o- — — — 5! m s m vS o in * a o o S s s CvJ in NS — ^ CVI CVJ CM ° s s vS * o» o vn • — — S in 3- -~ vS CM O s s o~ a- — «*> Cvi CM r-» S CVI 1^- i- v9 ■*>, I s - s R ^ — OJ in O R in O in O in O R s CC vS I s - r^- 1^- O X O O O O O S SJ o o 0- o- O- ^ 2 Cc o d- 3- i- o irv »n m S s s Cr rr> iri o- •»> CVI CM CVI CVJ S z s UJ CM o 3- * vS S S! 3 CVJ * I s - o- vj> in O S m J- 00 O fci O S 8 Z w> CVI (>=> r^> d- 0- s "-> CJ- v0 I s - 3- 0O s 2 o m I CVJ I-- t-» r- S O 2 vS vS O vS O 2 2 l-l d- v9 v9 v9 O O S O O O O 2 B H- o — — — • 2 2 ar I s - CVJ 0» r<% ro m en o 2 2 2 — n — CVJ CVJ »n CVJ \- . o £ 2 2 3 o ~- ~- — Cjo Z o 2 S 2 Q_ r~ in I s - * I s - az o rr> 0- 2 d- CV. ^ m sS O- 3- 3- 2 2 O o- o- «•> — *■ l-A Oo CP 00 m O- a- 2 v9 00 CJ- LD O- 2 a a. — cu tcv e: v9 vS v& — r-~ O 3 rv. — r-^ I s - O O O 2 s o cz: 0O 0> 0> o 2 O O O 00 — 2 o. Or vS > OJ CM CVJ „ » M o- 00 3 s «»v OO • • • o » O- m ~ ►. z — «% CM (<>> — £ o i~ in vS> - » Ul V» OJ in CVJ CJO => o u. .*. » > o v> CM »- — M CN< CVI cu- Ci QD -— ■» CM * m Cr 3- ^ » 3 o vS in l-~ vS o o o es o vn CM » CM CM <*» l*> O- r*> 0- » m o m. m rf> UJ cr- o~ «- — o- — ~ CJ- — 0- ~ QO -~ . -, ~ u-> S o o o o O ~ O O O O O v9 ~ - O in O - v» a CO V r 1. V. a O 1 — CJ> cf ti ■#- CO r- Ui >o c ro -5 t ■5 c_> a CO -6 a CO a 00 c5 Cf- 3 * CJ CVJ 374 DOCUMENTATION o m t CN H Eh H CO *J U H H EH «l O « ft in ft • ft H H H > «a D4 OS OS i-3 a -s V) S3 000©00©0©©©00000 • t*t«t«t*ftf«9t»« oooooooooooooooo ©0©0©©0000©©©©00 ©©©©©©©©©©ooooo© pa © ^ © «s © S3 © W • ft T- © (0 VO SB CT* 1 o w © T~ 1 1 H EH © © \o 1 1 1 OS o ft H3 © o 1 o fl 1 1 03 ft CO © o 1 1 33 pa o © o 1 1 EH X © r* H 1 1 o pa © OS 1 1 03 (0 o H 1 1 T— EH ft SB o © ss M \o O Eh o> (H <* *■ EH U « S3 U ft in o <-) O sr OS o ft r» ft OS ft 1 1 pa ■-I on a 1 ■a r- w w K S3 fNj EH EC 1 M U H 1 ft W 1 •-3 ft 1 O O 1 CO os 1 w U O ft SE 1 1 EH D ►J ■a CN se H 1 >-) S3 r m EH O SB 1 O & o M SB 1 to en & H H 03 T- Eh «* U «S S •-3 pa o EH © ft 03 H W O pa • •-a co ft tn 03 co in ft EH eh pa in SS +> SB H o X en ■a (0 *S 3! EH PQ H m co " 03 OS P H 03 < SB CO • «j O a OS H as pa > o o CO o S3 D M Q W 33 H EH ■a »-3 D ft O ft i-3 ■a EH O EH T-T-oiON^ncoWvOOOCNasr-incOCO f»iT-a-vo»r*»©<-3'©^-^OT-CT>r^ vo^fooaDi^inm^rorstNr-i-OT- i-f-T-»-©©©0©0©0©©©© 000©0©00©0©0©©0© CN^sC oin{Nocor*som*nin»~ (T)infT>inintscN3 , '-ve'~{N« »-a , w©o>< ,r >in»-t-\o»-r-vo^« — i^«-oo<" F »covor*»ioa , ro oor-*r»'- «vor>iu-ror» in5S/^r»vo©«yicy»a , fvr»^-oo^fN va»OiS-'~crir>»oinp r )r>)'-T-(N m n n i- t- i- i- T-inooT-«-vo«r>nNNi/ia , ONN aiinoocNou" , om©in©Lnoin »-i-- © © a o H in H o o 3- o o H • • © • • ft o © o o © © t o © ■ • f • T— ss © © © o II H u H II CO II II II II II II II u 03 -a W ft h ft 33 X X EHPaEHEHEHEHfHUU n at £6 ■a ■a * «a ft =5 z o o u OS as ft 03 M ■a < OS OS 3S 03 H EH ft 19 H 03 33 X X U u e eh Eh Eh H W W pa ft hJ ,j X H o •a «a w W ft O ft EH CO tA t-3 ft ft pa o ■a ■a a H SB EH SB SB H ■a H ft SB as CJ> ft PR0J5 375 m (M SO M W 1" ►3 H H EH « « * 04 (M O vo Otf\C (Tir Oifl Q\ 05 r» If) O 00 CM ONdNNOO t • t • • « t © © o o © o © cm co r» P* in » t- © vo vo o\ «- ro vo Cft 00 t- m O CO CM O P4 H H > <* W aa ca *-3 V) S -rT-T-covO*ro©vOeom*-erivOT- 'VOCT»O\CO00eOCOcoP»vO'nrocO^ - vO 'A3 t» -. C0tOOO^O>oS0^0^O>Cf)aDCOlD ■ •#•••••*•■••••• oooooooo©ooooooo ova-i-T-r-tfrooinvororocMinocM r^vochericocooocor-voinrooincoco cocf)Cficr\cneno>o > io^cyicne^^cor*'if) ©oooooooooooooo© W O i-3 © •4 © S3 o M * E* *~ CO SB o w © H a © 6-t © 03 s o O « 04 r" o 09 1 io as w O o © 1 Eh X o p« 1 1 O H CQ V} © • O 1 T— H 2 O O M X' H ffl «* T~ D f ■ Cm in O O h 1 1 M k3 CO CM O 1 «s VO w m 1 B H H 6-1 3 K5 X w D i-3 1-3 bk H c «e D a cm O o w o w *3 04 H oa , cMa , *vorn©invoi««cMror.ocM r-o>T-t-»cMfMcocMa-©cMr»cMoofn f^ro(Mr-COr-vO**cocMCMt-r-Ot- T-r-^T-OOOOOOOOOOO© r~ 0©©00©00000©000© 0"VT-cM^c»»^*-3-cococMo>ro^-roin OCM^CTiT-O^CMr-CMvOO^OvOoo OTIINOloor^vOS^fOfviN^^OO CMt-»-0©©0©0©©©00©0 r- OOOOOOOOOOOOOOOO tf*omro*r«r»cnr«.»nericrvincMCPi eoinroinin»-»-co«-ror-r-inT-r»© C0a , CMO00P»voa-*f r >CMCMr-r-©»- ^<-r-r-o©©o©0©0©©00 t- 0©00©00©0©0©©©oO ir-vOroOincMvOOOCMCMvOCMCft^' T-vooor»cpi^ , ' _ roininoo*r*'- iinoocMoovomr-aoa'^a'Poovo m ro vo Sr ro ro m oo cm ww - invooocMCMO'ovo'-oinoinro*-* vOvO»-0>C0O>vOCMT-C7vr^vO*fOCMfO ^coroCMCM^'^-'-r- r>«o»oo>voo r ~'avinrocMovo>cocMvo »r>wooooMflT"^ o o> oo oo vo.t- inmr-p»o>orocMoco cM*ovr»vooovoeoo>oocMO*s , ino covocncocrvvosi-^crir^voincocM^cM » ro is cn »-»-»- .- CMCMr-inOIOCMT-T-r-^t-voOr-r* t-r^T-«MO>T-inencfiroin»ooocrioo ^■CMrOr^COofNOOOOvOrOCMCOVOOlTi ^^•fl00»0^0*05^0)00)^voa a-ror-rocMin^a'^voro'~r»inpoin avr*-voina , ro'ocMCM^^'^ sras^as^os^as&os^asstas^ r-T-cMcMforoa , *minvovor» I i i i i i i I i I i i i ii + omoinoinomoinoinoinoin r-<-cM-3 1-3 (ij M W o << < Q e BE Eh E 3C M <« H W ■ 03 (8 Pu 376 DOCUMENTATION cv • o h r» eh OV HOT 1- -3 H H E-t EH MJ Ov MM «■ H • VO O vo vo Oi f^ co vo o> oo i" m o oo M H H > Ml H 03 03 h3 © mi OT S3 r»©' T >ro©aDr»inrvioo©oovovovD© enr»o>a»onooaoaoaoP»p»>f>' Y ioncvjr» COC^C^OACh0V0vcK0v0Vi7>OVOnoOQOin oooooooooooooooo ovot^r^or»T"(»>\ovoa»*r^*r>'© ©ooivor»i^c«iooo o>r»of>»oooooooor»voin |T i©vooo^ oowo'»e'>o'*o^oo>ww»cfiCfiOftooP*'t/i ©ooooooooooooooo w O i-3 << § Z3 © W • Pm T* to 33 1 o w o 1 H i-3 © t EH •4 © 1 03 ■3 o 1 O • 1 a< r- 1 o 1 03 1 CM t OT as eg O © 1 EH N r- 1 1 1 1 O H aq ot O o 1 1 T" EH 3 © H VO EH 0"> «* *" •-3 13 £ © O o * 03 CD U*> h 1 1 M t-3 m Q 1 Ml T- W O 1 & co Eh r* 1 M U c* 1 Pu H i- 1 O t O VO 1 V) • 03 1 H H 00 Cm 1 EH h3 r» © 1 D 2 v- S3 CO 1 >-3 ^ o 1 O Ov H o 1 OT ov H EH A H H H SB » Ml pa d i-J .-3 > H D Mi O « en o EH O OT B Dm EH ^ojT-coT-osrooooco'No^oco oinroT-fOfnoT-cfiiDoorooorooo© aD*«-oovr"»vomro<*ifN)CM^^©T- ^•^T-r-000000000000 oooOoooooo©ooooo or* , r"-m*-r»ova'oo©o>nivocNvor» ovotf(N^vp«o\airninou>ovovc envocNooovoirtstfnfnfvifviT-f-©© «-f-^*-00©©©©©0©0©© i- oooooooooooooooo oor««oo^< r )ror»vooD»~^ooc'vf"»cDin cn vosr*mr»mrninr»r-©a'p»i-oo(N «- b~ i ^ *ta- ^fl «Wk MM Mh i « «V1 _ ««h M^ I rt ^ (M m r^vor^cNvTicoovvocviT-c^p^uia-cvi ©ov*-fM inr , 'Otooa\o Cftaof^©srwr-3''~<7>r~v0is-f r )i— (n in*cocorvj*-»"-r-^ moo»oin^vor»voa>>o ©Ovif>COv7vm©r»>*c>r-©r»*eooo 3'vo^r-co»-cMoocor»c*vO(N^^r» 9 * t"» t- OV m CO i>voin*« , ocor>j:(N«-r-*- 3 , i7va-v7v*ov*cr>*ova-v7va-iTia' ^■r- rsl t • • ^ m vo © o © HNNH EH EH H EH «S «S «s «t 03 03 OS 03 M pa x x Eh H EH Eh 03 Ml H H H N i-3 h3 OQHH H EH H H 03 03 OQHH DDhh 03 03 UUJJ < rtl 03 EH 03 O Eh II II II BWH EH u U 05 35 SS H •< Ml m eh eh o u H M Rfl < Cu Pu M M OHM H H M M 4hh 03 H H hH >-3 M HUH W d 1-3 Ml Ml a 13 H H PR0J5 377 X H H W ►J W H H H •< OS M M Dm o in © in i o o © o o o © • «#••«♦ o © © o o © © o © o © © o © • •••••• © o © © © © o u ►J < *3 ^ u > u H H > «« H 05 OS >J d -a ©oooooooo©©©©©© oooooooooo©oo o o o oooooooo©oooo©oo o©ooooooooo©ooo© "O as C 3 H CN OH pa h D J H 03 H H 03 as w > d at o o © (71 © CI a o H 03 w 04 as o M u w n> o 03 04 N B3 Pu O as M as as M w 03 M 03 En M) 1-4 D O. O 04 W X! W W w «l 13 H 03 O 04 o 03 0j (0 I D3 H I H X I O W I 0) (0 I © w>" r »r»'r-(N'©(N © ooo3natfT-oovoa-^-r» O lOUllfia'I'ICIfSNrprOOOOO © oooo©o©ooooooo©o »" oo©ooo©ooo©oo©©© © oio3in^c^vo©ioo3o>vo © a , a>f^o>(na»*ovopo©r>infocMNaT-io^N(Ntfi- o>in**r>iooocM^a , rMr~r-oo«'cn>fi^^o>f>.voind»(Noorrio^»-p~r~r~ oai< r )a , ij30^*'-o©a , *a'' r )in^ a-ofNtNinoa-'-r-a'^ooiod-fOia i i i i i i i i i i i i i i i + omoinomoinoinoinoinoin r-T-cNr^mroa'a , ininieior , *t , >- © o a o H m 03 © o ^ © o W • . © . . a. © © © O © O • O C t • • • Y— as © o © © O II H W EH II W II II II II II II II UB«I www HOHX H EH W H EH Eh EH Eh U U n » 03 «* ■=« < aH 03 as BS o o u 03 03 03 03 H «* «* 03 03 as 03 EH EH 04 O H sr x H U U H Eh EH H Eh W H W 0- >J 05 oo oo «• m O od in • ••••• e o o oo o o o cn oo i- r* m * «•* o vo vo a\ r- ro vo en oo r» m o ao «* Od PS B 10 w u Ph ►J r**r»©cn*cri< >v if'»«~fOiNif>(N«— cn*s«- aovocnoaoooaoooaor<-voinrr)co'~vo oovTiavcfvcnCfiovvTvcncnc'vcncnocoDio oooooo©ooo©o©o©© ooaopomcNmot-T-oor^ini^vooas CM»»-^r»*ro©tnvororo a «* x CO E- X H D -5 H os e-t h os as u > o o 10 *4 in vO VO © ro o eh a H H o Ox 3 a w H *1 .1 B a. o M ►J •a SC W W ►J B 10 V) SB I O I H I 6H I 03 I O I Ot I O I 03 I a. i i au I I Eh X I I O W I | 03 tO I I © inf" > a - voinr-*'-vovar , »or'»r»©(N»-cNf>»in*crv' T >c'v*»-f , oin O wNinOMNOroVINvCOSOvfleS © aiinrvicncor»vo^»rr)r>»cNT-«-oo O i-T-T-OOOOOOOOOO©©© r- O©00000©0000©0©0 © cnoorMp»a-mooao©oovoopitnc 'i'' r ir" <-o m ^Or , vo*r»OVi-T')lfllOfi)*f»r- i/ir«inoo»oo*»-a' r »ovo ovoao(NT-intn^-p»cnorocM©fo r^^avfvooovocac'vooojos'iS-m© ("•vocnpocfvvotfr-av^vomrocvir-rvi a , f0lT-T-r-»- 00C0VOp«.O>t-tN»-rv)«-r0fv>vo«-(NCV a - (N*-(NCTvi—mcr>c'v' r >u">*cc©o\ao ©vorOr»0D©r»voin^roroi*visrcn»vTv;rcrv;»v?ij4*ovarcr>.a- T-T-tNjNPO^srct-ininvovor^ i • I I I I I i i t ! i < i i ♦ omoinoinomomom'^inoin r-T-N(Nnms('*iOifi'3vOM^ a M o * H vo po av r~ in oo in OV © OS ao © m *» *■= (N =r © O M ro • * «- CTV • © t t Ou © o © © ^* VO • r> © • • • • T— in vo SB © © © O o II H H Eh ll to II II II II II ll II U 23 «S h ta W H 33 H H MEhWHEhEhEhEhOU •^ at 03 «S =3 «; < 03 SB ss o o u 03 OS 03 03 M «s < 03 03 SB 03 H EH Ot u H 33 S3 >H >H U u EH EH EH EH EH P3 w H Ph ,:-' os «a M H «* Oi Qj 33 o SI H W ►J i-l X X H 03 a H HOHH H D EH H H Ph H EH W H 03 M H W w O «J >4 QQH H -s Ph Ph H « 2 D =3 03 03 Uu Ph 03 H H SB Ph U ■" h9 J X H O «i «S w w a O 03 EH to tJ kh a. M W o ■4 ■4 C: H EH H EI P3 C H u> Ph PR0J5 379 St O n r» H C* H W «- H EH H «J 9> MM tf M • r* oo *" m * r* u > ■* W a) n H 10 B r-.«-cimoaor»u">o>»ooocovovovo© ej*P"*o\o"(Crtoooocooor>.r»'U"> r 'iff»cNf*" ooo^o>cno^o>o^o^o^c7>o^o>o^ooooiD OOOOOOOOOOOOOOOO »-:3fr^voor»T-e , >v©vov7>»r*'*vo< r > ^0(Not\or~r»cf , c»cf>oop~io OOOOOOOOOOOOOOOO M ►J Ml B H o a-r>o*r>tNooo'-roir»ro^.^T-©a\r*.\om3 , < r )CM(NT-i-o' _ O »-^-r-T-OOOOOOoOOOOO «- OOOOOOOOOOOOOOOO O r» u W § » o H H Ml 1-4 D ft. o a. I 3 B I 03 I I I ! I I o M EH < D o- o Pu I I I ! ! I I I i co I w i o w i cq to o r»povooir»oiror»'-o)T-3 , r , »' r >r»r^ o oMeiNOOioinatfforiiNi-roo O T-r-r-r-OOOOOOoOOOOO «" OOOOOOOOOOOOOOOO o M'lt^ajoiooT-air'onwooJooio o incN»-cNr"OCfioo*r--»-r*'»-r»oo o oo m <\ o eo r» m m » n cn S'NooiflvoOh»inint«ovfn MS'-fMOUIifltSO^T-aSM'OI/lfN) ^O^iOI/lvOOVOOMflin*iOOOO r-vO"^vO(NONor»CfvOOI*>OvOOO>0 oor*r«-oa , <7»r»ij-^'crir-voi»'roT-fN minrsir*f r iif>oa , »-in'-inoovoor ,, » r^ONvofvia-»-t^- r-inp«f5iinmN*or"»9Neo(N) a , r05» , ( T )( , '1PO\0^ , *T-vO(r»Op»a - in ^•cnr^vointfoofocNCNT-r-t- a-ovcroNa'C7Na'cr>s»'cyi*ONa-ON* «-<- 04 H H > < M OS 05 J D <« CO JC OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO II H Cm o o f* o Eh o a w H o pa o as EH t ►4 D Cm o a. 33 Eh «SS 35 03 «8 03 H d as •4 as > H x n P4 D > H D Q O M CO S3 o o ro Q o H as w 04 o H Eh u 04 o OS Qi 04 S3 EH Pm o C5 as H as as H (9 H 03 04 to EH EH as o H EH «e .-} D Cm o CM CO as I o I H I EH I OS I o i a* I o M ►J 0m 04 1-4 «3 I I I I I I CO I 04 I EH 10 ta 04 03 CO o »-uio><»>ro**floo(Nmo^a3i^'Oi r » O 0\COPOo«oa>vo o mor^cna'W^OMaroof^infOf^J* O r»vO*rr)n<>lf>l(NT-^*"00000 O OOOOOOOOOOOOOOOO »~ OOOOOOOOOOOOOOOO o ©f r ic*mr-^ooinvor»^< T >c>i pr >ino O MnifltfflClNNrrrOOOOO O OOOOOOOOOOOOOOOO «- OOOOOOOOOOOOOOOO P4 S3 w Pm M ►4 S3 t CO 03 ve ro in <7t o rooo**or»icor*oflo p oocriin^ roinrominNsfooeo»OT-*o T-3'C7>©<7if , 0in^-^*O«-l"»vOin«-CM r»i-eo(>ocovocNT-aNr»vo*' r >(NCN< r i 00t"»*r-»T-CTi©P»\©osaro«r>r , »oo*»r>«©o\POo»T-r»f*-P» 04 © ©a , ^©o*sr*roin^ 3 i O«N3 , «-»VOa , fOvO ►J EH o i I I I I I I II I I I I I I + o^oiooinoi/ioinomoinoin ^r-'-CNCNror03'i»»ninvOvOP>r* H II co II II M S^ tn OS 04 04 04 EH 04 EH H EH •^ s es «« «a «s o o u as as as as as as CM C5 H 33 03 H EH EH Eh 04 tfc. tJ « <3 M 03 °S3 HW J Eh fflOH P4 S EH Om H H OS Kj «H O M < Q P H as as D D Pm H OS OS as Pm u u ,.j H o < O OS CM P4 04 p EH as H «J H 83 OS U> II II II II pa 03 tM im EH Eh (J U «i as as as «H 01 03 * 03 fa o oi oo r* r» m sr *" O * \0 W t- (») \0 0> 00 r- m O 00 *~ «*> vo O (N no (N W H H >> MS 0J 03 OS _3 D «4 to e oo v flen.o>ooooooaooor»*oin' r )oo^-*a ooo>o^o>o^o^oSo^o^o>o^9>o^ooaotn • ••<>§••••••••#•© oooooooooooooooo oooominfMin©T-«-cor»inr»voooo r^*oaio>aoooaocor , *voinrr»oinco ,,, i ooo^o^ocfvc^o^c^o^oNO^c^o^oot^Ln 000©©0©©©©©©©0©© M b M fa © c«m(N**vo' , >©in\or-o>rot*©(N O t-«-^t-©o©OOOoOOOOO »- oooooooooooooooo II fa o o O eh o V0 Q M Eh O H ^ O 03 fa EH < 1-3 s fa o fa X EH n ■< « H P 03 ■* 03 > H SB E H C > H D O O H en b If) cm o m o EH Q 03 EH U H r> o 03 fa SB O I o I H I EH I 03 I O I fa I O « ■-1 •as E 03 fa O I 03 W ! SB I 03 W I © o">*~enT-o>^-^ - *c)OOCNCMro*~p"itn O Nri-OOOOOOOOOOOOO t- OOOoOOO©000©0000 © fnu">©in rr >^r>-r"*o^r"'"mo>o>ificMo> © oomroinmT-T-ao«~f)r»*~in'— r»o © t-^^t-OOOOOOOOOoOO 1" 0©©0000©0©0©0©0© 03 ►H «i E M fa CO u w H .J 13 «S ►J E o w 0) MS Eh H in m 03 oo in o> o' T )r«'flo*»-*poovo JiOONINOfHOrOlflOinrOr* ^OvO«-CT>' r ICnvOCNi-cnt"-i©a , cr>CNr'1 ar >o^inovoo>in< lr )«-o>o>oo(Np« mrP»r~o > iooocriin' _ r» ©erir-aovOT-minT-r-CKocicNOco cN^cnr»^ooovocoo>oo(sio*^»no ooioairoo^vo^r-or^voinfnfNT-fNi aooo^or»o > ir-tv)»-rst»-rorMio»-CNcn r»(N'-(Neh'-inaier(' r iin*oooa>oo O>lOC0r»00©CNa0C0lOcr>d-o^^-cri^c^a'cri=S'o > ii3 - o > i.a- t-r-cNCNcoroa-a-mmvovor* i i i i i i i i i i i i i I i + omomoinoinomoinoinoin en • II a vo o a- H © m 03 en o M ci . fa o o • sb o o II h w EH || 01 y ta «< W Eh 03 <-3 m « o o u 03 m SB fa O H ro oo n H >H EH EH H H ►J i-3 H H EH H 03 03 w w fa fa ►J h3 MS MS 03 H 03 O B Eh 03 II II II 03 N X EH U U 03 SB SB H MS M) 03 EH EH U b EH 03 M M] fa fa N X O 03 03 H H W 03 Ml fa fa BHH .-3 1-3 XI U N fa 10 i- 3 r-J Ml MS E E H fa 382 DOCUMENTATION o x r» H C> H W r- H H H •» 0> £B CB ST W • Dm id vo cn oo r» r» m j» *- o vo vo ON •" <*> vo » 9J»" m O 00N OMflNNOO • • t • t • • o o © © o o o cm oo r* i-* m * «" © to *o en «■ 1*1 vo o\ oo »- m © 00 (M O fcS H H > «S M OS « h) s «s to s r-t-mPOOoor^mcNaoooovovovo© erir^ef>criO'>oooo©oor»i*«iD' , ocri(Nr* aocncno>ot0>crieno>cno>c*cnoocoin 0000©©00000©0©0© »-*r»vo©r»^pn»o*acPia , r>*vc f, i T-orvirMOvvomcNr-ovor-i-rvtaoo cnr-ooioooooooor-vompoovooo* ooo>cncMC7»cnONc«o>OAONCf>a>cop»io • •••••••••••t««t O000©0©00©0©0©00 CO SB I o I H I H l OS I O I Q. I O 63 S3 W •4 © *T-prioo»-r»-*r-oo©POCN©v-o > iP , i O ouir^T-roroOT-cnvnoofloorooo© © T-T-r-r-OOOOOOOOOOOO • ••■••••••t»t»t»t 1- ©©OOOOOOOOOOOOO© © epivor^in»-r»c>vs» , co©cpi voPOin©inovovo © e*vO H s a W D > H a q O M to E o © o o © o En Q pq H U W 1-3 O OS 0.1 2 o M «C ►J D CM 2 p* a- in I CM CO 1 t 33 M I I EH X I I O W i i m wi i i < -3 D CM o Cm « ►J & M Bm (O • w u r» EH J en D «* w ►J B *- O Cr. 10 o> CO CM •4 33 10 ON HH vO OX vo SOW vo co co VO oovoo i VT~c r )ror*vocoT""T— coovr"*coin ovcNOrvir^oaooeria-r-^-vOT-j-oo COI/lNOBMnuiOONCvirrOO »-r-«-T-0©0©©0©00©0© r- ©©©OOOOOOOOO©©©© oNT-oovoooomr-rooooNCNoornr* mr>vot-(ninrrnnoiniOkoa5( , ip« vopo*ior>inroif)r*»"0*r , *'-oo(N r-'vor , >-(Ncn< Y icftvotN»-oir*ina , cNn iDa-rr)rr)CN04T-r-r-i- U">C0a'rv|00invO©r>"00ininr«'O'v^P'1 r»©'-(N©inif)CN©*«-cor«roifirvi om«~voi/>vo©vo©r»ininvovoco© oooPOvocNovor^cMoor^ovooov© O>00r>-©*'Ovr»'3'r-O>r~voa , rr , )^'CN m » it m n »• i- i- i- oopo(Nt*«Pomo3 , T-inT-ir>oo>ooi^ vocN©ooaNU">T-roa , ro*-©t s »*oON ^■CMaor»oo»-CNoopnr^o>vo II Q © O VO M PO CO po PO ov cn m T" * 03 T- o VO © * PO S3- © © H * • a- f— CTi • © • t CM © © © © ^» VO t Ov H H EH > «J H « « H D O V) JO oooooo©ooooooo©o ooooooooooooooo© oo©ooo©oooo©oooo ooooooooooooooo© n II H Oj o o r~ o S-t o VO o W H CJ W •-3 o 03 © o ro Q o H 05 w o H en u w •"3 o 03 & w 33 Eh o 19 2 H W i-3 < 03 W W >-3 «« S3 I ft. I O I 03 a. i I l V) B W O « I 03 W I B9 o as H 2 EH H H < SB O © o\<*ir*r>-(NCNcor-o , »rMinaf)^'0>voOr>irsiT-voiDvoaoaNvO © a , a»t^aii , oo>a , ©*o' r »or , »in' y >cN» O r»in»(n(»)(MN(\|rrrOOOOO O OoOoOOOOOOOOOOOO r- OOOOOOOOOOOOOOOO o r»or»«~vow[—irtvop»T-© o r-inuia'ncvjrMfNiT-^-T-ooooo O OOOOOOOOOOOOOOOO • ••«••#■#•••••••« 1- ooooooooooooooo© ooo**oi*>oor»oaoi r ioo(ifi'- nmroinino>»cNa'T-\o»-cNi(N*'-cN » «* Oi 03 O < 0. > 2 tw «l H aa h 03 h3 D H H 03 03 H H 2 Ph W t» B a m O H w aa w 03 W sc EH H «l E-i D O On w i-3 «a ■3 W It, to H H eh .j D -» t-3 B O to n e to EH W © in o -»- ifia»ifivDr^irt©^r-'-fNCMw©in© Ni-om'-os'invounft'-aionr- o>in*str-vocoa><7>*cNr-r~co;>'r>i f) (\| fM i— «- r- t- «-inoOrt-OiOM»)(NNinSO(N(N ^if»03(Nia■0^^• r-T-in*cvor» I I I I I ( I I I i I I I I I + oinomoirtoinoinoinomoiri o o a o M as w 0w 2 O H Eh u n o 05 04 o © o m o * © © t o • . © © o © • o o • • • ^ © © © II II II B X » H U U 03 2 2 H Ml < B Eh Eh L> U EH M 03 «s eu 0j H x O M M H Eh W M <* W W M H H i-3 -J WWW tO hJ i-I ■a «= B E M h II B to << II W II W WW H H EH in EH H at 03 «a «s < ««! O U 03 Q5 or, « 03 2 O H B m l« >- H EH Eh H w ►J 03 Ml M M o «S H W >-3 i-3 05 B Q H w O H H EH H H 03 03 « «S «»l O Q w W 05 2 D 05 O 05 w w hUUi- o "C «s 03 Eh w W o Eh 2 H m W 03 tD 384 DOCUMENTATION in SM VO H 9\ HOT «~ ►J H M EH H «* « « 9 u • Bk O vO O o ui ifl in 1/1 in o r*> o> en (n ;» vo r» • ••*••• o © o o o o o in * «- O VO VO Cn •• CO vo en ao *~ m o oo w H EH > «* B M B i-3 D «B OT B r^a-r»©a»»cncncpiBr'»in oo©ooo©ooooooooo M o J © -B o S © H • B t— OT SB 1 o B o i H i-l o i EH «S o i m B © i o t i Oh f* i O i 03 i i i OH 1 1 OT B B © o o n i 1 o EH i 1 1 03 OT • a, SB o o o & r- «S O D • H Oh O in O CM CO vO H CM «a sb < ►H - H a cs -e w Oi B EH o «*• U # en > B B OT CN rj EH W in SB |M o O W in «« EH B B H m a h ft» (0 m « i-i o ° H SB m EH o B « H H M EH SB B «a g 3 D U & EH O H OT B s O EH oro©rorvitnr>o»- 00Wf-00OIM00M»00 ovinoi p< > JrO rooicncninovocninpOt-cncnaorNir- ©p»oovo^inin^-p«.o > io' r )vo^T-a>r>voinrocN^"i^cv»T-rr)rv|vo»-r>40'v »(NT»fMo>^-ineTvo>rnin*oooo>oo T-vOrOP>-CO©i(*)ro*a'ininvovOi> i i i i i i i i i i i i i i i + omoinoinomoinoinoinom «-^-ot O C* W H EH > «* oa oa m ** o «t V] K *o< r )f»r»in»-invo*avtnra>ooooooflor»r»inrowfMi^ COCnCnonCnCftCnotCTlCnc'vCrvCftCOCOtn ©©ooooooooooooo© T-*r*vO©l^ r *' T lvOvOCTv*r*»* 1 0< T > ^o(Nr-a>\or*r»(Nooo fft^wwooooooco^icinmoico)* aDcp»c^cftoScTvv7vcf\0vc'vcnc ft cyioop , »in OOOOOOOOOOOOOOOO H o H o •OS o s o H • Pm T" 10 SB o P4 o H ti o H o IB S o O • Cm T- O M 04 1 1 (0 33 P4 H X o o o fO 1 O H o II I CQ CO • EH I V- CM SE O o H O H t- Hi O S * Eh 04 o m VO o Cm 00 lO 1 1 H ►J r* Q 1 «* (M w o 1 JEJ m H r» 1 w u ai 1 Cm « r- 1 ►5 1 o VO 1 CO • 05 1 w H r- cm 1 Eh •J O O 1 o Ml w 33 CO vO •^ En H VO x » o O X o «e H 03 m W o a h Cm 10 (N 05 1-4 o» D H X VO e-t o « « H H H H 2 Dm «: W ►J i-3 > 03 D < D 19 a, H O H o O to tu CD H in^r»(Nvo< r >»~*vocTVT-oc?>oootN l0iflv0i-(NI'1Ora\9(0rr)M»)OO oosr^-ocTvr^vomnrofNirvjr-t-OT- «-^-r-^-o©0©0000©000 f» OOOOOOOOOOOOOOOO mcnootvoa-m^vooooo^mcNvor* roo^i-ovovocTvcnoiinoinovovo CN^T-t-000000000000 f" OOOOOOOOOOOOOOOO T-o'vfNvooooa'rovovTiovooovor-in f((NO'"vOO(DOOVfOI , >i-vOrr«flO OMnNOOM/immnNNrrOO t-t-^t-oOoOOOOOOOOO r- OOOOOOOOOOOOOOOO C7»fO0Oinin»"a , 3 , S'a0VOt-r-t^CfV3' vofoeovoooOinr-rooovTifNOoror- m^vor-rom«-ovooocor» ( y>r»»in(^inroinr»^-oa , r^t-oocN aovor-rMav |T ivT>vo(NT-avp~in^(Nro m^rOI'KNNi-r'r-i- coo^tNcomvoor^ooininr^enr-rr) fr)inr-(NoinincMOsr»-ooi— romcsi ino«-voinvoovoor»inmvovoooo t-^covocNovor-cricor^ovoocTv© t-oor^o^vnr^srT-air^voa-pot-cN VOSPOItlN'"!-'-'- votNCNr^ciinoa-^-in^-inaovoor- oc»oooin*in (N»hVOintfOP)N(NT-«- ^■v7vd - ov'*av5tcTia , cr\a-CM^cTi5t- r-<^fNoi' r )(T)^"*ininvovor* I I I I I i I I I I I I I I I + oinoinoinomoinoinomoin »-^'(N(Nroros» , a , ininiovor»r* Cv • vO CT\ Q 00 O VO H T" m (N a- * r» m »— a- od fN o r- o en a- 3- o o H 3- • ;r r— av • o • • Cm O O O O 1— vO • OV (N • • • • »— in vo 2 O o o o O II H w E-< II 10 II II II II II n II g X «4 W H w w 33 X X HWHEhE-iHEhUU n m PS »* «S «t < OS IB a o o u 03 05 03 05 M <: «* as as S5 CD H Eh Oi O H BO a= tM tM U u H EH H EH H W ftj W Pm J 05 «* H H «* CM CM e o «B M w ►J ►H x< X 05 04 « H M o w w D HHH PM H r: O «d Md o tt H W «s H Pm 05 2 p D ft- ft- 03 M H 05 03 hJ *H SC Pm u u -5 iJ X w o < «: w w 6J o 05 H to ^1 >-H Cm M W O <* Ml O H SB H ■a E H < pa W ■ 03 u> Pm 386 DOCUMENTATION t © • o in o ■o oo r* r- r> so r» w ^ © Cft a\ v© r» X H H "> ►4 W H EH &■« Ml M « « Ph © in © in OOO09K)O f^omsj©©cr>vcoo^'oom T" PO 00 ^ PO PO CPi ^ CT» ^ in *• © © © o EH w to M oo 09 O OS 03 H B5 o H EH gz 1 04 < O H 04 03 «o os > H z & w o > H D Q O W 10 & © vO © ro a o H « 04 Qi Z o H H U 04 O SO o< 04 K H &4 o o as H w CD M 33 Eh H «a z o H H «S t-4 D Cu O CM 04 ►4 ■4 E J 04 > 04 H H > «J! 04 03 as ►-) D < to as 04 h4 <0 E 04 I fo CO z o H EH 03 O a. o OS o. CO I 93 04 I EH X I O 04 I 03 CO I W ►J •4 oo©oooooo©oooooo 0©000©©00000©000 000©000©0©©00000 oooooooooo©ooooo o r^T-invo^tNfrir^cftt-^oooor^ocg O 0000C0(Min©<*lOv0 ; »' _ 00 v 0sJ'*f* © lOiflinsclitNlNrri-OOOOO O 0©00©©©0©00©©00© t- O©0©00000©©0©©0© o chOfnvOffNrocoOaocNicucTiOT-w © eopor^^-in^m^-r^po^r^ina-po* o r»vo©3-poPO'\o(NtftN3'»-r»' _ in*pocnv03-»~air«voinro(N«~r- vo nN I rrrr r-lflO^T-vO*OM'1NNin*ONN er>eoeofsirMoocvima*t~**»-inr^ r, < a , (Mf«1t^03©rOCA^r*l*»r~ *oinfNin©a , T-r*s» , »-coioi» , ooio r~votNa , roroCN(N'-r-»- f-nMNfici9*ininioior> I i I i i i i i i i I i i i i + ©momoinoinotnoinoinoin r-t-iNrsooooa-a'ininvovor-r- II a o H OS 04 &. © • Z © o H EH |l U as 04 EH >-3 * O O os os o< o 04 h « O 04 Ph H OS EH z H O 04 o © © © © © II 04 10 || II «S 03 04 04 EH Eh os «a «s U 03 OS Z H 03 S3 EH H ►J 03 «J! <(HH 03 CQ O D Eh N W < P Q SB 5 D OS OS ph u u o 04 m © a- © © . O t . © © • o © II II 04 04 H EH os os X x EH EH H H H H 6H EH 05 OS W 04 On Ph k3 J «s «: 03 EH 04 O Z Eh 04 II II II 03 X X H U U OS z z M aj >* 03 H Eh U U EH P4 04 rt Oj Oj M M O 04 W H EH 04 04 •a h Oh 03 H M X www to (4 1-4 OS «S B E 04 D O 04 OS O z 33 EH to to 04 h) 10 H Z o H H •4 h4 H, s CM CM O 03 04 o 04 E i-4 Q< < E Z 04 H Ph OS OS O O OS OS 04 04 i-H EH E © 04 04 Z 33 H Eh I 03 I 04 m «- EH l» H cn 04 © Ph • O O Z Pu D 03 O O 03 05 ts OS H 04 (9 in < o w os z 04 o # ♦ # * # » • • ••00>0">f^ • »©o • toonNa-n ©r-coauo^-invooovocoo ©Ot^(Nf^min T *oococo^ inint*-cT>co onoro oa-ro •••• ^oa ro *" o©o© • «o© # »o Ot* Ifl 00 o> rt-flr-OONff^COinoDCOoO r^oa>i^m*T-r*o>cocnoor-T- r>-co o\in ©oootNCN vO r- CO !C f !O>CnO > > • • m =t in s- \o in t«tioo *r» o (n in in © O t • i • c • ro in r- inoo mfN*c7>o , >o>f , *-(** O^VO 3 00 *0 »- • • • "OvC* a-i*" or* oooomm ro ro CO J* (N cn in p-- in • o cs oo t- m in ai © • «- 00 r CM CO EH z 04 E © • 15 00 os in «e cm en EH VO D m 04 z in >"3 II O II « || OS E E Ph 04 O* CU O* o • CN fl vO ro • © 00 * «- VO 00 P» i O O © o CTi IN M . O O' o en ov : © o< oo < II Ol. E 04 II E M to II On X to II II i- fM OS OS Oh Oh I to in i ft < ' PR0J5 387 CM CM t- en m o r» oo on on o o ON O rr> © © f» CM o os cu eh H Eh O O O D 95 OS OS tA ft) os « as M EH H as o _ o *i eh n » H O O Eh OS H OS II II K B «] Oj EB Oi 3E Pki WO ►J O, Eh Oi Oh 04 t> H D D Q ft. * * O M O * » m ■ & * # ro on ^- © in an a en -r on vo vo oo p» 00 1- on r** on © • • # • o o o o o 9 p» o • CM © © CM © r» m © on o © co m oo cd on © on © • • • • © © OO © cm m r- «• r* on a- »- rvi t- i- on © on ro on en on on • • • • o o © © i «■ a- en ,- i • ro in P** (N © t- ro r- m on en on m on on on en • • • t © © © © CM © in ;J- ao i** fo tn a- ro m © vo in vo vo en on on on • • • • © © © o OS O os « H sa o H H «fi EH as 04 «a O H ft. OS •n te > a K H M •"3 s ft. vo vo (N CN O O • . O o o • o oo -*■ sr n ro © © © o • • © o o • o o o in m o o m o oor^voooa-cNcocNcovo m "l in * en » en * co m • • # t o o o o • • • • T- © «"- C) • • o o • • m m m m p"- in oo * en vo en r» * * • t • • o oo o o H t • • ih«m* • • O O • • OO\9 00CD« hA OO9t^OO^C0 00C0 00(N < co r» (N r» en p» en oo Q a- m • • • • C» o o o o W m o SB •a » • • • o a - P* r- tn • . o o • ■ OOTitNOV H o o r> a> Oto oo^c-^i m en i£ o 9\ co at oo i- t- CO vO vOi- • • • • v© vO to oooorsts W o o (J • • o o to H o o SB t • • • vo r» ro cn c> co O • • mo • • ©©cvir»eivococo H O © r- ^ O C H t— t— en c-cnvocnr»'©© O M CM 5» a-^cocncoencMcM SB fa «B O (N oo cm • • • • o o m o r» r- o o o o en en a at O EH o o © O M D • • • 03 (9 fa OOt- es SB W W H « II II in «« m r- ^ ^ II II II II « « II o w o ii B II fa b fa fa fa ca 03 SE 03 B B fa S X X SO 10 03 o< o fa fa fa fa q« co to «a mi so * # * # # * PR0J5 389 co <"■> m © r» CM r« 00 en O • oo ao o * • • O • CM «■ m © © © © cm r» in o oo CM 00 © en s» en * t • • • o o o o t »- p» © IT) • • ©• ^ en ^ CM © © © m cm i- m © r» oo *■ o>»offir» © © © © o aa • r» a- o © H •• o • © © in co N OO O © © © © © © © CM o en P* en © H • • • • © o © © -B S a m © • en en © © • at •• o • en co © © o O OO O ©CM©© OO © © en en r- «— as en © en © © © «a • • • t CM CM 09 O © O O © O H • • © © O • OT O W oo M * ^ ►j • mcMr-r-fnco • • © • tf hf)r ©© ot o© o cm i"» en © o© h cnoenco ••© Pm en en en en o o • ft, to • • • • o H W OOOOOO M «1 «- T- O E O O H CM CM ■ Bu • . O oi • mmmto oo > H n • • o« t^cocM* o O ©O O CMP»f>© OO as en fi en in r» r~ hot en en en en en en w ....mm 03 iJ oooocmcm o <* • • © 03 JC © O • 05 O W 03 O O o M r- r» t» H a • © en in © © © en ©H «» ©• f)©eneo t- «- «- OiH oo © o©oo rn <*) as w r» in r» r« ..o ©H encnenenoo* od • • • ■ o I O o o o o o o O I fc. © © as m iOO O *- SB © © 03 O © O CM CM os H en m to «.o M ohw . r» in i- ro oo • q «»i d • . o • cm *j o as w • p-J i-J o o o T-cnr»® oo O E-i o © < en © en r» cm cm H (_> as o, s» © en © en o o en E-< M O ••••incnencn «« >T3 DC Ou H © © © © ST © O • hJhood o • >or> b as 03 as ►-) a . o o • © a* «s Oi as «s ac t- ocn O H M H H r- 04 as as o II II << O i-j eh i-j » II r- cm II II « > H O O II II 03 03 03 03 H H 03 W 03 II || C te 03 fe Bl, «S H see < o, m a. e Pn x x nu,ina<4 wo ■-) fti eh Oi oi ft, io to os «s «: cm a > H D D Q PW * « O W O » * 10 E Oi * « PSPP I. DESCRIPTION OF PROGRAM A. PURPOSE To print out the distribution of a stable population by 5-year age groups, the cumulative distribution, and other parameters of the stable population distribution. E. DATA NEEDED 1. The indicator of the life table source of tbe 5 L x used to calculate the stable population distribution. 2. The intrinsic growth rate. 3. The distribution of the stable population. 4. The cumulative distribution of the stable population. 5. The other population parameters for the stable population. 6. The sex of the stable population. 7. The life expectancy at birth corresponding to the stable population distribut ion. II. METHODOLOGY This is a print subroutine. It prints out the information supplied to it . III. MAIN PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CAIL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL PSPP(NREG, RNG, SP, COHSP,CSP, NSEX,EO) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single- valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine variable names SP, COMSP and CSP in the argument string are all arrays. The following dimension statement must be included in any main program using this subroutine. DIMENSION SP(18) ,C0MSP(18) ,CSP (13) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION HITH THB PROGRAM. See SPP 392 DOCUMENTATION FORMAT REQUIREMENTS FOB CARD INPUT DATA POR THE MAIN PROGRAM GIVEN IN SECTION V.A. See SPP IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE PSPP (NREG, RNG,SP,CUMSE, CSP, NSEX, EO) B. DESCRIPTION OF ARGUMENTS. Name NREG How Obtained Definition RNG NSEX EO SP CUHSP CSP Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In Source of the mortality by one of the following Coale-Demeny Model Regi indicated by 1,2,3, or North, East, or South, B) an empirical life ta C) a United Nations* mo For any other value of assumed that the,-L val empirical life table an written out to indicate subroutine continues it Intrinsic growth rate. data as indicated : A) one of onal life Tables 4 for West, respectively; ble, NRSG=5; or del, SREG=6. NREG, it is ues came from an d a message is this and the s calculations. The sex of the stable population distri- bution. NSEX=1 indicates males, NSEX=2 females, and NSEX=3 both sexes. If NSEX eguals any other value, a message is printed out and the subroutine continues. The life expectancy at birth for the stable population distribution. SP contains the stable population distribution for the 18 age groups 0,1-4,5-9,..., 75-79, 80+ calculated by SPP. CUMSP contains the values of the cumulative age distribution for the stable pop- ulation for ages 1,5,10, 15,... ,75, 80+. The last cumulative age group (80+) should be 1.0. An array of 13 stable population parameters and summary ratios calculated by SPP: CSP(1)-The intrinsic birth rate CSP(2)-The intrinsic death rate CSP (3) -The average age of the stable population CSP (4) -The proportion of the popula- tion age 15-49 CSP(5)-The ratio of the births to the population 15-19 CSP (6) -The ratio of the population under 5 years of age to the population 15-49 CSP (7) -The ratio of the population age 5-9 to the population 20-54 CSP (8) -The ratio of the population age 5-14 to the population age 5 and over CSP (9) -The ratio of the population PSPP 393 0-14 plus the population age 65 and over to the population 15-64 CSP (10)-CSP (13) are gross reproduc- tion rates which are calculated only for those cases when the source of L indicated by NREG is the Coale- Demeny Regional Model Life Tables. CSP (10) -CSP ( 13) correspond to mean ages at childbearing of 27, 29, 31, and 33, respectively. C. ERROR MESSAGES None V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM See SPP B. COMPUTER LISTING POR SUBROUTINE PSPP SUBROUTINE PSPP (NREG, RNG, SP,CUMSP , CSP ,NSEX ,E0 ) c C PROGRAM NO. 1000 c C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE NREG, RNG, SP, C CUMSP, CSP, NSEX, AND E0 . C THERE ARE NO OUTPUT ARGUMENTS TO THIS SUBROUTINE. C NREG IS THE SOURCE OF THE MORTALITY DATA. NREG = 1,2,3, OR 4 c INDICATES A REGION FROM THE COALE-DEMEKY MODEL LIFE TABLE c SYSTEM, NREG = 5 INDICATES AN EMPIRICAL IIFE TABLE, AND C NREG = 6 INDICATES A UNITED NATIONS MODEL LIFE TABLE. C RNG IS THE INTRINSIC GROWTH RATE.. C SP IS THE AGE DISTRIBUTION OF THE STABLE POPULATION GIVEN AS C OUTPUT. C CUMSP IS THE CUMULATIVE AGE DISTRIBUTION OF THE STABLE POPULA- c TI0H GIVEN AS OUTPUT. C- CSP IS THE PARAMETERS OF THE STABLE POPULATION GIVEN AS OUTPUT. C NSEX IS THE SEX OF THE STABLE POPULATION. c go is THE LIFE EXPECTANCY AT BIPTH OF THE STABLE POPULATION. c c DIMENSION SP(18) , CUMSP (18) , CSP (13) NPRNT=15 WRITE (NPRNT,10) 10 FORMAT (///,15X, 19HSTABLE POPULATION /) IF (NSEX - 1) 12, 11,11 11 CONTINUE IF (NSEX - 3) 14,14,12 12 WRITE (NPRNT, 13) 13 FOBMAT(22X,42HSEX INCORRECTLY SPECIFIED IN PRINT ROUTINE,/) GO TC 45 14 GO TO (15,25,35) , NSEX 15 WRITE (NPRNT, 20) 20 FORMAT (22X, 4HMALE, /) GO TO 45 25 WRITE (NPRNT, 30) 30 FORMAT (21X, 6HFEMALE, /) GO TO 45 35 WRITE (NPRNT, 40) 40 FORMAT (19X, 10HBOTH SEXES, /) 45 WRITE (SPENT, 50) 50 FORMAT (6X, 56HAGE PROPORTION CUMULATIVE PAHAHE 6TEFS,/, 15X, 20HIN AGE PROPORTION , //) WRITE (NPRNT, 100) SP ( 1) ,CUMSP( 1) , E0, SP (2) , CUMSP (2) ,RNG 100 FORHAT(5X,5H -1 , 5X, 2(F6.4,5X), 5X, 625H LIFB EXPECTANCY AT BIRTH, 3X, F5.2, / S5X, 5H 1-4 , 5X, 2(F6.4,5X), 5X, &25H INTRINSIC GROWTH RATE, 2X, F6.4) WHITE (NPRNT, 110) SP (3) , CUMSP (3),CSP (1) ,SP (4), CUMSP (4) ,CSP (2) 110 FOR HAT (5X, 5H 5-9 , 5X, 2(F6.4,5X), 5X, 394 DOCUMENTATION &25H INTRINSIC BIRTH RATE, 2X, F6.4, /, &5X, 5H10-14, 5X, 2(F6.4,5X), 5X, 625H INTRINSIC DEATH RATE, 2X, F6. 4) WRITE (NERNT, 12 0) SP (5) ,COHSP (5),CSP(3) ,SP (6) ,COHSE (6) ,CSP(4) 120 FORHAT(5X, 5H15-19, 5X, 2(F6.4,5X), 5X, 625H AVERAGE AGE, 3X , F5. 2, /, S5X, 5H20-24, 5X, 2(F6.4,5X), 5X, 625H PROPORTION AGE 15-49, 3X, F5. 3) WRITE (NPRNT, 130) SP (7) ,C0MSP (7) ,CSP (5) ,SP{8) , CUMSP(8) ,CSP(6) 130 FOEMAT(5X, 5H25-29, 5X, 2{F6.4,5X), 5X , S25H BIRTHS/ POP. 15-49, 3X, F5.3, /, 65X, 5H30-34, 5X, 2(F6.4,5X), 5X, 625H POP. ONDER 5/ POP. 15-49, 3X , F5.3) WRITE (NPRNT, 140) SP(9) ,COHSP (9),CSP (7) ,SP (10) ,CUMSP(10) ,CSP(8) 140 FORMAT(5X, 5H35-39, 5X, 2(F6.4,5X), 5X, 625H POP. 5-9/ POP. 20-54, 3X, F5.3, /, S5X, 5H40-44, 5X, 2(F6.4,5X), 5X, &25H POP. 5-14/ POP. 5+, 3X, F5. 3) WRITE (NPRNT, 150) SP (11 ) ,C0MSP (11) ,CSP(9) , SP(12) ,CDHSP(12) 150 FOFHAT(5X, 5H45-49, 5X, F6.4, 5X, F6.4, 3X, S32EPOP. 0-14 + POP. 65+/ POP. 15-64, 3X, F5.3, / &5X, 5H50-54, 5X, 2(F6.4,5X), 5X, &25H 1IFE TABLE: ) IF (NREG - 1) 152,151,151 151 CONTINUE IF (NREG - 6) 154,154,152 152 WRITE (NPRNT, 153) 153 FORMAT(/, 1X, 34HBAD REGION GIVEN IN PRINT ROOTINE./) GO TO 245 154 COHTINUE GO TO (155,165,175,185,195,205) , NREG 155 WRITE(NPRNT,160) SP (13) ,COMSP (13) 160 FORMAT (5X, 5H55-59, 5X, F6. 4, 5X, F6. 4, 4X, 831H COALE-DEMENY WEST REGION MODEL ) GO TO 220 165 WRITE (NPRNT, 170) SP( 13) ,COHSP( 13) 170 FORMAT(5X, 5H55-59, 5X , F6.4, 5X, F6.4, 4X, S31HCOALF-DEMENY NORTH REGION MODEL ) GO TO 220 175 WRITE(NPRNT,180) SP (1 3) ,COMSP (13) 180 FOFMAT(5X, 5H55-59, 5X, F6.4, 5X, F6.4, 4X, &31E COALE-DEHENY EAST REGION MODEL ) GO TO 2 20 185 WRITE (NF5NT, 190) SP (13) ,COMSP (13) 190 FORMAT (5X, 5H55-59, 5X , F6. 4, 5X, F6. 4, 4X, S31HCOALE-DEHENY SOOTH REGION MODEL ) 220 WRITE (NERNT, 225) SP(14) ,COMSP (14 ) 225 FORMAT (5X, 5H60-64, 5X, F6. 4, 5X, F6. 4, 3X, 632HGRR FOR MEAN AGE OF CHILDBEARING ) WRITE (NPRNT,230) SP(15) ,COMSP(15) ,CSP (10) ,SP (16) ,COHSP(16) ,CSP(11) 230 FORMAT(5X, 5H65-69, 5X, 2(F6.4,5X), 20X, 10H AT AGE 27,F8.3,/ &5X, 5H70-74, 5X, 2(F6.4,5X), 20X, 10H AT AGE 29, F8.3) WRITE (NPRNT,240) SP(17) ,C0MSP(17) ,CSP (12) ,SP (18) ,COMSP(18) ,CSP(13) 240 FORHAT(5X, 5H75-79, 5X, 2(F6.4,5X), 20X, 10H AT AGE 31,F8.3,/ G5X, 5H80+ , 5X, 2(F6.4,5X), 20X, 10H AT AGE 33, P8.3) GO TO 265 195 WRITE (NPRNT, 200) SP ( 13) ,CDHSP( 13) 200 FORMAT(5X, 5H55-59, 5X, 2(F6.4,5X), 5X, &25H EMPIRICALLY DERIVED ) GO TO 245 205 WRITE (NPRNT, 210) SP (1 3) ,COHSP (13) 210 FOPMAT(5X, 5H55-59, 5X, 2(F6.4,5X), 5X, 625H ONITED NATIONS MODEL ) 215 GO TO (220,220,220,220,245,245) , NREG 245 NAGE = €0 DO 255 1=14,17 NAGE5 a NAGE ♦ 4 WRITE (NFRNT,250) NAGE, NAGE5, SP (I) ,COHSP(I) 250 F0RHAT(5X,I2, 1H- , 12, 5X , 2(F6.4,5X)) 255 NAGE = NAGE ♦ 5 WRITE (NPRNT, 260) SP(18) ,COMSP (18) 260 FORMAT (5X, 5H80* , 5X, 2(F6. 4,5X)) 265 RETORN END C. SAMPLE INPOT See SEP PSPP 395 D. SAHPLE OOTPOT See SIP PYRMD I. DESCRIPTION OF PROGRAM A. PURPOSE To plot either one or two population pyramids from one or two population distributions, respectively. B. DATA NEEDED 1. The male population in 5-year age groups for the first distribution. 2. The female population in 5-year age groups for the first distribution. If two distributions are to be plotted then the following data is also necessary: 3. The male population in 5-year age groups for the second distribution. 4. The female population in 5-year age groups for the second distribution. II. METHODOLOGY The total population is computed for each distribution as follows: y-5 TP = T] LMP + C FP ) + MP . + FP . Jtf,5 5 x 5 x y+ ** where S MP is the male population from age x, x+4 C PP is the female population from age x,x + <* 5 x y is the upper bound of the last 5- year age group. HP is the open-ended male population group. FP is the open-ended female population group. The percent of the population in each age group for each sex is calculated as: MP PMP = — * — — 5 x TP The percent for each female age group is calculated in the same manner. These percentages are then plotted in a pyramid. If data are given for two distributions, the same procedure is followed for the second distribution. Both distributions are then plotted on the same graph. 397 398 DOCUMENTATION III. BAIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1 . CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL PYRMD (PM, PF,QH,QF) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. All of the variables in the argument string are arrays. The following dimension statement must be included in any main program using this sub- routine. DIMENSION PH(17) ,PF(17) ,QM (17) ,QF(17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in ocder to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package ABREV 2. Library functions ABS 3. Card diagram of main program and subroutines. / CARDS INDICATING END OF DECK / / ~~INPUT~DATA " /| / COBPUTER~CONTR0L~CARDS /| | / / I I / SUBROUTINE ABREV /III/ / / III/ / SUBROUTINE PYRMD /III/ / / III/ / MAIN PROGRAM /III/ / / III/ / COMPUTER CONTROL CARDS /III/ / / III/ I I / P PYRMD 399 C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1 3-80 1-8 9-16 73-80 1-8 9-16 49-56 57-80 NPOP NXT PB PW Blank Label used to identify the output Blank The number of population distributions given. A one punched in column 1 indicates one population distribution for each sex. Any other number punched in column 1 indicates two population distributions for each sex. The code indicating if there is another set of data following this one. A zero punched in column 2 indicates this is the last set of data. Any other number punched in column 2 indicates another set of data follows this one. Blank The male population 0-t for the first distribution. The value ends in column 8. The male population 5-9 for the first dis- tribution. The value ends in column 16. The male population 45-49 for the first distribution. The value ends in column 80. The male population 50-54 for the first distribution. The value ends in column 8. The male population 55-59 for the first distribution. The value ends in column 16. The male population 80+ for the first distribution. The value ends in column 56. Blank The variable PM always requires two cards. The first card (card no. 3) must always contain data whereas the second card (card no. 4) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 73-80 I PF | The female population 0-4 for the first | distribution. The value ends in column 8. I |The female population 5-9 for the first I distribution. The value ends in column 16. |The female population 4 5-49 for the first (distribution. The value ends in column 80. 400 DOCUMENTATION 1-8 9-16 1*9-56 57-80 PF I The female population 50-54 for the first (distribution. The value ends in column 8. I I The female population 55-59 for the first (distribution. The value ends in column 16. | The female population 80+ for the first | distribution. The value ends in column 56. I | Blank The variable PF always requires two cards. The first card (card no. 5) must always contain data whereas the second card (card no. 6) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. If card 2 column 1 is not equal to one, then the following cards are needed. 10 1-8 9-16 73-80 1-8 9-16 49-56 57-80 QM QM The male population 0-4 for the second dis- tribution. The value ends in column 8. The male population 5-9 for the second dis- tribution. The value ends in column 16. The male population 45-49 for the second distribution. The value ends in column 80. The male population 50-54 for the second distribution. The value ends in column 8. The male population 55-59 for the second distribution. The value ends in column 16. The male population 80+ for the second distribution. The value ends in column 56. Blank When the variable QH is required, two cards are necessary. The first card (card no. 7) must contain data whereas the second card (card no. 8) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 73-80 1-8 9-16 QF QF I The female population 0-4 for the second (distribution. The value must end in column 8. I |The female population 5-9 for the second (distribution. The value must end in column 16. I - I The female population 4 5-4 9 for the second (distribution. The value must end in column 80. I I |The female population 50-54 for the second (distribution. The value must end in column 8. I I The female population 55-59 for the second I distribution. The value must end in column 16. PYRMD 401 I 49-56 | I I I I | 57-80 | |The female population 80+ for the second | distribution. The value must end in column 56. I | Blank When the variable QF is required, two cards are necessary. The first card (card no. 9) must contain data vhereas the second card (card no. 10) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a spacs, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE PYRMD (PM,PF,QM,QF) B. DESCRIPTION OF ARGUMENTS Name PM How Obtained Definition PF QH QF Transferred In Transferred In Transferred In Transferred In The male population in 5-year age groups beginning with 0-4 for the first distribution. The last age group is the open-ended age group for males. If less than five age groups are given or an intermediate value is less than 0.9, the subroutine will write out error message no. 1011 and return to the calling pro- gram. If one 5-year age group contains more than fourteen percent of the total population, the subroutine will write out error message no. 1012 and return to the calling program. The female populatio groups beginning wit distribution. The 1 open-ended age group than five age groups intermediate value i subroutine will writ and return to the ca 5-year age group con fourteen percent of the subroutine will no. 1012 and return n in 5-year age h 0-4 for the first ast age group is the for females. If less are given or an s less than 0.9, the e out error message no. 1011 lling program. If one tains more than the total population, write out error message to the calling program. The male population in 5-year age groups beginning with 0-4 for the second distri- bution. The last age group is the open- ended age group for males. If between one and five age groups are given or an inter- mediate value is less than 0.9, the subroutine will write out error message no. 1011 and return to the calling program. If one 5-year age group contains more than fourteen percent of the total population, the sub- routine will write out error message no. 1012 and return to the calling program. The female population in 5-year age groups beginning with 0-4 for the first distribution. The last age group is the open-ended age group for females. If between one and five age groups are given or an intermediate value is less than 0.9, the subroutine will write out error message no. 1011 and return to the calling program. If one 5-year age group contains more than fourteen percent of the total pop- ulation, the subroutine will write out error message no. 1012 and return to the calling program. 402 DOCUMENTATION C. EBBOR MESSAGES 1011 *** PYRMD ERBOR NO. 1011 — INPUT ERROR IN PM,PF,QM OR QP *** EITHER THERE ARE LESS THAN FIVE AGE GROUPS IN THE POPULATION DISTRIBUTION FOR AT LEAST ONE SEX *** OR AN INTERMEDIATE AGE GROUP IS LESS THAN OR EQUAL TO 0.9. 1012 *** PYRMD ERROR NO. 1012 ~ INPUT ERBOR IN PM, PF,QM OR QF *** THIS PROGRAM CAN NOT PLOT A DISTRIBUTION WHERE THE PERCENT OF THE POPULATION IN ONE AGE GROUP IS GREATER THAN 14- V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c _„_, c C MAIN PROGRAM FOR PYRMD C-- • ' C— c _ rH i S PROGRAM USES A SET OF DATA CARDS WHICH ARE READ IN WITH C — SIX READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE C — ■ READ STATEMENTS AS FOLLOWS. C C- THE FIRST READ STATEMENT USES ONE DATA CARD. C- THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO c _„ BE 0SED T0 IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C— THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND c __ GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C-- ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN C — COLUMNS 2-53 OF THIS CARD. C C— THE SECOND READ STATBMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN THE C THE NUMBER OF POPULATION DISTRIBUTIONS (NPOP) AND THE INDICATOB C (NXT) USED TO INDICATE IF THERE IS ANOTHER DATA SET FOLLOWING C THIS ONE. C NPOP IS IN COLUMN 1 OF THIS CARD. A ONE PUNCHED IN COLUMN 1 c ___„_ INDICATES ONE POPULATION DISTRIBUTION. ANY OTHER c _- NUMBER PUNCHED IN COLUMN 1 INDICATES TWO POPULATION c DISTRIBUTIONS. C— — - NXT IS IN COLUMN 2 OF THIS CARD. A ZERO PUNCHED IN COLUMN 2 c __ INDICATES THAT THIS IS THE LAST DATA SET. C ANY OTHER NUMBER PUNCHED IN COLUMN 2 INDICATES THAT c „. THERE IS ANOTHER DATA SET FOLLOWING THIS ONE. C C THE THIRD READ STATEMENT USES TWO DATA CARDS. c . THB purpose OF THE THIRD READ STATEMENT IS TO READ IN THE FIRST C- MALE POPULATION AGE DISTRIBUTION (PM) IN FIVE YEAR AGE GROUPS. c PH VALUES ARE ENTERED ON TWO CARDS. FOR EACH PM VALUE EIGHT c -_ COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS c - 0F THE FIRST CARD. A MAXIMUM OF TEN PM VALUES CAN APPEAR c ON THE FIRST CARD SO THAT THE VALUES END IN COLUMNS 8, 16, c 24, ..., 72, AND 80. THE SECOND CARD CAN CONTAIN A MAXIMUM C OF SEVEN PM VALUES AND THE VALUES SHOULD BE ENTERED IN THE c S4BE BANNER AS ON THE FIRST CARD EXCEPT THAT THE LAST VALUE c ON THB SECOND CARD WILL END IN COLUMN 56. IF LESS THAN c SEVENTEEN VALUES ARE TO BE GIVEN, TWO CARDS MUST STILL BE c 0SED HITH DA TA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR c THE NUMBER OF PH VALUES. C C THE FOURTH READ STATEMENT USES TWO DATA CARDS. C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE FIRST C FEMALE POPULATION DISTRIBUTION (PF) IN FIVE YEAR AGE GROUPS. C PF VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAME C REQUIREMENTS AS PM VALUES. C C~ THE FIFTH READ STATEMENT USES TWO DATA CARDS. C THIS READ IS NOT USED IF NPOP IS 1. C THB PURPOSE OF THB FIFTH BEAD STATEMENT IS TO READ IN THE c POPULATION DISTRIBUTION OF MALES (QH) . c Q H VALUES ABE CONTAINED ON TWO CARDS AND HAVE THE SAME C REQUIREMENTS AS PH VALUES. PYRMD 403 C c THE SIXTH READ STATBHENT OSES TWO DATA CARDS. C THIS READ IS HOT USED IP NPOP IS 1. c THE PURPOSE OF THE SIXTH READ STATEMENT IS TO READ IN THE C POPULATION DISTRIBUTION OF FEMALES (QF) FOR THE SECOND DATE. C QF VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAME C REQUIREMENTS AS PH VALUES. c c DIMENSION PM{17) ,QM(17) , PF(17) ,QF(17) NPRNT = 15 NREAD = 1 1 READ(NREAD,2) 2 FORMAT (1X,52H ) READ(NREAD,3) NPOP,NXT 3 FORMAT(2I1) READ(NREAD,U) (PH (I) ,1 = 1 # 17) READ (NREAD, 4) (PF (I) ,1=1 , 17) H FORHAT(10F8.0,/,7F8.0) IF (NPOP - 1) 7,5,7 5 DO 6 1=1,17 QH(I) =0.0 QF(I) =0.0 6 CONTINUE GO TO 8 7 READ (NREAD, 4) (QM (I) , 1=1 , 17) READ(NREAD,4) (QF (I) , 1=1 , 17) 8 WRITE (NPRNT, 9) 9 FORMAT(1H1) WRITE (NPRNT, 2) CALL PYRMD (PH,PF,QM,QF) IF (NXT - 1) 99,1,99 99 STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE PYRMD (PM, PF, QM, QF) c C PROGRAM NO. 1010 c __ C ALL ARGUMENTS ARE INPUT ARGUMENTS ONLY. c PM IS FIRST HALE POPULATION DISTRIBUTION IN FIVE YEAR AGE GROUPS. c pF Is first FEMALE POPULATION DISTRIBUTION IN FIVE YEAR C AGE GROUPS. C QM IS SECOND MALE POPULATION DISTRIBUTION IN FIVE YEAR C AGE GROUPS. C— qf is SECOND FEMALE POPULATION DISTRIBUTION IN FIVE YEAR C AGE GROUPS. c C — THE FOLLOWING VARIABLES ARE CALCULATED FOR USE BY THIS SUBROUTINE C— --- PMC IS A COPY OF PM TO BE USED BY ABREV. C QMC IS A COPY OF QM TO BE USED BY ABREV. C PFC IS A COPY OF PF TO BE USED BY ABREV. C QFC IS A COPY OF QF TO BE USED BY ABREV. C TOTPM IS TOTAL MALE POPULATION FOR FIRST DISTRIBUTION. C TOTQM IS TOTAL MALE POPULATION FOR SECOND DISTRIBUTION. C TOTPF IS TOTAL FEMALE POPULATION FOR FIRST DISTRIBUTION. C TOTQF IS TOTAL FEMALE POPULATION FOR SECOND DISTRIBUTION. C PPM IS MALE POPULATION PERCENTAGES FOR FIRST DISTRIBUTION. C PQH IS MALE POPULATION PERCENTAGES FOR SECOND DISTRIBUTION. C PPF IS PEHALE POPULATION PERCENTAGES FOR FIRST DISTRIBUTION. C PQF IS FEMALE POPULATION PERCENTAGES FOR SECOND DISTRIBUTION. c C THE FOLLOWING ARE CREATED BY DATA STATEMENT FOR GRAPHING PURPOSES c . C BLK IS THE CHARACTER • • (BLANK) C TEE IS THE CHARACTER 'T' C TI IS THE CHARACTER 'I' C PLUS IS THE CHARACTER »♦■ C LIN IS THE CHARACTER • | • C DASH IS THE CHARACTER •-• 404 DOCUMENTATION BEE IS THE CHARACTER «B» DIMENSION PPM (17) ,PQM (17) , DIMENSION XLINE(120) ,X(17) DIMENSION PM(17) ,PF(17) , QM DIMENSION PMC (17) ,PFC(17) , DATA BEE/'B'/ DATA BLK,TBE,TI,PLUS,RLIN, DATA X(1) ,X (2) ,X(3),X<4) ,X DATA X(7),X (8),X<9) ,X(10), DATA X(13) ,X(1«) ,X(15) ,X (1 DATA Y(1),Y(2),Y(3),Y(«),Y DATA Y(7),Y(8),Y(9),Y(10), DATA Y(13) ,Y(14),Y(15) ,Y (1 DATA Z(1),Z(2),Z(3),Z(4),Z DATA Z(7) ,Z (8) ,Z(9) ,Z(10) , DATA Z(13) ,Z(14),Z (15)„Z(1 NREAD = 1 NPRNT = 15 PPF(17) ,PQF(17) ,Y(17),Z(17) (17) ,QF(17) QMC(17) ,QFC(17) DASH/' •, , T' r 'I' # '*',' I'/'-V (5),X<6)/« ',• ','V,M','2','2V X(11),X{12)/ , 3 , # »3« # »4» # , 4«,»5« r «5»/ 6),X(17)/«6«,'6«,'7«,«7','8'/ (5),Y(6)/'0','5',«0',«5','0','5V Y(11) ,Y(12)/«0»,«5» ,«0 , , , 5 , , , , f '5'/ 6),Y(17)/«0',«5','0«,«5','0V (5) ,Z (6 )/•!»•, '9 •,••»•,' 9' #"»'#' 9 V Z(11) ,Z(12)/ , t» , , , 9»,'V ,'9', •4«,'9V 6),Z (17)/ , 4«, , 9 , , , 4 , # '9' # •<»•/ C c __ — C VERIFY INPUT ARGUMENT VALUES FOR FIRST CENSUS C C TOTPM "- = 0.0 TOTQM = = 0.0 TOTQF = = 0.0 TOTPF = = 0.0 NPOP = 2 NERR = DO 400 1=1,17 PMC (I) = PM(I) QMC(I) = QM(I) PFC(I) = PF(I) QFC(I) = QF(I) «00 CONTINUE c c C CHECK FIRST HALE POPULATION DISTRIBUTION c C DO 2 J=1,17 IF (PM(J) - 0.9) 3,3,1 1 TOTPM = TOTPM ♦ PM (J) 2 CONTINUE NM1 = 17 GO TO 6 3 NH1 = J - 1 DO 5 K=J,17 IF (ABS(PH(K)) - 0.0001) 5,5,4 4 NERR = 1 5 CONTINUE C c C CHECK SECOND MALE POPULATION DISTRIBUTION c C 6 DO 8 J=1,17 IF (QM(J) - 0.9) 9,9,7 7 TOTQM = TOTQM + QH (J) 8 CONTINUE NH2 = 17 GO TO 12 9 NM2 = J - 1 DO 11 K = J, 17 IF (ABS(QM(K)) - 0.0001) 10 NERR = 1 11 CONTINUE 11,11,10 C c C CHECK FIRST FEMALE POPULATION DISTRIBUTION C c 12 DO 14 J=1,17 IF (PF(J) - 0.9) 15,15,13 PYRMD 405 13 TOTPF = TOTPF + PF(J) 14 CONTINUE NF1 = 17 GO TO 18 15 NF1 = J - 1 DO 17 K=J,17 IF (ABS(PF(K)) - 0.0001) 17,17,16 16 NEBR = 1 17 CONTINUE CHECK SECOND FEMALE POPULATION DISTRIBUTION 18 DO 20 J=1,17 IF (QF(J) - 0.9) 21,21,19 19 TOTQF «= TOTQF + QF(J) 20 CONTINUE NF2 = 17 GO TO 27 21 NF2 = J - 1 DO 23 K=J,17 IF (ABS(QF(K)) - 0.0001) 23,23,22 22 NEFB = 1 23 CONTINUE C c C CHECK FOR AT LEAST 5 AGE GROUPS IN FIRST POPULATION DISTRIBUTION c _ C 27 IF (NH1 - 5) 29,28,28 28 IF (NF1 - 5) 29,31,31 29 NEP.R = 1 C c C DETERMINE WHETHER THERE ARE TWO POPULATION DISTRIBUTIONS c C 31 IF (NM2 ) 32,32,36 32 IF (NF2) 33,35,33 33 NERR = 1 GO TO 38 C c C ONLY ONE POPULATION DISTRIBUTION GIVEN c C 35 NPOP = 1 IF (NERR - 1) 44,410,44 C c C MAKE CERTAIN SECOND FEMALE POPULATION DISTRIBUTION IS GIVEN c C 36 IF (NF2) 37,37,38 37 NERR = 1 C c . C MAKE CERTAIN SECOND POPULATION DISTRIBUTION FOR BOTH SEXES C CONTAIN AT LEAST FIVE AGE GROUPS c _ C 38 IF (NM2 - 5) 39,40, 40 39 NERR = 1 40 IF (NF2 - 5) 41,409,409 41 NERR = 1 C C C ERROR IN INPUT ARGUMENTS c C 409 IF (NERR - 1) 43,410,43 410 WRITE (NPRNT, 26) 26 FORMAT (//61H *** PYRMD ERROR NO. 1011 — INPUT ERROR IN PM, PF, QH *, OR QF,/ ,99H *** EITHER THERE ARE LESS THAN FIVE AGE GROUPS IN T 406 DOCUMENTATION ♦HE POPULATION DISTRIBUTION FOR AT LEAST ONE SEX,/,62H *** OR AN IN ♦TERMEDIATE AGE GROUP IS LESS THAN OR EQUAL TO 0.9) 399 WRITE (NPRNT, 411) 411 FORMAT (//,57l,18HFIRST DISTRIBUTION, /,43X, 5HM ALES, 33X,7HFEMALES) DO 413 1=1,17 413 WRITE (NPRNT, 414) PM(I),PF(I) 414 FORMAT (41X,F8.0,32X,F8.0) IF (NPOP - 1) 416,419,416 416 WRITE (NPRNT ,4 17) 417 FORMAT (//,56X,19HSECOND DISTRIBUTION, /, 43X, 5H MALES, 33X, 7HFEM ALES) DO 418 1=1,17 418 WRITE(NPRNT,414) QM(I),QF(I) 419 CONTINUE GO TO 999 492 WRITE (NPRNT, 493) 493 FORMAT (//61H *** PTRMD ERROR NO. 1012 — INPUT ERROR IN PM, PF, QM *, OR QF,/, 102H ♦♦♦ THIS PROGRAM CANNOT PLOT A DISTRIBUTION WHERE T ♦HE POPULATION IN ONE AGE GROUP IS GREATER THAN 14.) GO TO 97 C C — C CALL ABREV TO HAKE CERTAIN POPULATION DISTRIBUTIONS C ARE OF THE SAME LENGTH c . C 43 CALL ABREV (1 ,QMC,QFC, NPOP2) 44 CALL ABREV (1, PMC, PFC,NP0P1) IF (NPOP - 1) 45,49,45 45 IF (NPOP1 - NPOP2) 46,47,46 46 CALL ABREV(1,QMC,PMC,NPOP1) CALL ABREV (1 , QFC, PFC, NPOP1) C c __ c CALCULATE PERCENTAGE DISTRIBUTION FOR DISTRIBUTIONS GIVEN c _ _ C 47 TOT = TOTQH + TOTQF DO 48 I=1,NP0P1 PQM(I) = QHC(I) / TOT ♦ 100.0 PQF(I) = QFC(I) / TOT ♦ 100.0 IF (PQH(I) - 14.0) 471,471,492 471 IF TV 0o o» o~ g cr- — — fp> m s 3 vS> 3- r- irt s -. — M> *■ s s — — — — s ~ — s s s 3 u> s S to 57 S 2 r>- W\ o m o S o~ CM oo fv. fO S 2 r- o- — o» ir> S 1^ m o- N Cf- 3 3 to. «•<"> vS CM — 3 — m »o 3 3 oo vS o OO — S" — — — OO cs 3 5 — ■— OJ — S — — S £ S ffi £ S S ft ft E £ CO O CM t-. o 0O O CM -^ S S o- CS m t*- o t^- Of- *• vS O O 0o Oo *■ o— vS o- O in r^ S S o- f» f-. OO ■- vA *• 0O m s ~ *■ — in — vS — o~ r- |v^ OO s 3 o o» 3- -- — — — — o OO $ Si OJ -. CM CM 3 CM — s s K £ s S s 3 3 3 3 3- v9 v& vS CM OB ~~- 0O .1- ? o OO OO o CP» — J- 3- vS vS vS 3 5 vs m o- o- r- o- t^- f-. o~ 5 CM o- CM rO r- r- o- v» m CP- Cf- 3 3 3- — ©- cu i^ fTk 00 in in 3 — v9 — o~ — o — *• — CP- CM 3 3 *- — — — 0o — m — — ■ "f — — CM 3- — — — 3 CM OJ OJ CM 3 CM CM 3 3 3 3 3 3 5f 3 5 *j 3 o 0> cp- CM * o oo m r- 3 o m CM CP in «t) «v O CP- o- CM 3 S r- pr> — O v» , Si s- \9 in s£ oo o O r~- rn — O 5 S — IT. * t^ o~ o o~ CM i>- Sj (M O CM m CM vS — R CM CM CM o- CM vS ev S us CM OJ f^ CM S CM CM s £ S s s ^^ n s R s 3- r^- vS tc, CM OJ — . vS Cf- s o— 1^- =*- 0= c*- OO v» *• N vS PO 3 s 00 m fO O CP- O Oo Cf- o- sT *• oo M> o~ 00 *- — OO m -~ 3- o d" f~ »r> ITV. in o- s OJ w> PO TO 3- o 3~ s s rO »o» rTl ^<^ o~ s m m s R o- R s 3 o- S s £ K ^ S VS o- 3- o o r- i- OJ 00 S in — rr) 0» o» CM *• v» o- *- vS s 3 CD v» vS P-- o- — 00 m in 1^ 5 *■ CM vS J- *■ O N v» vS r- CP- s Si v_> vS 3- rev OJ OB in CM *- 1- -~ S d- — * o~ i- 0O *• M> 3- T> CM N s CO t^ vs 3- v9 — r- CO »>^ lO fC> s pO Ki PO <^ r~ vS 3- vS 3 s Uj «\ fO :h T> o_ 1 co «o rn s 2 1-4 s v^ ' 2 3 Cc o~ CM — CO 0O 2 o CM •■6 CM CM CM vS M *■ i- r- o 2 3 « — (Vv. o OO o» vS o~ oo M cs s o- vS O ir% VS f- 0» Cff — t^ o 0o 3 2 o — e» vS rr> *• — o~ vS CQ <»- X i- r^ lO vS in 3- m uU — OO vS m 2 2 CO CM CO co Oo u> o — o~ fO " «\ 3- J- cn CM oo oo CO 3 2 i 3" CO * -— *• O 3 - 3- m 21 3 in O S in 3 2 r- h- 2 r— 2 a. o- <^ o- - o» 3- -— CM vS — o- - o vS *• O - u, cc m CM «■> d- OJ 0=> o- 0O CS r» J 1 ltj in o IT, r^- m r- a: in CM "i d- u. » r-l oo — in o CM CVI 0» — >- d- "» d- ir> in l-H oo — . in o ^ ■* O d- — * — . in — * — CO • Q d- 3- — - « Z M ^ 2 m ~ M — Q — M M — N - CO CM - — - t. a CO ■*- <- « CO c (VI w a CO v. -8 u CO It- ~5 a CO "5 CO o CO V. a to f. w a CO f. o- o if o 1 a CO •4- r CO c CM -5 to O f. *• to a C3 n "5 cS VJ> r— UJ CO c CM UJ to E PYRMD 411 s oo O r*- m S g s o- -_ 3- r^ E 2 s N Oo o- o- B E g c C 2 s a £ £ IC s ; s £ s c £ *• O- * 0O s: 1^ £ r»* CX> m vS ^! ° o- o- — ■*^ S s s — — S s S S s Q Uj Q. s or £ <* s s u> s s £ s vj> O- OJ Oo s s u> In r^ m o- 3 s u> — — «*% m 3 s u> ~- — — — . S s s s s s s s s s s s K 5 s o- oo 3- o tn (VI i^. O s a £ vS \9 o Oo Oo 3- Cr- ^S £ s K"> — 3- — in — \S ~- s S $ — ~ — — s s s s s K £ s g S 5 3 3 3 i- o OO Oo O 0~ -^ 3- 3 3 5 o- OJ 0- OJ CO I~- r» o~ 5 5 « in — vS — o- — o — S 3 3 — — — OJ 5 3 3 3 3 ■ OJ 5 s s S R R R a S S N S s V Oo m ~ cO> 00 oo OJ 1- S s s r- S- OJ vS 3- :t- O r~ 5 2 Si — * — 3- o- 3- oo i- S S a f^ w» rCi hO s s s s s 3 2 2 2 H 2 2 s a - 2 a o 00 o OJ vS OJ OJ OJ vS 2 2 3 O- O o~ vS O m vS f-~- Do 2 2 2 o- *• 1^ LT> vS in 3- lO 2 Z 2 2 (<^ <*> d- *■ S 2 2 M 2 2 a 3 2 2 O S 2 » OJ o. o. — oo d- O O ^3 ^S — . «, - II OJ o- 3- —. Oj vS — cr- ^ - » or t-» ir> in <^> m r-- x~» r^ U. » •• K d- 3- LTV in n », » in " " n M n „ ~ a o c ,. H OJ - - V O O c o ■B c CO L. c ~2 *• ~5 e -5 v. f. -is (. a i. o- C OO ~5 O- o i 1— UJ 3- 412 DOCUMENTATION i © i en en r» i r- i in i © vo in r» pa CQ CD I HOB I I oa CQ CQ I | CO CQ | 03 cn i r» en m i vo r» © i r- in a- VO I © VO in I in in a- m I o in Cn I in I © m I o cn CN I in CM a- (N I © (N I in I © CQ CQ CQ CQ CQ CQ EH Eh EH E-l CO CQ I CQ CQ H H CQ CQ I I CQ I CQ CO I o VO en eh cn in i u- in in in i © in Eh Eh Cn a- i in a- I © a- CQ CQ Cn CO I in m rn I o H H EH EH t in CQ CQ a- (N I © CN I in I o CQ CQ I in # i H H # EH EH I ♦ I # I * I * « I * I I * H Hi «B ■vo a w ft, EH 5= M •© U « W W •vO *1 S3 EH t=> 04 D O H W w h1 OT a. 90 ■P «s (0 C/J r" © * I EH EH * I I MM* I # sr i # * * * i * t * i •cn © w 2 O M EH S CQ M CO Eh W M a 33 as eh as o o O H CQ H EH C/l Eh O fci as s eo o O CQ H HH«a Eh 03 EH O HHWH as W M EH H M Q O tu Q W H a cn Q eh as cc wow as u eh m m as fa w M J o CQ emrQ X w PYRMD 413 BE H U H 0t (Nfl(K9O5>rO<-lfle0»i-93OO f-vovCirt^jj-OcoojrMi-T-t-©©©© 03 w CQ a SB w l-a 90 0(N*fNOOOvO (N^oo(NO>r~»-voo3ir)oo» _ iDT-©rnvD o 00 ro in r> ID M l-H E w 8 (y\©«X>©ODvOf~.v0ro©r^mf^^^-a' fMvocri' r )ir)©vof , o©r'f , i©r--a'fN» _ l~-\Olfia-a-' , O rr >fN(N(N«-»-»-©©©© EH z w u 03 w ©^03-a-in(Ncr>sciD^-ir)in'— r-o>r- CTl00t-a-r~CT»*CT.kOfN00^-©t^Jj''-r- r~u>vom^-rorrir>4rsi (NT- ao CO m 03 H 03 *5 SB w S3 rM*vo^©jj-oor-r^om-fc^r^cnvo© ©^vooor»vocr>t^f r >©vi)t^vD( r )' r iir>© uir-io( T )t-a'OM i ncioo(Nfloa'Ciifii-|v oofNp-maia-oaovomr-oovDst-fS^- fSl in o r»<£>in=r< T irMCN»-i--r-©©©©©© w ►J Z3 vovOr"-O^OOt— ^©CTiUO < r >a-C0« _ vO©vor'li— Oif^incrsa-cot-*— ocMoocooo©rorN=rr-vofNoocnino> 03 O H 03 CU Q sa co 03 M (H S3 O: Eh * * # # u 03 W Cu w ►H- SS W H ►h- S3 in*rorr)©covor~vo' r )©r^< ,r 'CNsrr-^CTiVOj3-0000©mCTiOO00 CM©r~o>rocTiy3inr-cT>cT>cT*a-i3'=r^ p IT>StCT\jtC71*Cy>a"C> + I I I I I I I I I I I I I I I I ©inoinoinoinomoLnoinom© »-»-cMCMroco3-;j-intnvovor>r-co a- © CM © © «£ EH O EH PYRMD 415 « ♦ # * ♦ ♦ * i # * * a- I * I i o * I * I in «- o o 03 o> a- in en vo i or to l in av r* i o in r- i in »o I o vo in r* h w a i m a a- a> I o a- crv ro I in a rn I o a- CM I Ov O (N CN I m CN H hi H H H H I I I H I + en O I oo in I I I I H M I a- r» en i vo * O I VO r- in i vo o vo VT> in I in in in I © in a- i in a- a i o ro t in oo a- en i o H H M m ■ r- w hH «* ■VO S EH ss W ■© U n H ■VO 1-^ to W H 05 W 10 in ITv M a as ■o^ o l-£ SB O H CO EH BE S o « H H EH OS H H SB CO e> eh (0 H J O CD as m X (0 416 DOCUMENTATION ^ eT)(\|v 00> m l novof r >or- rr >©r*-s»'J SOM'IrmUlffiOlflOfflOiOOWP" "1 H W tf n CI n (M N t- r t- »- i- Oi fci fa ■*' I I I I I I I I I i i I t I I I EH w otnomomoinomomomomo o o T-i-cNtsrnroa-a-inin^ovor^r^ot) n PYRMD 417 X H (0 H 95 O EH to o w ►H- &H 4 M O Ph as O H H a a o a H H EH pa a H a OT H H a Q EH CO as H o Q H EH CTi H S.3 # CO O a D H 03 Q. O O g cv, Cu % ►J E W «* aao H CU » H Ph bs 0t H 03 O »C0 S3 Cm as Cu D «a O a as « Eh H o CO OS a CO O ID W 03 < ►J a pq W CO t> H EH H a b- CM Cu D 8! 8= O H «fl 03 ES C3 1 EH 1 w to o r- CO «fl «- W O Hi n ^ H W ■* • os H EH o «a Q W f- as H 10 Oj M E O ce « a JC Qt o w w ■P ccs a EH a- as « EH a H M OS M o o H as e a •a) CM 06 EH II X H OS « Q4 M o EH en » # # H * * * Q * # * costfN' _ t~-in®a , Jcocor-r~coooin*-vo«-v£>r-a'© Jif>M-uio>oa''-CMOioifi*m(Ni-i- ►jro;j-co T ~\c©vo< , '">'-a*r-ind , a'< r )T-r- < * "I II (S IN f r i- coo(NcocoooorocN=»'r~-^oosicTiir>cTicM Mr-cT>cna>;3-sj-:3-c\jvo wcMrosrcrivornoo< v i' , o ; tvo»£>d-aDOor-3- i-lr^cT>r-in ior | o^ir) ,,r >»-cTNr«Lna-m s s s CM rvi CM s £ o O o is £ 3 . . • s J± r«- o — 0^- iS 2 3 V o ao ~- r s S S — o — aj s S s o o O o O s S s • . . • • s S s — • -» s S £ o o o o o s S S in CM o- 19 in S S |n <*> vS O oo s 3 G in 3- 3- o» cu ST 2 — CM — — (N- s S 3 o a- O Q rr. s 5 S . • • • • s S 9 * 3 3 o o o o Ci 3 3 5 CM cu r- C> OJ 5 3 % vfi M» 00 m 00 3 3 S W» ir> c« vS O 3 5 3 — r^. "» — u-> 3 3 3 o CM O o CO 3 3 3 . . . • • i 3 3 3 3 3 o o O o o § § £ m ro IN. 0=> fr, K ffi S m in. IN- d- ^ S S S O in o- CM fCl S S; S — t^ o — v9 8 S S o — o o — ■z 2 S . • UJ . . • ~^r S s ts " a o o -I o o O S ~ s :h »• «c — »• CJ s s s o» o- > vj> >r> fr> 2 2 a v» r^ \» o» o- R S s O — o- o O o S S R o — o O — 5 S s . • 1 • • • 3 s £ 1 S s s o o 1 o O o S s s m — ru tN- o S a s *9 CM 2 ru o- |N- S S! 3 O o- tc O o CM S s s 2 — IN- CO -- — (N- S s 2 a: O O o; O ir> o o 2 2 2 CD • • ^ • oo • • 2 » 5 C£ r<% - S 2 n o o -— UJ o — — o o ■— 2 2 £ v£ ir> — -J o — in s- o 2 2 2 1X1 OP — 3- ar •s a- C: — t»^ — ■ 2 S a _l o- IT) — S o iri o 2 2 a S O o o u. o o C£ O O o 3 2 2 . . o • — Ui . • o 2 2 o. a • Cs • t . u_ O o ir» » » r. 2 o- o \» 2 «J- v£> o v& tt- v& •~ ^ u> IU :h a- o UJ rr, o o OP O U u. «■ :> pr> o» o > tr> o h- o r- O ^ ^ • => O K» o» =i o- 00 tn IN- >*> O f T ™ O — o . O O UI © o • m „ - CO • . \S to • o- t~ ' • o « M - U"> ir> VS - - w C Cj O o ITi 3- i. ex ■» CM w a cs c Q ST -6 c CM a i Ui UJ io ■» c CM Ui "6 428 DOCUMENTATION x H H O <-t ss OQ X «s a aa O Cl, 05 O r-r-vO*o«~' , 0< r »CT>invOvO**i-3 , r' , >0 0000000000000'~»- X eh H O -I SB H H DQ X <* o 03 O Px os o «aoaooo (n^rooNiornooi ooooooo^^-t- ooooooooo ooooooooo o a, B o W a« Z3 as W CO at W ►J S3 O tn w o EH IS < S3 o as Cm rinoinoinoinoi/iomomomoifl EH W OT c CM r-f Krinomoinoi/ioinomoinoino < m as s H S3 pa > O o EH o « t-inOinomomo t- .- (N 04 ft as in o cm o o • Fh O << D OO as 00 oo W t • t- x a 00 a d 1 1 o h m o w 03 o M CO 3! ^ «! O vOCfi in tn oq o vo ao *- 03 < HO 1 or* tj OHDom r-rn M 03 03 OiOvO OO CO O 03 W SB* Mr t • 03 M fa HO II OO 03 H vo II II W ►? ►■* 5 at (3 O II M MO U PM •< k4 4 SB M W O Mk) XOOOT03 M a «s a« msb b a EH OT * * M * * EH # * REVR5 I. DESCRIPTION OF PROGRAM A. PURPOSE To rejuvenate, five years backward in time, each sex of a population dis- tribution by 5-year age groups. The rejuvenation utilizes survival rates and number of migrants, by 5-year age groups. If there are no migrants, the variable representing them is zero. Although this subroutine makes the reju- venation only for a 5-year period, a population rejuvenation can be made for a time period varying from 5 to 50 years by using the main program as given in this publication. B. DATA HEEDED 1. The distribution of male population in 5-year age groups. 2. The male migrants by 5- year age groups. 3. The distribution of female population in 5- year age groups, t. The female migrants by 5-year age groups. 5. The 5-year survival rates for males. 6. The 5-year survival rates for females. II. METHODOLOGY A. MATHEMATICAL DERIVATION MP* - 5 x+5 L 5 x l_x 4 2 x+5 2 x+5 5 x- t,t+5 5 x where rHP is the rejuvenated male population age x,x+4 at year t. rHS ' is the male population survival rate for age x, x*4 surviving to age x+5,x+9 during the period t,t*5. rMM '- is the male migrants age x,x+4 at the time of migration during the time period t,t*5 The same is done for females. The rejuvenated population for the open-ended age interval is calculated as follows: »*> - ± ^:r ■ d + ^:r> - ± ™r 5 • " + »*r 5 > x-S* - „«,W x-5+ 431 432 DOCUMENTATION To determine the births occurring in the interval, the male and female population 0-4 are rejuvenated again to birth. t Zl 5 (TP t+5 + TP ) where b ' is the crude birth rate for the interval t # t+5 TP is the total population at time t. The general fertility (GFB) is defined as the number of births occurring during the interval divided by five times the female population 15-49 at the mid interval. GFR = 2 TB t>t+5 U5 5 Yl (FP t+ :L + *p* ..) 3^75*5 x,x+A x,x+V The average annual rate of natural increase is calculated as follows: t,t+5 _ 2 (TP t+5 - TP t - TM t,t+5 ) " 5 (TP + TP t+ ^) where TM t,t+5 ^ s t jj e total migrants during the interval t,t+5 The crude death rate is obtained by taking the difference between the crude birth rate and the rate of natural increase. d t,t+5 = b t,t+5 _ p t,t+5 B. COMMENTS In the reguirements for the main program for this subroutine, mortality data is supplied for only two points in time. The main program linearly inter- polates the survival rates between these two points to obtain the survival rates needed for the mid-point of each rejuvenation period. REVR5 433 til. H A I N PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL REVR5(PM,TPM,PMM,PF,TPF,PMF,SXM,SXF,PPAR) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine all of the variables in the argument string except TPH and TPF are arrays. The following dimension statement must be included in any main program using this subroutine. DIMENSION PM{17) ,PMM(17) ,PF ( 17) , PHF( 17) , SXH(17) ,SXF (17) ,PPAR(7) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package a. ABREV b. INTRP* c. PREVR* d. MLT* e. ELT* * These subroutines are not called by the subroutine REVR5. They are used only by the main program. 2. Library functions a. ABS (absolute value) b. EXP (exponential) c. ALOG (natural logarithm) 434 DOCUMENTATION 3. Card diagram of main program, all subroutines and functions. / /_. / / / CARDS INDICATING END OP DECK / J INPOT DATA /| / I COMPUTER CONTROL CARDS SUBROUTINE ELT /I I / I ! /Ill/ ./III/ SUBROUTINE MLT / /III/ ./III/ /. / / / / /. / / subroutine intrp /iii/ "~subroutine~abrIv / 111/ / III/ SUBROUTINE prevr /III/ / III/ SUBROUTINE BEVR5 /III/ / III/ BAIN PROGRAH /III/ / III/ / COMPUTER CONTROL CARDS /III/ / / III/ III/ I I 1/ BEGINNING OF DECK | | / I 1/ I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAH GIVEN IN SECTION V.A. The card format requirements for the main program included with this subroutine package are as given belov. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 1 2 3-4 5-6 7-10 11-14 15-20 NXT DAY THO TEAR NDAT2 Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. Any other number punched in column 1 indicates another set of data follows this one. Blank Day of the month for which the popu- lation to be rejuvenated is given. Honth of the year for which the population to be rejuvenated is given. Tear for which the population to be rejuvenated is given. Tear to which the population is to be rejuvenated. Blank REVR5 435 21-22 IKODE 23-24 25-26 27-30 31-32 33-34 35-38 39-80 1-8 9-16 73-80 1-8 9-16 49-56 DAY1 TH01 YEAR1 DAY2 TM02 YEAR2 PH PM Mortality indicator which specifies whether age-specific survival rates are given or a regional model life table is to be used. If 11 is punched in columns 21 and 22, then age-specific survival rates are to be used for the mortality corresponding to the later and earlier dates as given in columns 23-30 and 31-38, respectively, of this card. If 12 is punched in columns 21 and 22, then age-specific survival rates are used for the later date given in columns 23-30 of this card and a Coale-Demeny Regional Model Life Table is being used for the earlier date as given in columns 31-38 of this card. If 21 is punched in columns 21 and 22, then a Coale-Demeny Regional Model Life Table is to be used for the later date given in columns 23- 30 of this card and age-specific survival rates for the earlier date as given in columns 31-38 of this card. If 22 is punched in columns 21 and 22 of this card then Coale-Demeny Regional Model Life Tables are to be used for both the later and earlier dates as given in columns 23- 30 and 31-38, respectively. If any other value is punched in columns 21 and 22 the main program will stop and no further data will be processed. Day of the month to which the first set of mortality data applies, i.e. day of later date, The month of the year to which the first set of mortality data applies, i.e. month of later date. Year to which the first set of mortality data applies, i.e. year of later date. Day of the month to which the second set of mortality data applies, i.e. day of earlier date. The month of the year to which the second set of mortality data applies, i.e. month of earlier date. The year to which the second set of mortality data applies, i.e. year of earlier date. Blank The male population 0-4. The number should end in column 8. The male population 5-9. The number should end in column 16. The male population 45-49. The number should end in column 80. The male population 50-54. The number should end in column 8. The male population 55-59. The number should end in column 16. The male population 80+. The number should end in column 56 . 436 DOCUMENTATION | 57-80 I | Blank The variable PH always requires two cards. The first card (card no. 3) must always contain data, whereas the second card (card no. 4) can contain all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 • 73-80 1-8 9-16 • 49-56 57-80 PP PF The female population 0-4. The number should end in column 8. The female population 5-9. The number should end in column 16. The female population 45-49. The number should end in column 80. The female population 50-54. The number should end in column 8. The male population 55-59. The number should end in column 16. The female population 80+, should end in column 56. Blank The number The variable PF always requires two cards. The first card (card no. 5) must always contain data, whereas the second card (card no. 6) can be all zeroes depending on the number of age group given. The last age group given must always be the open-ended age group. 1-8 9-16 73-80 I PBHT | The total number of migrants for the first 1 5-year rejuvenation interval (the latest). | The number should end in column 8. I | The total number of migrants for the (second 5- year rejuvenation interval. The | number should end in column 16. I I | The total number of migrants for the tenth | 5-year rejuvenation interval (the earliest) I The number should end in column 80. The number of values read from PHHT is the same as the number of 5-year intervals that the population is to be rejuvenated. This value is positive if the total migrants are immigrants and negative if the total migrants are emigrants. This main program will rejuvenate a population a maximum of ten intervals so PUNT can be between 1 to 10 values. 1-8 9-16 73-80 I PHNA | The proportion of the total migrants | during the first 5-year rejuvenation | interval who are males age 0-4. The | decimal point is in column 1. I | The proportion of the total migrants I during the first 5-year rejuvenation | interval who are males 5-9. The decimal | point is in column 9. I I I | The proportion of the total migrants REVR5 437 1-8 9-16 49-56 57-80 PMMA during the first 5-year rejuvenation interval who are males 45-49. The decimal point is in column 73. The proportion of the total migrants during the first 5-year rejuvenation interval who are males 50-54. The decimal point is in column 1. The proportion of the total migrants during the first 5-year rejuvenation interval who are males 55-59. The decimal point is in column 9. The proportion of the total migrants during the first 5-year rejuvenation interval who are males 80+. The decimal point is in column 49. Blank Two cards must always be provided for the variable PMHA for each 5-year rejuvenation interval. Values are provided only for age groups in which there were migrants. The last group given is not assumed to be the open-ended age group unless it is the seventeenth value or is the same number of age groups as given for the population distribution. 10 11 1-f 9-16 73-80 1-8 9-16 49-56 57-80 PMFA PMFA The proportion of the total migrants during the first 5-year rejuvenation interval who are female 0-4. The decimal point is in column 1. The proportion of the total migrants during the first 5 -year rejuvenation interval who are females 5-9. The decimal point is in column 9. The proportion of the total migrants during the first 5-year rejuvenation interval who are females 45-49. The decimal point is in column 73. The proportion of the total migrants during the first 5-year rejuvenation interval who are females 50-54. The decimal point is in column 1. The proportion of the total migrants during the first 5-year rejuvenation interval who are females 55-59. The decimal point is in column 9. The proportion of the total migrants during the first 5-year rejuvenation interval for females 80+. The decimal point is in column 49. Blank The reguirements for PMFA are the same as for PMMA. The sum of the proportion of PMHA and PMFA for all ages for each 5-year rejuvenation interval must add to 1.00. For each 5- year rejuvenation interval the proportion of male migrants by 5-year age groups is followed by the proportion of female migrants by 5-year age groups for the same 5-year rejuvenation interval. So, there are four cards for each 5- year rejuvenation interval -- two cards for male migrants and two 438 DOCUMENTATION cards for female migrants. The next group of cards depends on the value given for KODE in card 2. If K0DE=11,i.e. columns 21 and 22 of card 2 contain 11, survival rates are read for both the later and earlier mortality. J is the number of rejuvenations minus 1 multiplied by 4. 12+J 13+J 14+J 15+J 1-8 9-16 73-80 1-8 49-56 57-80 1-8 9-16 73-80 1-8 SRX SRX SRX SRX The survival rate for male births surviving to age 0-4 for the later mortality date given in card 2 columns 23 to 30 (DAY1, TM01, YEAB1). The decimal point should be in column 1. The survival rate for males of age 0-4 surviving to age 5-9 for the later mortality date given in card 2 columns 23 to 30 (DAY1, TB01, YEAR1) . The decimal point should be in column 9. The survival rate for males age 40-44 surviving to age 45-49 for the later mortality date given in card 2 columns 23 to 30 (DAY1, TH01, YEAR1) . The decimal point is in column 73. The survival rate for males age 45-49 surviving to age 50-54 for the later mortality date given in card 2 columns 23 to 30 (DAY1, TM01, YEAR1) . The decimal point should be in column 1. The survival rate for males ages 75+ surviving to 80+ for the later mortality date given in card 2 columns 23 to 30 (DAY1, TM01, YEAB1). The decimal point is in column 49. Blank The survival rate for female births surviving to 0-4 for the later mortality date given in card 2 columns 23 to 30 (DAY1, TH01, YEAR1). The decimal point is in column 1. The survival rate for females 0-4 surviving to 5-9 for the later mortality date given in card 2 columns 23 to 30 (DAY1, TH01, YEAB1). The decimal point is in column 9. The survival rate for females 40-44 surviving to 45-49 for the later mortality date given in card 2 columns 23 to 30 (DAY1, TH01, YEAR1). The decimal point is in column 73. The survival rate for females 45-49 surviving to 50-54 for the later mortality date given in card 2 columns ' 23 to 30 (DAY1, TM01 , YEAB1). The decimal point is in column 1. REVR5 439 !16 + J 49-56 57-80 1-8 9-16 73-80 17+J 1-8 18 + J 49-56 57-80 1-8 73-80 19 + J 1-8 49-56 57-80 SRX SRX SRX SRX The survival rate for females 75+ surviving 80+ for the later mortality date given in card 2 columns 23 to 30 (DAY1, TM01, YEAR1) . The decimal point is in column 49. Blank The survival rate for male births surviving to 0-4 for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TH02, YEAR2). The decimal point is in column 1. The survival rate for males 0-4 surviving to 5-9 for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TM02, YEAB2) . The decimal point is in column 9. The survival rate for males 40-44 surviving to 45-49 for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TM02, YEAB2) . The decimal point is in column 73. The survival rate for males 45-49 surviving to 50-54 for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TH02, YEAR2) . The decimal point is in column 1. The survival rate for males 75 surviving to 80+ for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TM02, YEAB2) . The decimal point is in column 49. Blank The survival rate for female births surviving to age 0-4 for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TM02, YEAR2) . The decimal point is in column 1. The survival rate for females 40-44 surviving to 45-49 for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TH02, YEAR2) . The decimal point is in column 73. The survival rate for females 45-49 surviving to 50-54 for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TH02, YEAR2) . The decimal point is in column 1. The survival rate for females 7 5+ surviving to age 80+ for the earlier mortality date given in card 2 columns 31 to 38 (DAY2, TH02, YEAR2) . The decimal point is in column 49. Blank 440 DOCUMENTATION If less than 17 survival rates are to be given for either sex on either the later or earlier mortality date two cards must still be used for each sex with data in the number of columns needed. The last survival rate given for each sex for each mortality date must be the open-ended survival rates. If KODE=12, i.e. columns 21 and 22 of card 2 contain 12, then survival rates are read for the later mortality date and Coale-Demeny Regional Model Life Tables are used for the earlier mortality date. Cards 12+J through cards 15+ J for K0DE=11 are required. The following card is needed for the earlier mortality date. 16+J 1-6 7-12 13 14-80 EO | Life expectancy at birth for males for | the earlier mortality date. The decimal | point should be in column 3. I | Life expectancy at birth for females | for the earlier mortality date. The decimal | point should be in column 9. I NREG | The region in the Coale-Demeny Regional | Model Life Tables to be used. A 1, 2, 3, | or 4 in column 13 indicates the west, north, least, or south region, respectively. I I Blank If K0DE=21,i.e. columns 21 and 22 of card 2 contain 21, then Coale- Demeny Regional Model Life Tables are used for the later mortality date and survival rates are read for the earlier mortality date. 12* J 1-6 7-12 13 14-80 EO NREG Life expectancy at birth for males for the later mortality date. The decimal point should be in column 3. Life expectancy at birth for females for the later mortality date. The decimal point should be in column 9. The region in the Coale-Demeny Regional Model Life Tables to be used. A 1, 2, 3, or 4 in column 13 indicates the west, north, east, or south region, respectively. Blank cards 13+J through 16+J are the same as cards 16+J 19+J for K0DE=11. through If KODE=22,i.e. columns 21 and 22 of card 2 contain 22, then Coale Demeny Regional Model Life Tables are used for both the later and earlier mortality dates. Card 12+J is the same as card 12+J for K0DE=21. Card 13+J is the same as card 16+J for KODE=12. For each different series, cards 7 through the last are required. IV. S0BR00TINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE REVR5 (PM, TPM, PMH, PP, TPF,PMF , SXM, SXF,PPAR) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition REVR5 441 PH TPH PHH PF TPF PHF SXH SXF PPAR Transferred In Transferred Out Transferred In Transferred In Transferred Out Transferred In Transferred In Transferred In Transferred Out On input PN contains the 5-year age distribution of Dales to be rejuvenated. These can be a maximum of 17 age groups with the last age group being the open- ended age group. All age groups must be greater than or equal to 0.9. If this is not the case, error message number 1121 will be written and the subroutine will return to the calling program. On out- put PH contains the rejuvenated 5-year age distribution of males. Total male populations after rejuvenation. The number of male migrants by 5-year age groups. There can be a maximum of 17 age groups with the last one being the open- ended age group. On input PF contains t distribution of female There can be a maximum with the last age grou ended age group. All greater than or equal not the case, error me be written and the sub the calling program, the rejuvenated 5-year females. he 5- year age s to be rejuvenated. of 17 age groups p being the open- age groups must be to 0.9. If this is ssage number 1121 will routine will return to On output PF contains age distribution of Total female population after rejuvenation. The number of female migrants by 5-year age groups. There can be a maximum of 17 age groups with the last one being the open- ended age group. The 5-year survival rates for males. There can be a maximum of 17 survival rates for males. Each survival rate must be less than one and greater than or equal to zero. If this is not the case, error message number 1122 will be written and the subroutine will return to the calling program. The 5-year survival rates for females. There can be a maximum of 1 7 survival rates for females. Each survival rate must be less than one and greater than or equal to zero. If this is not the case, error message number 1122 will be written out and the sub- routine will return to the calling program. PPAR contains some of the basic parameters of the population. They are as follows: PPAR(1) - Rate of growth PPAR (2) - Rate of natural increase PPAR (3) - Crude birth rate PPAR (4) - Crude death rate PPAR (5) - General Fertility rate PPAR (6) - Hale life expectancy at birth PPAR (7) - Female life expectancy at birth. C. ERROR MESSAGES 1121 *** REVR5 ERROR NO. 1121 — INPDT ERROR IN PH OR PF *** ONE AGE GROUP OF EITHER THE HALE OR FEHALE POPULATION IS LESS THAN OR EQUAL TO 0.9. 1122 *** REVR5 ERROR NO. 1122 — INPUT ERROR IN SXH OR *** AN INTERMEDIATE SURVIVAL RATE FOR EITHER HALES OR FEHALES IS LESS THAN OR EQUAL TO ZERO OH GREATER THAN 1. 442 DOCUMENTATION V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c _ c _ . . C MAIN PROGRAM FOR REVR5 c _ . c . c THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN SEVEN C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ c __ STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO BEAD THE LABEL TO c BE OSED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C C THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE c INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET C FOLLOWING THIS ONE, (2) THE DATE (DAY, TMO, YEAR) FOR WHICH THE c POPULATION DISTRIBUTION IS GIVEN, (3) THE YEAR(NDAT2) TO WHICH THE C- POPULATION IS TO BE REJUVENATED, C (4) THE MORTALITY INDICATOR (KODE) USED TO SPECIFY WHETHER AGE C SPECIFIC SURVIVAL RATES ARE TO BE GIVEN OR A REGIONAL MODEL c — _ — LIFE table IS TO BE USED, (5)THE DATE (DAY1 ,TM01 , YEAR1) TO WHICH C THE FIRST SET OF MORTALITY DATA APPLIES (THE LATER c DATE), AND(6)THE DATE(DAY2, TM02, YEAR2) TO WHICH THE C SECOND SET OF MORTALITY DATA APPLIES (THE EARLIER DATE). C- NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 c INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER c PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA c ._ FOLLOWING THIS ONE. C DAY IS COLUMNS 3-4 OF THIS CARD. IT SHOULD BE ENTERED AS XX C SO THAT IT ENDS IN COLUMN 4, I.E. IF IT IS THE FIRST DAY OF c THE MONTH IT WOULD BE ENTERED AS 01. c TH0 IS IN COLUMNS 5-6 OF THIS CARD. IT SHOULD BE ENTERED SO c THftT IT ENDS IN COLUMN 6. C — YEAR IS IN COLUMNS 7-10 OF THIS CARD. C NDAT2 IS IN COLUMNS 11-14 OF THIS CARD. NDAT2 SHOULD BE THE c TEAK T0 vjhicH THE POPULATION IS TO BE REJUVENATED. c IT B UST BE S0ME MULTIPLE OF FIVE LESS THAN YEAR AND NOT c H0RE THAN FIFTEEN YEARS LESS THAN YEAR. C KODE IS IN COLUMNS 21-22 OF THIS CARD. IF BOTH THE LATER C AND EARLIER MORTALITY DATA IS TO BE PROVIDED AS SURVIVAL C RATES THEN THE NUMBER 11 SHOULD BE PUNCHED IN COLUMNS c 21-22. IF THE LATER SET OF MORTALITY DATA IS TO BE c PROVIDED AS SURVIVAL RATES BUT THE EARLIER SET IS TO BE C BASED ON A COALE-DEMENY REGIONAL MODEL LIFE TABLE THEN THE c NUMBER 12 SHOULD BE PUNCHED IN COLUMNS 21-22. IF THE LATER C SET OF MORTALITY DATA IS TO BE BASED ON A COALE-DEMENY C REGIONAL MODEL LIFE TABLE AND THE EARLIER SET IS TO BE PRO- c VIDED AS SURVIVAL RATES THEN THE NUMBER 21 SHOULD BE PUNCH- C ED IN COLUMNS 21-22. IF BOTH SETS OF MORTALITY DATA ARE TO c BE BASED ON COALE-DEMENY REGIONAL MODEL LIFE TABLES THEN c THE SUMBER 22 SHOULD BE PUNCHED IN COLUMNS 17-18. ANY C OTHER NUMBER IS AN ERROR AND WILL CAUSE THE MAIN PROGRAM TO C STOP. C DAY1 IS IN COLUMNS 23-24 OF THIS CARD AND REFERS TO THE DAY OF c THE MONTH FOR THE LATER MORTALITY DATE AND SHOULD BE c ENTERED SO THAT IT ENDS IN COLUMN 24. C TM01 IS IN COLUMNS 25-26 OF THIS CARD AND REFERS TO THE MONTH OF c THE YEAR OF THE LATER MORTALITY DATE AND SHOULD BE c ENTERED SO THAT IT ENDS IN COLUMN 26. C YEAR1 IS IN COLUMNS 27-30 OF THIS CARD AND REFERS TO THE YEAR c T0 hhTCH THE LATER MORTALITY SET APPLIES. C DAY2 IS IN COLUMNS 31-32 OF THIS CARD AND REFERS TO THE DAY OF c . THE MONTH FOR THE EARLIER MORTALITY DATE AND SHOULD BE c ENTERED SO THAT IT ENDS IN COLUMN 32. C TM02 IS IN COLUMNS 33-34 OF THIS CARD AND REFERS TO THE MONTH c OF THE YEAR OF THE EARLIER MORTALITY DATE AND SHOULD BE c ENTERED SO THAT IT ENDS IN COLUMN 34. REVR5 443 TEAR2 IS IN COLO HNS 35-38 OF THIS CARD AND IS THE YEAR FOR WHICH THE EARLIER MORTALITY SET IS GIVEN. THE THIRD READ STATEMENT OSES TWO DATA CARDS. THE PORPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE MALE POPOLATION AGE DISTRIBUTION (PMI) IN FIVE YEAR AGE GROUPS. PHI VALOES ARE ENTERED ON TWO CARDS. FOR EACH PMI VALUE EIGHT COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS OF THE FIRST CARD. A MAXIMUM OF TEN PMI VALUES CAN APPEAR ON THE FIRST CARD SO THAT THE VALUES END IN COLUMNS 8, 16, 24, ..., 72, AND 80. THE SECOND CARD CAN CONTAIN A MAXIMUM OF SEVEN PMI VALUES AND THE VALUES SHOULD BE ENTERED IN THE SAME MANNER AS ON THE FIRST CARD EXCEPT THAT THE LAST VALOE ON THE SECOND CARD WILL END IN COLOHN 56. IF LESS THAN SEVENTEEN VALOES ARE TO BE GIVEN, TWO CARDS MUST STILL BE USED WITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR THE NUMBER OF PHI VALUES. THE FOURTH READ STATEMENT USES TWO DATA CARDS. THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE FEMALE POPULATION DISTRIBUTION (PFI) IN FIVE YEAR AGE GROUPS. PFI VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAME REQUIREMENTS AS PMI VALUES. THE FIFTH READ STATEHENT USES ONE DATA CARD. THE PURPOSE OF THE FIFTH READ STATEMENT IS TO READ IN THE TOTAL NUMBER OF MIGRANTS (PMMT) FOR EACH FIVE YEAR REJUVENATION PERIOD. PMMT IS CONTAINED ON ONE CARD. THERE ARE AS MANY PMMT VALUES AS THERE ARE REJUVENATION PERIODS TO A MAXIMUM OF 10. THE FIRST PMMT CONTAINS THE TOTAL NUMBER OF MIGRANTS FOR THE FIRST REJUVENATION PERIOD. FOB EACH PHHT VALUE, EIGHT DIGITS ARE ALLOWED WITH THE FIRST NUMBER ENDING IN COLUMN 8. THE SIXTH READ STATEHENT USES FOUR TIMES AS MANY CARDS AS THE NUMBER OF REJUVENATION PERIODS. THE PURPOSE OF THE SIXTH READ STATEMENT IS TO READ IN THE PERCENT DISTRIBUTION OF MALE AND FEMALE MIGRANTS (PMMA AND PMFA) IN FIVE YEAR AGE GROUPS. THE TOTAL HALE AND FEMALE MIGRANTS ADDS TO 1.00. THERE ARE TWO CARDS FOR MALE MIGRANT VALUES (PMMA) FOLLOWED BY TWO CARDS FOR FEMALE MIGRANT VALUES (PMFA) FOR EACH REJUVENATION PERIOD. PMMA VALUES ARE CONTAINED ON TWO CARDS. THERE ARE EIGHT DIGITS ALLOWED FOR EACH PMMA VALUE WITH THE DECIMAL POINT IN COLUMN 1,9,17, ...65 AND 73. THUS, THERE ARE TEN VALUES ON THE FIRST CARD. THE SECOND CARD CONTAINS SEVEN VALUES WITH THE LAST VALUE IN COLUMN 49-56. PMFA VALUES ARE CONTAINED ON TWO CARDS. PHFA VALUES HAVE THE SAHE REQUIREMENTS AS PMHA VALUES. THE SEVENTH READ STATEMENT USES BETWEEN TWO AND EIGHT DATA CARDS. THE PURPOSE OF THE SEVENTH READ STATEMENT IS TO READ IN THE MORTALITY DATA. THIS CAN BE READ IN FOUR ALTERNATIVE WAYS. THE ALTERNATIVE TO BE USED DEPENDS ON THE MORTALITY INDICATOR (KODE) READ BY THE SECOND READ STATEHENT. ALTERNATIVE 1, KODE = 11, I.E. COLUMNS 21 AND 22 OF CARD 2 CONTAIN 11, SURVIVAL RATES (SRX) ARE TO BE READ FOR BOTH THE LATER AND EARLIER DATES OF THE REJUVENATION PERIOD. SRX VALUES ARE CONTAINED ON EIGHT CARDS, FOUR CARDS FOR THE LATER DATE (DAY1 ,TM01 , YEAR1) , AND FOUR CARDS FOR THE EARLIER DATE (DAY2 ,TH02, YEA R2) . FOR THE LATER DATE, THERE ARE TWO CARDS ALLOWED FOR THE SURVIVAL RATES FOR EACH SEX. FIRST THERE ARE TWO CARDS FOR THE HALE SURVIVAL RATES FOLLOWED BY TWO CARDS FOR THE FEHALE SURVIVAL RATES. FOR EACH FIVE YEAR SURVIVAL RATE, EIGHT DIGITS ARE ALLOWED WITH A DECIHAL POINT IN COLUMNS 1, 9, 17, ..., 65, AND 73. THUS, THERE ARE TEN SURVIVAL RATES FOR MALES ON THE FIRST CARD. THE SECOND CARD CAN CONTAIN A MAXIMUM OF SEVEN SURVIVAL RATES FOR HALES ENTERED IN THE SAME MANNER AS ON THE FIRST CARD. THE LAST RATE THAT CAN BE ON THE SECOND CARD IS IN COLUMNS 49-56 WITH A DECIMAL POINT IN COLUMN 49. IF LESS THAN SEVENTEEN RATES ARE TO BE GIVEN, TWO CARDS MUST STILL BE USED WITH DATA ONLY IN THE 444 DOCUMENTATION C NDHBER OF COLUMNS NECESSARY FOR THE NUMBEB OF MALE C SBBVIVAL RATES GIVEN. THE THIBD AND FOURTH CABDS ABE C FOR FEMALE SURVIVAL RATES FOR THE LATER DATE AND C HAVE THE SAME REQUIREMENTS AS THE FIRST TWO CARDS C WHICH HERE FOR MALES. CARDS FIVE THROUGH EIGHT ABE C FOB THE EARLIER DATE AND SHOULD HAVE THE DATA C ENTERED IN THE SAME MANNER AS THE FIRST FOUR CABDS. C AS THE FIRST FOUR CARDS. C ALTERNATIVE 2, KODE = 12, I.E. COLUMNS 21 AND 22 OF CARD 2 c CONTAIN 12, SURVIVAL RATES (SRX) ARE TO BE READ FOR THE c LATER DATE (DA Y1 ,TN01,YEAR1) , AND COALE-DEMENY REGIONAL c MODEL LIFE TABLES ARE TO BE USED FOB THE EABLIER DATE C- (DAY2,TM02,YEAR2,) SO THAT LIFE EXPECTANCIES AT BIRTH c ( E0 ) &RE NEEDED FOR EACH SEX AND A REGION (NREG) MUST BE c INDICATED. FIVE CARDS ARE NEEDED FOR THIS ALTERNATIVE. C SRX VALUES ARE CONTAINED ON THE FIRST FOUB CABDS C— AND SHOULD BE THE SAME AS SPECIFIED IN C ALTEBNATIVE 1. C EO VALUES ARE CONTAINED ON THE FIFTH CARD. ONE C VALUE MUST BE GIVEN FOB EACH SEX WITH SIX C COLUMNS ALLOWED FOR EACH VALUE. THE VALUE FOR- C MALES IS IN COLUMNS 1-6 WITH A DECIMAL POINT IN C COLUMN 3. THE VALUE FOR FEMALES IS IN COLUMNS C-- 7-12 WITH THE DECIMAL POINT IN COLUMN 9. C NREG IS PUNCHED IN COLUMN 13 OF THE FIFTH CARD OF C THE MORTALITY DATA. A VALUE OF 1, 2, 3, OR 4 C PUNCHED IN COLUMN 13 INDICATES REGIONS WEST, C NORTH, EAST, OB SOUTH, BESPECTIVELY . C ALTERNATIVE 3, KODE = 21, I.E. COLUMNS 21 AND 22 OF CABD 2 CON- c TAIN 21, COALE-DEMENY BEGIONAL MODEL LIFE TABLES C ARE TO BE USED FOR THE LATER DATE (DAY 1, TM01, YEAR1) SO c THAT LIFE EXPECTANCIES AT BIRTH (EO) ARE NEEDED FOR EACH SEX c . AND A REGION (NREG) MUST BE INDICATED, AND SDBVIVAL C RATES(SRX) ARE TO BE READ FOR THE EABLIER DATE (DAY2,TM02 , c YEAR2) . FIVE CARDS ABE NEEDED FOR THIS ALTEBNATIVE. C EO VALUES ARE CONTAINED ON THE FIBST CABD OF THIS C GROUP. EXCEPT FOR BEING ON THE FIRST CABD THEY C SHOULD BE ENTEBED IN THE SAME MANNER AS C SPECIFIED IN ALTERNATIVE 2. C— NREG IS CONTAINED ON THE FIRST CARD AND EXCEPT FOR C THAT FACT SHOULD BE ENTERED IN THE SAME MANNER C AS SPECIFIED IN ALTERNATIVE 2. C SRX VALUES ARE CONTAINED ON FOUR CARDS. IN THIS C CASE ON CARDS TWO THROUGH FIVE AND SHOULD BE C ENTERED IN THE SAME MANNER AS THE FIRST FOUR C CARDS IN ALTERNATIVE 1. C ALTERNATIVE 4, KODE = 22, I.E. COLUMNS 21 AND 22 OF CARD 2 CON- c TAIN 22, COALE-DEMENY REGIONAL MODEL LIFE TABLES C ARE TO BE USED FOR BOTH THE LATER AND EARLIER DATES. c THUS, LIFE EXPECTANCIES AT BIRTH (EO) ARE NEEDED AND A C REGION (NREG) MUST BE INDICATED. TWO CARDS ARE NEEDED FOR c THIS ALTERNATIVE AND MUST BOTH BE SPECIFIED IN THE SAME C MANNER BUT WITH DATA SUPPLIED FOB THE TWO DIFFERENT DATES. c THE MORTALITY DATA FOR THE LATER DATE IS SUPPLIED ON THE c FIRST CARD AND THE MORTALITY DATA FOR THE EARLIER DATE IS C ON THE SECOND CARD. c THUS, TWO CARDS MUST BE COMPLETED AS INDICATED BELOW. C EO VALUES MUST BE ENTEBED AS GIVEN FOB CARD FIVE OF C ALTERNATIVE 2. C NREG MUST BE ENTERED AS GIVEN FOR CARD FIVE OF C ALTERNATIVE 2. c c _ DIMENSION PMI(17) ,PFI (17) , SRX (17,2,2) ,CDMLT(18,8) *,PPAR (7) ,SXF(17) ,SXM(17) ,E0(U),SM1 (17) ,SM2(17) ,SF1(17) ,SF2(17) , *PMMT(10) ,PMMA(17,10) ,PMFA (17,10) ,PHM(17) # PMF (17) ,PM (17) ,PF{17) NREAD = 1 NPRNT = 15 C c C READ IN THE DATA c C 10 READ(NREAD,11) 11 FORMAT(1X,52H ) READ (NREAD, 22) N XT, DAY, TMO, YEAR, NDAT2, KODE, DA Y1,TM01, YEAB1,DAY2, TMO *2,YEAR2 REVR5 445 22 FORMAT (11, 1X, 2F2. 0,F4. 0, 14, 6X, 12, 2 (2F2 . 0, F4. 0) ) READ(NREAD,33) (PHI (I) , 1=1 , 17) 33 FORMAT (10F8.0) READ(NREAD,33) (PFI (I) , 1=1 , 17) CALCULATE THE NUMBER OF TIMES TO READ THE FERTILITY AND MORTALITY NDAT1 = YEAR ITT = (NDAT1-NDAT2) / 5 IF (ITT) 1040,24,20 20 CONTINUE IF (ITT - 10) 24,24,1040 24 DATM = YEAR + ( .08 33* (TMO-1 .)) + (• 0027* (DAY-1 .) ) READ(NREAD,33) (PMMT (I) ,1=1 ,ITT) DO 25 J=1,ITT READ(NREAD,77) (PMMA(I,J) , 1=1, 17) READ (NREAD,77) (PMFA (I, J) ,1 = 1, 17) 25 CONTINUE DETERMINE HOB THE MORTALITY DATA IS TO BE READ AND OBTAIN SURVIVAL RATES IF LIFE EXPECTANCY AT BIRTH IS GIVEN IF (KODE - 11) 1010,30,50 30 DO 40 K = 1,2 DO 40 J = 1,2 READ(NREAD,77) (SRX (I , J,K) ,1 = 1,17) 40 CONTINUE 77 FORMAT(10F8.7) GO TO 200 50 CONTINUE IF (KODE - 12) 1010,60,130 60 DO 70 J = 1,2 READ(NREAD,77) (SRX (I,J,1) ,1=1, 17) 70 CONTINUE READ(NREAD,88) EO (3) ,EO (4) , NREG 88 FORMAT(2F6.3,I1) TEST EO VALUES AND NREG FOR APPROPRIATE VALUES 72 JI = 3 KI = 4 K = 2 75 DO 90 I = JI,KI IF (EO(I)-20.0) 1020,90,80 80 CONTINUE IF (EO(I)-80.0) 90,90,1020 90 CONTINUE IF (NREG- 1) 1030,110,100 100 CONTINUE IF (NREG - 4) 110,110,1030 110 CALL MLT(EO(JI) , 1 , NREG, CDMLT) DO 120 I = 1,17 120 SRX(I,1,K) = CDMLT (1,6) CALL MLT(EO (KI) ,2, NREG, CDMLT) DO 125 I =1,17 125 SRX (I, 2, K) = CDMLT (1,6) IF (KODE -22) 200,180,200 130 CONTINUE IF (KODE - 21) 1010,140,160 140 READ(NREAD,88) EO ( 1) , EO (2) , NREG DO 150 J = 1,2 READ(NREAD,77) (SRX(I,J,2) ,1=1,17) 150 CONTINUE JI = 1 KI = 2 K = 1 GO TO 75 160 CONTINUE IF (KODE - 22) 1010,170,1010 170 READ(NREAD,88) EO (1) , EO (2) , NREG NCONT = 1 446 DOCUMENTATION JI = 1 KI = 2 K = 1 GO TO 75 180 CONTINUE IP (NCONT - 1) 200,190,200 190 NCONT = 2 READ(NREAD,88) EO (3) ,EO (4) , NREG JI = 3 KI = 4 GO TO 72 C c C CALCULATE TOTAL MALE AND FEMALE POPULATION AND CLEAR OUT C POPULATION PARAMETERS FOR FIRST WRITE c C 200 DATE = 0.0 TB = 0.0 TD = 0.0 DO 220 I = 1,7 220 PPAR(I) = 0.0 DO 240 I = 1,17 SXM (I) =0.0 240 SXF(I) = 0.0 NDAY = DAY NYEAR = YEAR NHO = TMO WRITE (NPRNT, 111) 111 F0RHAT{1H1) WRITE(NPRNT,11) WRITE (NPRNT, 222) NDAY, NMO, NYEAB 222 F0BMAT(/, 1 X, 55HPOP0LATION AT THE BEGINNING OF THE BEJUVENATION PES *IOD ,2 (12, 1X) ,14) DO 245 1=1,17 PM(I) = PHI (I) PF(I) = PFI (I) 245 CONTINUE CALL PREVR(PM,TPM,PF,TPF,SXM,SXF,PPAR,DATB) C c C REJUVENATION LOOP c . C DO 250 I = 1,17 SM1(I) = SRX(I,1,1) SH2 (I) = SRX(I,1,2) SF1 (I) = SRX(I,2,1) 250 SF2 (I) = SRX(I,2,2) DATA = YEAR1 + (.0833* (TM01-1.) ) + (. 0027* (DAY1-1 .) ) DATC = YEAR2 + (. 0833* (TM02-1 .) ) + (. 0027* (DAI2-1 .) ) NYR = YEAR ITT = (NYR - NDAT2) / 5 300 DO 999 IT = 1,ITT DATB = DATM - IT * 5. +2.5 DO 310 1=1,17 PMM (I) = PMHA(I,IT) * PHMT{IT) 310 PHP (I) = PHFA (I, IT) * PMMT(IT) C c _ C INTERPOLATE FOB SURVIVAL RATES c C CALL ABREV(2,SM1,SM2,M) CALL ABREV (2, SF1 ,SF2, N) CALL INTRP (2, 0,H, DATA, DATB, DATC, SM1,SM2,SXB) CALL INTRP (2, 0,N, DATA, DATB, DATC, SF1,SF2,SXF) C c C REJUVENATE THE POPULATION c C CALL REVR5 (PM,TPM,PHM,PF,TPF,PMF,SXM, SXF,PPAB) NYEAR = NYEAR - 5 WBITE (NPRNT, 1 11) WRITE (NPBNT, 11) WBITE (NPRNT, 333) NDAY, NMO, NYEAR REVR5 447 333 FORMAT {/, 1X, 2<4H POPULATION REVERSED TO , 2 (12, 1X) , 14) CALL PEEVE (PM,TPH, PF, TPF, SXM, SXF, PPAB, DATB) 999 CONTINUE IF (NXT) 10,1000,10 C c . C — -_- ERROBS IN INPOT DATA FOR THE MAIN PROGBAM c _ C 1010 WRITE(NPBNT,111) WBITE(NPBNT,1011) 1011 FORMAT {/,1X,95H*** ERROR IN INPOT FOB HAIN PBOGBAM — KODE, YOO SH *OOLD CHECK ALL OF YOUB INPUT DATA CABEFULLY.) GO TO 1000 1020 WBITE(NPBNT,111) IEITE (NPRNT,1021) 1021 FORMAT (/,1X,71H*** EEBOB IN INPUT FOB HAIN PBOGBAM — EO IS NOT BE ♦TWEEN 20.0 AND 80. 0. ,/, 5X, 50HYOU SHOULD CHECK ALL OF YOUB INPUT DA *TA CABEFULLY.) GO TO 1000 1030 WRITE{NPRNT,111) WRITE (NPRNT,1031) 1031 FOBMAT(/,1X,65H*** EREOR IN INPUT FOR MAIN PROGRAM — NEEG IS NOT *1, 2, 3, OR t.,/, 5X,50HYOU SHOULD CHECK ALL OF YOUR INPUT DATA CAR *EFULLY.) GO TO 1000 1040 WRITE (NPRNT, 1041) 1041 FORMAT {/,1X,92H*** EBBOR IN INPUT FOR HAIN PROGRAM — DIFFERENCE I *N YEAR AND NDAT2 IS NOT BETWEEN AND 10.) 1000 CONTINUE STOP END B. COMPUTEB LISTING FOR SUBROUTINE SUBROUTINE BEVB 5 (PH,TPM , PHH, PF,TPF,PMF, SXM, SXF, PPAB) c c C PBOGBAM NO. 1120 c C — SXM, SXF, PHH, AND PHF ABE INPUT ABGUMENTS ONLY. C PM AND PF ABE BOTH INPUT AND OUTPUT ABGUMENTS. ON C INPUT THEY PEBTAIN TO THE POPULATION BEFORE THE REJUVENATION. ON C OUTPUT THEY PERTAIN TO THE POPULATION AFTER THE REJUVENATION. C TPM, TPF AND PPAR ABE OUTPUT ARGUMENTS ONLY. C PH is THE MALE POPULATION DISTRIBUTION IN FIVE YEAR AGE GROUPS. C TPH IS THE TOTAL MALE POPULATION AFTEB THE BEJUVENATION . C PHM IS THE MALE MIGRANTS BY FIVE YEAR AGE GROUPS c pp IS THE FEMALE POPULATION DISTBIBUTION IN FIVE YEAB AGE C GROUPS. C TPF IS THE TOTAL FEMALE POPULATION AFTEB THE REJUVENATION. C PHF IS THE FEMALE HIGRANTS BY FIVE YEAR AGE GROUPS C SXM IS THE FIVE YEAB SUBVIVAL BATES FOB MALES. C SXF IS THE FIVE YEAB SUBVIVAL BATES FOE FEMALES. C PPAB CONTAINS THE FOLLOWING POPULATION PABAMETEBS - {1)BATE OF C GROWTH, (2) RATE OF NATURAL INCREASE, (3)CRUDE BIRTH BATE, c (4) CRUDE DEATH BATE, (5) GENEBAL FEBTILITY BATE, c (6) MALE LIFE EXPECTANCY AT BIBTH, AND c (7) FEMALE LIFE EXPECTANCY AT BIBTH. c c DIMENSION PH(17) ,PF(17) , SXM (17) , SXF (17) ,BF1 (7) ,PPAB (7) , *PHH (17) ,PMF(17) NPBNT = 15 C c C VERIFY INPUT ABGUMENT VALUES c c 100 NERE = N = H = NT = HT = 448 DOCUMENTATION TH = 0.0 TPH = 0.0 TPF =0.0 DO 104 1=1,17 IF (PH(I)-0.9) 112,112,101 101 H = H+1 TPH = TPH * PH(I) 10 2 CONTINUE IF (PF(I)-0.9) 114,114,103 103 N = N + 1 TPF = TPF + PF(I) 104 TH = PHM(I) + PHF{I) + TH IF (H) 107,107,105 105 CONTINUE IF (HT) 107,107,106 106 CONTINUE IF (H-(HT-1)) 110,107,110 107 CONTINUE IF (N) 110,110,108 108 CONTINUE IF (NT) 116,116,109 109 CONTINUE IF (N-(NT-1)) 110,116,110 110 WRITE (NPRNT, 111) 111 FORHAT (/,52H *** REVR5 ERROR NO. 1121 — INPUT ERROR IN PH OR PF, */89H *** ONE AGE GROUP OF EITHER THE HALE OR FEHALE POPULATION IS ♦LESS THAN OR EQUAL TO ZERO.) NERR = 1 GO TO 116 112 CONTINUE IF (HT) 113,113,102 113 HT = I GO TO 102 114 CONTINUE IF (NT) 115,115,104 115 NT = I GO TO 104 116 HT = NT = N = H = DO 122 I = 1, 17 IF (SXH (I) -.000001) 131,131,117 117 CONTINUE IF (SXH(I)-1.) 118,131,131 118 H = H +1 119 CONTINUE IF (SXF (I) -.000001) 133,133,120 120 CONTINUE IF (SXF(I)-1.) 121,133,133 121 N = N + 1 122 CONTINUE IF (H) 130,130,125 125 CONTINUE IF (HT) 127,127,126 126 CONTINUE IF (H-(HT-1)) 130,127,130 127 CONTINUE IF (N) 130,130,128 128 CONTINUE IF (NT) 130,220,129 129 CONTINUE IF (N-(NT-1)) 130,220,130 130 WRITE (NPRNT, 222) 222 FORHAT (/, 55H *** REVR5 ERROR NO. 1122 — INPUT ERROR IN SXH OR SX *F.,/103H *** AN INTERHEDIATE SURVIVAL RATE FOR EITHER HALES OR * FEHALES IS LESS THAN ZERO OR GREATER THAN 1.) NERR = 1 GO TO 220 131 CONTINUE IF (HT) 132,132,119 132 HT = I GO TO 119 133 CONTINUE IF (NT) 134,134,122 134 NT = I GO TO 122 REVR5 449 220 CONTINUE IF (NERR) 230,300,230 230 HRITE (NPRNT,444) PM, PMM, PF, PMF, SXM, SXF 444 FORMAT (/26H *** REVR5 INPUT ARGUMENTS * / 5H PM= ,9F12.0 /9X,8F12,0 /6H PHM= , 9F12. 0,/, 5X, 8F12 . * / 5H PF= ,9F12.0 /9X,8F12.0 /6H PMF= ,9F12. 0,/,5X,8F12. * /6H SXM= ,9F12.5 /10X,8F12.5 * /6H SXF= ,9F12.5 /10X,8F12.5 ) TPH = 0.0 TPF= 0.0 TM = 0.0 TB= 0.0 TD= 0.0 DO 240 1=1,17 PM(I) = 0.0 PF(I) =0.0 240 CONTINUE GO TO 1000 C c C INITIALIZE REJUVENATION VARIABLES c C 300 T1= TPM+TPF TTM =0.0 TPM= 0.0 TPF= 0.0 DO 305 1=1,7 305 RF1 (I) = PF{I+3) C c C ADJUST POPULATION, PM, OR SURVIVAL RATES, SX, TO COMPATIBLE NUMBER C OF AGE GROUPS, NG, AND MAKE SURE THAT THE MIGRATION ARRAY IS C NOT LARGER THAN NG . c C CALL ABREV (1,PM,PF,NG) CALL ABREV (2, SXM, SXF, NG) CALL ABREV (3 , PM, SXM, NG) CALL ABREV (3,PF,SXF, NG ) IF (NG - 17) 306,308,308 306 NGP1 = NG + 1 DO 307 J=NGP1,17 PMM(NG) = PMM (NG) + PMM (J) 307 PMF (NG) = PMF(NG) + PMF ( J) 308 NGM1= NG-1 NGM2 = NG - 2 C c _ C CALCULATE RATIO OF LAST TWO AGE GROUPS (AM AND AF), AND C TOTAL BIRTHS (TB) c _ _ c AM= PM(NG) /(PM(NGM1) +PM (NG) ) AF= PF(NG)/(PF(NGM1) +PF(NG) ) TB= (PM (1)-.25*PMM (1)*(1.+SXM(2)) )/SXM(1) + (PF(1) - *.25*PMF(1) * (1.+SXF (2) ) )/SXF (1) C c C REJUVENATE POPULATION c C PM (NG) =PM(NG) - . 25*PMM (NG) *(1.+SXM (NG) ) PF(NG) = PF(NG) - .25*PMF (NG) * (1 .+SXF (NG) ) DO 310 I=1,NGM2 PM (I) = (PM{I+1) -.25 * PMM (I) * * (1. + SXM(I+1))-.25*PMM (1 + 1) *(1.+SXM(I + 2) )) /SXM (1+1) PF (I) = (PF(I+1) -.25*PMF(I) * * (1.+SXF (1+1) )-.25*PMF (1+1) *(1.+SXF(I + 2) ) ) /SXF (1 + 1) TTM = PMM (I) + PMF(I) + TTM TPH = TPM + PM(I) 310 TPF = TPF + PF(I) TTM = TTM + PMM(NG) + PMF(NG) + PMM(NGM1) + PMF(NGM1) PM (NGM1) = (PM(NG)- (. 25*PMM (NGM 1) +. 25+PMM (NG) ) *(1.+SXM (NG) ) )/SXH (NG) PF(NGMl) = (PF(NG)-(.25* (PMF (NGM1) +PMF (NG) )* (1 ,+SXF (NG) ) ) )/SXF(NG) TPM = TPM + PM (NGM1) TPF = TPF + PF(NGM1) 450 DOCUMENTATION PM(NG) - PM(NGM1) * AM PF(NG) * PF(NGM1) * AF PM(NGM1) = PM{NGM1) - PM (NG) PF(NGM1) = PF(NGM1) - PF iNG) T2 = TPM + TPF TD = T2 - T1 + TB + TTM C c _ _ _ C CALCULATE CRUDE VITAL RATES (CBR AND CDR) , C AND GROWTH RATES (RNG AND RG) c _ C TMID= (T1 + T2)*2.5 PPAR(3) = TB/TMID PPAR{4) = TD/TMID PPAR(2) = PPAR(3) - PPAR(4) PPAR(1)= (T1-T2)/TMID C c C CALCULATE TOTAL AND GENERAL FERTILITY RATES (TFR AND GFR) c ,___ _ _ „. . ,__. C RF= 0.0 TFR= 0.0 DO 315 1=1,7 315 RF= RF + RF1 (I) +PF(I + 3) PPAR(5)= TB/(RF*2.5) C c _. . _ c CALCULATE LIFE EXPECTANCY AT BIRTH (EOM AND EOF) c ,_ C RM= 5.0 EOM= 0.0 DO 325 1=1,16 IF (SXM (1 + 1) -0.001) 330,320,320 320 RM= RH*SXM (I) 325 EOM= EOM+RM 1= 17 330 EOH= EOM+( (RH*SXM(I) ) /(1 .O-SXM(I) ) ) RF= 5.0 EOF= 0.0 DO 350 1=1,16 IF (SXF (I+1)-0.001) 360,340,340 340 RF= RF*SXF (I) 350 EOF= EOF+RF 1= 17 360 EOF= EOF+( (RF*SXF (I) ) /{1 . 0-SXF (I) ) ) PPAR(6) = EOM PPAR(7) = EOF C c C RETURN TO CALLING PROGRAM c c 1000 RETURN END REVR5 451 cr t— cc D LU —J G_ cc to o s Ob t^ S CM s £ * OB S in 1 s N o 5 m . 0B - Ob — o nv CM E 3- o kr, d- to 3- E s ©- -~ M> M> vS S M> CJ o>- M> *r» ^ s K — — — — X! ~. r- (^ M> f- IC s o O O J o o- o» O. o> •» B . • • " • • • • ?; R 0> rf* s; M> ^ s o <^ jj r^. %-■ o in g CM OB Oo 0B vS 5 s o- r^ CM r» 00 s ■^ 0> r- 0O CJ o~ S s -. <\j o- o> o^ s o 0o m 3- Cl r- S 2 -~ -~ — ~- -~ 3 CM r^ oo 1^- fto 3 £ O o o £ CJ o~ o- o o- ■x> £ • • « 2 . • • • • 1X1 3 — . CJ 3 r^ s s CM — Sj — u> 3 «S CJ 3 Oo 3- r» CJ in 3 3 r- «» ir> vS ir» 3 o^ m M> OD CJ c»- 3 s 3- •J> CJ ic» m S m r^ v» Or- •n. c»- S s — — CM S s . . • a • • • • • 3 s i& «n s O S s m ic CJ 5 s o — ' Oo lf\ o^ — 3- S cj o «"> BO 4- l^ 0O OB * m ^ — a- «» er> r-. 0o 1^ <\l 0O 3 K vS tv or- v» CM 0» CM r~- CT> 3 Oo tr> vS «J Oo m CJ r>^ 3- B» — 3 3 o- — -«. CJ O 0» — OO 3- CM — 3 s — Cj o o Cj CJ o S CJ O cr- 3- 3- — S s 3 5 o \» CM •». «r» T II OJ- 3 s t~ m — O r*- s m 5 *: v3 O IT. r~ s in sS tc» CM — — m — »- C) 9 *T o cj» cj W CM M> o CJ m > a- ■»■ in v9 1*. O in — on o- CM m CS ^ S 5 r^ o- cj «% rO CJ rf\ u-> rO CM CM 3 *• CM t-> 0» cr- — 3- ~- M) CM o 3- 3 3 0- — i PVI •*> O m CJ rr> O 5 m O CO r- 0o CM 0o vS o> O £ — 3 3 — O O CJ O O o 3 CJ Cj CJ- M> cr- f> 0- M) o» r- 3 3 CJ S 3 £ OO -» m Oo § Ml -- § S o ~- CJ «■> 09 "i S i (-- S s o: CO m 00 m fO S 0O CM >s 3> «% o. 3- o CM — s Si u_ v9 CM 0- r- 0s i- C« O CM »C> t»- n cr- — Oo o w> -~ CJ -- v9 o- r- M) r-> R £ 0- 3- — <»- CO T» i- 3- M^ O- 3- s — in o- M\ — ~ 1^- Cr- 0O in O- M> £ £ O -. CM OJ * o 3- O rci CJ s 3- o 0O o- CJ- •O 0o r- Oo ■— Q ■— ■— . £ !JS UJ M> o O o CJ CJ CJ •* O o CJ~ r- o- 0» w- r- o~ Oo iu -5i *T s v> O v> CJ " S> cr o 1T> o VO r- s car CJ N. 3 s m rCl CM m vS o 3 UJ m M) S s > o M> vS — en S »- cr- o ■». v» t>- — CJ > CJ in s a -u e'- v9 o ir> — ~- v» CM © ~ — s m *■ CM r~ C5 in •Ck tr». 0o in OJ h« 3- s s cr er Cj fC| CM i- *• vS ^Cl f^ CM r~ s CM r- m in 3- o» — 3- — do cc cr- o- " B — tr\ «o m o m CJ >n O R, in CJ o 5 \~ K> m 5 Si ec — — M> IO vS S S- m CM T» o CM 0O O- cc — CJ S s -J — f*> s» *• (*- o» v» f> O u^ O s rci *> * CM CJ in CM CM in O- -J CM 3- S s r> f-. * r»- >r> vS r- d- 0o 3- o- s m cr- m O 3- Oo — CM — CJ 2> m s 2 a. in IO K> >S o VS CJ v» o 2 M> CJ o- — o- *o c»- CJ o- «-, ex. CM 2 2 o a- Q o CJ CJ O o S o o o o- o- o» o- cr- o- o- Cl 2 r, Q. o Q_ S 3 • O in O- O CM o 3 z o- S 2 or cj v> IO O O o 2 v» r- OO t>- t»- O 3- 0O cr O — z 3 CD V* Cj O S- a- o «c> lf» vS Cr- ro, o- 2 3- rr, 3- CM CJ o cu — r- Oo to M> in 2 a C= o- Oo vS v» 1*- o v> OJ- u-> o~ C3~ o- 2 vS CJ <»» cr- 3- CJ ^> — 3- > — r~ o r~ Cl r— o S r- — r» »n r- s» vS •n vS in n — C\J a s O O o o CJ o CJ s o CJ o- ■3 o » i-« CJ- BO « >- z — in — ur> •3~ o ~ Z — m ~ » UJ vS o~ vc> J- CO c> u. cr- cj- CM vS 1"^ O- CJ- 00 in vS CM •£■ "- ■> o f» r~ vS o o •^ o w- J- OO — in CM *• 3- 3- Ml — v» fO in CJ > CJ o- n ■• r> o o» r- r~. CT- in »r> «<> o- ■^* in CM ■» CM CM v» 0O CM OJ OO c*> vS OO :> CJ M> -. n O CO vr> in — o- — BO — o- — n O- — 0- in O r- r- w> Oo M> CJ m CCJ n ~ 1/1 O o o c o o N O CJ 00 t»- o- o- OB o- 0O cr- c/> ™ — — - O 4- -1& O ■b c CJ a co ■« ~5 a- or w a -c 0D ~8 w a o "5 CJ ■c 1 +- V Ui u CD "5 o 3- cS o CO S3 c5 "5 c3 00 c5 o- 1 cj o cJ -5 o CM 1 cS cJ CJ I KJ CM 1 O o c CM CJ TT c<> V- tn e OJ 452 DOCUMENTATION V— <^ Q LU -4 £ or c/> o s o S OJ CS s 2 M> £ — M) E £ a- £ o~ to u> 3- S £ M> Ol 9- o vn ft 3- Oo *- vS <^J P: s O- vB vS> vj> vj> £ vS tn vS O vfl £ IS -. — — •— C v9 r- — IC *r o o Ci d 2 Of- o- CS a R i . • • C • • £ S r~ s 4> r» ~ s — ^ »- — " g Ol s Oo Oo vS OJ s s — to — OJ r- s Oo o 0r- -- to s s Cf- o> o o- o> 3 3- o r> *- Or- 3 s ~ OJ — — S r^ Oo - 3 s O o o o 3 o~ o~ es 3 s • • • . 3 » > 3 3 CS 3 r» o -r 3 3- 3 — 3- 3 3 r>- 3 r- o in r^ S 3 -» Irs o> vr> vS 3 to Cj Of ~ in 3 3 — «■> OJ rr> S 0- X es vO S s CM CS ol £ s OO 3 to 3- ^ ^ 3- to -t 3 US oo 3- m sS to d- t^ to 3 i~- C» r> ol to in Oo 3- 3 a OJ r» rri CO (T» Mi «M to Ol £ CM f-» 3- CT- -. Ol o- cn v9 vS> *s O r^ S w> o- Ol tn OJ 3- OJ VJJ eo CJ N 5 * — «s © tn O «n 5> Tk ca 5 to -J> to O — — . fO CS ** 3 o O O O Oj o c> Q 3 o- v& o- r^ vS *■ s 1 m <•<•> o» 3- OJ — Kl vS 3- s ft * o- — rn o~ O- ^ * to Cj CO ft ca -~ v» O- v» r- 3- o- — «^l Or. ft s — to OJ o- 3- — V> to 3- * vn s i^- o>- to in o- vS ~- to ol cr- 3- s s — >n o > ©, * Q * Cj s to o to ~ — — — «^ © s n cs o o o o S O © 3 s s • • • o • • 3 ft •— 3- Or- 5! o 1^ -- *• o- 2 3 o in 3- ft CO M> O in 3- ft s o -, -~ m vS •> — CS cs in n d- -. -A OJ Cj S •»> o~ to vn 1^ 3- to O in — — £ s — r«S OJ OJ r. OJ r^ 3- »S «■» r»- S ~- 3~ ~ to Of- cs- — rO Ol OJ l«- £ a OJ m o m o w> <3> vn O fi 1 O- in or- to — — OJ ITI cs ft s O o O o o O o Ci X s 3 r- cj- V5> US i- Oo vS Tk o s OJ OJ in o- OJ 3- r~ o~ s» vn cs s S o JJ o vS O •^> O 2 «- Ci cr- to © t OJ vD cs 2 2 O o o o O Q C5 O f 2 _ 0~ o~ o» O- n CS cs 2 2 o 1- • • 2 2 OJ 00 m o 2 «r r- OJ to »n Cs 2 3 OJ in . OJ o 2 _l CM CVJ in ol CS 2 2 — — oo o ^~ 1^- o * to z» O — •— ~- 0O o 2 2 r~- 3- r» vr> m o- *- *•> m «% ■s o~ 3- 2 OJ •— o- to a. vS u> r- *- i^- o «> CJ- 2 2 m — 3- — or- o- vS o OO o- ir> O" 2 3~ ^n K» 3- o O- cr- fO, -^ 3- in 0- cr- 2 2 m o- o l> — r-- o i^ o O 2 vj> lO» vS u> o. — OJ m — r- o 2 2 o o o o Q o o CJ — S o-~ a- O- o- o o o 2 ai cs; r» • <„ . :*- •o. o» O fn » M o» Oo d- rr> 0o o - r- OJ w> — o f- z — ir> CM m — o r- „> m OJ OP o «. t»- CJ- o~ to lu -s> OJ m cJ 0O cs u> ■ OJ — — o oo — CM s- ■o Q o- 3- O ^ vS> m in o > o cr- OJ — — o 0O — u, " in r- vS o in OJ o< CM f<% o- «■> Oj » 00 fT> \» to r-j o >9 tr> r~ \3 o in OJ * m — o- — o- ~ o- — 0» — • n f^- ir» to vS o «> ro m ~ Or- — m " O o o o o o o o o ~ 0o o^ Oo o~ cj-> CS Cs ~ - vS - • . • o • • - "2 « % I. 1. o * oa > a o i 1 1 ~5 "5 "5 "5 a -5 o- o OJ / 4- OJ s "5 cj "5 "S tj ts "2 o £ 0o ~8 s. O O J V 1- CO « OJ V UJ in REVR5 453 s S s 2 £ CT1 E ~ s £ S- o 1ft S R £ vS \0 vfi ;e ^ £ - — — ^ " ? o s S O o o IS s s s £ z 3 S s S S 3 S 2 3 o- >r> vS 3 S s ec» CM ro s S S pj CJ PJ s S s O ^ «J s s K • a s S s s £ s !^ v» CB *- 1^ OO S £ Cs "N vS CO Oo CJ s s A PJ o f« o OJ 7, s S Q Q O Cj Ci o S s 3 3 3 3 3 3 ; 5 5 3 3 3 3 Ifi vS v3 O O ro •>» 3 5 a- CM pj *> w> ^f> 3 1 3 ■* •n o W» *> 3- — v9 CO Cj s S OJ r-- i- vS f> 1^ s S J5 u> O vo O UN Cj Ki R s o Cj O Cj O O X S S S s s s s s 5 a s PI s r^l > en vS «% o s s 8 «p> o- vS r- J- 0» s s 2 O o \S O vS o 2 2 2 ixv vS o- *• 3- 2 2 2 vS Q Qo o- vc» o- 2 2 2 t-~ — r^ O r^ o o C> 2 2 S o o o o O o — CO 2 2 o> m s» «> ~ - u » U> "• oj a- •■p. o o- *- O o •" ^ * oj CM <*> «<■> o- «» O o^ ' -t " cj- ■— o- — oo — - m n ~ o o o O o o O -s ~ o, - • • v£ u> - - w O 1 "5 o a o o 1 O -C 1 V I— Uj 454 DOCUMENTATION -3 ►J N «* CO Pm > H H H > < W 03 03 (J © ■« CO B a o o o © o © © o o © © © © o © o oooooooooooooooo ooo©ooooooooo©©o oooooooooooooooo o o o Eh o p» B § Pu Q M CO 03 w > at aa o 94 EH f-t «« o o EH 04 W HO ►J CO ft. 04 « •»■> S5 < tQ art 10 r- m 03 D • Ct 03 H SB pa > D O CO o © ro Q o H 03 Gn- at SB O H Eh «s SB pa t> D >"3 W « Pa 33 EH Pn O O X H SB SB H U H PQ pa as t^ EH «■*■ 1-4 P o a. pa pa «i S3 pa Ph to SB o H EH 03 O 04 o 03 Oj (0 i s pa !oH I eq co I pa ■J «s a w Ph CO w oa eh ►a o ««s ►J B o CO n •« 3= CO eh pa o x ea pa co OtftNT-oof-r^a-r^oooncMOT-wn ©©irtf^^mfoOT-wmooroeofncD© ©co**-©CT*r~voin< r )cop , icN^i-o« _ ©«-^-T-r-000000©00©©0 r-0000000000000000 ©a>r* , r>m»"t , " , CT<*cooao ©aiOiTCN^voveo^ONomoino^v© 00>vOCN©»vOin*fOf»1»-vo«-r»« ©couicNoflOr.mmrop'iCNcNtr-i-©© ©^t-T-T-OOOOOOOOOOO© r-0000©000000000©0 (SiflOlOl/1f l 1r-ClNI')f»iCOof*COl , l a , moo< , ovoo3oir)^roooa>cN©©fnr* instoflT-oinr-Mfooicio^ooofor* *r»voP»cNC»>ro<7Nvoo»^'WP*ina , cN< ,r ) ^•©©(NfOCOvOvO^-eOOOlfiinr-Wr-CN oom*-cNfN©ir>mrM©*»-oot*'' v iir>r- ^cyivo»~voiovoovo©i*"if)ir>vovocDo ^r-©f)vo®t*»ov4pow© o»flor»©-*air~a , ^-o>i^vo*' T i^cN ^LO^COfOCN*— ?— r*r- tN rnina»r>i»-iDT-mr>vocy>if) cNOtyvmo3«y>ir)©'*>a'ro»-©r*ii-cooo voa-js-r-^c^irimcNvoor-arjaftMoocN oor>*3 , rof)' r !vor-js-T-vo< , o©r ,, '»in r-f-wr*v©intf«*)< T >»a-»Oif>i40vor»r» o o Q O H 03 pa 04 SB O o • H O EH «d » || pa as > EH D * n O pa as 03 19 pa p* 03 O EH pa Ph Eh o «S 03 EH SB H O 04 a o o © o • • o© II pa CO II II «i pa pa pa eh eh « «e < U 03 03 SB M 03 03 EH Eh ►J 03 «e Ml H H « oa a D * a q SB O D 03 03 Pu O U O oa EH < 03 O O o o o II II II EH CJ O «■« SB SB « «* «S eh e x u u H pa h HPiPi ►J M X m m pa EH 03 pq pa pa ph pl, Oh H H -H -1 •ai oa pa 03 HH »-5 W «S «B SB B E pa na (9 Ph REVR5 455 -3 Ml 10 > HI H *« > < S V) M •* 13 H M r^omrooaor-mfsaoocD^vovoo 0>r--ii*c*o>aocooocor^r"»u">< , '"»cTi OO0"i^*^t7\^>C^C7t^C7*CT*^C7\OOOOin ©O0O©OOOO000OOOO OOOOOOOOOOOOOOOO 1 H | 1-4 ' «« 1 10 1 «u 1 fa w H • O w 1 H 1-4 1 H ■« 1 « £3 1 .5 1 a, 1 o 1 w o t 1 1 1 1 1 1 1 1 SB H O 03 CO w a to o IB. E-i c H O e r^ MS <7i ■J f— a a. n o o « 04 1 1 1 1-4 < Q in 1 >c u V0 1 w 10 CT< 1 fa w *■ 1 > H *c 1 1 CO w 03 1 H ►J o 1 D «B o H ro 1 1 1 ►4 Q 10 ■ < 8 03 D o fa « W 04 03 X (0 w i w SB > O X «« « 03 H SI 03 to fa O 35 o 03 H H EH X < W •-) > D D 04 O o w fa oo^r^^^vocnoLn^r^oAcoi^oo^ or*tT*'-'-ootN(Neoo»3'cocNr*»r>jtTvT" o^-f r »csj»-aor»voa , *fncN(N^T-or- 0»-»=«— t-OOOOOOOOOOO© «~OQ©Q©0©©©00©©©©0 ocn^crN^a**-*- H /rococNCT*< T >*-< , o* ©ocN3'r»'if>o>^in\oun ©cotnromifit-t-co^-for-T-inT-aocjN OflO»'{N003^vO'»'*n(S(N^T-©0 Ot-t-i-^OOOOOoOOOOoO r-OOOOOoOOOOOoOOO© ^oiow^in»o9N>or''"Nr»M**o T-vo*«-'j3oor*'W^'-roinifiaoa , (Nvo o>inooc f0ON'43p"oovo»-inir>'-r~aNomtO*t7>< T l(MC9r-T-r-^©rO»-vOOr^^ KlrM-NOOIflWff'OintffflOsn tf^tvror^aioc^oooo^rotNaDvo**© oor^T-ooooo^oc^owaooor'foP* EH|||I|I|IIII|||I + ooTioinomomoifoinoinotn o o M o 03 NO M ro n po ro tr» «— s> fa «- o VO o a- O o sr . 3 r- ctn • • SB O O o O »" <7< fN o • • • e If) v£> H O o o H II < H 5E II W II II II II II H as < H W H H > H H H H H U D a> « <* •S *6 z z n O U 05 03 « «« «J W 03 SB Eh EH KUH39 E-i H H W M « fa >J 03 •a m fa fa 00 w H H OS OS Q CO H Ph W S3 GOCPiO>C^O^CTC?>(7tO>0>C?NCFiCFiCOCDin ooo©oo©oooooo©©o OOOOOOOOOOOOOOOO 3 x| S3 W Ph (0 35 I o W 1 H HH 1 H «C 1 as S3 1 o 1 Cm 1 o 1 03 1 eu 10 o 1 I 33 PJ VO 1 I H M C t i O W r- 1 i m w) O ss EH o H O EH r- «S en -} V a. W o O a* « w Ph Q o E W v£> Ph <0 a\ Ph « t m W > *> to W w W 03 E-t J o 3 Mi 85 f) S3 O o H to EH O m << Eh «s iJ © a Cm W o (0 Cm w CB 10 Eh Ph 95 > Q M IS W «S w n PS 10 « D 35 O 05 M H EH 22 << M kJ > D s &. O O to cu o*< r >ooin»sfovoa>oioor»»-or-- OVO*rr)Oflor»mtJn^rr)(N3'< r >r»vO^^*r^Olf>(NCri© or»ircvi©oor»inin^(*)rsjojT-»-ot- ©t-«-»-r-©©©©0000©©©© •-©©ooooooooooooo© 05nnnfOininM(Nflr-inr(N(NiflO ©mvor»inoT-r«T-(Nir'-=S' vo(N'-oin»-oa'u*ivoinif)»-*o>o'- o^oninjtsfr»vooD^ocri3-»-©©3-sr3 , » Q O H 03 W CM 6. C* ss o o • H O EH < 85 II H S3 > gH e s So 05 03 O W Ph S3 O Eh I I I I I I I I I I I I I I I + OoiflOinoinoiromoinomoiri ao a- ro * o *■£> • a- o o o II M W II «5 W W EH 03 «* U 03 95 H 03 EH i-3 03 «S M 03 03 a EH H •< a 85 D 03 Ph U O w EH 03 vo ro cr» © f" fl O o r* 0> • t © i- r~ © © © II II II II w w >h x EH Eh U O M) «S S5 85 « CB «S < H H B3 Ph o O Eh Eh Ph pq H H E-» > «B M 03 05 -i D •a 00 S3 OOOOOOOOOOOOOOOO tt***tt**tt«*tte OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO o \o I o r» a M VI 03 w > W 03 o r* 0> o a o H 03 M Oi as o M EH •a) as N > D 3 03 W 33 It, O 13 as o as h as H H «£ 03 » co Eh Oj MOW in cu as H •o as C «< Eh (N 09 Ml 03 d as o es h W Eh as < W h1 > O D & O O 10 Oi V) as ) o I H i e I 03 I o I 04 I O I 03 I O4 M W Ik) ni I I I I I as o M EH Ml hJ & 04 o Bl I I I I I I I I W I H I EH I Q I Hi I O I (0 CD I D3 H I E-t X I O W i m to t w ►J ■ M 03 W Eh W 8X1 M W O«-^0TlCT>3 - C0< r >C*>vj500(N00r-lf>a0C0 OWPli-JiflJhOr 3- CO *- ijO »- CT> r» o^snoajMninsniNiNfror- 0»-»-»~T-000000000000 ^•OOOOOOOOOOOOOOOO O f> ' T "*0vo^< r )r**o*"*< r )**vou*> u ">vovoCTi oa>p~»ocNvo3 , ai^»-^'i*-ot4*>oooa- Or-a'CNOOOP^tnma-rritNCNT-i-Or- ©^■r-i-T-OOOOOOOOOOOO «-0000000000000000 inoooo« , 3 - or , »voor'~oooc , )OOii/>T- hMi-tft-vooeohoitfooco*!-*© ^•^-*^O^ |T 1if)r-T-vC»-p»ij0if)i— a> rifiWunehiflOt-hi- nn woifi o T-ONLOa-^-l— vOCOONO^S'fNr^r^OO^'IN o o inT-incoi-»-vovor^<* , i;j , ©(NCN ^jtm^r-ooofNCNcoo^mcrir-r-r-t^ < Y i43 , ocN-3 O U 03 03 OS «* «s W 03 Z H H KUH ac as H U U H H 6h W W W &H _1 03 <, H 04 04 S3 O Ml H W HH X X EH 03 OQ Q H W W w o H fc EH H K H 03 W W O Ml Ml Q Q gq &-, h 03 as o to Ph M H EH 03 03 i-i i-3 SS Bl, U U Hi H O < W W o 03 Hi Hi 04 w H «« Mi O EH as E E H ■* w w E 03 « fc 458 DOCUMENTATION 63 -3 2 H H < to h > 03 H H > «tl OJ ps as 1-3 c «* to JC r-vor^ror-in^-invoa-cnincN'-^-^' r-OPOfioaor-mcNoooaovovovo© avr^o»avc*aoaoaooot>r»u"> >Cn\©t»-t'»CM00© aoc*v^cy*c7vc7*c/*cj>c7vcjvc7vcy*c7*oo , r**in oooooooooooooooo w -3 w o* 1-3 I O I o 1 03 1 1 1 CM 1 1 (0 as u Eh XI CM 1 1 o w *~ 1 1 ra to II sb o H H 03 EH O «< E O a. vO 1 o 1 O 1 w r* 1 1 Mi a in 1 E w VO g 03 to Oi 1 Oh to 1— 1 03 1 > vO 1 CO 03 1 w W 05 1 Eh 1-3 o 1 a «« St m 1 .-? «c O 1 O H 1 10 H O CQ O ad H H EH IS «< 03 ■^ > S D a- o o CO o. ©o^Mi-r>i>ovoo*r r i'' r >cMt-'-i-T-rN ©t-^»-^©©0©0©©0©©0© t-©0©©©©0©0©0©0©0© \43mT-aoooro»-p>i , i^a , (NicT>cN*om tfl*We«WeOO*^0^30W\OtNr- sf*-a&(NaOvOCMr-C»\t^vO=J*roCNCNCM;» as ^ (N <\ i- i- f*.r> in»~T-T-cTi^-a>r»r > -in©^r»mro'-vo «-ooi/i\oHNififvi»-^mt»0'->oN»- »-INinr-3'^T-|>.rr)l>^-a'POr^Lf)aO© fninoo©a-*r^oo CM CM r- r- f- r» r-voocyia , vovef-r* , co tNT-r-i-in©3 , ©vo3 , T-oovc-»»rovo < T-r-CNCNCOcosfrsj-irilfivcvct— E-4 I I I I I I I I I I I I I I I + o©in©ir©in©in©tnoif)©in©u"> H T-»-cN(NP0f>i*i»ininM3vei~-o en o H « Cu r- m se o O • e° «s S5 II H B3 > H S 3 ^ o M 05 « u> 03 0< 33 O EH 03 0< El O <* 05 IX SB H O 04 Q CN CN CO CM © ro • -* © © • o II 03 10 II «S 03 W H 03 «* U 03 55 M 03 EH 1-3 « «* H 03 OQ S EH N < Q SB D 03 h U O 03 H 03 © O t- ■* «■ r- © o r» 00 .» .« O *- 0% CM • • u*l VO © O II II II II HHXH HHUO «* «« a sb 03 03 «si rt! EH H sxuu EH EH W W •HHbOi U !-3 X X Q H W 03 H 03 03 03 03 DhHH 03 J J U h3 ■C 03 03 03 .-3 i-3 64 < «C SB H B 03 03 CS Bu REVR5 459 w m •* E M H <. IA Pm t> H H H >■ < W os oa >J s «s (O E oooooooooooooooo oooorom(Nir>OT-»-oot»»ior»voooo r**acT>aNooooaooor»voir>fnoinoo'*) OOOOOOOOOOOOOOOO M m < e W I Bm to e o W H ►J H «c OS E O o, o OS 0* I i i i 33 U H M O H II 2 O H H OS H O i W w o\ i h as t— i w i > v£> i M w i W H OS i H m O i a <* E <*1 i J E o I o H I tn H O m •4 H «c M Q a CU w o w Cu as M E VI z 5 O X «c fl M PQ as V] as D 2 o « H M H as <« W i-l > S O Qt o O OT 04 o^»' T >' r )r-onr^in4nroT- ©r^tfi»-»-'~ - *-fN 0^T-t-T-©0©©©©0©©©©0 i-OOOOOOOOOOOOOOOO om*tNoyoeomco oocMOir»f , i(Noo(7No03'r»vovairi>a ©T-t-*-«-©000©00©0©0© t-00©0©0©0©0©©000© Ul(M(NN\0'->OiOO , flOr-U10>M r )r mvor-' r >«-a , (Tir»ir)^»-r»0(N©i T )oo flff)iOh(Mlfli-rM^OPWCOjihffi O>CfiCN00*Oina-^iD©©' — eoNoiooa>fl03'S^ fNffNir»i^tNroa , «-tnoocMrnvoovovor» r»f»Nheoa>i"iifl*N5>eoMN»a mNr-inotf^r«tfT-oi^ina34i^ OMn»i»)cifsNi-T-»- «< T-r-cMfN' T i' r )a'*iriif) N Ovcr~ Si i i i i i i i i i i i i I i + oin©if)Oif)©in©if)©iDom©in H T-r-c\ia'« , tf>invOvor»r- H X E-t H U O «e < e e K B < «C H H E >h U L> HEHMM w H EH > < 03 03 D W W ►J •a s w to OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOO EH w to -a M m 03 o 03 03 M z o H EH t l-> o z w > o o V) o O n Q o H 03 w a< z o H EH z w > s w 03 W S3 EH b O EJ> Z H 25 SE H ID W CQ W 33 EH EH < as o H H «c 1-J S3 a. O W to as w H 1-3 H «S 03 E O & O 03 Qj V> 1 33 W I EH X I O M i m O00l ,N -inif)^ , r0tNCN'— t-o»~ Or-' - r-r-OOOOOOoOOOOO T-OOOoOOOOOOoOOOOO Of^**' r >OimCOmvO^^'(N3 , r-vo\o oOvoovo-r>ir-a>oor^if)tfpO' , ifN»-t-0'- ©fMt-Ot-OOOOOOOOOOOO •-OOOOOOOOOOOOOOOO I 0«-t^vO(yi(NONci^a'VOC7> «-cyior*vor>floorM(Nco- ro H^^•a^a•crl^ro^i»•<7\^•<7^a■o^fl■a^^■ ■a; T-«-(N- EH I I I I I I I I I I I I I I I + OoirioirioiOOinoinoiDOinoin a o M 03 w Oj o o O z o O O O O O o o • • • t M o O O O EH II «s! w z II II II a li II w 23 <* w w w X M > EH to H Eh H u u Q 3 03 < «; rti z z a O U 03 03 03 «* rt 03 z H H 03 C5 M M 33 H O O EH EH EH W « WfcH 03 «: l-H Oi Qj SB O s H w •J X X H OJ o M w W W O EH to H EH W M 03 w w O «e «* Q Q W n. b 03 Z a E> Kn M M Eh 03 03 ^ <-i z Cn u o hJ H o «: w w O 03 (-1 ►-! e* w W «J «! o H z 5E JC H < w w ■3 03 o Ph REVR5 461 • • 00 rn • o • o in © © 00 r- r* r~ CM t» <* T— o r» 00 V0 «— CM CM © © © ^* 9 • r» © o 00 o • • 3- vO o o CM o © o « M O «S S3 a « o •4 HC H © 10 W h4 to H 2 o H EH «s ►J fc, B Cm Oi O 03 Qj o w E i-3 a, M W BE OS O # * # # # # 00 * o * • o • • O • m© >on • © • *-«-r0OOCM©©a0O©O r» © ^ in t-^oo on t- © r* © 3* r» © on r- on • • © oo o o o © o 03 w • • N O © O Eh -1 «« OI W 03 O © © © © S- © ON CM 3 1 • NO • p» © • • © r» (n t- © 3- ro © cm © m m m o> t" * o ON ro »- CM CM (N ro CM CO t r» o • • r» S-f0flO33 in 3 1 © ro o VO ON 3- * © m oo I CM 3 fN m • CM r» in IN to r- eh m ss o> M fN e co o OS «s co • ao © . • T- ro © 00 NO on i- m r- cm t- r- 3- ro CM m I 3- Eh oo vo Sin CM 2 ON H vO PO in OS > N as * a. o vo • a- © • • vo eo © co r* in cm co on vc cm cm r- r» «- t*» vo © PO • in ON r— ON O • VO • PO • in © cm © co o CM 3- ON ON in on on on m vo PO sr r- oo ro in • n on 1/1 on O • P» • CM • CO O CM O PO O PO PO ON o* VO © ON ON ON 00 CO CO vo O in r» on in on • ON • © © © C* OS • o o as 03 in co w in * ON oo 2 vo t*- O on r- on H • -a- • eh o r~ © «s ON kJ CO D . cu o o a, • vo © • CO sf © © yOS-r- r» cm on © • o CM O «- CM 3- ON Ov vO 00 II Cm E X! CO II b X to OS M 2 w > o o to in ON vo © o EH a u to 03 w > N 03 2 O H EH Ml H) D Cm O Cm t X EH to to w to o © H fet Cm to EH U 03 < O E M E b Cm H OS • • O © © 2 H 10 M 03 hi O < OS E OS cq os H eh as a eh . • Cm h o o 2 U H OS I o 1 Pm r- 2 i- O i-H(fl 1- EH W "SB.. •fIiJOO O B < 2 Cm > O 03 Cm EH O B 03 \A Cu OS "S 2 N EH H OS Eh PS > > MWM II OS 33 OS E Cm EH Cm Cm * # * * * » OO © © 00 PO in vo r^ en o o 04 *e HO D CM Pm • O O as cm D 04 O O 04 04 IS 04 SB M M H O in <« m 04 04 t» «w > w as H OB O 04 • * * II • » » a • • * CM in • • en o © en © co sr r- CM en o en en > en vo r» r- • co r*» sr CO o • in * ■=» • m o sr © vo o CM 00 00 00 in r» en en sr o i VO CM i m en m oo • © oo p» oo © • cm • co • © © r» o co © vo m oo ao vo o en en cm r» I CM r- © CO • oo en in en o • st t en • OOOfOrO en © en en r» cm en en sr «- in cm ■ co m co m t tr en co en in • co • r» t a- in t- o i~ © vo ao en en en 9 en en o sr ■ r> co i co oo m vo • cm en in en © ■ oo • co • * © * © in © ro *~ vo vo p" o ov en ay i- CM • • O © © 04 04 c- ?" w > r- «- > vo vo as vo r- o • oo en cm en h m • r- • r> • 6-i oo in en © vo o < * r» t— oo J ro * oo oo o t- cm • • Cm © © o Cm O 04 M N O O o w 04 O tfl H v> tfl M i-4 tf> H (H CM V) EH H iJ 04 «S O E H B Bu CM E-< 04 O as H W M 04 i-i O <« 04 E 04 M 04 O U VO M « en s IX *- CM H as « VO H 04 I O O I b o o o © o o o o © © co en a- © m en * en a- en vo vo oo r» oo «" en r» en oo • ♦ • • o o © o o sr r» o CM VO 00 CM r* in co en co m ao oo en co en ao • • • • © © © o o oo cm m r» • • » p» en sr © © r- CM i- r- © en © en co ■ en en en en © • • • • © © © © O O © O «" o o o o o a W tfl 04 H > M 04 II E I CM II b E Cu II E X W II Ok X to as o 04 H h e-i as «4 M fi > D D CM O O CO CM «- SB «- o «" M O 04 CM E-I O D 04 hJ CM 04 •< as M H H 04 H 04 >• > HHHll 04 E 04 E CM H CM CM * * * * » # © O tf ami-o co m r~ cm «- co r- m en po en in en en en en • • • • © © © o © o cm © m st oo r* co co st co m oo o vo in o vo t en en en en © • • • « o o o o oo r* cm «- © r» r* p» t- cn vo vo vo ro vo oo K oo en co en en • • • • en o © o o o • • CM O VO en n E X II II II 04 03 x cm < i/3 Cm ca RVFWD I. DESCRIPTION OF PROGRAM A. PURPOSE To obtain an estimate of the under enumeration of the age group 0-4 in a population census, under the assumption that fertility has remained constant during the past 10 or 15 years. This subroutine uses a population distribution by sex and 5-year age groups, 5-year survival rates for each sex, migrants by sex and 5- year age groups, and the sex ratio at birth. If there are no migrants, the variable representing them is zero. B. DATA NEEDED 1. The male population distribution by 5-year age groups. 2. The female population distribution by 5-year age groups. 3. The male migrants by 5-year age groups. 4. The female migrants by 5-year age groups. 5. The male survival rates by 5-year age groups. 6. The female survival rates by 5-year age groups. 7. The sex ratio at birth. 8. A selector used to determine whether the correction should be based on the past 10 or 15 years. II. METHODOLOGY A. MATHEMATICAL DERIVATION The population by 5-year age groups for each sex at time t is rejuvenated by using the survival rates and migrants (if any) as was explained in the subroutine HEVB5. This process is again repeated for another 5-year interval. The second rejuvenation process gives the number of births during the period t-10,t-5 — those who were age 5-9 in year t. Osing the number of births and the female population in ages 15-49 at time t-10 to t-5, the average number of births per woman is calculated as follows: F= 2 B^W 5 ( FP t_1 ° + FP t_5 ) V 35 15 3? 15 where B ' are the estimated births for the period t-10, t-5 based on the population 5-9 at time t and ,,-FP )5 and ,-FP.^ are the female population at ages 15-49 at time t-10 and t-5 respectively. The average number of births per woman in childbearing ages is used as an estimate of the age-specific fertility rate for all females during the time period t-5,t. The process of obtaining the births during t-5, t and projecting them to time t is made by using the subroutine PROJ5. PBOJ5 takes the estimated 463 464 DOCUMENTATION number of births for the period t-5,t, and separates the births into males and females by using the given sex ratio at birth and then projects them to year t to obtain an estimate of the population at age 0-4. The same procedure can be made by estimating the total number of births at the period t-15,t-10, based on the age group 10-14 at time t and three rejuvenation process. The subroutine always rejects the actual population at age 0-4, for time t. B. COMMENTS The main program uses the subroutine MOBDJ to calculate the survival rates for the midpoints of the rejuvenation intervals beyond the first. This sub- routine adjusts the survival rates by assuming that during the past the sur- vival rates changed in the same proportion as two different sets of survival rates from two Coale-Demeny Regional Model Life Tables with the same life expectancies at birth. For a detailed explanation of this procedure see the Subroutine MOBDJ. III.M A I N PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1 . CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL RVFWD(NT,SRB,SRM,SRF,DATB,PH,PF,PMM,PMF) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variable names SRM ,SRF,PM,PF,PMM, and PMF in the argument string are arrays. The following dimension statement must be included in any main program using this subroutine. DIMENSION SRM (17,3),SRF (17,3) , PM (17) , PF (17) ,PMM (17,3) , PMF (17,3) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION HITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. RVFWD 465 1. Subroutines from this package a. ABREV b. MORDJ* c. HLT* d. ELT* e. PRO J 5 f . REVR5 q. PREVR h. PPROJ i. GTCON* * These subroutines are not called by the subroutine RVFWD. They are used only by the main program. 2. Library functions ABS (absolute value) 3. Card Diagram of main program and subroutines. / CARDS INDICATING END OF DECK / / / / INPUT DATA /| / / I / COMPUTER CONTROL CARDS /| | / SUBROUTINE~GTCON — /| | | / / / III/ / SUBROUTINE PPROJ /III/ / . / III/ / SUBROUTINE PREVR /III/ / „ / III/ / SUBROUTINE PROJ5 /III/ / „ / III/ / SUBROUTINE REVR5 /III/ / / III/ / SUBROUTINE ELT /III/ / / III/ / SUBROUTINE HLT /III/ /__ / III/ / SUBROUTINE HORDJ /III/ / " "subroutine ABREV" /| | J / / / III/ / SUBROUTINE RVFWD /III/ / / III/ / HAIN PROGRAM /III/ / / III/ / COMPUTER CONTROL CARDS /III/ / / III/ C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE HAIN PROGRAM GIVEN II SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. Variable Card Columns Name Definition 1 2-53 54-80 I | Blank I I Label used to identify the output I (Blank I 466 DOCUMENTATION 1 INXT 2 3-4 5-6 7-10 11-14 15-20 21 22 23 24-80 1-8 9-16 73-80 1-8 9-16 • 49-56 57-80 DAY TMO YEAR SRB KODE NT PM PH The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. Any other digit punched in column 1 indicates another set of data follows this one. Blank Day of the month for which the population distribution is given. It should be entered so it ends in column 4. Month of the year for which the population distribution is given. It should be entered so it ends in column 6. Year for which the population distribution is given. Blank Sex ratio at birth. The decimal point should be in column 16. Mortality indicator used to specify whether age-specific survival rates are to be given or a Coale-Demeny Regional Model Life Table is to be used for the middle of the first rejuvenation period. A 1 punched in column 21 indicates age-specific survival rates are to be used for the first rejuvenation period. A 2 punched in column 21 indicates a Coale-Demeny regional model life table is to be used for the first rejuvenation period. Blank The number of times the population is to be rejuvenated before being projected. Column 23 should be either 2 or 3. Blank The male population 0-4. The value should end in column 8. The male population 5-9. The value should end in column 16. The male population 45-49. The value should end in column 80. The male population 50-54. The value should end in column 8. The male population 55-59. The value should end in column 16. The male population 80+. end in column 56. Blank The value should The variable PM always requires two cards. The first card (card no. 3) must always contain data, whereas the second card (card no. 4) can be all zeroes depending RVFWD 467 on the number of age groups given. The last age group given oust always be the open-ended age group. 1-8 9-16 • 73-80 1-8 9-16 49-56 57-80 PF PF The female population 0-4. The value should end in column 8. The female population 5-9. The value should end in column 16. The female population 45-49. The value should end in column 80. The female population 50-54. The value should end in column 8 . The female population 55-59. The value should end in column 16. The female population 80+. should end in column 56. Blank The value The variable PF always requires two data cards. The first card (card no. 5) must always contain data, whereas the second card (card no. 6) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 17-24 25-80 1-8 9-16 73-80 1-8 49-56 PPHT PHH PUN The total number of migrants for the first rejuvenation period. The value should end in column 8. The total number of migrants for the second rejuvenation period. The value should end in column 16. The total number of migrants for the third rejuvenation period. The value should end in column 24. If the value for NT in column 23 of card 2 is 2, then these columns will be blank. Blank The proportion of the total migrants for the first rejuvenation period that are males 0-4. The decimal point is in column 1. The proportion of the total migrants for the first rejuvenation period that are males 5-9. The decimal point is in column 9. The proportion of the total migrants for the first rejuvenation period that are males 45-49. The decimal point is in column 73. The proportion of the total migrants for the first rejuvenation period that are males 50-54. The decimal point is in column 1. The proportion of the total migrants for the first rejuvenation period that are males 80+. The decimal point is in column 49. 468 DOCUMENTATION | 57-80 | I Blank Two cards must always be provided for the variable PHM for each 5-year rejuvenation period. Values are provided only for age groups in which there were migrants. The last group given is not assumed to be the open-ended age group unless it is the seventeenth value or is the same number of age groups as given for the population distribution. 10 11 1-8 9-16 73-80 1-8 49-56 57-80 PMF PHF The proportion of the migrants for the first rejuvenation period that are females 0-4. The decimal point is in column 1. The proportion of the migrants for the first rejuvenation period that are females 5-9. The decimal point is in column 9. The proportion of the migrants for the first rejuvenation period that are females 45-49. The decimal point is in column 73. The proportion of the migrants for the first rejuvenation period that are females 50-54. The decimal point is in column 1. The proportion of the migrants for the first rejuvenation period that are females 80+. The decimal point is in column 49. Blank The reguirem The sum of t for each 5-y For each 5-y male migrant proportion o for the same are four car two cards fo migrants. ents for PHF are the he proportion of PHM ear rejuvenation per ear rejuvenation per s by 5-year age grou f female migrants by 5- year rejuvenation ds for each 5-year r r male migrants and same as for the PHH. and PHF for all ages iod must add to 1.00. iod the proportion of ps is followed by the 5-year age groups period. So, there ejuvenation period — two cards for female The next groups of cards depends on the value given for KODE in card 2. If K0DE=1, i.e. column 21 of card 2 contains a 1, survival rates are read for the mid-point of the first rejuvenation period. J is the number of rejuvenations minus 1 multiplied by 4. 12+J 13+J 1-8 9-16 73-80 1-8 49-56 SRH SRH The survival rate for males surviving from birth to 0-4. The decimal point should be in column 1. The survival rate for males 0-4 surviving to 5-9. The decimal point is in column 9. The survival rate for males 40-44 surviving to 45-49. The decimal point is in column 73. The male survival rate for males 45-49 surviving to 50-54. The decimal point is in column 1. The survival rate for males 75+ surviving to 80+. The decimal point is in column 49. RVFWD 469 I I | 57-80 | I Blank The variable SRH always requires two data cards. The first card (card no. 12+J) must always contain data, whereas the second card (card no. 13+J) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 14+j 15+J 1-8 9-16 73-80 1-8 49-56 57-80 SRF SRF The survival rate for females surviving from birth to 0-4. The decimal point is in column 1. The survival rate for females surviving from 0-4 to 5-9. The decimal point is in column 9. The survival rate for females 40-44 surviving to 45-49. The decimal point is in column 73. The survival rate for females 45-49. The decimal point is in column 1. The survival rate for females 75+ surviving to 80*. The decimal point is in column 49. Blank The variable SRP always requires two data cards. The first card (card no. 14+J) must always contain data, whereas the second card (card no. 15+J) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. If K0DE=2, i.e. column 21 of card 2 contains a 2, Coale-Demeny Regional Hodel Life Tables are to be used for the first rejuvenation period. 13+J 1-6 7-12 13 I EQH | The male life expectancy at birth for the I mid-point of the first rejuvenation period. The | decimal point is in column 3. I EOF | The female life expectancy at birth for the | mid-point of the first rejuvenation period. I NREG | The region of the Coale-Demeny Regional Hodel | Life Tables which most closely resembles the | pattern of mortality. A 1, 2, 3, or 4 in | column 13 indicates west, north, east, or | south region, respectively. 14-80 | | Blank If K0DE=1, then 1=16. If K0DE=2, X=14. X+J 1-6 7-12 13 14-80 I EON | The male life expectancy at birth for the | mid-point of the second rejuvenation period. | The decimal point is in column 3. I EOF | The female life expectancy at birth for the | mid-point of the second rejuvenation period. | The decimal point is in column 9. I NREG | The region of the Coale-Demeny Regional Hodel | Life Tables which most closely resembles the | pattern of mortality. A 1, 2, 3, or 4 in Icolumn 13 indicates west, north, east, or | south region, respectively. I | Blank 470 DOCUMENTATION If NT=3, i.e. column 23 of card 2 contains a 3, then another card containing the same items of information as the above card is required with the information supplied being for the third rejuvenation period. I?. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE RVFHD (NT, SRB, SRH, SBF, DATB,PH,PF, PHH,PMF) B. DESCRIPTION OF ARGUMENTS Name NT How Obtained Definition SRB SRH SRF DATB PH PF Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In Transferred In The number of 5-year periods the population is to be rejuvenated before being pro- jected. NT must equal 2 or 3. If NT equals any other value, the subroutine will write out error no. 1151 and return to the calling program. The sex ratio at birth. The sex ratio at birth must be between .9 and 1.1. If it is any other value, the subroutine will write out error message 1152 and return to the calling program. The 5-year survival ra for the mid -point of e period. The first sur birth surviving to 0-4 vival rate is for the group. There must be vival rates given and be between 0.0 and 1.0 12 survival rates are is not between 0.0 and routine will write out no. 1153 and return to tes for males ach rejuvenation vival rate is for The last sur- open -ended age at least 12 sur- the values must If less than given or any value 1.0, the sub- error message the calling prograi The 5-year survival rates for females for the mid-point of each rejuvenation period. The first survival rate is for birth surviving to 0-4. The last sur- vival rate is for the open-ended age group. There must be at least 12 sur- vival rates given and the values must be between 0.0 and 1.0. If less than 12 survival rates are given or any value is not between 0.0 and 1.0, the subroutine will write out error message no. 1153 and return to the calling program. The date of the population distribution. The male population distribution in 5- year age groups. There must be at least 11 age groups and no intermediate value can be less than one. If there are less than 11 age groups given or an inter- mediate value is less than one, the sub- routine will write out error message no. 1154 and return to the calling program. The female population distribution in 5- year age groups. There must be at least 11 age groups and no intermediate value can be less than one. If there are less than 11 age groups given or an intermediate value is less than one, the subroutine will write out error message no. 1154 and return RVFWD 471 1 JPMM I I JPMF I | to the calling program. I Transferred In |The male migrants by 5-year age groups | for each rejuvenation period. I Transferred In | The female migrants by 5-year age | groups for each rejuvenation period. C. EBROR MESSAGES 1151 *** RVFWD ERROR NO. 1151 — INPUT ERROR IN NT *** NUMBER OF REJUVENATION PERIODS MUST BE EQUAL TO 2 OB 3. 1152 *** RVFWD ERROR NO. 1152 -- INPUT ERROR IN SRB *** SEX RATIO AT BIRTH MUST BE BETWEEN 0.9 AND 1.1. 1153 *** RVFWD ERROR NO. 1153 -- INPUT ERROR IN SRM OR SEF *** AN INTERMEDIATE SURVIVAL RATE IS LESS THAN 0.0 OB GREATER THAN 1.0, *** OR THERE ARE LESS THAN TWELVE SURVIVAL RATES FOR EITHER MALES OR FEMALES 1154 *** RVFWD ERROR NO. 1 1 54 — INPUT ERROR IN PM OR PF *** AN INTERMEDIATE AGE GROUP FOR EITHER MALES OR FEMALES IS LESS THAN ONE, *** OR THERE ARE LESS THAN ELEVEN AGE GROUPS FOR ONE SEX. V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM MAIN PROGRAM FOR RVFWD THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN EIGHT READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ STATEMENTS AS FOLLOWS. THE FIRST READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ABE BEING ANALYZED AND GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS 2-53 OF THIS CARD. THE SECOND READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET FOLLOWING THIS ONE. (2)THE DATE (DAY , TMO, YEAR) FOB WHICH THE POPULATION DISTRIBUTION IS GIVEN, (3)THE SEX RATIO AT BIRTH(SRB), (4)THE MORTALITY I NDICATOR (KODE) USED TO SPECIFY WHETHER AGE SPECIFIC SURVIVAL RATES ARE TO BE GIVEN OR A REGIONAL MODEL LIFE TABLE IS TO BE USED FOR THE MIDDLE OF THE FIRST REJUVENATION PERIOD, AND (5) THE NUMBER OF 5-YEAR PERIODS (NT) THE POPULATION IS TO BE REJUVENATED. NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. DAY IS PUNCHED IN COLUMNS 3-4 OF THIS CARD. IT SHOULD BE ENTERED AS XX SO THAT IT ENDS IN COLUMN 4, I.E. IF IT IS THE FIRST DAY OF THE MONTH IT WOULD BE ENTERED AS 01. TMO IS PUNCHED IN COLUMNS 5-6 OF THIS CARD. IT SHOULD BE ENTERED SO THAT IT ENDS IN COLUMN 6. YEAR IS PUNCHED IN COLUMNS 7-10 OF THIS CARD. SRB IS IN COLUMNS 15-20 OF THIS CARD. IT SHOULD BE ENTERED WITH THE DECIMAL POINT IN COLUMN 16. KODE IS IN COLUMN 21 OF THIS CARD. IF THE BEGINNING MORTALITY DATA IS TO BE PROVIDED AS SURVIVAL RATES, A 1 SHOULD BE PUNCHED IN COLUMN 21. IF THE BEGINNING MORTALITY IS TO BE BASED ON THE COALE-DEMENY REGIONAL MODEL LIFE TABLE A 2 SHOULD BE PUNCHED IN COLUMN 21. ANY OTHER NUMBER PUNCH- ED IN COLUMN 21 IS AN ERROR AND WILL CAUSE THE MAIN PROGBAH TO STOP. NT IS IN COLUMN 23 OF THIS CARD. IT IS THE NUMBER OF 5-YEAR PERIODS THE POPULATION IS TO BE REJUVENATED BEFORE BEING 472 DOCUMENTATION c PROJECTED. EITHER A 2 OR A 3 SHOULD BE PUNCHED IN COLUMN c 23 TO INDICATE 2 OR 3 5-YEAR REJUVENATION PERIODS, C RESPECTIVELY. C C THE THIRD READ STATEMENT USES TWO DATA CARDS. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE MALE c POPULATION AGE DISTRIBUTION (PM) IN 5-YEAR AGE GROUPS. c PM VALUES ARE ENTERED ON TWO CARDS. FOR EACH PH VALUE EIGHT C COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS C OF THE FIRST CARD. A MAXIMUM OF TEN PM VALUES CAN APPEAR c ON THE FIRST CARD SO THAT THE VALUES END IN COLUMNS 8, 16, c 24, ..., 72, AND 80. THE SECOND CARD CAN CONTAIN A MAXIMUM C OF SEVEN PM VALUES AND THE VALUES SHOULD BE ENTERED IN THE C SAME MANNER AS ON THE FIRST CARD EXCEPT THAT THE LAST VALUE C ON THE SECOND CARD HILL END IN COLUMN 56. IF LESS THAN C SEVENTEEN VALUES ARE TO BE GIVEN, TWO CARDS MUST STILL BE C USED WITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR c THE DUMBER OP PM VALUES. C C THE FOURTH READ STATEMENT USES TWO DATA CARDS. C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE FEMALE C POPULATION DISTRIBUTION (PF) IN 5-YEAR AGE GROUPS. c PF VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAME C REQUIREMENTS AS PM VALUES. C C THE FIFTH READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE C FIFTH READ STATEMENT IS TO READ IN THE TOTAL NUMBER OF MIGRANTS c (PMMT) FOR EACH 5-YEAR REJUVENATION PERIOD. c p HMT IS CONTAINED ON ONE CARD. THERE ARE AS MANY PMMT VALUES AS c THERE ARE REJUVENATION PERIODS TO A MAXIMUM OF 3. c THE first PMMT CONTAINS THE TOTAL NUMBER OF MIGRANTS FOR c THE first REJUVENATION PERIOD. FOR EACH PMMT VALUE, EIGHT C DIGITS ARE ALLOWED WITH THE FIRST NUMBER ENDING IN C COLUMN 8. C C THE SIXTH READ STATEMENT USES THE NUMBER OF CARDS THAT ARE C EQUIVALENT TO FOUR TIMES THE NUMBER OF REJUVENATION PERIODS. C THE PURPOSE OF THE SIXTH READ STATEMENT IS TO READ IN THE c PERCENT DISTRIBUTION OF THE MIGRANTS (PMM AND PMF) IN 5-YEAR AGE C GROUPS. THE TOTAL MIGRANTS PMM AND PMF ADDS TO 1.00. THERE ARE C TWO CARDS FOR MALE MIGRANTS (PMM) VALUES FOLLOWED BY TWO CARDS C FOR FEMALE MIGRANTS (PMF) VALUES FOR EACH 5-YEAR REJUVENATION C PERIOD. C PMM VALUES ARE CONTAINED ON TWO CARDS. THERE ARE EIGHT DIGITS C ALLOWED FOR EACH PMM VALUE WITH THE DECIMAL POINT IN C COLUMN 1,9,17, ...65 AND 73. THUS, THERE ARE TEN VALUES c ON THE FIRST CARD. THE SECOND CARD CONTAINS SEVEN VALUES c wrrH THE LAST VALUE IN COLUMN 49-56. c p M F VALUES ARE CONTAINED ON TWO CARDS. PMF VALUES HAVE THE C SAME REQUIREMENTS AS PMM VALUES. C C THE SEVENTH READ STATEMENT USES BETWEEN ONE AND FOUR DATA CARDS. C THE PURPOSE OF THE SEVENTH READ STATEMENT IS TO READ IN THE C MORTALITY DATA. THIS CAN BE READ IN TWO ALTERNATIVE WAYS. THE C ALTERNATIVE THAT IS TO BE USED DEPENDS ON THE MORTALITY INDICATOR C KODE READ BY THE SECOND READ STATEMENT. C ALTERNATIVE 1, KODE = 1, I.E. COLUMN 21 OF CARD 2 CONTAINS A 1, C SURVIVAL RATES (SRM,SRF) ARE TO BE READ FOR THE MIDPOINT C OF THE FIRST REJUVENATION PERIOD. C SRM VALUES ARE CONTAINED ON TWO CARDS FOR THE FIRST C REJUVENATION PERIOD. THESE TWO CARDS CONTAIN THE C 5-YEAR SURVIVAL RATES FOR MALES. FOR EACH C SURVIVAL VALUE, EIGHT DIGITS ARE ALLOWED WITH A C DECIMAL POINT IN COLUMNS 1, 9, ...,65, AND 73. THUS, C THERE ARE TEN SURVIVAL VALUES FOR MALES ON THE C FIRST CARD. THE SECOND CARD CAN CONTAIN SEVEN C SURVIVAL VALUES FOR MALES ENTERED IN THE SAME C MANNER AS ON THE FIRST CARD. THE LAST VALUE THAT CAN C BE ON THE SECOND CARD IS IN COLUMNS 49-56 HITH A C DECIMAL POINT IN COLUMN 49. IF LESS THAN SEVENTEEN C VALUES ARE TO BE GIVEN, TWO CARDS MUST STILL BE USED C WITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR C FOR THE NUMBER OF MALE SURVIVAL RATES GIVEN. C SRF VALUES ARE CONTAINED ON CARDS THREE AND FOUR. THEY C ARE THE FEMALE SURVIVAL BATES FOR THE FIRST C REJUVENATION PERIOD AND HAVE THE SAME REQUIREMENTS C AS THE SURVIVAL RATES FOR MALES ON THE FIRST TWO RVFWD 473 CARDS. ALTERNATIVE 2, KODE = 2, I.E. COLUMN 21 OF CARD 2 CONTAINS A 2, COALE-DEMENY REGIONAL MODEL LIFE TABLES ARE TO BE USED FOR THE FIRST REJUVENATION PERIOD. THUS, LIFE EXPECTANCIES AT BI RTH (EOM, EOF) ARE NEEDED AND A REGION (NREG) MUST BE INDICATED. ONE CARD IS NEEDED FOR THIS ALTERNATIVE AND MOST BE COMPLETED AS INDICATED BELOW. EOM IS THE LIFE EXPECTANCY AT BIRTH FOR MALES. IT IS IN COLUMNS 1-6 OF THIS CARD WITH A DECIMAL POINT IN COLUMN 3. EOF IS THE LIFE EXPECTANCY AT BIRTH FOR FEMALES. IT IS IN COLUMNS 7-12 OF THIS CARD WITH A DECIMAL POINT IN COLUMN 9. NREG IS IN COLUMN 13 OF THIS CARD. NREG CAN HAVE A VALUE OF 1, 2, 3, OR 4 INDICATING WEST, NORTH, EAST, OR SOUTH, RESPECTIVELY. THE EIGHTH READ STATEMENT READS IN ONE CARD FOR EACH REJUVENATION PERIOD AFTER THE FIRST. THE PURPOSE OF THIS READ STATEMENT IS TO READ IN (1)THE ESTIMATED LIFE EXPECTANCIES AT BIRTH (EOM, EOF) FOR THE MIDPOINT OF THE REJUVENATION PERIODS BEYOND THE FIRST AND (2) THE COALE-DEMENY REGION (NREG) WITH THE MORTALITY PATTERN MOST CLOSELY RESEMBLING THE MORTALITY PATTERN OF THE AREA BEING ANALYZED. EOM MUST BE ENTERED AS GIVEN IN ALTERNATIVE 2 ABOVE. EOF MUST BE ENTERED AS GIVEN IN ALTERNATIVE 2 ABOVE. NREG MUST BE ENTERED AS GIVEN IN ALTERNATIVE 2 ABOVE. DIMENSION PM(17),PF(17) ,CDMLT ( 18, 8) , EOM (3) ,EOF(3) *,SRM{17,3) ,SRF(17,3) , PMMT (3) ,PMH (1 7,3) ,PMF(17,3) NREAD = 1 NPRNT = 15 READ IN THE DATA 10 READ(NREAD,11) 11 FORMAT(1X,52H READ (NREAD, 22) NXT, DAY, TMO, YEAR, SRB, KODE, NT 2 2 FORMAT(I1,1X,2F2.0,F4.0,4X,F6.4,I1,1X,I1) IF (NT - 1) 1040,1040,12 12 CONTINUE IF (NT - 3) 13,13,1040 13 CONTINUE READ(NREAD,33) (PM (I) ,1 = 1 , 17) 33 FORMAT (10F8.0) READ(NREAD,33) (PF (I) ,1=1 , 17) READ(NREAD,44) (PMMT (I) ,1=1 ,3) DO 14 J=1,NT READ (NREAD, 55) (PMM (I , J) , 1=1 , 17) READ(NREAD,55) (PMF (I, J) , 1=1, 17) 14 CONTINUE 44 FORMAT (3F1 0.0) 55 FORMAT (10F8.7,/,7F8.7) DETERMINE HOW THE MORTALITY DATA IS TO BE READ AND OBTAIN SURVIVAL RATES IF LIFE EXPECTANCY AT BIRTH IS GIVEN IF (KODE - 1) 1010,30,50 30 READ(NREAD,77) (SRM (1,1 ) , 1=1, 17) READ(NREAD,77) (SRF (I , 1 ) ,1=1 , 17) RM = 5.0 EOM (1) = 0.0 DO 37 1=1,16 IF (SRM(I+1,1) - 0.001) 40,35,35 35 RM = RM * SRM (1,1) 37 EOM (1) = EOH(1) + RM I = 17 40 EOM(1) = EOM(1) + ((RM*SRH (I,1))/(1.0 - SEN (1,1) ) ) RF = 5.0 EOF(1) = 0.0 DO 45 1=1,16 IF (SRF(I+1,1) - 0.001) 47,43,43 474 DOCUMENTATION 43 RF = RF * SRF(I,1) 45 EOF (1) a EOF(1) + RF I = 17 47 EOF(1) = EOF(1) ♦ { (RF*SRF (I, 1) ) / ( 1.0 - SRF(I,1))) 77 FORHAT(10F8.0) GO TO 126 50 CONTINUE IF (KODE - 2) 1010,60,1010 60 READ(NREAD,88) EOM (1) , EOF( 1) , NREG 88 FORMAT (2F6.3,I1) C c C — TEST EO VALOES AND NREG FOR APPROPRIATE VALUES c _... . C IF (EOM(1) -20.0) 1020,85,80 80 CONTINUE IF (EOH (1) -80.0) 85,85,1020 85 CONTINUE IF (EOF(1) - 20.0) 1020,90,90 90 CONTINUE IF (EOF(1) - 80.0) 95,95,1020 95 CONTINUE IF (NREG - 1) 1030,110,100 100 CONTINUE IF (NREG - 4) 110,110,1030 110 CALL MLT (EOM (1) ,1, NREG, CDMLT) DO 120 I » 1,17 120 SRM(I,1) = CDMLT (1,6) CALL MLT (EOF (1) ,2, NREG, CDMLT) DO 125 I =1,17 125 SRF(I,1) = CDMLT (1,6) 126 CONTINUE DO 140 I - 2, NT READ(NREAD,88) EOM (I) ,EOF (I) ,NREG J = I - 1 DO 135 K=1,17 SRM(K,I) = SRM(K,J) SRF (K,I) = SRF(K,J) 135 CONTINUE CALL MORDJ (EOM (J) , EOM (I) , 1 , NREG, 0, SRH (1,1)) CALL MORDJ (EOF (J) ,EOF (I) , 2, NREG, 0, SRF ( 1,1) ) 140 CONTINUE C c _ C WRITE OUT IDENTIFICATION c — „ C 200 DATM - YEAR + (.0833* (TMO-1 .) ) + (.0027* (DAY-1. ) ) WRITE (NPRNT, 111) 111 FORMAT(1H1) WRITE (NPRNT, 11) DATB = DATM C c __ C- CALCULATE NUMBER OF MIGRANTS BY AGE AND SEX FOR EACH REJUVENATION c C DO 300 1=1 ,3 DO 300 J=1,17 PMM(J,I) = PMM(J,I) * PMMT(I) 300 PMF(J,I) a PMF(J,I) * PMMT(I) C c . . _ C-- REJUVENATION LOOP c . C CALL RVFWD(NT,SRB, SRM, SRF, DATB, PM,PF, PMM,PHF) IF (NXT) 10,1000,10 C C- C ERRORS IN INPUT DATA FOR THE MAIN PROGRAM c c 1010 IRITE(NPRNT,111) WRITE (NPRNT, 101 1) 1011 FORMAT (/,1X,95H*** ERROR IN INPUT FOR MAIN PROGRAM — KODE, YOD SH RVFWD 475 ♦OULD CHECK ALL OF YOUR INPUT DATA CAREFULLY.) GO TO 1000 1020 WRITE(NPRNT, 111) WRITE (NPRNT, 1021) 1021 FORMAT (/,1X,71H*** ERROR IN INPUT FOR MAIN PROGRAM — EO IS NOT BE ♦TWEEN 20.0 AND 80. 0. ,/, 5X, 50H YOU SHOULD CHECK ALL OF YOUR INPUT DA *TA CAREFULLY.) GO TO 1000 1030 WRITE (NPRNT,1 11) WRITE (NPRNT, 1031) 1031 FORMAT (/, 1X,65H*** ERROR IN INPUT FOR MAIN PROGRAM — HREG IS NOT *1, 2, 3, OR 4.,/,5X,50HYOU SHOULD CHECK ALL OF YOUR INPUT DATA CAR *EFULLY.) GO TO 1000 1040 WRITE (NPRNT, 111) WRITE (NPRNT, 1041) 1041 FORMAT (/,1X,80H*** ERROR IN INPUT FOR MAIN PROGRAM ~ NT IS NOT 2 ♦OR 3. NT IS ASSUMED TO BE 2.) NT = 2 IF (NXT) 1050,13,1050 1050 WRITE (NPRNT, 1051) 1051 FORMAT (/, 1X,95H*** THIS IS THE LAST DATA SET THAT CAN BE RUN DUE T *0 POSSIBLE ERROR IN INPUT FOR FURTHER CASES.) NXT = GO TO 13 1000 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE RVFWD (NT, SRB, SRM , SRF,DATB, PM,PF, PMM,PMF) c c . C PROGRAM NO. 1150 c c C NT, SRB, SRM, SRF, PMM, PMF, AND DATB ARE INPUT ARGUMENTS C C PM AND PF ARE BOTH INPUT AND OUTPUT ARGUMENTS. C NT IS THE NUMBER OF 5-YEAR PERIODS THE POPULATION IS TO BE C REJUVENATED. C SRB IS THE SEX RATIO AT BIRTH. c 0F THE REJUVENATION PERIODS EXCEPT THE FIRST. C SRM CONTAINS THE SURVIVAL RATES FOR MALES FOR THE c REJUVENATION PERIODS. c SB p CONTAINS THE SURVIVAL RATES FOR FEMALES FOR THE c REJUVENATION PERIODS. C PMM IS THE DISTRIBUTION OF MALE MIGRANTS. C PMF IS THE DISTRIBUTION OF FEMALE MIGRANTS. C DATB IS THE DATE THAT CORRESPONDS TO THE DISTRIBUTION. C PM IS THE POPULATION DISTRIBUTION FOR MALES C PF IS THE POPULATION DISTRIBUTION FOR FEMALES c c DIMENSION PM(17) ,PF(17) ,SXM(17) ,SXF(17) DIMENSION SRM(17,3) ,SRF(17,3) DIMENSION ASFR1 (7) ,ASFR2 (7) ,PPAR (8) DIMENSION PMM (17,3) , PMF (17,3) ,RPMM (17) ,RPMF(17) NPRNT= 15 C c C VERIFY INPUT ARGUMENT VALUES c c 100 NERR= NTX= NT IF (NTX - 2) 110,130,105 105 CONTINUE IF (NTX - 3) 130,130,110 110 WRITE (NPRNT, 111) 111 FORMAT (/,46H *** RVFWD ERROR NO. 1151 — INPUT ERROR IN NT */54H *** NUMBER OF REJUVENATION PERIODS MUST EQUAL 2 OR 3.) NERR= 1 476 DOCUMENTATION NTX= 2 130 CONTINUE IF (SRB - 0.9) 135,165,133 133 CONTINUE IF (SRB - 1.1) 165,165,135 135 WRITE (NPRNT,333) 333 FORMAT (/,47H *** RVFWD ERROR NO. 1152 — INPOT ERROR IN SBB */51H *** SEX RATIO AT BIRTH HOST BE BETWEEN 0.9 TO 1.1) *) NEBR= 1 165 CONTINUE DO 191 J=1,NT N=0 NT1=0 M = MT = 170 DO 190 1=1, 17 IF (SRM(I,J) - 0.1) 296,175,173 173 CONTINUE IF (SRM(I,J) - 1.0) 175,175,296 175 H = M + 1 180 CONTINUE IF (SRF(I,J) - 0.1) 290,285,183 183 CONTINUE IF (SRF(I,J) - 1.0) 185,185,290 185 N = N + 1 190 CONTINUE 191 CONTINUE IF (M-12) 200,192,192 192 CONTINUE IF (MT) 193,194,193 193 CONTINUE IF (M-(MT-1)) 200,194,200 194 CONTINUE IF (N-12) 200,195,195 195 CONTINUE IF (NT1) 200,220,196 196 CONTINUE IF (N-(NT1-1)) 200,220,200 200 WRITE (NPRNT, 555) 555 FORMAT (/,54H *** RVFWD ERROR NO. 1153 — INPUT ERROR IN SRM OR SR *F, /72H *** AN INTERMEDIATE SURVIVAL RATE IS LESS THAN 0.0 OB GRE ♦ ATER THAN 1 .0, ,/, 1X,77H*** OR THERE ARE LESS THAN TWELVE SURVIVAL ♦RATES FOR EITHER MALES OR FEMALES.) NERR= 1 220 M = MT = N = NT1 = DO 250 1=1,17 IF (PM(I)-0.9) 285,285,225 225 M = M + 1 230 CONTINUE IF (PF(I)-0.9) 275,275,240 240 N=N+1 250 CONTINUE IF (M-11) 265,252,252 252 CONTINUE IF (MT) 265,254,253 253 CONTINUE IF (M-(MT-1)) 265,254,265 254 CONTINUE IF(N-11) 265,255,255 255 CONTINUE IF (NT1) 265,270,260 260 CONTINUE IF(N-(NT1-1)) 265,270,265 265 WRITE (NPRNT, 666) 666 FORMAT (/,52H *** RVFWD ERROR NO. 1154 — INPUT EBBOR IN PM OB PF, */,76H *** AN INTERMEDIATE AGE GROUP FQR EITHER MALES OB FEMALES IS * LESS THAN ONE, ,/, 1X, 57H*** OR THERE ARE LESS THAN ELEVEN AGE GBOU *PS FOR ONE SEX.) NERR= 1 270 CONTINUE IF (NERR) 900,300,900 275 CONTINUE IF(NT1) 280,280,250 RVFWD 477 280 NT1=I GO TO 250 285 CONTINUE IF (HT) 286,286,230 286 HT = I GO TO 230 290 CONTINUE IF (NT1) 295,295,190 295 NT1 = I GO TO 190 296 CONTINUE IF (MT) 297,297,180 297 MT = I GO TO 180 C c c PRINT ORIGINAL POPULATION AND SURVIVAL RATES c C 300 WRITE (NPRNT,777) 777 FORHAT (//33H ORIGINAL POPULATION DISTRIBUTION ) TPH = 0.0 TPF = 0.0 DO 305 J=1,17 TPJf = TPH + PH(J) TPF = TPF + PF(J) SXM (J) = SRH(J,1) SXF (J) = SRF(J,1) RPHM (J) = PHH(J,1) 305 RPMF(J) = PMF (J,1) DO 310 1=1,7 310 PPAR (I) = 0.0 CALL PREVR (PH, TPH, PF, TPF, SXM , SXF, PPAR ,DATB) C c C REJUVENATION PERIODS c C DO 315 1=1, NTX CALL REVR5 (PH, TPH, RPMH , PF, TPF, RPHF, SXM, SXF, PPAR) IF (I - NTX) 312,312,315 312 DO 313 J=1,17 K = I + 1 SXH (J) = SRH(J,K) SXF (J) = SRF (J,K) RPHM(J) = PHH(J,K) 313 RPHF(J) = PMF(J,K) 315 CONTINUE C c C CALCULATE GFR c C DO 370 1=1,7 ASFR1(I)= PPAR (5) 370 ASFR2 (I)= PPAR (5) C c C PROJECTION CYCLES c C DO 390 1=1, NTX K = NTX +1-1 DO 385 J=1,17 SXH (J) = SRH(J,K) SXF (J) = SRF(J,K) RPHH(J) = PHH (J,R) 385 RPHF (J) = PHF(J,K) CALL PROJ5 (PH, TPH, RPHM, PF, TPF, RPHF, SXM, SXF, ASFR 1, ASFR2,SHB,PPAB) 390 CONTINUE C c C PRINT ADJUSTED POPULATION c . . . ._ C DATB ■ DATE - 2.5 WRITE (NPRNT,888) 478 DOCUMENTATION 888 FORMAT (//33H ADJUSTED POPULATION DISTRIBUTION ) CALL PPROJ (PM,TPM,PF,TPF,SXM,SXF,SRB,ASFB1,ASFR2,PPAR,DATB) GO TO 1000 C c c ERROR= PRINT INPUT, ZERO OUTPUT ARGUMENTS c _ C 900 WRITE (NPRNT,999) SRB,DATB, NT,PH, PF 999 FORMAT (//26H RVFWD INPUT ARGUMENTS */10H SRB= ,F5.3 /1 1 H DATB= ,F7.2 */ 9H NT= ,16,/, 9H PM= , 9F12.0, /9X,8F12. */ 9H PF= ,9F12.0 /9X,8F12.0) DO 1500 1=1, NTX WRITE (NPRNT,1111) (SRM (J, I) , J=1, 17) , { SRF (J, I) , J= 1, 17) , *(PMM(J,I) ,J=1,17) , (PMF (J, I) ,J=1,17) 1500 CONTINUE 1111 FORMAT ( */10H SRM= ,9F12.5 /10X,8F12.5 */10H SRF= ,9F12.5 /10X,8F12.5 */10H PHM= ,9F12.0,/,10X,8F12.0 */10H PMF= ,9F12.0,/,10X,8F12.0) C c C RETURN TO CALLING PROGRAM c C 1000 RETURN END RVFWD 479 or V- ar D UJ -j a. e ar cr» o S oo rv s »»> m S S 3- 00 s v. CM £ £ rv S c Oo — o m 3- ~ c Cj T, ^ o- oo 3~ 5 s rr» s 4- s Ov r- CM r- Co s ~ M> vS co Oo S s — CM 0» o- o- s o fv CM CM m S s — — — ~ — 5 CM tv. 00 v. — a s fc o O s Ci o- o~ s s • s • • £ 3 — CM ' *t rn M) 3 2 CM — St in •T, S s vS CM n» 08 v. 3 s r» m >J> vS W> s 0- T, m o» MJ 3 s 3- vS> CJ *\ *«* 5 ^n CM M> *■ M> S s — — ex CM CM S CM Oo to — — $ 5? o o o s C o~ 0~ 3 . » K • . > S> £ v» IT, s 1 tn T> S S m m s 3- 4- £ S O ~. t «N Ci s £ o co w» 0» *- r- CO 09 d- "S" IT, M5 -~ ~- 3- 3- K K v9 tv. O- vS CM Oo CM r- IT, s o» IC m rv r» o- S S O" — — CM o CM o CM O s CM O Co Oo — -~ s S — o Q o o o C4 s O O o» Ov s s • 5 3 o vS CM ■-^ fn 5 OO c»» — CM 3 £ t- in — O r*» ■* 0> vB CO O ^ s v9 a vr> r* 3 o^ r~ o~ Ov S s o o^ o «\ CM o O CJ IT, *• > 5 lf> vS r«- o in -v m Co OO o S s rv Cj- CM "^ IT, CM ro u> Tl CM CM 3 J- CM vS O Oo o O -v N% IT, jr 3 ct- ~ CM IT* O •T. C5 •Cl O 3 IC O Co *■ Co fv. — CM CM ^r 3 — o O o o O O 3 O o o» m cr~ in 3 5 r- ; 3 e Da v. «S Co 3 Gt vS 3- T\ fO ° R o O ir> CO (T, R Ci O m -~ r-v R n 0£ m oo r<% o 2 3- O oo OO Ov CM m CM T, IS 3 * o O cs c o o o CO o~ tv. Ov Oo i 3 s cr o 2 2 o IT| o> VT» r~- S IV. -v CO vS vS •" S li- CM T, vS o S fv 3- 3- IT, R > v» Mi ->. CO R o CM m rv Cf~ ° Hi UJ ^ o IX* — — v» CM o — ~~ S in 3- |v- *• IT, ~-~ cr O o CM — S cr co l«S CM *• * M> «\ tv CM IV. 3 CM tv. CM CM O m o ir> c> R in O O- vJ> cr- o~ -* fO rr> S s z o Q o o o o S o o o- CO o- 6o C: a 2 o o 2 ' n CM rv o o S a. in vA in Co *r s r- CM CM rv ro T, o~ m Oo O 2 a cr -- «& wv vS S UJ — v» (v. — Si is _1 — l»k ^ 1- 1^. o» vS n> o T> o s |Tl 3- (V. (v. T> CM cv; — 3- vS C)0 CK. s rv 3- «-~ LP. o v» r^ i- CO a- o- s IT, 0V CM IV. T> vj> OO 3- o- m s 2 a. UN K\ it, o vS o M> o v& o 2 vt> O a. in T> m 2 2 o 3- o o o O o O o 2 o Ci CT- cr~ 0~ o- o 3- 2 S Q. o o Q. o 2 2 • o m «>~ O o 2 . CM fv. oo CO 2 2 z — — OO 00 CM — 2 Z ~ —■ rv vS O 2 t a: -3 m o IS 2 or O o- rv IT, .r 2 co Co o * 3- •T, ID vS o- ct- 2 3- rO VS *- 00 ir> i- CO CM O ■T) u-> 2 a c; Co sS vS fv. Cn O- LT> o- O- CJ- 2 vS O o IV. o OO CSS T, v» CJ tv. 2 2 r> 3- i- rv. O r- |v- o IS 3- 3- 2 S o o o o o o o o S O O o- O- cr- O- o o 2 <* cr IV. o C£. rv m » \-i o- o in tf> vS o « o 1— 1 o- ~- CM fv- fv „ f z — in — IX> o- o >~ M> z ~ CM |v. CM OO ~ "> Ui v3 cr- LA J- IT> LO u> U] vS CO — CM o~ a. "» > O rv rv vS o — IT, o cr- i- oo ~- n CM 3- o- cr- ir> o- o- ■> o o OO O — « » s o o~ r- r- o~ >o IT. o~ •Tl ir> CJ •» CM CM o M> rv o o o o m fv f o~ — oo — 0- — m O- -~ o~ ic> o^ rv • o Ci o o o O O c O o CO <3- w> o- rv to rv - — it. — - o c O c CM o o L. w a O +- 3* J M> « f r— O j: ■t- -C ~5 ~8 a vi +~ u o ■#- CM "5 o co +- 3- vi vO VS ~5 u o r- w a CD 00 ~2 CO o- a Co X o CM ) a o V wo c 1 O ■» c C\i CO ■o c T> w a o 3- "2 CO i "2 o o f. ) r- UJ CO <* 1— UJ to c CM 480 RVFWD or crr £> U4 -J Q_ E <3r ts> co S s CM o s s 2 — M) s s g ir> o- in 3- s £ cj rn CVJ > > "% 6 o- ift i- v» s s vS vj) vS u) •-S v!> £ C) ct- v9 r- s t^ l> IC w o o O Q Ci O S o- O ^ " • • • ' . • " • • " c 5 M> r- ^ c s r- — ^ g s «M to vS CM s s cm r- 0D — a- vn s 0o rv 0- — s s o- €*■ 0- s s — — — CM CM CM s 1^- to s s o o o ■■;« o cs s o~ Of s s • » < s • • s s s r- O T s s — a- s 3 s OO a- m r- 2 £ m v£i f» o- vrv CM s K\ M> 0- — S s CM XV ff» ff\ a- a- s PCv ^ o- — S £ CM CM CM CM CM CM 3 to Oo — S S o O o o Q o S o^ o- S K . • • • . s » • 5 X s o vS S s o CM s to M> — — s S O «S c> O O D O O CM 0O o o- S f-~ cs lo — IS CM "\ o- S cm «ev Uv TV CM co *- CM CM — a- — 3 r~ to 0- — 3~ CM vA TV 3 f *•> o TV CV (»V o m O TV o i«% o 5 » r~ to CM O — — 5 3 O o O o O o O D o o o o 5 o- v6 o- r- ^ 3 5 U- 5 s ° > •— r- Q >T> § s S CC P- in irv — S s s oo CM >» 3- — crv M> 3- S ft a- 00 o CM fP> o- o- -» CM o to o R Oo o Hv — Oi r- 3- 0- — R 8 tv a- 3- m <3~ 3- — «V) lev w 0» irv s o~ rfv — •— o >j — 00 CM X S *- o 3- o t<> o * Cv wv o xfi — — S s o — VS> CM o — — trv *- — vS to to S CM r- o tfv z a- 00 O lev S s o a- V9 TV h- CM l»» eu rv O r>- — 1^- f3 ■TV lo a- 0- o US o ir> o V* o ir» © vft o s o~ M> o- 0- — CM R S lev O o © o o c> O o O o O o s O- to o- to or S £ o S 3 s Of a- 3- *■ © s R s 0i i- «v cr- rf> CVl s R s a- f*> CM rev Ui O 3- a- vj) s R Oo v» ■f\ o wv o «^ a- CM a- TV to a a- CM ti in ol 3- r- o- vS R 8 o ■s r- 3" CO a- o~ rr> o CM o CM '& s ft o a- to z K» o S 2 o sS o vS> o v» o so o vS — M> ^ 2 o~ — o- TV o IT) 1 CM o 2 3 o o 'a © © o o o O o o o a cr- »- e- cr- V-4 a- o S 3 o • \- o o R 2 o s ar r- CM 0» K^ o S IS ~ s -l — . CM CM >CV CM — S *r 2 M» f- oo o- r> — — — w> s 3 TV m vS &- cv o~ a- *N MV rr> CM r> " a- CM o cs 3- a- CX wv f— *■ r- " 2 9o o- in o- «- o- o o O O t^ o 2 rcv 0- a- © © or »*> — 3- 3 3 r- o r- o 1^ o r~ — OO — r- — • 3 r- O o o S (3~ o- CJ- o- to M> o o s <* o ec r- o 00 o » I- o - v» lf> z — u-v CM m — © - <" tr> «> O- o— CM v& LU IS CJ IT. CM w> in u» "• — rev o o- 3- 0B — CM *■ rO CM vr> a- «, a- *• T> — irv o > o «p- CM — — — u, » T\ T> o- T> «"» CM CM CM OO — 3- ~ ■* v* Do CM CM oo 09 ri o o) IX) r» O <• n o- — 0° — o- — «- — O- — o- — „ o~ lev O r— o rev rO c<> « ~ O o o o o o o o O O O © ~ 0° o- O- o- p- irv a> ~ - irv ir> O - V o CO r- I 3 o oo "5 a ea- '3 o ■c "5 d o o o "5 O ~8 w X f- "2 « Oo "5 f. o "5 a 1 « o ■8 e CM OJ "5 * CM "5 5 "5 in CM 1 -5 « CO 4- c a o •» e CM- "5 ci rO v» cr CO £ 3- "5 o 1 *■ "5 CJ c V r- UJ RVFWD 481 Q -I a. S o i s S s E g s s 2 2 [5 O m CM 4- E R s vB >» v» v9 S S IC — ~- — -~ K H* ; o O o O S s 2 • • . ■ £ c s K ^ - ^ ° S s S CM tv 00 — s <£ s *- o- O o s s s — — — CVl £ s s o o o «S s 5 s • • . ♦ s S 2 3 z 3 s 3 s s S s m vS m o* s 1 3 s t\i -S s 8 v» cu 00 CM r~ «% OO Ci O G g s s 3 3 § 3 •t 5 5 s S « « vS O o PM 3- 3- kf> v» •$ S * cm (O m <*v CM CM 3 3 s <*l O «■» o CO O w* O 3 3 Sf O o a Q C Q O o 3 3 •» 5 ? § § s S S s S S 5 3- 0» O OJ rCV o- o~ «• s R S tO 3- 3- >f> O- 3- — vr> s s s 3- o 3- O fT> O 3- o s s C> o O O Q o ^i o ^ s s s s £ n n S S 3 ° n S s — -S CVl o -. ~- Xft 3- S S s 3- -s> rr» r- CO r-- CM rv. s s R ir» o »o o w> o H» vl R ft S O o O o o o o o S s £ s s s 5 »? s 5 a 3 R s s o> vS Kv o Vft o CO 3- S s s -S r» 3- Cn 3- o- m 0- s s 2 a o V& O vS o -s o s 2 3 O o O o o O o Q 2 2 - S s s -j> 2 s 2 s 2 2 2 Kl in o~ 3- rr> 3- 3- " 3 2 o» cr- tr> o» o~ o- v» O a ^ - r-- o r~ o (N- Q r» — Ci O 3 - 2 o o o o O O o O — Do S s ^ 9. o- - ft% o- » „ - v» vn. » r- » U> U. ■" K"« O o- 3- CO — CVJ 3- O O "> u, < ro to 0- to in CVl CM CM O o- » ■» m o- — oo — o- — o- — • . « „ ~ O o o o o G o C5 o vS N r. v» Tk - - O C V s O i a- "5 w H H > «* H 05 2 -M Q ** en s moorr)(*>r»ir>«*"invc*wLn(N»— a'f- honff)OoohmNoooi»\oiO\oo coc7iCJ>o>cnehC*cncncno>CMc*coaDU"> oooooooooooooooo GOcr»o>o>cftcftc*c7*cAc^cT>o>c^oor^in OOOOOOOOOOOOOOOO M .-; •=* *a &3 BM 10 2 1 o w 1 H .-) 1 H «* I CB & i o I Cm I O I 2 1 Cm to o 1 1 33 w ve I 1 H X c* 1 1 O W r- I 1 CO to O I 2 1 H o H O EH 1^ «e en J T- D Cm 2 O o Cm 03 1 w PM 1 1 .-3 Q 1 B 2 1 w 2 2 1 Cm O o 1 h H 1 > E-i t to M n 1 W W 2 CQ H 1 1 Eh O 2 2 1 ►J E O H 1 O E-t H (0 1 CO E3> EH H OQ cm ■< Q o H i-3 o O 2 o Eh W a, o O H n to Cm H X OT .-J «S Eh W 04 +> 2 t-» s « XI w 3 D W A! »— « Cm to 10 PCS D O a, Q « H 2 w D O to ►J «d 2 H IS H CO O OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOo OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOO T-0000000000000000 OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOO t-0000000000000000 OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOO t-0000000000000000 aoo")*fioo©inT-rnaoo>r* in^oroi-roinr-CNtncnroo^ooror^ inve*^inr*»inrntnr»«-©:»r-*-ao(N ONf^vOr~fNvO(N»-CTif--l/)a-tNro en I o r* en II a o H PS M Cm O r-OOtN^OOVOvO oo in — • *-* <-« w *»# ** *- oo oo in in r* o> »- (\j uuui^ cN(NoinintNO^^*ooP~rninT- T-ffnoi-voin\oOicoM/iin>oioooo »-r»orovooor»ovoor*ifl3-co*-tN OMn3'l , l' , ftM'"i-T roine^fNoor-r-cftroT-inr-mr-MOc^in (Nocninooeninoroa'ro«-or^*cooo r».a-\o^r»ao*-tNoo< ,r >r-erivoinrn(v)>oor«tf*(NoofN ooi^a-i»'mron\OT-a , »-voroor"a-in T-^crir-voina , < T )' , ocsIP0r0 i:, 'S , ininvOM3t~'P* 2 o o • h o EH «s 2 II M 33 > EH O 2 n O M 03 03 U W Pm 35 O H 64 Cm H O «< 03 EH 2 H o Cm a H S3 o o o o o o O O II w to II II «c w w W H EH 03 «s « U 03 03 2 H 33 2 EH EH i-3 2 «l «C H W « 03 Q D HHN < Q O 2 S D 03 2 Pm u u o II II II W >- tM EH O U •4 2 2 03 «S «S EH EH X U U Eh W M M Cm Cm t-3 X X HUH EH 03 w w W Bm Pm Pm H H ►J »3 1-3 ►J H H H H << 3> 03 M s? H • to c* 3- * * * » * * <*> co co co to to" co o\ <7* c% c^ ^ eft c^ »- i— »- t- *- ro co co co CO C* C*t 0> C* ty> C5% w H H > «* 03 « S3 W M XI <*l an -j -a a p»ococoooor«.fa>oNcoeooooor~r>if>coaNC^O'*O , tCT*CniOAC7*C>O^aOOOl/'> OOOOOOOOOOOOOOOO crivof*r s -or*r-coiooa>*r*a'r»o oocMoinvor^r»tNooo c>r»wCT>ooooaooor»vomcoovocoa' oocctcrtc^c^CNC^cytCPvcAcyic^cAaor^if} OOOOOOOOOOOOOOOO o H B CQ H OS E-l as o M E-< <•£. ►4 B Cw o Q W 3 3 -a ■B M Ct, -I S3 I as I Cu I I I I I I 35 O H H «S -J. o 04 o I I I I I I I I I to I W I E-< I B I ►J I O I «0 CD I 33 H I O H I 03 CO O CO;TcoT- m 00 VO 00 to 1/5 .— E-< W o S H oo r* (0 r- «a EH o inoooinro' _ cocscor~vooor*'ODco r«.\oco^oDoiDt-coaoCTitNoocor» ocncor— coifi^cMCOCTicoo^DOOcor"" (NCoa-iDr^ificomp-i-o^r^T'ootN r»vor»tNenroc7i\o'-r»;»*-cT>i-'>^3-coT-(N en •■o II a r> o m h o CO «<-o w * . On O O SB O o II w II w D3 < ts 03 O U 05 SB o oo * r- in t- cr vc o co r~ ^- o o S - r- O"* • O > • O O T- \0 • CT> IN • • • i-unc o o o ©v£>*-r»©ioao(N©3-©int^voc*ir> OtM/1000M(10C13i»)^op'tfCOa) iflioap-ecr-(Noocir>o>*C4tf<-r' i- in^r*T-o>incojoopo5ra , tnin»cvor*r~ QlUH B3 O «< H OS W D o «s < « SB Eh SB it, H O O & M a h H «S B OS II II II U W M pq h «C «0 «fi rS os as os as ISEXN 6h Eh Eh E-l (BrtHH H W iJ J PQ Q H H EH H N H OS OS a a w w PDhtu os as OS Eh £g M II II II BXX EH IJ U OS SB SB H «H «< «0HH u u EH M W «* Cu Dj o w w H EH W H < fc ft, 03 H H X W W W 10 1-4 hJ < «E S3 EJ H h 484 DOCUMENTATION M -3 •«S & 3 co W ffci > W H H > «a M n os l-J D 4 to S C\|***r-g\OOvocO<7>(N©ooC*T»T- or-oso>aiflooooooor»r>vOfoaipo w 03 o Z « 05 D 03 H Si w D O CO 14 to z o H 03 O O. O 03 Cn CO I * H I EH M i o pa I 03 CO i «* D Ck O Cm «: S3 H O H pa o w W M m co o(Noaoir)T-o>eo'-^ , vooovocM»-r^r» 0^fNinor»d , 0lf>oo' T )03roeOoin^romp»®c«©vo^c7Nininr-©r*-r»© o*oovooooT-T-*r«(Nr.^-r , »oo or-rotNOcrif-inmsrfnfNtNT-^oo Ot-^-»-t-©0©©0000000© ^©©©©©©o©o©©o©©©© (Nr , »fl0in\oro' _ ' , ovo^inr»ooo3vo' r ic<) a , CN«303a , »-©a-' T >00(NOOo©(r)r~© r*(\ir»'r*»r*-c7iC7*or-4'vocrtro<-c7\aoen (NonoorMa^ooa-voooror-ifiooT-i^o aifi(Nc7»un©f»>aivof , or-cT>r»in*fNro r»r-r>»m»-vocoinfninpo(Nr»\o©^'Cf\ r~cNT-o\t».©a»a-irttTi«-r*r^ir>*Lnvo vo©OT-{Nincn«sfr > «'-cT>voina , t^ »-©(N*cn»-in*cyi©aiooovo©o\oo a-m< r iooT-in©r*-3-T-T- tnoo©or^o^c^ooo>cftooo>ir)*vor~T- «-*oooor-^oovor-eNr» 3 > (Nr«cn©3 , o3CNr^tT'm'-cNt^3 - ' r )vo tfomrMCNi-a-oomooroovca-cNr-w c>ooir>cot^\o«->o«-inT-r»cr)©r>-a , 3- t-o»r-»oifiJ»-roro©if>©in©»r> a- Q O H 03 W Oj o © © t f t «©o©o©o© o • t t • H o II © © © ■4 H z II co II II II II II H a < W M W !w X (>HMHeHHOO D XX 03 «* •e «*i z z 3 o u 03 03 03 «* ■s 03 Z H H 03 Cfl H BB'NOU HHH W W Hh^ 03 •a h Cu Oj EC O <* M U hJ X X H OS M D 03 a h EH w w hHBNK;: O «S «* © Q W [t, En 03 Z D 3 &* H H EH 05 03 hH .-3 z to O O J H o «< N H o 03 M HH ft w W Mi «* p H z 33 B M W IS Bu RVFWD 485 o EH ON H W t- 1-4 H H H 03 03 =3> H n m so os so VO S0 SO *0 SO *0 o o © o o o o OS OS OS Os OS OS OS o o o o o o o sO SO SO SO SO so SO o o o o o o o OS OS ^ OS OS OS sTN s— *"• r- r- T- r- r- • t t • • • • © © © © © o o < 10 > w H EH > < 03 OS a «o BO 2 W B4 ►J «* b in^oosomrsisooosocM^mint-m fsitftf^i-woosonwiNooomi-* oi»ONO»o»eoeococor»r»sopow< T it> o\ffiffiffiov(rwc?iww5>os3>ooooi/i OOOOOOOOOOOOOOOO min^r^psi*oo©mrr»fsao©r* sO< r )r0f)OSf > »sO' T )'0'*00O>©tf>< r )f'1 <7>r*ossT>ooooeoeor>r»if»(*>'-soosa' O>O>Oi0*OSOSs7sOse0f*"U0 OOOOOOOOOOOOOOOO 3 o © < o a © M • PM T- CO SB 1 o M o | H H) o 1 tH «* o 1 03 S o 1 O • 1 04 *- 1 O 1 « 1 1 1 1 1 04 1 1 1 1 1 10 X M H H O W £0 10 o © o o • SB o M E-i «S <-4 D 1 CM :» o SO CM 1 1 1 1 1 W ►J «S M CO o 00 (N 2 1 Pm o 1 H 1 H 1 to • D 1 « w (N n 1 6-1 i-4 in s 1 O «« CM 1 t-1 E »— EH 1 o r> CO 1 to © H m «n O < 2 o H • H CO to so <* H SO r- D 8 u so CM to m O CI cm SO a pa H W -4 sosoosmtnaorsisorsisooor«aointf oorosor»^(Ns7s©(N*oopor*cs|oow ^c»-r-oo>r»ir>in*ropsirsiT-»-©© »-»— T-sr-OOOOOOOOOO©© OOOOOOOOOOOOOOOO oooocfi'-r^t^fNinincrs'NOsror- ooos©*T-p>.soooo>fsiir)oim(^voso o»mrnoeosoin^ron oooooooooooooooo oomaotfoor^aosoaoirtmtfinao OOr-rOinoO©OOs7s©rnsOr-sO*~f*r» comcs)ooor*m;»s*forsisoifiJoD©o p ''r»o aOOlflP^sTsTsOT-^sOOsrOr-OsoOOs in«-rorsiosooa-soeDroT-inoo«-P»© oo^ooin©rocnso'*i^osr , »in*csiro ^-^sr^-mr**( r >u">csi*-r»soo3'os cofNor»©osjJ , mos^ , r-.r*in*inso o' T )*fsiu-)osao ©ooosT-m©r»^fsosr>.so4j-ro»-T- sOtfOrofslCN*-^-'- »r>OsOOOOOr>OOoor s C09*sOr»r' o>s7snr-»-oiooeor>.(nincoso(^sosoi*»r~ as os SO II Q O O SO HNOSO 03 «- o in W a- • =» OiOOO SB © O O II H M H || 10 II us • o i t o t» SO • o M • • t— so SO © o A II II II II II M w a >* X Eh EH Eh EH U U «S sS << « X X 03 as 03 M ft «s CO E-i Eh 03 X X u u HHtiHHM <4 H H t* 04 04 M h4 i-4 a X a H H O w E-l El H M as 03 EH n H a H PM 03 h tv, o Pm H w as M h4 U ►J ►J M •< < U ty u as EH 10 1-4 ►J w Q < •4 B B W o 486 DOCUMENTATION »» CO • • 00 ON • • • • 00 p» o m 00 o o o no r» 00 CO 00 m * o 00 »~ p» »■ r- CO 00 ON p» CO ON o no OJ on o> CM fNl ON ON »» CM ON ?™ • • • t p» on o o o o t- © © © «- a m r> on «- on «- co a a cm • • • • cnotvooNtnooo oo<*)aovoronm* on » on * co ro • • t i © © © o p» a t- CO • • • • C000OMOOOO oNr*<*>ONu"»»ONvo r*.^co^fO<*N, OS OS RROR ITHER GE GR a r> on r» CO CO OO 9 1 CM b o 03 H * ■4 Oh M EH OS E C9 Eh son • • • • O ■ as Cu Oh > h S 00 00 ea E W CM CM tO *- 04 a as Ht CU i-l o oi »- m *— co m cm a n— SB < 1 o ON in r- NO H 1 OS E CM CO «S 03 u <* w E o os 3- SB in w eh EH E 03 OS r- o 09 O 03 «- «* W B Oh to D • • • • as • W 03 (9 CO CM CO © EH H o O EH hi OS in «- «o no 03 S H E «* «s ON cm in cm a CO Cu Eh h pa a ON * •* NO as < OS Q OS Eh • no no p» p* •o M ►J owe* D in © cm co co u Q PS E cu a p- CO IS CM as es oa E O ON H O Oh 09 03 OS H 03 O E £ H • r* as Q II © OS » h eh t* II CO OS H Oh Oh 03 Eh II ii II PS as > E 6S > 03 «S Eh e Oh 03 ia « «a o 03 to a E Cu Cu * © # * * * o ft ft ft * VI ft ft • If) f CO CO • • • • hOinrOOOO r^cooN^oNCMinco ooON©cooor^cMr> on r» on oo a- m # • • • © o © o 00 00 NO O t • • • cor>inmoooo onuon— onn— oNom oovooNONinoNNOo ON 00 ON CO NO NO *- »» CO C) no • • • » nrOIJlOOOO aoNNOina , ONin*- oor»ooN— cMaam ON p* ON CO CO CO • • • • © o o o rof-ONCM t • • • ooNNomoooo p-aooooro^oNa oouooocoonp»t-p» on oo on co 5 x 5 x+5 where rP x is population in the aqe group x, x+4 and K is the ratio of two consecutive aqe qroups. Then, a 10-year aqe qroup would be 10 P x - 5 P x + 5 P x+5 = K * 5V5 + 5^5 = 5V* * (1 + K) x+5 Kence, 10 P x 5 P x+5 "" 1+K and 5** ~ 10x " 5 x+5 Assuminq that the four 5-year aqe qroups between aqes x-10 and x+10 have the same averaqe rate K, the estimation of K is made as follows 10 P x+10 487 488 DOCUMENTATION 2. The second assumption of a quadratic relationship between each three 5-year aqe qroups qenerates the followinq formula P - —1— P H — ( V _ P ) 5x" 2 10 x 16 MO x-10 10 x+10 y and P = p _ p 5 x+5 10 x 5 x 3. Breakinq down the ten into 5-year aqe qroups can also be made by usinq the osculatory interpolation of Spraque. Two polynomials are used. & third deqree polynomial is used for breakinq down the two first and two last 10-year aqe qroups. For intermediate io-year aqe qroups, a fourth deqree polynomial is used. It assumes that the curves are joined so that they have a common ordinate, tanqent and radius of curvature for a certain pivotal point. For instance, for a central aqe qroup the formula is 5 P x " °1 ' 10 P x-20 + C 2 ' 10 P x-10 + C 3 ' 10x + f • p + r, • p U 10 x+10 u 5 10 x+20 For the first aqe qroup the formula is 5 P = V 10 P + E 2 * 10 P 10 + E 3 * 10 P 20 + \ ' 10 P 3 where Cj and E; are the coefficients for central and extreme aqe qroups, These coefficients are: For the first two 10 -year aqe qroups: TEN YEAR AGE GROUP To Obtain x,x+9 x+10,x+19 x,20,x+29 x+30,x+39 5-Year Aqe Group: x.x+4 .7266 -.3672 .1797 -.0391 x+5,x+9 .2734 .3672 -.1797 .0391 x+10,x+14 .0391 .5703 -<, 1328 .0234 x+15,x+19 -.0391 .4297 . 1328 -.0234 For the last two 10-year aqe qroups these coefficients are reversed. For any central 10-year aqe qroup the coefficients are: TEN YEAR AGE GROUP To Obtain x-20,x-11 x-10,x-1 x,x*9 x+10,x+19 r+20,x 5-Year Aqe Group , x, x+5 -.0117 .0859 .5000 -.0859 .0117 x+5,x+9 .0117 -.0859 .5000 .0859 -.0117 SMOTH 489 References Carrier,, N.H. and Farraq, A.M. "The Reduction of Errors in Census Populations for Statistically Underdeveloped Countries" Population Studies (London) 12(3): 240-285, Harch 1959. U.S. Bureau of the Census, United States Life Tables, 1890, 1901, 1910, and 1901-10 by James W. Glover pp. 344-348. B. COMMENTS These methods adjust the aqe distribution of a population for age mis- reportinq within 10-year aqe qroups. No adjustment is made for aqe mis- reportinq across 10-year aqe qroups. For each method the oriqinal population is first smoothed beqinninq with aqe qroup 0-9. The oriqinal population is then smoothed aqain beginninq with aqe qroup 5-14. As a result, two smoothed populations are obtained under each method. This subroutine prints out the results of its calculations. The results are not transferred back to the main proqram through the arqu- ment string. Therefore the results of this subroutine cannot be used as input to another subroutine called subsequently. III.M AIN PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main proqram can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main proqram has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL SMOTH (P5) For the purpose of emphasizing the input arquments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be sinqle-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main proqram. For this subroutine variable name P5 in the arqument strinq is an array. The follow inq DIMENSION statement must be included in any main proqram usinq the subroutine. DIMENSION P5(17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this packaqe None 2. Library functions SQRT (square root) 490 DOCUMENTATION 3. Card diagram of main program and subroutines. / / / CARDS INDICATING END OF DECK / / / / /I / INPUT DATA / | / _ / I / /I I / / COMPUTER CONTROL CARDS / | | / / / I 1/ / /I I / / SUBROUTINE SMOTH / | | / / MAIN PROGRAM / | | / / / I 1/ / /I I / / COMPUTER CONTROL CARDS /J | / / __ / I I / I / BEGINNING OF DECK I / 1/ / / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format reguirements for the main program included with this subroutine package are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example section V.C. Variable Card Columns Name Definition 1 2-53 54-80 2-80 1-8 9-16 73-80 NXT P5 I Blank I | Label used to identify the output I I Blank I I I I I I I I I I Blank I I The code indicating whether or not another set of data follows this one. A zero punched in column 1 would indicate that this is the last set of data. Any other digit punched in column 1 would indicate that another set of data follows this one. The population in age group 0-4. The population in age group 5-9. |The population in age group 45-49, I SMOTH 491 1-8 • (♦1-48 19-56 57-80 P5 |The population in aqe qroup 50-54. I I I |The population in aqe qroup 75-79 I |The population in aqe qroup 80+ I (Blank Cards 3 and 4 read in the P5 values. Ten P5 values will appear on the first card and seven P5 values will appear on the second card. For each P5 value eiqht columns are allowed The values should be entered so that they end in columns 8, 16, 24, . . . 72, 80. IV. SUBROUTINE A. SUBEOUTINE STATEMENT All external subroutines beqin with the word SUBROUTINE followed by a space, the name of the subroutine and the arqument strinq enclosed in parentheses. This subroutine beqins as follows: SUBEOUTINE SMOTH(P5) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition I P5 ITransferred In |Population distribution in 5-year |aqe qroups 0-4, 5-9, ... 75-79,80 + . A (minimum of 12 aqe qroups must be qiven. | A maximum of 17 aqe qroups can be qiven. |The population in all aqe qroups (excapt |the final open-end aqe qroup) must be Iqreater than zero. If any of these con- ditions are not met, error messaqe number |1181 will be written out and the sub- routine will return to the callinq proqram, C. ERROR MESSAGES 1181 *** SMOTH ERROR NO. 1181 — INPUT ERROR IN P5, *** AN INTERMEDIATE AGE GROUP IS LESS THAN ONE, OR THERE ARE NOT ENOUGH AGE GROUPS. *** MINIMUM NUMBER IS 12 V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c C MAIN PROGRAM FOR SMOTH c _ c C THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN THREE READ C STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO C BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN C THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND C GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF C ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS C 2-53 OF THIS CARD. C C — THE SECOND READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ THE C INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET C FOLLOWING THIS ONE. 492 DOCUMENTATION C NXT IS IN COLUMN 1 OF THIS CARD. A ZERO IN COLOHN 1 INDICATES c THIS Is THE LAST DAT& SET . &N Y OTHER NUHBER IN COLUMN 1 c INDICATES THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. C C THE THIRD READ STATEMENT USES TWO DATA CARDS. C THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE C POPULATION DISTRIBUTION (P5) IN FIVE YEAR AGE GROUPS. c p5 VALUES ARE ENTERED ON THO CARDS. FOR EACH P5 VALUE, EIGHT c COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS C OF THE FIRST CARD. A MAXIMUM OF TEN P5 VALUES CAN APPEAR C ON THE FIBST CARD SO THAT THE VALUES END IN COLUMN 8, 16, c 24, ..., 72, AND 80. THE SECOND CARD CAN CONTAIN A MAXIMUM c — _ — OF SEVEN P5 VALUES AND THE VALUES SHOULD BE ENTERED IN THE C SAME MANNER AS ON THE FIRST CARD EXCEPT THAT THE LAST VALUE c ON THE SECOND CARD HILL END IN COLUMN 56. IF LESS THAN C SEVENTEEN VALUES ARE TO BE GIVEN, THO CARDS MUST STILL BE C USED HITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR c THE NUMBER OF P5 VALUES. C ■ c DIMENSION P5(17) NREAD = 1 NPRNT = 15 10 READ(NREAD,11) 11 F0RMAT(1X,52H ) READ (NREAD, 22) NXT 22 FORMAT (11) READ(NREAD,33) (P5 (I) ,1 = 1 , 17) 33 FORMAT(10F8.0) WRITE(NPRNT,4U) HH FORMAT (1H1) HRITE(NPRNT,11) CALL SMOTH(P5) IF (NXT) 10,20,10 20 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE SHOTH(P5) c . c _ _ C PBOGRAM NO. 1180 c c C P5 IS AN INPUT ARGUMENT. c P 5 IS THE AGE DISTRIBUTION TO BE SMOOTHED. c „ c DIMENSION PCF(17) ,PQI(17) ,POI(17) ,DCF(18) ,DQI(18) , DO I (18) , AR (1 7) ,P ♦ 10(8) ,P5(17) NROH = M = NPRNT = 15 C c . . . . C NROH IS USED TO DETERMINE THE NUMBER OF FIVE YEAR AGE GROUPS IN c THE INPUT ARRAY P5„ c . C DO 15 I = 1,17 IF ( P5(I)-.9 ) 96,96,10 10 NROH = NROH + 1 15 CONTINUE 8 CONTINUE IF (NROH-12) 90,90,85 85 CONTINUE IF (M) 90,87,86 86 CONTINUE IF (NROH - (M-1)) 90,87,90 90 WRITE (NPRNT, 222) SMOTH 493 222 FORMAT(/, 1X,U6H*** SHOTH ERROR NO. 1181 — INPUT ERROR IN P5,/,1X, *83H*** AN INTERMEDIATE AGE GROUP IS LESS THAN ONE, OR THERE ARE NO *T ENOUGH AGE GROUPS. ,/, 1X, 25H*** MINIMUM NUMBER IS 12, *//»^X,18HSMOTH INPUT VALUES) WRITE (NPRHT, 224) (P5 (I) , 1=1 , 17) 224 FORMAT (/,5X,5HP5 = , 1 (F8. 0, 2X) /, 10X, 7 (F8. 0,2X) ) GO TO 10(M) 96 CONTINUE IF (M) 97,97,15 97 M = I GO TO 15 87 DO 3<*0 NGRUP = 1,2 M = NROW - NGRUP MJ = NGRUP / 2 * 5 NJ = MJ + 9 100 DCF(18) = 0.0 DQI{18) = 0.0 DOI(18) = 0.0 K = NGRUP C c C THE VARIABLE L IS THE NUMBER OF TEN YEAR AGE GROUPS c C L = ( M + 2 ) /2-1 C c _ C FORM TEN - YEAR AGE GROUPS c C DO 110 I = 1 ,L P10(I) = P5(K) * P5(K+1) 110 K = K ♦ 2 MM = NROH - 3 DO 120 K = 1.MM 120 AR(K+1) = ( 2.0 * P5(K*1)) / (P5 (K) + P5(K + 2)) C c . _ _ c OSCULATORY INTERPOLATION c „ „ , ,__ — C c _ C FIRST TWO AND LAST TWO AGE GROUPS c ___ C K = NGRUP J = 1 N = 1 JK = 2 JL = 3 MM = 4 DO 130 I = 1,2 POI(K) = 0.7266*P10(N)-0.3672*P10(JK) +0. 1797*P10 (JL) - * 0.0391 * P10(MM) JJ = K + J POI (JJ) = P10(N) - POI(K) K = K ♦ 2*3 POI(K) = 0.0391*P10(N) + 0.5703*P10(JK) - 0. 1328*P10 (JL) + * 0. 0234 * P10(MM) JJ = K + J LL = N + J POI (J J) = P10(LL) - POI(K) J = -1 K = 2*L ♦ NGBUP / 2 N = L JK = N - 1 JL = N - 2 130 MM = N - 3 494 DOCUMENTATION c - - c C MIDDLE AGE GROUPS j = 1 K = NGRUP + 2 NN=(M+1)/2-3 140 K = K+2 IF( J - L + 4 ) 150,150,160 150 POI(K) = -0.0117*P10(J)+0.0859*P10(J+1) + 0. 5*P10 ( J+2) - * 0.0859*P10(J*3) +0.0117*P10 . _ C DQI(K) =(( P5(K) - PQI(K)) / P5(K))* 100.0 DQI(K+1) =({P5(K+ 1) - PQKK+1)) / P5(K+1)) * 100.0 170 DQI(18) = DQI(18) + ABS ( DQI (K) ) + ABS ( DQI(K+1) ) K1 = NROH/2 K2 = (NROW+1)/2 IF (K2-K1) 176,176,175 175 K = NROH -3 + 2/NGRUP GO TO 177 176 K = NROW - 3 ♦ NGRUP 177 DO 180 I = NGRUP, K DOI(I) =(( P5(I) - POI(I) ) / P5(I) ) * 100.0 180 DOI(18) = DOI(18) ♦ ' ABS(DOI(I) ) C c C PRINT RESULTS c _. c VRITE(NPRNT,666) MJ,NJ 666 FORMAT (/, 1X,56H POPULATION SMOOTHED BEGINNING WITH TEN YEAR AGE G ♦ROUP ,I2,2H -,I2,///,14JC,8HORIGINAL,4X,3HAGE, ♦7X.21HC&RRIER FARRAG METHOD, 7X,20HQUADR ATIC GRADUATION, 6X,21H0SCUL *AT0RY GRADUATION, /,UX, 3HAGE, 18X, 5HRATIO, 3 (7X, 19HSMOOTHED PERCEN *T) ,/,30X,3(18X,9HDEVIATION) ,/,lX) 240 RH = ( L - 1 ) * 2 DCF(18) = DCF(18) / RM DQI(18) = DQI(18) / RM DOI<18) = DOI(18) / (K-NGRUP + 1) JK = JL = 4 IF ( NGRUP - 2 ) 260,250,260 250 WRITE (NPRNT, 777) JK,JL,P5(1) SMOTH 495 777 FORMAT (1X,I2,2H - , 13. 1X, 2X, F11. 0) GO TO 270 260 HRITE (NPRNT, 888) JK,JL,P5 (1) , POI (1) ,DOI(1) 888 FORMAT(1X,I2,2H -, 13, 3X,F1 1 . 0,66 X,F1 1 . 0,4X,F6. 2) 270 N ■ NGRUP + 1 DO 280 I = 2,N JK = 5 * (1-1) JL = JK + 4 28 WRITE (NPRNT, 999 ) JK,JL,P5 (I) ,AR(I) ,POI (I) ,D0I(I) 999 FORMAT (1X,I2,2H - ,13,1 X,2X, F1 1 . 0,2 X,F6. 2 ,58X,F1 1 . 0,4X ,F6. 2) NN = N + 1 N = NGRUP - 1 + 2 * L KC1 = (NGRUP + NROH)/2 KC2 = (NGRUP ♦ NROH +1) /2 DO 290 I = NN,N JK = 5 * ( I - 1 ) JL = JK + 4 29 HRITE (NPRNT, 1 1 1 1) JK, JL, P5 (I) ,AR (I) ,PCF(I) ,DCF(I) ,PQI (I) ,DQI (I) ,POI *(I).DOI(I) 1111 F0RBAT(1X,I2,2H -,I3,1X,2X,F11.0,2X,F6.2,4X,F11.0,4X,F6.2,2(6X,F11 *.0,4X,F6.2) ) IF (KC1-KC2) 295,320,295 295 JM = NROH - 3 JN = NROH -2 JK =JK + 5 JL = JK + 4 HRITE(NPRNT,99 9) JK,JL,P5(JM) ,AR(JM) , POI(JM) ,DOI (JM) JK =JK + 5 JL = JK + 4 305 HRITE (NPRNT, 999) JK,JL,P5(JN) ,AR(JN) ,POI (JN) ,DOI (JN) 310 JK = JK + 5 JL = JK + 4 315 HRITE (NPRNT, 777) JK,JL,P5 (JN+1) GO TO 330 320 JM = NROH-2 JN = NROH - 1 JK =JK + 5 JL = JK ♦ 4 HRITE (NPRNT, 999) JK ,JL,P5(JM) ,AR (JM) , ?OI(JM) ,DOI(JM) JK =JK ♦ 5 JL = JK ♦ 4 325 HRITE(NPRNT,888) JK,JL,P5 (JN) ,POI (JN) ,D0I(JN) 330 JK = JK + 5 335 HRITE(NPRNT,2222)JK,P5(NROH) 2222 F0RMAT(1X,I2,2H +,6X,F11.0) 340 HRITE(NPRNT,3333) DCF(18) ,DQI (18) ,D0I (18) 3333 FORMAT (/, 1X. 19HAVERAGE OF ABSOLUTE,/, 1X, 20HVALUES OF DEVIATIONS, 27 *X,3(F7.2,20X)//) 1000 RETURN END 496 SMOTH s **. ir. s s s — CM £ £ s t-» C i; s o- -~ £ £ — . £ rC s Z s c " £ e 1ft d- £ £ c o- OO £ J^ £ *- »- £ £ s o OO S S 3 OJ >*^ 3 S a; h- a: a -4 Q_ t»"> s — -. S 3 •B V* S •£> s £ 2 m o 3 *• s s OI o s s s *- a- s 3 a 1*-. o- s s S — — s £ s ^ s •» V 3 3 Oo o~ — 3 3 5 o- vA o 5 5 s o- r^ o- ■s 3 s lr> Oo OO 5 S * O — »** 3 5 3 Oi CVi 3 3 3 S S 3 5 3 3 o 3- >^v 3 § *■ in o- S s s O — o- a. o~ s R S u\ -~ => O s *D n ta CM o tf> E IS 2 Ot s s H t9 s s Si X ■» o '-B 3 3 S t~ r» J- a: :<- s S s o CVi irs to 1^ S S s o o> o r> CM Si S s £ — re, © lf> 3 S R to <•«■>, z rp> K R 8 Ui us S £ z s S S o tfi iS 1— Uv s Z 5 H o- lr> O to S " S i— — •i z r~- s S 5 cc * ^S Oo s 3 s -1 Oo *■ o_ o- s s 2 => ic> o t*> 2 2 - O- Q. 2 2 3 o !^ 3 a 0- Cvi r> tu to 2 u= 2 — r- -J vS 2 2 2 Ul o o- a: I s - 2 2 3 -I CVJ o £ t*> 2 2 2 ar IT» C= Oe o. - " > o 0» > o m u, * r> ir> r- =i ro f ^? E o IX> O in ^. -, ~ to to ~ ^ - — o - - w d i. « o c c\i l- Ui u a- -is « 4- V t. ■« c CVi a Co G -a 3 ) -v 1— Ul to G SMOTH 497 8S so o o M M H Eh H •4 z «S E> W M Q U S» •4 03 w as M Q CB 0, frH 05 o H tt «C W ►J D3 D H U O co o o S3 to uiooiny3fnr»ooO>< T >'-O00*=S'C0*-;S-CN lil * n CI N N t- •- r r- as S3 o o H EH H EH as Eh ■4 U <4 D U N Q 03 > 4 w w « Oh Q O u H H a «a to oa S3 Q EH 4 o O o OI 13 to <* 1 o Q as O EH O Q, co as m S H W H o W u «a 06 s 03 H U> o & W H «a Q U « •4 03 03 PM a ■4 w M « M (M M H EH o J» s 03 M o S3 1 EH •4 m O X u o EH SB H H » m EH (9 O 2 o O H w M ■3 as o EH CO as H •4 •4 Eh m U> D o w 04 H n H EH ►J D •4 Q •4 O ►J W as EH S a H u 04 o, EH O ►J to o O H a* 0, O 03 E +» E O < U) M V) V) t~ HH m as o c H Q at H EH >4 2 tA w H D o t» 0j •4 D o O Oi CO oo©*£>vo*vo OOOOr-T— ©*— OO I I I I I vooinwooo»~r»' r )\£> i-inMNfflrlrtlflr m d-OOlNlfHOM-OOeOO oo' _ inot^*tNr , »vo n en in £>r»«-ooaoo mri(NNi-rr CNCN©vOr-00CNf»-Ot-»a0(Ni^.o^ o(M4 , (M-ina , o\oa>coo'i>oa\oo mrooo»-inor*'3 , (NCT»r-vo*( , oi-T- I I I I I I I I I I I I I I I + oinomoiftomoinoinomoin T-r- 4 M Q Ou O ft, O H O CO ■4 cq 03 O » -4 > <4 <4 t» 498 DOCUMENTATION a a O O H H En H EH own Q U > ««S 05 K) ffiMO 03 o t-> a «s w •J 33 B Eh U O co o o « co C)O(D01O(Nl/lhC0ifl(NC)ai(N NINi-P|rrrNOOrr9ifl I III II I ro*f r )-*r>-^ooooasvDr»vooovo COr-\O«~OO *r~^-inor~a , t^\©=i-< r >»- cn in CN VO m oo v© a z o o H E-l H H SB H H > 19 Cm M w «s a o as «* as 4 CU B- Q «* H W as te tM « EH H O s as O as a H «S (0 O 33 EH ao*»-r*cnO(Noor*'ao ©f> vOf-ror^a , »-f , ^oooo rsiooao»-r>.tNcrioo«-in T-irtor-a'Oicnr^vo* CN ID (9 a O H H H as « EH a «S «l H OS (9 H a rf Q «1 « SB as M Eh (9 O M O OS B O OT 98 o H EH 3 M a Cm ■4 O Cm ^vocfvofM^mr^^co (NNOrrrOOlNN II III lONr»kOM*(JHO*0> lf)(N00rO0O(N^r»r>*ro CN»r-cNr»cNcriacNin «•) CN O)O0) ©i-t-0©©«"*0*-0©^-© »-cNin cN^-c*t*»©cn.»incK*-r«^ , tn*invo O(NS(Tn-iri3lJiO»iQ0O*Om» in l») CO »• Ifl o t* J» n o» MO 3; n ^ i- Ifl S O it N (N r f r- t-^CNCNrOClaaminiOvOr^ i I i i i I I i i i i i i i t + omoinoinoinoinomoinotn >-r(MNi»im*»inin»>oi*h vt W a EH O B H h4 EH O * CO H 03 > M 19 -e a ts D o a H EH O a w OS <* H as H a EH OS o « a m a Qi o a a H a as EH • o 10 OS CO Cm OS CO a pa w o ^ a) EH o D co Cm H a a C9 H Pm S D o 1 O a | a w C9 » T* CN Eh co a «- O »■• C9 X r» •4 CO M Cm • M EH O O EH Of H Cm CO a h a SO m o o a- T- © o o» a ro CN c* o M? O CN m mo a r» a c« oo o CN co M D ►J w a a a < •a _> o h a > c < a a a cn a « a H a M a a d Dh Eh D Cm a a a a « EH H H H H o a a a a h a in a w«m EH Cm > o a * » * a o • * • co V) • * * f. o CN CN o co in I! SPP I. DESCRIPTION OP PROGRAM A. PURPOSE To generate a stable population distribution and its parameters from the 5 L column of a life table and an intrinsic growth rate. B. DATA NEEDED 1. The source of the mortality data. It can be from one of the Coale-Demeny Regional Model Life Tables, an empirical life table or a United Nations' Model Life Table. 2. An intrinsic growth rate. 3. A set of r L from a life table. 5 x II. METHODOLOGY A. MATHEMATICAL DERIVATION According to stable population theory, the intrinsic crude birth rate is: b = 1 f JO -r • x , 1 • e dx x where b is the intrinsic crude birth rate. x is the age. e is the base of the natural logarithm. 1 is the small 1 from a life table whose X X radix is 1 (one) . w is the oldest age. r is the intrinsic growth rate. In discontinuous notation: b = where E _L .e- r ' ( ^ 2 - 5) x=0,5 5 x r L is the r L in the life table. 5 x 5 x 499 500 DOCUMENTATION After obtaining the intrinsic crude birth rate, the age distribution of the stable population is found by: C(x,^) = b. 5 Ve- r - (xf2 ' 5) where C(x,x+4) is the proportion of the population in the age group x, x+«*. The cumulative proportion is calculated as: x C(0,x+4) = X C(j,j+4) 5=0,5 where C(0,x+U) is the cumulative portion of the population from age to age x+4 or, in other words, the proportion of the population under age x+5. The intrinsic crude death rate is: d = b - r The average age is: w A= .5 C(0,1) + 3 C(1,4) + L (x+2.5) • C(x,x+4) x=5,5 The proportion 15-<*9 is: 45 C (15,49) = S C(x,x+4) x=15,5 The ratio of births to the population 15-49 is u 15,49 C (15,49) The ratio of the population under 5 to the population 15-49 is: _ C(O.A) "0,4/15,49 C(15,49) The ratio of the population 5-9 to the population 20-51 is: c (5 , 9) "5,9/20,54 C(20,54) SPP 501 The ratio of the population 5-14 to the population 5 and over is: 10 X! C(x,xU) 5,14/5+ w XI C(x,x+4) 3^5,5 The dependency ratio is: DR = 10 w E C(x,x+4) + Xi C(x,x+4) x=0.5 a£65,5 60 X C(x,x+4.) x=15,5 Given the age-specific fertility rate patterns for particular mean ages of mothers, the gross reproduction rate can be calculated. For the Regional Model Life Tables, Coale-Demeny gave four age-specific fertility rates. For stable populations constructed on the basis of the Regional Model Life Tables, the gross reproduction rate for each pattern of age-specific fertility rates can be calculated as: GRR(5) *^5 5 * 5 x where GRR (m) is the gross reporduction rate for a particular pattern of fertility rates which pertain to a Bean age of mothers m is the mean age of mothers, rPti is a fertility pattern. The four fertility patterns are for the mean age of mothers 27, 29, 31, and 33 and the subroutine gives four gross reproduction rates, one for each mean age. B. COMMENTS Gross reproduction rates are calculated only for the Coale-Demeny Models since the fertility patterns apply only to those models. In order to have the results of this subroutine written out, the subroutine PSPP must be called after this subroutine. III. MAIN PROGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1. CALL statement Once the main program has obtained the data reguired for the subroutine to do its calculations, the main program transmits this data to the subroutine 502 DOCUMENTATION and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL SPP (NREG, RNG, BIGLX, SP,CUMSP,CSP) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or greater than the variable name is dimensioned in any subroutine called by the main program. The variables in the argument string that are arrays are BIGLX, SP, CUHSP and CSP. The following dimension statement must be included in any main program using this subroutine: DIMENSION BIGLX (18) ,SP(18) ,CUMSP(18) ,CSP("J8) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines or functions provided by this publication or by a fortran library. 1. Subroutines from this package PSPP* ♦The subroutine PSPP is needed by the main program to write out the results obtained by SPP. This subroutines is not called by the subroutine SPP and is used only by the main program. SPP can be used without PSPP if it is not necessary to write out the results of SPP. 2. Library functions a. SQRT{Sguare Root) b. EXP (Exponential) 3. Card diagram of main program and subroutines. / / CARDS INDICATING END OF DECK / / / / / INPUT DATA / / / /I 1 1 / /I / COMPUTER CONTROL CARDS / | / / I 1 1 / 1/ / /I I / SUBROUTINE PSPP / | | / / 1 1/ / / / /I 1 / / SUBROUTINE SPP / | | / / / 1 1/ / /I 1 / / MAIN PROGRAM / | | / /..,.. / 1 1/ / /I 1 / / COMPUTER CONTROL CARDS / | | / / 1 1/ BEGINNING OF DECK I / I / 1/ / / / SPP 503 C. FORMAT REQUIREMENTS FOB THE INPUT DATA CARD FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See examnle, section V.c. Variable Card Columns Name Definition 1 2-53 54-80 1 2 3-9 10 11-15 16 17 18 19 20-80 1-8 9-16 72-80 1-8 NBEG BNG EO NSEX NXT BIGLX BIGLX Blank Label used to identify the output Blank X column. A one, two, in column 1 indicates Demeny Regional Model west, north, east and A five punched in source was an empir- x punched in column 1 as a United Nations' The source of the BIGL three or four punched the source as a Coale- Life Table for region south, respectively, column 1 indicates the ical life table. A si indicates the source w Life Table. Blank Intrinsic growth rate. It should be entered so that the decimal point is in column 3. Blank Life expectancy at birth pertaining to the given BIGLX. It should be entered so that the decimal is in column 13. Blank Sex to which the BIGLX 's pertain. A one punched in column 17 indicates males, a two punched in column 17 indicates females and a three punched in column 17 indicates both sexes. Blank The code indicating if there is another data set following this one. A zero punched in column 19 indicates that this is the last set of data. Any other number punched in column 19 indicates another set of data follows this one. Blank The i L o value from a life table for age 0-1. The 4^ value from a life table for age 1-4. ' The q L v value from a life table for age 40-44V The rL value from a life table for age 45-4?. 504 DOCUMENTATION 9-16 57-64 65-80 IThe^Lx value from a life table for | age 50-54. I I (The i-Lx value from a life table for age | 80+. I | Blank I The variable BIGLX is contained on two cards and both cards 3 and 4 must contain values. A minimum of 5 and a maximum of 8 BIGLX values can appear on the second card (card 4) . The last value given on the second card must be for an open-ended age group. IV. SUBROUTINE A. Subroutine statement All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE SPP (NREG, RNG, BIGLX, SP,CUMSP,CSP) B. DESCRIPTION OF ARGUMENTS. Name NREG RNG BIGLX SP How Obtained Transferred In Transferred In Transferred In Transferred Out CUM SP I Transferred Out Definition Source of the mortality data as indicated by one of the following: A) one of Coale-Demeny Model Regional Life Tables indicated by 1,2,3, and 4 for West, North, East, and South, respectively; B) an empirical life table, NREG=5; or C) a United Nations' model, NREG=6. For any other value of NREG, it is assumed that the rL x values came from an empirical life table. A warning message is written out to indicate this and the subroutine continues its calculations. Intrinsic growth rate. The acceptable range is between - 0.01 and 0.05. If RNG is outside this range or is not specified, error message number 1211 will be written out and the subroutine will return to the calling program. Contains the tjL x values from a life table corresponding to 0-1, 1-4, 5-9, ...» 75-79, and 80+. At least the first fifteen values must be provided. If between 15 and 17 values are given, the subroutine extrapolates to obtain the rest of the values through 18. If less than 15 values are given, the subroutine will write out error message number 1212 and return to the calling program. If any value of BIGLX is less than or egual to zero, the subroutine will write out error message 1213 and return to the calling program. SP contains the stable population distribution for the 18 age groups 0-1, 1-4, 5-9, ..., 75-79, and 80+ calculated by SPP. Contains the values of the cumulative SPP 505 CSP Transferred Out age distribution for the stable pop- ulation for ages 1, 5, 10, 15, . .., 7 5, and 80+. The last cumulative age group (80+) should be 1.0. An array of 13 stable population parameters and summary ratios calculated by SPP: CSP (1) -The intrinsic crude birth rate CSP (2) -The intrinsic crude death rate CSP (3) -The average age of the stable population CSP (4) -The proportion of the popula- tion age 15-49 CSP (5) -The ratio of the births to the population 15-49 CSP (6) -The ratio of the population under 5 years of age to the population 15-49 CSP (7) -The ratio of the population age 5-9 to the population 20-54 CSP (8) -The ratio of the population age 5-14 to the population age 5 and over CSP (9) -The ratio of the population 0-14 plus the population age 65 and over to the population 15-64 CSP (10) -CSP (13) are gross reproduc- tion rates which are calculated only for those cards «hen the source i-L is the Coale-Demeny Regional Moftel Life Tables. CSP(10)- CSP (13) correspond to mean ages at childbearing of 27,29,31, and 33, respectively. C. ERROR MESSAGES 1211 *** SPP ERROR NO. 1211 -- INPUT ERROR IN VARIABLE RNG *** INTRINSIC GROWTH RATE MUST BE WITHIN RANGE -0.01 TO 0.05. 1212 *** SPP ERROR NO. 1212 — INPUT ERROR IN VARIABLE BIGLX *** THE NUMBER OF CAPITAL L VALUES MUST BE BEWTEEN 15 TO 18. 1213 *** SPP ERROR NO. 1213 -- INPUT ERROR IN VARIABLE BIGLX *** ALL CAPITAL LX VALUES MUST BE GREATER THAN ZERO. 1214 *** SPP ERROR NO. 1214 *** AN EXTRAPOLATED SURVIVAL RATIO IS NOT WITHIN PERMISSABLE RANGE 0.0 TO 1.0. 1215 *** SPP ERROR NO. 1215 -- ERROR IN VARIABLE BIGLX (18) *** ESTIMATED CAPITAL L FOR AGE 80+ IS LESS THAN ZERO POSSIBLE ERROR IN PATTERN OF MORTALITY. PROGRAM AND RESULTS. A. COMPUTER LISTING FOR MAIN PROGRAM c . I _ „ ______ C MAIN PROGRAM FOR SUBROUTINES SP? AND PSPP | _ . c _ I THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN BY THREE C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOWS, C I THE piBST READ STATEMENT USES ONE DATA CARD. I THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL I T0 BE USED T0 IDENTIFY THE OUTPUT. THIS LABEL WOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF § THE TYPE OP ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED I IN COLUMNS 2-53 OF THE CARD. C 506 DOCUMENTATION C- THE SECOND HEAD STATEMENT OSES ONE DATA CARD. C- THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN (1) THE C — ---SOURCE OF THE MORTALITY DATA (NREG) , (2) INTRINSIC GROWTH RATE C (RNG) , (3) THE LIFE EXPECTANCY AT BIRTH (EO) , (4) THE CODE C— - — (NSEX) INDICATING THE SEX OF THE POPULATION , AND (5) THE CODE C — --(NXT) INDICATING IF THERE IS ANOTHER DATA SET FOLLOWING THIS ONE. C- NREG IS LOCATED IN COLUMN 1. A ONE, TWO, THREE, OR FOUR PUNCHED c in COLUMN 1 INDICATES THE WEST, NORTH, EAST, AND SOUTH q„„, REGION FROM THE COALE-DEMENY MODEL LIFE TABLE SYSTEM c ___„_ RESPECTIVELY. A FIVE PUNCHED IN COLUMN 1 INDICATES AN C EMPIRICAL LIFE TABLE AND A SIX PUNCHED IN COLUMN 1 c _ INDICATES A UNITED NATIONS MODEL LIFE TABLE. C- RNG IS LOCATED IN COLUMNS 3-9, WITH THE DECIMAL POINT IN c _ — — COLUMN 4. C -____E0 is LOCATED IN COLUMNS 11-15 WITH THE DECIMAL POINT IN c ___ — COLUMN 13. C NSEX is LOCATED IN COLUMN 17. A ONE PUNCHED IB COLUMN 17 c INDICATES A MALE POPULATION, A TWO PUNCHED IN COLUMN 17 c — ___ INDICATES A FEMALE POPULATION AND A THREE PUNCHED IN COLUMN c 17 INDICATES BOTH SEXES. C NXT IS LOCATED IN COLUMN 19. A ZERO PUNCHED IN COLUMN 19 INDI- C CATES THIS IS THE LAST SET OF DATA. ANY OTHER NUMBER c PUNCHED IN COLUMN 19 INDICATES ANOTHER SET OF DATA FOL- C LOWS THIS ONE. C C THE THIRD READ STATEMENT USES TWO DATA CARDS. C— — -THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE EIGHTEEN C CAPITAL L VALUES (BIGLX) FROM THE APPLICABLE LIFE TABLE. THE C FIRST TWO VALUES REFER TO AGE GROUPS 0-1 AND 1-4. THE LAST VALUE C REFERS TO THE OPEN-ENDED AGE GROUP. THE INTERVENING VALUES ALL C REFER TO FIVE YEAR AGE GROUPS. A MINIMUM OF 15 VALUES AND A C MAXIMUM OF 18 VALUES MUST BE GIVEN. IF FEWER THAN 18 VALUES ARE C- KNOWN THE REMAINING VALUES MUST BE READ IN AS ZEROS. FOB EXAMPLE, C IF FIFTEEN VALUES ARE KNOWN, BIGLX (15) WILL REFER TO THE C- OPEN-ENDED AGE GROUP 65+, AND BIGLX(16), BIGLX{17), AND BIGLX (18) C-- MUST ALL EQUAL ZERO. C-- BIGLX IS CONTAINED ON TWO CARDS. EACH VALUE OF BIGLX MUST BE C ENTERED WITHIN EIGHT COLUMNS, STARTING WITH THE FIRST EIGHT c COLUMNS. TEN BIGLX VALUES WILL APPEAR ON THE FIRST CARD, c ENDING IN COLUMNS 8, 16, 24, ... ,80. A MINIMUM OF FIVE c _ VALUES AND A MAXIMUM OF EIGHT VALUES CAN APPEAR ON THE C SECOND CARD, ENTERED IN THE SAME WAY AS ON THE PREVIOUS C CARD. q . _ c _ . . DIMENSION BIGLX (18) ,SP(18) ,CUMSP(18) ,CSP (13) NREAD=1 NPRNT=15 3 READ(NREAD,5) READ (N READ, 1) N REG, RNG, EO, NSEX, NXT READ(NREAD,2) BIGLX WRITE (NPRNT,6) WRITE(NPRNT,5) CALL SPP (NREG, RNG, BIGLX, SP,CUMSP,CSP) CALL PSPP (NREG, RNG, SP,CUMSP,CSP, NSEX, EO) IF (NXT) 4,4,3 4 STOP 1 FORMAT (11, 1X,F7.5,1X,F5.2,1X,I1,1X,I1) 2 FORMAT (10F8.0/8F8.0) 5 FORMAT (1X,52H ) 6 F0RMAT(1H1) END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE SPP (NREG, RNG, BIGLX, SP,CUMSP,CSP) c C PROGRAM NO. 1210 c _ C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE NREG, RNG, AND C BIGLX. C THE OUTPUT ARGUMENTS FROM THIS SUBROUTINE ARE SP, CUMSP, AND C CSP. C NREG IS THE SOURCE OF THE MORTALITY DATA. NREG = 1,2,3, OR 4 SPP 507 C INDICATES A REGION FBOH THE COALE-DEHENY MODEL LIFE TABLE SYSTEM, NfiEG = 5 INDICATES AN EBPIBICAL LIFE TABLE, AND NBEG = 6 INDICATES A UNITED NATIONS HODEL LIFE TABLE. -BNG IS THE INTRINSIC GROWTH BATE. -BIGLX IS THE CAPITAL L VALUES FBOH THE APPLICABLE LIFE TABLE. THE FIRST TWO VALUES BEFEB TO AGE GROUPS 0-1 AND 1-4. THE LAST VALUE REFERS TO TBE OPEN AGE GBOUP. THE INTERVENING VALUES ALL REFER TO FIVE YEAR AGE GROUPS. -SP IS THE AGE DISTRIBUTION OF THE STABLE POPULATION GIVEN AS OUTPUT. -CUHSP IS THE CUHULATIVE AGE DISTRIBUTION OF THE STABLE POPULA TION GIVEN AS OUTPUT. -CSP IS THE PARAHETERS OF THE STABLE POPULATION GIVEN AS OUTPUT. DIMENSION BIGLX (18), SP(18), CUMSP(18), CSP (13) DIMENSION P(7,4), X(18), AGE(18) NPRNT=15 -COUNTING OF THE BIGLX VALUES DO 1 1=1,18 J = 19-I IF (BIGLX (J) -.00001) 1,1,2 2 N=J GO TO 3 1 CONTINUE •VERIFICATION OF INPUT ARGUMENTS 3 NERR=0 IF (RNG + 0.01) 10,21,9 9 CONTINUE IF (RNG - 0.05) 21,21,10 10 WRITE (NPRNT, 20) 20 FORMAT ( /55H *** SPP ERROR NO. 1211 -- INPUT ERROR IN VARIABLE RN *G,/,64H *** INTRINSIC GROWTH RATE MUST BE WITHIN RANGE -0.01 TO * 0.5.) NEBR=1 21 CONTINUE IF (N - 15) 23,25,25 23 WRITE(NPRNT,24) 24 FORMAT ( /57H *** SPP ERROR NO. 1212 -- INPUT EBROR IN VARIABLE BI *GLX,/, 62H *** THE NUMBER OF CAPITAL L VALUES MUST BE BETWEEN 15 ♦TO 18) NERR=1 25 DO 27 1 = 1, N IF (BIGLX (I)-. 00001) 26,26,27 27 CONTINUE GO TO 30 26 WRITE (NPRNT, 28) NERR=1 28 FORMAT ( /57H *** SPP ERROR NO. 1213 -- INPUT ERROR IN VARIABLE BI *GLX,/,53H *** ALL CAPITAL L VALUES MUST BE GBEATER THAN ZERO) 30 CONTINUE IF (NREG - 1) 40,55,35 35 CONTINUE IF (NREG - 6) 55,55,40 40 WRITE (NPRNT, 50) 50 FORMAT ( /49H *** SPP WARNING — INPUT ERROR IN VARIABLE NREG,/, ♦104H *** REGION CODE WAS NOT WITHIN RANGE 1 TO 6, MORTALITY IS ♦ASSUMED TO BE FROM AN EMPIRICAL LIFE TABLE) NREG = 5 55 CONTINUE IF(NERR) 58,58,170 C c C EXTRAPOLATION TO 18 BIGLX VALUES IF LESS THAN 18 ARE GIVEN c 58 CONTINUE IF (N-18) 56,60,60 56 TEMP=BIGLX(N) 508 DOCUMENTATION SUM=0.0 SRl=BIGLX(N-1)/BIGLX(N-2) SR2=BIGLX (N-2) /BIGLX (N-3) EAT 10= (1.0-SR1)/(1.0-SR2) SR=SR1 DO 57 J=N,17 BIGLX(J)=BIGLX(J-1)*(1.0- (RATIO* ( 1.0- SR) )) SR= BIGLX (J) /BIGLX (J-1) IF (SR - 0.00001) 59,57,565 565 CONTINUE IF (SR - 0.99999) 57,57,59 57 SUM=SUM+BIGLX(J) BIGLX (18)=TEMP-S0M IF(BIGLX (18) ) 62,60,60 62 WRITE (NPRNT,63) 63 FORMAT( /, 55H *** SPP ERROR NO. 1215 — ERROR IN VARIABLE BIGLX(1 *8),/,96H *** ESTIMATED CAPITAL L FOR AGE 80+ IS LESS THAN ZERO, ♦POSSIBLE ERROR IN PATTERN OF MORTALITY) BIGLX (N)=TEMP GO TO 170 59 CONTINUE WRITE (NPRNT,61) 61 FORMAT (/,23H *** SPP ERROR NO. 1214,/, *84H *** AN EXTRAPOLATED SURVIVAL RATIO IS NOT WITHIN PERMISSIBLE R *ANGE OF 0.0 TO 1.0) BIGLX (N)=TEHP GO TO 170 C c C FILL VALUES OF AGE WITH MID-INTERVAL AGES c C 60 AGE (1) - .5 AGE(2) = 3.0 AGE (3) =7.5 DO 70 1=4,17 70 AGE (I) = AGE(I-1) + 5.0 C c C ESTIMATE AVERAGE AGE OF 80+ GROUP c C SL80 = (-3.725 + SQRT (13.875625 + .00025 * BIGLX (1 8) ))/. 000125 EX80 = BIGLX{18) / SL80 AGE(18) = 80.92 + .6 * EX80 GO TO (80,80,80,80,90,90) ,NREG C c C DATA FOR THE CALCULATION OF THE GRR IS PUT INTO P c C 80 P (1,1) = .029 P (2,1) = .055 P (3,1) = .054 P (4,1) = .037 P(5,1) = .020 P (6,1) = .004 P(7,1) = .001 P (1,2) = .018 P (2,2) = .042 P(3,2) = .056 P (4,2) = .044 P (5,2) = .028 P(6,2) = .010 P (7,2) = .002 P(1,3) = .008 P (2,3) = .032 P (3,3) = .054 P(4,3) = .050 P (5,3) = .034 P(6,3) = .018 P(7,3) = .004 P (1,4) = .002 P (2,4) = .019 P (3,4) = .047 P(4 # 4) = .056 P (5,4] = .046 SPP 509 P<6,4) = .025 P(7,4) = .005 C c C INITIALIZE VARIABLES c C 90 CSP (3) =0.0 DO 100 1=10,13 100 CSP (I) = 0.0 RECIP = 0.0 C c c CALCOLATE RELATIVE SIZE OF STABLE AGE GROOPS FROM RATE OF NATURAL C INCREASE, AVERAGE AGE, AND LIFE TABLE c C DO 110 1=1,18 X(I) = EXP(-RNG * AGE (I)) * BIGLX (I) 110 RECIP = RECIP + X(I) C c c CALCOLATE SCALE FACTOR c C BX = 1.0 / RECIP RECIP = RECIP / 100000.0 C c C CALCOLATE STABLE DISTRIBUTION, CUMULATIVE DISTRIBUTION, AND C AVERAGE AGE c C TEMP = 0.0 DO 120 1=1,18 SP(I)=X(I) *BX CUMSP(I)= TEMP ♦ SP(I) CSP (3) = CSP (3) + SP(I) * AGE(I) 120 TEMP = CUHSP(I) C c C CALCULATE THE CRUDE BIRTH RATE AND THE CRUDE DEATH RATE c C CSP (1) = 1.0 / RECIP CSP (2) = CSP(1) - RNG GO TO (130,130,130,130, 160, 160) ,NREG C c C CALCULATE THE GROSS REPRODUCTION RATE c C 130 DO 150 1=1,4 K = I + 9 DO 140 J=5,11 140 CSP(K) = CSP(K) + X(J) * P(J-4,I) 150 CSP(K) = 100000.0 / CSP(K) C c C CALCULATE REMAINING STABLE POPULATION PARAMETERS c C 160 CSP(4) = CUHSP{11) - CUMSP(4) CSP (5) = CSP(1) / CSP (4) CSP (6) = CUMSP(2) / CSP (4) CSP(8) = (SP(3) + SP(4)) / (1.0 - COHSP (2)) CSP (9) = (1.0 - CUMSP(14) ♦ CUMSP(4)) / (CUMSP(14) - CDMSP (4)) CSP (7) = SP (3) / (CUMSP(12) - CUMSP(5)) GO TO 1000 C c C ZEROING OUT OF OUTPUT AND PRINTING OF INPUT BECAUSE OF ERROR c C 170 DO 180 1=1,13 SP(I) = 0.0 CUHSP(I) = 0.0 510 DOCUMENTATION 180 CSP(I) =0.0 DO 190 I = 1H,18 SP(I) = 0.0 190 COHSP(I) = 0.0 HRITE(NPRNT,200) NREG,RNG, (BIGLX (I) ,1= 1,N) 200 FORMAT (//,25H SPP INPOT ARGOHENTS,, *//#12H NREG = ,16, V,11H RNG = ,F12. 5, */,13H BIGLX = ,9F12.2,/,13X,9F12.2) 1000 RETURN END SPP 511 1- cr U4 -J Q. £ or oo s Oo O O s O O S O* «. — -~ £ — »-. s 5 0" m »ci £ IT, «r> s x in •~ — E — — R S CM o- 0r ;e o o» £ K 4- rc» rr> ^ CO fO X" * ^ ; £ " " IT O- V9 M) ~ v9 vft ^! c CM *- a~ ^ »- »• r^ o OO 3- *• 5 =1- 3- s s 3- O o S o o s s W> Ci o 2 o <5 s s 3- i- *• S 3- :*■ s s S s s s £ s — o- M> O M> o • r- *- r- a- 3 r- h~ 3 S *• Lf> o o o O S o O S £ 3- — *■ ~- > -- S 3- J- ffi s S S ft K a s r~ m oJ o C4 o S CM O CM £ s 3- o=> CM rc> CM -- *- — s 3- CM 3- s S s s «* 5 9 3 — I-- CM f<^ CM tC> 3 CM w» CM O § "T CM — vS o- s9 0- 5 vS o- v9 o 3 3 o »0 Oo Oo 0o 00 S 0o 00 0O o 3 3 3- — o- 0O O- w» V t>- 0» o~ o « * to in — o ~ o 3 — O — *^ 3 3 3- CM s- OJ J- cv 3 3- CM 3- 3 8 3 3 3 3 t 3 o r~ O- ©- O- o- S 0~ o» o- o» 3 S .'- 3- U> »n Ln ir> S ir» in m »o S s 3- o vS K% v9 T\ 3 >J> «■» vS «r< 3 ft Oo Oo *■ in a- IT. S d- tr> i- Ln ft £ LT> o CM vS 3- 00 ~- Z oo — Z S 00 — 00 ~~ s s ~ o- ^-^ r~ 0O M r— 0o o S r-- Oo r- Oo s " va 3- ro CM o Z CM O M S CM o ^~. CM O S a 3- ro — i- fT> cc i- <^> h- Si * ro tr» 4- fO R s 00 -J s CM s 3 -1 tn CM — «c» Oo «■> OO o «t »o Oo — •o Oo s S «c o CI 0O CM z 0O OJ a. s oo CM Oo CM s & s 3- x~ c^ a r- o o r- cc ^ © r- a o |v- Pi s Ul 3- 00 o — »» M — o- cr s — o- o — Ox 3 s U_ M> r- csr «T> •*> O CC\ rc> t- s «% CO a. CO "O S s — 3- ro cr ■— 3- fC> LU — d- ^c> X 2 ~- J- "•O rr o 3- fO 2 "s 1 r- OJ o; Ul 2 LU 2 5 to tM \-** — . -~^ ■^~ s v^ — ^ a Ul x- — vS CM sS CM 2 t9 CM vS CM 2 "2 1 5 O o o~ t/> O — 1^. CO o -— r»- to S o — r- to o — r^ 2 s o 3- 3- UJ h~ — O LU h~ — MS m 2 r~ — vS LU r- — •-9 2 2 >- • u> o- -1 « — CM -I • •— CM -1 2 — CM —J • — CM 2 - z LT. r-. o~ CC oo ir> O cc 0O IT> v^ oc 2 oo LO v9 ur CO m vS 2 3 m v9 "O »o £ irv r^ r^ S Ln r<^ N-l S. 2 in rCi CO S LT> ro ro 3 o £• 2 2 »> LU O cs: C£ CC m Or o. « Q o 3- o~- H •— 0o o-~ M ~ OO O— (-1 «> — oo o~ »-( ~- Oo o-~ » » m o to ^ :*- 3- — Z d- J- — z i> J- d- — Z d- 3- — - c U4 PJ o sA Ul rr> J- CM at ro ^*- CM UJ u> fO J- CM LU rO 3- CM ^ <•> -1 o vfi *■ > O x% O- > o OTk Cf- i> •» o <*i o- i> o ro O ^, - . O- r-- t - o 3- o K\ D ^<^ o n CO o ro n ~ o to to to r. tr> ,^ - — Ul »^- - LO Ln - U o CO cs c CM CO ■« w ~8 o CO 4- a CM b O" Co c 1 o C 3- i TS Ul CO \- Ui v> ■» c CM » t-CN^lf) IflOOOKl • t > • i « • • • « VOi«>(NOOOOOO CM CN CUChCu DiHOOHEhHH Eh OHWM-<000\OiJHt-?«S'<«»!*! w !mos oq > cucucu^rcuoaoH JQ U Cfl «S Z r- << MX Ssb uu oWN.i \H«u ■suhh Hwmo>m + cu O w a 35 oaHosm.^Wwo N2HH O 05 M Oj frsW Cm H « 03 PiHQ . O o H » W XMHH O 0} * CU Cu CU m U WHBZ 05 DO O X «< 55 H H Dj CU W H . H O W 2 > O ft. ss W 2 + 3C «S w w * a a T" I 1 W 03 o M O «* Pu • o o. U 03 o 03 CU O o H EH h3 «* O »J bo ti h *t-oiO(nmr»T-ww»-^c«r»imowo • ' O ( T >^r-oooor»a-T-r-T-ioai(Ninr~-o5ai fOT-(s»-o\oor > -icin^si r ifO(N»-i-oo W W EH «C O 0'-t-»-00000000000000 ►j in o eh cue .,..,... CU PO 10 OH OOOOOOOOOOOOOOOOOO S+> ■ 03 M CU 10 t- H SB « q h w T-j»o\t-«-r- a u i i i i I l i i i i I i i i i i i h> <« »-in©in©in©in©in,©in©in©in© w r-f-NiNnntftfiniflioiot-hoo •J < o u SPP 513 EH w to •tf a CM no ca O 03 OS w « P-H 1 I* 03 H z W B» S o en Hi H 03 O oa w W N Hi DQ Z < «s M 33 03 H «S > 03 W Z EH H «* W 03 03 u> 03 03 W M 03 EH H D to Qj O 2 & M V) 1 M I » 1-1 m < r- > r» cn 1 SO -* 03 «J Oj 33 W EH EH 03 <« H 03 03 33 EH EH «* QC O ■X 03 U U> < U EH H U W 03 2 Oh H X 03 W EH SB W H 6j W W EH H ■C «S 03 03 33 33 EH EH 03 < H M 03 Q U U H H 10 to z z H H 03 03 Eh H Z Z W cn CS * ■< I m M r> U> < W 03 O H «* > «) Z O H H 03 o Oj O 03 Oj cn cn s* st st if) I I I m in o T- V- CM + =r Qj Oj Oj O O O Oj Oj Oj S\N to in cn 33 I Eh os in 03 M H 0. • 03 Z 0j D O Qj i 0j • in Q 0j t- W O > CM • •• H Oj W 03 \OJ« a- 0j 03 Q r- «< I \H >*. m + hi m i-i • \fi w «* Oj hU O • H H Oj Oj i-l 03 O H Oj 0j E + W I © z o M EH «* 1-1 E> Qj O Oj W •-1 03 «* Eh «0 W i-l «s E H Z t> O H H H EH •< 03 ■J O a oj E O S 03 O Oj Z o H W EH tS 03 <: O Oj Z O H 03 0j W Oj O ©oooooooooooooo©©© ©©©©©ooooooooooooo ©oooooooooooo©©©©© oooooooooooooooooo st&sta\stOist&stO , *st&sti>r^ 11111111111111111 + T-inoinomoinomoinomoin© i-T- U> SE as «« H 03 ^mt U 03 SE SB O H N 02 33 SB 05 EH M W H < 1 SB m H D H SB 04 O o SB SB H H H W 1 < W 05 1 * w '"* O H "E3 M as q U W H O ro m SB U ■8 05 E «! SB * o OS H H 04 U SB 04 W M w oa > D * * O * # tf) # # ©»-cor~.3'o©r-cvir-. 03 HEHHH«fl«t..04»"H W XSPS^HUBiOiOi 04 W M H O H « W < O O O \0 M W W !m 03 (33 Q S* Pn 0j 04 * Os 03 « K U U «"0 SB «- «* «1 SB UO ONWI\H>4 03 •< U H H H0)iOOilfl+ >-3 < J-4 M CO W H 33 | IT) M 04 U V) as as «H BiA >vB w«s HSBHH O 03 ta 04 hU O4HO303 CM H O • O • H H X 05 fcH H OCQSSCnQjOjtJffl HH22 03 SO O M B5 H H 04 04 04 04 h h • an Pm 04 + W H O t-3 Q4 sr I o 04 o 04 w as t» o SB H H O EH EH -30 *oopom\oinfMooroP*oroir)t^ooo>o>^»o t-3 SO D O 03 OOOOOOOOOOOOOOOOOt- 04 H rj &, O 1-4 04 «S »a as o 03 03 < »9»NOI»MOin3'nNNrrOOO I I < I I I I I I I I t I I I I I + «s riflomoinoinomoinoifloino «-»-**irtinvOvOf»r*e0 SPP 515 • r»i ss- «- • ji-a *fow oo o o o *" • • • • t • in • • totoooooo o o o « M H W E -a os 33 W W W Eh H EH Eh H as 03 05 03 EC 33 03 Eh EH Eh Eh < » oo «e O H M jm os gq q u o x y u «1 U M H U W SB SB HZHH fllHMlK x « eh H NHZZ SB H M M H d. H 1-4 O H EH «S Ol < OS W H w •— A W +J M 9 ►-) ■ 03 H SB W > D O W SB o M H < D Ou o Q4 W i-3 oa «a H W « SB > o H M Eh EH «B OS ►J o D 04 SO o D OS U Oi SB o H W H 19 03 «* O Oi X O H OS a, m cri oi * + If O sr * :* in in ^ «S 1 1 1 1 t m m m © • in a M *-*»»- cm Ol r- H o o > m n • • « 04 • .. H OS U> Oi Ol Oi 04 M « B4000\0JM > Ch CU Oi ;3- 9)03 a < SB T- ««s o \w 1 \H X Hin^Tiin + i-J Eh m i m hi os Eh os m • \C W *1 O 03 W o. &4 U Oo m a • o . H H O CO 30 Oj 04 ft tj 03 OS DO O H Oj Cu Ol 04 • E 04 + W o Oi 9 «— 1 o • o. o Q4 H *invor»r ,, »ooaow^a**'Oia*cno oooooooooooooooo©*- p-NO>in3-r«rMOOT-Clh'r'iOr-r'*(N O^^t-^OOOOOOOOOOOOO OOOOOOQOOOOOOOOOOO I I I I I I I I I I I I I I I I I 4 «-in©in©m©in©in©in©m©ir>© ^-*- D o so «a + > © oo Z H W U 03 < o 03 03 03 O W h I in h «- «a CM En r- H Cm • «s O U a 03 Q O W 03 EH 03 «a H E H Cm Eh 04 to 10 W * * * * * * (O EH Z M E o 03 «S EH D Cm Z o o © © • • cm © CM O I - © 5t © O O O O • • cm o> © m » co er> m r- © O© OO • • CM «- lO O © •- * 00 o H H H EH «S 03 ►J O Q Cm E O © 03 U Cm EHHEHHOa-sr^-inm© 05 < 4) «S << [ I I I I H03O3P3 iTllfllflO "10 Q « M «- i- r- (M cu t- W a 33 B o o > S-i EH Eh H «a W • • • Cm • •• H M)tB03<403UCuO<04 OiH « OHHW<000\OHW xo3oqq> a. a. ck ;»■ cu cq a u © << z t- ■* a uu ow\i\6h>h ««OHH H 10 in CM u"> + H EH 33 I in H 03 Eh as un . vO W < O 03 M Cm hU CM H Q • O ' hi H Di DO OH Oi 0j Cm Oi • E en + w o Cm at I o cu o a. EH H to W unzz HZHH Cm H 03 03 XI 03 H H UH2Z SB H H pa m h H H II II II X O H HO (5 03 a H a 03 cq M H -* e a o W H M H HO co. 03 «e «s O EH Cm a 10 OH 03 Oh W oooooooooooooooooo 0©0©0©0©©0©©©©©©0© oooooooooooooooooo oooooooooooooooooo t-itcfii-T-cMcMcocosfsrininvovDr^r* I • I I i I i i I i i • i I i I i + «-in©in©in©in©tn©in©in©in© T-r-cMCMcocoa-sfininvovor-r-© SRX10 I. DESCRIPTION OF P R G P. A H A. PURPOSE To calculate survival rates for open-ended age groups for a period of 10 years -- x and over survivng to x + 10 and over — from two population distributions enumerated or estimated 10 years apart. B. DATA NEEDED 1. Population distribution by 5-year age groups for the earlier date. 2. Population distribution by 5-year age groups for ten years later. II. MET H0D0L0GY The following eguation is used to calculate the open-ended survival rates: y pt+10 s t,t + 10 = .1^5 5 J +1Q x+ w 3=^5 5 x where S • is the survival rate from ages x x and over to ages x+10 and over from year t to year t+10, P 1 is the population of age -j to j+4 at year t, w is the oldest age. III. M AIN PPOGRAM A. REQUIREMENTS The main program is reguired to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1 . CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. 517 518 DOCUMENTATION The form of the CALL statement for this subroutine is as follows: CALL SRX10(C,D,NWRIT,S) For the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variables C, D, and S are arrays. The following dimension statement must be included in any main program using this subroutine. DIMENSION C(17) ,D(17) ,S (17) B. OTHER SUBSOUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines from this package None 2. Library functions None 3. Card Diagram of main program and subroutines. / / / CARDS INDICATING END OF DECK / / / / /I / INPUT DATA / | / / I / /I I / / COMPUTER CONTROL CARDS /I I / / I I/ / /I I / / SUBROUTINE SRX10 / | \ / / / I I/ / /I I / / MAIN PROGRAM / | | / / / I I/ / /I I / / COMPUTER CONTROL CARDS / | | / / / I I / I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. SRX10 519 Variable Card Columns Name Definition 1 2-53 54-80 1 3-80 1-8 9-16 • 73-80 1-8 9-16 9 49-56 57-84) NXT NWRIT Blank Label used to identify the output Blank The code indicating if there is another set of data following this one. A zero punched in column 1 indicates this is the last set of data. Any other digit punched in column 1 indicates another set of data follows this one. The write indicator. If a zero is punched in column 2, the results of the subroutine SRX10 will not be written out. If any other value is punched in column 2 the results of the subroutine SRX10 will be written out. Blank The population 0-4 for the earlier date. The value should end in column 8. The population 5-9 for the earlier date. The value should end in column 16. The population 45-49 for the earlier date. The value should end in column 80. The population 50-54 for the earlier date. The value ends in column 8. The population 55-59 for the earlier date. The value ends in column 16. The population 80+ for the earlier date. The value ends in column 56. Blank The variable C always requires two cards. The first card (card no. 3) must always contain data whereas the second card (card no. 4) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 73-80 1-8 9-16 I I The population 0-4 for the later date. The lvalue ends in column 8. I |The population 5-9 for the later date. The lvalue ends in column 16. |The population 45-49 for the later date, lvalue ends in column 80. | The population 50-54 for the later date. I The value ends in column 6. I I The population 55-59 for the later date. I The value ends in column 16. The 520 DOCUMENTATION 49-56 57-80 | The population 80+ for the later date. lvalue ends in column 56. I | Blank The The variable D always raguires two cards. The first card (card no. 5) must always contain data, whereas the second card (card no. 6) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE SRX1 (C, D, NWRIT, S) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition NWRIT Transferred In Transferred In Transferred In Transferred Out The population distributio age groups for the earlier mum of 17 and a minimum of can be given. If this pop tribution has less than tw given, the subroutine will message 1241 and return to program. If the populatio has an intermediate value the subroutine will write sage no. 1242 and return t program. n in 5-year date. A maxi- 2 age groups ulation dis- o age groups write out error the calling n distribution of less than one, out error mes- o the calling The population distribution age groups for the later da mum of 17 and a minimum of can be given. If this popu distribution has less than groups given, the subroutin out error message 1241 and calling program. If the po distribution has an interme of less than one, the subro write out error message no. return to the calling progr in 5-year te. A maxi- 4 age groups lation four age e will write return to the pulation diate value utine will 1242 and am. The write indicator. If NWRIT-0, the subroutine will not write out the results of its calculations. If NWRIT is any other value, the subroutine will write out the results of its calculations. The 10-year survival rates for open-ended age groups as calculated by the subroutine. C. ERROR MESSAGES 1241 *** SSX10 ERROR NO. 1241 — INPUT ERROR IN EITHER C OR D *** INSUFFICIENT NUMBER OF FIVE-YEAR AGE GROUPS GIVEN, THE FIRST SET MUST HAVE AT LEAST TWO ELEMENTS AND THE SECOND *** SET MUST HAVE AT LEAST FOUR ELEMENTS. 1242 *** SRX10 ERROR NO. 1242 -- INPUT ERROR IN EITHER C OR D *** AN INTERMEDIATE VALUE OF ONE OF THE POPULATION ARRAYS IS LESS THAN ONE. SRX10 521 V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM MAIN PROGRAM FOR SRX10 ■ THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN FOUR READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE BEAD STATEMENTS AS FOLLOWS. THE FIRST READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO BE USED TO IDENTIFY THE OUTPUT. THE LABEL WOULD USUALLY CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS 2-53 OF THIS CARD. THE SECOND READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE INDICATOR(NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET FOLLOWING THIS ONE AND (2) THE WRITE INDICATOR (NWRIT) WHICH DETERMINES WHETHER THE RESULTS OF THE SUBROUTINE SRX10 SHOULD BE WRITTEN OUT. NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. NWRIT IS IN COLUMN 2 OF THIS CARD. A ZERO PUNCHED IN COLUMN 2 INDICATES THAT THE RESULTS OF THE SUBROUTINE SRX10 ARE NOT TO BE PRINTED OUT. FOR ANY OTHER DIGIT PUNCHED IN COLUMN 2 THE RESULTS OF THE SUBROUTINE SRX10 WILL BE PRINTED OUT. THE THIRD READ STATEMENT USES TWO DATA CARDS. THE PURPOSE OF THE THIRD READ STATEMENT IS TO RiiAD IN THE FIVE YEAR POPULATION AGE GROUPS(C) TO BE USED TO DETERMINE THE POPULATION AGE X AND OVER. C VALUES ARE CONTAINED ON TWO CARDS. FOR EACH C VALUE EIGHT COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS OF THE FIRST CARD. A MAXIMUM OF TEN C VALUES CAN APPEAR ON THE FIRST CARD SO THAT THE VALUES END IN COLUMNS 8,16,21+,. .. ,72, AND 80. THE SECOND CARD CONTAINS SEVEN C VALUES AND THE VALUES SHOULD BE ENTERED THE SAME AS ON THE FIRST CARD EXCEPT THAT THE LAST VALUE ON THE SECOND CARD WILL END IN COLUMN 56. IF LESS THAN SEVENTEEN VALUES ARE TO BE GIVEN, TWO CARDS MUST STILL BE USED WITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR THE NUMBER OF C VALUES GIVEN. THE FOURTH READ USES TWO LATA CARDS. THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE FIVE YEAR POPULATION AGE GROUPS (D) TO BE USED TO DETERMINE THE POPULATION AGE X ♦ 10 AND OVER. THE POPULATION FOR THE FIRST FIVE YEAF AGE GROUP FOR D MUST BE FOR THE SAME AGE GROUP AS THE FIRST POPULATION GIVEN FOR C. D VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAME REQUIREMENTS AS C VALUES. DIMENSION C (17) ,D(17) ,S(17) NREAD = 1 NPRNT = 15 10 READ(NREAD, 11) 11 F0RMAT(1X,52H ) READ (NREAD, 22) NXT, NWRIT 22 FORMAT (211) READ(NREAD,33) (C (I) ,.1=1 , 1 7) 33 FORMAT(10F8.0) READ(NREAD,33) (D (I) , 1=1 , 17) WRITE (NPRNT, l+«) <*4 FORMAT (1H1) WRITE(NPRNT,11) CALL SRX10 (C,D, NWRIT, S) IF (NXT) 10,20,10 522 DOCUMENTATION 20 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE SRX 10 (C, D, NWRIT, S) c — c . C PROGRAM NO. 1240 c __ C THE INPUT ARGUMENTS TO THIS SUROUTINE ARE C, D, AND NWRIT C- THE OUTPUT ARGUMENTS ARE S C C IS THE POPULATION IN FIVE YEAR AGE GROUPS FOR THE EARLIER C PERIOD. C D IS THE POPULATION IN FIVE YEAR AGE GROUPS FOR THE PERIOD TEN c _. YEARS LATER. C— ~ NWRIT INDICATES WHETHER THE SUBROUTINE SHOULD PRINT OUT THE C RESULTS OF IT'S CALCULATIONS. c — . s IS THE SURVIVORSHIP VALUES CALCULATED BY THIS SUBROUTINE FOR C AGE X AND OVER SURVIVING TO AGE X + 10 AND OVER. C C — THIS PROGRAM COMPUTES TEN-YEAR SURVIVAL RATIOS, USING ARRAYS A C— AND B. A CONTAINS THE EARLIER FIVE YEAR AGE DISTRIBUTION-AND c __~ — B THE LATER. A AND B, ARE USED FOR CALCULATIONS IN THIS C — — SUBROUTINE SO THAT C AND D WILL NOT BE CHANGED BY THE SUBROUTINE C AND THE USERS INPUT INFORMATION WILL NOT BE CHANGED. c ___ c ____ , -...—.. — . DIMENSION C(17), D(17), S(17), A(17), B(17) NPRNT = 15 NT = MT = TA = 0.0 TB = 0.0 a = N = C c — ,_ C — --- CHECK FOR INPUT ERRORS q _ . C DO 40 I = 1,17 IF( C(I) - .9 ) 107,107,10 10 M = M + 1 20 A (I) = C (I) TA = TA + A CI) IF( D(I) - .9 ) 106,106,30 30 N = N + 1 35 B(I) = D(I) TB = TB ♦ E(I) 40 CONTINUE IF (NT) 42,43,42 42 CONTINUE IF (N-(NT-1)) 95,43,95 43 CONTINUE IF( N - 4 ) 100,44,44 44 CONTINUE IF (MT) 45,46,45 45 CONTINUE IF (M-(MT-1)) 95,46,95 C c „ . „ „ . C ADJUST AGE DISTRIBUTIONS TO CORRESPONDING SIZES c C 46 CONTINUE IF( M + 2 - N ) 70,110,50 50 MB = M 6 = N - 2 IF( H - 2 ) 100,55,55 55 L = M ♦ 1 DO 60 I = L,MM 60 A(H) = A(M) ♦ A (I) SRX10 523 GO TO 110 70 CONTINUE IF( M - 2 ) 100,80,80 80 L = a + 3 DO 90 I = L,N 90 B(M*2) = B (M+2) + B(I) GO TO 110 C c C ERROR STATEMENTS c C 95 WRITE (NPRNT, 77) 77 F0RMAT(/,1X,56H*** SRX10 ERROR NO. 1242 -- INPUT ERROR IN EITHER C * OR D,/, 1X,88H*** AN INTERMEDIATE VALUE OF ONE OF THE POPULATION A *RRAYS IS LESS THAN OR EQUAL TO ZERO.) GO TO 104 100 WRITE (NPRNT, 88) 88 FORMAT (/1X,49H*** SRX10 ERROR NO. 1241 — INPUT ERROR IN C OR D,/ *1X, 116H*** INSUFFICIENT NUMBER OF FIVE-YEAR AGE GROUPS GIVEN. THE * FIRST SET MUST HAVE AT LEAST TWO ELEMENTS AND THE SECOND /,1X, *42H*** SET MUST HAVE AT LEAST FOUR ELEMENTS. ) 104 WKITE (NPRNT, 99) NWRIT 99 FORMAT(/,5X,21HSRX10 INPUT ARGUMENTS,/, 5X,8HNWRIT = ,11) WRITE(NPRNT,111) (C (I) ,1= 1, 17) 111 FORMAT (/,5X,4HC = , 10 (F8. 0, 3X) ,/, 9X, 7 (F8. 0, 3X) ) WRITE (NPRNT, 122) (D (I) , 1=1 , 17) 122 FORMAT(/,5X,4HD = , 1 (F8 . ,3X) ,/,9 X,7 (F8. ,3X) ) DO 105 1=1,17 105 S (I)=0.0 GO TO 1000 106 CONTINUE IF (NT) 108,108,35 107 CONTINUE IF (MT) 109,109,20 108 NT = I GO TO 35 109 MT = I GO TO 20 C c C SUBTRACT POPULATION BORN LURING SURVIVAL PERIOD c C 110 TB = TB - B (1) - B(2) C c c CALCULATE SURVIVAL RATIOS c C IF( NWRIT - 1 ) 114,114,112 112 NWRIT = 1 114 DO 160 I = 1,M S (I) = TB / TA IF( S (I) - 0.0 ) 120,120,140 120 CONTINUE IF( NWRIT - 2 ) 130,150,150 130 NWRIT = NWRIT + 2 140 CONTINUE IF( S(I) - 1.0 ) 150,150,120 150 TA = TA - A (I) 160 TB = TB - B ( I ♦ 2 ) C c C PRINT RESULTS IF NWRIT IS NOT EQUAL TO ZERO c . c IF( NWRIT - 1 ) 1000,170,180 170 WRITE (NPRNT, 222) 222 FORMAT (/, 1 1X,48HSURVIVORSHIP AGE X AND DVER TO AGE X*10 AND OVER, *//,4X,4HAGES,3X,14H1ST POPULATION, 5X, 4 HAGES, 3X, 14 H2ND POPULATION, *3X,4HAGES,3X,14HSURVIVAL RATIO,/) GO TO 190 180 WRITE (NPRNT, 333) 333 FORMAT (/26X,24HTEN-YEAR SURVIVAL RATIOS,//, 1X , 120H**** WARNING: TH *E FOLLOWING SURVIVAL RATIOS CONTAIN VALUES LESS THAN ZERO AND/OR G *REATER THAN ONE, INDICATING POPULATION,/, 1X,32HDISTRIBUTION ERROR 524 DOCUMENTATION *OR MIGRATION. ,//,4X, 4HAGES, 3X, 14H1ST POPULATION, 5X, 4HAGES, 3X, 1 4 *H2ND POPULATION, 3X, 4HAGES, 3X, 1 4HSURVIVAL RATIO,/) 190 L = M - 1 DO 200 I = 1,L J = 5 * ( I - 1 ) JJ = J + 10 K = J + 4 KK = K + 10 200 WRITE (NPRNT, 444) J, K, A (I) , JJ, KK, B (1+2) , J, S (I) 444 F0RMAT(1X,2 (I3,2H -,I 3, 1X, F 14. 0, 3X) , 13, 2H +,2X,F11.5) J = J + 5 JJ = J + 10 WRITE (NPRNT, 555) J,A(H) ,JJ,B(M+2) ,J,S(M) 555 FORMAT (1X,2 (I3,2H + , 4X , F 14. 0, 3X) , 13, 2H +,2X,F11.5) 1000 RETURN END SRX10 525 s o o- m S d- u-> S £ r» vS o- c J~ o- £ S — OS Ol s io Oi E f; o O *• E m *- r; s i*\ o- o- s «o CJ- s " — -~ — £ — . — JC 5 z ; 2 " " £ CM o U"l " CM >o !^ g *• r^ O- ^ O- o» " g cs- m Oi s — ■ Cll S S o o~ » s * r»- s s vS OJ f\ s vS rr» s I— co" s — . CJ Ol s — CM s u> •J3 s s s s 3 (-- r^ — 3 m — •9 2 r~- Oo vS 3 S O vS r^ s o t- S CT» OJ OJ oi s CM CM s S s s K K K S v* o OJ O o s vS o S E *- o * o 1- CM i- S s r> e» o o v» s IA vB s s o i- CJ o- <*\ V9 l*> K Si *• K-l — — - OJ 2 i- CM S 3 CM fT» f» $ 7, S s S 5 ? 3 3 CO lO vS OO OO 3 CM OJ oo 3 5 O rf» i- vl> d- Q MO o- d- 5 3 o t*- *- v£ O *•> S CM o tO 3 s 1^ o~ r- r- O- tr» S vS — . 1*1 3 * o- r- — o — CO 3 CO r~- CO 3 5 — CM fO O «<^ 3 CM rr> 3 v 3 5 3 o 2 3 3 * r- vS vS »- OJ M CM 3 © in CM 3 S! o- m vS VJ> VO S — CM in 3 O o in o ~- ~- f» S lf> CM «% S R vfi m o — 00 O K f»V m o s S el- OJ m u-> rrv z r^ £ f<% «o r~- •J> s - IT» * Ul *- £ m i- s ' •> U 2 s Co M 2 s — O Co o CO CJ> i^- r-. £ d- ±- r- »- s s + tn — vS OJ o «*> CO S l~» m o- f*> a s >< o- *■ co Oj CO CO o~ S tr> o CO o- s s CO — (^ rr> Q. u> sS z S rr> if> m O s s uj r^ :J- OO v9 r> l> vS M ™ iO o l*> — S5 w> u-i — s s tc GZ Ul <*> s !C U> •> ~ s S o OJ 1^ t«> — CO OJ H S GO in CO CM 5 S t- O d- CO ~- UJ o o- t- s CM O O O- s 3 * vS o~ OJ U) vS vS cc s 0° CM vS 19 J^ 3 ■t- — r- oo o ar Ol r<^ o ~ 0r- Ol CM rr> rs S x o in OJ o- — or- Ul s r~ \S — O- s 2 i- N u. •>• z s i r— 2 2 Ul o s 2 £ CO cc J3_ - 2 a: vS O- Lft -~ cr d- CO s vS — *• O 2 2 t** m 0=> OJ Ul 1^ o- ac 2 CM o- r^ o~ 2 2 UJ O- ro in CO Gl * — o 2 o m d- — Z 2 -t 0» OJ o o 5 o m z 2 v» *- o m 2 2 a: o- oa u> OJ 3 l«^ OJ rs 2 0» oo IT> CM 2 a 2 ITl CP — 2 oo — a. a in CO — 2 s CO 2 2 ~ ex: 2 >-« « M O- io «* £ . o- IS m r<-> . i« z vS o- »^- 1*- o — CP •~ V9 f-. — oo - X. LU — *■ QO *- e: s- f> o- cr o J- i- rr> o- ^. »• :> \» i> o- fO o 0o vS :t- o "> CO m vS * n ■» Z> v» o O U-> or i- r- vr> ts: « *■ O f>- m » *> o r- — O — e: — cx- — G: -, r>- — ■ o- — m N CO — ~ Ul -~ Ul ~ — ov - — — - o - w a O I o to •o c <-vj k a co •» c <*> -js o CO -c k 4- w to CO S v3 to k a to "0 c CM w a to C k a CO c a to wo -J to k a to k to CM 1? o to ■a ~8 k « to w ■•- ) >»_ 1— Ul Ul « i— UJ CO ■* 526 DOCUMENTATION H 03 f-OTOO***>N(N(J>d , OOW > <7><7>o>coaooocoi— (■"■^voin^-i'icN h ••••••••••••••• > ooooooooooooooo 03 s in 05 W 10 + + 4. + + + + + + + + + ++ + > M o is oinoinoinomotoomoioo Q z •4 O H O 5iOO*OOMAlD*OON(NrOO X «* !?(DO>aO0M/>(DSajN(Nr- IS 0» r>in-^-f r )ro to T-^.(N(N(V)f»)iJ•a■ln»f(^ovo^~•^ , ■ © Q W t- Z O I I I I I I I I I I I I I I ♦ rtj m*' _ cT> O x to i-i \©oo*-co'"'Ocr©tNvoM3r^cNr^'~tN Eh os o voaivor«- o « -P > < iq H as h lO i- hJ E> 10 ■4 10 i- z w W O I I I I I I I I I I I I I I + > «S o oioomoinoinomoinoino SRX10 527 a 55 o u a to w aa EH m cn cn a- 1/1 3- CT\ in M If) -3- on CT\ Q ss O to Eh SS w m CN t- oo fN in 0> r- oo EH W w vO co VD O a a m vO no CD 00 vO © r» fN CM o o « vo t» oo «J fN 33 m EH to O B • • o o • • CO o EH ■* M oo to 00 H oo to « H h • • • • W o o fN © a in H oo © • * a cq > H Q tfl • • o o • * CQ tO Cn ro O ft" 00 Cn a in vo o o p» SO « in»- O SS U5 H • SS P4 tO H O EH X W T- cj> ft. W 03 as > a to HMO a. o-. pm O i • • • * O 1 P* H o © a- o PS O to to r» cn (9 =r 03 w H S3 © m W CN W ^ cq 00 fN U> «~ CQ « oo «- «* « EH b Eh Pk O SB 03 M O X w Ml to EH =» • • • t 00 03 ss «s EH cn © in ro •o M O M ao S so T- 00 c ffl « H ft. r— St oo en CM B HUE) SS 00 VO it O « H tO H II s* r» m SS Pn S r en ^* OhB O EH SB r- O ^" H H X tO EH a » w 04 03 03 EK II II « tO H tO to SS (J a O « # * * « # # # H * * * EH pq (0 <4 a U SS b a. CO 03 O 03 03 pq o EH -) a O cq 03 o =3 <« a EH to to cq ►J to to 03 03 O « -6 u 2 as o pq H a eh H 4 H J pq a SS O M ft. as pq o a ca EH « EH a w a. a a o H h • O I cq cn a =t ^ fN «« «- > . M O EH a << H 03 Q o pq a a a oo pq H EH © a r- H IX a a to «« # * # » # # ^> © © O fN * m V£> vo m » fN rsi on OS) fN 03 © in cn sr fN © 00 VO »- oo oo r« 00 CN oo o in CN O r- cn in in tN 00 oo in o 00 oo p» 00 3 to H a a a a cs 03 EH O ft. r- a H II © EH T- H m a a a to a r- in oo © oo m cn si- 00 a m cn o 00 CN cn cn r» vo i VO •" fN en © in vo * a a m cn vo vo o ® in sf o l> r- en oo a cn in vo i-» vo in »- oo cn O cn VO vo on oo v cn u- o O Cn sr «- © in oo cn CO f" in oo t- a oo cn vo ^ o in cn r- SURVI I. DESCRIPTION OF PROGRAM A. PURPOSE To calculate survival rates by 5-year age groups from two populations enumerated or estimated 5, 10, or 15 years apart. B. DATA NEEDED 1. An indicator denoting the time period between the two population distributions - they must be 5, 10, or 15 years apart. 2. The population distribution in 5-year age groups for the earlier year. 3. The population distribution in 5-year age groups for the later year. II. METHODOLOGY A. MATHEMATICAL DERIVATION The survival rate for each 5-year age group for a period of i years is pt+i s t,t+i _ 5rt 5 x t 5 x where ,P is the population of age x to x + 5 at year t i is either 5, 10, or 15 years. For the open-ended age group, the survival rate is calculated as pt+i s t,t+i _ x+i+ x+ pt x+ where x+ is the open-ended age group age x and over. All other symbols represent the same concept as above. B. COMMENTS The survival rates for this subroutine are calculated from population distributions in two different censuses, the survival rates calculated pertain to the time interval between the two censuses. III. MAIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 529 530 DOCUMENTATION 1. CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. The form of the CALL statement for this subroutine is as follows: CALL SURVI(C,D,KT,NWRIT,S) For the purpose of emphasizing the input arguments, they are under- lined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name must be dimensioned in the main program as the same size or qreater than the variable name is dimensioned in any subroutine called by the main program. For this subroutine the variables C and D in the argument string are arrays. The following dimension statement must be included in any main program using this subroutine: DIMENSION C(17) ,D(17) B. OTHER SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be included in order to run this subroutine. These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1. Subroutines and functions from this package None 2. Library functions None 3. Card diagram of main program, subroutines, and functions. / / / CARDS INDICATING END OF DECK / / INPUT DATA / | /___ / I / /I I / / COMPUTER CONTROL CARDS t SUBROUTINE SURVI /. / / / MAIN PROGRAM / I I/ / /I I / COMPUTER CONTROL CARDS / \ | / ./I I/ I / /I I / / I I / /I I / /I I / __/ I I/ /I I / /I 1 / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format requirements for the main program included with this publication are as given below. The data should be punched in the columns SURVI 531 specified. For a more detailed description of the input data, see the description of arquments in section IV. B. See example, section V.C. Variable Card Columns Name Definition I 1 I 1 I I 2-53 I I 54-80 | 1-80 (3 5 1-8 I 9-16 7 2-80 1-8 9-16 49-56 57-80 NXT NWRIT KT Blank Label used to identify the output Blank The code indicating if there is another data set following this one. A zero punched in column 1 indicates this is the last set of data. Any other digit punched in column 1 indicates that another set of data follows this one. The write indicator. If a zero punched in column 2 means the results of the subroutine SURVI will not be written out. Any other number punched in column 2 will cause the subroutine SURVI to write out the results of its calculations. Indicates the time interval between the two population distributions. A one punched in column 3 indicates 5-year survival rates are to be calculated. A two punched in column 3 indicates 10-year survival rates are to be calculated. A three punched in column 3 indicates 15-year survival rates will be calculated. Any other number punched in column 3 is considered a mistake and 10-year survival rates will be calculated. Blank The population 0-4 for the earlier year. The number should end in column 8. The population 5-9 for the earlier year. The number should end in column 16. The population 45-49 for the earlier year, The number should end in column 80. The population 50-54 for the earlier year, The number should end in column 8. The population 55-59 for the earlier year, The number should end in column 16. The open-ended population 80+ for the earlier year. The number should end in column 56. Blank The variable C always requires two cards. The first card (card no. 3) must always contain data, whereas the second card (card no. 4) can be all zeroes depending on the number of age groups given. The last age group must always be the open-ended age group. I I 1-8 |D |The population 0-4 for the later year. ! | The number should end in column 8. I I 532 DOCUMENTATION 9-16 72-80 1-8 9-16 49-56 57-80 |The population 5-9 for the later year, I The number should end in column 16. I The population 45-49 for the later year. ! The number should end in column 80. |The population 50-54 for the later year. |The number should end in column 8. I I The population 55-59 for the later year. The I number should end in column 16. |The open-ended population 80+ for the later | year. The number should end in column 56. I I Blank The variable D always requires two cards. The first card (card no. 5) must always contain data, whereas the second card (card no. 6) can be all zeroes depending on the number of age groups given. The last age group must always be the open-ended age group. IV. SUBROUTINE A. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE SURVI (C,D, KT, NHRIT, S) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition KT NHRIT Transferred In Transferred In Transferred In Transferred In The population distribution in 5-year age groups for the first or earlier time period. There can be a maximum of 17 5-year age groups and a minimum of two 5-year age groups. If less than two 5-year age groups are given, the subroutine will write out error number 1271 and return to the calling program. The population distribution in 5-year age groups for the second or later time period. There can be a maximum of 17 5-year age groups and a minimum cf four 5-year age groups. If less than four 5-year age groups are given, the subroutine will write out error number 1271 and return to the calling program. The code for the time interval between the two censuses or surveys. It must be 1 for 5 years, 2 for 10 years, or 3 for 15 years. If KT has any value other than 1, 2, or 3, the subroutine will assume a difference of 10 years and compute the survival rates for 10 years apart. The write indicator which determines whether the subroutine will write out the results of its calculations. If NHRIT is zero, the subroutine will not write out the results of its cal- culations. For any other value, the SURVI 533 | subroutine will write out the results |o£ its calculations. I Transferred Out|The calculated 5? 10- or 15~year Isurvival rates for 5-year |age groups. C. ERROR MESSAGES 1271 *** SURVI ERROR NO. 1271 -- INPUT ERROR IN C OR D *** INSUFFICIENT NUMBER OF FIVE-YEAR AGE GROUPS GIVEN FOR TIME INTERVAL CODE. THE FIRST POPULATION MUST HAVE AT LEAST *** 2 AGE GROUPS ANJ) THE SECOND MUST HAVE AT LEAST H AGE GROUPS. V. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM MAIN PROGRAM FOR SURVI THIS PROGRAM USES A SET OF DATA CARDS WHICH IS READ IN FOUR READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ STATEMENTS AS FOLLOWS. THE FIRST READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE FIRST READ STATEMENT IS TO READ THE LABEL TO BE USED TO IDENTIFY THE OUTPUT. THE LABEL MOULD USUALLY CONTAIN THE NAME OF THE COUNTRY OR AREA WHOSE DATA ARE BEING ANALYZED AND GIVE SOME INDICATION AS TO THE TYPE OF DATA OR THE TYPE OF ANALYSIS THAT IS BEING DONE. THIS LABEL IS LOCATED IN COLUMNS 2-53 OF THIS CARD. THE SECOND READ STATEMENT USES ONE DATA CARD. THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ (1)THE INDICATOR (NXT) USED TO SIGNAL IF THERE IS ANOTHER DATA SET FOLLOWING THIS ONE, (2) THE WRITE INDICATOR (NWRIT) WHICH DETERMINES WHETHER THE RESULTS OF THE SUBROUTINE SURVI SHOULD BE WRITTEN OUT, AND (3) THE SURVIVORSHIP INDICATOR (KT) WHICH IS USED TO DENOTE WHETHER FIVE, TEN, OR FIFTEEN YEAR SURVIVORSHIP RATIOS ARE TO BE CALCULATED. NXT IS IN COLUMN 1 OF THIS CARD. A ZERO PUNCHED IN COLUMN 1 INDICATES THIS IS THE LAST DATA SET. ANY OTHER NUMBER PUNCHED IN COLUMN 1 INDICATES THERE IS ANOTHER SET OF DATA FOLLOWING THIS ONE. NWRIT IS IN COLUMN 2 OF THIS CARD. A ZERO PUNCHED IN COLUMN 2 INDICATES THAT THE RESULTS OF THE SUBROUTINE SURVI ARE NOT TO BE PRINTED OUT. IF ANY OTHER DIGIT IS PUNCHED IN COLUMN 2 THE RESULTS OF THE SUBROUTINE SURVI WILL BE PRINTED OUT. KT IS IN COLUMN 3 OF THIS CARD. A ONE PUNCHED IN COLUMN 3 INDICATES THAT FIVE YEAR SURVIVORSHIP RATIOS ARE TO BE CALCULATED, A TWO PUNCHED IN COLUMN 3 INDICATES THAT TEN YEAR SURVIVAL RATES ARE TO BE CALCULATED, A THREE PUNCHED IN COLUMN 3 INDICATES THAT FIFTEEN YEAR SURVIVORSHIP RATIOS ARE TO BE CALCULATED. ANY OTHER DIGIT PUNCHED IN COLUMN 3 WILL BE TAKEN TO EE A MISTAKE AND TEN YEAR SURVIVAL RATES WILL BE CALCULATED. THE PURPOSE OF THE THIRD READ STATEMENT IS TO READ IN THE FIVE YEAR POPULATION AGE GROUPS (C) CORRESPONDING TO THE EARLIER TIME PERIOD. C VALUES ARE CONTAINED ON TWO CARDS. FOR EACH C VALUE EIGHT COLUMNS ARE ALLOWED STARTING WITH THE FIRST EIGHT COLUMNS OF THE FIRST CARD. A MAXIMUM OF TEN C VALUES CAN APPEAR ON THE FIRST CARD SO THAT THE VALUES END IN COLUMNS 8, 16, 24,. ..,72, AND 80. THE SECOND CARD CONTAINS SEVEN C VALUES AND THE VALUES SHOULD BE ENTERED THE SAME AS ON THE FIRST CARD EXCEPT THAT THE LAST VALUE ON THE SECOND CARD WILL END IN COLUMN 56. IF LESS THAN SEVENTEEN VALUES ARE TO BE GIVEN, BOTH CARDS MUST STILL BE USED WITH DATA ONLY IN THE NUMBER OF COLUMNS NECESSARY FOR THE NUMBER OF C VALUES GIVEN. 534 DOCUMENTATION C— — THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE FIVE C- YEAH POPULATION AGE GROUPS (D) CORRESPONDING TO THE LATER TIME C— — PERIOD. c D VALUES ARE CONTAINED ON TWO CARDS AND HAVE THE SAME c _____ REQUIREMENTS AS C VALUES. c _- . . ___ c ___ — _„ _ ,_________„ — __ ____ __ DIMENSION C(17) ,D(17) ,SS (16) NPRNT = 15 NREAD = 1 10 READ(NREAD,11) 11 F0RMAT(1X,52H READ(NREAD,22) NXT,NWRIT,KT 22 FORMAT (311) R£AD(NREAD,33) (C (I) , 1=1 , 1 7) 33 FORMAT(10F8.0) READ(NREAD,33) (D (I) , 1=1 , 17) WRITE (NPRNT, 44) 44 FORMAT (1H1) WRITE (NPRNT,11) CALL SURVI (C,D,KT, NWRIT, SS) IF (NXT) 10,20,10 20 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE SURVI (C,D, KT, NWRIT, S) £_________. _______ __„,______. C __. _ _ ___. C— PROGRAM NO. 1270 --- ________ — . _ ____„___. C— C, D, KT, AND NHRIT ARE ALL INPUT ARGUMENTS. C _. s Is AN OUTPUT ARGUMENT. c __ c IS THE POPULATION DISTRIBUTION IN FIVE YEAR AGE GROUPS FOR THE c EARLIER TIME PERIOD. c _. D IS THE POPULATION DISTRIBUTION IN FIVE YEAR AGE GROUPS FOR THE c „„,__ LATER TIME PERIOD. c _„___ Kr INDICATES WHETHER FIVE, TEN OR FIFTEEN YEAR SURVIVORSHIP --. RATIOS ARE TO BE CALCULATED. C- NWRIT IS THE WRITE INDICATOR WHICH DETERMINES WHETHER THE C- RESULTS OF THIS SUBROUTINE ARE TO BE PRINTED OUT. C- S IS THE SURVIVORSHIP RATIOS FOR FIVE YEAR AGE GROUPS. C-- DIMENSION C (17) , D(17), S(16), A(17), B(17) M = N = NPRNT = 15 MT = NT = C- ARRAYS A AND B ARE USED FOR CALCULATING PURPOSES SO THAT THE c INPUT ARRAYS WILL NOT BE ALTERED. C c ___ C CHECK INPUT FOR ERRORS DO 40 I = 1,17 IF( C(I)-.0001 ) 147,147,10 10 M = M + 1 20 A(I) = C(I) IF( D(I)-.0001 ) 146,146,30 30 N = N + 1 35 B(I) = D(I) 40 CONTINUE IF( NWRIT ) 50,60,50 50 NWRIT = 1 60 CONTINUE SURVI 535 IF (NT) 62,63,62 62 CONTINUE IF (N-(NT-1) )300,63,300 63 CONTINUE IF (MT) 64,65,61 64 CONTINUE IF (M-(MT-1)) 300,65,300 65 CONTINUE IF( KT-1 ) 80,110,70 70 CONTINUE IF( KT-3 ) 110,110,80 80 CONTINUE IF( NWSIT-1 ) 90,100,90 90 NWRIT = 1 100 WRITE (NPRNT, 222) KT 222 FORMAT (/1X,90H**** WARNING: THE CODE GIVEN FOR THE TIME DIFFERENCE * BETWEEN THE TWO GIVEN POPULATIONS IS , 11 , /, 1 X, 89H*** BUT MUST BE *1, 2, OR 3 CORRESPONDING TO A 5, 10, OR 15 YEAR DIFFERENCE, RESPEC *TIVELY. ,/,lX,46H*** A TIME DIFFERENCE OF TEN YEARS IS ASSUMED.,//) KT = 2 110 CONTINUE IF( N-KT-2 ) 120,150, 150 120 CONTINUE IF( NWRIT-1 ) 130,140,130 130 NWRIT = 1 140 K = KT + 2 WRITE (NPRNT, 333) KT,K 333 FORMAT (/,1X,49H*** SURVI ERROR NO. 1271 — INPUT ERROR IN C OR D, */, 1X, 79H*** INSUFFICIENT NUMBER OF FIVE-YEAR AGE GROUPS GIVEN. FO *R TIME INTERVAL CODE ,I1,40H THE FIRST POPULATION MUST HAVE AT LEA *ST,/, 1X,51H*** 2 AGE GROUPS AND THE SECOND MUST HAVE AT LEAST , *I2, 12H AGE GROUPS.) GO TO 305 146 CONTINUE IF (NT) 148,148,35 147 CONTINUE IF (MT) 149,149,20 148 NT =1 GO TO 35 149 BT - I GO TO 20 C c C — --- ADJUST AGE DISTRIBUTIONS TO CORRESPONDING SIZES c C 150 CONTINUE IF( M+KT-N ) 190,220,160 160 MM = M M = N - KT IF( M-2 ) 120,170,170 170 L = M + 1 DO 180 I = L,MM 180 A(M) = A(M) + A(I) GO TO 220 190 CONTINUE IF( M-2 ) 120,200,200 200 K = M + KT L = K + 1 DO 210 I = L,N 210 B(K) = B (K) + B(I) C c C CALCULATE SURVIVAL RATIOS c C 220 DO 240 I = 1,M J = I + KT S(I) = B(J) / A (I) IF( S(I) - 1 ) 240,240,230 230 NWRIT = 3 240 CONTINUE C c C CHECK FOR RATIOS GREATER THAN ONE c c 536 DOCUMENTATION IF( NHRIT- 2 ) 270,260,260 260 NRITE(NPSNT,444) 4I»4 F0RMAT(/, 1X,119H*** NOTE: THESE SURVIVAL RATIOS CONTAIN VALUES GRE *ATER THAN ONE, INDICATING IMMIGRATION OR POSSIBLE DISTRIBUTION ERR ♦OR. ,/) GO TO 280 C c . _ C PRINT OUTPUT RESULTS IF REQUESTED BY NHRIT FLAG OR IF ANY ERROR C HAS FOUND. c C 270 CONTINUE IF{ NHRIT ) 280,1000,280 28 J = 5 * KT HRITE(NPRNT,555) J 555 FORMAT(/52X,I3,23H - YEAR SURVIVAL RATIOS, //, 30X ,4HAGES, 3X, 14H1ST ♦POPULATION, 5X,4HAGES,3X, 1UH2ND POPULAT ION, 5X, PHAGES ,4X, 1UHSURVIVAL * RATIO,/) L = M - 1 DO 290 I = 1,L J = 5 * ( 1-1 ) JJ = J + 5 * KT K = J + 4 KK = JJ + 4 MM = I ♦ KT 290 HRITE (NPRNT,666) J,K,A(I) , JJ,KK,B(M(1) ,J,K,S(I) 666 FORMAT(27X,2(I3,2H -,I3, 1X,F14. 0, 3X) ,13 ,2H -, 13, 2X, F1 1 . 5) J = J + 5 K = J + 5 * KT MM = M + KT HRITE (NPRNT,777) J,A(M) ,K,B(MM) ,J,S (M) 777 F0RMAT(27X,2(I3,2H +, 4X, F14. 0, 3X) , 13, 2H +,5X,F11.5) GO TO 1000 300 HRITE (NPRNT, 888) 888 F0RMAT(/,1X,49H*** SURVI ERROR NO. 1272 — INPUT ERROR IN C OR D, *Z,1X,101H*** ONE OF THE FIVE YEAR AGE GROUPS IS LESS THAN ZERO OR *AN INTERMEDIATE FIVE YEAR AGE GROUP IS ZERO.) 305 DO 310 I =1,16 310 S(I) =0.0 HRITE(NPRNT,999) (C (I) ,1=1, 17) 999 F0RMAT(/,5X,18HSURVI INPUT VALUES, /, 5X, 4HC = , 10 (F8. 0,3X) ,/,9X, * 7 (F8.0,3X) ) HRITE(NPRNT,1111) (D (I) ,1=1 ,17) 1111 F0RMAT(/,5X,4HD = , 1 (F8 . 0,3X) ,/,9 X,7 (F8. , 3X) ) 1000 RETURN END SURVI 537 r— or O LU -J Q. £ tr CO o s Q o-. > 1ft S *- 3- m s 2 r* VS * o> K *- 3- o» 2 S — 0» tr» OJ S trv in OJ 2 s sS © u-t 4- C ir. to 3~ K £ fO rj~ rf» o- S ro ro 0> S " — — . — — ^? — — — £ ; S 5 2 " " £ CO o OJ in S OJ OJ m C c 3- r* o- o» ^ 0- O o> [J e 0- »0 — OJ g ~ "» OJ s vS 0- ^> r- ■* *■ J- 1^ s s vS OJ 0) «\ 2 v9 vS ro s 5 -«. CVJ — OJ S — — OJ s s s r- Oo "> sS S K% t»v vS S 1? o- tt» l*» 0» 2 ro ro 00 S s CVl Oa fO vS S ro ro. s9 s s Cs v* o h- a» O O N s s CO cy OJ CJ r s" OJ OJ OJ a s s s s r £ K s VS o <\j O vS o s vS ^S O s s i- © :*- O OJ 3» OJ OJ 3- £ s r- do O o m v* s Wv in s» T 3 o 3- OJ »» to v£ to w vS) vS ro s £ 3- ro — — a: *- CO sf i- 3- OJ Si 3 OJ fTk 1- OJ m s OJ OJ ••o s s z s s 3 -1 V 3 3 OO to vS oo OJ OJ oo $ CM <\» OJ OJ 00 3 3 vS ro i- v* CVJ m o- 3- 5 »o O- to 0- i- 3 3 o r-» dh v9 o OJ o irt » OJ O OJ rO 3 3 r^ o- l*s N» o- Ci vS — w> « M) ~- vj> — ro ¥ j o» f~ — vS — r- Oo f- o» 3 0» r- CO r^ 00 3 3 -— CM m o- 0J m D 3 OJ OJ ro 3 § — 5 5! s © Z 5 ; 3 J- vS vS o- OJ © o T» OJ M § O tO 10 OJ 3 S or- in sft O (- ~ OJ lr» S ~ rvi OJ u-> <7> s © o to O -~ LT> OJ IT> rr> S 10 OJ m OJ ro s is v» •O O — Oo © l»> m O s to us ro to O ft s o» OJ rO in «% i*v rr, r~- ■2 s "O <>o to «o r-~ s s — •O 3- o- ff» *- UJ s rr» ro a- £ V ~ > ^ 3 " © *-* a s — © O © 00 O *- *• r«- t^. tD n 3- *- 3- 3- r^ f-~ 5; a -t if* ■— vS o» — r» m O- fO s r^- lr> O r^ to i>- ro " s X o- *■ Oo OJ + ro o Oa 0- v> s ro O ro O 00 Q~ ° a oo — r*. «■> X ro m lf> \3 a. s <•«•> to z ro to u-> t$> s s iu r- 3- Oo ^3 «~ *• r^ vS s o~ 3- H o~ 3- r- vi) s a IS rO m © rc» m — R T, ro m — R s a: 1- « S tu lO IC to s > 2 s o oj r- «% -. •»- Oo m 0> OJ & 00 tn 00 H CO tn 00 OJ S s r- O 3- Do — X OJ o o o> Ul a OJ O O H OJ <3- S Si * vS o- OJ 0» OJ N» vS ts a 00 OJ >9 «t 0O OJ v» vj> Si s + — r- Oo O 1U o OJ Ol i>r> er a 0> OJ OJ ts O- OJ OJ ro a s X vS in OJ o- to r~ vS ~» 0- s (^ v» ~ UJ r-~ vS — 0- s 2 * t^ OC 3- r- u. 2 a- r» Z 1 r- 2 a UJ O 00 2 s o v> - — U4 vS ~- *- O CJ: s vS — 3- vS — 3- © o> - ro LO 0» OJ -J OJ o- r- 0- m 2 OI 0- r-- 3: OJ cr- r^ «3- 2 _2j at O- ro ir> Oo or o m i- — CO s O u> 3- O in 3- — 2 S -i 0» OJ © O £ vS 3- o u> s s ^ 3- Z vS 3- m 2 £ cr a- Oo Ln OJ Ul Oo o» »«» OJ ;* r H OO 00 rO Zl 0O CP ro OJ 2 z £ u> Oo — it- in OO — z 3 m 00 a. tr, Oo — 2 s S to 2 o, e: er z m i-< a. - H OJ O 0» >*J M O- sS ir> *o> - ►. z vS o- r^ r» 2 o (^ — 00 - vS r^ — vS r~ — 00 ~ ■* LU — 3- o» i- UJ d- i- rO O- er » 3- > fO Or 3- 3- ■^ 0- m m > nS r- o- ro i» o<» ur» vS. 4- ll o» tr» vi> O 00 LO sS 3- ^ <• rs vS o o to => *• o r- IT> cc h " 3- O r~- ex 3- O r- tr> -. o, o ~. 1^ ~- o ■— O u-> h~ — o- — csr ** r^ — 0- ct f>- 0- — „ ~ to — — to — LU ^, — UJ — rsi d -~ — - — - O 4. -8 « o ■« c OJ V O i. <0 cS *- o O o -8 w CI O ■• c o "E a o -5 € ir» 1. a 10 j a lO c V / I. ef CJ t a «o •w c OJ O V, t 9 CJ £ 3- k CJ 1 ■X ■»- CJ) / U4 CO ■V UJ ■JJ «o 538 DOCUMENTATION 05 o « OS w o M EH H at EH to 1-4 a w 03 H to to o o E-l •4 « a> el r» co ao vio «— r- r\ir» r-T-»-r-r-»-T-r-^^t-T-T-000 H O to 3= o H H «S 03 IS M a M H EH o H Q to W a W 53 O 55 -a 33 H 03 W H «B M 03 tS 10 o w !■»• D ON »J *" <4 > o EH 5S O S VO H E-l H S + > o X 03 EH s W M 69 to HH w CJ> Cu •4 w » +.' to •e (0 W M CO r- hJ tn < EH B • • • a 05 H H EH 55 O W SB > D # O * (A * to o SB H o FH M •4 EH 03 < ■-1 ■-9 Q •4! 1^ > o H CU > « Q S SB to tf1 | " v J<7!^O< T )r-r- I i i I I I I . I I I I I I I I + moinoinoinoinomoinoiflo T-T-' ,r l3-^ , Lf)lO\O , Xir~|-»C0 (Nio(No^oaovor-orMvx>vor»r>»f»i-ocN "jo^vor^tNt-srovofiOGom^roin Mn » ff) 01 (N r^ (N <- i- r- I i i I I I I I I I I I 1 + omoinoifioinomoinoinoi/i SURVI 539 to 33 H i-i CN O CTl o H O (Ti ♦ X o E-» ♦ M C3 < co w >-4 s o to in CO • M X 1-4 CO w 2 > O H H EH H U «fl 04 i-l o< =S CO a, as O 05 a, w u > iB H M O M W O fc, 3* fe EH H a w 33 03 Eh "> W a iw w m OB T- EH W 03 CO O w » u o a «- w 03 » w m Cu «S Q H "4 Q O JC Eh E> W CO 9B CD CO m as ■* EH M Q CO W SB M BJ O H t* CO CO 03 « :y H O zuz W W > <0 Eh H O 03 PM o o w Q »&1 O > 03 =) CO 03 < w x i o O H EH «S 03 .-5 £> H > U3 B CO CO CJ •a z o M Eh «a ►-5 o Qi Q CN 3 o M < o o EH CO CO W CJ CT|(NLn* _ ^CT*^5in« — t- 00 00 o i"" (s ui * r- mmcTikOtNao NINO^OMNinclflflOOl l/|00'Dt^l~ 1 OiOW*NCBin O>C?\cy*C7*afc'J\C7>Cr»CT»00C^ail ,r l vOC0f T )r*)io00CNCT»in<"vlcT<,o |>in*rnf01N(Nr-T- r- IfCM^'CTia'CTl^CT'jrCft.* r-f-tNINfOfl^^mcn* I I I I I I I I I I I + omoinomomomoin CT<^£)CO^ , 0a-r~vf) aovoo^tn^ovon^-inmco t*in3-' T »( r )(N'\HNlr-T-r-fN a-cn^-c^^cn^-cTi^-cTva- i i i i i i i i i i i + ouioinomoKioifloin i-<-(n n n m 3 s in in 540 DOCUMENTATION a- J/ m m co * m ■* on m CN m .* CO on M to 3 SB O M EH < -3 a- cn m o\ ON • T— CN o J* r~ 03 NO co fa r- CN IS5 EH w V) M CO fa > H O 10 fa 3 O « is fa u < fa O 03 W OQ B 3 H « O OS Q3 fa en . M >h 10 w as > O H H EH E-I U < w a to fa oq O 03 fa as rq w u > as H M CJ « W O fa 3 fa En H a w 33 PS EH < fa SS >H w fa in 3c t- H fa 03 oa o w «. o © Z r- W Q3 » fa m fa q o a En 3 fa (O S C5 to h as < EH M Q to waH aa o fcH 111 to to 03 03 fa «* O 03 fa fa P3 (M O ss u as w w > n eh H tS 03 fa O O M Q »W O M U o as »fa M <~ « 33 W EH W fa CQ fa * • H UhQ B5 to H 3 fa BEE 03 H «! Eh EH at 3 * * # * * » » * * * o fa EH to 03 H fa fa 33 EH ■4 Q O U ►J < t> 03 fa EH as w to a fa H 3 H O 03 03 C9 O fa fa ID «i as a- fa > H Eh Q UM «1 B3 lO fa O fa t-q 3 U O Eh 03 «S 2S O m fa w > 03 U) «* o «: 3d 03 C3 03 Eh fa O to fa 3 HXS 3 I fa fa « SS > S3 H H O fa U I W I fa 10 O v m r- 03 as CN fa Eh r- cq C a • 3 ss O as «* ss EH to 03 55 fa O W 3 WHO 03 U 03 HHU fa H fa W > 3 t3 03 to <• 3 SS 10 H m m o rn in a> * co co in (N O CO CN CTi CN VO •" (N ON o m to CO CO w in 3 ►J > EH cr« ^O 3 \D t- Pj * ^ ss oo m HtfO H > 03 II 3 to L) o o o o o o CO o o CN ^- o o CO in o m on Oi ro ^ a ro VO o ro 00 03 CO ^> U O CN cn W ti) «] 03 • a • • H in v0 w a- CN > CN CO H fa fa EH • • ■ • i4 CN CN CO o H m o sr a CN o CO fa vO r* CO s CO r- CO 03 CN CO fa EH SS M 1 • • • as o in CN O «! T— CN m in CN rn 03 m m o o PI CO a- o 03 fa N Q • • • • SS St a- r- r- 03 < r> in CO O 33 CO o CO CJN Eh co m in vo U sr r- *& to CO in «- as to M fa i-J 03 o to • s • • 03 H co m CO CN 03 CN o © CM w to CO CN \0 NO fa cn CN CN <0 EH 3 !-» no r~ ON 3 O i r-« fa 03 u ss o H ss fa H 1 o • • • • 1 «« *c T- it © w CN O"! r~ on > (N 03 o m ^- 1- H r~ «l V43 * © m EH CN fa to CO CO CO CN «< f- lw fain CO r- U> 3 W • fa hI EH SS O > •u W SS H > to «< fa • • • • 03 EH 0> VO in co -a cc O fa 3 vo p> t- 00 ■P U 03 33 fa 3- sr CO ON 4- SS 03 EH as co m NO St 3 fa H ;* O r~ in Oh fa r*« T m Oi r- to H O H H > > S3 :8 fa 3 SS 03 II 3 II 03 v) o to u Q O 03 * * 03 # # H # * TWOCN I. DESCRIPTION OF PROG E AM A. PURPOSE To estimate the life expectancy at birth, crude birth rate, and crude death rate from two population distributions by 5-year aqe qroups. The enumeration dates must be 5, 10, or 15 years apart. B. DATA NEEDED 1. Sex of the population 2. The region from the Coale-Demeny model life tables to be used. 3. The number of years between the two census. 4. The aqe distribution of the population in the earlier census in 5-year aqe qroups. 5. The aqe distribution of the population in the later census in 5-year aqe qroups. 6. The code which indicates whether the results of the subroutine are to be written out. II. METHODOLOGY A. MATHEMATICAL DERIVATION The subroutine first makes four projections of the earlier population (at time t) to the date of the later census (at time t+i) by assuming life expectancies at birth of 20,40,60, and 80 years respectively, e p t+i _ p t # e t,t+i 5 x+i 5 x 5 x % Z . is the projected population in aqe qroup (x,x+5) 5 x+i at time t+i based on survival rates from a life table with a life expectancy at birth of e=20,40,60, or 80; 5 P X is the given earlier population in aqe qroup (x,x+5) at time t; and 5S X ' is the survival ratio from aqe qroup (x,x + 5) to aqe group (x+i,x+i+5) from a life table with life expectancy at birth of e. For each of these projected populations, the cumulative population age x and over is calculated, w "P^S E IP*"" 1 f°r*= i, i+5, ••', w Next, the cumulative population at aqe x and over for the given later population at time t+i is calculated. w p!! 1 = Z j t+± for x = if i+ 5, x+ Jrf c 5 x J-x,5 541 542 DOCUMENTATION Then for each cumulative aqe x and over a value of e is found such that e p t+i < p t+i < e+20 t+i x+ ~ x+ - x+ Finally, for each cumulative aqe x and over, the two projected popu- e_t+l e+20 T ,t+l t+i lations, ? x+ and P^ , and the actual population, P , are used to perform an iterativ<= process to estimate a life expectancy at birth for the i year period, pt+i _ e p t+i o3 _ o1 ,o2 o1x x+ x+ e e Ke V e+20 t+i _ e t+i x+ x+ ' 2 3 where e Q and e Q are life expectancies of e and e+20 respectively and e is the new estimated life expectancy at birth. Using survival rates from a life table with life expectancy at birth of 3 3„t+i e a projected population P^ is calculated and the following comparison is made, I x+ x+ I 3 If C < 1 , e is accepted as the estimate of life expectancy at birth con- 3 sistent with cumulative aqe x and over. If C > 1, e is substituted for o I 2 3 3 t+i either e or e (depending upon which is further from e ) and P , o o o x+ is substituted for the corresponding P , and the process is repeated until C < 1 . The value of e is then accepted as the estimate of life expectancy at birth. This procedure generates several life expectancies at birth - one for each cumulative population aged x and over. The median of the first nine life expectancies at birth is accepted as the estimated life expectancy at birth for the i year period. With the estimated life expectancy a model life table is generated and the central mortality rates are calculated. Hith them, the average crude death rate for the i year period is calculated as E ( C K ' r'\ l ; ' ,'".. 3 t pt+^ 5' /--^ / -111 ,-'■" - ■ x 5x 5 x W x=0,5 5 ^ where cin x is the central mortality rate of the life table. TWOCN 543 The rate of natural increase durinq the i year period is calculated as w E ' ., RNT,11) CALL TWOCN(NSEX,NREG,KT,PA,PB,NWRIT,E0,CBR,CDR) IF (NXT) 10,99,10 99 STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE TWOCN (NSEX , NREG , KT, PA, PB, NWRIT, XMEDN , CBE, CDR) c ,_ c _ C PROGRAM NO. 0700 c _ c C THE INPUT ARGUMENTS TO THIS SUBROUTINE ARE NSEX, NREG, KT, C PA, PB, AND NWRIT. C THE OUTPUT ARGUMENTS FROM THIS SUBROUTINE ARE XMEDN, CBR, AND C CDR. C NSEX IS A CODE INDICATING THE SEX OF THE LIFE TABLE POPULATION. C NREG IS A CODE INDICATING WHICH REGION FROM THE COALE-DEMENY c MODEL LIFE TABLE- SYSTEM IS BEING-USED. C KT IS A CODE INDICATING THE LENGTH OF THE INTERCENSAL PERIOD. c PA IS THE earlier POPULATION DISTRIBUTION. c pb IS THE LATER POPULATION DISTRIBUTION. C NWRIT IS THE CODE INDICATING WHETHER THE RESULTS OF THE SUBROU- C ARE TO BE PRINTED OUT. C EO IS THE MEDIAN OF THE FIRST NINE LIFE EXPECTANCIES AT BIRTH. C CBE IS THE INTERCENSAL CRUDE BIRTH RATE. C CDR IS THE INTERCENSAL CRUDE DEATH RATE c c DIMENSION CDMLT (18,8) ,CDLX ( 17) ,PX ( 17) , PA ( 17) , SX ( 17) , PCUMX (4, 1 7) DIMENSION PCUM(17) ,PB(17) ,PBX(17) ,E0(101) ,E0RD(101) ,XMX(17) EQUIVALENCE (CDMLT (2, 5) , CDLX (1) ) NPRNT=15 NERR = TWOCN 549 c C VEfiIFY INPUT ARGUMENTS c _ C IF (NSEX - 1) 15,20,10 10 CONTINUE IF (NSEX - 2) 20,20, 15 15 WRITE (NPRNT,16) 16 FORMAT (//48H *** TWOCN ERROR NO. 0701 -- INPUT ERROR IN NSEX, */,71H *** CODE INDICATING SEX OF THE LIFE TABLE POPULATION HUST BE * 1 OR 2) NERR = 1 20 CONTINUE IF (NREG - 1) 30,35,25 25 CONTINUE IF (NREG - 4) 35,35,30 30 WRITE (NPRNT, 31) 31 FORMAT (//48H *** TWOCN ERROR NO. 0702 -- INPUT ERROR IN NREG, */, 85H *** CODE INDICATING WHICH COALE-DEMENY REGION IS TO BE USED *MUST EQUAL 1, 2, 3, OR 4) NERB = 1 35 CONTINUE IF (KT - 1) 45,50,40 40 CONTINUE IF (KT - 3) 50,50,45 45 WRITE(NPRNT,46) 46 FORMAT (//46H *** TWOCN ERROR NO. 0703 -- INPUT ERROR IN KT,/ *,73H *** CODE INDICATING LENGTH OF INTERCENSAL PERIOD MUST BE BETW *EEN 1 AND 3) NERR = 1 GO TO 9000 50 DO 55 1=1,17 IF (PA (I) - 1.0) 60,55,55 55 CONTINUE M = 17 GO TO 80 60 CONTINUE M = I - 1 IF (I - 9) 75,75,65 65 DO 70 J=I,17 IP (ABS(PA(J)) - .000001) 70,70,75 70 CONTINUE GO TO 80 75 WRITE (NPRNT, 77) 77 FORMAT (//52H *** TWOCN ERROR NO. 0704 -- INPUT ERROR IN PA OR PB , */,97H *** EITHER THERE ARE TOO FEW AGE GROUPS IN PA OB PB , OR AT ♦LEAST ONE AGE GROUP IS LESS THAN 1.0,/,81H *** FOR KT = 1,2,3 THER *E MUST BE AT LEAST 10,11,12 AGE GROUPS RESPECTIVELY IN PB) NERR = 1 GO TO 9000 80 CONTINUE DO 85 1=1,17 IF (PB(I) - 1.0) 90,85,85 85 CONTINUE N = 17 GO TO 110 90 CONTINUE N = I - 1 IF (I- (9+KT)) 75,75,95 95 DO 100 J=I,17 IF (ABS(PB(J)) - .000001) 100,100,75 100 CONTINUE 110 CONTINUE IF (NERR) 9000,150,9000 C c C PRINT INPUT DUE TO ERROR c C 9000 WRITE(NPRNT,9001) NSEX, NREG, KT 9001 FORMAT(//,22H TWOCN INPUT ARGUMENTS,/, 5X, 5 HNSEX=, 12, /, 5X, 5HNREG=, *I2,/,5X,3HKT=,I2) WBITE (NPRNT, 9002) 9002 FORMAT (//, 5H PA =) WRITE (NPRNT, 9003) (PA (I) ,1=1, 17) 9003 FORMAT (10 (2X,F9.0) ,/,7 (2X,F9.0)) WBITE(NPRNT,9004) 550 DOCUMENTATION 9004 FORMAT (//,5H PB =) HRITE(NPRNT,9003) (PB (I) ,1=1 , 1 7) XMEDN=0.0 CDR=0.0 CBB=0.0 GO TO 7555 C c C CALCULATION OF 4 HYPOTHETICAL AGE DISTRIBUTIONS KT YEARS AFTER C EARLES CENSUS CORRESPONDING TO 4 DIFFERENT LEVELS OF MORTALITY c , . C 150 DO 200 1 = 1, M 200 PX (I)=PA (I) E0X=0.0 DO 300 J=1,4 E0X=E0X+20.0 CALL MLT (E0X„NSEX,NREG,CDMLT) CDLX (1) =CDLX (1) +CDMLT (1,5) IF (J-1) 390,390,700 390 CONTINUE GO TO (400,500,600) , KT 400 CONTINUE IF (M-16) 712,712,410 410 DO 411 1=17, M 411 PX(16) =PX (16)+PX(I) MADJ=16 GO TO 700 500 CONTINUE IF (M-15) 712,712,510 510 DO 511 1=16, M 511 PX(15)=PX(15)+PX(I) MADJ=15 GO TO 700 600 CONTINUE IF (M-14) 712,712,610 610 DO 611 I=15,M 611 PX(14)=PX (14)+PX (I) MADJ=14 GO TO 700 712 MADJ=M 700 CONTINUE GO TO (705,800,900) , KT 705 CONTINUE IF (MADJ-16) 710,1000,1000 710 MJP1=MADJ+1 DO 711 I=MJP1,16 711 CDLX(MJP1)=CDLX (MJP1) +CDLX(I+1) GO TO 1000 800 CONTINUE IF (MADJ-15) 810,1000,1000 810 MJP2=MADJ+2 DO 811 I=MJP2,16 811 CDLX (MJP2) =CDLX (MJP2) +CDLX (1+1) GO TO 1000 900 CONTINUE IF (MADJ-14) 910,1000,1000 910 MJP3=MADJ+3 DO 911 I=MJP3,16 911 CDLX(MJP3)=CDLX(MJP3) +CDLX(I+1) 1000 MDJ1=MADJ-1 DO 1100 I=1,MDJ1 1100 SX(I)=CDLX(I + KT) /CDLX(I) DO 1200 1=1, KT 1200 CDLX(MADJ)=CDLX (MADJ) +CDLX ( MADJ+ 1) SX(MADJ)=CDLX (MADJ+KT) /CDLX (MADJ) 1250 PCUMX(J,MADJ+1)=0.0 DO 1300 1=1, MADJ K=MADJ+1-I 1300 PCUMX(J,K)=PCUMX(J,K+1)+PX (K) *SX (K) 300 CONTINUE TWOCN 551 C c C CUMULATE THE LATER CENSUS c C PCUM(N)=PB(N) NM1=N-1 DO 1400 1=1, NM1 K=N-I 1U00 PCUM (K) =PCUM (K+1)+PB(K) c c INTERPOLATE FOB CORBECT MORTALITY LEVELS c C IF (N-MADJ-KT) 1410,1411,1111 1410 LIM=N-2 GO TO 1501 1411 LIM=MADJ 1501 DO 4800 IT=1.LIM DO 4000 J=1,4 IF (PCUM (IT+KT) -PCUMX(J,IT) ) 34 00,3700,3800 3400 CONTINUE IF (J-1) 3500,3500,3600 3500 E0X=0.0 GO TO 47 00 3600 P1=PCUMX(J-1,IT) P2=PC0MX (J, IT) E02=J*20 E01=E02-20.0 GO TO 4100 3700 E0X=J*20 GO TO 4800 3800 CONTINUE IF (J-4) 4000,3900,3900 3900 EOX=100.0 GO TO 4700 4000 CONTINUE 4100 DO 4600 J=1, 15 PCUMT=0.0 E0X=E01+ ( (E02-E01) * (PCUM (IT + KT) -P1 )/( P2-P1 ) ) IF (EOX - 20.0) 4110,4120,4105 4105 CONTINUE IF (EOX - 80.0) 4120,4120,4130 4110 E0X=20.0 GO TO 4120 4130 E0X=80.0 4120 CALL MLT (EOX , NSEX, NR£G,CDMLT) CDLX (1)=CDLX (1) +CDMLT (1 ,5) 5702 CONTINUE GO TO (5705,5800,5900), KT 5705 CONTINUE IF (MADJ-16) 5710,6000,6000 5710 MJP1=MADJ+1 DO 5711 I=MJP1,16 5711 CDLX(MJP1)=CDLX(MJP1) +CDLX (1+1) GO TO 6000 5800 CONTINUE IF (MADJ-15) 5810,6000,6000 5810 MJP2=MADJ+2 DO 5811 I=MJP2,16 581 1 CDLX (MJP2) = CDLX (MJP2) +CDLX (1+1) GO TO 6000 5900 CONTINUE IF (MADJ-14) 5910,6000,6000 5910 MJP3=MADJ+3 DO 5911 I=HJP3,16 5911 CDLX (MJP3)=CDLX(MJP3) +CDLX (1 + 1) 6000 MDJ1=MADJ-1 DO 6100 I=1,HDJ1 6100 SX(I) =CDLX(I+KT) /CDLX(I) DO 6200 1=1, KT 6 200 CDLX(MADJ) =CDLX (MADJ) +CDLX (M ADJ + I) SX (MADJ) =CDLX (MADJ+KT) /CDLX (MADJ) 4250 J2=MADJ + 1-I* 1 : DO 4200 J1=1,J2 K=MADJ+1-J1 4200 PCUHT=PCUMT + PX (K)*SX (K) 552 DOCUMENTATION IF (ABS{PCUMT"PCUM(IT+KT) ) -1.0) 4800, 4800, 4 300 4300 CONTINUE IF (ABS(EOX-EOI) -ABS (E02-E0X) ) 4400,4400,4500 4400 E02=E0X P2=PCUMT GO TO 4600 4500 E01=E0X P1=PCUMT 4600 CONTINUE C c C ERROR STATEMENTS c C WRITE (NPRNT,555) 555 FORMAT(//25H *** THOCN ERROR NO. 0705, /,58H *** IMPOSSIBLE TO INTE *RPOLATE FOR CORRECT MORTALITY LEVEL) GO TO 9000 4700 WRITE (NPRNT,666) 666 FORMAT(//79H *** TWOCN WARNING — CORRESPONDING AGE GROUPS IMPLY A * LIFE EXPECTANCY AT BIRTH, /,63H *** LESS THAN 20 YEARS (A VALUE OF * 0.0 IS ASSIGNED) OR GREATER ,/,4 9H *** THAN 80 YEARS (A VALUE OF 1 *00.0 IS ASSIGNED)) C c c COMPUTATION OF MEDIAN LIFE EXPECTANCY , RATE OF NATURAL GROWTH, C CRUDE BIRTH KATE AND CRUDE DEATH RATE c C 4800 EO(IT) = EOX 4810 CALL MDENS (EO, 9 ,EOF.D,XMEDN) CALL MLT(XMEDN,NSEX,NREG,CDMLT) DO 5010 IX=1,17 5010 XMX(IX)=0.0 5000 XMX(1) = (CDMLT (1,2) +CDMLT (2,2)) / (CDMLT <1 , 5) +CDMLT (2, 5) ) NM1 = N - 1 DO 7500 1=2, NM1 XMX(I) = CDMLT(I + 1 ,3) 7500 CONTINUE XMX(N) = CDMLT(N,4) /CDMLT(N,7) TOTPA = 0.0 TOTPB =0.0 CDR = 0.0 YEAR=5*KT DO 7505 1=1,17 TOTPA = TOTPA + PA (I) TOTPB = TOTPB + PB (I) CDB=CDE+ (PA (I) +PB (I) ) *XM X (I) 7505 CONTINUE CDR = CDS / (TOTPA + TOTPB) RG = (ALOG(TOTPB/TOTPA) ) /YEAR CBR = EG + CDR C c C ~ PRINT RESULTS c C IF (NWRIT) 4801,7555,4801 4801 WRITE(NPP.NT,776) 776 FORMAT(/,2X,18HAGE AT CENSUS DATE, 5X, 14 HE ARLIER CENSUS, 8X, *12HLATER CENSUS, 6X,4HE(0) ,/) K1 = K2 = 4 EO (IT) = EOX IF (M-N) 4806,4807,4807 4806 LIM=LIM-1 4807 DO 4805 1=1, LIM WRITE (NPRHT.777) K1,K2,PA(I) ,PB(I) , EO (I) 777 FORMAT (7X, 12, 1 H- ,12, 13X,F13. 0,7X , F1 3. 0, 5X, F6. 2) K1 = K1 +5 K2 = K2 + 5 4805 CONTINUE LIM1 = LIM + 1 MM1 = M - 1 IF (M - N) 8010,8020,8030 8010 DO 8011 IJ=I,N 8011 PBX(IJ)=PB(IJ) TWOCN 553 PBX(M) = PCUM(M) IF (LIM1 - M) 8012,8014,8014 8012 DO 8013 I=LIM1,MM1 WRITE(NPRNT,99 9) K1,K2,PA(I) ,PBX (I) K1 = K1 + 5 8013 K2 = K2 ♦ 5 999 FORMAT(7X,I2,1H-.I2,13X, F13. 0,7X, F13. 0) 8014 WRITE (NPRNT, 998) K1, PA (H) , PBX (M) 998 FORtlAI (7X,I2,3H + , 13X, F13. 0, 7X, F13. 0) GO TO 48 11 8020 CONTINUE IF (LIM1 - M) 8022,8027,8027 8022 DO 8025 I=LIM1,MM1 HRITE(NPP.NT,999) K1,K2,PA (I) ,PB(I) K1 = K1 + 5 8025 K2 = K2 ♦ 5 8027 WRITE(NPRNT,998) K1 , PA (M) , PB , o v9 S 5 1^. —. -~ tS S t>- v» h- — 2 s — CM CM Oo £ — OO — cvl R E vS — — o R vs o v9 »• C s K» vS v» o- s ~> o- 1 rn vS S :c — • ■— -. ~- IS — ~ — — IC 3 s; s 2 5 " ~ CM r» r- O 5 CM o CM r- ~ R 3- v9 vs rv ^" > l^v 3- VS ^ £ o- f^ i^ in S CI- m o- ! i-. s 3 vs m m o- S VS o- VS 1 in s s O o- v>- CM 3 VS CM vs; O- ! s £ — - J — i — cv S — CM j -! ! s S IS s IS l : I IS : i j j s s f^ to fO i rw 1 ! |s- 1^- t^- m 2 3 r- CM I CJ 00 3 ! •*" 0o j [ t<- CM 3 3 s- vS 1 1 VS 0- S w- o-i ! : o- i VS. i 2 t> CM to •^ i °° 3 Ol v*: ; ! CM l.«l i 3 S O tn o. 1 VS s o vS O "» ! S 3 CM cv VM CJ CM 1 5. s s S 3 T 3 3 Oo CM CVl v9 0o 3 0o O Oo 00 CM 3 5 vS — — ^~ VS 5 vS 3- VS VS -^ 5 3 r» I-- t^ vs o 3 r» VB O 1^ r^ 3 3 o- o O i^ O- IS o- r- o» o- o 3 I- CM CM IS — 3 (^ VS — r- CM 3 3 cM r^ Ki Kl> 3 CM K> CJ m 3 Si 3 3 3 3 3 § vS — c- O- I~- o- O- CVJ $ VS — o- CM VS — r- o- v s o- o- In o >n O V9 VS S Ct- o- vS VS o- 0- ln o s s O r- r- CVl t^ CM o •^ s O r- o — o r- r*- CM s R m t*> CM ~» VS O — «S -~ Os s o «\ CM — Oo Oo V9 m m s r- CM 00 in rrj tr> o- tr> 3- IS o~ «> 3- PCl rr> £ — — 3 ~ V 3 I 1 s 1 3 m O O O CM ©- in CM O- O Oo n o o o O oo o o CM o- £ s o rr> — 1^ vS vS r~- vs ■s tn 3- en * m R VI i^i in m 3- R s LU tU S Ui S £ -1 -i s ~l £ V ec CM r» — * en — 3- m —^ ^ cc CM r- «» — CM r- — 3- ■T s £ O 3- IS — £ V9 ~ Oo ~ s •2. O 3- 0o — o 3 VS — s Si * 19 o- — o- -~ »» cu R! 3- vS o- CM 3 vS CT- — H 3 - — t-- o- CM - v>- CM Oo © S - — 1*- Oo O — r- o- CM R s z. vS m r- l~» Z r~- r^- evj o- s z M> in CM 0- vS m r- t-~ s a O 3- m O in 1^ 2 O 3 1^ — 3 m 2 2 M i-l a M o 2 a 1- y- b t- r- R a cc v9 e»- 3- K% cc i- fo f» — a ^ vS o- 1^ — o vS cr- 3 1*^ a a -» rr> IT> tr> 1T> -1 m m r- CM s _i I** io l~- CM tT» m m in 2 s ^> o- to OO I~~ => Oo r-= CO Oo 2 ^3 o- f> CM 0O Qc O- m oo r- ' s Q_ c*» CM CJ Cr- o. CVl o- iS O s Q. 0o CM vS o O OO CM CM «- 2 a O Cr- Oo ir> O- o in o- a- CM a O o- 0O 3- CM ts o- 00 m o- a a o_ ur> r- a. C- 0» — a Q_ in 00 — o: lr> r~ a s s UJ 2 a o= — C: — • m or — o „ - H CM O o- CS M o- O CM m » M CM o OJ l-cj a. IU — 3- O 3" LU O 3- 3- d- w IU — 3- 3- d- — 3 o 3 » " > — vs l-~ rr> Oo > — tO 00 o m « > CM vo f*. O m i- — V9 1^ «n 0» u, » 3 vs O vs CM TS vS cu — in ■» ■D VS O — ir> (O vS o vs CM *r " O 3- t-~ — cr- ~ o a- o- — o — m O 3- r- — o — IU 3- r^ — o- — n « CA vo — oi en — (- N - — — - — in - ~B 4. w CO c C\J CO ■a a CO v. a C_3 -c a O VS ~8 a c-i G CVl « c V0 w « CO 1 u a vo u e o c CVl fC> -8 v> a O f 3- -15 w c? «s ~5 O I* a o c CVJ V -s w o O 3- ki a o VO w CO f VS 1 UJ -v l~ Ui VO -» c evi VU <«1 UJ % TWOCN 555 H a a> z-> a o w CM & Ml Eh W VI to in I o V) w Hi & 2. o H Eh •4 hH D &. O a. W l> D O V) 01 VI M U PS w M ►-1 OS < W EH «a Q V] w as M U EH «t W U> comcr>=t-T-0(^cr>cncor»ini/"> (NvOfNO^OOvCf-CNOOCTir^OT- vocrivot— (Nf^iJ'O^i'OOcoma-co I I I I I I I I I I I I I I oinoinoinomoinomoin© V) W H U as «0 Eh (J W a< s>< w w ^^ fe. M M ** Hi W H V) iaM 03 X M ^* Ch EH b O 5B «* w H **■* O as CO U o sc M pa tfl >H l-H w CQ CO CQ ^^ < X a E-l LB ■*«-■ M H hJ M 04 3 HH Ph V) o cu H W w a ►•H H» M «a X J ^ fc Q E 33 X cq ai W , — ' J O a H CQ Q H •a) H Q H OS 1 CQ w ,M% M «* HH X &h •4 *■*' H O 12 .-H U Hi w ■** Q X O *-* E Q >H as w *M, a W M v^ a o> H Hi ■4 O &J u « N000if0(r|i r IO9iC0«IOi , )«fi0\O01* co»-H-r^rMCT;rr'icr>cr>r^r«'f)in=»'fNco' , oiriroCT> ^ocn*tN5f' ,r (Cfi'-*air" rr >ococn^'' _ in i-i-i-voi-sinr>Mni-cimiflH;fsic)r~ a>roocricncor-^oir>:rcr)«-ooi/">»-\oo*o OLf>OOit^O^CTNfNoivocor>©< T )u">3-cr>r~ir)©vo or»-ocr>cor*v©jr^:* r0T-OOOOO©OOO'— t-(N^-(^T-r- i-0©©OOOOOOOo©000«-CM int^d-co©cot~-cr>aoomcria-iri(T>r-CN' ,r i H/in(»ii>r-kDvcoooi/ii-<-ir)' r ii»iinrin tn^intfioinfOH/rwocorx-^a-voo cncnco^o^oocyvr~ T ~^vovocO' , -< — okno (Nr-'-O'-iNiNNiNfosvooicxnoino t-oooo©oo©©©©©t-*-i*13-© O©00©0©00©0©0©000*- orinoifloinomoifloinoifloino CM CD ro O • o CM O II m in m r- B o o H • • IB O O o OCi II II w w >-) H EH «s «c «c « « K S < EH 6H zm<« H « Oh CQ Q O w W W Q Q EH P O < as os 03 U U JhJ «fl < rtl V) V) VJ as as as w w w u u u OS O] OS W W i5 EH EH EH as as as H H M 556 DOCUMENTATION .«» r^ostor-ota-T-vo^-^-coinj* o cocNin^r»^-©rooorn©ooincN **■" •••••••••••••• Cd »(Ninr4incoooo D O trt 10 to SB w u « w Eh •< 1-4 to B to Z w u « w H ►J « Ed W Eh int0*00(NN(N ©vooor-'-r^tNooty'OfioopOvo (O 05 Cm o X E^ ©ooo»o>t^r»©vor»c>»;rr--r-'-r-ir>3-rO< r l(N|(N«-T-r- rT-NNnc)H;9ininicio + I I I I I I I I I I I I i I oinotfiomomoinoinoioo «fl X H *-* a SE to Ed o SB M H X >A Ed CQ < EC K Q EH 33 ^^ M EH 1-4 H H © ►J En to O & H Ed to S «-H HH M «JJ X ^^ Q S3 a X w w H ^* ►J O S3 M © Q Ed «c M © E-l P5 © 1 Ed Cd < J X <*4 «e ■*w H o S3 en u ►J Cd ^ O X o *— & © X 2 « A s X Cd ^^ © OI m h4 «* o Ed (J ' o r«•rn^ot».o^o(Nr»©t^^ve©a'»(N®©^• *tT©ONfN' T )(Na>r-vOrotNa , ro(N«jj-© \Oro©r-t^vo»-eNfNO>P*©^©CN»OvO r-00tf(NOwWOiOr-d'00H;fM*0>^00 ma-^-r^' r >©^'©r , »< ,r »cya>moo r-oooinmi-eon*r-o»Ofoin(N r»vDffioNoo»©r~t ,, »^ir>f T )tnf*»in»- a•aocJ^oo^■*vo©^"•■^or*•r-0'-lnoovo^• in>x><" , >r»tx>'-r^r»;*cN\oc\i©cor»- r*«-©r«.©r-*CDir>< - 0© OtDvO^tft-nnooOOOiOni-r-moN o«-fNrM^ot~< , irovo' T )m(r>a>m©ino> ©0>d-fnCNt-O00t~»ir>< r >o^0©rr»f r (^-t*» ococoaoeoaoot>t-»r*f-r-r-vovotn«!-ro«~ aifOOOr"\otN*3- l fnooa3inr , « , c i Oio» iniTinin(N3a ;0 ^^!N|s.oeo»oifiton \o^-rM«-tNro< v )^-5r>Doo«-i~.ino^inov v 4P »-r-O©O©OOOOOT-r-(NP0v£)©O »-0©0©©©00©©©©©OOr-fN o^ r- r- r-»-rMCNd-inr»a>» ^ri/iiriT-t r )srr»-©r-«iriooro^o©' ,r >' , id-o t-»-ootn(Na>©©<^( r )^-o(MooiN'-'-o<-oo ©tn»-©«-T-t-tNtNiro5ri/)©r>j©oofn© rOOOOOOOOOOOOi-rNJO 000©0000©0©0©©©©©'- or-if>©ir>©in©inomoin©m©m© (N o • o r- On II «- «- * «■ © © O En • . s o © o PS II II H Ed hh Eh H «s «* «s « 09 « © HIS «« H Eh SB * «8 M Cd Cv, CD Q o Ed Ed Cd Q Q Eh B © «J P5 OS «UU t-3 l-H KH < «u «e to to t/l SB SB SB Ed Ed Ed U U U « ai ft. Ed Cd Ed 6h EH Eh 55 SB SB TWOCN 557 o r» I O CM O W to s CO z W U « BO «a ►J CO CO CO u K eg M ►J < rg H no W •O M Z o H o 04 CO H «! Q CO to z H U H M EH SB «* U > CO a e> o «fl W oovovofno\vOfN\oor-oovoeovjo fNf-ClOCTivOCNr-OC^ClT-r-aOO oor»oovovo:*=rcot~»>£>r» *iNmooo\ooa*tf)ooaooNN(N ov©cor^t-r-ocooorovo T-*rMcomvOT-vorMC7>ir)cNCTv\Di^ OooMn^rnnNiNi-t-i- co W H U z «* Eh O w Cu X w M M hJ O* H CO M Eh NiOCNO'fiCO^MNOOlM^Oi- voroofiaivDa-r^a-i^oina-f-cTv VOCO« — CO< ,r >Cn©aivoi~ojr>»a-o^£>' r )ocoina-a5 r-in^-rridCNOMINr-i-t- I I i i i i i i i I I I I i omoinomoinoinoinoino «=c X H •■* Q z CO CO o S3 w M >J ij W 03 CQ « X a H M ^-» GO EH h4 M M Q _5 fc. CO o Oi M w CO £ l-i ►-1 M rt) >H ^. a E z X DO W CO — ' -0 CD E M CQ a CO «: H Q H u3 CQ 1 CO ^^ H «* ►0 X Ch «s H o B ^ u -3. M *■« Q X O *■* s Q H z og *m. Z3 X CO *«^ Q O CO •J < o H o U> «hrON(NOOiniflO\*NlNfOflOC1NO* Uli-f\0NM , 1iria-vDcri fr io' T >vovocoo o>o^o*oi'-ooi-piinij\innaOt-!B m m «■- r-.noNi/iT-r^rowinoMcnkou-fN inmiTla-^-rrirorotNCNi-r-^- 4 , a5r»oOtfuifiiOM r i*oc« T "io'Dfi f*ioONaioooocor v r»>oin' r i(jMfli^in'- oocr>wcy>cT>o>o»cTicTiff>cnoooor*voa'0 3-r^fMsrcr>oinMovf)Or-or~«-ir>oo^- '-u-iLnint-T-ooooaoirioocTivoof^^o-3' a}r>fsr»cTifM^r-rsioio[NiovooooiNO (NrocTii/>r-vocTicsirnrno' r )o>r~iricT>a , oo ^-'-T-r-ocTi(T>cor~-vj3ir»-eo*co(Nco fn5f*iJ'j*nororo' r >rr)"lrrifMfN»— t- O*>"ONk0C0*a\lC>0^00r-*(tlO* or^-^-vo^cNinofor-o^vrjs-rrimvococM 0(N3 , »oocnmcNvj300ir)vovo(NcD»-r^»- oaijrf r )iNr-ocr>r>inmo>x>'-roa-«-oo ooocoi»(Doooor»M^i^t<.iovcui*n'- \ou>-*(Ti-ff>CTicTiO' T io^-cNininin > x) mo' T )^fNfr)' T icntn»-r-t*00 T-OOOOOOOOOOOOOOOt-(N >j5^ooo< ,i '>«-»-cyi>*ooin.DC7>mroini^'NcriO-*< v >vO rM^OT-j-^-roco»-a'Cncr>o NrieiOUOOM^OCOcoiNOOifl^'flO t~*'-'f~-T-vjOvO(^OCriO oifn-Ofi-'-f-iNWfOinostNMDfNO r-000000000000»-r-(N*0 ©©ooooooooooooooo*- orKioinoiftoi/ioifloinoinoino o II in en ifl r- sr «- BOO H . • * o o o « II II H W .-) H EH «S «i «5 s MSB «S H C-i Z « -al H « Ck CQ Q o eg eg HQQ EH D O IB CJ U OhIkI «S r» (N en VO OJ l»l © m m ,- l"» vo o si- O r- 00 T- f-» t— r» j» r» m m J9- o w 03 EH CO D O H EH «a w » en cu so o en as M M ►H- O «! « en « W M en h a j cu a w h a 1 I fu O f— O X r* w o '/) f/> . • • • Eh vo CM s3" f*> • ts a "1 in mm Eh »- o a W vTiro co r- MO a H & COrM © UM a («) Ci> VOOV CM » (k< OO. HMMII f- * © * o * o 10 W Eh voh moo HO a a as b£ «o vo CM H U II r- «- II en t- W * * O M * * 3» «a is e-i * # eh o. & r» ar in UNSMH I. DESCRIPTION OF PROGRAM A. PDRPOSE To smooth a population distribution in 5-year age groups, except for the first two and last two 5-year age groups, using a formula derived by the United Nations. B. DATA NEEDED 1. The male population distribution in 5-year age groups. 2. The female population distribution in 5-year age groups. II. METHODOLOGY A. MATHEMATICAL DERIVATION The smoothing procedure is made by using the following formula: 5< = ~k [' 5*^10 + * 5^-5 + 1 ° J*x + 4 4**5 - S^xMo] where rHP x is the male population age x,x+4 rHP^ is the smoothed population age x, x+5. The female population distribution is smoothed in the same manner. Reference: United Nations, Methods for Population Projections by Sex and Age, ST/SOA/Series A Population Studies, No. 25, New York, 1956. B. COMMENTS It should be noted that in the process of smoothing the 5-year age groups this procedure changes the total population of the distribution. The total population of the smoothed distribution will be slightly dif- ferent from the total population before smoothing. This difference is not an estimate of under or over enumeration but merely a conseguence of this procedure. III.H AIN PROGRAM A. REQUIREMENTS The main program is required to use this subroutine and obtain the data (input) necessary for the subroutine to perform its calculations. A main program can use a subroutine alone or in conjunction with other subroutines. For a detailed explanation of writing main programs using more than one sub- routine see the Appendix. 1 . CALL statement Once the main program has obtained the data required for the subroutine to do its calculations, the main program transmits this data to the subroutine and the subroutine returns the results of the calculations performed to the main program. This communication process is made through the CALL statement. 559 560 DOCUMENTATION The form of the CALL statement for this subroutine is as follows: CALL UNSMH (C„D,A,B) Foe the purpose of emphasizing the input arguments, they are underlined in the above CALL statement. 2. DIMENSION statement The variable names in the CALL statement may be single-valued or refer to a group of values which are called an array. If they refer to an array, then the variable name is dimensioned in any subroutine called by the main program. For this subroutine all of the variables in the argument string, A,B,C, and D, are arrays. The following dimension statement must be included in any main program using this subroutine. DIMENSION C(17) ,D(17) ,A(17) ,B(17) B. OTHEfi SUBROUTINES AND FUNCTIONS NEEDED IN CONJUNCTION WITH THE PROGRAM. Some subroutines actually call other subroutines or functions in order to perform their calculations. These subroutines and/or functions must be in- cluded in order to run this subroutine These can be either other subroutines presented in this publication or functions included in the FORTRAN library. 1 . Subroutines from this package None 2. Library functions None 3. Card Diagram of main program and subroutines. / / / CARDS INDICATING END OF DECK / ^ _^ / INPUT DATA / I / / I / /I I / / COMPUTER CONTROL CARDS / | | / / / I 1/ / /I I / / SUBROUTINE UNSMH / | | / / / I 1/ / /I I / / MAIN PROGRAM / | | / / COMPUTER CONTROL CARDS / | | / / . / I 1/ BEGINNING OF DECK I I / I I / I 1/ I / I / I / C. FORMAT REQUIREMENTS FOR CARD INPUT DATA FOR THE MAIN PROGRAM GIVEN IN SECTION V.A. The card format reguirements for the main program included with this publication are as given below. The data should be punched in the columns specified. For a more detailed description of the input data, see the description of arguments in section IV. B. See example, section V.C. UNSMH 561 Variable Card Columns Name Definition 1 2-53 54-80 1-8 9-16 73-80 1-8 9-16 • 49-56 57-80 Blank Label used to identify the output Blank Male population 0-4. The number should end in column 8. Bale population 5-9. The number should end in column 16 Hale population 45-49. The number should end in column 80. Male population 50-54. should end in column 8 The number Male population 55-59. The number should end in column 16. Rale population 80+. The number should end in column 56. Blank The variable C always requires two cards. The first card (card no. 2) must always contain data, whereas the second card (card no. 3) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 1-8 9-16 73-80 1-8 9-16 49-56 57-80 Female population 0-4. The number should end in column 8. Female population 5-9. The number should end in column 16. Female population 45-49. The number should end in column 80. Female population 50-54. end in column 8. Female population 55-59 end in column 16. Female population 80*. in column 56. Blank The number should The number should The number should end The variable D always reguires two cards. The first card (card no. 4) must always contain data, whereas, the second card (card no. 5) can be all zeroes depending on the number of age groups given. The last age group given must always be the open-ended age group. 562 DOCUMENTATION I NXT | The code indicating if there is another data | set following this one. A zero punched in column 1 I indicates this is the last set of data. Any lother digit punched in column 1 indicates | another set of data follows this one. I this one. IV. SJB ROUTINE ft. SUBROUTINE STATEMENT All external subroutines begin with the word SUBROUTINE followed by a space, the name of the subroutine and the argument string enclosed in parentheses. This subroutine begins as follows: SUBROUTINE UNSMH (C,D, A, B) B. DESCRIPTION OF ARGUMENTS Name How Obtained Definition Transferred In Transferred In Transferred Out Transferred Out Male population distribution in 5-year age groups beginning with 0-4. The last age group is the open-ended age group for males. It is possible to use the subroutine with a minimum of 6 or a maximum of 17 5-year age groups. If less than six age groups are given, the subroutine will write out error message no. 1331 and return to the calling program. Female population in 5-year age groups beginning with 0-4. The last age group is the open-ended age group for females. It is possible to use the subroutine with a minimum of 6 or a maximum of 17 5- year age groups. If less than six age groups are given, the subroutine will write out error message no. 1331 and return to the calling program. The smoothed male population distribution in 5- year age groups beginning with 10-14 and ending with the last smoothed age group. The smoothed female population distribution in 5-year age groups beginning with 10-14 and ending with the last smoothed age group. C. ERROR MESSAGES 1331 *** UNSMH ERROR NO. 1331 — INPUT ERROR IN C OR D *** ONE OF THE FIRST SIX AGE GROUPS IN ONE OF THE DISTRIBUTIONS IS ZERO OR AN INTERMEDIATE VALUE IS ZERO. DATA NOT SMOOTHED. PROGRAM AND RESULTS A. COMPUTER LISTING FOR MAIN PROGRAM c c . C MAIN PROGRAM FOR TESTING UNSMH c c C THIS PROGRAM USES A SET OF DATA CARDS BHICH ARE READ IN BY THREE C READ STATEMENTS. THE DATA CARDS ARE RELATED TO EACH OF THE READ C STATEMENTS AS FOLLOHS. C C THE FIRST READ STATEMENT USES ONE DATA CARD. c rHE porposE OF THE FIRST READ STATEMENT IS TO READ IN THE LABEL C TO BE USED TO IDENTIFY THE OUTPUT. THIS LABEL IOULD USUALLY C CONTAIN THE NAME OF THE COUNTRY OR AREA BHOSE DATA ARE BEING C ANALYZED AND GIVE SOME INDICATION OF THE TYPE OF DATA OR OF C THE TYPE OF ANALYSIS THAT IS BEING DONE. THE LABEL IS LOCATED UNSMH 563 c IN COLUMNS 2-53 OF THE CAED. C C THE SECOND BEAD STATEMENT USES IWO DATA CARDS. C THE PURPOSE OF THE SECOND READ STATEMENT IS TO READ IN THE c POPULATION DISTRIBOTION OF MALES (C) IN 5-YEAR AGE GROUPS. C c VALUES ARE CONTAINED ON TWO CARDS. EACH VALUE OF C MUST BE c LOCATED IN EIGHT COLUMNS STARTING WITH THE FIRST EIGHT C COLUMNS. A MAXIMUM OF TEN VALUES CAN APPEAR ON THE FIRST c ,-- CARD, ENDING IN COLUMNS 8, 16, 24, ...,80. A MAXIMUM OF c SEVEN VALUES CAN APPEAR ON THE SECOND CARD, ENDING IN c COLUMNS 8, 16, 24, ...,56. IF TEN OR FEWER VALUES ARE GIVEN c F0 R c# THE SECOND CARD WILL BE BLANK. C C THE THIRD READ STATEMENT USES TWO DATA CARDS. c THE purpose OF THE THIRD READ STATEMENT IS TO READ IN THE FEMALE C — POPULATION IN 5-IEAR AGE GROUPS (D) . C D IS CONTAINED ON TWO CARDS. EACH VALUE OF D MOST BE LOCATED C WITHIN EIGHT COLUMNS, STARTING WITH THE FIRST EIGHT C COLUMNS. A MAXIMUM OF TEN D VALUES CAN APPEAR ON THE FIRST c CARD, ENDING IN COLUMNS 8, 16, 24,..., 80 A MAXIMUM OF C SEVEN D VALUES CAN APPEAR ON THE SECOND CARD, ENDING IN C COLUMNS 8, 16, 24, ...,56. IF TEN OR FEWER D VALUES ARE c GIVEN, THE SECOND CARD WILL BE BLANK. C c THE FOURTH READ STATEMENT USES ONE DATA CARD. C THE PURPOSE OF THE FOURTH READ STATEMENT IS TO READ IN THE CODE C (NXT) INDICATING IF THERE IS ANOTHER SET OF DATA FOLLOWING THIS C ONE. C NXT IS LOCATED IN COLUMN 1. A ZERO PUNCHED IN COLUMN 1 c INDICATES THIS IS THE LAST SET OF DATA. ANY OTHER DIGIT c PUNCHED IN COLUMN 1 INDICATES ANOTHER SET OF DATA FOLLOWS c THIS ONE. c c DIMENSION C(17) ,D(17) ,A(17) ,B(17) NREAD = 1 NPRNT = 15 10 READ(NREAD,11) 11 FORMAT(1X,52H ) READ (NREAD, 22) (C (I) ,1 = 1, 17) 22 FORMAT (1 0F8. 0,/, 7F8. 0) READ(NREAD,22) (D (I) , 1=1 ,17) READ(NREAD,33) NXT 33 FORMAT(H) WRITE (NPRNT, 44) 44 FORMAT (1H1) WHITE (NPRNT, 11) CALL UNSMH(C,D,A,B) IF(NXT) 10,20,10 20 CONTINUE STOP END B. COMPUTER LISTING FOR SUBROUTINE SUBROUTINE UNSMH (C,D, A,B) c c C PROGRAM NO. 1330 c C C AND D ARE INPUT ARGUMENTS. c A AND B ARE OUTPUT ARGUMENTS. C c IS THE MALE POPULATION IN FIVE YEAR AGE GROUPS STARTING C WITH 0-4 AND ENDING WITH THE OPEN-ENDED AGE GROUP. C d IS THE FEMALE POPULATION IN FIVE YEAR AGE GROUPS STARTING C WITH 0-4 AND ENDING WITH THE OPEN-ENDED AGE GROUP. C A IS THE SMOOTHED MALE POPULATION IN FIVE YEAR AGE GROUPS. C B IS THE SMOOTHED FEMALE POPULATION IN FIVE YEAR AGE GROUPS. C DEVCA IS THE DEVIATION BETWEEN A AND C. C DEVDB IS THE DEVIATION BETWEEN D AND B. c c DIMENSION DEVCA (17) , DEVDB (17) , A (17) ,B (17) ,C (1 7) ,D (1 7) 564 DOCUMENTATION SPENT = 15 NROHA = NROHB * TC =0.0 TD = 0.0 DO 10 I = 1, 17 TC = C(I) + TC TD = C (I) ♦ TD DEVCA(I) =0.0 10 DEVDB(I) =0.0 DO 50 I = 1,17 IF(C(I)) 30,30,20 20 NROHA = NROHA + 1 30 CONTINUE IF ( D(I) ) 50,50,40 40 NROHB = NROHB + 1 50 CONTINUE IF(NROHA - NROHB) 70,90,60 60 NROHA = NROHB GO TO 80 70 NROHB = NROHA 80 HRITE(NPRNT,111) NROHA 111 FORMAT (////, 1X,62HN0TE: NUMBER OF MALE AND FEMALE AGE GROUPS UNEQU *AL - SMALLER (,I3,7H) USED. ) 90 DO 95 I = 1,6 IF(C(I)*D(I)) 100,100,95 95 CONTINUE GO TO 110 100 HRITE(NPRNT,222) 222 P0RMAT(/,51H *** UNSMH ERROR NO. 1331 -- INPUT ERROR IN C OR D, */,103H *** ONE OF THE FIRST SIX AGE GROUPS IN ONE OF THE POPULATIO *NS IS ZERO OR AN INTERMEDIATE VALUE IS ZERO,/, *22H *** DATA NOT SMOOTHED,//, 10X, 12HINPUT VALUES, //, 15H 1ST POPULA *TI0N,3X,14H2ND POPULATION,//) DO 105 I = 1,17 HRITE(NPRNT,224) C(I),D(I) A (I) = 0.0 105 B(I) = 0.0 224 FORMAT(1X,2(F14.0,3X) ) GO TO 1000 C c C UNITED NATIONS METHOD OF SMOOTHING CALCULATIONS. c C 110 DEVCAT = 0.0 DEVDBT =0.0 L = NROHA - 3 DO 200 I = 3,L A(I) = (-C(I-2) + 4 * C(I-1) ♦ 10 * C(I) + 4 * C(I+1)- * C(I + 2)) / 16.0 B(I) = (-D(I-2) ♦ 4 * D(I-1) ♦ 10 * D{I) + 4 * D(I+1)- * D(I+2)) / 16.0 DBVCA(I) = (C{I) - A (I)) * 100.0 / C (I) DBVDB(I) = (D(I) - B(I)) * 100.0 / D (I) DEVCAT = DEVCAT + ABS( DEVCA(I) ) 200 DEVDBT = DEVDBT + ABS ( DEVDB(I) ) RR = NROHA - 5 C c C PRINT RESULTS c . „ _ C 270 HRITE(NPRNT,777) TC,TD,C (1) ,D(1) ,C (2) , D(2) 777 FORMAT(//,46H POPULATION SMOOTHING BY UNITED NATIONS METHOD, *//,25X,4HMALE,39X,6HFEMALE,lX,//6H AGE, 2 (9X,8H0RIGINAL, 4X, *8HSMOOTHED,3X,9HDEVIATION) ,//,9H ALL AGES,2X,F12. 0,29X,F12. 0,//, 1 X *,7H - 4,3X,F12.0,29X,F12.0/1X,7H 5 - 9,3X,F12. 0,29X,F12.0) 275 K = NROHA - 3 DO 280 I = 3,K J = 5 * ( I - 1 ) L = J + 4 280 HRITE(NPRNT,888) J,L,C (I) , A (I) ,DEVCA (I) , D (I) , B (I) ,D£VDB (I) 888 FORMAT(1X,I2,2H -,I3,3X,2F 12. 0,F10. 3,7X,2F12. 0,F1 0. 3 ) J = 5 * ( NROHA - 3 ) L = J ♦ 4 K = NROHA - 2 UNSMH 565 DO 290 I = 1,2 WRITE (NPRNT, 555) J,L, C (K) , D (K) 555 FORMAT (1X, 12, 2H -, 13, 3X, F12.0, 29X, F12. 0) J = J + 5 L = L + 5 290 K = K + 1 HRIT£(t(PRNT,666) J,C(NROHA) ,D(NROWA) 666 F0RMAT(1X,I2,2H *,6X,F12. 0,29X,F12.0) DEVCAT = DEVCAT / RR DEVDBT = DEVDBT / RR 300 HRITE (NPRNT,999) DEVCAT, DEVDBT 999 PORHAT(/17X,26HAVERAGE OF ABSOLUTE VALUES , 1 3X , 26H AVERAGE OF ABSOLU *TE VALUES, /,19X,16HOP DEVIATIONS = ,F6. 3, 17X, 16HOF DEVIATIONS = ,F *6.3,////, 1X,63H AGE- SEX RATIO FOR POPULATION SMOOTHED BY UNITED NA ♦TIONS METHOD,//) CALL AGESX (C,D) 1000 RETURN END 566 DOCUMENTATION cc r~ or O —i Q. err to c_i s CM p- CM P* S CVl O % s 3- m 3- m S 3- vo S 5 o-. 0O 0-- 0o £ 0> O 5 - 00 CM Oo CM K 0» £ O Ci £ - CM vS CM v9 £ CM (o £! s p. v» r» O e p. Co S U> r- K\ p- •^ P- O S s o l*V o m s o C> S £ r- p- P- r- £ p- Co £ IB s s U> s s S v» «• vS -. s vS O s 3 fT> r» ro i>~ s l»> C 3 S ~- m — u> s 1 — Ci s «> «T) o IT) O s 1 m Co 5 s p. tn »~- m s p- o s t^ O « p- vo s K p- 3- o- cr- i~- o- rv O- s S m CU CM (*» lr> CM s in CVJ a g — — — — ~ — a ~ — s S -~ -~ ■— — ?. — — s <»i *» *r s o CV o 00 O O Y' O o 3 s Oo 0o CVJ f~ 0o CM | 00 CM 5 3 — O- c * — Ci s — V3 3 3 3- — V* vS 3- VS 3 > VO ^ S CM 0° in 0O CM in ? CVl m 3 3 * 3- * *• ■» 3- 3- 3 3 — — — — 3 — — 3 3 ; 3 3 is vS 3- CVJ V9 * s vS 3- § S *• li- p~ VS 3- f^ s 3- P- S S o- - p- — o- r- s o» P- s s p. en 3- f<1 r^ > R P- 3- s s p. 0O o- (^ r^ o o> s P- o s # U% — r>- — m r- UJ s ln p- 2 — • — o> — *» cl> ~~ — S s a a: s 2 in vS o- cs ^ ift o~ s in Co s s l/> o- CM *• CM o o- > a: s Ct- O s s O. tS 3- 0o O CX. vS 0o ca s vS o s a o P. p- vS O o — v3 3 a — o s s o m rrv *• U\ rr> * Ci s m o s ft O: !■» CU O- CM 2 p^ o> 2 ft p. o a s VS — — Ui -^. -- U4 s ~- o s ™ > s s s -j p~ lr> «*- «D Ul Pv r- t- 3 p- p- s s —i K> en a- o 2 f<% * o s m 3- s 3 vx o 0O *• r- ^> O * a: s 1 vo 3- Rl 3 3- 0O vS r- *• VS "s 1 *• iS S s s ct- m — t^ X o~ — X s o- -~ ° 2 £ ~ |C» — M> S — — S 2T — -_ 2 2 VV> OJ CVJ CO CM CM o> 2 CM CVJ 2 5 2 2 Z "5 1 2 3 =3 O O o o => o CS o ^ 2, O O o 2 2 o 0o o f^- o Oo o 2 © OO o 2 2 Or o O o O er o O o es SI Co o Co 2 2 o 3- CM *. vS o »- CM — o 2 3- OJ — 2 21 u. m 3- CM oo u. in 3- CVl u. 2 m 3- CVJ 2 2 oo 3- 1^ * 0o 3- r^ 2 OO 3- p- 2 S cc CM cu cc CM CM CC s CM CM 2 ei r- h- r- o> n - «r O r- o OO cc O r- O 0o cc " o P- Co Co « ■• C, o o Ci CM Q O o O cs» o •~ o o O o r. >• o o o CVJ O o o CM u. o CO CS o j. " h- lf> K> VS — K in «■> VS ~- h- "> in m VS o n * to CM O lf> r- cr> CM o ir> P- vn •• CM o m o 1 " UJ 3- ur> CM U) UJ ;r in cvj K> Ul n 3- in CVJ o ^ ~ V- m m >- ro ro l~ N m r<~) M - — . ~ - O - , TS <3 J 1- vo Ui CO •» c CM 1— UJ vo •» i_ UNSMH 567 cu «: J3 M Fv O M H H > a) Q Q W ae EH o o S3 10 r«.i» , T-;j-o-H s o Cn B S3 o H EH < > w Q W a EH O O 93 10 «* 85 H tfl M CO o (JlOr^tNvO'-Oina)'- 00 voooaocor*-ocri*corM' — r~" o i OT-^-rsir0(Ni-Oi>ir>ir>;trricN oot^iovooiDvootNr^omvo^po^ oorow^aoofncNa-OoorofNcnoor* ina , *r»r»;»r»«u-)i>ao< , nrr)*a-inif)kOvOt»>r> i i i i i i i i i I i i i i i i + ©inoinomoinoinomoinom© i-r-cMoimm^^minvovor^r^co to cq d r» ►j Q W K| O O Q SO At H « Ik, CO H O B t> «H to S5 o H SH «* z a w EH M 35 D to M «" S3 f» CO ►Jr* «io 9 > . M IN aa W H EH O O l| O HH a o ** W 04 D C5 Q Oi «H o 05 Cu a. W O > M «1 O Pu o H H «J M H w CO i H O «j 568 DOCUMENTATION H u SB n->r\J:*< ,, )T-0 M H I I i- I III I Cu I Cv H a X H t/i «< ooooooooioowweooiww ^ «* r»OmOinoconi-(HNW as « II i i I i i i O H HUM EH MM \o*»Mfi/)in*>Offl*>o* Q *-) • •••••••••••• & i • i i *- i i- i i ►j v> in «s i-owmoiam^mxNfNO oo M M 1- T- T- »- *- 00 HH «a o . es « 03 00 I*) • MM mm v©vo*-a>T-tnina-vor^\ev©vo * o M C9i^ <* W E O«ffidO*OCDOWOOC0 II HM t- t-T-«-r-r- OT H EH MM => O in ij m a. s< w «* * ss hia • o o 4 *A X Q M Oi 10 o 1 a. H M »1 W ■< «B B in a o H EH <* SB cu Q H O M U O H «< PS H (9 as o o 00 EH H oor»wa-ofN^a»r'OOOoootNoooi « aj ooa^MNiMomNr-oNUhr oo c* ooaohoomoooNOhO'-s'n cm bm ii . Q Q. M »- M M z SB u > Cm H II M M H O a q a ss oo o©»oor»oomoooi< ,r »roi^r»eor^inr»oo'n ©or«mvooinvo©(Nr*omv0v0roc>i h ©oroa»*oo©ro{N*©oorooor» ooo win ©O©vOCT»«-f"»T-r»0»O©aO*r-eno HHHX Oi 04 EH EH EH U OO «««**:«: OO M PS OS 04 OS OS D OO MNMU O O H U H M «a «s to «a to ts OOOwwr(srr(noow»rtni»i i/ia , *t^r»*r>i/ii s co'nNoor»f)t-* fNifien^r-fNinr^ooo^mfnoooofsi ^oo.-p'io^T-cni'^voin^pOfM*- r» <*> r>> 01 «~ 1- »- »- M M M X a-0*;±c*=! , <7» = *'Oi*0\*tr.*er>a , C?\ O (9 (9 M ^r-(N*jrmir>>ovor*r^co ai ps as 1 M M H M M Eh > O > U> O «!)<<■«< SB UNSMH 569 z o H EH CN in CN r- CN IN • Q • • • • • • t— W f~ o r^»(N r- w u a lO fN o in o r» EH • h) EH o in i© *- co o o II a -«! O a- rr, en r- a a h4 M JO O r» ro v© <© s» r- o CO CO w a t— CM t^- sr t- cn to X D n. to cn T— T~ *" T- o H ^^ EH *" h «q T— yA • O H > Q »•* «C o O OMJ* a- o in T~ en r> CO BJ M O Z sr O O a a- r- fN en P~ ^O m CN U Q EC « H a o O * 00 t^ o o m o CO IN m9 Eh H O T— ^ t— \Q VO ^ lO o> o rr) IN ^~ 05 fci W -J M o in IN «- 3- en m in m ro r» r~ W O a ►-» 03 VO (N r» t- r> V© m t> «a O P" ro IN sD Z 33 H O T— r^ m t> o D to EH «* in in r~ ci on r- to Oj W M w X S a > O T— O r> t- CN o T— CO o W i 1 t j r» m to Q «d a Q « as o > • a w H w EH O H a EH O to «) «S w *— r- o oo o VO O II O 04 z a T— r- o a a a i-J a 3 M EH o o r» oo in p» o to to O >-3 a O in r» in a o CO CO z « a EH M a IN r~ lfl3"" CTl rt! M o w H >-» to CN T— r- f - **" EH H Z h SB rti Pm •4 EH M O a O M «a > Q > i-i W a X &J W o a «n CO (-3 • C5 Q o< D << o O O l-» in \o o m >£> o IN f> < o w u Z a o O PO cr. a oo o PO IN a o « 6h Q. U ►j SB H a 0*0 en r- r^ T— r~ a\ o M o EH a ^ in a a r- r- a t> in r~ CO ro s> « w to a a H o (N in en CO MNinhooo < o VI SB EH W ^o * CO 1- t> m a «~ ON r~ *£> in fe a Pu O O r» rn CN (N T— T- «— f" -O o o T™ o C u a H CN o to cxi W OQ a D to S5 o H to 03 «d Z Eh M a Ol a cn a cr> a cn a- CM H Q ># Hi W T— *~ CN CN PO n a a to 1 EH w o u> 1 1 1 1 1 1 1 i t I ♦ H 10 E-t Pm «s l-H CB H O o 1-4 o in in o in o in o m o «; EH 2 Ol *C «~ «~ in in m m a a in 570 DOCUMENTATION w u as rr){\ir*»OCT\r~ < No f/5 h 14 *e<""->r\)©«-intr>vo a ii I «- i >-) coco OS ©0"lCn©(r>CTi H H m w t- t- i-^ eh eh Eh Cm 00 «) «« -3 «. © to j o Qj cu w «! n s & ^ a . o o «s w m u u OO fa oor^oisroiNt-crir^ao -0303 r» hh ►j oo^-si-r^cNnr^^intN oo ro «S OO^-00r>OOlT)O00tN fa fa || . QQ O aw i/i(N'-a-aiinfN(T)fr)t~-P» as as c_> > fafa | I WO. ft)HHQ CO O , • . t • . QQQ55 OO 1 cm w o©r^Lnvoou"> , x>©cNr~ h fa ^ ©onc^=*co©rn(Ma-oo OOO cow O < 00©v£>CTir-(>.»-r-CT>© HHHX a, flj «S a in=*;3-«-|-:3-|-»Lnr~00U-> eh h eh u s d fNincnfnr^r^Lnr^oosi- <^«i«ji oo 10 ao0r-r->inrJ-'-C7>r«\£)cri 03 £B 03 03 « 03 2 ( t )C>4(Nt-i-'-t- DOCS BHXU H CD O fa u W W Eh «i «a co >>o O as «* «* *s D a W H O o * r» o © a ck i «a d ui (N i- o> m D to 03 H ■o o o w to h a • u 03 0333 o o ooi*-m^omvoo o 03 03 Eh EH 04 H OO "1 0>» 00 OHM 5 O CO tti H w o a E-t ooovoo© < a 330 t-i rsjin