/* US population */ /* population in millions from decennial census */ /* (updated -- Table 16 1993) */ options ls=80 ps=40 ; data a ; input year pop ; yryr = year * year ; * square ; yrc = year - 1880 ; * center ; yyrrcc = yrc*yrc ; * square of centered x ; cards ; 1790 3.929 1800 5.308 1810 7.240 1820 9.638 1830 12.861 1840 17.063 1850 23.192 1860 31.443 1870 38.558 1880 50.189 1890 62.980 1900 76.212 1910 92.228 1920 106.022 1930 123.203 1940 132.165 1950 151.326 1960 179.323 1970 203.302 1980 . 1990 . 2000 . ; run ; proc plot data=a ; plot pop*year ; title 'US Population (Millions) from decennial census' ; run ; /* quadratic regression */ proc reg data=a ; model pop = year yryr / covb ; title 'quadratic regression' ; run ; /* quadratic regression - centered x */ proc reg data=a ; model pop = yrc yyrrcc / covb ; title 'quadratic regression with centered variable' ; run ;