options nodate pagesize=54 linesize=80; /* Read in the input file */ data mathlsd; * infile '../../../data/lsd.dat'; infile 'C:\data\mathlsd.dat'; input lsd math; /* Run the regression with dependent variable=math (score) and independent variable = lsd (concentration) */ proc reg; model math = lsd; run; /* Obtain the correlation between math and lsd */ proc corr; var math lsd; run; /* Obtain plot of data and regression line */ /* i=rl puts the linear regression line on plot v=star has plotting points for data as stars */ symbol1 i=rl v=star; proc gplot; plot math*lsd=1; run; quit;