/* ------------------------------------------------------------------ FILE: rm.homework.sas DATA: (See belos). PURPOSE: Old homework assignment ------------------------------------------------------------------- */ * ----------------------------------------------- * | | The following program reads in a data set for | a two by three factorial ANOVA for an experiment | on the efficacy of three types of therapy for | depression. The first therapy is a control, | the second is is the standard clinical therapy, | the third is brief psychotherapy. The design of | the study is as follows: Therapy Sex: Control Clinic Brief |----------|----------|-----------| male | | | | |----------|----------|-----------| female | | | | |----------|----------|-----------| | There were 10 subjects per cell. Each subject was | measured at two time points by three individuals. | The first time point was immediately before the | first visit to the clinician. The second time point | was one week after therapy. The three raters are | the patient's clinician, a relative of the patient, | and the patient him(her)self. Hence, there are | six dependent variables. | | Your task is to make sense of the data. * ---------------------------------------------------*; proc format; value tfmt 1='Control' 2='Clinic' 3='Brief'; value sexfmt 1='Male' 2='Female'; run; data rm; input treatmnt sex crpre crpost rrpre rrpost srpre srpost; label crpre='Clinican--pretest' crpost='Clinician--posttest' rrpre='Relative--pretest' rrpost='Relative--posttest' srpre='Self--pretest' srpost='Self--posttest'; format treatmnt tfmt. sex sexfmt.; datalines; 1 1 57 49 78 41 82 53 1 1 38 29 56 41 30 37 1 1 28 21 34 27 45 23 1 1 34 32 32 28 30 38 1 1 20 35 42 49 26 37 1 1 48 52 52 57 34 59 1 1 50 32 52 33 61 24 1 1 53 45 38 47 48 62 1 1 57 54 60 47 68 48 1 1 62 69 46 48 51 44 1 2 71 40 42 61 53 45 1 2 32 52 34 36 50 41 1 2 45 34 67 49 60 45 1 2 52 47 57 57 57 48 1 2 64 57 47 34 54 69 1 2 65 58 51 54 75 49 1 2 62 75 88 79 88 75 1 2 29 52 51 42 51 53 1 2 68 68 68 80 80 69 1 2 74 41 56 57 57 61 2 1 77 40 45 41 58 49 2 1 41 52 41 30 65 37 2 1 35 31 57 16 54 39 2 1 46 33 58 44 39 53 2 1 56 55 44 43 71 64 2 1 64 48 44 48 63 59 2 1 62 43 59 64 73 66 2 1 60 47 65 45 66 63 2 1 58 32 12 17 43 44 2 1 27 50 40 34 50 25 2 2 58 73 76 56 87 47 2 2 80 57 73 62 80 81 2 2 28 57 53 28 50 62 2 2 46 53 52 51 48 45 2 2 24 42 36 73 53 51 2 2 35 27 21 24 42 25 2 2 48 70 62 43 80 65 2 2 42 26 45 35 12 27 2 2 64 45 62 43 57 55 2 2 87 64 78 62 64 61 3 1 43 38 20 33 45 27 3 1 62 25 54 34 52 40 3 1 47 24 46 40 59 23 3 1 48 16 41 16 31 15 3 1 44 50 63 39 44 42 3 1 41 28 31 26 57 36 3 1 49 30 32 -4 17 32 3 1 49 38 58 44 56 44 3 1 34 23 32 13 34 15 3 1 62 51 38 53 61 39 3 2 46 44 81 55 63 38 3 2 71 45 50 36 69 40 3 2 42 12 27 21 15 9 3 2 64 45 72 34 66 52 3 2 48 34 50 33 70 44 3 2 49 49 67 46 63 37 3 2 56 18 57 43 69 30 3 2 42 19 73 29 65 37 3 2 59 28 42 41 63 40 3 2 35 15 52 37 28 25 run;