*Computer Anxiety in Middle School Chlidren; /* The following procedure specifies value lables for variables */ PROC FORMAT; VALUE \$sex 'M'='Male' 'F'='Female'; VALUE exp 1='upto 1 year' 2='2-3 yrs' 3='3+ yrs'; VALUE school 1='rural' 2='city' 3='suburban'; DATA anxiety; INFILE clas; INPUT ID 1-2 SEX \$ 3 (EXP SCHOOL) (1.) (C1-C10) (1.) (M1-M10) (1.) MATHSCOR 28-29 COMPSCOR 30-31; FORMAT SEX \$SEX.; FORMAT EXP EXP.; FORMAT SCHOOL SCHOOL.; /*Conditional transformation */ IF MATHSCOR=99 THEN MATHSCOR=.; IF COMPSCOR=99 THEN COMPSCOR=.; /* Recoding variables. Several items are to be reversed while scoring. */ /* The Likert type questionnaire had a choice range of 1-5 */ C3=6-C3; C5=6-C5; C6=6-C6; C10=6-C10; M3=6-M3; M7=6-M7; M8=6-M8; M9=6-M9; COMPOPI = SUM (OF C1-C10) /*FIND SUM OF 10 ITEMS USING SUM FUNCTION */; MATHATTI = M1+M2+M3+M4+M5+M6+M7+M8+M9+M10 /*ADDING ITEM BY ITEM */; LABEL ID='STUDENT IDENTIFICATION' SEX='STUDENT GENDER' EXP='YRS OF COMP EXPERIENCE' SCHOOL='SCHOOL REPRESENTING' MATHSCOR='SCORE IN MATHEMATICS' COMPSCOR='SCORE IN COMPUTER SCIENCE' COMPOPI='TOTAL FOR COMP SURVEY' MATHATTI='TOTAL FOR MATH ATTI SCALE'; PROC PRINT; VAR EXP SCHOOL MATHSCOR COMPSCOR COMPOPI MATHATTI; TITLE 'LISTING OF THE VARIABLES'; PROC FREQ DATA=ANXIETY; TABLES SEX EXP SCHOOL; TABLES (EXP SCHOOL)*SEX; TITLE 'FREQUENCY COUNT'; PROC MEANS DATA=ANXIETY; VAR COMPOPI MATHATTI MATHSCOR COMPSCOR; TITLE 'DESCRIPTIVE STATICTS FOR CONTINUOUS VARIABLES'; * The following step creates a data subset with males alone; DATA MALES; SET ANXIETY; IF SEX EQ 'M'; /* Sorting the data based on school to use the the variable SCHOOL */ /* on the BY statment under PROC MEANS */ PROC SORT DATA=MALES; BY SCHOOL; PROC MEANS DATA=MALES; BY SCHOOL; VAR COMPOPI MATHATTI MATHSCOR COMPSCOR; RUN;