GOPTIONS lfactor=10 hsize=6 in vsize=6 in horigin=1 in vorigin=1 in;
options nocenter;
**********************************************************;
* CLASS, NOTE THAT IF YOU BEGIN A LINE WITH AN ASTERISK *
* THEN YOU CAN PUT NOTES IN YOUR PROGRAM FILES. THIS IS
* LIKE A COMMENT CARD IN SPSS. HOWEVER, REMEMBER
* TO EVENTUALLY PUT A FINAL SEMICOLON AT THE END OF YOUR COMMENTS.;
***********************************************************;
* NOTE THAT I INDENT SOME STATEMENTS. THIS
* IS JUST FOR NEATNESS.;
***********************************************************;
* COPYRIGHT (c) Courtney Brown 2004, All Rights Reserved;
* Permission granted to use this file and computer code for any nonprofit and
* educational purposes, including classroom instruction.
* No further permission required.
* Please cite source as "From www.courtneybrown.com";
***********************************************************;
*** 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);
symbol1 color=black v=NONE f=centb i=join;
symbol2 color=black f=centb v='.' height=2 interpol=R;
symbol3 color=black f=centb v='.' height=2;

PROC REG;
MODEL LABORUN=LLABORUN;
PROC GPLOT;
axis1 color=black
value=(h=1.5 f=swissb c=black)
label=(h=1.3 a=90 r=0 f=swissb c=black 'Labor Union Membership at t+1');
axis2 color=black
value=(h=1.5 f=swissb c=black)
label=(h=1.3 f=swissb c=black 'Labor Union Membership at t');
PLOT LABORUN*LLABORUN=2 /
vaxis=axis1 haxis=axis2 vminor=0 hminor=0;
TITLE 'Figure 1a: Union Membership in the U.S. Labor Force';
DATA TRAJECT;
A=.939710;
B=1.550449;
Y1=6;
DO T=1 TO 41;
Y2=(A*Y1)+B;
OUTPUT;
Y1=Y2;
END;
PROC SORT;
BY T;
DATA LABOR;SET LABOR;
T=YEAR-1929;
DATA COMBINE;
MERGE TRAJECT LABOR;
BY T;
PROC PRINT;
TITLE 'Figure 1b: Union Membership in the U.S. Labor Force';
PROC GPLOT;
axis1 color=black
value=(h=1.5 f=swissb c=black)
label=(h=1.3 a=90 r=0 f=swissb c=black 'Labor Union Membership');
axis2 color=black
value=(h=1.5 f=swissb c=black)
label=(h=1.3 f=swissb c=black 'Year');
PLOT LABORUN*YEAR='A' Y2*YEAR=1 / overlay
vaxis=axis1 haxis=axis2 vminor=0 hminor=0;
run;
quit;