Below are the infant mortality rates for nonwhites 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... NONWHITE INFANT MORTALITY RATES 1921-70 IN THE USA
year nonwhiteinfantmortality
1921 108.5
1922 110.0
1923 117.4
1924 112.9
1925 110.8
1926 111.8
1927 100.1
1928 106.2
1929 102.2
1930 99.9
1931 93.1
1932 86.2
1933 91.3
1934 94.4
1935 83.2
1936 87.6
1937 83.2
1938 79.1
1939 74.2
1940 73.8
1941 74.8
1942 64.6
1943 62.5
1944 60.3
1945 57.0
1946 49.5
1947 48.5
1948 46.5
1949 47.3
1950 44.5
1951 44.8
1952 47.0
1953 44.7
1954 42.9
1955 42.8
1956 42.1
1957 43.7
1958 45.7
1959 44.0
1960 43.2
1961 40.7
1962 41.4
1963 41.5
1964 41.1
1965 40.3
1966 38.8
1967 35.9
1968 34.5
1969 32.9
1970 30.9
* BELOW IS THE SAS VERSION;
************************************************************
*** DATA SET... NONWHITE INFANT MORTALITY RATES 1921-70 *****
************************************************************;
DATA NWCHILD;
INPUT YEAR 1-4 NWINFANT 6-11;
CARDS;
1921 108.5
1922 110.0
1923 117.4
1924 112.9
1925 110.8
1926 111.8
1927 100.1
1928 106.2
1929 102.2
1930 99.9
1931 93.1
1932 86.2
1933 91.3
1934 94.4
1935 83.2
1936 87.6
1937 83.2
1938 79.1
1939 74.2
1940 73.8
1941 74.8
1942 64.6
1943 62.5
1944 60.3
1945 57.0
1946 49.5
1947 48.5
1948 46.5
1949 47.3
1950 44.5
1951 44.8
1952 47.0
1953 44.7
1954 42.9
1955 42.8
1956 42.1
1957 43.7
1958 45.7
1959 44.0
1960 43.2
1961 40.7
1962 41.4
1963 41.5
1964 41.1
1965 40.3
1966 38.8
1967 35.9
1968 34.5
1969 32.9
1970 30.9
;
DATA NWCHILD;SET;
LNWINFAN=LAG(NWINFANT);