***************Syntax File Follows**************** Comment Comments in syntax files can be very useful. Begin a Comment with "Comment" (you can also start with "****") Indenting each line, as I do, is a nice aesthetic touch to make comments easy to read. The Comment will continue until you enter a blank line OR have a period at the end of a line. To clarify, WARNING, a period at the end of any line in a Comment ends the Comment and any lines that follow won't be recognized as a Comment - SPSS will treat them as commands!! ************ I added this to visually end this comment - not necessary, but pretty. Comment The following creates new empty variables for the behavior observed by the first observer. It isn't necessary to do this, but it does allow you to easily define some features of the variables. numeric nobsa1 to nobsa60 (f8.0). VARIABLE LABELS nobsa1 'Recoded Behavior on Trial Observed 1' . execute. value labels nobsa1 1 'Freezing' 2 'Rearing' 3 'Face Touch' 4 'Grooming' 5 'Other'. execute. Comment The following runs a "do repeat" for the behaviors observed by the first observer turning the letter codes into numbers in order to give us more options when we run statistical analysis and puts the new numeric data into the variables there were just created above. do repeat x = obsa1 to obsa60/y = nobsa1 to nobsa60. RECODE x ('f'=1) INTO y . RECODE x ('F'=1) INTO y . RECODE x ('r'=2) INTO y . RECODE x ('R'=2) INTO y . RECODE x ('t'=3) INTO y . RECODE x ('T'=3) INTO y . RECODE x ('g'=4) INTO y . RECODE x ('G'=4) INTO y . RECODE x ('o'=5) INTO y . RECODE x ('O'=5) INTO y . end repeat. EXECUTE . Comment The following creates new empty variables for the behavior observed by the first observer. It isn't necessary to do this, but it does allow you to easily define some features of the variables. numeric nobsb1 to nobsb60 (f8.0). VARIABLE LABELS nobsb1 'Recoded Behavior on Trial Observed by 2' . execute. value labels nobsb1 1 'Freezing' 2 'Rearing' 3 'Face Touch' 4 'Grooming' 5 'Other'. execute. do repeat x = obsb1 to obsb60/y = nobsb1 to nobsb60. Comment The following runs a "do repeat" for the behaviors observed by the first observer turning the letter codes into numbers in order to give us more options when we run statistical analysis and puts the new numeric data into the variables there were just created above. RECODE x ('f'=1) INTO y . RECODE x ('F'=1) INTO y . RECODE x ('r'=2) INTO y . RECODE x ('R'=2) INTO y . RECODE x ('t'=3) INTO y . RECODE x ('T'=3) INTO y . RECODE x ('g'=4) INTO y . RECODE x ('G'=4) INTO y . RECODE x ('o'=5) INTO y . RECODE x ('O'=5) INTO y . end repeat. EXECUTE . Comment the following calculates the total number of times that each behvaior occured for observer A. numeric cobsaf (f8.0). execute. COUNT cobsaf = nobsa1 to nobsa60 (1) . VARIABLE LABELS cobsaf 'Count Observer A Freezes' . EXECUTE . numeric cobsar (f8.0). execute. COUNT cobsar = nobsa1 to nobsa60 (2) . VARIABLE LABELS cobsar 'Count Observer A Rears' . EXECUTE . numeric cobsat (f8.0). execute. COUNT cobsat = nobsa1 to nobsa60 (3) . VARIABLE LABELS cobsat 'Count Observer A Face Touches' . EXECUTE . numeric cobsag (f8.0). execute. COUNT cobsag = nobsa1 to nobsa60 (4) . VARIABLE LABELS cobsag 'Count Observer A Grooms' . EXECUTE . numeric cobsao (f8.0). execute. COUNT cobsao = nobsa1 to nobsa60 (5) . VARIABLE LABELS cobsao 'Count Observer A Others' . EXECUTE . Comment the following calculates the total number of times that each behvaior occured for observer B. numeric cobsbf (f8.0). execute. COUNT cobsbf = nobsb1 to nobsb60 (1) . VARIABLE LABELS cobsbf 'Count Observer B Freezes' . EXECUTE . numeric cobsbr (f8.0). execute. COUNT cobsbr = nobsb1 to nobsb60 (2) . VARIABLE LABELS cobsbr 'Count Observer B Rears' . EXECUTE . numeric cobsbt (f8.0). execute. COUNT cobsbt = nobsb1 to nobsb60 (3) . VARIABLE LABELS cobsbt 'Count Observer B Face Touches' . EXECUTE . numeric cobsbg (f8.0). execute. COUNT cobsbg = nobsb1 to nobsb60 (4) . VARIABLE LABELS cobsbg 'Count Observer B Grooms' . EXECUTE . numeric cobsbo (f8.0). execute. COUNT cobsbo = nobsb1 to nobsb60 (5) . VARIABLE LABELS cobsbo 'Count Observer B Others' . EXECUTE . Comment The following "computes" the percentage of times that each individual behavior occurred as Observed by Observer 1. COMPUTE pobsaf = cobsaf / 60 *100 . VARIABLE LABELS pobsaf 'Percent Observed Freezing for Observer 1' . EXECUTE . COMPUTE pobsar = cobsar / 60 *100 . VARIABLE LABELS pobsar 'Percent Observed Rearing for Observer 1' . EXECUTE . COMPUTE pobsat = cobsat / 60 *100 . VARIABLE LABELS pobsat 'Percent Observed Face Touches for Observer 1' . EXECUTE . COMPUTE pobsag = cobsag / 60 *100 . VARIABLE LABELS pobsag 'Percent Observed Grooms for Observer 1' . EXECUTE . COMPUTE pobsao = cobsao / 60 *100 . VARIABLE LABELS pobsao 'Percent Observed Other for Observer 1' . EXECUTE . Comment The following "computes" the percentage of times that each individual behavior occurred as Observed by Observer 2. COMPUTE pobsbf = cobsbf / 60 *100 . VARIABLE LABELS pobsbf 'Percent Observed Freezing for Observer 2' . EXECUTE . COMPUTE pobsbr = cobsbr / 60 *100 . VARIABLE LABELS pobsbr 'Percent Observed Rearing for Observer 2' . EXECUTE . COMPUTE pobsbt = cobsbt / 60 *100 . VARIABLE LABELS pobsbt 'Percent Observed Face Touches for Observer 2' . EXECUTE . COMPUTE pobsbg = cobsbg / 60 *100 . VARIABLE LABELS pobsbg 'Percent Observed Grooms for Observer 2' . EXECUTE . COMPUTE pobsbo = cobsbo / 60 *100 . VARIABLE LABELS pobsbo 'Percent Observed Other for Observer 2' . EXECUTE . Comment The following creates variables for times when observers agreed on Behavior (ag_) and total number of times the behavior was observed by either (tot_). Then runs a "compute" to enter the number 0 in each cell so that it contains data and is not seen as having missing data. numeric agf (f8.0). Variable labels agf 'Number of Times Agree on Freezing'. execute. compute agf=0. execute. numeric totf (f8.0). Variable labels totf 'Number of Times Either Saw Freezing'. execute. compute totf=0. execute. numeric agr (f8.0). Variable labels agr 'Number of Times Agree on Rearing'. execute. compute agr=0. execute. numeric totr (f8.0). Variable labels totr 'Number of Times Either Saw Rearing'. execute. compute totr=0. execute. numeric agt (f8.0). Variable labels agt 'Number of Times Agree on Face Touch'. execute. compute agt=0. execute. numeric tott (f8.0). Variable labels tott 'Number of Times Either Saw Face Touch'. execute. compute tott=0. execute. numeric agg (f8.0). Variable labels agg 'Number of Times Agree on Grooming'. execute. compute agg=0. execute. numeric totg (f8.0). Variable labels totg 'Amount of Times Either Saw Grooming'. execute. compute totg=0. execute. numeric ago (f8.0). Variable labels ago 'Number of Times Agree on Other'. execute. compute ago=0. execute. numeric toto (f8.0). Variable labels toto 'Number of Times Either Saw Other'. execute. compute toto=0. execute. Comment The following runs a "do repeat" which gives the number of times that the observers agreed and the total number of times each behavior was observed. do repeat x = nobsa1 to nobsa60/y = nobsb1 to nobsb60. if x = 1 and y = 1 agf = agf + 1. if x = 1 or y = 1 totf = totf + 1. if x = 2 and y = 2 agr = agr + 1. if x = 2 or y = 2 totr = totr + 1. if x = 3 and y = 3 agt = agt + 1. if x = 3 or y = 3 tott = tott + 1. if x = 4 and y = 4 agg = agg + 1. if x = 4 or y = 4 totg = totg + 1. if x = 5 and y = 5 ago = ago + 1. if x = 5 or y = 5 toto = toto + 1. end repeat. execute. Comment The following computes the percent agreement between both observers on each behavior. numeric pagf (f8.0). Variable labels pagf 'Percentage Agreement Freezing'. execute. numeric pagr (f8.0). Variable labels pagr 'Percentage Agreement Rearing'. execute. numeric pagt (f8.0). Variable labels pagt 'Percentage Agreement Face Touch'. execute. numeric pagg (f8.0). Variable labels pagg 'Percentage Agreement Grooming'. execute. numeric pago (f8.0). Variable labels pago 'Percentage Agreement Other'. execute. Comment The following calculates the percent agreement variable for each behavior which equals: (the amount of times the observes agreed) divided by (the total amount of times the behvior was recorded) multiplied by (100); when there were no instances of the observed behavior, percent agreement will be set to 100. IF (totf = 0) pagf = 100. IF (totf >0 ) pagf = agf/totf * 100. EXECUTE . IF (totr = 0) pagr = 100. IF (totr >0 ) pagr = agr/totr * 100. EXECUTE . IF (tott = 0) pagt = 100. IF (tott >0 ) pagt = agt/tott * 100. EXECUTE . IF (totg = 0) pagg = 100. IF (totg >0 ) pagg = agg/totg * 100. EXECUTE . IF (toto = 0) pago = 100. IF (toto >0 ) pago = ago/toto * 100. EXECUTE . Comment: The following runs 'examine' on the variables listed after "variables=" This command is used to obtain some descriptive statistics for the data set. EXAMINE VARIABLES=agf totf agr totr agt tott agg totg ago toto /PLOT NONE /PERCENTILES(5,10,25,50,75,90,95) /STATISTICS DESCRIPTIVES /CINTERVAL 95 /MISSING LISTWISE /NOTOTAL. Comment: The following 'recodes' dichotomize the agreement and total variables into whether each value is in the top or bottom half of the observed distribution. This will give you some dichotomous variables to play with. We "cheated" here by pre-running descriptive statistics to get the medians that are used below. Were you to try this on your own, you'd have to do the same thing - that is, run descriptives, decide how you want to establish your split and then enter the split value into the appropriate function. numeric diagf (f8.0). numeric ditotf (f8.0). numeric diagr (f8.0). numeric ditotr (f8.0). numeric diagt (f8.0). numeric ditott (f8.0). numeric diagg (f8.0). numeric ditotg (f8.0). numeric diago (f8.0). numeric ditoto (f8.0). RECODE agf (Lowest thru 12=0) (13 thru Highest=1) INTO diagf . VARIABLE LABELS diagf 'Dichotomized Freezing Agreement'. EXECUTE . RECODE totf (Lowest thru 25=0) (26 thru Highest=1) INTO ditotf . VARIABLE LABELS ditotf 'Dichotomized Freezing Total'. EXECUTE . RECODE agr (Lowest thru 1=0) (2 thru Highest=1) INTO diagr . VARIABLE LABELS diagr 'Dichotomized Rearing Agreement'. EXECUTE . RECODE totr (Lowest thru 4=0) (5 thru Highest=1) INTO ditotr . VARIABLE LABELS ditotr 'Dichotomized Rearing Total'. EXECUTE . RECODE agt (Lowest thru 3=0) (4 thru Highest=1) INTO diagt . VARIABLE LABELS diagt 'Dichotomized Touching Agreement'. EXECUTE . RECODE tott (Lowest thru 4=0) (5 thru Highest=1) INTO ditott . VARIABLE LABELS ditott 'Dichotomized Touching Total'. EXECUTE . RECODE agg (Lowest thru 1=0) (2 thru Highest=1) INTO diagg . VARIABLE LABELS diagg 'Dichotomized Grooming Agreement'. EXECUTE . RECODE totg (Lowest thru 2=0) (3 thru Highest=1) INTO ditotg . VARIABLE LABELS ditotg 'Dichotomized Grooming Total'. EXECUTE . RECODE ago (Lowest thru 24=0) (25 thru Highest=1) INTO diago . VARIABLE LABELS diago 'Dichotomized Other Agreement'. EXECUTE . RECODE toto (Lowest thru 36=0) (37 thru Highest=1) INTO ditoto . VARIABLE LABELS ditoto 'Dichotomized Other Total'. EXECUTE . Comment - Enjoy-Enjoy!! .