Below are the proportions of national outlays for national defense from 1948 to 1968 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... NATIONAL DEFENSE OUTLAYS 1948-68
year defensespending
1948 .36
1949 .32
1950 .30
1951 .49
1952 .65
1953 .66
1954 .66
1955 .59
1956 .57
1957 .56
1958 .54
1959 .51
1960 .50
1961 .48
1962 .48
1963 .47
1964 .45
1965 .42
1966 .42
1967 .44
1968 .45

 

* BELOW IS THE SAS VERSION;

************************************************************
*** DATA SET... NATIONAL DEFENSE OUTLAYS 1948-68 *****
************************************************************;

DATA MILITARY;
INPUT YEAR 1-4 DEFENSE 6-9;
CARDS;
1948 .36
1949 .32
1950 .30
1951 .49
1952 .65
1953 .66
1954 .66
1955 .59
1956 .57
1957 .56
1958 .54
1959 .51
1960 .50
1961 .48
1962 .48
1963 .47
1964 .45
1965 .42
1966 .42
1967 .44
1968 .45
;
DATA MILITARY;SET;
LDEFENSE=LAG(DEFENSE);