SET SEED 32476589. *You put in your own 8 digit number--then comment out the above line for subsequent runs. new file. input program. *Draw 120 cases, with 20 cases at each of 6 times. loop #1 = 1 to 120. *We'll first decide what time the case goes in. *This is very inelegant, cuz I don't have my manuals in my office. if #1 le 120 Time = 5. if #1 le 100 Time = 4. if #1 le 80 Time = 3. if #1 le 60 Time = 2. if #1 le 40 Time = 1. if #1 le 20 Time = 0. *Now we will generate a tentative PTSD score for each person. compute dv = rv.normal(0,1). end case. end loop. end file. end input program. save outfile = "calvin:lab2dat.sps" /keep time dv. *Replace the word "calvin," which is the name of my hard drive, with the name of your hard drive. *Now we have our basic data. *Now modify the data to build in a trend. If time = 0 dv = dv*3.95 + 5.19. If time = 1 dv = dv*4.28 + 7.96. If time = 2 dv = dv*3.25 + 9.15. If time = 3 dv = dv*3.87 + 8.90. If time = 4 dv = dv*4.10 + 6.80. If time = 5 dv = dv*3.63 + 5.25. save outfile = "calvin:lab2dat.sps" /keep Time dv. ONEWAY dv BY time(0 5) /POLYNOMIAL= 2 /HARMONIC NONE /STATISTICS DESCRIPTIVES /FORMAT NOLABELS /MISSING ANALYSIS .