*The variables are the state tax (c) on a pack of cigarettes; *and the percent of people that smoking in each state. *The last ten lines produce predictions for tax=10,...,100; data tax; input State $ tax smoke; datalines; Washington 81.5 22.3 Michigan 75.0 25.2 DC 65.0 18.2 RhodeIsland 61.0 23.0 Hawaii 60.0 19.5 Arizona 58.0 20.2 NewYork 56.0 23.3 Massachusetts 51.0 22.3 Connecticut 50.0 21.6 Minnesota 48.0 22.3 NorthDakota 44.0 21.4 Wisconsin 44.0 23.3 Illinois 44.0 23.9 Vermont 44.0 21.5 Texas 41.0 23.2 NewJersey 40.0 19.5 Oregon 38.0 21.5 California 37.0 19.3 Maine 37.0 24.4 Iowa 36.0 21.1 Maryland 36.0 20.4 Nevada 35.0 30.3 Nebraska 34.0 19.9 Florida 33.9 22.4 SouthDakota 33.0 21.7 Arkansas 31.5 26.6 Pennsylvania 31.0 23.8 Alaska 29.0 27.8 Idaho 28.0 19.8 Utah 26.5 15.1 NewHampshire 25.0 22.0 Kansas 24.0 21.6 Ohio 24.0 24.7 Delaware 24.0 27.0 Oklahoma 23.0 26.7 NewMexico 21.0 21.2 Colorado 20.0 23.9 Louisiana 20.0 23.7 Montana 18.0 19.8 Mississippi 18.0 24.4 Missouri 17.0 25.3 WestVirginia 17.0 25.8 Alabama 16.5 20.2 Indiana 15.5 27.0 Tennessee 13.0 26.6 Wyoming 12.0 24.9 Georgia 12.0 21.7 SouthCarolina 7.0 26.1 NorthCarolina 5.0 26.3 Kentucky 3.0 29.3 Virginia 2.5 23.4 pred10 10 . pred20 20 . pred30 30 . pred40 40 . pred50 50 . pred60 60 . pred70 70 . pred80 80 . pred90 90 . pred100 100 . ;;; * Making predictions using the analyst window * * List of tax values for predictions. * To make predictions in SAS, open the analyst/simple * linear regression window. Then click "predictions", * check the "predict additional data" box, and select * the data set "newtax". Also, check "list predictions" * and "add prediction limits" got obtain confidence intervals * for the mean of y (not a particular y) at x.; data newtax; input tax; datalines; 10 20 30 40 50 60 70 80 90 100 ; * Making predictions using scripts * proc reg data=tax; model smoke=tax; output out=predictions p=yhat lcl=low_CI_indiv ucl=up_CI_indiv lclm=low_CI_mean uclm=up_CI_mean ; run; proc print data=predictions; run; quit;