[1] "plot.norway.tfr" function() { #plot.norway.tfr() - plot Norway TFRs, 1845-1985 x <- 1845:1985 + 0.5 y <- norway.tfr xy.data <- cbind(x, y) plot(x, y, type = "no", xlab = "Year", xlim = c(1840, 2000), ylab = "Total Fertility Rate", ylim = c(1, 5), main = "Norway Total Fertility Rates: 1845-1985") # par(cex = 0.6) # points(x, y) par(cex = 1) lines(x, y) # # lines(c(1840, 1990), c(2, 2)) #TFR=2 line level1 <- round(mean(y[1:53]), 2) #initial level line lines(c(1840, 1910), c(level1, level1)) par(lty = 2) par(adj = 0) text(1912, level1 + 0.1, paste("Average Level, 1845-1897:", level1, "c/w")) par(adj = 0.5) lines(c(1898, 1898), c(1.6, 5)) #ref line at 1989 lines(c(1935, 1935), c(1.6, 3)) #ref line at 1935 par(lty = 1) text(1898, 1.4, "1898") text(1935, 1.4, "1935") lines(c(1925, 1945), c(y["1935"], y["1935"])) #level at 1935 par(adj = 0) text(1946, y["1935"] + 0.02, paste(as.character(y["1935"]), "c/w")) text(1840, 3.5, "10*(4.53-1.78)/(1935-1898) =\n=0.74 c/w/decade" ) par(cex = 0.7) text(1840, 3, "Source:\nCohort and Period Fertility for Norway:\n1845-1985\nby Helge Brunborg\nRappporter 88/4\nCentral Bureau of Statistics of Norway" ) text(1840, 1, "Griffith Feeney, 1997-12-10") par(cex = 1) par(adj = 0.5) sink("d:\\aempaper\\developed\\norway\\plot.norway.tfr.txt") print("plot.norway.tfr") print(plot.norway.tfr) print("xy.data") print(xy.data) sink() "All done" } [1] "xy.data" x y 1845 1845.5 4.5555 1846 1846.5 4.5135 1847 1847.5 4.4510 1848 1848.5 4.2810 1849 1849.5 4.5890 1850 1850.5 4.4125 1851 1851.5 4.5215 1852 1852.5 4.3805 1853 1853.5 4.4975 1854 1854.5 4.7950 1855 1855.5 4.7175 1856 1856.5 4.4100 1857 1857.5 4.5500 1858 1858.5 4.6470 1859 1859.5 4.8535 1860 1860.5 4.6765 1861 1861.5 4.3445 1862 1862.5 4.5710 1863 1863.5 4.6970 1864 1864.5 4.6025 1865 1865.5 4.5595 1866 1866.5 4.7275 1867 1867.5 4.4810 1868 1868.5 4.3975 1869 1869.5 4.3060 1870 1870.5 4.3445 1871 1871.5 4.3690 1872 1872.5 4.4660 1873 1873.5 4.4475 1874 1874.5 4.6175 1875 1875.5 4.6960 1876 1876.5 4.6976 1877 1877.5 4.7162 1878 1878.5 4.6753 1879 1879.5 4.7681 1880 1880.5 4.5819 1881 1881.5 4.4480 1882 1882.5 4.5273 1883 1883.5 4.5755 1884 1884.5 4.6678 1885 1885.5 4.6419 1886 1886.5 4.5454 1887 1887.5 4.6168 1888 1888.5 4.4632 1889 1889.5 4.3496 1890 1890.5 4.4591 1891 1891.5 4.5099 1892 1892.5 4.3438 1893 1893.5 4.4624 1894 1894.5 4.3619 1895 1895.5 4.4838 1896 1896.5 4.4258 1897 1897.5 4.4461 1898 1898.5 4.4960 1899 1899.5 4.4436 1900 1900.5 4.3888 1901 1901.5 4.3670 1902 1902.5 4.2575 1903 1903.5 4.1680 1904 1904.5 4.0680 1905 1905.5 3.9520 1906 1906.5 3.9150 1907 1907.5 3.8630 1908 1908.5 3.8738 1909 1909.5 3.9541 1910 1910.5 3.8257 1911 1911.5 3.8059 1912 1912.5 3.7222 1913 1913.5 3.6437 1914 1914.5 3.6223 1915 1915.5 3.3748 1916 1916.5 3.4330 1917 1917.5 3.5320 1918 1918.5 3.4410 1919 1919.5 3.1770 1920 1920.5 3.6119 1921 1921.5 3.3140 1922 1922.5 3.1875 1923 1923.5 3.0935 1924 1924.5 2.8515 1925 1925.5 2.6170 1926 1926.5 2.5920 1927 1927.5 2.3735 1928 1928.5 2.3375 1929 1929.5 2.2350 1930 1930.5 2.1880 1931 1931.5 2.0789 1932 1932.5 2.0390 1933 1933.5 1.8650 1934 1934.5 1.8245 1935 1935.5 1.7800 1936 1936.5 1.7970 1937 1937.5 1.8400 1938 1938.5 1.8810 1939 1939.5 1.9070 1940 1940.5 1.9460 1941 1941.5 1.8345 1942 1942.5 2.1155 1943 1943.5 2.2645 1944 1944.5 2.4490 1945 1945.5 2.4350 1946 1946.5 2.7398 1947 1947.5 2.6539 1948 1948.5 2.5903 1949 1949.5 2.5050 1950 1950.5 2.5094 1951 1951.5 2.4668 1952 1952.5 2.5879 1953 1953.5 2.6563 1954 1954.5 2.6981 1955 1955.5 2.7865 1956 1956.5 2.8627 1957 1957.5 2.8640 1958 1958.5 2.8971 1959 1959.5 2.9266 1960 1960.5 2.8978 1961 1961.5 2.9439 1962 1962.5 2.9117 1963 1963.5 2.9258 1964 1964.5 2.9806 1965 1965.5 2.9455 1966 1966.5 2.8965 1967 1967.5 2.8085 1968 1968.5 2.7536 1969 1969.5 2.6958 1970 1970.5 2.5036 1971 1971.5 2.4883 1972 1972.5 2.3834 1973 1973.5 2.2298 1974 1974.5 2.1299 1975 1975.5 1.9825 1976 1976.5 1.8630 1977 1977.5 1.7532 1978 1978.5 1.7585 1979 1979.5 1.7501 1980 1980.5 1.7224 1981 1981.5 1.7003 1982 1982.5 1.7083 1983 1983.5 1.6553 1984 1984.5 1.6578 1985 1985.5 1.6767