1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 /* RepeatedMantids.sas */
57 title 'Mantids Data: Thanks to Stephanie Hill';
58
59 proc format;
60 value sexfmt 0 = 'Male' 1 = 'Female';
NOTE: Format SEXFMT is already on the library WORK.FORMATS.
NOTE: Format SEXFMT has been output.
61 value dfmt 1 = '1=8cm' 2 = '2=13cm' 3 = '3=18cm';
NOTE: Format DFMT is already on the library WORK.FORMATS.
NOTE: Format DFMT has been output.
62 value birdfmt 1='Vinny' 2='Chickpea' 3='Emily' 4='Bramble';
NOTE: Format BIRDFMT is already on the library WORK.FORMATS.
NOTE: Format BIRDFMT has been output.
63
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
64 data bugs; /* Univariate Data Read. Skip the first line. */
65 infile '/folders/myfolders/mantids.data.txt' firstobs=2;
66 input id Sex Order Predator Distance Calls;
67 format sex sexfmt. distance dfmt. Predator birdfmt. ;
68
NOTE: The infile '/folders/myfolders/mantids.data.txt' is:
Filename=/folders/myfolders/mantids.data.txt,
Owner Name=root,Group Name=vboxsf,
Access Permission=-rwxrwx---,
Last Modified=13Mar2016:16:48:35,
File Size (bytes)=7584
NOTE: 171 records were read from the infile '/folders/myfolders/mantids.data.txt'.
The minimum record length was 41.
The maximum record length was 43.
NOTE: The data set WORK.BUGS has 171 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds
69 proc freq;
70 tables sex*predator*distance / norow nocol nopercent missing;
71
NOTE: There were 171 observations read from the data set WORK.BUGS.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.07 seconds
cpu time 0.06 seconds
72 proc mixed;
73 title2 'Predator is a fixed effect';
74 class Sex Predator Distance;
75 model calls = Sex|Predator|Distance;
76 repeated / type=un subject=id;
77 lsmeans sex distance Predator*Distance;
78
79
NOTE: Convergence criteria met.
NOTE: PROCEDURE MIXED used (Total process time):
real time 0.13 seconds
cpu time 0.12 seconds
80 proc mixed cl; /* Confidence Limits for random effects */
81 title2 'Predator is a random effect';
82 class Sex Predator Distance;
83 model calls = Sex|Distance;
84 random Predator Predator*Sex Predator*Distance
85 Predator*Sex*Distance;
86 repeated / type=cs subject=id;
87
88
NOTE: Convergence criteria met.
NOTE: Estimated G matrix is not positive definite.
NOTE: PROCEDURE MIXED used (Total process time):
real time 0.12 seconds
cpu time 0.11 seconds
89 proc mixed cl;
90 title2 'No interactions of fixed effects factors with Predator';
91 class Sex Predator Distance;
92 model calls = Sex|Distance;
93 random Predator;
94 repeated / type=cs subject=id;
95 lsmeans sex;
96 lsmeans distance / pdiff tdiff adjust = bon;
97
98
99
100 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
112