Below are data for the labor union membership as a proportion of the total labor force from 1930 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..... Labor union membership as a proportion of total labor force
# from 1930-70 in the USA
year laborun
1930 6.8
1931 6.5
1932 6.0
1933 5.2
1934 5.9
1935 6.7
1936 7.4
1937 12.9
1938 14.6
1939 15.8
1940 15.5
1941 17.7
1942 17.2
1943 20.5
1944 21.4
1945 21.9
1946 23.6
1947 23.9
1948 23.1
1949 22.7
1950 22.3
1951 24.5
1952 24.2
1953 25.5
1954 25.4
1955 24.7
1956 25.2
1957 24.9
1958 24.2
1959 24.1
1960 23.6
1961 22.3
1962 22.6
1963 22.2
1964 22.2
1965 22.4
1966 22.7
1967 22.7
1968 23.0
1969 22.6
1970 22.6

 

* BELOW IS THE SAS VERSION;


***********************************************************;
*** DATA SET..... Labor Union Membership as a proportion of total labor force
*** from 1930-70 *****************
************************************************************;
DATA LABOR;
INPUT YEAR 1-4 LABORUN 6-10;
CARDS;
1930 6.8
1931 6.5
1932 6.0
1933 5.2
1934 5.9
1935 6.7
1936 7.4
1937 12.9
1938 14.6
1939 15.8
1940 15.5
1941 17.7
1942 17.2
1943 20.5
1944 21.4
1945 21.9
1946 23.6
1947 23.9
1948 23.1
1949 22.7
1950 22.3
1951 24.5
1952 24.2
1953 25.5
1954 25.4
1955 24.7
1956 25.2
1957 24.9
1958 24.2
1959 24.1
1960 23.6
1961 22.3
1962 22.6
1963 22.2
1964 22.2
1965 22.4
1966 22.7
1967 22.7
1968 23.0
1969 22.6
1970 22.6
;
DATA LABOR;SET;
LLABORUN=LAG(LABORUN);