BMDP Example - One-way ANOVA

Following is a simple example on how to use the BMDP statistical software to run a ONEWAY ANOVA. The data was collected in the course of a study to investigate the computer anxiety in middle school children. The information collected from each student is identification number, gender, school system, previous computer experience, scores on two 10-item Likert type questionnaire (mathematics attitude scale, computer anxiety scale), math test score, and computer test score.

For the purpose of illustaration we will be using only two variables for this particular example, grade and mathatti. The research question is whether grade levels (7th, 8th and 9th grades) have any effect on mathematics attitude score.

The data file, clas.dat, is stored in the current directory.

The BMDP command file is given below. The format and variable names are defined through INPUT and VARIABLE paragraphs. The reversed items are recoded and the total scores for the two likert-type scales are summed up in the TRANSFORM paragraph. The program invoked to run the one-way anova is BMDP 7D. Suppose the following command lines are saved to a file, clasbmd1.inp, in the same directory along with the data file.

/COMMENT  'A Simple Example for one-way ANOVA using BMDP.
          The program invoked is BMDP7D'.

/PROBLEM  TITLE IS 'COMPUTER ANXIETY IN MIDDLE SCHOOL CHILDREN'.

/INPUT    VARAIBLES ARE 28.
          FORMAT IS '(F2.0,A1,4F1.0,20F1.0,2F2.0)'.
          FILE=clas.dat.

/VARIABLE NAMES ARE ID,SEX,AGE,GRADE,EXP,COUNTY,C1,C2,C3,C4,C5,C6,C7,
          C8,C9,C10,M1,M2,M3,M4,M5,M6,M7,M8,M9,M10,MATHSCOR,COMPSCOR.
          MISSING = (MATHSCOR)99, (COMPSCOR)99.
          BLANK=MISSING.  # default
          USE=GRADE, MATHATTI.

/TRANSFORM FOR I=C3,C5,C6,C10,M3,M7,M8,M9.
           % NEW|I=REC(I,1,5,2,4,3,3,4,2,5,1).%
           COMPOPI=SUM(C1,C2,NEWC3,C4,NEWC5,NEWC6,C7,C8,C9,NEWC10).
           MATHATTI=SUM(M1,M2,NEWM3,M4,M5,M6,NEWM7,NEWM8,NEWM9,M10).

/GROUP  CODES(GRADE) = 1,2,3.
        NAMES(GRADE) =seventh, eighth, ninth. 

/HISTOGRAM GROUPING=GRADE.
           VARIABLE=MATHATTI.
/END

To execute the job noninteractively, at the system prompt, type:

  bmdp 7d clasbmd1.inp clasbmd1.out &

The output will be stored in the current directory.