|
/*Reading
in data for the first lab session
-- note, enclosing text within this
combination of slash and asterisks
comments out
statements
(This is useful for keeping notes on what you are doing and what you
have done) */
DATA COCAINE_RAT;
INFILE "L:\Psyc
830\ratdata.txt";
LENGTH CONDITION $21.;
INPUT RAT LITTER CELL CONDITION $ MATERNAL_AGGRESSION;
RUN;
/*Proc contents tells you what variables are in the data set*/
PROC contents DATA=COCAINE_RAT;
RUN;
/* the print procedure shows you the data*/
PROC PRINT DATA=COCAINE_RAT;
RUN;
/* WE CAN COMPUTE THE CONDITION SPECIFIC MEANS OF MATERNAL
AGGRESSION */
PROC means DATA=COCAINE_RAT; class condition;
var
MATERNAL_AGGRESSION;
output out=coke_means mean=;
RUN;
/* WE CAN PLOT THE MEANS OF MATERNAL AGGRESSION BY CONDITION */
proc gplot data=coke_means;
goptions;
symbol1 value=dot color=steel interpol=join;
plot MATERNAL_AGGRESSION*condition;
run;
|