Below are the infant mortality rates for whites per 1,000 live births from 1921 to 1970 in the United States. The data are presented in two forms. The first is a form that can be read by R and the second is a form that can be read by SAS. For the R version, simply copy and paste the code into Notepad (or other text editor), and then save the file in your R_Working_Directory as a txt file. Your R program for this assignment will ask you to select a data set, and you will then select this file when prompted. To use the SAS version, you will need to copy and paste the data directly into your program in the SAS editor.
# FIRST IS THE R VERSION
# DATA SET... WHITE INFANT MORTALITY RATES 1921-70 IN THE USA
year whiteinfantmortality
1921 72.5
1922 73.2
1923 73.5
1924 66.8
1925 68.3
1926 70.0
1927 60.6
1928 64.0
1929 63.2
1930 60.1
1931 57.4
1932 53.3
1933 52.8
1934 54.5
1935 51.9
1936 52.9
1937 50.3
1938 47.1
1939 44.3
1940 43.2
1941 41.2
1942 37.3
1943 37.5
1944 36.9
1945 35.6
1946 31.8
1947 30.1
1948 29.9
1949 28.9
1950 26.8
1951 25.8
1952 25.5
1953 25.0
1954 23.9
1955 23.6
1956 23.2
1957 23.3
1958 23.8
1959 23.2
1960 22.9
1961 22.4
1962 22.3
1963 22.2
1964 21.6
1965 21.5
1966 20.6
1967 19.7
1968 19.2
1969 18.4
1970 17.8
* BELOW IS THE SAS VERSION;
************************************************************
*** DATA SET... WHITE INFANT MORTALITY RATES 1921-70 *****
************************************************************;
DATA WCHILD;
INPUT YEAR 1-4 WHINFANT 6-10;
CARDS;
1921 72.5
1922 73.2
1923 73.5
1924 66.8
1925 68.3
1926 70.0
1927 60.6
1928 64.0
1929 63.2
1930 60.1
1931 57.4
1932 53.3
1933 52.8
1934 54.5
1935 51.9
1936 52.9
1937 50.3
1938 47.1
1939 44.3
1940 43.2
1941 41.2
1942 37.3
1943 37.5
1944 36.9
1945 35.6
1946 31.8
1947 30.1
1948 29.9
1949 28.9
1950 26.8
1951 25.8
1952 25.5
1953 25.0
1954 23.9
1955 23.6
1956 23.2
1957 23.3
1958 23.8
1959 23.2
1960 22.9
1961 22.4
1962 22.3
1963 22.2
1964 21.6
1965 21.5
1966 20.6
1967 19.7
1968 19.2
1969 18.4
1970 17.8
;
DATA WCHILD;SET;
LWHINFAN=LAG(WHINFANT);