1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;5556 /* 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 secondscpu time 0.01 secondsNOTE: 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 secondscpu time 0.00 secondsNOTE: 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 secondscpu time 0.01 secondsNOTE: 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 secondscpu time 0.00 seconds106 /* Variables in long3 are Participant Condition Feedback Nasalance Time Subject */107NOTE: 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 secondscpu time 0.00 seconds108 proc print data=long3(obs=190); /* Just the first 190 lines */109NOTE: There were 190 observations read from the data set WORK.LONG3.NOTE: PROCEDURE PRINT used (Total process time):real time 0.33 secondscpu time 0.34 seconds110 proc freq data=long3;111 tables participant feedback;112NOTE: There were 1800 observations read from the data set WORK.LONG3.NOTE: PROCEDURE FREQ used (Total process time):real time 0.06 secondscpu time 0.06 seconds113 proc means data=long3;114 class Feedback; var Nasalance;115 output out=meanz mean=AveNasalance;116NOTE: 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 secondscpu time 0.05 seconds117 proc print data = meanz;118NOTE: There were 22 observations read from the data set WORK.MEANZ.NOTE: PROCEDURE PRINT used (Total process time):real time 0.03 secondscpu time 0.03 seconds119 proc sgplot data=meanz;120 title2 'Mean Nasalance as a Function of Feedback';121 scatter x=Feedback y=AveNasalance;122123 proc reg data=long3 plots=none;NOTE: PROCEDURE SGPLOT used (Total process time):real time 2.55 secondscpu time 0.10 secondsNOTE: 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 = resid127 rstudent = delstud;128 /* Deleted Studentized Residual */129NOTE: The data set WORK.LONGER has 1800 observations and 8 variables.NOTE: PROCEDURE REG used (Total process time):real time 0.06 secondscpu time 0.06 seconds130 proc arima data=longer;131 title2 'Time series diagnostics on the residals';132 identify var=resid;133NOTE: 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 secondscpu time 0.25 seconds134 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;139140NOTE: 5 observations are not included because of missing values.NOTE: Convergence criteria met.NOTE: PROCEDURE MIXED used (Total process time):real time 0.31 secondscpu time 0.30 seconds141 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;146147 /* The numbers match up PERFECTLY, except of course there is no LR chi-square. */148NOTE: 5 observations are not included because of missing values.NOTE: Convergence criteria met.NOTE: PROCEDURE MIXED used (Total process time):real time 0.07 secondscpu time 0.07 seconds149 proc mixed cl data=long3;150 title2 'Just AR(1) with proc mixed';151 model Nasalance = Feedback;152 repeated / type=ar(1) subject=Participant;153NOTE: 5 observations are not included because of missing values.NOTE: Convergence criteria met.NOTE: PROCEDURE MIXED used (Total process time):real time 0.36 secondscpu time 0.36 seconds154 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;160161162163164165166167168169170171172173174175 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;187