1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 /* Nasalance.sas */
57 %include '/folders/myfolders/441s16/Lecture/ReadNasal.sas';
NOTE: The import data set has 11 observations and 181 variables.
NOTE: WORK.WIDE data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: There were 11 observations read from the data set WORK.WIDE.
NOTE: The data set WORK.LONG1 has 180 observations and 13 variables.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: There were 180 observations read from the data set WORK.LONG1.
NOTE: The data set WORK.LONG2 has 1800 observations and 30 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: There were 1800 observations read from the data set WORK.LONG2.
NOTE: The data set WORK.LONG2 has 1800 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
106 /* Variables in long3 are Participant Condition Feedback Nasalance Time Subject */
107
NOTE: There were 1800 observations read from the data set WORK.LONG2.
NOTE: The data set WORK.LONG3 has 1800 observations and 6 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
108 proc print data=long3(obs=190); /* Just the first 190 lines */
109
NOTE: There were 190 observations read from the data set WORK.LONG3.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.33 seconds
cpu time 0.34 seconds
110 proc freq data=long3;
111 tables participant feedback;
112
NOTE: There were 1800 observations read from the data set WORK.LONG3.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.06 seconds
cpu time 0.06 seconds
113 proc means data=long3;
114 class Feedback; var Nasalance;
115 output out=meanz mean=AveNasalance;
116
NOTE: There were 1800 observations read from the data set WORK.LONG3.
NOTE: The data set WORK.MEANZ has 22 observations and 4 variables.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.05 seconds
cpu time 0.05 seconds
117 proc print data = meanz;
118
NOTE: There were 22 observations read from the data set WORK.MEANZ.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
119 proc sgplot data=meanz;
120 title2 'Mean Nasalance as a Function of Feedback';
121 scatter x=Feedback y=AveNasalance;
122
123 proc reg data=long3 plots=none;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 2.55 seconds
cpu time 0.10 seconds
NOTE: There were 22 observations read from the data set WORK.MEANZ.
124 title2 'Naive regression but with Durbin-Watson';
125 model Nasalance = Feedback / dw;
126 output out = longer residual = resid
127 rstudent = delstud;
128 /* Deleted Studentized Residual */
129
NOTE: The data set WORK.LONGER has 1800 observations and 8 variables.
NOTE: PROCEDURE REG used (Total process time):
real time 0.06 seconds
cpu time 0.06 seconds
130 proc arima data=longer;
131 title2 'Time series diagnostics on the residals';
132 identify var=resid;
133
NOTE: Variable resid has embedded missing values.
NOTE: The presence of missing values places restrictions on the transfer function models that can be handled by PROC ARIMA.
NOTE: PROCEDURE ARIMA used (Total process time):
real time 1.67 seconds
cpu time 0.25 seconds
134 proc mixed cl data=long3;
135 title2 'CS directly with proc mixed';
136 /* class Feedback; */
137 model Nasalance = Feedback;
138 repeated / type=cs subject=Participant;
139
140
NOTE: 5 observations are not included because of missing values.
NOTE: Convergence criteria met.
NOTE: PROCEDURE MIXED used (Total process time):
real time 0.31 seconds
cpu time 0.30 seconds
141 proc mixed cl data=long3;
142 title2 'CS random shock per subject with proc mixed';
143 class Participant;
144 model Nasalance = Feedback;
145 random Participant;
146
147 /* The numbers match up PERFECTLY, except of course there is no LR chi-square. */
148
NOTE: 5 observations are not included because of missing values.
NOTE: Convergence criteria met.
NOTE: PROCEDURE MIXED used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds
149 proc mixed cl data=long3;
150 title2 'Just AR(1) with proc mixed';
151 model Nasalance = Feedback;
152 repeated / type=ar(1) subject=Participant;
153
NOTE: 5 observations are not included because of missing values.
NOTE: Convergence criteria met.
NOTE: PROCEDURE MIXED used (Total process time):
real time 0.36 seconds
cpu time 0.36 seconds
154 proc mixed cl data=long3;
155 title2 'Random shock from subject and AR(1) for errors';
156 class Participant;
157 model Nasalance = Feedback / solution; /* Solution gives beta-hat */
158 random Participant;
159 repeated / type=ar(1) subject=Participant;
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
187