├── .Rhistory ├── .gitattributes ├── README.md ├── _config.yml ├── data_AGING_example.csv ├── data_SCI_longitudinal_example.csv ├── index.Rmd ├── index.html ├── lohse_MER_chapter_the_last.Rmd ├── lohse_MER_chapter_the_last.html ├── lohse_MER_section_01_introduction.Rmd ├── lohse_MER_section_01_introduction.html ├── lohse_MER_section_02_longitudinal.Rmd ├── lohse_MER_section_02_longitudinal.html ├── lohse_MER_section_03_factorial.Rmd ├── lohse_MER_section_03_factorial.html ├── lohse_MER_section_04_multiple_sources.Rmd ├── lohse_MER_section_04_multiple_sources.html └── random_effects_paper ├── data_heart_rate.csv ├── data_longitudinal.csv ├── rt_dummy_data.csv ├── script_section_01_longitudinal_data.R ├── script_section_02_factorial_data.R └── script_section_03_multiple_sources.R /.Rhistory: -------------------------------------------------------------------------------- 1 | anova(cond_01) 2 | # Effect of AIS Grade on Time 3 | cond_01<-lmer(rasch_FIM~ 4 | # Fixed-effects 5 | 1+year.0*AIS_grade+year.0_sq*AIS_grade+year.0_cu*AIS_grade+ 6 | # Random-effects 7 | (1+year.0+year.0_sq+year.0_cu|subID), data=DAT2, REML=FALSE, 8 | control=lmerControl(optimizer="bobyqa", 9 | optCtrl=list(maxfun=5e5))) 10 | DAT2 <- read.csv("https://raw.githubusercontent.com/keithlohse/LMER_Clinical_Science/master/ACRM_2018/data/data_session1.csv", 11 | stringsAsFactors = TRUE) 12 | library(tidyverse); library(RCurl); library(ez); library(lme4); library(car) 13 | DATA <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/data_example.csv", 14 | stringsAsFactors = TRUE) 15 | data_TIME <- aggregate(speed ~ subID + time + age_group + group, data=DATA, FUN=mean) 16 | data_TIME <- data_TIME %>% arrange(subID, age_group, group, time) 17 | # Centering time on the first point and converting to years: 18 | DAT2$year.0 <- (DAT2$time-1)/12 19 | DAT2$year.0_sq<-DAT2$year.0^2 20 | DAT2$year.0_cu<-DAT2$year.0^3 21 | # Centering time on the mean time: 22 | DAT2$year.c <- scale(DAT2$time) 23 | DAT2$year.c_sq<-DAT2$year.c^2 24 | DAT2$year.c_cu<-DAT2$year.c^3 25 | # Random cubic slopes and intercepts model ---- 26 | raneff_03<-lmer(rasch_FIM~ 27 | # Fixed-effects 28 | 1+year.0+year.0_sq+year.0_cu+ 29 | # Random-effects 30 | (1+year.0+year.0_sq+year.0_cu|subID), data=DAT2, REML=FALSE, 31 | control=lmerControl(optimizer="bobyqa", 32 | optCtrl=list(maxfun=2e5))) 33 | summary(raneff_03) 34 | # Effect of AIS Grade on Time 35 | cond_01<-lmer(rasch_FIM~ 36 | # Fixed-effects 37 | 1+year.0*AIS_grade+year.0_sq*AIS_grade+year.0_cu*AIS_grade+ 38 | # Random-effects 39 | (1+year.0+year.0_sq+year.0_cu|subID), data=DAT2, REML=FALSE, 40 | control=lmerControl(optimizer="bobyqa", 41 | optCtrl=list(maxfun=5e5))) 42 | anova(raneff_03, cond_01) 43 | anova(cond_01) 44 | #Note that I actually prefer to use the Anova() function from the car package, where you can easily specify the type of SS calculation. 45 | Anova(cond_01, type="III") 46 | library(tidyverse); library(RCurl); library(ez); library(lme4); library(car); library(lmerTest) 47 | DATA <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/data_example.csv", 48 | stringsAsFactors = TRUE) 49 | data_TIME <- aggregate(speed ~ subID + time + age_group + group, data=DATA, FUN=mean) 50 | data_TIME <- data_TIME %>% arrange(subID, age_group, group, time) 51 | anova(cond_01) 52 | #Note that I actually prefer to use the Anova() function from the car package, where you can easily specify the type of SS calculation. 53 | Anova(cond_01, type="III") 54 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mixed_effects_models 2 | Resources for creating mixed-effcts models as analogues for ANOVA and for truly longitudinal models. 3 | DOI 4 | 5 | Chapter 01 - Introduction to Mixed-Effects Models 6 | (https://keithlohse.github.io/mixed_effects_models/lohse_MER_chapter_01.html) 7 | 8 | Chapter 02 - Mixed-Effect Models for Factorial Designs 9 | (https://keithlohse.github.io/mixed_effects_models/lohse_MER_chapter_02.html) 10 | 11 | Chapter 03 - Mixed-Effect Models for Time Series Data 12 | (https://keithlohse.github.io/mixed_effects_models/lohse_MER_chapter_03.html) 13 | 14 | Chapter 04 - Mixed-Effect Models for Time Series within Factorial Designs 15 | 16 | (Coming Soon) 17 | 18 | Chapter 05 - Checking Assumptions and Regression Diagnostics 19 | 20 | (Coming Soon) 21 | 22 | Chapter 06 - Further Readings and Recommendations 23 | 24 | (https://keithlohse.github.io/mixed_effects_models/lohse_MER_chapter_the_last.html) 25 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /data_AGING_example.csv: -------------------------------------------------------------------------------- 1 | subID,group,age_group,condition,time,speed 2 | s01,CG,OA,A,1,0.8 3 | s01,CG,OA,A,2,0.65 4 | s01,CG,OA,A,3,0.63 5 | s01,CG,OA,A,4,0.75 6 | s01,CG,OA,B,1,1.22 7 | s01,CG,OA,B,2,0.78 8 | s01,CG,OA,B,3,0.66 9 | s01,CG,OA,B,4,0.71 10 | s01,CG,OA,C,1,0.97 11 | s01,CG,OA,C,2,0.77 12 | s01,CG,OA,C,3,0.78 13 | s01,CG,OA,C,4,0.56 14 | s02,CG,OA,A,1,0.81 15 | s02,CG,OA,A,2,0.82 16 | s02,CG,OA,A,3,0.68 17 | s02,CG,OA,A,4,0.66 18 | s02,CG,OA,B,1,1.28 19 | s02,CG,OA,B,2,0.94 20 | s02,CG,OA,B,3,0.72 21 | s02,CG,OA,B,4,0.65 22 | s02,CG,OA,C,1,0.99 23 | s02,CG,OA,C,2,0.77 24 | s02,CG,OA,C,3,0.73 25 | s02,CG,OA,C,4,0.61 26 | s03,CG,OA,A,1,0.6 27 | s03,CG,OA,A,2,0.67 28 | s03,CG,OA,A,3,0.56 29 | s03,CG,OA,A,4,0.56 30 | s03,CG,OA,B,1,0.8 31 | s03,CG,OA,B,2,0.85 32 | s03,CG,OA,B,3,0.64 33 | s03,CG,OA,B,4,0.57 34 | s03,CG,OA,C,1,0.7 35 | s03,CG,OA,C,2,0.74 36 | s03,CG,OA,C,3,0.63 37 | s03,CG,OA,C,4,0.57 38 | s04,CG,OA,A,1,0.81 39 | s04,CG,OA,A,2,0.67 40 | s04,CG,OA,A,3,0.62 41 | s04,CG,OA,A,4,0.55 42 | s04,CG,OA,B,1,1.25 43 | s04,CG,OA,B,2,0.88 44 | s04,CG,OA,B,3,0.7 45 | s04,CG,OA,B,4,0.7 46 | s04,CG,OA,C,1,0.95 47 | s04,CG,OA,C,2,0.65 48 | s04,CG,OA,C,3,0.66 49 | s04,CG,OA,C,4,0.54 50 | s05,CG,OA,A,1,0.8 51 | s05,CG,OA,A,2,0.86 52 | s05,CG,OA,A,3,0.63 53 | s05,CG,OA,A,4,0.6 54 | s05,CG,OA,B,1,1.24 55 | s05,CG,OA,B,2,0.86 56 | s05,CG,OA,B,3,0.88 57 | s05,CG,OA,B,4,0.75 58 | s05,CG,OA,C,1,1.02 59 | s05,CG,OA,C,2,0.83 60 | s05,CG,OA,C,3,0.85 61 | s05,CG,OA,C,4,0.72 62 | s06,CG,OA,A,1,0.87 63 | s06,CG,OA,A,2,0.78 64 | s06,CG,OA,A,3,0.71 65 | s06,CG,OA,A,4,0.7 66 | s06,CG,OA,B,1,1.21 67 | s06,CG,OA,B,2,0.91 68 | s06,CG,OA,B,3,0.7 69 | s06,CG,OA,B,4,0.68 70 | s06,CG,OA,C,1,0.97 71 | s06,CG,OA,C,2,0.79 72 | s06,CG,OA,C,3,0.69 73 | s06,CG,OA,C,4,0.65 74 | s07,CG,OA,A,1,0.94 75 | s07,CG,OA,A,2,0.78 76 | s07,CG,OA,A,3,0.8 77 | s07,CG,OA,A,4,0.74 78 | s07,CG,OA,B,1,1.31 79 | s07,CG,OA,B,2,0.93 80 | s07,CG,OA,B,3,0.81 81 | s07,CG,OA,B,4,0.76 82 | s07,CG,OA,C,1,1.12 83 | s07,CG,OA,C,2,0.92 84 | s07,CG,OA,C,3,0.75 85 | s07,CG,OA,C,4,0.76 86 | s08,CG,OA,A,1,0.68 87 | s08,CG,OA,A,2,0.55 88 | s08,CG,OA,A,3,0.48 89 | s08,CG,OA,A,4,0.47 90 | s08,CG,OA,B,1,1.02 91 | s08,CG,OA,B,2,0.69 92 | s08,CG,OA,B,3,0.5 93 | s08,CG,OA,B,4,0.47 94 | s08,CG,OA,C,1,0.81 95 | s08,CG,OA,C,2,0.63 96 | s08,CG,OA,C,3,0.51 97 | s08,CG,OA,C,4,0.48 98 | s09,CG,OA,A,1,0.82 99 | s09,CG,OA,A,2,0.85 100 | s09,CG,OA,A,3,0.8 101 | s09,CG,OA,A,4,0.82 102 | s09,CG,OA,B,1,0.9 103 | s09,CG,OA,B,2,0.8 104 | s09,CG,OA,B,3,0.75 105 | s09,CG,OA,B,4,0.66 106 | s09,CG,OA,C,1,1.03 107 | s09,CG,OA,C,2,0.89 108 | s09,CG,OA,C,3,0.74 109 | s09,CG,OA,C,4,0.67 110 | s10,CG,OA,A,1,0.72 111 | s10,CG,OA,A,2,0.63 112 | s10,CG,OA,A,3,0.54 113 | s10,CG,OA,A,4,0.55 114 | s10,CG,OA,B,1,1.12 115 | s10,CG,OA,B,2,0.8 116 | s10,CG,OA,B,3,0.65 117 | s10,CG,OA,B,4,0.66 118 | s10,CG,OA,C,1,0.9 119 | s10,CG,OA,C,2,0.61 120 | s10,CG,OA,C,3,0.6 121 | s10,CG,OA,C,4,0.51 122 | s11,CG,YA,A,1,1.37 123 | s11,CG,YA,A,2,1.06 124 | s11,CG,YA,A,3,0.91 125 | s11,CG,YA,A,4,0.86 126 | s11,CG,YA,B,1,1.37 127 | s11,CG,YA,B,2,1.25 128 | s11,CG,YA,B,3,0.85 129 | s11,CG,YA,B,4,0.9 130 | s11,CG,YA,C,1,1.39 131 | s11,CG,YA,C,2,1.05 132 | s11,CG,YA,C,3,0.85 133 | s11,CG,YA,C,4,0.85 134 | s12,CG,YA,A,1,1.02 135 | s12,CG,YA,A,2,1.2 136 | s12,CG,YA,A,3,0.8 137 | s12,CG,YA,A,4,0.85 138 | s12,CG,YA,B,1,1.13 139 | s12,CG,YA,B,2,1.72 140 | s12,CG,YA,B,3,0.79 141 | s12,CG,YA,B,4,0.8 142 | s12,CG,YA,C,1,1.13 143 | s12,CG,YA,C,2,1.23 144 | s12,CG,YA,C,3,0.85 145 | s12,CG,YA,C,4,0.73 146 | s13,CG,YA,A,1,1.2 147 | s13,CG,YA,A,2,0.88 148 | s13,CG,YA,A,3,0.74 149 | s13,CG,YA,A,4,0.7 150 | s13,CG,YA,B,1,1.35 151 | s13,CG,YA,B,2,1.12 152 | s13,CG,YA,B,3,0.7 153 | s13,CG,YA,B,4,0.72 154 | s13,CG,YA,C,1,1.29 155 | s13,CG,YA,C,2,0.74 156 | s13,CG,YA,C,3,0.97 157 | s13,CG,YA,C,4,0.76 158 | s14,CG,YA,A,1,1.32 159 | s14,CG,YA,A,2,0.93 160 | s14,CG,YA,A,3,0.76 161 | s14,CG,YA,A,4,0.76 162 | s14,CG,YA,B,1,1.65 163 | s14,CG,YA,B,2,1.08 164 | s14,CG,YA,B,3,0.82 165 | s14,CG,YA,B,4,0.92 166 | s14,CG,YA,C,1,1.34 167 | s14,CG,YA,C,2,0.97 168 | s14,CG,YA,C,3,1.17 169 | s14,CG,YA,C,4,0.77 170 | s15,CG,YA,A,1,1.29 171 | s15,CG,YA,A,2,0.93 172 | s15,CG,YA,A,3,0.73 173 | s15,CG,YA,A,4,0.75 174 | s15,CG,YA,B,1,1.69 175 | s15,CG,YA,B,2,1.14 176 | s15,CG,YA,B,3,0.86 177 | s15,CG,YA,B,4,0.78 178 | s15,CG,YA,C,1,1.26 179 | s15,CG,YA,C,2,0.93 180 | s15,CG,YA,C,3,0.76 181 | s15,CG,YA,C,4,0.73 182 | s16,CG,YA,A,1,1.23 183 | s16,CG,YA,A,2,0.7 184 | s16,CG,YA,A,3,0.9 185 | s16,CG,YA,A,4,0.92 186 | s16,CG,YA,B,1,1.35 187 | s16,CG,YA,B,2,1.11 188 | s16,CG,YA,B,3,0.8 189 | s16,CG,YA,B,4,0.91 190 | s16,CG,YA,C,1,1.11 191 | s16,CG,YA,C,2,0.94 192 | s16,CG,YA,C,3,0.85 193 | s16,CG,YA,C,4,0.87 194 | s17,CG,YA,A,1,1.05 195 | s17,CG,YA,A,2,0.92 196 | s17,CG,YA,A,3,0.75 197 | s17,CG,YA,A,4,0.78 198 | s17,CG,YA,B,1,1.06 199 | s17,CG,YA,B,2,0.81 200 | s17,CG,YA,B,3,1.07 201 | s17,CG,YA,B,4,0.76 202 | s17,CG,YA,C,1,1.12 203 | s17,CG,YA,C,2,0.94 204 | s17,CG,YA,C,3,0.75 205 | s17,CG,YA,C,4,0.74 206 | s18,CG,YA,A,1,1.33 207 | s18,CG,YA,A,2,0.97 208 | s18,CG,YA,A,3,0.85 209 | s18,CG,YA,A,4,0.87 210 | s18,CG,YA,B,1,1.2 211 | s18,CG,YA,B,2,0.85 212 | s18,CG,YA,B,3,1.16 213 | s18,CG,YA,B,4,0.8 214 | s18,CG,YA,C,1,1.07 215 | s18,CG,YA,C,2,0.78 216 | s18,CG,YA,C,3,0.97 217 | s18,CG,YA,C,4,0.76 218 | s19,CG,YA,A,1,1.39 219 | s19,CG,YA,A,2,1.02 220 | s19,CG,YA,A,3,1.12 221 | s19,CG,YA,A,4,0.89 222 | s19,CG,YA,B,1,1.17 223 | s19,CG,YA,B,2,1.07 224 | s19,CG,YA,B,3,0.87 225 | s19,CG,YA,B,4,0.82 226 | s19,CG,YA,C,1,1.43 227 | s19,CG,YA,C,2,1.18 228 | s19,CG,YA,C,3,1.12 229 | s19,CG,YA,C,4,1.08 230 | s20,CG,YA,A,1,1.27 231 | s20,CG,YA,A,2,0.88 232 | s20,CG,YA,A,3,0.68 233 | s20,CG,YA,A,4,0.71 234 | s20,CG,YA,B,1,1.61 235 | s20,CG,YA,B,2,1.08 236 | s20,CG,YA,B,3,0.73 237 | s20,CG,YA,B,4,0.72 238 | s20,CG,YA,C,1,1.26 239 | s20,CG,YA,C,2,0.89 240 | s20,CG,YA,C,3,0.72 241 | s20,CG,YA,C,4,0.72 242 | s21,T,OA,A,1,0.65 243 | s21,T,OA,A,2,0.66 244 | s21,T,OA,A,3,0.65 245 | s21,T,OA,A,4,0.58 246 | s21,T,OA,B,1,1.03 247 | s21,T,OA,B,2,0.97 248 | s21,T,OA,B,3,1.05 249 | s21,T,OA,B,4,0.85 250 | s21,T,OA,C,1,0.85 251 | s21,T,OA,C,2,0.76 252 | s21,T,OA,C,3,0.69 253 | s21,T,OA,C,4,0.77 254 | s22,T,OA,A,1,0.81 255 | s22,T,OA,A,2,0.72 256 | s22,T,OA,A,3,0.78 257 | s22,T,OA,A,4,0.72 258 | s22,T,OA,B,1,1.17 259 | s22,T,OA,B,2,0.83 260 | s22,T,OA,B,3,0.63 261 | s22,T,OA,B,4,0.58 262 | s22,T,OA,C,1,0.78 263 | s22,T,OA,C,2,1.01 264 | s22,T,OA,C,3,0.99 265 | s22,T,OA,C,4,0.85 266 | s23,T,OA,A,1,1.03 267 | s23,T,OA,A,2,0.94 268 | s23,T,OA,A,3,0.84 269 | s23,T,OA,A,4,0.82 270 | s23,T,OA,B,1,1.4 271 | s23,T,OA,B,2,1.07 272 | s23,T,OA,B,3,0.88 273 | s23,T,OA,B,4,0.82 274 | s23,T,OA,C,1,1.22 275 | s23,T,OA,C,2,1.02 276 | s23,T,OA,C,3,0.81 277 | s23,T,OA,C,4,0.9 278 | s24,T,OA,A,1,0.83 279 | s24,T,OA,A,2,0.76 280 | s24,T,OA,A,3,0.66 281 | s24,T,OA,A,4,0.68 282 | s24,T,OA,B,1,0.86 283 | s24,T,OA,B,2,1.19 284 | s24,T,OA,B,3,0.68 285 | s24,T,OA,B,4,0.65 286 | s24,T,OA,C,1,1.04 287 | s24,T,OA,C,2,0.85 288 | s24,T,OA,C,3,0.79 289 | s24,T,OA,C,4,0.67 290 | s25,T,OA,A,1,0.83 291 | s25,T,OA,A,2,0.79 292 | s25,T,OA,A,3,0.61 293 | s25,T,OA,A,4,0.58 294 | s25,T,OA,B,1,1.21 295 | s25,T,OA,B,2,0.83 296 | s25,T,OA,B,3,0.63 297 | s25,T,OA,B,4,0.65 298 | s25,T,OA,C,1,0.98 299 | s25,T,OA,C,2,0.74 300 | s25,T,OA,C,3,0.68 301 | s25,T,OA,C,4,0.64 302 | s26,T,OA,A,1,0.8 303 | s26,T,OA,A,2,0.68 304 | s26,T,OA,A,3,0.62 305 | s26,T,OA,A,4,0.59 306 | s26,T,OA,B,1,1.17 307 | s26,T,OA,B,2,1.01 308 | s26,T,OA,B,3,0.86 309 | s26,T,OA,B,4,0.62 310 | s26,T,OA,C,1,1.18 311 | s26,T,OA,C,2,1.06 312 | s26,T,OA,C,3,0.59 313 | s26,T,OA,C,4,0.67 314 | s27,T,OA,A,1,0.62 315 | s27,T,OA,A,2,0.59 316 | s27,T,OA,A,3,0.5 317 | s27,T,OA,A,4,0.44 318 | s27,T,OA,B,1,0.97 319 | s27,T,OA,B,2,0.96 320 | s27,T,OA,B,3,0.58 321 | s27,T,OA,B,4,0.53 322 | s27,T,OA,C,1,0.84 323 | s27,T,OA,C,2,0.7 324 | s27,T,OA,C,3,0.5 325 | s27,T,OA,C,4,0.52 326 | s28,T,OA,A,1,0.72 327 | s28,T,OA,A,2,0.58 328 | s28,T,OA,A,3,0.51 329 | s28,T,OA,A,4,0.46 330 | s28,T,OA,B,1,1.14 331 | s28,T,OA,B,2,0.78 332 | s28,T,OA,B,3,0.51 333 | s28,T,OA,B,4,0.49 334 | s28,T,OA,C,1,0.87 335 | s28,T,OA,C,2,0.75 336 | s28,T,OA,C,3,0.58 337 | s28,T,OA,C,4,0.55 338 | s29,T,OA,A,1,0.88 339 | s29,T,OA,A,2,0.76 340 | s29,T,OA,A,3,0.73 341 | s29,T,OA,A,4,0.69 342 | s29,T,OA,B,1,1.28 343 | s29,T,OA,B,2,1.35 344 | s29,T,OA,B,3,0.93 345 | s29,T,OA,B,4,0.86 346 | s29,T,OA,C,1,1.13 347 | s29,T,OA,C,2,0.89 348 | s29,T,OA,C,3,0.81 349 | s29,T,OA,C,4,0.79 350 | s30,T,OA,A,1,0.86 351 | s30,T,OA,A,2,0.8 352 | s30,T,OA,A,3,0.74 353 | s30,T,OA,A,4,0.53 354 | s30,T,OA,B,1,1.27 355 | s30,T,OA,B,2,0.99 356 | s30,T,OA,B,3,1.03 357 | s30,T,OA,B,4,0.84 358 | s30,T,OA,C,1,1.08 359 | s30,T,OA,C,2,0.92 360 | s30,T,OA,C,3,0.8 361 | s30,T,OA,C,4,0.76 362 | s31,T,YA,A,1,1.52 363 | s31,T,YA,A,2,1.13 364 | s31,T,YA,A,3,1.5 365 | s31,T,YA,A,4,1.66 366 | s31,T,YA,B,1,1.15 367 | s31,T,YA,B,2,1.35 368 | s31,T,YA,B,3,1.03 369 | s31,T,YA,B,4,1.18 370 | s31,T,YA,C,1,1.43 371 | s31,T,YA,C,2,1.09 372 | s31,T,YA,C,3,0.97 373 | s31,T,YA,C,4,0.94 374 | s32,T,YA,A,1,0.96 375 | s32,T,YA,A,2,0.92 376 | s32,T,YA,A,3,0.68 377 | s32,T,YA,A,4,0.75 378 | s32,T,YA,B,1,1.66 379 | s32,T,YA,B,2,0.95 380 | s32,T,YA,B,3,0.86 381 | s32,T,YA,B,4,0.76 382 | s32,T,YA,C,1,1.31 383 | s32,T,YA,C,2,0.9 384 | s32,T,YA,C,3,0.79 385 | s32,T,YA,C,4,0.82 386 | s33,T,YA,A,1,0.92 387 | s33,T,YA,A,2,0.86 388 | s33,T,YA,A,3,0.96 389 | s33,T,YA,A,4,0.88 390 | s33,T,YA,B,1,0.91 391 | s33,T,YA,B,2,0.83 392 | s33,T,YA,B,3,0.81 393 | s33,T,YA,B,4,0.65 394 | s33,T,YA,C,1,1.4 395 | s33,T,YA,C,2,1.14 396 | s33,T,YA,C,3,0.91 397 | s33,T,YA,C,4,0.97 398 | s34,T,YA,A,1,0.7 399 | s34,T,YA,A,2,0.91 400 | s34,T,YA,A,3,0.76 401 | s34,T,YA,A,4,0.73 402 | s34,T,YA,B,1,0.7 403 | s34,T,YA,B,2,0.65 404 | s34,T,YA,B,3,0.68 405 | s34,T,YA,B,4,0.73 406 | s34,T,YA,C,1,0.77 407 | s34,T,YA,C,2,0.97 408 | s34,T,YA,C,3,0.75 409 | s34,T,YA,C,4,0.71 410 | s35,T,YA,A,1,1.29 411 | s35,T,YA,A,2,0.98 412 | s35,T,YA,A,3,0.8 413 | s35,T,YA,A,4,0.77 414 | s35,T,YA,B,1,1.43 415 | s35,T,YA,B,2,1.35 416 | s35,T,YA,B,3,0.81 417 | s35,T,YA,B,4,0.81 418 | s35,T,YA,C,1,1.37 419 | s35,T,YA,C,2,1.01 420 | s35,T,YA,C,3,0.76 421 | s35,T,YA,C,4,0.84 422 | s36,T,YA,A,1,1.5 423 | s36,T,YA,A,2,1.13 424 | s36,T,YA,A,3,0.92 425 | s36,T,YA,A,4,0.96 426 | s36,T,YA,B,1,1.91 427 | s36,T,YA,B,2,1.33 428 | s36,T,YA,B,3,1.03 429 | s36,T,YA,B,4,0.98 430 | s36,T,YA,C,1,1.42 431 | s36,T,YA,C,2,1.12 432 | s36,T,YA,C,3,0.87 433 | s36,T,YA,C,4,0.99 434 | s37,T,YA,A,1,1.44 435 | s37,T,YA,A,2,1.06 436 | s37,T,YA,A,3,0.95 437 | s37,T,YA,A,4,0.9 438 | s37,T,YA,B,1,1.77 439 | s37,T,YA,B,2,1.23 440 | s37,T,YA,B,3,0.91 441 | s37,T,YA,B,4,0.91 442 | s37,T,YA,C,1,1.41 443 | s37,T,YA,C,2,1.06 444 | s37,T,YA,C,3,1.15 445 | s37,T,YA,C,4,0.86 446 | s38,T,YA,A,1,1.31 447 | s38,T,YA,A,2,1.07 448 | s38,T,YA,A,3,0.85 449 | s38,T,YA,A,4,0.8 450 | s38,T,YA,B,1,1.52 451 | s38,T,YA,B,2,1.13 452 | s38,T,YA,B,3,0.89 453 | s38,T,YA,B,4,0.86 454 | s38,T,YA,C,1,1.31 455 | s38,T,YA,C,2,0.97 456 | s38,T,YA,C,3,0.78 457 | s38,T,YA,C,4,0.8 458 | s39,T,YA,A,1,1.08 459 | s39,T,YA,A,2,1.36 460 | s39,T,YA,A,3,0.9 461 | s39,T,YA,A,4,0.93 462 | s39,T,YA,B,1,1.2 463 | s39,T,YA,B,2,1.83 464 | s39,T,YA,B,3,1.04 465 | s39,T,YA,B,4,0.81 466 | s39,T,YA,C,1,1.04 467 | s39,T,YA,C,2,1.53 468 | s39,T,YA,C,3,0.92 469 | s39,T,YA,C,4,0.86 470 | s40,T,YA,A,1,1.32 471 | s40,T,YA,A,2,0.82 472 | s40,T,YA,A,3,0.6 473 | s40,T,YA,A,4,0.93 474 | s40,T,YA,B,1,1.56 475 | s40,T,YA,B,2,1.01 476 | s40,T,YA,B,3,0.68 477 | s40,T,YA,B,4,0.68 478 | s40,T,YA,C,1,1.15 479 | s40,T,YA,C,2,1.05 480 | s40,T,YA,C,3,0.64 481 | s40,T,YA,C,4,0.93 482 | -------------------------------------------------------------------------------- /data_SCI_longitudinal_example.csv: -------------------------------------------------------------------------------- 1 | subID,site,AIS_grade,month,time,sex,rasch_FIM,rasch_FIM_MAR,rasch_FIM_MNAR,rasch_FIM_LOCF 2 | s01,D,C5-8,1,1.16,f,12.56,12.56,12.56,12.56 3 | s01,D,C5-8,2,2.58,f,24.85446658,24.85446658,24.85446658,24.85446658 4 | s01,D,C5-8,3,3.69,f,40.27862925,,40.27862925,40.27862925 5 | s01,D,C5-8,4,4.92,f,43.86893316,,43.86893316,43.86893316 6 | s01,D,C5-8,5,5.16,f,47.66534385,,47.66534385,47.66534385 7 | s01,D,C5-8,6,6.63,f,49.11309583,49.11309583,,47.66534385 8 | s01,D,C5-8,7,7.23,f,43.9870163,43.9870163,,47.66534385 9 | s01,D,C5-8,8,8.63,f,46.54339974,,,47.66534385 10 | s01,D,C5-8,9,9.37,f,45.35725849,45.35725849,,47.66534385 11 | s01,D,C5-8,10,10.41,f,48.11981043,,,47.66534385 12 | s01,D,C5-8,11,11.38,f,50.7075872,,,47.66534385 13 | s01,D,C5-8,12,12.49,f,49.88756241,,49.88756241,49.88756241 14 | s01,D,C5-8,13,13.4,f,54.2002201,,,49.88756241 15 | s01,D,C5-8,14,14.83,f,52.44148288,,,49.88756241 16 | s01,D,C5-8,15,15.21,f,55.9439731,,55.9439731,55.9439731 17 | s01,D,C5-8,16,16.16,f,55.09786632,,,55.9439731 18 | s01,D,C5-8,17,17.36,f,55.1514855,,55.1514855,55.1514855 19 | s01,D,C5-8,18,19.13,f,54.65172507,,,55.1514855 20 | s02,B,T1-S5,1,1.43,f,38.32666667,38.32666667,38.32666667,38.32666667 21 | s02,B,T1-S5,2,2.36,f,31.48194535,,31.48194535,31.48194535 22 | s02,B,T1-S5,3,3.84,f,44.24141032,,44.24141032,44.24141032 23 | s02,B,T1-S5,4,4.23,f,53.8453,,53.8453,53.8453 24 | s02,B,T1-S5,5,5.62,f,51.02152,,51.02152,51.02152 25 | s02,B,T1-S5,6,6.39,f,63.8453,,63.8453,63.8453 26 | s02,B,T1-S5,7,7.06,f,68.74535,,,63.8453 27 | s02,B,T1-S5,8,8.19,f,70.85624,,70.85624,70.85624 28 | s02,B,T1-S5,9,9.53,f,73.43536,73.43536,,70.85624 29 | s02,B,T1-S5,10,10.55,f,74.09358,,,70.85624 30 | s02,B,T1-S5,11,11.97,f,75.02343,75.02343,,70.85624 31 | s02,B,T1-S5,12,12.86,f,76.57812,,,70.85624 32 | s02,B,T1-S5,13,13.19,f,74.73453,74.73453,,70.85624 33 | s02,B,T1-S5,14,14.76,f,76.453222,,,70.85624 34 | s02,B,T1-S5,15,15.93,f,80.021111,80.021111,,70.85624 35 | s02,B,T1-S5,16,16.21,f,78.78635,,,70.85624 36 | s02,B,T1-S5,17,17.38,f,79.1115,,,70.85624 37 | s02,B,T1-S5,18,19.27,f,81.91324,81.91324,,70.85624 38 | s03,D,C5-8,1,1.26,f,8.03333333,8.03333333,8.03333333,8.03333333 39 | s03,D,C5-8,2,2.14,f,24.46231766,,24.46231766,24.46231766 40 | s03,D,C5-8,3,3.03,f,28.27085241,,28.27085241,28.27085241 41 | s03,D,C5-8,4,4.85,f,32.55130198,32.55130198,,28.27085241 42 | s03,D,C5-8,5,5.07,f,38.88622751,38.88622751,38.88622751,38.88622751 43 | s03,D,C5-8,6,6.89,f,40.83983673,,,38.88622751 44 | s03,D,C5-8,7,7.45,f,44.21707775,,44.21707775,44.21707775 45 | s03,D,C5-8,8,8.86,f,43.76028631,,43.76028631,43.76028631 46 | s03,D,C5-8,9,9.94,f,47.32837149,,,43.76028631 47 | s03,D,C5-8,10,10.59,f,47.73521184,,,43.76028631 48 | s03,D,C5-8,11,11.77,f,51.67923675,51.67923675,,43.76028631 49 | s03,D,C5-8,12,12.54,f,52.18882106,52.18882106,,43.76028631 50 | s03,D,C5-8,13,13.92,f,55.20551292,,,43.76028631 51 | s03,D,C5-8,14,14.06,f,54.64606207,,,43.76028631 52 | s03,D,C5-8,15,15,f,57.02374659,,,43.76028631 53 | s03,D,C5-8,16,16.84,f,62.19564,,,43.76028631 54 | s03,D,C5-8,17,17.69,f,63.98676,63.98676,,43.76028631 55 | s03,D,C5-8,18,18.13,f,62.1346,62.1346,,43.76028631 56 | s04,B,C1-4,1,1.45,m,6.08,,6.08,6.08 57 | s04,B,C1-4,2,2.33,m,8.16076094,8.16076094,8.16076094,8.16076094 58 | s04,B,C1-4,3,3.08,m,18.01585382,18.01585382,18.01585382,18.01585382 59 | s04,B,C1-4,4,4.64,m,20.74152188,,20.74152188,20.74152188 60 | s04,B,C1-4,5,5.25,m,26.12421968,,26.12421968,26.12421968 61 | s04,B,C1-4,6,6.04,m,26.93661476,26.93661476,26.93661476,26.93661476 62 | s04,B,C1-4,7,7.9,m,28.91883659,,28.91883659,28.91883659 63 | s04,B,C1-4,8,8.64,m,31.90228283,,,28.91883659 64 | s04,B,C1-4,9,9.41,m,33.97170765,,33.97170765,33.97170765 65 | s04,B,C1-4,10,10.66,m,35.60498062,35.60498062,,33.97170765 66 | s04,B,C1-4,11,11.09,m,35.06337775,35.06337775,,33.97170765 67 | s04,B,C1-4,12,12.2,m,35.91737571,35.91737571,,33.97170765 68 | s04,B,C1-4,13,13.22,m,35.99011882,,,33.97170765 69 | s04,B,C1-4,14,14.9,m,36.91959754,,,33.97170765 70 | s04,B,C1-4,15,15.51,m,35.5200735,,,33.97170765 71 | s04,B,C1-4,16,16.69,m,35.02304377,,35.02304377,35.02304377 72 | s04,B,C1-4,17,17.03,m,36.69791219,,,35.02304377 73 | s04,B,C1-4,18,18.15,m,36.41246859,,,35.02304377 74 | s05,D,C1-4,1,1.19,f,18.17646,18.17646,18.17646,18.17646 75 | s05,D,C1-4,2,2.64,f,21.48911,,21.48911,21.48911 76 | s05,D,C1-4,3,3.63,f,23.48030015,,23.48030015,23.48030015 77 | s05,D,C1-4,4,4.99,f,30.88625953,,,23.48030015 78 | s05,D,C1-4,5,5.41,f,38.965987,,38.965987,38.965987 79 | s05,D,C1-4,6,6.62,f,46.29009658,46.29009658,,38.965987 80 | s05,D,C1-4,7,7.6,f,50.3589595,,50.3589595,50.3589595 81 | s05,D,C1-4,8,8.71,f,52.12667685,,,50.3589595 82 | s05,D,C1-4,9,9.78,f,53.19989301,53.19989301,,50.3589595 83 | s05,D,C1-4,10,10.07,f,57.20070446,57.20070446,,50.3589595 84 | s05,D,C1-4,11,12,f,62.12667685,,,50.3589595 85 | s05,D,C1-4,12,12.41,f,63.19989301,,,50.3589595 86 | s05,D,C1-4,13,13.51,f,60.20070446,,,50.3589595 87 | s05,D,C1-4,14,14.58,f,61.64875593,,,50.3589595 88 | s05,D,C1-4,15,15.9,f,60.97962049,,,50.3589595 89 | s05,D,C1-4,16,16.95,f,59.62585239,,,50.3589595 90 | s05,D,C1-4,17,17.78,f,62.0377202,,,50.3589595 91 | s05,D,C1-4,18,19.79,f,62.28373007,,,50.3589595 92 | s06,C,C5-8,1,1.14,f,5.933,5.933,5.933,5.933 93 | s06,C,C5-8,2,2.4,f,20.84972894,,20.84972894,20.84972894 94 | s06,C,C5-8,3,3.7,f,28.27640326,,28.27640326,28.27640326 95 | s06,C,C5-8,4,4.2,f,36.19343715,,,28.27640326 96 | s06,C,C5-8,5,5.22,f,38.48252014,,38.48252014,38.48252014 97 | s06,C,C5-8,6,6.26,f,40.75947318,,40.75947318,40.75947318 98 | s06,C,C5-8,7,7.81,f,41.84487147,,,40.75947318 99 | s06,C,C5-8,8,8.87,f,43.08765566,,,40.75947318 100 | s06,C,C5-8,9,9.01,f,50.75947318,,,40.75947318 101 | s06,C,C5-8,10,10.33,f,51.84487147,51.84487147,51.84487147,51.84487147 102 | s06,C,C5-8,11,11.59,f,53.08765566,,,51.84487147 103 | s06,C,C5-8,12,12.21,f,53.14919446,,,51.84487147 104 | s06,C,C5-8,13,13.59,f,53.64571549,53.64571549,,51.84487147 105 | s06,C,C5-8,14,14.98,f,54.48983275,,54.48983275,54.48983275 106 | s06,C,C5-8,15,15.07,f,57.23154579,57.23154579,,54.48983275 107 | s06,C,C5-8,16,16.09,f,57.01891574,57.01891574,,54.48983275 108 | s06,C,C5-8,17,17.78,f,56.85853613,,56.85853613,56.85853613 109 | s06,C,C5-8,18,19.1,f,58.31586878,58.31586878,,56.85853613 110 | s07,C,C5-8,1,1.74,f,15.42666667,15.42666667,15.42666667,15.42666667 111 | s07,C,C5-8,2,2.3,f,25.91565099,,25.91565099,25.91565099 112 | s07,C,C5-8,3,3.05,f,32.08418574,32.08418574,32.08418574,32.08418574 113 | s07,C,C5-8,4,4.73,f,38.40463532,,38.40463532,38.40463532 114 | s07,C,C5-8,5,5.64,f,44.37956085,,44.37956085,44.37956085 115 | s07,C,C5-8,6,6,f,52.91317007,,,44.37956085 116 | s07,C,C5-8,7,7.13,f,55.99041108,55.99041108,,44.37956085 117 | s07,C,C5-8,8,8.89,f,57.57361964,,,44.37956085 118 | s07,C,C5-8,9,9.49,f,61.60170482,,,44.37956085 119 | s07,C,C5-8,10,10.53,f,61.58854517,61.58854517,,44.37956085 120 | s07,C,C5-8,11,11.22,f,64.87257009,,,44.37956085 121 | s07,C,C5-8,12,12.09,f,67.74215439,,,44.37956085 122 | s07,C,C5-8,13,13.68,f,65.67884626,65.67884626,,44.37956085 123 | s07,C,C5-8,14,14.05,f,68.01939541,,,44.37956085 124 | s07,C,C5-8,15,15.02,f,69.77707992,,,44.37956085 125 | s07,C,C5-8,16,16.22,f,70.90260397,,70.90260397,70.90260397 126 | s07,C,C5-8,17,17.14,f,72.84472284,,,70.90260397 127 | s07,C,C5-8,18,18.48,f,72.47068914,,,70.90260397 128 | s08,D,C5-8,1,1.13,f,8.79334,8.79334,8.79334,8.79334 129 | s08,D,C5-8,2,2.04,f,25.71347,,25.71347,25.71347 130 | s08,D,C5-8,3,3.25,f,35.24696682,,35.24696682,35.24696682 131 | s08,D,C5-8,4,4.36,f,41.23292619,41.23292619,,35.24696682 132 | s08,D,C5-8,5,5.91,f,43.75265367,43.75265367,,35.24696682 133 | s08,D,C5-8,6,6.38,f,48.29676325,,48.29676325,48.29676325 134 | s08,D,C5-8,7,7.96,f,52.44562617,,52.44562617,52.44562617 135 | s08,D,C5-8,8,8.08,f,53.96272263,53.96272263,53.96272263,53.96272263 136 | s08,D,C5-8,9,9.98,f,57.4824501,57.4824501,,53.96272263 137 | s08,D,C5-8,10,10.09,f,60.09334352,,,53.96272263 138 | s08,D,C5-8,11,11.72,f,63.62635,63.62635,,53.96272263 139 | s08,D,C5-8,12,12.14,f,65.92628715,,65.92628715,65.92628715 140 | s08,D,C5-8,13,13.35,f,69.3504,69.3504,,65.92628715 141 | s08,D,C5-8,14,14.69,f,72.3135,72.3135,,65.92628715 142 | s08,D,C5-8,15,15.21,f,70.18729,,,65.92628715 143 | s08,D,C5-8,16,16.61,f,71.5553,71.5553,,65.92628715 144 | s08,D,C5-8,17,17.27,f,72.07832,,,65.92628715 145 | s08,D,C5-8,18,19.98,f,72.09432,,,65.92628715 146 | s09,A,C1-4,1,1.61,f,6.62,,6.62,6.62 147 | s09,A,C1-4,2,2.64,f,18.08817222,18.08817222,18.08817222,18.08817222 148 | s09,A,C1-4,3,3.72,f,21.22140467,,21.22140467,21.22140467 149 | s09,A,C1-4,4,4.65,f,24.13634444,24.13634444,24.13634444,24.13634444 150 | s09,A,C1-4,5,5.63,f,30.94646803,,,24.13634444 151 | s09,A,C1-4,6,6.5,f,33.08957689,,33.08957689,33.08957689 152 | s09,A,C1-4,7,7.06,f,31.795196,,,33.08957689 153 | s09,A,C1-4,8,8.06,f,33.56451666,33.56451666,33.56451666,33.56451666 154 | s09,A,C1-4,9,9.28,f,32.30817,,,33.56451666 155 | s09,A,C1-4,10,10.26,f,30.784322,,30.784322,30.784322 156 | s09,A,C1-4,11,11.16,f,31.65179666,,,30.784322 157 | s09,A,C1-4,12,12.78,f,30.87774911,30.87774911,,30.784322 158 | s09,A,C1-4,13,13.82,f,32.55032139,,,30.784322 159 | s09,A,C1-4,14,14.27,f,30.20336822,,,30.784322 160 | s09,A,C1-4,15,15.72,f,31.60787269,,,30.784322 161 | s09,A,C1-4,16,16.36,f,31.55268888,31.55268888,,30.784322 162 | s09,A,C1-4,17,17.32,f,32.74505881,32.74505881,32.74505881,32.74505881 163 | s09,A,C1-4,18,18.88,f,32.21098156,,,32.74505881 164 | s10,C,C1-4,1,1.21,f,4.32,,4.32,4.32 165 | s10,C,C1-4,2,2.15,f,15.82817222,15.82817222,15.82817222,15.82817222 166 | s10,C,C1-4,3,4,f,19.14140467,19.14140467,19.14140467,19.14140467 167 | s10,C,C1-4,4,4.94,f,25.51634444,,25.51634444,25.51634444 168 | s10,C,C1-4,5,5,f,29.22646803,,29.22646803,29.22646803 169 | s10,C,C1-4,6,6.79,f,29.50957689,29.50957689,,29.22646803 170 | s10,C,C1-4,7,7.27,f,31.595196,,,29.22646803 171 | s10,C,C1-4,8,8.49,f,35.40451666,,,29.22646803 172 | s10,C,C1-4,9,9.39,f,34.42280934,,,29.22646803 173 | s10,C,C1-4,10,10.17,f,36.13464025,36.13464025,,29.22646803 174 | s10,C,C1-4,11,11.39,f,38.43179666,,,29.22646803 175 | s10,C,C1-4,12,12.52,f,39.77774911,,,29.22646803 176 | s10,C,C1-4,13,13.5,f,42.23032139,,,29.22646803 177 | s10,C,C1-4,14,14.23,f,39.74336822,,,29.22646803 178 | s10,C,C1-4,15,15.34,f,41.78787269,,,29.22646803 179 | s10,C,C1-4,16,16.86,f,45.11268888,,,29.22646803 180 | s10,C,C1-4,17,17.62,f,44.18505881,44.18505881,,29.22646803 181 | s10,C,C1-4,18,19.24,f,45.13098156,,,29.22646803 182 | s11,B,C5-8,1,1.5,m,18.01333333,,18.01333333,18.01333333 183 | s11,B,C5-8,2,2.67,m,31.19135315,,31.19135315,31.19135315 184 | s11,B,C5-8,3,3.66,m,38.04863207,,38.04863207,38.04863207 185 | s11,B,C5-8,4,4.11,m,43.54937296,,,38.04863207 186 | s11,B,C5-8,5,5.42,m,48.36132817,48.36132817,,38.04863207 187 | s11,B,C5-8,6,6.17,m,50.86665189,50.86665189,50.86665189,50.86665189 188 | s11,B,C5-8,7,8,m,51.05053399,,51.05053399,51.05053399 189 | s11,B,C5-8,8,8.68,m,53.80739278,53.80739278,,51.05053399 190 | s11,B,C5-8,9,9.8,m,55.04393081,,,51.05053399 191 | s11,B,C5-8,10,10.61,m,59.31934799,59.31934799,,51.05053399 192 | s11,B,C5-8,11,11.31,m,61.17586919,61.17586919,61.17586919,61.17586919 193 | s11,B,C5-8,12,12.09,m,63.5446717,63.5446717,63.5446717,63.5446717 194 | s11,B,C5-8,13,13.94,m,63.8494319,,,63.5446717 195 | s11,B,C5-8,14,14.16,m,65.3885538,65.3885538,,63.5446717 196 | s11,B,C5-8,15,15.71,m,64.61662691,,64.61662691,64.61662691 197 | s11,B,C5-8,16,16.95,m,68.78541259,68.78541259,,64.61662691 198 | s11,B,C5-8,17,17.45,m,67.40453086,,,64.61662691 199 | s11,B,C5-8,18,19.13,m,67.20195062,,,64.61662691 200 | s12,B,C5-8,1,1.99,m,12.68666667,,12.68666667,12.68666667 201 | s12,B,C5-8,2,2.56,m,27.23209776,,27.23209776,27.23209776 202 | s12,B,C5-8,3,3.11,m,31.02751625,,31.02751625,31.02751625 203 | s12,B,C5-8,4,4.2,m,36.67752885,,36.67752885,36.67752885 204 | s12,B,C5-8,5,5.06,m,43.27690986,,43.27690986,43.27690986 205 | s12,B,C5-8,6,6.6,m,48.77294734,,48.77294734,48.77294734 206 | s12,B,C5-8,7,7.95,m,51.16022672,51.16022672,,48.77294734 207 | s12,B,C5-8,8,8.76,m,55.30295994,,55.30295994,55.30295994 208 | s12,B,C5-8,9,9.71,m,52.96836583,,,55.30295994 209 | s12,B,C5-8,10,10.2,m,54.94234095,,,55.30295994 210 | s12,B,C5-8,11,11.6,m,52.69762143,,52.69762143,52.69762143 211 | s12,B,C5-8,12,12.57,m,54.01837843,,,52.69762143 212 | s12,B,C5-8,13,13.34,m,54.4829678,,54.4829678,54.4829678 213 | s12,B,C5-8,14,14.89,m,55.64565782,,,54.4829678 214 | s12,B,C5-8,15,15.6,m,53.33775944,53.33775944,,54.4829678 215 | s12,B,C5-8,16,16.79,m,55.96839103,,,54.4829678 216 | s12,B,C5-8,17,17.43,m,57.46501081,,,54.4829678 217 | s12,B,C5-8,18,19.09,m,55.99379693,55.99379693,,54.4829678 218 | s13,A,C5-8,1,1.61,m,5.56666667,,5.56666667,5.56666667 219 | s13,A,C5-8,2,2.26,m,8.56736,,8.56736,8.56736 220 | s13,A,C5-8,3,3.98,m,12.44851,,12.44851,12.44851 221 | s13,A,C5-8,4,4.52,m,18.14756,18.14756,,12.44851 222 | s13,A,C5-8,5,5.82,m,23.43088634,,23.43088634,23.43088634 223 | s13,A,C5-8,6,6.11,m,27.26328143,27.26328143,,23.43088634 224 | s13,A,C5-8,7,7.14,m,27.16550326,,27.16550326,27.16550326 225 | s13,A,C5-8,8,8.26,m,29.76894949,,29.76894949,29.76894949 226 | s13,A,C5-8,9,9.76,m,33.27837431,,,29.76894949 227 | s13,A,C5-8,10,10.54,m,35.21164728,,,29.76894949 228 | s13,A,C5-8,11,12,m,34.51004441,,,29.76894949 229 | s13,A,C5-8,12,12.3,m,36.74404237,,,29.76894949 230 | s13,A,C5-8,13,13.55,m,40.29678549,,,29.76894949 231 | s13,A,C5-8,14,14.73,m,42.0062642,42.0062642,,29.76894949 232 | s13,A,C5-8,15,15.19,m,42.80674017,,,29.76894949 233 | s13,A,C5-8,16,16.21,m,40.00971043,,,29.76894949 234 | s13,A,C5-8,17,17.17,m,40.14457885,,,29.76894949 235 | s13,A,C5-8,18,19.84,m,40.35913525,40.35913525,,29.76894949 236 | s14,B,T1-S5,1,1.21,m,5.74654,5.74654,5.74654,5.74654 237 | s14,B,T1-S5,2,2.61,m,28.1107,,28.1107,28.1107 238 | s14,B,T1-S5,3,3.23,m,35.52308,35.52308,35.52308,35.52308 239 | s14,B,T1-S5,4,4.06,m,49.85367081,,,35.52308 240 | s14,B,T1-S5,5,5.09,m,53.98711118,53.98711118,53.98711118,53.98711118 241 | s14,B,T1-S5,6,6.04,m,55.74657764,,,53.98711118 242 | s14,B,T1-S5,7,7.73,m,56.0871392,56.0871392,,53.98711118 243 | s14,B,T1-S5,8,8.23,m,62.11717288,,,53.98711118 244 | s14,B,T1-S5,9,9.78,m,70.69948448,70.69948448,,53.98711118 245 | s14,B,T1-S5,10,10.13,m,72.93061325,72.93061325,72.93061325,72.93061325 246 | s14,B,T1-S5,11,11.12,m,71.7908863,71.7908863,,72.93061325 247 | s14,B,T1-S5,12,12.51,m,70.19080574,70.19080574,,72.93061325 248 | s14,B,T1-S5,13,13.45,m,71.36352009,,71.36352009,71.36352009 249 | s14,B,T1-S5,14,14.07,m,73.22067494,73.22067494,,71.36352009 250 | s14,B,T1-S5,15,15.05,m,74.75129352,74.75129352,,71.36352009 251 | s14,B,T1-S5,16,16.35,m,75.86298655,,,71.36352009 252 | s14,B,T1-S5,17,17.22,m,78.3422,78.3422,,71.36352009 253 | s14,B,T1-S5,18,19.85,m,78.01552,,,71.36352009 254 | s15,B,C5-8,1,1.68,m,29.24666667,,29.24666667,29.24666667 255 | s15,B,C5-8,2,2.49,m,28.6466155,,28.6466155,28.6466155 256 | s15,B,C5-8,3,3.16,m,32.12640608,,32.12640608,32.12640608 257 | s15,B,C5-8,4,4.07,m,30.40656434,30.40656434,30.40656434,30.40656434 258 | s15,B,C5-8,5,5.47,m,42.86446019,,,30.40656434 259 | s15,B,C5-8,6,6.12,m,46.20635492,46.20635492,46.20635492,46.20635492 260 | s15,B,C5-8,7,7.08,m,46.57695484,,46.57695484,46.57695484 261 | s15,B,C5-8,8,8.39,m,49.36651318,49.36651318,49.36651318,49.36651318 262 | s15,B,C5-8,9,9.77,m,51.7261455,,,49.36651318 263 | s15,B,C5-8,10,10.02,m,52.18440902,,,49.36651318 264 | s15,B,C5-8,11,11.46,m,54.55593765,54.55593765,,49.36651318 265 | s15,B,C5-8,12,12.63,m,56.68630375,56.68630375,,49.36651318 266 | s15,B,C5-8,13,13.99,m,56.71492729,,,49.36651318 267 | s15,B,C5-8,14,14.8,m,57.43690368,,,49.36651318 268 | s15,B,C5-8,15,15.62,m,58.1041996,,58.1041996,58.1041996 269 | s15,B,C5-8,16,16.07,m,61.32646201,61.32646201,,58.1041996 270 | s15,B,C5-8,17,17.91,m,61.59158149,61.59158149,61.59158149,61.59158149 271 | s15,B,C5-8,18,19.38,m,60.56609433,60.56609433,,61.59158149 272 | s16,D,C5-8,1,1.33,m,14.28666667,,14.28666667,14.28666667 273 | s16,D,C5-8,2,2.51,m,26.37290986,26.37290986,26.37290986,26.37290986 274 | s16,D,C5-8,3,3.13,m,34.00363066,34.00363066,34.00363066,34.00363066 275 | s16,D,C5-8,4,4.1,m,37.49915306,37.49915306,37.49915306,37.49915306 276 | s16,D,C5-8,5,5.13,m,42.62333601,,42.62333601,42.62333601 277 | s16,D,C5-8,6,6.01,m,44.72987386,,,42.62333601 278 | s16,D,C5-8,7,7.73,m,47.12877514,47.12877514,,42.62333601 279 | s16,D,C5-8,8,8.22,m,49.22539626,49.22539626,,42.62333601 280 | s16,D,C5-8,9,9.74,m,50.18059465,50.18059465,,42.62333601 281 | s16,D,C5-8,10,10.43,m,54.48957921,54.48957921,,42.62333601 282 | s16,D,C5-8,11,11.18,m,52.4117282,52.4117282,,42.62333601 283 | s16,D,C5-8,12,12.39,m,53.99611705,,53.99611705,53.99611705 284 | s16,D,C5-8,13,13.31,m,54.944826,54.944826,,53.99611705 285 | s16,D,C5-8,14,14.93,m,57.15501834,57.15501834,57.15501834,57.15501834 286 | s16,D,C5-8,15,15.34,m,57.6003,,57.6003,57.6003 287 | s16,D,C5-8,16,16.2,m,62.17163946,,62.17163946,62.17163946 288 | s16,D,C5-8,17,17.3,m,59.81800818,,,62.17163946 289 | s16,D,C5-8,18,18.49,m,63.34683785,,,62.17163946 290 | s17,A,T1-S5,1,1.04,f,30.25333333,,30.25333333,30.25333333 291 | s17,A,T1-S5,2,2.34,f,35.07328217,,35.07328217,35.07328217 292 | s17,A,T1-S5,3,3.2,f,37.97307275,37.97307275,37.97307275,37.97307275 293 | s17,A,T1-S5,4,4.17,f,45.59323101,,,37.97307275 294 | s17,A,T1-S5,5,5.23,f,45.53112685,,,37.97307275 295 | s17,A,T1-S5,6,6.77,f,51.29302158,51.29302158,51.29302158,51.29302158 296 | s17,A,T1-S5,7,7.26,f,51.94362151,51.94362151,,51.29302158 297 | s17,A,T1-S5,8,8.76,f,55.19317984,,,51.29302158 298 | s17,A,T1-S5,9,9.94,f,56.71281216,56.71281216,56.71281216,56.71281216 299 | s17,A,T1-S5,10,10.99,f,57.23107569,57.23107569,,56.71281216 300 | s17,A,T1-S5,11,11.14,f,59.92260432,59.92260432,,56.71281216 301 | s17,A,T1-S5,12,12.64,f,61.25297042,,61.25297042,61.25297042 302 | s17,A,T1-S5,13,13.15,f,59.98159395,59.98159395,,61.25297042 303 | s17,A,T1-S5,14,14.51,f,60.50357035,,,61.25297042 304 | s17,A,T1-S5,15,15.25,f,64.19086627,,,61.25297042 305 | s17,A,T1-S5,16,16.55,f,64.03312868,64.03312868,,61.25297042 306 | s17,A,T1-S5,17,17.27,f,66.27824816,,,61.25297042 307 | s17,A,T1-S5,18,19.79,f,65.412761,,,61.25297042 308 | s18,B,C5-8,1,1.45,m,16.92666667,,16.92666667,16.92666667 309 | s18,B,C5-8,2,2.78,m,30.14742761,30.14742761,30.14742761,30.14742761 310 | s18,B,C5-8,3,3.95,m,35.40252049,35.40252049,35.40252049,35.40252049 311 | s18,B,C5-8,4,4.32,m,40.88818855,40.88818855,40.88818855,40.88818855 312 | s18,B,C5-8,5,5.91,m,45.79088634,45.79088634,45.79088634,45.79088634 313 | s18,B,C5-8,6,6.37,m,49.20328143,49.20328143,,45.79088634 314 | s18,B,C5-8,7,7.36,m,54.10550326,54.10550326,,45.79088634 315 | s18,B,C5-8,8,8.38,m,58.36894949,,,45.79088634 316 | s18,B,C5-8,9,9.16,m,63.89837431,63.89837431,,45.79088634 317 | s18,B,C5-8,10,10.22,m,66.07164728,,,45.79088634 318 | s18,B,C5-8,11,11.53,m,65.13004441,,,45.79088634 319 | s18,B,C5-8,12,12.55,m,64.52404237,,,45.79088634 320 | s18,B,C5-8,13,13.3,m,61.49678549,,,45.79088634 321 | s18,B,C5-8,14,14.18,m,63.0462642,,,45.79088634 322 | s18,B,C5-8,15,15.93,m,61.08674017,,,45.79088634 323 | s18,B,C5-8,16,16.11,m,62.44971043,62.44971043,,45.79088634 324 | s18,B,C5-8,17,17.42,m,61.66457885,,,45.79088634 325 | s18,B,C5-8,18,19.93,m,62.11913525,,,45.79088634 326 | s19,A,C5-8,1,1.1,m,17.66666667,,17.66666667,17.66666667 327 | s19,A,C5-8,2,2.29,m,29.47565099,,29.47565099,29.47565099 328 | s19,A,C5-8,3,3.73,m,34.60418574,34.60418574,34.60418574,34.60418574 329 | s19,A,C5-8,4,4.32,m,40.50463532,40.50463532,40.50463532,40.50463532 330 | s19,A,C5-8,5,5.31,m,44.93956085,44.93956085,44.93956085,44.93956085 331 | s19,A,C5-8,6,6.99,m,45.99317007,,45.99317007,45.99317007 332 | s19,A,C5-8,7,7.97,m,50.13041108,,,45.99317007 333 | s19,A,C5-8,8,8.83,m,52.51361964,52.51361964,,45.99317007 334 | s19,A,C5-8,9,9.83,m,51.34170482,,,45.99317007 335 | s19,A,C5-8,10,10.89,m,54.42854517,54.42854517,,45.99317007 336 | s19,A,C5-8,11,11.05,m,55.43257009,55.43257009,,45.99317007 337 | s19,A,C5-8,12,12.01,m,58.10215439,,,45.99317007 338 | s19,A,C5-8,13,13.51,m,58.65884626,58.65884626,,45.99317007 339 | s19,A,C5-8,14,14.85,m,59.99939541,59.99939541,59.99939541,59.99939541 340 | s19,A,C5-8,15,15.03,m,62.37707992,,,59.99939541 341 | s19,A,C5-8,16,16.19,m,64.04260397,64.04260397,,59.99939541 342 | s19,A,C5-8,17,17.45,m,61.74472284,,,59.99939541 343 | s19,A,C5-8,18,18.15,m,62.51068914,,,59.99939541 344 | s20,D,T1-S5,1,1.59,f,15.62666667,,15.62666667,15.62666667 345 | s20,D,T1-S5,2,2.22,f,31.51483889,31.51483889,31.51483889,31.51483889 346 | s20,D,T1-S5,3,3.2,f,36.42807133,,36.42807133,36.42807133 347 | s20,D,T1-S5,4,4.3,f,42.34301111,42.34301111,42.34301111,42.34301111 348 | s20,D,T1-S5,5,5.24,f,44.65313469,,44.65313469,44.65313469 349 | s20,D,T1-S5,6,6.93,f,46.59624355,,46.59624355,46.59624355 350 | s20,D,T1-S5,7,7.39,f,49.86186266,,,46.59624355 351 | s20,D,T1-S5,8,8.37,f,52.63118333,,52.63118333,52.63118333 352 | s20,D,T1-S5,9,9.81,f,52.289476,,,52.63118333 353 | s20,D,T1-S5,10,10.2,f,53.84130691,53.84130691,,52.63118333 354 | s20,D,T1-S5,11,11.28,f,56.97846332,56.97846332,,52.63118333 355 | s20,D,T1-S5,12,12.06,f,55.24441577,55.24441577,,52.63118333 356 | s20,D,T1-S5,13,13.59,f,57.17698806,,,52.63118333 357 | s20,D,T1-S5,14,14.37,f,58.07003488,58.07003488,,52.63118333 358 | s20,D,T1-S5,15,15,f,58.95453936,,,52.63118333 359 | s20,D,T1-S5,16,16.93,f,61.97935554,61.97935554,,52.63118333 360 | s20,D,T1-S5,17,17.49,f,60.47172548,,,52.63118333 361 | s20,D,T1-S5,18,19.01,f,63.27764822,63.27764822,,52.63118333 362 | s21,A,C5-8,1,1.52,f,14.09333333,14.09333333,14.09333333,14.09333333 363 | s21,A,C5-8,2,2.56,f,27.66587089,,27.66587089,27.66587089 364 | s21,A,C5-8,3,3.09,f,35.1875219,,35.1875219,35.1875219 365 | s21,A,C5-8,4,4.42,f,40.11840845,,40.11840845,40.11840845 366 | s21,A,C5-8,5,5.32,f,43.4688785,,,40.11840845 367 | s21,A,C5-8,6,6.66,f,45.92005946,,,40.11840845 368 | s21,A,C5-8,7,7.22,f,50.88726211,50.88726211,,40.11840845 369 | s21,A,C5-8,8,8.95,f,52.95094601,,,40.11840845 370 | s21,A,C5-8,9,9.67,f,55.44171047,55.44171047,,40.11840845 371 | s21,A,C5-8,10,10.85,f,57.06141606,57.06141606,,40.11840845 372 | s21,A,C5-8,11,11.34,f,57.03418541,,,40.11840845 373 | s21,A,C5-8,12,12.08,f,61.27259702,,,40.11840845 374 | s21,A,C5-8,13,13.48,f,62.34139138,,,40.11840845 375 | s21,A,C5-8,14,14.32,f,63.07979966,,,40.11840845 376 | s21,A,C5-8,15,15.64,f,64.28306707,64.28306707,,40.11840845 377 | s21,A,C5-8,16,16.52,f,67.10348357,67.10348357,,40.11840845 378 | s21,A,C5-8,17,17.1,f,67.69110153,,67.69110153,67.69110153 379 | s21,A,C5-8,18,19.63,f,67.23424803,67.23424803,,67.69110153 380 | s22,A,C1-4,1,1.38,f,7.353333333,7.353333333,7.353333333,7.353333333 381 | s22,A,C1-4,2,2,f,19.98861202,,19.98861202,19.98861202 382 | s22,A,C1-4,3,3.36,f,28.78807699,,28.78807699,28.78807699 383 | s22,A,C1-4,4,4.9,f,27.08433,,27.08433,27.08433 384 | s22,A,C1-4,5,5.41,f,28.40510334,,28.40510334,28.40510334 385 | s22,A,C1-4,6,6.21,f,27.48335567,,27.48335567,27.48335567 386 | s22,A,C1-4,7,7.34,f,26.36889805,26.36889805,,27.48335567 387 | s22,A,C1-4,8,8.36,f,27.43916939,,,27.48335567 388 | s22,A,C1-4,9,9.16,f,28.46282064,28.46282064,,27.48335567 389 | s22,A,C1-4,10,10.3,f,28.06038203,,,27.48335567 390 | s22,A,C1-4,11,11.26,f,27.5550273,27.5550273,,27.48335567 391 | s22,A,C1-4,12,12.15,f,27.79863436,27.79863436,,27.48335567 392 | s22,A,C1-4,13,13.11,f,27.97541164,27.97541164,,27.48335567 393 | s22,A,C1-4,14,14.84,f,28.22417673,,,27.48335567 394 | s22,A,C1-4,15,15.26,f,29.45984699,29.45984699,29.45984699,29.45984699 395 | s22,A,C1-4,16,16.84,f,28.97444808,28.97444808,,29.45984699 396 | s22,A,C1-4,17,17.26,f,28.6178162,28.6178162,28.6178162,28.6178162 397 | s22,A,C1-4,18,19.11,f,28.81809933,,,28.6178162 398 | s23,A,C5-8,1,1.27,f,12.39333333,,12.39333333,12.39333333 399 | s23,A,C5-8,2,2.5,f,21.68779991,21.68779991,21.68779991,21.68779991 400 | s23,A,C5-8,3,3.16,f,28.81196258,,28.81196258,28.81196258 401 | s23,A,C5-8,4,4.28,f,34.48226649,,,28.81196258 402 | s23,A,C5-8,5,5.89,f,36.59867718,,36.59867718,36.59867718 403 | s23,A,C5-8,6,6.36,f,42.96642916,,42.96642916,42.96642916 404 | s23,A,C5-8,7,7.04,f,45.60034963,45.60034963,,42.96642916 405 | s23,A,C5-8,8,8.81,f,47.65673308,,,42.96642916 406 | s23,A,C5-8,9,9.34,f,46.85059182,46.85059182,,42.96642916 407 | s23,A,C5-8,10,10.44,f,49.09314377,49.09314377,49.09314377,49.09314377 408 | s23,A,C5-8,11,11.49,f,50.28092053,50.28092053,,49.09314377 409 | s23,A,C5-8,12,12.16,f,48.78089574,,,49.09314377 410 | s23,A,C5-8,13,13.16,f,50.47355344,50.47355344,,49.09314377 411 | s23,A,C5-8,14,14.89,f,45.29481621,45.29481621,,49.09314377 412 | s23,A,C5-8,15,15.61,f,50.77730643,,,49.09314377 413 | s23,A,C5-8,16,16.59,f,49.69119966,,,49.09314377 414 | s23,A,C5-8,17,17.18,f,50.18481883,,50.18481883,50.18481883 415 | s23,A,C5-8,18,18.41,f,50.5250584,,,50.18481883 416 | s24,A,C1-4,1,1.26,f,6.326666667,,6.326666667,6.326666667 417 | s24,A,C1-4,2,2.52,f,16.84032114,,16.84032114,16.84032114 418 | s24,A,C1-4,3,3.74,f,20.2891815,20.2891815,20.2891815,20.2891815 419 | s24,A,C1-4,4,4.64,f,24.11397562,24.11397562,24.11397562,24.11397562 420 | s24,A,C1-4,5,5.75,f,28.34558436,,28.34558436,28.34558436 421 | s24,A,C1-4,6,6.57,f,31.10283598,,31.10283598,31.10283598 422 | s24,A,C1-4,7,7.48,f,32.66513454,,,31.10283598 423 | s24,A,C1-4,8,8.42,f,32.80763009,,,31.10283598 424 | s24,A,C1-4,9,9.17,f,34.27169634,,,31.10283598 425 | s24,A,C1-4,10,10.13,f,39.03923884,,,31.10283598 426 | s24,A,C1-4,11,11.49,f,37.3801471,37.3801471,,31.10283598 427 | s24,A,C1-4,12,12.3,f,38.91649045,,,31.10283598 428 | s24,A,C1-4,13,13.96,f,40.88502857,40.88502857,,31.10283598 429 | s24,A,C1-4,14,14.61,f,41.09878902,,,31.10283598 430 | s24,A,C1-4,15,15.63,f,42.9880992,,,31.10283598 431 | s24,A,C1-4,16,16.92,f,42.68128457,,,31.10283598 432 | s24,A,C1-4,17,17.39,f,42.1651548,42.1651548,42.1651548,42.1651548 433 | s24,A,C1-4,18,18.66,f,44.26535082,,,42.1651548 434 | s25,C,C1-4,1,1.68,f,6.326666667,,6.326666667,6.326666667 435 | s25,C,C1-4,2,2.05,f,16.84032114,,16.84032114,16.84032114 436 | s25,C,C1-4,3,3.56,f,20.2891815,,20.2891815,20.2891815 437 | s25,C,C1-4,4,4.78,f,24.11397562,,,20.2891815 438 | s25,C,C1-4,5,5.71,f,28.34558436,,28.34558436,28.34558436 439 | s25,C,C1-4,6,6.63,f,31.10283598,,31.10283598,31.10283598 440 | s25,C,C1-4,7,7.31,f,32.66513454,,32.66513454,32.66513454 441 | s25,C,C1-4,8,8.95,f,32.80763009,32.80763009,,32.66513454 442 | s25,C,C1-4,9,9.23,f,34.27169634,,,32.66513454 443 | s25,C,C1-4,10,10.08,f,33.03923884,33.03923884,,32.66513454 444 | s25,C,C1-4,11,11.64,f,34.3801471,,34.3801471,34.3801471 445 | s25,C,C1-4,12,12.51,f,35.91649045,35.91649045,,34.3801471 446 | s25,C,C1-4,13,13.94,f,36.88502857,36.88502857,,34.3801471 447 | s25,C,C1-4,14,14.18,f,36.09878902,,,34.3801471 448 | s25,C,C1-4,15,15.76,f,35.9880992,,,34.3801471 449 | s25,C,C1-4,16,16.31,f,35.68128457,35.68128457,,34.3801471 450 | s25,C,C1-4,17,17.8,f,35.1651548,35.1651548,,34.3801471 451 | s25,C,C1-4,18,18.06,f,35.26535082,35.26535082,,34.3801471 452 | s26,A,C5-8,1,1.69,f,25.01333333,,25.01333333,25.01333333 453 | s26,A,C5-8,2,2.32,f,26.2560233,,26.2560233,26.2560233 454 | s26,A,C5-8,3,3.38,f,29.51362783,29.51362783,29.51362783,29.51362783 455 | s26,A,C5-8,4,4.65,f,35.35871326,,,29.51362783 456 | s26,A,C5-8,5,5.91,f,38.74735169,,38.74735169,38.74735169 457 | s26,A,C5-8,6,6.81,f,39.5963178,,,38.74735169 458 | s26,A,C5-8,7,7.95,f,42.60525745,,42.60525745,42.60525745 459 | s26,A,C5-8,8,8.73,f,42.62140323,42.62140323,,42.60525745 460 | s26,A,C5-8,9,9.35,f,46.65392233,,,42.60525745 461 | s26,A,C5-8,10,10.36,f,45.49004165,,,42.60525745 462 | s26,A,C5-8,11,11.45,f,47.76344621,47.76344621,,42.60525745 463 | s26,A,C5-8,12,12.61,f,49.79900776,,,42.60525745 464 | s26,A,C5-8,13,13.35,f,50.91561421,,50.91561421,50.91561421 465 | s26,A,C5-8,14,14.8,f,51.72794741,,,50.91561421 466 | s26,A,C5-8,15,15.43,f,50.74764619,,,50.91561421 467 | s26,A,C5-8,16,16.84,f,50.86409319,50.86409319,,50.91561421 468 | s26,A,C5-8,17,18,f,48.08496282,48.08496282,,50.91561421 469 | s26,A,C5-8,18,18.16,f,50.9366123,,,50.91561421 470 | s27,C,C1-4,1,2,f,6.76,6.76,6.76,6.76 471 | s27,C,C1-4,2,2.69,f,18.71994884,18.71994884,18.71994884,18.71994884 472 | s27,C,C1-4,3,3.03,f,22.79973941,,22.79973941,22.79973941 473 | s27,C,C1-4,4,4.09,f,29.99989767,,29.99989767,29.99989767 474 | s27,C,C1-4,5,5.33,f,29.81779352,29.81779352,29.81779352,29.81779352 475 | s27,C,C1-4,6,6.37,f,35.19968825,35.19968825,,29.81779352 476 | s27,C,C1-4,7,7.21,f,35.29028818,,35.29028818,35.29028818 477 | s27,C,C1-4,8,8.97,f,38.57984651,38.57984651,,35.29028818 478 | s27,C,C1-4,9,9.27,f,39.41947883,39.41947883,,35.29028818 479 | s27,C,C1-4,10,10.02,f,42.37774236,42.37774236,,35.29028818 480 | s27,C,C1-4,11,11.45,f,40.98927098,40.98927098,,35.29028818 481 | s27,C,C1-4,12,12.72,f,45.15963709,,,35.29028818 482 | s27,C,C1-4,13,13.35,f,43.32826062,,43.32826062,43.32826062 483 | s27,C,C1-4,14,14.58,f,47.45023701,,,43.32826062 484 | s27,C,C1-4,15,15.94,f,47.71753294,,,43.32826062 485 | s27,C,C1-4,16,16.82,f,49.13979534,49.13979534,,43.32826062 486 | s27,C,C1-4,17,17.4,f,49.96491482,,,43.32826062 487 | s27,C,C1-4,18,19.85,f,48.73942767,,,43.32826062 488 | s28,D,C1-4,1,1.26,f,6.12,,6.12,6.12 489 | s28,D,C1-4,2,2.63,f,16.91091335,16.91091335,16.91091335,16.91091335 490 | s28,D,C1-4,3,3.68,f,20.40195975,,20.40195975,20.40195975 491 | s28,D,C1-4,4,4.84,f,24.26182669,24.26182669,24.26182669,24.26182669 492 | s28,D,C1-4,5,5.87,f,30.70269286,,30.70269286,30.70269286 493 | s28,D,C1-4,6,6.83,f,30.5928731,,30.5928731,30.5928731 494 | s28,D,C1-4,7,7.16,f,32.67683194,,32.67683194,32.67683194 495 | s28,D,C1-4,8,8.32,f,35.47274004,,,32.67683194 496 | s28,D,C1-4,9,9.43,f,37.92391951,37.92391951,,32.67683194 497 | s28,D,C1-4,10,10.56,f,38.43360621,,38.43360621,38.43360621 498 | s28,D,C1-4,11,11.46,f,38.01263855,38.01263855,,38.43360621 499 | s28,D,C1-4,12,12.28,f,39.84378645,,,38.43360621 500 | s28,D,C1-4,13,13.79,f,39.98434165,39.98434165,,38.43360621 501 | s28,D,C1-4,14,14.9,f,41.94774528,,,38.43360621 502 | s28,D,C1-4,15,15.64,f,41.62465261,,,38.43360621 503 | s28,D,C1-4,16,16.63,f,43.60365339,43.60365339,,38.43360621 504 | s28,D,C1-4,17,17.75,f,45.87177347,45.87177347,,38.43360621 505 | s28,D,C1-4,18,19.28,f,45.95483285,,,38.43360621 506 | s29,B,C5-8,1,1.06,f,11.47333333,11.47333333,11.47333333,11.47333333 507 | s29,B,C5-8,2,2.6,f,21.98505879,,21.98505879,21.98505879 508 | s29,B,C5-8,3,3.53,f,27.21140749,,27.21140749,27.21140749 509 | s29,B,C5-8,4,4.35,f,33.97678424,,33.97678424,33.97678424 510 | s29,B,C5-8,5,5.58,f,35.08245235,,35.08245235,35.08245235 511 | s29,B,C5-8,6,6.7,f,38.66313295,38.66313295,38.66313295,38.66313295 512 | s29,B,C5-8,7,7.74,f,43.25871369,,,38.66313295 513 | s29,B,C5-8,8,8.52,f,46.04850969,,46.04850969,46.04850969 514 | s29,B,C5-8,9,9.48,f,46.62948166,,,46.04850969 515 | s29,B,C5-8,10,10.25,f,47.1141778,47.1141778,,46.04850969 516 | s29,B,C5-8,11,11.51,f,51.20007864,51.20007864,,46.04850969 517 | s29,B,C5-8,12,12.68,f,49.8948584,,,46.04850969 518 | s29,B,C5-8,13,13.77,f,52.13953318,52.13953318,,46.04850969 519 | s29,B,C5-8,14,14.99,f,54.57043914,,,46.04850969 520 | s29,B,C5-8,15,15.31,f,53.92052651,,,46.04850969 521 | s29,B,C5-8,16,16.72,f,56.20023514,,56.20023514,56.20023514 522 | s29,B,C5-8,17,17.67,f,57.15810417,,,56.20023514 523 | s29,B,C5-8,18,19.22,f,58.10120711,,,56.20023514 524 | s30,A,C1-4,1,1.56,f,3.453333333,,3.453333333,3.453333333 525 | s30,A,C1-4,2,2.92,f,12.26698781,12.26698781,12.26698781,12.26698781 526 | s30,A,C1-4,3,3.94,f,16.71584817,16.71584817,16.71584817,16.71584817 527 | s30,A,C1-4,4,4.59,f,18.96064228,,18.96064228,18.96064228 528 | s30,A,C1-4,5,5.29,f,22.81225103,22.81225103,22.81225103,22.81225103 529 | s30,A,C1-4,6,6.06,f,36.70950265,,36.70950265,36.70950265 530 | s30,A,C1-4,7,7.25,f,36.07180121,36.07180121,,36.70950265 531 | s30,A,C1-4,8,8.03,f,39.93429676,39.93429676,,36.70950265 532 | s30,A,C1-4,9,9.3,f,41.67836301,41.67836301,,36.70950265 533 | s30,A,C1-4,10,10.95,f,44.94590551,,,36.70950265 534 | s30,A,C1-4,11,11.54,f,59.62681377,,,36.70950265 535 | s30,A,C1-4,12,12.02,f,62.42315712,,,36.70950265 536 | s30,A,C1-4,13,13.04,f,63.83169524,63.83169524,,36.70950265 537 | s30,A,C1-4,14,14.42,f,65.44545569,,,36.70950265 538 | s30,A,C1-4,15,15.42,f,65.49476587,65.49476587,,36.70950265 539 | s30,A,C1-4,16,16.24,f,60.60795123,,,36.70950265 540 | s30,A,C1-4,17,17.88,f,65.15182147,65.15182147,,36.70950265 541 | s30,A,C1-4,18,19.66,f,65.81201748,,,36.70950265 542 | s31,D,T1-S5,1,1.81,m,15.70666667,,15.70666667,15.70666667 543 | s31,D,T1-S5,2,2.39,m,30.70306227,,30.70306227,30.70306227 544 | s31,D,T1-S5,3,3,m,35.30973659,35.30973659,35.30973659,35.30973659 545 | s31,D,T1-S5,4,4.18,m,39.01945787,,39.01945787,39.01945787 546 | s31,D,T1-S5,5,5.68,m,43.8418092,43.8418092,43.8418092,43.8418092 547 | s31,D,T1-S5,6,6.8,m,43.68613219,,43.68613219,43.68613219 548 | s31,D,T1-S5,7,7.87,m,44.52677049,,,43.68613219 549 | s31,D,T1-S5,8,8,m,47.15585348,47.15585348,,43.68613219 550 | s31,D,T1-S5,9,9.15,m,52.11280651,52.11280651,,43.68613219 551 | s31,D,T1-S5,10,10.49,m,57.0182048,,,43.68613219 552 | s31,D,T1-S5,11,11.37,m,61.96098899,,,43.68613219 553 | s31,D,T1-S5,12,12.55,m,63.08252779,,,43.68613219 554 | s31,D,T1-S5,13,13.58,m,65.23904883,,,43.68613219 555 | s31,D,T1-S5,14,14.28,m,63.24316609,63.24316609,,43.68613219 556 | s31,D,T1-S5,15,15.91,m,67.84487912,67.84487912,67.84487912,67.84487912 557 | s31,D,T1-S5,16,16.68,m,67.23224908,,,67.84487912 558 | s31,D,T1-S5,17,17.03,m,65.93186946,65.93186946,65.93186946,65.93186946 559 | s31,D,T1-S5,18,18.64,m,68.06920211,68.06920211,,65.93186946 560 | s32,B,C1-4,1,1.35,m,13.00666667,,13.00666667,13.00666667 561 | s32,B,C1-4,2,2.51,m,24.40113325,,24.40113325,24.40113325 562 | s32,B,C1-4,3,3.01,m,30.52529591,,30.52529591,30.52529591 563 | s32,B,C1-4,4,4.61,m,36.29559983,,36.29559983,36.29559983 564 | s32,B,C1-4,5,5.07,m,39.53201052,,,36.29559983 565 | s32,B,C1-4,6,6.21,m,40.73976249,,,36.29559983 566 | s32,B,C1-4,7,7.35,m,44.71368296,44.71368296,44.71368296,44.71368296 567 | s32,B,C1-4,8,8.13,m,48.85006641,48.85006641,48.85006641,48.85006641 568 | s32,B,C1-4,9,9,m,50.22392516,50.22392516,,48.85006641 569 | s32,B,C1-4,10,10.13,m,49.1064771,49.1064771,,48.85006641 570 | s32,B,C1-4,11,11.74,m,51.69425387,,,48.85006641 571 | s32,B,C1-4,12,12.91,m,53.89422907,,,48.85006641 572 | s32,B,C1-4,13,13.08,m,53.84688677,,,48.85006641 573 | s32,B,C1-4,14,14.18,m,57.46814954,57.46814954,,48.85006641 574 | s32,B,C1-4,15,15.94,m,55.09063976,55.09063976,,48.85006641 575 | s32,B,C1-4,16,16.26,m,55.72453299,,,48.85006641 576 | s32,B,C1-4,17,17.57,m,56.83815217,,,48.85006641 577 | s32,B,C1-4,18,19.07,m,60.21839174,60.21839174,,48.85006641 578 | s33,C,C1-4,1,1.44,m,14.18666667,,14.18666667,14.18666667 579 | s33,C,C1-4,2,2.56,m,14.49565099,,14.49565099,14.49565099 580 | s33,C,C1-4,3,3.02,m,14.56418574,14.56418574,14.56418574,14.56418574 581 | s33,C,C1-4,4,4.8,m,16.54463532,,16.54463532,16.54463532 582 | s33,C,C1-4,5,5.68,m,17.21956085,,17.21956085,17.21956085 583 | s33,C,C1-4,6,6.69,m,19.49317007,,,17.21956085 584 | s33,C,C1-4,7,7.5,m,21.87041108,,21.87041108,21.87041108 585 | s33,C,C1-4,8,8.13,m,23.53361964,23.53361964,,21.87041108 586 | s33,C,C1-4,9,9.5,m,26.56170482,26.56170482,,21.87041108 587 | s33,C,C1-4,10,10.62,m,24.86854517,24.86854517,,21.87041108 588 | s33,C,C1-4,11,11.13,m,23.67257009,,,21.87041108 589 | s33,C,C1-4,12,12.97,m,24.42215439,24.42215439,,21.87041108 590 | s33,C,C1-4,13,13.6,m,23.57884626,23.57884626,,21.87041108 591 | s33,C,C1-4,14,14.74,m,24.15939541,,,21.87041108 592 | s33,C,C1-4,15,15.47,m,24.89707992,24.89707992,,21.87041108 593 | s33,C,C1-4,16,16.18,m,24.34260397,24.34260397,24.34260397,24.34260397 594 | s33,C,C1-4,17,17.68,m,24.76472284,24.76472284,,24.34260397 595 | s33,C,C1-4,18,19.29,m,25.01068914,,,24.34260397 596 | s34,A,C5-8,1,1.65,m,17.63333333,17.63333333,17.63333333,17.63333333 597 | s34,A,C5-8,2,2.44,m,27.60779991,,27.60779991,27.60779991 598 | s34,A,C5-8,3,3.7,m,34.41196258,34.41196258,34.41196258,34.41196258 599 | s34,A,C5-8,4,4.85,m,36.48226649,,,34.41196258 600 | s34,A,C5-8,5,5.11,m,39.65867718,39.65867718,39.65867718,39.65867718 601 | s34,A,C5-8,6,6.12,m,44.14642916,44.14642916,,39.65867718 602 | s34,A,C5-8,7,7.9,m,46.66034963,,,39.65867718 603 | s34,A,C5-8,8,8.29,m,49.01673308,49.01673308,,39.65867718 604 | s34,A,C5-8,9,9.9,m,50.97059182,,,39.65867718 605 | s34,A,C5-8,10,10.52,m,51.21314377,,51.21314377,51.21314377 606 | s34,A,C5-8,11,11.55,m,51.26092053,,,51.21314377 607 | s34,A,C5-8,12,12.18,m,54.10089574,54.10089574,,51.21314377 608 | s34,A,C5-8,13,13.64,m,57.63355344,,,51.21314377 609 | s34,A,C5-8,14,14.87,m,56.81481621,56.81481621,,51.21314377 610 | s34,A,C5-8,15,16,m,58.17730643,58.17730643,,51.21314377 611 | s34,A,C5-8,16,16.9,m,60.61119966,60.61119966,,51.21314377 612 | s34,A,C5-8,17,17.32,m,61.24481883,,,51.21314377 613 | s34,A,C5-8,18,19.76,m,60.3050584,,,51.21314377 614 | s35,B,T1-S5,1,1.48,m,10.03333333,,10.03333333,10.03333333 615 | s35,B,T1-S5,2,2.74,m,36.57409428,36.57409428,36.57409428,36.57409428 616 | s35,B,T1-S5,3,3.2,m,43.38918716,,43.38918716,43.38918716 617 | s35,B,T1-S5,4,4.47,m,47.23485522,,,43.38918716 618 | s35,B,T1-S5,5,5.1,m,50.93755301,,50.93755301,50.93755301 619 | s35,B,T1-S5,6,6.49,m,54.7299481,,,50.93755301 620 | s35,B,T1-S5,7,7.85,m,59.01216993,,,50.93755301 621 | s35,B,T1-S5,8,8.26,m,59.21561616,59.21561616,59.21561616,59.21561616 622 | s35,B,T1-S5,9,9.83,m,63.02504098,,,59.21561616 623 | s35,B,T1-S5,10,10.31,m,63.15831395,63.15831395,,59.21561616 624 | s35,B,T1-S5,11,11.38,m,67.45671108,,,59.21561616 625 | s35,B,T1-S5,12,12.72,m,68.17070904,68.17070904,,59.21561616 626 | s35,B,T1-S5,13,13.32,m,73.26345215,,,59.21561616 627 | s35,B,T1-S5,14,14.38,m,76.33293087,76.33293087,,59.21561616 628 | s35,B,T1-S5,15,15.83,m,75.49340683,,,59.21561616 629 | s35,B,T1-S5,16,16.49,m,73.8563771,,73.8563771,73.8563771 630 | s35,B,T1-S5,17,17.48,m,75.49124552,,,73.8563771 631 | s35,B,T1-S5,18,19.67,m,75.16580192,,,73.8563771 632 | s36,C,C1-4,1,1.3,m,5.166666667,5.166666667,5.166666667,5.166666667 633 | s36,C,C1-4,2,2.24,m,18.11016874,,18.11016874,18.11016874 634 | s36,C,C1-4,3,3.93,m,25.98307557,,25.98307557,25.98307557 635 | s36,C,C1-4,4,4.06,m,29.81367081,29.81367081,29.81367081,29.81367081 636 | s36,C,C1-4,5,5.69,m,35.90711118,,35.90711118,35.90711118 637 | s36,C,C1-4,6,6.72,m,42.76657764,42.76657764,42.76657764,42.76657764 638 | s36,C,C1-4,7,7.78,m,45.8471392,,,42.76657764 639 | s36,C,C1-4,8,8.14,m,50.09717288,,,42.76657764 640 | s36,C,C1-4,9,9.22,m,50.09948448,,,42.76657764 641 | s36,C,C1-4,10,10.5,m,50.05061325,50.05061325,,42.76657764 642 | s36,C,C1-4,11,11.78,m,52.0108863,,,42.76657764 643 | s36,C,C1-4,12,12.81,m,54.01007971,,,42.76657764 644 | s36,C,C1-4,13,13.24,m,53.19080574,,,42.76657764 645 | s36,C,C1-4,14,14.09,m,50.23064127,,,42.76657764 646 | s36,C,C1-4,15,15.78,m,52.78352009,,,42.76657764 647 | s36,C,C1-4,16,16.43,m,53.44067494,53.44067494,,42.76657764 648 | s36,C,C1-4,17,17.84,m,50.71129352,,,42.76657764 649 | s36,C,C1-4,18,19.66,m,52.06298655,,,42.76657764 650 | s37,B,T1-S5,1,1.37,m,25.43333333,25.43333333,25.43333333,25.43333333 651 | s37,B,T1-S5,2,2.69,m,33.36779991,33.36779991,33.36779991,33.36779991 652 | s37,B,T1-S5,3,3.96,m,51.81196258,,51.81196258,51.81196258 653 | s37,B,T1-S5,4,4.69,m,55.90226649,55.90226649,55.90226649,55.90226649 654 | s37,B,T1-S5,5,5.85,m,57.77867718,57.77867718,57.77867718,57.77867718 655 | s37,B,T1-S5,6,6.95,m,59.34642916,59.34642916,,57.77867718 656 | s37,B,T1-S5,7,7.92,m,54.70034963,,54.70034963,54.70034963 657 | s37,B,T1-S5,8,8.39,m,55.61673308,,,54.70034963 658 | s37,B,T1-S5,9,9.34,m,56.93059182,,56.93059182,56.93059182 659 | s37,B,T1-S5,10,10.05,m,60.63314377,,,56.93059182 660 | s37,B,T1-S5,11,11.61,m,58.58092053,58.58092053,,56.93059182 661 | s37,B,T1-S5,12,12.3,m,62.04089574,,,56.93059182 662 | s37,B,T1-S5,13,13.06,m,64.55355344,64.55355344,,56.93059182 663 | s37,B,T1-S5,14,14.08,m,64.49481621,64.49481621,,56.93059182 664 | s37,B,T1-S5,15,15.56,m,66.33730643,,,56.93059182 665 | s37,B,T1-S5,16,16.17,m,67.51119966,,,56.93059182 666 | s37,B,T1-S5,17,17.86,m,67.06481883,67.06481883,,56.93059182 667 | s37,B,T1-S5,18,18.97,m,69.1050584,,,56.93059182 668 | s38,C,C1-4,1,1.17,m,9.826666667,9.826666667,9.826666667,9.826666667 669 | s38,C,C1-4,2,2.53,m,24.48468648,24.48468648,24.48468648,24.48468648 670 | s38,C,C1-4,3,3.54,m,30.2619654,,30.2619654,30.2619654 671 | s38,C,C1-4,4,4.96,m,37.16270629,,37.16270629,37.16270629 672 | s38,C,C1-4,5,5.43,m,41.75466151,41.75466151,,37.16270629 673 | s38,C,C1-4,6,6.92,m,45.51998522,45.51998522,45.51998522,45.51998522 674 | s38,C,C1-4,7,7.61,m,48.42386732,48.42386732,48.42386732,48.42386732 675 | s38,C,C1-4,8,8.3,m,49.86072611,,,48.42386732 676 | s38,C,C1-4,9,9.58,m,50.79726414,,,48.42386732 677 | s38,C,C1-4,10,10.05,m,51.89268132,,,48.42386732 678 | s38,C,C1-4,11,11.43,m,54.86920252,54.86920252,54.86920252,54.86920252 679 | s38,C,C1-4,12,12.04,m,58.65800503,58.65800503,,54.86920252 680 | s38,C,C1-4,13,13.59,m,58.56276523,,,54.86920252 681 | s38,C,C1-4,14,14.54,m,59.32188713,59.32188713,59.32188713,59.32188713 682 | s38,C,C1-4,15,15.84,m,60.02996025,,,59.32188713 683 | s38,C,C1-4,16,16.08,m,63.89874592,,,59.32188713 684 | s38,C,C1-4,17,17.47,m,62.37786419,62.37786419,,59.32188713 685 | s38,C,C1-4,18,18.04,m,63.61528396,,,59.32188713 686 | s39,B,C5-8,1,1.17,m,8.506666667,,8.506666667,8.506666667 687 | s39,B,C5-8,2,2.76,m,16.62113,16.62113,16.62113,16.62113 688 | s39,B,C5-8,3,3.53,m,23.5023,23.5023,23.5023,23.5023 689 | s39,B,C5-8,4,4.69,m,35.81559983,,35.81559983,35.81559983 690 | s39,B,C5-8,5,5.98,m,40.63201052,,40.63201052,40.63201052 691 | s39,B,C5-8,6,6.61,m,40.31976249,40.31976249,40.31976249,40.31976249 692 | s39,B,C5-8,7,7.86,m,43.63368296,43.63368296,,40.31976249 693 | s39,B,C5-8,8,8.89,m,45.81006641,,,40.31976249 694 | s39,B,C5-8,9,9.19,m,46.82392516,,,40.31976249 695 | s39,B,C5-8,10,10.7,m,50.0464771,50.0464771,,40.31976249 696 | s39,B,C5-8,11,11.04,m,51.55425387,,,40.31976249 697 | s39,B,C5-8,12,12.91,m,52.43422907,52.43422907,,40.31976249 698 | s39,B,C5-8,13,13.12,m,55.34688677,,,40.31976249 699 | s39,B,C5-8,14,14.97,m,53.78814954,53.78814954,,40.31976249 700 | s39,B,C5-8,15,15.16,m,57.13063976,,,40.31976249 701 | s39,B,C5-8,16,16.82,m,59.22453299,59.22453299,,40.31976249 702 | s39,B,C5-8,17,17.24,m,56.85815217,,,40.31976249 703 | s39,B,C5-8,18,18.92,m,58.49839174,,,40.31976249 704 | s40,B,C5-8,1,1.6,m,6.08,6.08,6.08,6.08 705 | s40,B,C5-8,2,2.93,m,28.64543109,,28.64543109,28.64543109 706 | s40,B,C5-8,3,3.77,m,32.06084958,,32.06084958,32.06084958 707 | s40,B,C5-8,4,4.87,m,35.33086218,35.33086218,35.33086218,35.33086218 708 | s40,B,C5-8,5,5.07,m,40.11024319,,,35.33086218 709 | s40,B,C5-8,6,6.72,m,40.86628068,40.86628068,40.86628068,40.86628068 710 | s40,B,C5-8,7,7.77,m,42.49356006,,,40.86628068 711 | s40,B,C5-8,8,8.53,m,47.13629328,47.13629328,,40.86628068 712 | s40,B,C5-8,9,9.31,m,46.62169917,46.62169917,46.62169917,46.62169917 713 | s40,B,C5-8,10,10.97,m,48.57567428,,,46.62169917 714 | s40,B,C5-8,11,11.88,m,49.71095476,49.71095476,,46.62169917 715 | s40,B,C5-8,12,12.75,m,51.83171177,,,46.62169917 716 | s40,B,C5-8,13,13.9,m,54.13630113,,,46.62169917 717 | s40,B,C5-8,14,14.95,m,52.27899115,52.27899115,,46.62169917 718 | s40,B,C5-8,15,15.54,m,53.25109278,,,46.62169917 719 | s40,B,C5-8,16,16.01,m,53.82172437,,,46.62169917 720 | s40,B,C5-8,17,17.04,m,54.39834415,,,46.62169917 721 | s40,B,C5-8,18,18.06,m,53.32713026,53.32713026,,46.62169917 722 | -------------------------------------------------------------------------------- /index.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Applied Mixed-Effects Regresion Resources" 3 | author: "Keith Lohse, PhD, PStat; Mike Strube, PhD; Allan Kozlowksi, PhD, PT" 4 | date: "2022-10-04" 5 | output: 6 | html_document: 7 | df_print: paged 8 | --- 9 | 10 | Resources for implementing mixed-effects models for different designs. 11 | 12 | 1. **Section 01** - Introduction to Mixed-Effects Models 13 | * https://keithlohse.github.io/mixed_effects_models/lohse_MER_section_01_introduction.html 14 | 15 | 2. **Section 02** - Mixed-Effect Models for Time Series Data 16 | * https://keithlohse.github.io/mixed_effects_models/lohse_MER_section_02_longitudinal.html 17 | 18 | 3. **Section 03** - Mixed-Effect Models for Factorial Designs 19 | * https://keithlohse.github.io/mixed_effects_models/lohse_MER_section_03_factorial.html 20 | 21 | 4. **Section 04** - Models with Multiple Sources of Variance 22 | * (https://keithlohse.github.io/mixed_effects_models/lohse_MER_section_04_multiple_sources.html) 23 | 24 | 5. **Section n** - Further Readings and Recommendations 25 | * (https://keithlohse.github.io/mixed_effects_models/lohse_MER_chapter_the_last.html) 26 | -------------------------------------------------------------------------------- /lohse_MER_chapter_the_last.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Further Readings and Recommendations" 3 | author: "Keith Lohse, PhD, PStat" 4 | date: "2021-06-09" 5 | output: 6 | html_document: 7 | df_print: paged 8 | --- 9 | 10 | Below are some recommended readings and other resources for mixed-effects models, 11 | both in factorial designs and for truly longitudinal models. 12 | 13 | 1. Long, J. D. (2012). *Longitudinal data analysis for the behavioral sciences using R.* Sage. 14 | 15 | 2. Singer, J. D., Willett, J. B., & Willett, J. B. (2003). *Applied longitudinal data analysis: Modeling change and event occurrence.* Oxford university press. 16 | 17 | 3. Raudenbush, S. W., & Bryk, A. S. (2002). *Hierarchical linear models: Applications and data analysis methods* (Vol. 1). Sage. 18 | 19 | 4. Garcia, T. P., & Marder, K. (2017). Statistical approaches to longitudinal data analysis in neurodegenerative diseases: Huntington’s disease as a model. *Current Neurology and Neuroscience Reports*, 17(2), 14. 20 | 21 | 5. Lohse, K. R., Shen, J., & Kozlowski, A. J. (2020). Modeling longitudinal outcomes: A contrast of two methods. *Journal of Motor Learning and Development*, 8(1), 145-165. 22 | 23 | 6. Dr. Daniel Wollschläger has a great online reference for mixed-effect models in different factorial designs: http://www.dwoll.de/rexrepos/posts/anovaMixed.html 24 | 25 | 7. This book is definitely a bit more dense, but is a fantastic resource for both linear and nonlinear mixed models: Pinheiro, J., & Bates, D. (2006). *Mixed-effects models in S and S-PLUS*. Springer Science & Business Media. 26 | 27 | 8. And, as always, the lme4 manual is super important to read if your haven't already: Bates, D., Mächler, M., Bolker, B., & Walker, S. (2014). Fitting linear mixed-effects models using lme4. *arXiv preprint* arXiv:1406.5823. 28 | 29 | 9. Kuznetsova, A., Brockhoff, P. B., & Christensen, R. H. (2017). lmerTest package: tests in linear mixed effects models. *Journal of statistical software*, 82(13), 1-26. 30 | 31 | 10. Josh Errickson also has a nice visualization of crossed versus nested variables and how they can be represented as random-effects: https://errickson.net/stats-notes/vizrandomeffects.html 32 | 33 | 11. Dr. Violet Brown has a great didactic paper on mixed-effects models in psycholinguistics, where both stimuli and subjects are treated as random samples (requiring a doubling of the random-effects stucture when specifying your models): https://journals.sagepub.com/doi/full/10.1177/2515245920960351 34 | 35 | -------------------------------------------------------------------------------- /lohse_MER_section_01_introduction.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Section 1: An Introduction to Mixed-Effect Models' 3 | author: "Keith Lohse, PhD, PStat; Mike Strube, PhD; Allan Kozlowksi, PhD, PT" 4 | date: '2022-10-04' 5 | output: 6 | html_document: 7 | df_print: paged 8 | pdf_document: default 9 | word_document: default 10 | --- 11 | 12 | # What are mixed-effects models? 13 | 14 | In a traditional general linear model (GLM), all of our data are independent (e.g., one data point per person). Statistically, we can write this as a linear model like: 15 | $$y_i=\beta_0+\beta_1(Time_i)+\epsilon_i$$ 16 | 17 | Each subject's actual score ($y_i$) is the result of an intercept ($\beta_0$) and that constant is modified based on Time (the slope, $\beta_1$ multiplied by the Time variable). The intercept and slope are collectively referred to as our statistical *MODEL*. Our model is not going to be perfect, however, so we need to include an error term ($\epsilon_i$). Good models will have small errors and thus be a better approximation of our *DATA*. As such, we can more generally say that: 18 | $$Data_i = Model_i + Error_i $$ 19 | 20 | Mixed-effect regressions are an extension of the general linear model, but they include *random-effects* in addition to the more traditional *fixed-effects* of our models. Theoretical definitions of these effects can pretty intense, but you can think about fixed-effects as variables where all of the levels we are interested are present in the data (e.g., our treatment and control groups are fixed. If someone is interested in other treatments, they need to run another experiment). Random-effects, in contrast, are those variables that reflect variables that we are interested in generalizing outside of a particular study (e.g., if we randomly sample students from different schools, both students and schools could be treated as random-effects, because we want to generalize the results to other students/schools whom we didn't even measure). 21 | 22 | In practice, I find it helpful to think about the fixed-effects as the variables about which we are testing hypotheses, and the random-effects allow us to account for statistical dependencies in our data, making sure we get the standard errors correct for the calculation of *z*-, *t*-, or *F*-statistics. For instance, consider the following situation: 23 | ```{r, setting libraries, results="hide", message = FALSE, echo=FALSE, warning=FALSE} 24 | library(tidyverse); library(RCurl); library(ez); library(lme4); library(lmerTest) 25 | 26 | DATA <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/data_example.csv") 27 | 28 | data_TIME <- aggregate(speed ~ subID + time + age_group + group, data=DATA, FUN=mean) 29 | data_TIME <- data_TIME %>% arrange(subID, age_group, group, time) 30 | head(data_TIME) 31 | ``` 32 | 33 | ``` {r plotting the effects of time, echo=FALSE, fig.align="center", warning=FALSE} 34 | ggplot(data_TIME, aes(x = time, y = speed)) + 35 | geom_point(aes(fill=subID), pch=21, size=2)+ 36 | geom_line(aes(col=subID), alpha=0.4)+ 37 | facet_wrap(~age_group) + 38 | scale_x_continuous(name = "Trial") + 39 | scale_y_continuous(name = "Speed (m/s)") + 40 | theme(axis.text=element_text(size=16, color="black"), 41 | axis.title=element_text(size=16, face="bold"), 42 | plot.title=element_text(size=16, face="bold", hjust=0.5), 43 | strip.text = element_text(size=16, face="bold"), 44 | legend.position = "none") 45 | 46 | ``` 47 | 48 | These hypothetical data come from a cross-sectional study of younger and older adults. Both groups (hypothetically) walked in anxiety provoking conditions (let's say we simulated a virtual alligator behind them) that initially led them to walk faster than they normally would. After repeated exposures however (4 trials), both groups started to walk slower. 49 | 50 | It would be tempting to model these data using our traditional GLM where there was a fixed-effect of time. However, that would ignore the fact that time varies within each person and this violates one of our primary regression assumptions: that residuals are *independent* of each other. 51 | 52 | To ensure that we have independent residuals, we need to account for the fact that we have multiple observations per person. The first step in this direction is to add a *random-effect of subject*: 53 | $$y_{ij}=\beta_0+U_{0j}+\beta_1(Time_{ij})+\epsilon_{ij}$$ 54 | The random-effect of subject ($U_j$) allows each subject to have a separate intercept ($\beta_0+U_{0j}$) for each person. As such, we would refer to this model as a *random-intercepts; fixed-slope* model, because even though each subject has a unique intercept all subjects would have the same slope ($\beta_1$). 55 | 56 | If we wanted to estimate a unique trajectory (i.e, slope) for each subject, then we we would need to add a random-slope to our model: 57 | $$y_{ij}=\beta_0+\beta_1(Time_{ij})+U_{0j}+U_{1j}(Time_{ij})+\epsilon_{ij}$$ 58 | To show the effects specifically on the slopes and intercepts, this equation can be rewritten as: 59 | $$y_{ij}=(\beta_0+U_{0j})+(\beta_1+U_{1j})(Time_{ij})+\epsilon_{ij}$$ 60 | 61 | In this *random-intercepts; random-slopes* model, we estimate a unique trajectory for each person ($(\beta_1+U_{1j})(Time_{ij})$). Visually, that model would look something like this: 62 | 63 | ``` {r time by group, echo=FALSE, fig.align="center", warning=FALSE} 64 | ggplot(data_TIME, aes(x = time, y = speed)) + 65 | stat_smooth(aes(col=subID, lty=age_group), method="lm", se=FALSE, alpha=0.4)+ 66 | geom_point(aes(fill=subID), pch=21, size=2)+ 67 | stat_smooth(aes(lty=age_group), method="lm", col="black", lwd=1.5, 68 | se=FALSE, alpha=0.4)+ 69 | facet_wrap(~age_group) + 70 | scale_x_continuous(name = "Trial") + 71 | scale_y_continuous(name = "Speed (m/s)") + 72 | theme(axis.text=element_text(size=16, color="black"), 73 | axis.title=element_text(size=16, face="bold"), 74 | plot.title=element_text(size=16, face="bold", hjust=0.5), 75 | strip.text = element_text(size=16, face="bold"), 76 | legend.position = "none") 77 | 78 | ``` 79 | 80 | Linear trajectories for each group are plotted as solid lines (older adults) and dashed lines (younger adults). The thick black lines represent the group level trajectories ($\beta_0 +\beta_1(Time_{ij})$) in each group. The estimated trajectories for each subject are color-coded based on the individual subjects. The intercepts for these lines are captured by the group-level intercept plus the individual distance from that intercept ($\beta_0+U_{0j}$). The slopes for these lines are captured by the group-level slope plus the individual distance from that slope ($(\beta_1+U_{1j})(Time_{ij})$). Note that these random-effects ($U$'s) could be positive or negative, because they represent how a given participant deviates from the group. Thus, our *mixed-effects* MODEL is the combination of our fixed-effects (all of the $\beta$'s) and the random-effects (all of the $U_j$'s). However, $DATA = MODEL + ERROR$ still applies, so we need to include a random-error term for each data point, $ϵ_{ij}$. 81 | 82 | In summary, we have the following terms to explain our *DATA*: 83 | 84 | 1. The **MODEL** includes fixed effects and random effects. 85 | 2. **Fixed-Effects** are the group-level $\beta$'s, these effects parallel the traditional main-effects and interactions that you have probably encountered in other statistical analyses. 86 | 3. **Random-Effects** are the participant-level $U_j$'s that account for statistical dependencies in our data. (This is bit of a simplification, but you can think of not including the appropriate random-effects like running a between-subjects ANOVA when you should be running a repeated-measures ANOVA.) 87 | 4. The **ERRORS**, or more specifically Random Errors, are the difference between our **MODEL**'s predictions and the actual **DATA**, $\epsilon_{ij}$'s. 88 | 89 | ## But our model doesn't look very linear? 90 | Correct! In looking at the figures, it certainly doesn't look like a straight line is the best description our data. There appear to be diminishing returns in the effect of trial; there is a large reduction in velocity from Trial 1 to Trial 2, but that reduction gets smaller to Trial 3 and to Trial 4. Mathematically, we could try explain this curvature using *curvilinear* model or a *non-linear* model. 91 | 92 | A curvilinear model creates a curving line, but is linear in its parameters. The most common way this is accomplished is adding polynomials to our model (e.g., $x, x^2, x^3$). For instance, in the equation below, our model is linear its parameters ($\beta$s added to $\beta$s ), but by raising $x$ to different powers and adding those factors together, we can make a curvilinear relationship between $x$ and $y$. 93 | $$y_i = \beta_0 + \beta_1(x_{1i}) +\beta_2(x^2_{2i})+\epsilon_i$$ 94 | 95 | In contrast, a non-linear model is *not* linear in its parameters. For instance, relationships that follow a power-function or an exponential-function (shown below) do not result from linear combinations (simple addition/subtraction) of the parameters and instead have more complex relationships. 96 | $$y_i = \alpha+\beta*e^{(-\gamma/x_i)}$$ 97 | We *can* model non-linear relationships using mixed-effects regression, but that is more complicated topic that we will need to save for a later time. For now, let's focus on what a curvilinear model might look like in our data: 98 | 99 | ``` {r curvilinear time by group, echo=FALSE, fig.align="center", warning=FALSE} 100 | ggplot(data_TIME, aes(x = time, y = speed)) + 101 | stat_smooth(aes(col=subID, lty=age_group), method="lm", 102 | formula=y~poly(x,2), se=FALSE, alpha=0.4)+ 103 | geom_point(aes(fill=subID), pch=21, size=2)+ 104 | stat_smooth(aes(lty=age_group), method="lm", col="black", lwd=1.5, 105 | formula=y~poly(x,2), se=FALSE, alpha=0.4)+ 106 | facet_wrap(~age_group) + 107 | scale_x_continuous(name = "Trial") + 108 | scale_y_continuous(name = "Speed (m/s)") + 109 | theme(axis.text=element_text(size=16, color="black"), 110 | axis.title=element_text(size=16, face="bold"), 111 | plot.title=element_text(size=16, face="bold", hjust=0.5), 112 | strip.text = element_text(size=16, face="bold"), 113 | legend.position = "none") 114 | 115 | ``` 116 | 117 | Visually, this curvilinear model looks like it is providing a much better explanation our data, because there is a closer correspondence between our model estimates (the lines) and the real data (individual data points). Within each group, these lines would come from a mixed-effects model that looks like this: 118 | $$y_{ij}=(\beta_0+U_{0j})+(\beta_1+U_{1j})(Time_{ij})+(\beta_2+U_{2j})(Time^2_{ij})+\epsilon_{ij}$$ 119 | The thick black lines correspond to the group-level estimates ($\beta$'s) and the thin lines correspond to the estimates for each individual participant ($(\beta+U)$'s). It looks like our curvilinear model has explained a lot of the within-participant variability, because the difference between our estimates and the data ($\epsilon$'s) are very small. However, there does seem be a fair amount of variability between participants ($U$'s) that remains to be explained. 120 | 121 | I hope this brief introduction gives you some sense of what mixed-effects regression is and what it can do. Mixed-effect regression is a very useful analytic tool when it comes to longitudinal data or in designs where the same participants are repeatedly exposed to different conditions (i.e., repeated measures/within-subject designs). Although mixed-effects regression is very useful in these study designs, the more commonly used method of analysis is repeated measures analysis of variance (RM ANOVA). 122 | 123 | RM ANOVA is a perfectly valid method of analysis for a lot of study designs, but in many contexts, researchers use a RM ANOVA when a mixed-effect regression might be more appropriate or effective. Lohse, Shen, and Kozlowski (2020) provide a more detailed contrast of these two methods, but I have recreated some of the central arguments from that paper below. 124 | 125 | # Constrasting Mixed-Effects Regression and RM ANOVA: 126 | * **Model concept** 127 | - **RM ANOVA**: 128 | * Compares means of a continuous outcome stratified by one or more categorical variable(s) to the grand mean. 129 | * Individuals are treated as a factor with error aggregated from each individual’s mean of the repeated measures and partitioned as intra-individual variance from the error term. 130 | 131 | - **Mixed-Effects Regression**: 132 | * Accounts for correlations in data with clustered or nested structure. 133 | * In longitudinal models, change over time is considered a within-person factor accounting for within-person correlations across time points and estimating error as residuals from each individual’s trajectory. Between-person error is accounted for as random-effects in a correlation matrix, which can be explained by fixed-effects and their interactions with either the intercept or slope parameters. 134 | 135 | * **Modeling of the outcome over time** 136 | - **RM ANOVA**: 137 | * Addresses questions about mean difference. 138 | * Time is not inherently captured in the repeated measure, instead discrete time points are treated as levels of a categorical variable with a mean for each time point. 139 | * Mean differences between time points do not represent change over time, since time is an not explicit part of the model. 140 | 141 | - **Mixed-Effects Regression**: 142 | * Time is modeled explicitly for the outcome variable as a trajectory of change. 143 | * The model assumes a common pattern of change for the group (fixed effects), but individuals can vary from that pattern (random effects). 144 | * The shape of the trajectory is determined by fitting progressively more complex mathematical functions that are likely to fit the pattern of raw data scores, and testing a fit statistic (e.g., *Akaike Information Criterion* or *Wald Test of the Change in Deviance*). 145 | 146 | * **Variability in timing of data points** 147 | - **RM ANOVA**: 148 | * Requires common, discreet time points; variability in actual timing may contribute to measurement error in categorized time points. * Measurement error may accrue within time points if outcome measurement varies by time within a time point, e.g., measurement at a time point varies by ± time units around that point. Individuals’ scores on an increasing trajectory may be overestimated if captured before the time point or underestimated if captured after. 149 | 150 | - **Mixed-Effects Regression**: 151 | * Can accommodate variability in spacing of time points and in the actual timing of individual data collection. 152 | * Time points can be spaced farther apart where little change is expected, and closer together where more change is expected. 153 | * Individual measurement can vary from the target time points. If, for example, 5 weekly measurements are planned over 4 weeks, a time variable defined in days can capture the actual day of measurement, rather than collapsing to the weekly time point. 154 | 155 | * **Data missing on the outcome** 156 | - **RM ANOVA**: 157 | * Missing outcome data cannot be accommodated, without complicated statistical adjustments (such as multiple imputation) when data are missing at random. 158 | * Including only cases with complete data will reduce statistical power and risk bias to the model if data are missing not at random (MNAR). 159 | 160 | - **Mixed-Effects Regression**: 161 | * Data that meet the missing at random (MAR) assumption can be accommodated without excluding cases. 162 | * However, models can be biased if important time points are missing (e.g., no data where important change occurs). 163 | * Models with data that are MNAR can be fit, but models will be biased. For example, an unbalanced data set is one in which later time points are more likely to be missing, which can occur due to drop out, or outcome measurement that is performed during an intervention that varies for individuals. 164 | 165 | * **Data missing on covariates** 166 | - **RM ANOVA**: 167 | * Missing between-person covariate data cannot be accommodated. 168 | * Cases are either dropped from analysis or retained by imputing missing values. 169 | 170 | - **Mixed-Effects Regression**: 171 | * Missing between-person covariate data cannot be accommodated. 172 | * Cases are either dropped from analysis or retained by imputing missing values. 173 | 174 | * **Time-varying covariates** 175 | - **RM ANOVA**: 176 | * Time varying covariates cannot be accommodated in a RM ANOVA model. 177 | 178 | - **Mixed-Effects Regression**: 179 | * Time varying covariates can be included, but you need to careful about collinearity and variance at both the between- and within-subject levels. 180 | 181 | # Conclusions 182 | I know that is a lot, but I hope it helps you find your footing with mixed-effect models. There are a whole host of topics that we haven't covered yet, but we will dig into at least some of those topics in the next chapters. Mixed-effect regression is an incredibly flexible and powerful method for analyzing your data, but that flexibility comes at a cost. Analytic flexibility also means greater complexity and there are a lot of choices that an analyst must make that can have significant influence on the results. These modules will be no means be exhaustive, but I want to introduce you to: 183 | 184 | * **Mixed-effects regression for factorial designs**: This chapter explains mixed-effect regression as an analogue to factorial ANOVA. If you have categorical repeated measures, this chapter is for you! 185 | 186 | * **Mixed-effect regression for longitudinal designs**: If you truly have time series data (rather than categorical repeated measures), then it is important to capture the trajectories of your individual subjects. Whether you are measuring time on the order seconds, days, or years, this chapter is for you! 187 | 188 | * **Mixed-effect regression with mulitple sources of variance**: Rather than modeling trials over time, perhaps all of our trials are categorically different from each other. For instance, when learning a motor skill, a learner performs the skill on each trial, so it makes sense to model their performance as a function of time. In contrast, during language learning, a learner might hear a different word on each trial, and therefore I need to account for the fact that I have a random sample of words in addition to the fact that I have a random sample of subjects. 189 | 190 | Finally, I will provide a list of resources that I hope will be helpful on your journey deeper into mixed-effects models. These chapters provide a foundation, but fall far short of teaching you everything you need/want to know. Fortunately, there are some other great textbooks and online modules that can help you learn. 191 | 192 | 193 | 194 | # References 195 | Lohse, K. R., Shen, J., & Kozlowski, A. J. (2020). Modeling Longitudinal Outcomes: A Contrast of Two Methods. Journal of Motor Learning and Development, 8(1), 145-165. doi: https://doi.org/10.1123/jmld.2019-0007 196 | -------------------------------------------------------------------------------- /lohse_MER_section_02_longitudinal.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Section 2: Mixed-Effects Models for Longitudinal Data' 3 | author: "Keith Lohse, PhD, PStat; Mike Strube, PhD; Allan Kozlowksi, PhD, PT" 4 | date: '2022-10-04' 5 | output: 6 | html_document: 7 | df_print: paged 8 | pdf_document: default 9 | --- 10 | 11 | ## Note that this page is in the process of being updated 2022-10-04 12 | 13 | Working with a new data set, we now want to switch from modeling time as a factor (i.e., treating Trial 1 as categorically different from Trial 2) to treating time as a continuous variable. 14 | 15 | In our previous data set, we used the hypothetical cross-sectional study of younger and older adults. Both groups (hypothetically) walked in anxiety provoking conditions (let's say we simulated a virtual alligator behind them) that initially led them to walk faster than they normally would. After repeated exposures however (4 trials), both groups started to walk slower. In this experiment, our time variable is the number of trials. Each trial came at approximately the same time for each person, so there is no between-subject variability in the time variable. 16 | 17 | 18 | ```{r, setting libraries, results="hide", message = FALSE, echo=FALSE, warning=FALSE} 19 | library(tidyverse); library(RCurl); library(ez); library(lme4); library(car); library(lmerTest) 20 | 21 | DATA <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/data_AGING_example.csv", 22 | stringsAsFactors = TRUE) 23 | 24 | data_TIME <- DATA %>% group_by(subID, time, age_group, group) %>% # Note we ignore condition to average across it 25 | summarize(speed = mean(speed, na.rm=TRUE)) %>% # I have included na.rm=TRUE even though there are no missing data 26 | arrange(age_group, subID, time) 27 | ``` 28 | 29 | ``` {r plotting the effects of time, echo=FALSE, fig.align="center", fig.height = 4, fig.width = 7} 30 | ggplot(data_TIME, aes(x = time, y = speed)) + 31 | geom_line(aes(group=subID), col="black", alpha=0.8)+ 32 | geom_point(aes(fill=subID), pch=21, size=2)+ 33 | facet_wrap(~age_group) + 34 | scale_x_continuous(name = "Trial") + 35 | scale_y_continuous(name = "Speed (m/s)") + 36 | theme(axis.text=element_text(size=16, color="black"), 37 | axis.title=element_text(size=16, face="bold"), 38 | plot.title=element_text(size=16, face="bold", hjust=0.5), 39 | strip.text = element_text(size=16, face="bold"), 40 | legend.position = "none") 41 | 42 | ``` 43 | 44 | 45 | For the new example though, we will use some fake data that have a structure more like what we might encounter in a longitudinal study. These fake data follow patients with different types of spinal cord injury (given by "AIS Grade") through 18 months of rehabilitation. The outcome is their Rasch-scaled score on the Functional Independence Measure (FIM). Without getting into the weeds of what that means, the values range from 0 to 100, with 100 indicating complete independence in the activities of daily life. Beyond having a lot more observations per person, this dataset also measures time continuously. That is, rather than trials that were all collected at exactly the same time, these data were all collected on different days for different people. Thus, Month 1 as a time point might be Day 20 for some people, but Day 30 for others. One of the strengths of the mixed-effects model is that we can retain this variability in our $X$ variable, by treating time continuously rather than categorically. 46 | 47 | ```{r, reading in second data, results="hide", message = FALSE, echo=FALSE} 48 | DAT2 <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/data_SCI_longitudinal_example.csv", 49 | stringsAsFactors = TRUE) 50 | ``` 51 | 52 | ``` {r plotting rehab data, echo=FALSE, fig.align="center", fig.height = 4, fig.width = 8} 53 | ggplot(DAT2, aes(x = time, y = rasch_FIM)) + 54 | geom_line(aes(group=subID), col="black", alpha=0.8)+ 55 | geom_point(aes(fill=subID), pch=21, size=2)+ 56 | facet_wrap(~AIS_grade) + 57 | scale_x_continuous(name = "Time (Months)") + 58 | scale_y_continuous(name = "Rasch-Scaled FIM") + 59 | theme(axis.text=element_text(size=16, color="black"), 60 | axis.title=element_text(size=16, face="bold"), 61 | plot.title=element_text(size=16, face="bold", hjust=0.5), 62 | strip.text = element_text(size=16, face="bold"), 63 | legend.position = "none") 64 | 65 | ``` 66 | 67 | 68 | We will explore these data in more detail below. One of the key differences between these models and the factorial models we considered before is that now we will need to deal with **model comparisons**. In the factorial designs, we knew which factors we wanted to include in our model and we always tested the fully factorial design (i.e., all main-effects and interactions). In contrast, for these longitudinal models, we will need to compare different ways to represent time (e.g., linear versus curvilinear models). After we compare models to decide on the best to model time, we can start adding in other variables to explain the differences in individual trajectories. 69 | 70 | In order to do this, we will need to use **Full Maximum Likelihood** to estimate the different model parameters rather than **Restricted Maximum Likelihood**. Additionally, we will need to decide on a metric for deciding when one model is statistically better than another model. I will cover these topics briefly below, but I would direct interested readers to Jeff Long's, *Longitudinal Data Analysis for the Behavioral Science using R* for a more detailed discussion. 71 | 72 | 73 | # 1. Modeling Changes in Functional Independence over Time 74 | Starting with modeling changes in functional independence across 18 months of rehabilitation, we can test a series of **unconditional** random-effects models to decide how we want to model the effect of time. These models are said to be "unconditional" because the effect of time does not depend on any other variables. In this series of models, the goal is to establish the best fitting "shape" of our time variable (e.g., should time be linear or quadratic?) and which random-effects are essential to include in the model. 75 | 76 | In these models, I am first going to convert time from months into years in order to avoid any scaling issues in our models. You could also center time around the average time, which I call *year.c* in the models below ($year_i - \overline{year}$). Centering time around it's mean changes the interpretation of the intercept from being the predicted value when Time is 0, to the predicted value on average over time. 77 | ```{r} 78 | # Centering time on the first point and converting to years: 79 | DAT2$year.0 <- (DAT2$time-1)/12 80 | DAT2$year.0_sq<-DAT2$year.0^2 81 | DAT2$year.0_cu<-DAT2$year.0^3 82 | 83 | # Centering time on the mean time: 84 | DAT2$year.c <- scale(DAT2$time) 85 | DAT2$year.c_sq<-DAT2$year.c^2 86 | DAT2$year.c_cu<-DAT2$year.c^3 87 | ``` 88 | Centering time on the first time point and centering time on the mean are equally appropriate choices mathematically, but they do change how we will interpret the intercept, so it is very important to understand how your variables are coded. In general, **treating the first data point as time = 0 makes the intercept more interpretable**. However, **mean-centering (or z-transforming) the time variable can help reduce collinearity in a model, especially when interactions are present**. 89 | 90 | 91 | ## 1.1. Unconditional Models of Time 92 | ### 1.1.1. Fixed-Slope Random-Intercepts Model 93 | ```{r} 94 | # Random intercepts model ---- 95 | raneff_00<-lmer(rasch_FIM~ 96 | # Fixed-effects 97 | 1+ 98 | # Random-effects 99 | (1|subID), data=DAT2, REML=FALSE, 100 | control=lmerControl(optimizer="bobyqa", 101 | optCtrl=list(maxfun=5e5))) 102 | summary(raneff_00) 103 | ``` 104 | 105 | 106 | ### 1.1.2. Random-Slopes Random-Intercepts Model 107 | ```{r} 108 | # Random slope random intercepts model ---- 109 | raneff_01<-lmer(rasch_FIM~ 110 | # Fixed-effects 111 | 1+year.0+ 112 | # Random-effects 113 | (1+year.0|subID), data=DAT2, REML=FALSE, 114 | control=lmerControl(optimizer="bobyqa", 115 | optCtrl=list(maxfun=5e5))) 116 | summary(raneff_01) 117 | ``` 118 | 119 | 120 | ### 1.1.3. Quadratic Random-Slopes Random-Intercepts Model 121 | ```{r} 122 | # Random quadratic slopes and intercepts model ---- 123 | raneff_02<-lmer(rasch_FIM~ 124 | # Fixed-effects 125 | 1+year.0+year.0_sq+ 126 | # Random-effects 127 | (1+year.0+year.0_sq|subID), data=DAT2, REML=FALSE, 128 | control=lmerControl(optimizer="bobyqa", 129 | optCtrl=list(maxfun=5e5))) 130 | summary(raneff_02) 131 | ``` 132 | 133 | ### 1.1.4. Cubic Random-Slopes Random-Intercepts Model 134 | ```{r} 135 | # Random cubic slopes and intercepts model ---- 136 | raneff_03<-lmer(rasch_FIM~ 137 | # Fixed-effects 138 | 1+year.0+year.0_sq+year.0_cu+ 139 | # Random-effects 140 | (1+year.0+year.0_sq+year.0_cu|subID), data=DAT2, REML=FALSE, 141 | control=lmerControl(optimizer="bobyqa", 142 | optCtrl=list(maxfun=2e5))) 143 | summary(raneff_03) 144 | ``` 145 | 146 | ## 1.2. Comparing between the Different Models 147 | Now that we have created several different models, how do we decide which models are the best? How do we decide which parameters to include and which parameters are "statistically significant"? When it comes to mixed-effect linear models (or other forms of "multi-level" models), we use a similar criterion to traditional regression. That is, we still rely on the general idea that: 148 | $$ Data_i = Model_i + Error_i $$ 149 | 150 | ... and if the error is reduced by a large enough magnitude, then we will call that effect statistically significant (i.e., the parameter reduced error by an unusually larger amount under the null-hypothesis.). However, there are some key differences between mixed-effect models and traditional Ordinary Least Squares regression that we need to discuss. 151 | 152 | 153 | For instance, you might have noticed that p-values are conspicuously absent from the LME4 output. The reasons for this are complicated, but it has to do with the fact that these models can have statistical dependencies and unbalanced/missing data that do not make the calculation of traditional p-values tenable. In short, your denominator degrees of freedom can get a little crazy. (You can also read an explanation from Doug Bates, a main author of the lme4 package, here: https://stat.ethz.ch/pipermail/r-help/2006-May/094765.html). However, the key things that you should know are: 154 | 155 | 1. If you really, really want p-values for individual parameters, you can get them from packages that implement the Welch-Satterthwaite approximation to estimate the appropriate degrees of freedom, like the "lmerTest"" package. 156 | 157 | 2. We are most interested in comparisons between models and less so the individual parameters within a model. All of our models were fit using Full Maximum Likelihood Estimation and we judge models based on a reduction in ERROR that we call Deviance. Fortunately, there are several quantitative and objective methods for evaluating the change in deviance. We will focus on two of these methods, the Wald Test for the change in Deviance and the Akaike Information Criterion (AIC). 158 | 159 | You can read more about Full Maximum Likelihood Estimation from other resources, but conceptually the idea of maximum likelihood estimation is that our computer tests a long series of parameters until it arrives at the specific set of parameters that lead to the smallest amount of error in our data. This is why it is referred to as "maximum likelihood", because we arrive at the set of values (for the given parameters) that are *most likely* to have produced the data we observed. The goodness of fit for these parameter estimates is quantified in the *Deviance*, which is a transformation of the *Likelihood*. 160 | 161 | $$ Deviance = -2*log(Likelihood) $$ 162 | 163 | Where likelihood is defined by the amount of error ($\epsilon$) left behind by our estimates. Thus, if we delve a little deeper, the deviance is: 164 | 165 | $$ Deviance = N*log(2\pi\sigma^2_\epsilon)+(1/\sigma^2_\epsilon)*(\sum(\epsilon^2_i)) $$ 166 | 167 | This formula is kind of scary, but there are two things you need to notice about it: 168 | 169 | 1. Looking at the right side of the equation, notice that the deviance is still largely determined by the sum of errors. **Thus, all else being equal, smaller errors are going to lead to a smaller deviance.** 170 | 171 | 2. Notice that size our sample shows up in two different places (the N at the beginning and the fact that we are summing over N on the right hand side). This means that the deviance is sensitive to the amount of data we are using. **Thus, if we want to compare models based on their deviance, those models need to be based on the same amount of data.** 172 | 173 | ## 1.3. The Wald Test of the Change in Deviance 174 | Now we are ready to make a comparison between some of our different statistical models by comparing the change in the Deviance. Let's start by comparing the Random Intercepts, Fixed Slopes, and Random Slopes models using the anova() function in R. 175 | 176 | ```{r} 177 | anova(raneff_00,raneff_01,raneff_02, raneff_03) 178 | ``` 179 | The anova() function gives a number of valuable pieces of information. First, it explicitly lists the models that are being tested. Below, it gives us the model name and the degrees of freedom for each model. It then gives us the Akaike's Information Criterion (AIC), the related Bayesian Information Criterion (or BIC), the log of the Likelihood (or logLik), and the Deviance. 180 | 181 | The Random Intercepts model can act as our "benchmark" against which other models can be compared. For instance, the reduction in deviance from the Random Intercepts (Deviance = 5859.9) to the Random Linear Slopes model (Deviance = 4812.9) is 1041; which is a huge reduction! The change in deviance follows a $\chi^2$ distribution, which allows us to see if model is a statistical signficant improvement beyond the preceeding model. 182 | 183 | The based on the Wald Test of the change in deviance, it appears that all of our models are successive improvements, despite the large increases to the degrees of freedom. The linear model is better than the random-intercepts model, $\chi^2(3)=1046.98, p < 0.001$. the quadratic model is better than the linear, $\chi^2(4)=746.46, p < 0.001$, and the cubic model provides an even better fit than the quadratic, $\chi^2(5)=252.32, p < 0.001$. Thus, we would conclude that the cubic model is the "best" unconditional model (assuming $\alpha = 0.05$). 184 | 185 | 186 | ## 1.4. The Akaike Information Criterion (AIC) 187 | The AIC is another method to evaluating model fit that is based on the Deviance. Although we won't get into the details of the math behind it, the importance of the AIC is in the name "Information Criterion". That is, the AIC is all about informativeness which is slightly different from just being the model that produces the smallest deviance. For a model to be informative, the parameters need to generalize to other new datasets, not just provide the best explanation of the current data. Therefore, the AIC introduces a penalty to reduce **over-fitting** of the model: 188 | $$ AIC = Deviance + 2(k) $$ 189 | 190 | In the formula above, k = number of parameters in the model. Thus, for a parameter to improve the AIC it has to reduce the deviance by >2 times the number of parameters. As mentioned, we won't get into why the magic number of 2(k) seems to work so well, but the key thing to know is that **the AIC imposes a penalty based on the number of parameters and is thus a more conservative test than the Wald Test of the change in Deviance**. We can see this in action by comparing our models in the ANOVA output above. Note that the AIC is reliably larger than the simple deviance by a factor of $2*k$. 191 | 192 | Ultimately, we still arrive at the same conclusion because the cubic model has the lowest AIC. However, it is important that we base this decision on the AIC rather than just the Wald Test of the change in deviance. The reason for this comes back to over-fitting. Note that the cubic model uses 15 degrees of freedom, which is a lot more than the simpler linear model that used only 6. Adding 9 extra parameters is likely to reduce the deviance just by chance, so by introducing a penalty for every additional parameter, we can really make sure that these **additional parameters are pulling their own weight**, so to speak. (For a more detailed explanation of the AIC and it's unique properties for improving generalizability/reducing over-fitting, see Jeff Long's excellent book, *Longitudinal Data Analysis for the Behavioral Sciences using R*). 193 | 194 | As a word of caution, there are no fixed cut-offs for a "statistically significant" change in the AIC although some research has been done exploring how the AIC relates to other measures of effect-size (see Long, 2012). In general, it is a good idea to declare a *minimum change* in the AIC in advance. Keep in mind that *any* reduction in the AIC means that model is explaining more of the deviance than the complexity it has gained in additional parameters. However, we might want to set a minimum difference of 1 whole point or 2 whole points for selecting a "superior" model. For instance, Anderson (2008, chap. 4) describes a $\Delta AIC = 4$ as a "strong" difference in the explanatory power of two models and $\Delta AIC = 8$ as a "very strong" difference. After all, the **exact** AIC would depend on your data conforming to all of your model's assumptions. For that reason, setting a minimum cut-off or 1 or 2 AIC points is useful, because your AIC may not be precise to the level of 0.01 or 0.1. 195 | 196 | For instance, when the sample size is small, there is a good chance that the AIC will not be penalizing additional parameters enough to avoid overfitting. To address this issue, researchers have developed the AIC-corrected, or $AICc$. Assuming that your model is univariate in it's outcome, linear in its parameters, and has an (approximately) normally distributed residuals, then the AICc can be calculated by: 197 | $$ AICc = AIC + (2k^2+2k)/(n-k-1) $$ 198 | Where $n$ is the sample size and $k$ is the number of parameters. As such, the AICc is essentially the AIC with an extra penalty on the number of parameters. As the sample size gets larger, the AICc will effectively converge on the AIC. 199 | 200 | These rules-of-thumb should not be treated as hard-cutoffs however, and analysts should treat the AIC continuously. I do think that these guidelines are useful, however, because our models will likely violate our assumptions to some degree. Using integer values of the AIC then, builds in a "buffer" to help us make sure that we are select a model that truly explains more variability than it adds in complexity. 201 | 202 | 203 | ## 1.5. Creating a Conditional Model of Change over Time 204 | Once we have settled on our unconditional model of change over time, we can start to add factors to our model to try explain individual differences in these trajectories. 205 | 206 | Specifically, we will add the factor of AIS Grade to our model, as well as interactions between AIS Grade and time. 207 | 208 | After creating this conditional model, we can first check to see if it is an improvement above the unconditional models, by comparing their respective AICs using the anova() function. 209 | 210 | 211 | 212 | 213 | ```{r} 214 | # Effect of AIS Grade on Time 215 | cond_01<-lmer(rasch_FIM~ 216 | # Fixed-effects 217 | 1+year.0*AIS_grade+year.0_sq*AIS_grade+year.0_cu*AIS_grade+ 218 | # Random-effects 219 | (1+year.0+year.0_sq+year.0_cu|subID), data=DAT2, REML=FALSE, 220 | control=lmerControl(optimizer="bobyqa", 221 | optCtrl=list(maxfun=5e5))) 222 | anova(raneff_03, cond_01) 223 | ``` 224 | 225 | As this model is an improvement beyond the unconditional models, based on the AIC reduction, we can then delve deeper into the model by passing only the best fitting model to the anova() function, which will give us the omnibus F-test for the different main-effects and interactions (similar to a more traditional ANOVA table). 226 | 227 | ```{r} 228 | anova(cond_01) 229 | #Note that I actually prefer to use the Anova() function from the car package, where you can easily specify the type of SS calculation. 230 | Anova(cond_01, type="III") 231 | ``` 232 | 233 | If we really want to drill down into the model, we can get the specific parameters estimates for the fixed-effects (similar to an OLS regression output) and the variance/covariance estimates for the random-effects by using the summary() function. 234 | 235 | ```{r} 236 | summary(cond_01) 237 | ``` 238 | 239 | # 2. Fitting a Non-Liner Model of Change over Time 240 | ```{r} 241 | # Negative Exponential Model ---- 242 | ggplot(DAT2, aes(x = year.0, y = rasch_FIM)) + 243 | geom_line(aes(group=subID), col="grey") + 244 | #stat_smooth(method="lm", formula=y~x+I(x^2), col="black", lwd=1.5, se=FALSE)+ 245 | scale_x_continuous(name = "Time from Admission (Years)") + 246 | scale_y_continuous(name = "Rasch-Scaled FIM Score (0-100)",limits=c(0,100)) + 247 | theme_bw() + 248 | theme(axis.text=element_text(size=14, colour="black"), 249 | axis.title=element_text(size=14,face="bold")) + 250 | theme(strip.text.x = element_text(size = 14))+ theme(legend.position="none") 251 | 252 | library(nlme) 253 | 254 | set.seed(100) 255 | neg_exp_rand_mod <- nlme(rasch_FIM ~ b_1i + 256 | (b_2i)*(exp(b_3i * year.0)), 257 | data = DAT2, 258 | fixed = b_1i + b_2i + b_3i ~ 1, 259 | random = list(b_1i ~ 1, b_2i ~ 1, b_3i ~1), 260 | groups = ~ subID, 261 | start = c(80, -70, -1), 262 | na.action = na.omit) 263 | summary(neg_exp_rand_mod) 264 | 265 | coef(neg_exp_rand_mod) 266 | fitted(neg_exp_rand_mod) 267 | 268 | year <- seq(from=0, to=1.5, by=0.01) 269 | rasch_FIM <- 58.53985-48.13958*exp(-2.53036*year) 270 | PRED <- data.frame(year, rasch_FIM) 271 | 272 | head(DAT2) 273 | ggplot(DAT2, aes(x = year.0, y = rasch_FIM)) + 274 | geom_line(aes(group=subID), col="grey") + 275 | scale_x_continuous(name = "Time from Admission (Years)") + 276 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100)) + 277 | #facet_wrap(~AIS_grade) + 278 | theme_bw() + 279 | theme(axis.text=element_text(size=14, colour="black"), 280 | axis.title=element_text(size=14,face="bold")) + 281 | theme(strip.text.x = element_text(size = 14))+ theme(legend.position="none")+ 282 | geom_line(data=PRED, aes(x=year, y=rasch_FIM), col="black", lwd=1.5) 283 | 284 | 285 | DAT2$exp_pred <- fitted(neg_exp_rand_mod) # Save model predictions to data frame 286 | first4<-DAT2[c(1:72),] # Second, we'll make a smaller dataset with the predictions for these 10: 287 | 288 | 289 | ggplot(first4, aes(x = year.0, y = rasch_FIM)) + 290 | geom_line(aes(group=subID)) + facet_wrap(~subID, ncol=2)+ 291 | geom_point(fill="grey", pch=21, size=2, stroke=1.25) + 292 | scale_x_continuous(name = "Time from Admission (Years)") + 293 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100))+ 294 | geom_line(aes(y=exp_pred), lwd=1, col="purple") + 295 | theme_bw() + theme(axis.text=element_text(size=12, colour="black"), 296 | axis.title=element_text(size=14,face="bold")) + 297 | theme(strip.text.x = element_text(size = 12))+ theme(legend.position="none") 298 | ``` 299 | 300 | 301 | # 3. A Note on Optimizers 302 | Note that I am specifying the optimizer that we are using. Specifically, I am using the bobyqa optimizer. bobyqa is short for "Bound Approximation BY Quadratic Approximation". It is the optimizer that lme4 uses by default, but I am calling it explicitly here. You can select other optimizers using the lmerControl() function: (https://www.rdocumentation.org/packages/lme4/versions/1.1-27/topics/lmerControl). 303 | ```{r, eval=FALSE} 304 | control=lmerControl(optimizer="Nelder_Mead", 305 | optCtrl=list(maxfun=5e5))) 306 | ``` 307 | 308 | A good exercise is to run all of the models in this chapter using the Nelder-Mead optimizer and the BOBYQA optimizer. Do these models differ in how they estimate the fixed-effects and standard errors of the fixed-effects? Do these models differ in how they estimate the variances and covariances of the random-effects? 309 | 310 | You can also change the number of iterations that your maximum likelihood simulation goes through by changing the maxfun in the optCtrl argument. If you run into convergence warnings, it is a good idea to: 311 | 312 | 1. increase the number of iterations (use a minimum of 200,000 iterations), 313 | 2. change your optimizer to see if the problem persists, and finally 314 | 3. try simplifying the structure of your random-effects. 315 | 316 | 317 | For a fairly accessible discussion of these issues, I would recommend a simulation study by McCoach and colleagues (2018; https://journals.sagepub.com/doi/abs/10.3102/1076998618776348?journalCode=jebb). By simulating various multi-level data structures and then fitting the same mixed-effects models in different software packages, McCoach and colleagues found that the BOBYQA optimizer tended to give more non-convergence warnings than other optimizers/programs even though the estimates from the models were (effectively) the same. 318 | 319 | ... -------------------------------------------------------------------------------- /lohse_MER_section_03_factorial.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Section 3: Mixed-Effects Models for Factorial Designs' 3 | author: "Keith Lohse, PhD, PStat" 4 | date: '2022-10-04' 5 | output: 6 | html_document: 7 | df_print: paged 8 | pdf_document: default 9 | word_document: default 10 | --- 11 | 12 | ## Note that this page is in the process of being updated 2022-10-04 13 | 14 | For these examples, we are going to work with a fictional data that that has two 15 | fully nested (i.e., between-subjects) and two fully crossed (i.e., within-subject) 16 | factors. We have two hypothetical groups of older adults (OA, >65 y) and younger 17 | adults (YA, <35 y). Within each of those groups, half of the participants were 18 | in the control group (C) and half were in the treatment group (T). Each participant 19 | was also measured on four different trials (1 to 4) in three different conditions 20 | (A, B, and C). 21 | 22 | First, we will open the relevant R packages that we will use and then we will 23 | download the data from the web. (If you don't have these packages installed, you 24 | will need install the packages before running the library() function.) Once the data 25 | are downloaded we can use the head() function to view the first ten rows of the data. 26 | 27 | 28 | ```{r, setting libraries, results="hide", message = FALSE, warning=FALSE} 29 | library(tidyverse); library(RCurl); library(ez); library(lme4); library(car); library(lmerTest) 30 | 31 | DATA <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/data_AGING_example.csv", 32 | stringsAsFactors = TRUE) 33 | 34 | ``` 35 | 36 | ``` {r, print data to screen} 37 | head(DATA, 10) 38 | 39 | ``` 40 | 41 | For the examples we will walk through, we will ignore different variables at different 42 | times. For instance, we will want to average across trials to create a data set with one 43 | observation per condition (which we will call *data_COND*), and we will want to average across conditions 44 | to create a data set with one observation for each trial (which we will call *data_TIME*). 45 | 46 | Averaging across trials, here are the first ten rows of *data_COND*. 47 | ```{r, subsetting data by condition, warning=FALSE} 48 | data_COND <- DATA %>% group_by(subID, condition, age_group, group) %>% # Note we ignore trial to average across it 49 | summarize(speed = mean(speed, na.rm=TRUE)) %>% # I have included na.rm=TRUE even though there are no missing data 50 | arrange(age_group, subID, condition) # finally, we can resort our data by subIDs within groups 51 | head(data_COND, 10) 52 | ``` 53 | 54 | Averaging across conditions, here are the first ten rows of *data_TIME*. 55 | ``` {r, subsetting data by time, warning=FALSE} 56 | data_TIME <- DATA %>% group_by(subID, time, age_group, group) %>% # Note we ignore condition to average across it 57 | summarize(speed = mean(speed, na.rm=TRUE)) %>% # I have included na.rm=TRUE even though there are no missing data 58 | arrange(age_group, subID, time) # finally, we can resort our data by subIDs within groups 59 | head(data_TIME, 10) 60 | 61 | ``` 62 | 63 | With these data in place, we can now test all of our different models. We are going 64 | to explore the appropriate mixed-effects regression (MER) models for these different 65 | situations: 66 | 67 | 1. **MER as One-Way Repeated Measures ANOVA** 68 | * When we have a single crossed factor (i.e., one within-subjects factor) in 69 | our mixed-effects model. 70 | 2. **MER as Two-Way Repeated Measures ANOVA** 71 | * When we have multiple crossed factors (i.e., two within-subjects factors) in 72 | our mixed-effects model. 73 | 3. **MER as Mixed-Factorial ANOVA with a Single Within-Subjects Factor** 74 | * When we have a single crossed factor (i.e., one within-subjects factor) and 75 | a single nested factor (i.e., between-subjects factors) in our mixed-effects 76 | model. 77 | 4. **MER as Mixed-Factorial ANOVA with Multiple Within-Subjects Factors** 78 | * When we have multiple crossed factors (i.e., two within-subjects factor) and 79 | a single nested factor (i.e., between-subjects factors) in our mixed-effects 80 | model. 81 | 82 | 83 | # 1. MER as One-Way Repeated Measures ANOVA 84 | ## (A Single Crossed Factor) 85 | For this example, we will focus on only the effect of condition, so we will use 86 | the data_COND dataset to average across different trials. First, let's plot the 87 | data to get a better sense of what the data look like. 88 | 89 | 90 | ``` {r plotting the effects of condition, echo=TRUE, fig.align="center"} 91 | ggplot(data_COND, aes(x = condition, y = speed)) + 92 | geom_point(aes(fill=condition), pch=21, size=2, 93 | position=position_jitter(w=0.2, h=0))+ 94 | geom_boxplot(aes(fill=condition), col="black", 95 | alpha=0.4, width=0.5, outlier.shape = NA)+ 96 | scale_x_discrete(name = "Condition") + 97 | scale_y_continuous(name = "Speed (m/s)") + 98 | theme(axis.text=element_text(size=16, color="black"), 99 | axis.title=element_text(size=16, face="bold"), 100 | plot.title=element_text(size=16, face="bold", hjust=0.5), 101 | panel.grid.minor = element_blank(), 102 | strip.text = element_text(size=16, face="bold"), 103 | legend.position = "none") 104 | 105 | ``` 106 | 107 | ## 1.1. As an ANOVA... 108 | To implement a simple one-way repeated measures ANOVA, we have a few options. We 109 | could directly code our ANOVA using the aov() function in R: 110 | ``` {r one way ANOVA the hard way, echo=TRUE, warning=FALSE} 111 | summary(aov(speed ~ condition + Error(subID/condition), data=data_COND)) 112 | ``` 113 | 114 | Or we can use the ezANOVA() function from the "ez" package. 115 | ```{r one way ANOVA the ez way, echo=TRUE, warning=FALSE} 116 | ezANOVA(data = data_COND, 117 | dv = .(speed), 118 | wid = .(subID), 119 | within = .(condition) 120 | ) 121 | ``` 122 | Although these two different functions present the results in slightly different 123 | ways, note that the f-values for the two different omnibus tests match. By either 124 | method, the f-observed for the main-effect of condition is **F(2,78)=24.46, p<0.001**. 125 | 126 | If you are familiar with issues of contrast versus treatment coding, Type I 127 | versus Type III Sums of Squared Errors, and collinearity, then directly controlling 128 | your own ANOVA using base R is probably a safe bet. 129 | 130 | If you are not familiar with those terms/issues, then the ezANOVA code is probably the best option for you. However, I would strongly encourage you to develop a more detailed understanding of general-linear models before jumping into mixed-effect models. 131 | 132 | By default the aov() function provides a test of your statistical 133 | model using Type I Sums of Squared Errors, whereas the ezANOVA() function provides 134 | a test of your statistical model using Type III Sums of Squared Errors. In a completely 135 | orthogonal design where all factors are statistically independent of each other 136 | (i.e., there is no collinearity), the Type I and Type III Sums of Squared Errors 137 | will agree. By default, R also uses treatment coding (or "dummy" coding) for categorical 138 | factors rather than orthogonal contrast codes. The omnibus F-tests that we see in 139 | the ANOVA output will be the same regardless of the types of codes used, but if 140 | we dig into individual regression coefficients, it is important to remember how 141 | these variables were coded so that we can interpret them correctly. 142 | 143 | 144 | ## 1.2. Getting the same result with a mixed-effect model... 145 | Because we have a single within-subject factor, we will need to add a 146 | random-effect of subject to account for individual differences between subjects. 147 | By partitioning the between-subjects variance out of our model, we can fairly test 148 | the effect of *condition*, because our residuals will now be independent of each 149 | other. 150 | ```{r one way ANOVA in a mixed effects model, echo=TRUE, warning=FALSE} 151 | # First we will define our model 152 | mod1 <- lmer(speed ~ 153 | # Fixed Effects: 154 | condition + 155 | # Random Effects: 156 | (1|subID), 157 | # Define the data: 158 | data=data_COND, REML = TRUE) 159 | 160 | # We can then get the ANOVA results for our model: 161 | anova(mod1) 162 | ``` 163 | 164 | Most critically, note that the F-value, **F(2,78)=24.46, p<0.001** is identical in 165 | both the RM ANOVA and in the mixed-effects regression model. 166 | 167 | If we want to delve deeper into our model, we can also use the summary() function 168 | to get more information about model fit statistics, parameter estimates, random-effects 169 | and residuals. 170 | 171 | ```{r} 172 | summary(mod1) 173 | ``` 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | # 2. MER as Two-Way Repeated Measures ANOVA 182 | ## (Multiple Crossed Factors) 183 | For this example, we will be analyzing both Time and Condition, so we will use 184 | our full data frame, *DATA*. First, let's plot the data to get a better 185 | sense of what our data look like. 186 | 187 | ``` {r plotting two repeated measures, fig.align="center"} 188 | DATA$time <- factor(DATA$time) 189 | 190 | ggplot(DATA, aes(x = time, y = speed)) + 191 | geom_point(aes(fill=condition), pch=21, size=2, 192 | position=position_jitterdodge(dodge.width = 0.5, jitter.width = 0.1))+ 193 | geom_boxplot(aes(fill=condition), col="black", 194 | alpha=0.4, width=0.5, outlier.shape = NA)+ 195 | labs(fill="Condition")+ 196 | scale_x_discrete(name = "Trial") + 197 | scale_y_continuous(name = "Speed (m/s)", limits = c(0,3)) + 198 | theme(axis.text=element_text(size=16, color="black"), 199 | axis.title=element_text(size=16, face="bold"), 200 | legend.text=element_text(size=16, color="black"), 201 | legend.title=element_text(size=16, face="bold"), 202 | plot.title=element_text(size=16, face="bold", hjust=0.5), 203 | panel.grid.minor = element_blank(), 204 | strip.text = element_text(size=16, face="bold"), 205 | legend.position = "bottom") 206 | ``` 207 | 208 | 209 | ## 2.1. As an ANOVA... 210 | Before we run our models, we want to convert trial to a **factor** so that our model 211 | is treating time categorically rather than continuously. (In later modules, we 212 | will discuss how to mix continuous and categorical factors.) Additionally, remember 213 | that we are now using our larger data set *DATA* rather than our aggregated data 214 | set *data_COND*. To implement a two-way repeated measures ANOVA, we have the same 215 | options as before. We can directly code our ANOVA using the aov() function in R: 216 | ``` {r two way ANOVA the hard way, echo=TRUE} 217 | DATA$time <- factor(DATA$time) 218 | summary(aov(speed ~ condition*time + Error(subID/(condition*time)), data=DATA)) 219 | ``` 220 | 221 | Or we can use the ezANOVA() function from the "ez" package. 222 | ```{r two way ANOVA the ez way, echo=TRUE} 223 | ezANOVA(data = DATA, 224 | dv = .(speed), 225 | wid = .(subID), 226 | within = .(time, condition) 227 | ) 228 | ``` 229 | Again, regardless of the coding approach that you use, these two different functions 230 | produce the same f-observed for the main-effects of time, **F(3,117)=105.95, p<0.001**, 231 | and Condition, **F(2,78)=24.46, p<0.001**, and the Time x Condition interaction, **F(6,234)=13.53, p<0.001**. 232 | 233 | 234 | 235 | 236 | ## 2.2. Two-way RM ANOVA as a mixed-effect model... 237 | Because we now have two crossed factors, we need to account not only for the fact 238 | that we have multiple observations for each participant, but we have multiple 239 | observations for each person at each level of each factor. 240 | 241 | For instance, for the effect of Condition, we actually have Condition effects at Trial 1, Trial 2, Trial 3, and Trial 4. 242 | The converse is also true for the effect of Time, we have four different trials in 243 | Condition A, Condition B, and Condition C. Thus, in order to appropriately 244 | account for the statistical dependencies in our data, we need to add random-effects 245 | of "time:subID" and "condition:subID" to the model. 246 | 247 | The colon operator (":") means that we are crossing or multiplying these factors. 248 | That is, if we have subject ID's A, B, and C and Trials 1, 2, 3, and 4, then we end up with 249 | A1, A2, A3, A4, B1, B2, B3, B4, etc. 250 | 251 | For more information on how random-effects are specified and what they mean in R, 252 | I recommend looking at this discussion on Stack Exchange: https://stats.stackexchange.com/questions/228800/crossed-vs-nested-random-effects-how-do-they-differ-and-how-are-they-specified 253 | 254 | 255 | ```{r two way another in a mixed effects model, echo=TRUE, warning=FALSE} 256 | # First we will define our model 257 | mod2 <- lmer(speed ~ 258 | # Fixed Effects: 259 | time*condition + 260 | # Random Effects 261 | (1|subID)+ (1|time:subID) + (1|condition:subID), 262 | # Define your data, 263 | data=DATA, REML=TRUE) 264 | 265 | # We can then get the ANOVA results for our model: 266 | anova(mod2) 267 | ``` 268 | 269 | Again, for our purposes, the critical thing to note is that the F-values for the 270 | main-effects and interactions are the same between our RM ANOVAs and the mixed-effects 271 | model. Without delving into the mathematical details, this is a good demonstration 272 | that the appropriate random-effects our regression model make it analogous to the 273 | factorial ANOVA. This allows us to capitalize on the benefits of mixed-effects regression for 274 | designs that we would normally analyze using factorial ANOVA. 275 | 276 | 277 | If we want to delve deeper into our model, we can also use the summary() function 278 | to get more information about model fit statistics, parameter estimates, random-effects 279 | and residuals. 280 | 281 | ```{r} 282 | summary(mod2) 283 | ``` 284 | 285 | 286 | 287 | 288 | 289 | # 3. MER as Mixed-Factorial ANOVA with One Crossed Factor 290 | ## (2 (Age) x 3 (Condition) ANOVA Example 291 | For this example, we will now consider both the between-subject factor of age, 292 | as well as the within-subject factor of condition. Do to this, we will 293 | average over the different trials (1, 2, 3, and 4) to get one observation in each 294 | condition. This design is sometimes referred as a "mixed-factorial" design, because 295 | we have a mix of between-subjects and within-subject factors. Depending 296 | on your background, you might be more familiar with this as a "split plot" design. 297 | Split plot comes from agronomy (where a lot of statistics where developed!) and 298 | refers to the fact that some plots are assigned to different levels of Factor A (e.g., Treatment 299 | versus Control), but within each plot there is a second level of randomization to 300 | different levels of Factor B (e.g., Conditions A, B, or C). Both terms describe 301 | the same thing but differ in their unit of analysis. In psychology, a single person 302 | is usually the experimental unit (hence "within-subject" variables) whereas in 303 | agronomy or biology a physical area might be the unit of analysis (hence "split-plot" 304 | variables). The more general way to talk about these terms is as **nested-** versus 305 | **crossed-**factors. 306 | 307 | * For fully **nested** factors, an experimental unit is represented in only 308 | one of the factors (e.g., a person can only be in the treatment group or the 309 | control group). 310 | * For fully **crossed** factors, an experimental unit is represented at 311 | all levels of the factor (e.g., e.g., a person is tested in conditions A, B, and C). 312 | 313 | In our example, participants are nested within age-group, because each person 314 | is represented at only one level of that factor (i.e., you are only a younger adult or older adult). 315 | However, Condition is a crossed factor, because each person is represented at all levels of Condition 316 | (i.e., each person was measured in all three conditions). We can see this more clearly if we plot all of our data. 317 | 318 | ``` {r plotting crossed and nested factors, warning=FALSE, fig.align="center"} 319 | ggplot(data_COND, aes(x = condition, y = speed)) + 320 | geom_point(aes(fill=age_group), pch=21, size=2, 321 | position=position_jitterdodge(dodge.width = 0.5, jitter.width = 0.1))+ 322 | geom_boxplot(aes(fill=age_group), col="black", 323 | alpha=0.4, width=0.5, outlier.shape=NA)+ 324 | labs(fill="Age Group")+ 325 | scale_x_discrete(name = "Condition") + 326 | scale_y_continuous(name = "Speed (m/s)") + 327 | theme(axis.text=element_text(size=16, color="black"), 328 | axis.title=element_text(size=16, face="bold"), 329 | legend.text=element_text(size=16, color="black"), 330 | legend.title=element_text(size=16, face="bold"), 331 | plot.title=element_text(size=16, face="bold", hjust=0.5), 332 | panel.grid.minor = element_blank(), 333 | strip.text = element_text(size=16, face="bold"), 334 | legend.position = "bottom") 335 | ``` 336 | 337 | 338 | ## 3.1. As an ANOVA... 339 | For this mixed factorial ANOVA, we have one factor of Condition that varies 340 | within-subjects, but we also have a factor of Age Group that 341 | varies between subjects. As before, we can directly code this into our analysis 342 | of variance using the aov() function or using the ezANOVA() function from the "ez" 343 | package. 344 | ``` {r mixed factorial ANOVA the hard way, echo=TRUE} 345 | summary(aov(speed ~ age_group*condition + Error(subID/condition), data=data_COND)) 346 | ``` 347 | 348 | Or we can use the ezANOVA() function from the "ez" package. 349 | ```{r mixed factorial ANOVA the ez way, echo=TRUE} 350 | ezANOVA(data = data_COND, 351 | dv = .(speed), 352 | wid = .(subID), 353 | within = .(condition), 354 | between = .(age_group) 355 | ) 356 | ``` 357 | 358 | The ezANOVA() function provides us with more detail, for instance automatically 359 | providing Mauchly's Test for Sphericity and both the Greenhouse-Geisser and Hyunh-Feldt 360 | corrections in the event that the sphericity assumption is violated. Most importantly, however, 361 | the outputs of these two functions agree when we look at the f-statistics for all 362 | main-effects and interactions when sphericity is assumed. 363 | 364 | 365 | 366 | 367 | ## 3.2. Mixed Factorial ANOVA as a mixed-effect model... 368 | For this mixed-factorial design, we need to account for the fact that we have 369 | multiple observations coming from each person, so we will add a random-effect of 370 | "subID". After accounting for this statistical dependence in our data, we can now 371 | fairly test the effects of Age Group, and Condition with residuals that are 372 | independent of each other. 373 | 374 | ```{r mixed factorial ANOVA in a mixed effects model, echo=TRUE} 375 | # First we will define our model 376 | mod3 <- lmer(speed ~ 377 | # Fixed Effects: 378 | age_group*condition + 379 | # Random Effects 380 | (1|subID), 381 | # Define your data, 382 | data=data_COND, REML=TRUE) 383 | 384 | # We can then get the ANOVA results for our model: 385 | anova(mod3) 386 | ``` 387 | 388 | Critically, note that the f-statistics and degrees of freedom all match our ANOVA outputs (when sphericity is assumed), 389 | with a main-effect of Age Group, F(1,38)=47.18, Condition, F(2,76)=27.27, and the 390 | Age Group x Condition interaction, F(2,76)=5.48. 391 | 392 | If we want to delve deeper into our model, we can also use the summary() function 393 | to get more information about model fit statistics, parameter estimates, random-effects, 394 | and residuals. 395 | 396 | ```{r} 397 | summary(mod3) 398 | ``` 399 | 400 | 401 | 402 | # 4. MER as Mixed-Factorial ANOVA with Multiple Crossed Factors 403 | ## 2 (Age Group) x 3 (Condition) x 4 (Trial) ANOVA 404 | Next, we will consider the more complicated example of our fully factorial design 405 | with a nested factor of Age-Group, and crossed factors of Condition and 406 | Time. 407 | 408 | ``` {r plotting multiple crossed and nested factors, fig.align="center"} 409 | DATA$time <- factor(DATA$time) 410 | 411 | ggplot(DATA, aes(x = time, y = speed)) + 412 | geom_point(aes(fill=age_group), size=2, shape=21, 413 | position=position_jitterdodge(dodge.width = 0.5, jitter.width = 0.1))+ 414 | geom_boxplot(aes(fill=age_group), col="black", 415 | alpha=0.4, width=0.5, outlier.shape = NA)+ 416 | labs(fill="Age Group")+ 417 | facet_wrap(~condition)+ 418 | scale_x_discrete(name = "Trial") + 419 | scale_y_continuous(name = "Speed (m/s)", limits = c(0,3)) + 420 | theme(axis.text=element_text(size=16, color="black"), 421 | axis.title=element_text(size=16, face="bold"), 422 | legend.text=element_text(size=16, color="black"), 423 | legend.title=element_text(size=16, face="bold"), 424 | plot.title=element_text(size=16, face="bold", hjust=0.5), 425 | panel.grid.minor = element_blank(), 426 | strip.text = element_text(size=16, face="bold"), 427 | legend.position = "bottom") 428 | ``` 429 | 430 | 431 | ## 4.1. As an ANOVA... 432 | For this mixed factorial ANOVA, we have two factors that vary within subjects, 433 | Condition and Time, and we have one factor that varies between subjects, 434 | Age Group. As before, we can directly code this into our analysis 435 | of variance using the aov() function or using the ezANOVA() function from the "ez" 436 | package. 437 | ``` {r multiway factorial ANOVA the hard way, echo=TRUE, warning=FALSE} 438 | summary(aov(speed ~ age_group*condition*time + Error(subID/(condition*time)), data=DATA)) 439 | ``` 440 | 441 | ```{r multiway factorial ANOVA the ez way, echo=TRUE, warning=FALSE} 442 | ezANOVA(data = DATA, 443 | dv = .(speed), 444 | wid = .(subID), 445 | within = .(condition, time), 446 | between = .(age_group) 447 | ) 448 | ``` 449 | 450 | 451 | 452 | ## 4.2. Multi-Way Mixed Factorial ANOVA as a mixed-effect model... 453 | For this mixed-factorial design, we need to account for the fact that we have 454 | multiple observations coming from each person, but we also need to acocunt for the 455 | fact that we multiple observations for each Condition and on each Trial. In order 456 | to account for this dependence in our data, we need to include random-effects 457 | of subject, subject:condition, and subject:time. Adding these random-effects to our 458 | model will make our mixed-effects model statistically equivalent to the mixed-factorial 459 | ANOVAs that we ran above. 460 | 461 | ```{r multiway factorial ANOVA in a mixed effects model, echo=TRUE} 462 | # First we will define our model 463 | mod4 <- lmer(speed ~ 464 | # Fixed Effects: 465 | age_group*condition*time + 466 | # Random Effects 467 | (1|subID)+(1|condition:subID)+(1|time:subID), 468 | # Define your data, 469 | data=DATA, REML=TRUE) 470 | 471 | # We can then get the ANOVA results for our model: 472 | anova(mod4) 473 | ``` 474 | 475 | Note that the f-statistics and the degrees of freedom match what we got from the 476 | ANOVA tables above (when sphericity is assumed). There are a lot of effects so I 477 | wont list them all, but note the main-effects of Age Group, F(1,38)=47.18, 478 | Condition, F(2,76)=27.27, and Time, F(3,114)=113.88. 479 | 480 | Readers familiar with repeated measures ANOVA wont be surprised to see that that the 481 | output of the aov() function partitions the effects into different sections. The 482 | between-subject effect of Age Group is evaluated using residual error at the level of 483 | "Error:subID". The effects of Condition and Age Group x Condition are evaluated 484 | using residuals of "Error: subID:condition". This is precisely what we are doing 485 | when we include the three different random-intercepts in the mixed-effects regression. 486 | The $(1|subID)$ partitions out the average individual differences between subjects, 487 | $(1|condition:subID)$ and $(1|time:subID)$ partitions out the variance at the different 488 | levels of our repeated measures. 489 | 490 | If we want to delve deeper into our model, we can also use the summary() function 491 | to get more information about model fit statistics, parameter estimates, random-effects 492 | and residuals. 493 | 494 | ```{r} 495 | summary(mod4) 496 | ``` 497 | 498 | 499 | -------------------------------------------------------------------------------- /lohse_MER_section_04_multiple_sources.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Section 4: Mixed-Effects Models with Multiple Sources of Variance' 3 | author: "Keith Lohse, PhD, PStat" 4 | date: '2022-10-04' 5 | output: 6 | html_document: 7 | df_print: paged 8 | pdf_document: default 9 | word_document: default 10 | --- 11 | 12 | ## Note that this page is in the process of being updated 2022-10-04 13 | 14 | Coming soon... 15 | 16 | 17 | -------------------------------------------------------------------------------- /random_effects_paper/data_heart_rate.csv: -------------------------------------------------------------------------------- 1 | SUBID,Alt,Cond,Heart_Rate 2 | S1,low,rest,47 3 | S1,low,imm,63 4 | S1,low,delay,48 5 | S1,high,rest,54 6 | S1,high,imm,64 7 | S1,high,delay,62 8 | S2,low,rest,62 9 | S2,low,imm,74 10 | S2,low,delay,60 11 | S2,high,rest,65 12 | S2,high,imm,80 13 | S2,high,delay,70 14 | S3,low,rest,46 15 | S3,low,imm,70 16 | S3,low,delay,46 17 | S3,high,rest,50 18 | S3,high,imm,71 19 | S3,high,delay,56 20 | S4,low,rest,55 21 | S4,low,imm,76 22 | S4,low,delay,52 23 | S4,high,rest,66 24 | S4,high,imm,80 25 | S4,high,delay,60 26 | S5,low,rest,65 27 | S5,low,imm,92 28 | S5,low,delay,66 29 | S5,high,rest,73 30 | S5,high,imm,95 31 | S5,high,delay,76 32 | S6,low,rest,42 33 | S6,low,imm,66 34 | S6,low,delay,43 35 | S6,high,rest,43 36 | S6,high,imm,63 37 | S6,high,delay,55 38 | S7,low,rest,58 39 | S7,low,imm,79 40 | S7,low,delay,61 41 | S7,high,rest,63 42 | S7,high,imm,81 43 | S7,high,delay,65 44 | S8,low,rest,54 45 | S8,low,imm,70 46 | S8,low,delay,56 47 | S8,high,rest,58 48 | S8,high,imm,76 49 | S8,high,delay,64 50 | S9,low,rest,46 51 | S9,low,imm,61 52 | S9,low,delay,43 53 | S9,high,rest,44 54 | S9,high,imm,65 55 | S9,high,delay,44 56 | S10,low,rest,63 57 | S10,low,imm,89 58 | S10,low,delay,59 59 | S10,high,rest,72 60 | S10,high,imm,87 61 | S10,high,delay,77 62 | -------------------------------------------------------------------------------- /random_effects_paper/data_longitudinal.csv: -------------------------------------------------------------------------------- 1 | subID,site,AIS_grade,month,time,sex,rasch_FIM,rasch_FIM_MAR,rasch_FIM_MNAR,rasch_FIM_LOCF 2 | s01,D,C5-8,1,1.16,f,12.56,12.56,12.56,12.56 3 | s01,D,C5-8,2,2.58,f,24.85446658,24.85446658,24.85446658,24.85446658 4 | s01,D,C5-8,3,3.69,f,40.27862925,,40.27862925,40.27862925 5 | s01,D,C5-8,4,4.92,f,43.86893316,,43.86893316,43.86893316 6 | s01,D,C5-8,5,5.16,f,47.66534385,,47.66534385,47.66534385 7 | s01,D,C5-8,6,6.63,f,49.11309583,49.11309583,,47.66534385 8 | s01,D,C5-8,7,7.23,f,43.9870163,43.9870163,,47.66534385 9 | s01,D,C5-8,8,8.63,f,46.54339974,,,47.66534385 10 | s01,D,C5-8,9,9.37,f,45.35725849,45.35725849,,47.66534385 11 | s01,D,C5-8,10,10.41,f,48.11981043,,,47.66534385 12 | s01,D,C5-8,11,11.38,f,50.7075872,,,47.66534385 13 | s01,D,C5-8,12,12.49,f,49.88756241,,49.88756241,49.88756241 14 | s01,D,C5-8,13,13.4,f,54.2002201,,,49.88756241 15 | s01,D,C5-8,14,14.83,f,52.44148288,,,49.88756241 16 | s01,D,C5-8,15,15.21,f,55.9439731,,55.9439731,55.9439731 17 | s01,D,C5-8,16,16.16,f,55.09786632,,,55.9439731 18 | s01,D,C5-8,17,17.36,f,55.1514855,,55.1514855,55.1514855 19 | s01,D,C5-8,18,19.13,f,54.65172507,,,55.1514855 20 | s02,B,T1-S5,1,1.43,f,38.32666667,38.32666667,38.32666667,38.32666667 21 | s02,B,T1-S5,2,2.36,f,31.48194535,,31.48194535,31.48194535 22 | s02,B,T1-S5,3,3.84,f,44.24141032,,44.24141032,44.24141032 23 | s02,B,T1-S5,4,4.23,f,53.8453,,53.8453,53.8453 24 | s02,B,T1-S5,5,5.62,f,51.02152,,51.02152,51.02152 25 | s02,B,T1-S5,6,6.39,f,63.8453,,63.8453,63.8453 26 | s02,B,T1-S5,7,7.06,f,68.74535,,,63.8453 27 | s02,B,T1-S5,8,8.19,f,70.85624,,70.85624,70.85624 28 | s02,B,T1-S5,9,9.53,f,73.43536,73.43536,,70.85624 29 | s02,B,T1-S5,10,10.55,f,74.09358,,,70.85624 30 | s02,B,T1-S5,11,11.97,f,75.02343,75.02343,,70.85624 31 | s02,B,T1-S5,12,12.86,f,76.57812,,,70.85624 32 | s02,B,T1-S5,13,13.19,f,74.73453,74.73453,,70.85624 33 | s02,B,T1-S5,14,14.76,f,76.453222,,,70.85624 34 | s02,B,T1-S5,15,15.93,f,80.021111,80.021111,,70.85624 35 | s02,B,T1-S5,16,16.21,f,78.78635,,,70.85624 36 | s02,B,T1-S5,17,17.38,f,79.1115,,,70.85624 37 | s02,B,T1-S5,18,19.27,f,81.91324,81.91324,,70.85624 38 | s03,D,C5-8,1,1.26,f,8.03333333,8.03333333,8.03333333,8.03333333 39 | s03,D,C5-8,2,2.14,f,24.46231766,,24.46231766,24.46231766 40 | s03,D,C5-8,3,3.03,f,28.27085241,,28.27085241,28.27085241 41 | s03,D,C5-8,4,4.85,f,32.55130198,32.55130198,,28.27085241 42 | s03,D,C5-8,5,5.07,f,38.88622751,38.88622751,38.88622751,38.88622751 43 | s03,D,C5-8,6,6.89,f,40.83983673,,,38.88622751 44 | s03,D,C5-8,7,7.45,f,44.21707775,,44.21707775,44.21707775 45 | s03,D,C5-8,8,8.86,f,43.76028631,,43.76028631,43.76028631 46 | s03,D,C5-8,9,9.94,f,47.32837149,,,43.76028631 47 | s03,D,C5-8,10,10.59,f,47.73521184,,,43.76028631 48 | s03,D,C5-8,11,11.77,f,51.67923675,51.67923675,,43.76028631 49 | s03,D,C5-8,12,12.54,f,52.18882106,52.18882106,,43.76028631 50 | s03,D,C5-8,13,13.92,f,55.20551292,,,43.76028631 51 | s03,D,C5-8,14,14.06,f,54.64606207,,,43.76028631 52 | s03,D,C5-8,15,15,f,57.02374659,,,43.76028631 53 | s03,D,C5-8,16,16.84,f,62.19564,,,43.76028631 54 | s03,D,C5-8,17,17.69,f,63.98676,63.98676,,43.76028631 55 | s03,D,C5-8,18,18.13,f,62.1346,62.1346,,43.76028631 56 | s04,B,C1-4,1,1.45,m,6.08,,6.08,6.08 57 | s04,B,C1-4,2,2.33,m,8.16076094,8.16076094,8.16076094,8.16076094 58 | s04,B,C1-4,3,3.08,m,18.01585382,18.01585382,18.01585382,18.01585382 59 | s04,B,C1-4,4,4.64,m,20.74152188,,20.74152188,20.74152188 60 | s04,B,C1-4,5,5.25,m,26.12421968,,26.12421968,26.12421968 61 | s04,B,C1-4,6,6.04,m,26.93661476,26.93661476,26.93661476,26.93661476 62 | s04,B,C1-4,7,7.9,m,28.91883659,,28.91883659,28.91883659 63 | s04,B,C1-4,8,8.64,m,31.90228283,,,28.91883659 64 | s04,B,C1-4,9,9.41,m,33.97170765,,33.97170765,33.97170765 65 | s04,B,C1-4,10,10.66,m,35.60498062,35.60498062,,33.97170765 66 | s04,B,C1-4,11,11.09,m,35.06337775,35.06337775,,33.97170765 67 | s04,B,C1-4,12,12.2,m,35.91737571,35.91737571,,33.97170765 68 | s04,B,C1-4,13,13.22,m,35.99011882,,,33.97170765 69 | s04,B,C1-4,14,14.9,m,36.91959754,,,33.97170765 70 | s04,B,C1-4,15,15.51,m,35.5200735,,,33.97170765 71 | s04,B,C1-4,16,16.69,m,35.02304377,,35.02304377,35.02304377 72 | s04,B,C1-4,17,17.03,m,36.69791219,,,35.02304377 73 | s04,B,C1-4,18,18.15,m,36.41246859,,,35.02304377 74 | s05,D,C1-4,1,1.19,f,18.17646,18.17646,18.17646,18.17646 75 | s05,D,C1-4,2,2.64,f,21.48911,,21.48911,21.48911 76 | s05,D,C1-4,3,3.63,f,23.48030015,,23.48030015,23.48030015 77 | s05,D,C1-4,4,4.99,f,30.88625953,,,23.48030015 78 | s05,D,C1-4,5,5.41,f,38.965987,,38.965987,38.965987 79 | s05,D,C1-4,6,6.62,f,46.29009658,46.29009658,,38.965987 80 | s05,D,C1-4,7,7.6,f,50.3589595,,50.3589595,50.3589595 81 | s05,D,C1-4,8,8.71,f,52.12667685,,,50.3589595 82 | s05,D,C1-4,9,9.78,f,53.19989301,53.19989301,,50.3589595 83 | s05,D,C1-4,10,10.07,f,57.20070446,57.20070446,,50.3589595 84 | s05,D,C1-4,11,12,f,62.12667685,,,50.3589595 85 | s05,D,C1-4,12,12.41,f,63.19989301,,,50.3589595 86 | s05,D,C1-4,13,13.51,f,60.20070446,,,50.3589595 87 | s05,D,C1-4,14,14.58,f,61.64875593,,,50.3589595 88 | s05,D,C1-4,15,15.9,f,60.97962049,,,50.3589595 89 | s05,D,C1-4,16,16.95,f,59.62585239,,,50.3589595 90 | s05,D,C1-4,17,17.78,f,62.0377202,,,50.3589595 91 | s05,D,C1-4,18,19.79,f,62.28373007,,,50.3589595 92 | s06,C,C5-8,1,1.14,f,5.933,5.933,5.933,5.933 93 | s06,C,C5-8,2,2.4,f,20.84972894,,20.84972894,20.84972894 94 | s06,C,C5-8,3,3.7,f,28.27640326,,28.27640326,28.27640326 95 | s06,C,C5-8,4,4.2,f,36.19343715,,,28.27640326 96 | s06,C,C5-8,5,5.22,f,38.48252014,,38.48252014,38.48252014 97 | s06,C,C5-8,6,6.26,f,40.75947318,,40.75947318,40.75947318 98 | s06,C,C5-8,7,7.81,f,41.84487147,,,40.75947318 99 | s06,C,C5-8,8,8.87,f,43.08765566,,,40.75947318 100 | s06,C,C5-8,9,9.01,f,50.75947318,,,40.75947318 101 | s06,C,C5-8,10,10.33,f,51.84487147,51.84487147,51.84487147,51.84487147 102 | s06,C,C5-8,11,11.59,f,53.08765566,,,51.84487147 103 | s06,C,C5-8,12,12.21,f,53.14919446,,,51.84487147 104 | s06,C,C5-8,13,13.59,f,53.64571549,53.64571549,,51.84487147 105 | s06,C,C5-8,14,14.98,f,54.48983275,,54.48983275,54.48983275 106 | s06,C,C5-8,15,15.07,f,57.23154579,57.23154579,,54.48983275 107 | s06,C,C5-8,16,16.09,f,57.01891574,57.01891574,,54.48983275 108 | s06,C,C5-8,17,17.78,f,56.85853613,,56.85853613,56.85853613 109 | s06,C,C5-8,18,19.1,f,58.31586878,58.31586878,,56.85853613 110 | s07,C,C5-8,1,1.74,f,15.42666667,15.42666667,15.42666667,15.42666667 111 | s07,C,C5-8,2,2.3,f,25.91565099,,25.91565099,25.91565099 112 | s07,C,C5-8,3,3.05,f,32.08418574,32.08418574,32.08418574,32.08418574 113 | s07,C,C5-8,4,4.73,f,38.40463532,,38.40463532,38.40463532 114 | s07,C,C5-8,5,5.64,f,44.37956085,,44.37956085,44.37956085 115 | s07,C,C5-8,6,6,f,52.91317007,,,44.37956085 116 | s07,C,C5-8,7,7.13,f,55.99041108,55.99041108,,44.37956085 117 | s07,C,C5-8,8,8.89,f,57.57361964,,,44.37956085 118 | s07,C,C5-8,9,9.49,f,61.60170482,,,44.37956085 119 | s07,C,C5-8,10,10.53,f,61.58854517,61.58854517,,44.37956085 120 | s07,C,C5-8,11,11.22,f,64.87257009,,,44.37956085 121 | s07,C,C5-8,12,12.09,f,67.74215439,,,44.37956085 122 | s07,C,C5-8,13,13.68,f,65.67884626,65.67884626,,44.37956085 123 | s07,C,C5-8,14,14.05,f,68.01939541,,,44.37956085 124 | s07,C,C5-8,15,15.02,f,69.77707992,,,44.37956085 125 | s07,C,C5-8,16,16.22,f,70.90260397,,70.90260397,70.90260397 126 | s07,C,C5-8,17,17.14,f,72.84472284,,,70.90260397 127 | s07,C,C5-8,18,18.48,f,72.47068914,,,70.90260397 128 | s08,D,C5-8,1,1.13,f,8.79334,8.79334,8.79334,8.79334 129 | s08,D,C5-8,2,2.04,f,25.71347,,25.71347,25.71347 130 | s08,D,C5-8,3,3.25,f,35.24696682,,35.24696682,35.24696682 131 | s08,D,C5-8,4,4.36,f,41.23292619,41.23292619,,35.24696682 132 | s08,D,C5-8,5,5.91,f,43.75265367,43.75265367,,35.24696682 133 | s08,D,C5-8,6,6.38,f,48.29676325,,48.29676325,48.29676325 134 | s08,D,C5-8,7,7.96,f,52.44562617,,52.44562617,52.44562617 135 | s08,D,C5-8,8,8.08,f,53.96272263,53.96272263,53.96272263,53.96272263 136 | s08,D,C5-8,9,9.98,f,57.4824501,57.4824501,,53.96272263 137 | s08,D,C5-8,10,10.09,f,60.09334352,,,53.96272263 138 | s08,D,C5-8,11,11.72,f,63.62635,63.62635,,53.96272263 139 | s08,D,C5-8,12,12.14,f,65.92628715,,65.92628715,65.92628715 140 | s08,D,C5-8,13,13.35,f,69.3504,69.3504,,65.92628715 141 | s08,D,C5-8,14,14.69,f,72.3135,72.3135,,65.92628715 142 | s08,D,C5-8,15,15.21,f,70.18729,,,65.92628715 143 | s08,D,C5-8,16,16.61,f,71.5553,71.5553,,65.92628715 144 | s08,D,C5-8,17,17.27,f,72.07832,,,65.92628715 145 | s08,D,C5-8,18,19.98,f,72.09432,,,65.92628715 146 | s09,A,C1-4,1,1.61,f,6.62,,6.62,6.62 147 | s09,A,C1-4,2,2.64,f,18.08817222,18.08817222,18.08817222,18.08817222 148 | s09,A,C1-4,3,3.72,f,21.22140467,,21.22140467,21.22140467 149 | s09,A,C1-4,4,4.65,f,24.13634444,24.13634444,24.13634444,24.13634444 150 | s09,A,C1-4,5,5.63,f,30.94646803,,,24.13634444 151 | s09,A,C1-4,6,6.5,f,33.08957689,,33.08957689,33.08957689 152 | s09,A,C1-4,7,7.06,f,31.795196,,,33.08957689 153 | s09,A,C1-4,8,8.06,f,33.56451666,33.56451666,33.56451666,33.56451666 154 | s09,A,C1-4,9,9.28,f,32.30817,,,33.56451666 155 | s09,A,C1-4,10,10.26,f,30.784322,,30.784322,30.784322 156 | s09,A,C1-4,11,11.16,f,31.65179666,,,30.784322 157 | s09,A,C1-4,12,12.78,f,30.87774911,30.87774911,,30.784322 158 | s09,A,C1-4,13,13.82,f,32.55032139,,,30.784322 159 | s09,A,C1-4,14,14.27,f,30.20336822,,,30.784322 160 | s09,A,C1-4,15,15.72,f,31.60787269,,,30.784322 161 | s09,A,C1-4,16,16.36,f,31.55268888,31.55268888,,30.784322 162 | s09,A,C1-4,17,17.32,f,32.74505881,32.74505881,32.74505881,32.74505881 163 | s09,A,C1-4,18,18.88,f,32.21098156,,,32.74505881 164 | s10,C,C1-4,1,1.21,f,4.32,,4.32,4.32 165 | s10,C,C1-4,2,2.15,f,15.82817222,15.82817222,15.82817222,15.82817222 166 | s10,C,C1-4,3,4,f,19.14140467,19.14140467,19.14140467,19.14140467 167 | s10,C,C1-4,4,4.94,f,25.51634444,,25.51634444,25.51634444 168 | s10,C,C1-4,5,5,f,29.22646803,,29.22646803,29.22646803 169 | s10,C,C1-4,6,6.79,f,29.50957689,29.50957689,,29.22646803 170 | s10,C,C1-4,7,7.27,f,31.595196,,,29.22646803 171 | s10,C,C1-4,8,8.49,f,35.40451666,,,29.22646803 172 | s10,C,C1-4,9,9.39,f,34.42280934,,,29.22646803 173 | s10,C,C1-4,10,10.17,f,36.13464025,36.13464025,,29.22646803 174 | s10,C,C1-4,11,11.39,f,38.43179666,,,29.22646803 175 | s10,C,C1-4,12,12.52,f,39.77774911,,,29.22646803 176 | s10,C,C1-4,13,13.5,f,42.23032139,,,29.22646803 177 | s10,C,C1-4,14,14.23,f,39.74336822,,,29.22646803 178 | s10,C,C1-4,15,15.34,f,41.78787269,,,29.22646803 179 | s10,C,C1-4,16,16.86,f,45.11268888,,,29.22646803 180 | s10,C,C1-4,17,17.62,f,44.18505881,44.18505881,,29.22646803 181 | s10,C,C1-4,18,19.24,f,45.13098156,,,29.22646803 182 | s11,B,C5-8,1,1.5,m,18.01333333,,18.01333333,18.01333333 183 | s11,B,C5-8,2,2.67,m,31.19135315,,31.19135315,31.19135315 184 | s11,B,C5-8,3,3.66,m,38.04863207,,38.04863207,38.04863207 185 | s11,B,C5-8,4,4.11,m,43.54937296,,,38.04863207 186 | s11,B,C5-8,5,5.42,m,48.36132817,48.36132817,,38.04863207 187 | s11,B,C5-8,6,6.17,m,50.86665189,50.86665189,50.86665189,50.86665189 188 | s11,B,C5-8,7,8,m,51.05053399,,51.05053399,51.05053399 189 | s11,B,C5-8,8,8.68,m,53.80739278,53.80739278,,51.05053399 190 | s11,B,C5-8,9,9.8,m,55.04393081,,,51.05053399 191 | s11,B,C5-8,10,10.61,m,59.31934799,59.31934799,,51.05053399 192 | s11,B,C5-8,11,11.31,m,61.17586919,61.17586919,61.17586919,61.17586919 193 | s11,B,C5-8,12,12.09,m,63.5446717,63.5446717,63.5446717,63.5446717 194 | s11,B,C5-8,13,13.94,m,63.8494319,,,63.5446717 195 | s11,B,C5-8,14,14.16,m,65.3885538,65.3885538,,63.5446717 196 | s11,B,C5-8,15,15.71,m,64.61662691,,64.61662691,64.61662691 197 | s11,B,C5-8,16,16.95,m,68.78541259,68.78541259,,64.61662691 198 | s11,B,C5-8,17,17.45,m,67.40453086,,,64.61662691 199 | s11,B,C5-8,18,19.13,m,67.20195062,,,64.61662691 200 | s12,B,C5-8,1,1.99,m,12.68666667,,12.68666667,12.68666667 201 | s12,B,C5-8,2,2.56,m,27.23209776,,27.23209776,27.23209776 202 | s12,B,C5-8,3,3.11,m,31.02751625,,31.02751625,31.02751625 203 | s12,B,C5-8,4,4.2,m,36.67752885,,36.67752885,36.67752885 204 | s12,B,C5-8,5,5.06,m,43.27690986,,43.27690986,43.27690986 205 | s12,B,C5-8,6,6.6,m,48.77294734,,48.77294734,48.77294734 206 | s12,B,C5-8,7,7.95,m,51.16022672,51.16022672,,48.77294734 207 | s12,B,C5-8,8,8.76,m,55.30295994,,55.30295994,55.30295994 208 | s12,B,C5-8,9,9.71,m,52.96836583,,,55.30295994 209 | s12,B,C5-8,10,10.2,m,54.94234095,,,55.30295994 210 | s12,B,C5-8,11,11.6,m,52.69762143,,52.69762143,52.69762143 211 | s12,B,C5-8,12,12.57,m,54.01837843,,,52.69762143 212 | s12,B,C5-8,13,13.34,m,54.4829678,,54.4829678,54.4829678 213 | s12,B,C5-8,14,14.89,m,55.64565782,,,54.4829678 214 | s12,B,C5-8,15,15.6,m,53.33775944,53.33775944,,54.4829678 215 | s12,B,C5-8,16,16.79,m,55.96839103,,,54.4829678 216 | s12,B,C5-8,17,17.43,m,57.46501081,,,54.4829678 217 | s12,B,C5-8,18,19.09,m,55.99379693,55.99379693,,54.4829678 218 | s13,A,C5-8,1,1.61,m,5.56666667,,5.56666667,5.56666667 219 | s13,A,C5-8,2,2.26,m,8.56736,,8.56736,8.56736 220 | s13,A,C5-8,3,3.98,m,12.44851,,12.44851,12.44851 221 | s13,A,C5-8,4,4.52,m,18.14756,18.14756,,12.44851 222 | s13,A,C5-8,5,5.82,m,23.43088634,,23.43088634,23.43088634 223 | s13,A,C5-8,6,6.11,m,27.26328143,27.26328143,,23.43088634 224 | s13,A,C5-8,7,7.14,m,27.16550326,,27.16550326,27.16550326 225 | s13,A,C5-8,8,8.26,m,29.76894949,,29.76894949,29.76894949 226 | s13,A,C5-8,9,9.76,m,33.27837431,,,29.76894949 227 | s13,A,C5-8,10,10.54,m,35.21164728,,,29.76894949 228 | s13,A,C5-8,11,12,m,34.51004441,,,29.76894949 229 | s13,A,C5-8,12,12.3,m,36.74404237,,,29.76894949 230 | s13,A,C5-8,13,13.55,m,40.29678549,,,29.76894949 231 | s13,A,C5-8,14,14.73,m,42.0062642,42.0062642,,29.76894949 232 | s13,A,C5-8,15,15.19,m,42.80674017,,,29.76894949 233 | s13,A,C5-8,16,16.21,m,40.00971043,,,29.76894949 234 | s13,A,C5-8,17,17.17,m,40.14457885,,,29.76894949 235 | s13,A,C5-8,18,19.84,m,40.35913525,40.35913525,,29.76894949 236 | s14,B,T1-S5,1,1.21,m,5.74654,5.74654,5.74654,5.74654 237 | s14,B,T1-S5,2,2.61,m,28.1107,,28.1107,28.1107 238 | s14,B,T1-S5,3,3.23,m,35.52308,35.52308,35.52308,35.52308 239 | s14,B,T1-S5,4,4.06,m,49.85367081,,,35.52308 240 | s14,B,T1-S5,5,5.09,m,53.98711118,53.98711118,53.98711118,53.98711118 241 | s14,B,T1-S5,6,6.04,m,55.74657764,,,53.98711118 242 | s14,B,T1-S5,7,7.73,m,56.0871392,56.0871392,,53.98711118 243 | s14,B,T1-S5,8,8.23,m,62.11717288,,,53.98711118 244 | s14,B,T1-S5,9,9.78,m,70.69948448,70.69948448,,53.98711118 245 | s14,B,T1-S5,10,10.13,m,72.93061325,72.93061325,72.93061325,72.93061325 246 | s14,B,T1-S5,11,11.12,m,71.7908863,71.7908863,,72.93061325 247 | s14,B,T1-S5,12,12.51,m,70.19080574,70.19080574,,72.93061325 248 | s14,B,T1-S5,13,13.45,m,71.36352009,,71.36352009,71.36352009 249 | s14,B,T1-S5,14,14.07,m,73.22067494,73.22067494,,71.36352009 250 | s14,B,T1-S5,15,15.05,m,74.75129352,74.75129352,,71.36352009 251 | s14,B,T1-S5,16,16.35,m,75.86298655,,,71.36352009 252 | s14,B,T1-S5,17,17.22,m,78.3422,78.3422,,71.36352009 253 | s14,B,T1-S5,18,19.85,m,78.01552,,,71.36352009 254 | s15,B,C5-8,1,1.68,m,29.24666667,,29.24666667,29.24666667 255 | s15,B,C5-8,2,2.49,m,28.6466155,,28.6466155,28.6466155 256 | s15,B,C5-8,3,3.16,m,32.12640608,,32.12640608,32.12640608 257 | s15,B,C5-8,4,4.07,m,30.40656434,30.40656434,30.40656434,30.40656434 258 | s15,B,C5-8,5,5.47,m,42.86446019,,,30.40656434 259 | s15,B,C5-8,6,6.12,m,46.20635492,46.20635492,46.20635492,46.20635492 260 | s15,B,C5-8,7,7.08,m,46.57695484,,46.57695484,46.57695484 261 | s15,B,C5-8,8,8.39,m,49.36651318,49.36651318,49.36651318,49.36651318 262 | s15,B,C5-8,9,9.77,m,51.7261455,,,49.36651318 263 | s15,B,C5-8,10,10.02,m,52.18440902,,,49.36651318 264 | s15,B,C5-8,11,11.46,m,54.55593765,54.55593765,,49.36651318 265 | s15,B,C5-8,12,12.63,m,56.68630375,56.68630375,,49.36651318 266 | s15,B,C5-8,13,13.99,m,56.71492729,,,49.36651318 267 | s15,B,C5-8,14,14.8,m,57.43690368,,,49.36651318 268 | s15,B,C5-8,15,15.62,m,58.1041996,,58.1041996,58.1041996 269 | s15,B,C5-8,16,16.07,m,61.32646201,61.32646201,,58.1041996 270 | s15,B,C5-8,17,17.91,m,61.59158149,61.59158149,61.59158149,61.59158149 271 | s15,B,C5-8,18,19.38,m,60.56609433,60.56609433,,61.59158149 272 | s16,D,C5-8,1,1.33,m,14.28666667,,14.28666667,14.28666667 273 | s16,D,C5-8,2,2.51,m,26.37290986,26.37290986,26.37290986,26.37290986 274 | s16,D,C5-8,3,3.13,m,34.00363066,34.00363066,34.00363066,34.00363066 275 | s16,D,C5-8,4,4.1,m,37.49915306,37.49915306,37.49915306,37.49915306 276 | s16,D,C5-8,5,5.13,m,42.62333601,,42.62333601,42.62333601 277 | s16,D,C5-8,6,6.01,m,44.72987386,,,42.62333601 278 | s16,D,C5-8,7,7.73,m,47.12877514,47.12877514,,42.62333601 279 | s16,D,C5-8,8,8.22,m,49.22539626,49.22539626,,42.62333601 280 | s16,D,C5-8,9,9.74,m,50.18059465,50.18059465,,42.62333601 281 | s16,D,C5-8,10,10.43,m,54.48957921,54.48957921,,42.62333601 282 | s16,D,C5-8,11,11.18,m,52.4117282,52.4117282,,42.62333601 283 | s16,D,C5-8,12,12.39,m,53.99611705,,53.99611705,53.99611705 284 | s16,D,C5-8,13,13.31,m,54.944826,54.944826,,53.99611705 285 | s16,D,C5-8,14,14.93,m,57.15501834,57.15501834,57.15501834,57.15501834 286 | s16,D,C5-8,15,15.34,m,57.6003,,57.6003,57.6003 287 | s16,D,C5-8,16,16.2,m,62.17163946,,62.17163946,62.17163946 288 | s16,D,C5-8,17,17.3,m,59.81800818,,,62.17163946 289 | s16,D,C5-8,18,18.49,m,63.34683785,,,62.17163946 290 | s17,A,T1-S5,1,1.04,f,30.25333333,,30.25333333,30.25333333 291 | s17,A,T1-S5,2,2.34,f,35.07328217,,35.07328217,35.07328217 292 | s17,A,T1-S5,3,3.2,f,37.97307275,37.97307275,37.97307275,37.97307275 293 | s17,A,T1-S5,4,4.17,f,45.59323101,,,37.97307275 294 | s17,A,T1-S5,5,5.23,f,45.53112685,,,37.97307275 295 | s17,A,T1-S5,6,6.77,f,51.29302158,51.29302158,51.29302158,51.29302158 296 | s17,A,T1-S5,7,7.26,f,51.94362151,51.94362151,,51.29302158 297 | s17,A,T1-S5,8,8.76,f,55.19317984,,,51.29302158 298 | s17,A,T1-S5,9,9.94,f,56.71281216,56.71281216,56.71281216,56.71281216 299 | s17,A,T1-S5,10,10.99,f,57.23107569,57.23107569,,56.71281216 300 | s17,A,T1-S5,11,11.14,f,59.92260432,59.92260432,,56.71281216 301 | s17,A,T1-S5,12,12.64,f,61.25297042,,61.25297042,61.25297042 302 | s17,A,T1-S5,13,13.15,f,59.98159395,59.98159395,,61.25297042 303 | s17,A,T1-S5,14,14.51,f,60.50357035,,,61.25297042 304 | s17,A,T1-S5,15,15.25,f,64.19086627,,,61.25297042 305 | s17,A,T1-S5,16,16.55,f,64.03312868,64.03312868,,61.25297042 306 | s17,A,T1-S5,17,17.27,f,66.27824816,,,61.25297042 307 | s17,A,T1-S5,18,19.79,f,65.412761,,,61.25297042 308 | s18,B,C5-8,1,1.45,m,16.92666667,,16.92666667,16.92666667 309 | s18,B,C5-8,2,2.78,m,30.14742761,30.14742761,30.14742761,30.14742761 310 | s18,B,C5-8,3,3.95,m,35.40252049,35.40252049,35.40252049,35.40252049 311 | s18,B,C5-8,4,4.32,m,40.88818855,40.88818855,40.88818855,40.88818855 312 | s18,B,C5-8,5,5.91,m,45.79088634,45.79088634,45.79088634,45.79088634 313 | s18,B,C5-8,6,6.37,m,49.20328143,49.20328143,,45.79088634 314 | s18,B,C5-8,7,7.36,m,54.10550326,54.10550326,,45.79088634 315 | s18,B,C5-8,8,8.38,m,58.36894949,,,45.79088634 316 | s18,B,C5-8,9,9.16,m,63.89837431,63.89837431,,45.79088634 317 | s18,B,C5-8,10,10.22,m,66.07164728,,,45.79088634 318 | s18,B,C5-8,11,11.53,m,65.13004441,,,45.79088634 319 | s18,B,C5-8,12,12.55,m,64.52404237,,,45.79088634 320 | s18,B,C5-8,13,13.3,m,61.49678549,,,45.79088634 321 | s18,B,C5-8,14,14.18,m,63.0462642,,,45.79088634 322 | s18,B,C5-8,15,15.93,m,61.08674017,,,45.79088634 323 | s18,B,C5-8,16,16.11,m,62.44971043,62.44971043,,45.79088634 324 | s18,B,C5-8,17,17.42,m,61.66457885,,,45.79088634 325 | s18,B,C5-8,18,19.93,m,62.11913525,,,45.79088634 326 | s19,A,C5-8,1,1.1,m,17.66666667,,17.66666667,17.66666667 327 | s19,A,C5-8,2,2.29,m,29.47565099,,29.47565099,29.47565099 328 | s19,A,C5-8,3,3.73,m,34.60418574,34.60418574,34.60418574,34.60418574 329 | s19,A,C5-8,4,4.32,m,40.50463532,40.50463532,40.50463532,40.50463532 330 | s19,A,C5-8,5,5.31,m,44.93956085,44.93956085,44.93956085,44.93956085 331 | s19,A,C5-8,6,6.99,m,45.99317007,,45.99317007,45.99317007 332 | s19,A,C5-8,7,7.97,m,50.13041108,,,45.99317007 333 | s19,A,C5-8,8,8.83,m,52.51361964,52.51361964,,45.99317007 334 | s19,A,C5-8,9,9.83,m,51.34170482,,,45.99317007 335 | s19,A,C5-8,10,10.89,m,54.42854517,54.42854517,,45.99317007 336 | s19,A,C5-8,11,11.05,m,55.43257009,55.43257009,,45.99317007 337 | s19,A,C5-8,12,12.01,m,58.10215439,,,45.99317007 338 | s19,A,C5-8,13,13.51,m,58.65884626,58.65884626,,45.99317007 339 | s19,A,C5-8,14,14.85,m,59.99939541,59.99939541,59.99939541,59.99939541 340 | s19,A,C5-8,15,15.03,m,62.37707992,,,59.99939541 341 | s19,A,C5-8,16,16.19,m,64.04260397,64.04260397,,59.99939541 342 | s19,A,C5-8,17,17.45,m,61.74472284,,,59.99939541 343 | s19,A,C5-8,18,18.15,m,62.51068914,,,59.99939541 344 | s20,D,T1-S5,1,1.59,f,15.62666667,,15.62666667,15.62666667 345 | s20,D,T1-S5,2,2.22,f,31.51483889,31.51483889,31.51483889,31.51483889 346 | s20,D,T1-S5,3,3.2,f,36.42807133,,36.42807133,36.42807133 347 | s20,D,T1-S5,4,4.3,f,42.34301111,42.34301111,42.34301111,42.34301111 348 | s20,D,T1-S5,5,5.24,f,44.65313469,,44.65313469,44.65313469 349 | s20,D,T1-S5,6,6.93,f,46.59624355,,46.59624355,46.59624355 350 | s20,D,T1-S5,7,7.39,f,49.86186266,,,46.59624355 351 | s20,D,T1-S5,8,8.37,f,52.63118333,,52.63118333,52.63118333 352 | s20,D,T1-S5,9,9.81,f,52.289476,,,52.63118333 353 | s20,D,T1-S5,10,10.2,f,53.84130691,53.84130691,,52.63118333 354 | s20,D,T1-S5,11,11.28,f,56.97846332,56.97846332,,52.63118333 355 | s20,D,T1-S5,12,12.06,f,55.24441577,55.24441577,,52.63118333 356 | s20,D,T1-S5,13,13.59,f,57.17698806,,,52.63118333 357 | s20,D,T1-S5,14,14.37,f,58.07003488,58.07003488,,52.63118333 358 | s20,D,T1-S5,15,15,f,58.95453936,,,52.63118333 359 | s20,D,T1-S5,16,16.93,f,61.97935554,61.97935554,,52.63118333 360 | s20,D,T1-S5,17,17.49,f,60.47172548,,,52.63118333 361 | s20,D,T1-S5,18,19.01,f,63.27764822,63.27764822,,52.63118333 362 | s21,A,C5-8,1,1.52,f,14.09333333,14.09333333,14.09333333,14.09333333 363 | s21,A,C5-8,2,2.56,f,27.66587089,,27.66587089,27.66587089 364 | s21,A,C5-8,3,3.09,f,35.1875219,,35.1875219,35.1875219 365 | s21,A,C5-8,4,4.42,f,40.11840845,,40.11840845,40.11840845 366 | s21,A,C5-8,5,5.32,f,43.4688785,,,40.11840845 367 | s21,A,C5-8,6,6.66,f,45.92005946,,,40.11840845 368 | s21,A,C5-8,7,7.22,f,50.88726211,50.88726211,,40.11840845 369 | s21,A,C5-8,8,8.95,f,52.95094601,,,40.11840845 370 | s21,A,C5-8,9,9.67,f,55.44171047,55.44171047,,40.11840845 371 | s21,A,C5-8,10,10.85,f,57.06141606,57.06141606,,40.11840845 372 | s21,A,C5-8,11,11.34,f,57.03418541,,,40.11840845 373 | s21,A,C5-8,12,12.08,f,61.27259702,,,40.11840845 374 | s21,A,C5-8,13,13.48,f,62.34139138,,,40.11840845 375 | s21,A,C5-8,14,14.32,f,63.07979966,,,40.11840845 376 | s21,A,C5-8,15,15.64,f,64.28306707,64.28306707,,40.11840845 377 | s21,A,C5-8,16,16.52,f,67.10348357,67.10348357,,40.11840845 378 | s21,A,C5-8,17,17.1,f,67.69110153,,67.69110153,67.69110153 379 | s21,A,C5-8,18,19.63,f,67.23424803,67.23424803,,67.69110153 380 | s22,A,C1-4,1,1.38,f,7.353333333,7.353333333,7.353333333,7.353333333 381 | s22,A,C1-4,2,2,f,19.98861202,,19.98861202,19.98861202 382 | s22,A,C1-4,3,3.36,f,28.78807699,,28.78807699,28.78807699 383 | s22,A,C1-4,4,4.9,f,27.08433,,27.08433,27.08433 384 | s22,A,C1-4,5,5.41,f,28.40510334,,28.40510334,28.40510334 385 | s22,A,C1-4,6,6.21,f,27.48335567,,27.48335567,27.48335567 386 | s22,A,C1-4,7,7.34,f,26.36889805,26.36889805,,27.48335567 387 | s22,A,C1-4,8,8.36,f,27.43916939,,,27.48335567 388 | s22,A,C1-4,9,9.16,f,28.46282064,28.46282064,,27.48335567 389 | s22,A,C1-4,10,10.3,f,28.06038203,,,27.48335567 390 | s22,A,C1-4,11,11.26,f,27.5550273,27.5550273,,27.48335567 391 | s22,A,C1-4,12,12.15,f,27.79863436,27.79863436,,27.48335567 392 | s22,A,C1-4,13,13.11,f,27.97541164,27.97541164,,27.48335567 393 | s22,A,C1-4,14,14.84,f,28.22417673,,,27.48335567 394 | s22,A,C1-4,15,15.26,f,29.45984699,29.45984699,29.45984699,29.45984699 395 | s22,A,C1-4,16,16.84,f,28.97444808,28.97444808,,29.45984699 396 | s22,A,C1-4,17,17.26,f,28.6178162,28.6178162,28.6178162,28.6178162 397 | s22,A,C1-4,18,19.11,f,28.81809933,,,28.6178162 398 | s23,A,C5-8,1,1.27,f,12.39333333,,12.39333333,12.39333333 399 | s23,A,C5-8,2,2.5,f,21.68779991,21.68779991,21.68779991,21.68779991 400 | s23,A,C5-8,3,3.16,f,28.81196258,,28.81196258,28.81196258 401 | s23,A,C5-8,4,4.28,f,34.48226649,,,28.81196258 402 | s23,A,C5-8,5,5.89,f,36.59867718,,36.59867718,36.59867718 403 | s23,A,C5-8,6,6.36,f,42.96642916,,42.96642916,42.96642916 404 | s23,A,C5-8,7,7.04,f,45.60034963,45.60034963,,42.96642916 405 | s23,A,C5-8,8,8.81,f,47.65673308,,,42.96642916 406 | s23,A,C5-8,9,9.34,f,46.85059182,46.85059182,,42.96642916 407 | s23,A,C5-8,10,10.44,f,49.09314377,49.09314377,49.09314377,49.09314377 408 | s23,A,C5-8,11,11.49,f,50.28092053,50.28092053,,49.09314377 409 | s23,A,C5-8,12,12.16,f,48.78089574,,,49.09314377 410 | s23,A,C5-8,13,13.16,f,50.47355344,50.47355344,,49.09314377 411 | s23,A,C5-8,14,14.89,f,45.29481621,45.29481621,,49.09314377 412 | s23,A,C5-8,15,15.61,f,50.77730643,,,49.09314377 413 | s23,A,C5-8,16,16.59,f,49.69119966,,,49.09314377 414 | s23,A,C5-8,17,17.18,f,50.18481883,,50.18481883,50.18481883 415 | s23,A,C5-8,18,18.41,f,50.5250584,,,50.18481883 416 | s24,A,C1-4,1,1.26,f,6.326666667,,6.326666667,6.326666667 417 | s24,A,C1-4,2,2.52,f,16.84032114,,16.84032114,16.84032114 418 | s24,A,C1-4,3,3.74,f,20.2891815,20.2891815,20.2891815,20.2891815 419 | s24,A,C1-4,4,4.64,f,24.11397562,24.11397562,24.11397562,24.11397562 420 | s24,A,C1-4,5,5.75,f,28.34558436,,28.34558436,28.34558436 421 | s24,A,C1-4,6,6.57,f,31.10283598,,31.10283598,31.10283598 422 | s24,A,C1-4,7,7.48,f,32.66513454,,,31.10283598 423 | s24,A,C1-4,8,8.42,f,32.80763009,,,31.10283598 424 | s24,A,C1-4,9,9.17,f,34.27169634,,,31.10283598 425 | s24,A,C1-4,10,10.13,f,39.03923884,,,31.10283598 426 | s24,A,C1-4,11,11.49,f,37.3801471,37.3801471,,31.10283598 427 | s24,A,C1-4,12,12.3,f,38.91649045,,,31.10283598 428 | s24,A,C1-4,13,13.96,f,40.88502857,40.88502857,,31.10283598 429 | s24,A,C1-4,14,14.61,f,41.09878902,,,31.10283598 430 | s24,A,C1-4,15,15.63,f,42.9880992,,,31.10283598 431 | s24,A,C1-4,16,16.92,f,42.68128457,,,31.10283598 432 | s24,A,C1-4,17,17.39,f,42.1651548,42.1651548,42.1651548,42.1651548 433 | s24,A,C1-4,18,18.66,f,44.26535082,,,42.1651548 434 | s25,C,C1-4,1,1.68,f,6.326666667,,6.326666667,6.326666667 435 | s25,C,C1-4,2,2.05,f,16.84032114,,16.84032114,16.84032114 436 | s25,C,C1-4,3,3.56,f,20.2891815,,20.2891815,20.2891815 437 | s25,C,C1-4,4,4.78,f,24.11397562,,,20.2891815 438 | s25,C,C1-4,5,5.71,f,28.34558436,,28.34558436,28.34558436 439 | s25,C,C1-4,6,6.63,f,31.10283598,,31.10283598,31.10283598 440 | s25,C,C1-4,7,7.31,f,32.66513454,,32.66513454,32.66513454 441 | s25,C,C1-4,8,8.95,f,32.80763009,32.80763009,,32.66513454 442 | s25,C,C1-4,9,9.23,f,34.27169634,,,32.66513454 443 | s25,C,C1-4,10,10.08,f,33.03923884,33.03923884,,32.66513454 444 | s25,C,C1-4,11,11.64,f,34.3801471,,34.3801471,34.3801471 445 | s25,C,C1-4,12,12.51,f,35.91649045,35.91649045,,34.3801471 446 | s25,C,C1-4,13,13.94,f,36.88502857,36.88502857,,34.3801471 447 | s25,C,C1-4,14,14.18,f,36.09878902,,,34.3801471 448 | s25,C,C1-4,15,15.76,f,35.9880992,,,34.3801471 449 | s25,C,C1-4,16,16.31,f,35.68128457,35.68128457,,34.3801471 450 | s25,C,C1-4,17,17.8,f,35.1651548,35.1651548,,34.3801471 451 | s25,C,C1-4,18,18.06,f,35.26535082,35.26535082,,34.3801471 452 | s26,A,C5-8,1,1.69,f,25.01333333,,25.01333333,25.01333333 453 | s26,A,C5-8,2,2.32,f,26.2560233,,26.2560233,26.2560233 454 | s26,A,C5-8,3,3.38,f,29.51362783,29.51362783,29.51362783,29.51362783 455 | s26,A,C5-8,4,4.65,f,35.35871326,,,29.51362783 456 | s26,A,C5-8,5,5.91,f,38.74735169,,38.74735169,38.74735169 457 | s26,A,C5-8,6,6.81,f,39.5963178,,,38.74735169 458 | s26,A,C5-8,7,7.95,f,42.60525745,,42.60525745,42.60525745 459 | s26,A,C5-8,8,8.73,f,42.62140323,42.62140323,,42.60525745 460 | s26,A,C5-8,9,9.35,f,46.65392233,,,42.60525745 461 | s26,A,C5-8,10,10.36,f,45.49004165,,,42.60525745 462 | s26,A,C5-8,11,11.45,f,47.76344621,47.76344621,,42.60525745 463 | s26,A,C5-8,12,12.61,f,49.79900776,,,42.60525745 464 | s26,A,C5-8,13,13.35,f,50.91561421,,50.91561421,50.91561421 465 | s26,A,C5-8,14,14.8,f,51.72794741,,,50.91561421 466 | s26,A,C5-8,15,15.43,f,50.74764619,,,50.91561421 467 | s26,A,C5-8,16,16.84,f,50.86409319,50.86409319,,50.91561421 468 | s26,A,C5-8,17,18,f,48.08496282,48.08496282,,50.91561421 469 | s26,A,C5-8,18,18.16,f,50.9366123,,,50.91561421 470 | s27,C,C1-4,1,2,f,6.76,6.76,6.76,6.76 471 | s27,C,C1-4,2,2.69,f,18.71994884,18.71994884,18.71994884,18.71994884 472 | s27,C,C1-4,3,3.03,f,22.79973941,,22.79973941,22.79973941 473 | s27,C,C1-4,4,4.09,f,29.99989767,,29.99989767,29.99989767 474 | s27,C,C1-4,5,5.33,f,29.81779352,29.81779352,29.81779352,29.81779352 475 | s27,C,C1-4,6,6.37,f,35.19968825,35.19968825,,29.81779352 476 | s27,C,C1-4,7,7.21,f,35.29028818,,35.29028818,35.29028818 477 | s27,C,C1-4,8,8.97,f,38.57984651,38.57984651,,35.29028818 478 | s27,C,C1-4,9,9.27,f,39.41947883,39.41947883,,35.29028818 479 | s27,C,C1-4,10,10.02,f,42.37774236,42.37774236,,35.29028818 480 | s27,C,C1-4,11,11.45,f,40.98927098,40.98927098,,35.29028818 481 | s27,C,C1-4,12,12.72,f,45.15963709,,,35.29028818 482 | s27,C,C1-4,13,13.35,f,43.32826062,,43.32826062,43.32826062 483 | s27,C,C1-4,14,14.58,f,47.45023701,,,43.32826062 484 | s27,C,C1-4,15,15.94,f,47.71753294,,,43.32826062 485 | s27,C,C1-4,16,16.82,f,49.13979534,49.13979534,,43.32826062 486 | s27,C,C1-4,17,17.4,f,49.96491482,,,43.32826062 487 | s27,C,C1-4,18,19.85,f,48.73942767,,,43.32826062 488 | s28,D,C1-4,1,1.26,f,6.12,,6.12,6.12 489 | s28,D,C1-4,2,2.63,f,16.91091335,16.91091335,16.91091335,16.91091335 490 | s28,D,C1-4,3,3.68,f,20.40195975,,20.40195975,20.40195975 491 | s28,D,C1-4,4,4.84,f,24.26182669,24.26182669,24.26182669,24.26182669 492 | s28,D,C1-4,5,5.87,f,30.70269286,,30.70269286,30.70269286 493 | s28,D,C1-4,6,6.83,f,30.5928731,,30.5928731,30.5928731 494 | s28,D,C1-4,7,7.16,f,32.67683194,,32.67683194,32.67683194 495 | s28,D,C1-4,8,8.32,f,35.47274004,,,32.67683194 496 | s28,D,C1-4,9,9.43,f,37.92391951,37.92391951,,32.67683194 497 | s28,D,C1-4,10,10.56,f,38.43360621,,38.43360621,38.43360621 498 | s28,D,C1-4,11,11.46,f,38.01263855,38.01263855,,38.43360621 499 | s28,D,C1-4,12,12.28,f,39.84378645,,,38.43360621 500 | s28,D,C1-4,13,13.79,f,39.98434165,39.98434165,,38.43360621 501 | s28,D,C1-4,14,14.9,f,41.94774528,,,38.43360621 502 | s28,D,C1-4,15,15.64,f,41.62465261,,,38.43360621 503 | s28,D,C1-4,16,16.63,f,43.60365339,43.60365339,,38.43360621 504 | s28,D,C1-4,17,17.75,f,45.87177347,45.87177347,,38.43360621 505 | s28,D,C1-4,18,19.28,f,45.95483285,,,38.43360621 506 | s29,B,C5-8,1,1.06,f,11.47333333,11.47333333,11.47333333,11.47333333 507 | s29,B,C5-8,2,2.6,f,21.98505879,,21.98505879,21.98505879 508 | s29,B,C5-8,3,3.53,f,27.21140749,,27.21140749,27.21140749 509 | s29,B,C5-8,4,4.35,f,33.97678424,,33.97678424,33.97678424 510 | s29,B,C5-8,5,5.58,f,35.08245235,,35.08245235,35.08245235 511 | s29,B,C5-8,6,6.7,f,38.66313295,38.66313295,38.66313295,38.66313295 512 | s29,B,C5-8,7,7.74,f,43.25871369,,,38.66313295 513 | s29,B,C5-8,8,8.52,f,46.04850969,,46.04850969,46.04850969 514 | s29,B,C5-8,9,9.48,f,46.62948166,,,46.04850969 515 | s29,B,C5-8,10,10.25,f,47.1141778,47.1141778,,46.04850969 516 | s29,B,C5-8,11,11.51,f,51.20007864,51.20007864,,46.04850969 517 | s29,B,C5-8,12,12.68,f,49.8948584,,,46.04850969 518 | s29,B,C5-8,13,13.77,f,52.13953318,52.13953318,,46.04850969 519 | s29,B,C5-8,14,14.99,f,54.57043914,,,46.04850969 520 | s29,B,C5-8,15,15.31,f,53.92052651,,,46.04850969 521 | s29,B,C5-8,16,16.72,f,56.20023514,,56.20023514,56.20023514 522 | s29,B,C5-8,17,17.67,f,57.15810417,,,56.20023514 523 | s29,B,C5-8,18,19.22,f,58.10120711,,,56.20023514 524 | s30,A,C1-4,1,1.56,f,3.453333333,,3.453333333,3.453333333 525 | s30,A,C1-4,2,2.92,f,12.26698781,12.26698781,12.26698781,12.26698781 526 | s30,A,C1-4,3,3.94,f,16.71584817,16.71584817,16.71584817,16.71584817 527 | s30,A,C1-4,4,4.59,f,18.96064228,,18.96064228,18.96064228 528 | s30,A,C1-4,5,5.29,f,22.81225103,22.81225103,22.81225103,22.81225103 529 | s30,A,C1-4,6,6.06,f,36.70950265,,36.70950265,36.70950265 530 | s30,A,C1-4,7,7.25,f,36.07180121,36.07180121,,36.70950265 531 | s30,A,C1-4,8,8.03,f,39.93429676,39.93429676,,36.70950265 532 | s30,A,C1-4,9,9.3,f,41.67836301,41.67836301,,36.70950265 533 | s30,A,C1-4,10,10.95,f,44.94590551,,,36.70950265 534 | s30,A,C1-4,11,11.54,f,59.62681377,,,36.70950265 535 | s30,A,C1-4,12,12.02,f,62.42315712,,,36.70950265 536 | s30,A,C1-4,13,13.04,f,63.83169524,63.83169524,,36.70950265 537 | s30,A,C1-4,14,14.42,f,65.44545569,,,36.70950265 538 | s30,A,C1-4,15,15.42,f,65.49476587,65.49476587,,36.70950265 539 | s30,A,C1-4,16,16.24,f,60.60795123,,,36.70950265 540 | s30,A,C1-4,17,17.88,f,65.15182147,65.15182147,,36.70950265 541 | s30,A,C1-4,18,19.66,f,65.81201748,,,36.70950265 542 | s31,D,T1-S5,1,1.81,m,15.70666667,,15.70666667,15.70666667 543 | s31,D,T1-S5,2,2.39,m,30.70306227,,30.70306227,30.70306227 544 | s31,D,T1-S5,3,3,m,35.30973659,35.30973659,35.30973659,35.30973659 545 | s31,D,T1-S5,4,4.18,m,39.01945787,,39.01945787,39.01945787 546 | s31,D,T1-S5,5,5.68,m,43.8418092,43.8418092,43.8418092,43.8418092 547 | s31,D,T1-S5,6,6.8,m,43.68613219,,43.68613219,43.68613219 548 | s31,D,T1-S5,7,7.87,m,44.52677049,,,43.68613219 549 | s31,D,T1-S5,8,8,m,47.15585348,47.15585348,,43.68613219 550 | s31,D,T1-S5,9,9.15,m,52.11280651,52.11280651,,43.68613219 551 | s31,D,T1-S5,10,10.49,m,57.0182048,,,43.68613219 552 | s31,D,T1-S5,11,11.37,m,61.96098899,,,43.68613219 553 | s31,D,T1-S5,12,12.55,m,63.08252779,,,43.68613219 554 | s31,D,T1-S5,13,13.58,m,65.23904883,,,43.68613219 555 | s31,D,T1-S5,14,14.28,m,63.24316609,63.24316609,,43.68613219 556 | s31,D,T1-S5,15,15.91,m,67.84487912,67.84487912,67.84487912,67.84487912 557 | s31,D,T1-S5,16,16.68,m,67.23224908,,,67.84487912 558 | s31,D,T1-S5,17,17.03,m,65.93186946,65.93186946,65.93186946,65.93186946 559 | s31,D,T1-S5,18,18.64,m,68.06920211,68.06920211,,65.93186946 560 | s32,B,C1-4,1,1.35,m,13.00666667,,13.00666667,13.00666667 561 | s32,B,C1-4,2,2.51,m,24.40113325,,24.40113325,24.40113325 562 | s32,B,C1-4,3,3.01,m,30.52529591,,30.52529591,30.52529591 563 | s32,B,C1-4,4,4.61,m,36.29559983,,36.29559983,36.29559983 564 | s32,B,C1-4,5,5.07,m,39.53201052,,,36.29559983 565 | s32,B,C1-4,6,6.21,m,40.73976249,,,36.29559983 566 | s32,B,C1-4,7,7.35,m,44.71368296,44.71368296,44.71368296,44.71368296 567 | s32,B,C1-4,8,8.13,m,48.85006641,48.85006641,48.85006641,48.85006641 568 | s32,B,C1-4,9,9,m,50.22392516,50.22392516,,48.85006641 569 | s32,B,C1-4,10,10.13,m,49.1064771,49.1064771,,48.85006641 570 | s32,B,C1-4,11,11.74,m,51.69425387,,,48.85006641 571 | s32,B,C1-4,12,12.91,m,53.89422907,,,48.85006641 572 | s32,B,C1-4,13,13.08,m,53.84688677,,,48.85006641 573 | s32,B,C1-4,14,14.18,m,57.46814954,57.46814954,,48.85006641 574 | s32,B,C1-4,15,15.94,m,55.09063976,55.09063976,,48.85006641 575 | s32,B,C1-4,16,16.26,m,55.72453299,,,48.85006641 576 | s32,B,C1-4,17,17.57,m,56.83815217,,,48.85006641 577 | s32,B,C1-4,18,19.07,m,60.21839174,60.21839174,,48.85006641 578 | s33,C,C1-4,1,1.44,m,14.18666667,,14.18666667,14.18666667 579 | s33,C,C1-4,2,2.56,m,14.49565099,,14.49565099,14.49565099 580 | s33,C,C1-4,3,3.02,m,14.56418574,14.56418574,14.56418574,14.56418574 581 | s33,C,C1-4,4,4.8,m,16.54463532,,16.54463532,16.54463532 582 | s33,C,C1-4,5,5.68,m,17.21956085,,17.21956085,17.21956085 583 | s33,C,C1-4,6,6.69,m,19.49317007,,,17.21956085 584 | s33,C,C1-4,7,7.5,m,21.87041108,,21.87041108,21.87041108 585 | s33,C,C1-4,8,8.13,m,23.53361964,23.53361964,,21.87041108 586 | s33,C,C1-4,9,9.5,m,26.56170482,26.56170482,,21.87041108 587 | s33,C,C1-4,10,10.62,m,24.86854517,24.86854517,,21.87041108 588 | s33,C,C1-4,11,11.13,m,23.67257009,,,21.87041108 589 | s33,C,C1-4,12,12.97,m,24.42215439,24.42215439,,21.87041108 590 | s33,C,C1-4,13,13.6,m,23.57884626,23.57884626,,21.87041108 591 | s33,C,C1-4,14,14.74,m,24.15939541,,,21.87041108 592 | s33,C,C1-4,15,15.47,m,24.89707992,24.89707992,,21.87041108 593 | s33,C,C1-4,16,16.18,m,24.34260397,24.34260397,24.34260397,24.34260397 594 | s33,C,C1-4,17,17.68,m,24.76472284,24.76472284,,24.34260397 595 | s33,C,C1-4,18,19.29,m,25.01068914,,,24.34260397 596 | s34,A,C5-8,1,1.65,m,17.63333333,17.63333333,17.63333333,17.63333333 597 | s34,A,C5-8,2,2.44,m,27.60779991,,27.60779991,27.60779991 598 | s34,A,C5-8,3,3.7,m,34.41196258,34.41196258,34.41196258,34.41196258 599 | s34,A,C5-8,4,4.85,m,36.48226649,,,34.41196258 600 | s34,A,C5-8,5,5.11,m,39.65867718,39.65867718,39.65867718,39.65867718 601 | s34,A,C5-8,6,6.12,m,44.14642916,44.14642916,,39.65867718 602 | s34,A,C5-8,7,7.9,m,46.66034963,,,39.65867718 603 | s34,A,C5-8,8,8.29,m,49.01673308,49.01673308,,39.65867718 604 | s34,A,C5-8,9,9.9,m,50.97059182,,,39.65867718 605 | s34,A,C5-8,10,10.52,m,51.21314377,,51.21314377,51.21314377 606 | s34,A,C5-8,11,11.55,m,51.26092053,,,51.21314377 607 | s34,A,C5-8,12,12.18,m,54.10089574,54.10089574,,51.21314377 608 | s34,A,C5-8,13,13.64,m,57.63355344,,,51.21314377 609 | s34,A,C5-8,14,14.87,m,56.81481621,56.81481621,,51.21314377 610 | s34,A,C5-8,15,16,m,58.17730643,58.17730643,,51.21314377 611 | s34,A,C5-8,16,16.9,m,60.61119966,60.61119966,,51.21314377 612 | s34,A,C5-8,17,17.32,m,61.24481883,,,51.21314377 613 | s34,A,C5-8,18,19.76,m,60.3050584,,,51.21314377 614 | s35,B,T1-S5,1,1.48,m,10.03333333,,10.03333333,10.03333333 615 | s35,B,T1-S5,2,2.74,m,36.57409428,36.57409428,36.57409428,36.57409428 616 | s35,B,T1-S5,3,3.2,m,43.38918716,,43.38918716,43.38918716 617 | s35,B,T1-S5,4,4.47,m,47.23485522,,,43.38918716 618 | s35,B,T1-S5,5,5.1,m,50.93755301,,50.93755301,50.93755301 619 | s35,B,T1-S5,6,6.49,m,54.7299481,,,50.93755301 620 | s35,B,T1-S5,7,7.85,m,59.01216993,,,50.93755301 621 | s35,B,T1-S5,8,8.26,m,59.21561616,59.21561616,59.21561616,59.21561616 622 | s35,B,T1-S5,9,9.83,m,63.02504098,,,59.21561616 623 | s35,B,T1-S5,10,10.31,m,63.15831395,63.15831395,,59.21561616 624 | s35,B,T1-S5,11,11.38,m,67.45671108,,,59.21561616 625 | s35,B,T1-S5,12,12.72,m,68.17070904,68.17070904,,59.21561616 626 | s35,B,T1-S5,13,13.32,m,73.26345215,,,59.21561616 627 | s35,B,T1-S5,14,14.38,m,76.33293087,76.33293087,,59.21561616 628 | s35,B,T1-S5,15,15.83,m,75.49340683,,,59.21561616 629 | s35,B,T1-S5,16,16.49,m,73.8563771,,73.8563771,73.8563771 630 | s35,B,T1-S5,17,17.48,m,75.49124552,,,73.8563771 631 | s35,B,T1-S5,18,19.67,m,75.16580192,,,73.8563771 632 | s36,C,C1-4,1,1.3,m,5.166666667,5.166666667,5.166666667,5.166666667 633 | s36,C,C1-4,2,2.24,m,18.11016874,,18.11016874,18.11016874 634 | s36,C,C1-4,3,3.93,m,25.98307557,,25.98307557,25.98307557 635 | s36,C,C1-4,4,4.06,m,29.81367081,29.81367081,29.81367081,29.81367081 636 | s36,C,C1-4,5,5.69,m,35.90711118,,35.90711118,35.90711118 637 | s36,C,C1-4,6,6.72,m,42.76657764,42.76657764,42.76657764,42.76657764 638 | s36,C,C1-4,7,7.78,m,45.8471392,,,42.76657764 639 | s36,C,C1-4,8,8.14,m,50.09717288,,,42.76657764 640 | s36,C,C1-4,9,9.22,m,50.09948448,,,42.76657764 641 | s36,C,C1-4,10,10.5,m,50.05061325,50.05061325,,42.76657764 642 | s36,C,C1-4,11,11.78,m,52.0108863,,,42.76657764 643 | s36,C,C1-4,12,12.81,m,54.01007971,,,42.76657764 644 | s36,C,C1-4,13,13.24,m,53.19080574,,,42.76657764 645 | s36,C,C1-4,14,14.09,m,50.23064127,,,42.76657764 646 | s36,C,C1-4,15,15.78,m,52.78352009,,,42.76657764 647 | s36,C,C1-4,16,16.43,m,53.44067494,53.44067494,,42.76657764 648 | s36,C,C1-4,17,17.84,m,50.71129352,,,42.76657764 649 | s36,C,C1-4,18,19.66,m,52.06298655,,,42.76657764 650 | s37,B,T1-S5,1,1.37,m,25.43333333,25.43333333,25.43333333,25.43333333 651 | s37,B,T1-S5,2,2.69,m,33.36779991,33.36779991,33.36779991,33.36779991 652 | s37,B,T1-S5,3,3.96,m,51.81196258,,51.81196258,51.81196258 653 | s37,B,T1-S5,4,4.69,m,55.90226649,55.90226649,55.90226649,55.90226649 654 | s37,B,T1-S5,5,5.85,m,57.77867718,57.77867718,57.77867718,57.77867718 655 | s37,B,T1-S5,6,6.95,m,59.34642916,59.34642916,,57.77867718 656 | s37,B,T1-S5,7,7.92,m,54.70034963,,54.70034963,54.70034963 657 | s37,B,T1-S5,8,8.39,m,55.61673308,,,54.70034963 658 | s37,B,T1-S5,9,9.34,m,56.93059182,,56.93059182,56.93059182 659 | s37,B,T1-S5,10,10.05,m,60.63314377,,,56.93059182 660 | s37,B,T1-S5,11,11.61,m,58.58092053,58.58092053,,56.93059182 661 | s37,B,T1-S5,12,12.3,m,62.04089574,,,56.93059182 662 | s37,B,T1-S5,13,13.06,m,64.55355344,64.55355344,,56.93059182 663 | s37,B,T1-S5,14,14.08,m,64.49481621,64.49481621,,56.93059182 664 | s37,B,T1-S5,15,15.56,m,66.33730643,,,56.93059182 665 | s37,B,T1-S5,16,16.17,m,67.51119966,,,56.93059182 666 | s37,B,T1-S5,17,17.86,m,67.06481883,67.06481883,,56.93059182 667 | s37,B,T1-S5,18,18.97,m,69.1050584,,,56.93059182 668 | s38,C,C1-4,1,1.17,m,9.826666667,9.826666667,9.826666667,9.826666667 669 | s38,C,C1-4,2,2.53,m,24.48468648,24.48468648,24.48468648,24.48468648 670 | s38,C,C1-4,3,3.54,m,30.2619654,,30.2619654,30.2619654 671 | s38,C,C1-4,4,4.96,m,37.16270629,,37.16270629,37.16270629 672 | s38,C,C1-4,5,5.43,m,41.75466151,41.75466151,,37.16270629 673 | s38,C,C1-4,6,6.92,m,45.51998522,45.51998522,45.51998522,45.51998522 674 | s38,C,C1-4,7,7.61,m,48.42386732,48.42386732,48.42386732,48.42386732 675 | s38,C,C1-4,8,8.3,m,49.86072611,,,48.42386732 676 | s38,C,C1-4,9,9.58,m,50.79726414,,,48.42386732 677 | s38,C,C1-4,10,10.05,m,51.89268132,,,48.42386732 678 | s38,C,C1-4,11,11.43,m,54.86920252,54.86920252,54.86920252,54.86920252 679 | s38,C,C1-4,12,12.04,m,58.65800503,58.65800503,,54.86920252 680 | s38,C,C1-4,13,13.59,m,58.56276523,,,54.86920252 681 | s38,C,C1-4,14,14.54,m,59.32188713,59.32188713,59.32188713,59.32188713 682 | s38,C,C1-4,15,15.84,m,60.02996025,,,59.32188713 683 | s38,C,C1-4,16,16.08,m,63.89874592,,,59.32188713 684 | s38,C,C1-4,17,17.47,m,62.37786419,62.37786419,,59.32188713 685 | s38,C,C1-4,18,18.04,m,63.61528396,,,59.32188713 686 | s39,B,C5-8,1,1.17,m,8.506666667,,8.506666667,8.506666667 687 | s39,B,C5-8,2,2.76,m,16.62113,16.62113,16.62113,16.62113 688 | s39,B,C5-8,3,3.53,m,23.5023,23.5023,23.5023,23.5023 689 | s39,B,C5-8,4,4.69,m,35.81559983,,35.81559983,35.81559983 690 | s39,B,C5-8,5,5.98,m,40.63201052,,40.63201052,40.63201052 691 | s39,B,C5-8,6,6.61,m,40.31976249,40.31976249,40.31976249,40.31976249 692 | s39,B,C5-8,7,7.86,m,43.63368296,43.63368296,,40.31976249 693 | s39,B,C5-8,8,8.89,m,45.81006641,,,40.31976249 694 | s39,B,C5-8,9,9.19,m,46.82392516,,,40.31976249 695 | s39,B,C5-8,10,10.7,m,50.0464771,50.0464771,,40.31976249 696 | s39,B,C5-8,11,11.04,m,51.55425387,,,40.31976249 697 | s39,B,C5-8,12,12.91,m,52.43422907,52.43422907,,40.31976249 698 | s39,B,C5-8,13,13.12,m,55.34688677,,,40.31976249 699 | s39,B,C5-8,14,14.97,m,53.78814954,53.78814954,,40.31976249 700 | s39,B,C5-8,15,15.16,m,57.13063976,,,40.31976249 701 | s39,B,C5-8,16,16.82,m,59.22453299,59.22453299,,40.31976249 702 | s39,B,C5-8,17,17.24,m,56.85815217,,,40.31976249 703 | s39,B,C5-8,18,18.92,m,58.49839174,,,40.31976249 704 | s40,B,C5-8,1,1.6,m,6.08,6.08,6.08,6.08 705 | s40,B,C5-8,2,2.93,m,28.64543109,,28.64543109,28.64543109 706 | s40,B,C5-8,3,3.77,m,32.06084958,,32.06084958,32.06084958 707 | s40,B,C5-8,4,4.87,m,35.33086218,35.33086218,35.33086218,35.33086218 708 | s40,B,C5-8,5,5.07,m,40.11024319,,,35.33086218 709 | s40,B,C5-8,6,6.72,m,40.86628068,40.86628068,40.86628068,40.86628068 710 | s40,B,C5-8,7,7.77,m,42.49356006,,,40.86628068 711 | s40,B,C5-8,8,8.53,m,47.13629328,47.13629328,,40.86628068 712 | s40,B,C5-8,9,9.31,m,46.62169917,46.62169917,46.62169917,46.62169917 713 | s40,B,C5-8,10,10.97,m,48.57567428,,,46.62169917 714 | s40,B,C5-8,11,11.88,m,49.71095476,49.71095476,,46.62169917 715 | s40,B,C5-8,12,12.75,m,51.83171177,,,46.62169917 716 | s40,B,C5-8,13,13.9,m,54.13630113,,,46.62169917 717 | s40,B,C5-8,14,14.95,m,52.27899115,52.27899115,,46.62169917 718 | s40,B,C5-8,15,15.54,m,53.25109278,,,46.62169917 719 | s40,B,C5-8,16,16.01,m,53.82172437,,,46.62169917 720 | s40,B,C5-8,17,17.04,m,54.39834415,,,46.62169917 721 | s40,B,C5-8,18,18.06,m,53.32713026,53.32713026,,46.62169917 722 | -------------------------------------------------------------------------------- /random_effects_paper/script_section_01_longitudinal_data.R: -------------------------------------------------------------------------------- 1 | # title: "Model Specification in Mixed-Effects Models: A Focus on Random Effects" 2 | # authors: Keith Lohse, PhD, PStat; Mike Strube, PhD; Allan Kozlowksi, PhD, PT 3 | # date: "2022-07-07" 4 | 5 | library("ggplot2"); library("lme4"); library("car"); library("dplyr"); library("lmerTest") 6 | 7 | DATA <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/random_effects_paper/data_longitudinal.csv", 8 | stringsAsFactors = TRUE, na.strings=c("NA","NaN"," ","")) 9 | # Use the head() function to check the structure of the data file. 10 | head(DATA) 11 | 12 | 13 | 14 | ## ----------------------- Basic Data Visualization ------------------------- 15 | DATA$year.0 <- (DATA$time -1)/12 16 | 17 | ## FIM scores by group and time -------------------------------------------- 18 | head(DATA) 19 | ggplot(DATA, aes(x = year.0, y = rasch_FIM)) + 20 | geom_line(aes(group=subID)) + 21 | geom_point(aes(fill=as.factor(subID)), pch=21, size=1.5, stroke=1) + 22 | scale_fill_grey()+ 23 | facet_wrap(~AIS_grade) + 24 | scale_x_continuous(name = "Time from Admission (Years)", breaks=c(0,0.5,1,1.5), limits=c(0,1.6)) + 25 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100)) + 26 | theme_bw() + theme(axis.text.x=element_text(size=10, colour="black"), 27 | axis.text.y=element_text(size=10, colour="black"), 28 | axis.title=element_text(size=12,face="bold")) + 29 | theme(strip.text.x = element_text(size = 12))+ theme(legend.position="none") 30 | ## -------------------------------------------------------------------------- 31 | 32 | 33 | 34 | raneff_int<-lmer(rasch_FIM~ 35 | # Fixed-effects 36 | 1+ 37 | # Random-effects 38 | (1|subID), data=DATA, REML=FALSE) 39 | 40 | 41 | summary(raneff_int) 42 | 43 | # Recall that the fixed-effect for the intercept is the overall, "group-level" 44 | # intercept in our model. However, we also have a random-effect of subject for 45 | # the intercept. This means that our model estimates a deviate for each subject 46 | # from the group-level intercept. To see these random-effects using the raneff() 47 | # function. 48 | ranef(raneff_int) 49 | 50 | # Remember that these are deviates from the fixed-effect, so if we want to see 51 | # what the model is actually estimating for each person, we need to add the 52 | # fixed-effect back in: 53 | fixef(raneff_int) 54 | 55 | # We could do this manually, by adding the fixef() output to the ranef() output, 56 | # but we can also get the individual values using the coef() function: 57 | coef(raneff_int)$subID 58 | 59 | # If you want the actual predictions of the model, rather than the estimated 60 | # effects, you can use the fitted() function. Note the difference in the size 61 | # of these arrays. The fitted() function gives us a prediction for each person 62 | # at each point. 63 | fitted(raneff_int) 64 | 65 | 66 | first5<-DATA[c(1:90),] # Second, we'll make a smaller dataset with the predictions for these 10: 67 | PRED<-data.frame(subID=c("s01","s02","s03","s04","s05"), Intercepts=c(coef(raneff_int)$subID[c(1:5),])) 68 | PRED 69 | 70 | ggplot(first5, aes(x = year.0, y = rasch_FIM)) + 71 | geom_line(aes(group=subID)) + facet_wrap(~subID, ncol=5)+ 72 | geom_point(fill="grey", pch=21, size=2, stroke=1.25) + 73 | scale_x_continuous(name = "Time from Admission (Years)") + 74 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100))+ 75 | geom_abline(aes(intercept=Intercepts, slope=0), col="black", lwd=1, PRED) + 76 | theme_bw() + theme(axis.text=element_text(size=10, colour="black"), 77 | axis.title=element_text(size=10,face="bold")) + 78 | theme(strip.text.x = element_text(size = 10))+ theme(legend.position="none") 79 | 80 | 81 | raneff_lin_fixed<-lmer(rasch_FIM~ 82 | # Fixed-effects 83 | 1+year.0+ 84 | # Random-effects 85 | (1|subID), data=DATA, REML=FALSE) 86 | 87 | 88 | summary(raneff_lin_fixed) 89 | 90 | first5<-DATA[c(1:90),] # Second, we'll make a smaller dataset with the predictions for these 10: 91 | PRED<-data.frame(subID=c("s01","s02","s03","s04","s05"), 92 | Intercepts=c(coef(raneff_lin_fixed)$subID[c(1:5),1]), 93 | Slopes=c(coef(raneff_lin_fixed)$subID[c(1:5),2])) 94 | PRED 95 | 96 | ggplot(first5, aes(x = year.0, y = rasch_FIM)) + 97 | geom_line(aes(group=subID)) + facet_wrap(~subID, ncol=5)+ 98 | geom_point(fill="grey", pch=21, size=2, stroke=1.25) + 99 | scale_x_continuous(name = "Time from Admission (Years)") + 100 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100))+ 101 | geom_abline(aes(intercept=Intercepts, slope=Slopes), col="black", lwd=1, PRED) + 102 | theme_bw() + theme(axis.text=element_text(size=10, colour="black"), 103 | axis.title=element_text(size=10,face="bold")) + 104 | theme(strip.text.x = element_text(size = 10))+ theme(legend.position="none") 105 | 106 | 107 | raneff_lin_rand<-lmer(rasch_FIM~ 108 | # Fixed-effects 109 | 1+year.0+ 110 | # Random-effects 111 | (1+year.0|subID), data=DATA, REML=FALSE) 112 | summary(raneff_lin_rand) 113 | 114 | 115 | PRED<-data.frame(subID=c("s01","s02","s03","s04","s05"), 116 | Intercepts=c(coef(raneff_lin_rand)$subID[c(1:5),1]), 117 | Slopes=c(coef(raneff_lin_rand)$subID[c(1:5),2])) 118 | PRED 119 | 120 | ggplot(first5, aes(x = year.0, y = rasch_FIM)) + 121 | geom_point(fill="grey", pch=21, size=2, stroke=1.25) + 122 | geom_line(aes(group=subID)) + facet_wrap(~subID, ncol=5)+ 123 | scale_x_continuous(name = "Time from Admission (Years)") + 124 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100))+ 125 | geom_abline(aes(intercept=Intercepts, slope=Slopes), col="red", lwd=1, PRED)+ 126 | theme_bw() + theme(axis.text=element_text(size=10, colour="black"), 127 | axis.title=element_text(size=10,face="bold")) + 128 | theme(strip.text.x = element_text(size = 10))+ theme(legend.position="none") 129 | 130 | 131 | raneff_quad_rand<-lmer(rasch_FIM~ 132 | # Fixed-effects 133 | 1+year.0+I(year.0^2)+ 134 | # Random-effects 135 | (1+year.0+I(year.0^2)|subID), data=DATA, REML=FALSE) 136 | summary(raneff_quad_rand) 137 | 138 | 139 | raneff_quad_rand_b<-lmer(rasch_FIM~ 140 | # Fixed-effects 141 | 1+year.0+I(year.0^2)+ 142 | # Random-effects 143 | (1+year.0|subID), data=DATA, REML=FALSE) 144 | summary(raneff_quad_rand_b) 145 | 146 | anova(raneff_quad_rand, raneff_quad_rand_b) 147 | 148 | ?getME 149 | getME(raneff_quad_rand, "mmList") 150 | getME(raneff_quad_rand, "b") 151 | getME(raneff_quad_rand, "Ztlist") 152 | vcov.merMod(raneff_quad_rand) 153 | write.csv(as.matrix(getME(raneff_quad_rand, "X")), "./X_matrix.csv") 154 | write.csv(as.matrix(getME(raneff_quad_rand, "Z")), "./Z_matrix.csv") 155 | 156 | DATA$quad_pred <- fitted(raneff_quad_rand) # Save model predictions to data frame 157 | first5<-DATA[c(1:90),] # Second, we'll make a smaller dataset with the predictions for these 10: 158 | 159 | 160 | ggplot(first5, aes(x = year.0, y = rasch_FIM)) + 161 | geom_line(aes(group=subID)) + facet_wrap(~subID, ncol=5)+ 162 | geom_point(fill="grey", pch=21, size=2, stroke=1.25) + 163 | scale_x_continuous(name = "Time from Admission (Years)") + 164 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100))+ 165 | geom_line(aes(y=quad_pred), lwd=1, col="dodgerblue") + 166 | theme_bw() + theme(axis.text=element_text(size=10, colour="black"), 167 | axis.title=element_text(size=10,face="bold")) + 168 | theme(strip.text.x = element_text(size = 10))+ theme(legend.position="none") 169 | 170 | 171 | # Negative Exponential Model ---- 172 | ggplot(DATA, aes(x = year.0, y = rasch_FIM)) + 173 | geom_line(aes(group=subID), col="grey") + 174 | #stat_smooth(method="lm", formula=y~x+I(x^2), col="black", lwd=1.5, se=FALSE)+ 175 | scale_x_continuous(name = "Time from Admission (Years)") + 176 | scale_y_continuous(name = "Rasch-Scaled FIM Score (0-100)",limits=c(0,100)) + 177 | theme_bw() + 178 | theme(axis.text=element_text(size=14, colour="black"), 179 | axis.title=element_text(size=14,face="bold")) + 180 | theme(strip.text.x = element_text(size = 14))+ theme(legend.position="none") 181 | 182 | library(nlme) 183 | 184 | set.seed(100) 185 | neg_exp_rand_mod <- nlme(rasch_FIM ~ b_1i + 186 | (b_2i)*(exp(b_3i * year.0)), 187 | data = DATA, 188 | fixed = b_1i + b_2i + b_3i ~ 1, 189 | random = list(b_1i ~ 1, b_2i ~ 1, b_3i ~1), 190 | groups = ~ subID, 191 | start = c(80, -70, -1), 192 | na.action = na.omit) 193 | summary(neg_exp_rand_mod) 194 | 195 | coef(neg_exp_rand_mod) 196 | fitted(neg_exp_rand_mod) 197 | 198 | year <- seq(from=0, to=1.5, by=0.01) 199 | rasch_FIM <- 58.53985-48.13958*exp(-2.53036*year) 200 | PRED <- data.frame(year, rasch_FIM) 201 | 202 | head(DATA) 203 | ggplot(DATA, aes(x = year.0, y = rasch_FIM)) + 204 | geom_line(aes(group=subID), col="grey") + 205 | scale_x_continuous(name = "Time from Admission (Years)") + 206 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100)) + 207 | #facet_wrap(~AIS_grade) + 208 | theme_bw() + 209 | theme(axis.text=element_text(size=14, colour="black"), 210 | axis.title=element_text(size=14,face="bold")) + 211 | theme(strip.text.x = element_text(size = 14))+ theme(legend.position="none")+ 212 | geom_line(data=PRED, aes(x=year, y=rasch_FIM), col="black", lwd=1.5) 213 | 214 | 215 | DATA$exp_pred <- fitted(neg_exp_rand_mod) # Save model predictions to data frame 216 | first4<-DATA[c(1:72),] # Second, we'll make a smaller dataset with the predictions for these 10: 217 | 218 | 219 | ggplot(first4, aes(x = year.0, y = rasch_FIM)) + 220 | geom_line(aes(group=subID)) + facet_wrap(~subID, ncol=2)+ 221 | geom_point(fill="grey", pch=21, size=2, stroke=1.25) + 222 | scale_x_continuous(name = "Time from Admission (Years)") + 223 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100))+ 224 | geom_line(aes(y=exp_pred), lwd=1, col="purple") + 225 | theme_bw() + theme(axis.text=element_text(size=12, colour="black"), 226 | axis.title=element_text(size=14,face="bold")) + 227 | theme(strip.text.x = element_text(size = 12))+ theme(legend.position="none") 228 | -------------------------------------------------------------------------------- /random_effects_paper/script_section_02_factorial_data.R: -------------------------------------------------------------------------------- 1 | # title: "Model Specification in Mixed-Effects Models: A Focus on Random Effects" 2 | # authors: Keith Lohse, PhD, PStat; Mike Strube, PhD; Allan Kozlowksi, PhD, PT 3 | # date: "2022-07-07" 4 | 5 | library(lme4); library(lmerTest); library(ez); library(tidyverse) 6 | 7 | HR <- c(60, 72, 42, 50) 8 | subID <- factor(c("s1", "s1", "s2", "s2")) 9 | condition <- factor(c("ctl", "ex", "ctl", "ex")) 10 | 11 | DATA <- data.frame(subID, condition, HR) 12 | 13 | mod01 <- lmer(HR~condition + (1|subID), REML=FALSE) 14 | summary(mod01) 15 | anova(mod01) 16 | var(c(-9.9, 9.9, -9.9, 9.9)) 17 | var(c(-0.9, 1.1, 0.9, -1.1)) 18 | 19 | 20 | fixef(mod01) 21 | ranef(mod01) 22 | resid(mod01) 23 | var(resid(mod01)) 24 | plot(resid(mod01)) 25 | 26 | getME(mod01, "mmList") 27 | getME(mod01, "b") 28 | getME(mod01, "Ztlist") 29 | vcov.merMod(mod01) 30 | 31 | (60+42)/2 32 | (72+50)/2 33 | mean(DATA$HR) 34 | 35 | 36 | ################################### 37 | 38 | HR <- c(60, 72, 42, 50, 65, 80) 39 | subID <- factor(c("s1", "s1", "s2", "s2", "s3", "s3")) 40 | condition <- factor(c("ctl", "ex", "ctl", "ex", "ctl", "ex")) 41 | 42 | DATA <- data.frame(subID, condition, HR) 43 | DATA 44 | 45 | mod01 <- lmer(HR~1+condition + (1|subID), REML=FALSE) 46 | summary(mod01) 47 | anova(mod01) 48 | 49 | fixef(mod01) 50 | ranef(mod01) 51 | resid(mod01) 52 | var(resid(mod01)) 53 | plot(resid(mod01)) 54 | 55 | getME(mod01, "mmList") 56 | getME(mod01, "b") 57 | getME(mod01, "Ztlist") 58 | vcov.merMod(mod01) 59 | 60 | (60+42)/2 61 | (72+50)/2 62 | mean(DATA$HR) 63 | 64 | 65 | # Repeated Measures ANOVA example ---- 66 | list.files() 67 | 68 | DATA <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/random_effects_paper/data_heart_rate.csv", 69 | stringsAsFactors = TRUE, na.strings=c("NA","NaN"," ","")) 70 | head(DATA) 71 | 72 | DATA$Cond <- fct_relevel(DATA$Cond, "rest", "imm", "delay") 73 | DATA$Alt <- fct_relevel(DATA$Alt, "low", "high") 74 | 75 | ggplot(data=DATA, aes(x = Cond, y = Heart_Rate)) + 76 | geom_line(aes(group=SUBID), col="grey")+ 77 | geom_point(aes(group=Cond, fill=Cond), shape=21, col="black", size=2, 78 | position = position_dodge(width=0.75))+ 79 | geom_boxplot(aes(fill=Cond), alpha=0.2) + 80 | scale_fill_grey()+ 81 | facet_wrap(~Alt)+ 82 | scale_x_discrete(name = "Condition") + 83 | scale_y_continuous(name = "Heart Rate (bpm)") + 84 | theme_bw()+ 85 | theme(axis.text=element_text(size=12, color="black"), 86 | legend.text=element_text(size=12, color="black"), 87 | axis.title=element_text(size=12, face="bold"), 88 | plot.title=element_text(size=12, face="bold", hjust=0.5), 89 | panel.grid.minor = element_blank(), 90 | strip.text = element_text(size=12, face="bold"), 91 | legend.title=element_blank(), 92 | legend.position = "none") 93 | 94 | 95 | summary(aov(Heart_Rate ~ Alt*Cond + Error(SUBID/(Alt*Cond)), data=DATA)) 96 | 97 | ezANOVA( 98 | data=DATA 99 | , dv = .(Heart_Rate) 100 | , wid =.(SUBID) 101 | , within = .(Alt, Cond) 102 | , type = 3 103 | , white.adjust = FALSE 104 | , detailed = FALSE 105 | , return_aov = FALSE 106 | ) 107 | 108 | 109 | # Maximum Likelihood Estimation ---- 110 | rand01 <- lmer(Heart_Rate~ 111 | # Fixed Effects 112 | 1+Alt*Cond+ 113 | # Random Effects 114 | (1|SUBID), 115 | data=DATA, REML=FALSE) 116 | anova(rand01) 117 | summary(rand01) 118 | 119 | rand02 <- lmer(Heart_Rate~ 120 | # Fixed Effects 121 | 1+Alt*Cond+ 122 | # Random Effects 123 | (1|SUBID)+(1|Alt)+(1|Cond), 124 | data=DATA, REML=FALSE) 125 | anova(rand02) 126 | summary(rand02) 127 | 128 | 129 | xtabs(~SUBID+Alt+Cond, data=DATA) 130 | rand03 <- lmer(Heart_Rate~ 131 | # Fixed Effects 132 | 1+Alt*Cond+ 133 | # Random Effects 134 | (1|SUBID)+(1|Alt:SUBID)+(1|Cond:SUBID), 135 | data=DATA, REML=FALSE) 136 | anova(rand03) 137 | summary(rand03) 138 | 139 | 140 | fixef(rand03) 141 | ranef(rand03) 142 | resid(rand03) 143 | var(resid(rand03)) 144 | plot(resid(rand03)) 145 | 146 | getME(rand03, "mmList") 147 | getME(rand03, "b") 148 | getME(rand03, "Ztlist") 149 | vcov.merMod(rand03) 150 | 151 | 152 | 153 | 154 | 155 | # Restricted Maximum Likelihood Estimation ---- 156 | rand01 <- lmer(Heart_Rate~ 157 | # Fixed Effects 158 | 1+Alt*Cond+ 159 | # Random Effects 160 | (1|SUBID), 161 | data=DATA, REML=TRUE) 162 | anova(rand01) 163 | summary(rand01) 164 | 165 | rand02 <- lmer(Heart_Rate~ 166 | # Fixed Effects 167 | 1+Alt*Cond+ 168 | # Random Effects 169 | (1|SUBID)+(1|Alt)+(1|Cond), 170 | data=DATA, REML=TRUE) 171 | anova(rand02) 172 | summary(rand02) 173 | 174 | 175 | xtabs(~SUBID+Alt+Cond, data=DATA) 176 | rand03 <- lmer(Heart_Rate~ 177 | # Fixed Effects 178 | 1+Alt*Cond+ 179 | # Random Effects 180 | (1|SUBID)+(1|Alt:SUBID)+(1|Cond:SUBID), 181 | data=DATA, REML=TRUE) 182 | anova(rand03) 183 | summary(rand03) 184 | 185 | fixef(rand03) 186 | ranef(rand03) 187 | resid(rand03) 188 | var(resid(rand03)) 189 | plot(resid(rand03)) 190 | 191 | getME(rand03, "mmList") 192 | getME(rand03, "b") 193 | as.matrix(getME(rand03, "Ztlist")$`Alt:SUBID.(Intercept)`) 194 | as.matrix(getME(rand03, "Ztlist")$`Cond:SUBID.(Intercept)`) 195 | as.matrix(getME(rand03, "Ztlist")$`SUBID.(Intercept)`) 196 | vcov.merMod(rand03) 197 | 198 | write.csv(as.matrix(getME(rand03, "Ztlist")$`Alt:SUBID.(Intercept)`), "./RE_sub_alt.csv") 199 | write.csv(as.matrix(getME(rand03, "Ztlist")$`Cond:SUBID.(Intercept)`), "./RE_sub_cond.csv") 200 | write.csv(as.matrix(getME(rand03, "Ztlist")$`SUBID.(Intercept)`), "./RE_sub.csv") 201 | 202 | 203 | 204 | -------------------------------------------------------------------------------- /random_effects_paper/script_section_03_multiple_sources.R: -------------------------------------------------------------------------------- 1 | # title: "Model Specification in Mixed-Effects Models: A Focus on Random Effects" 2 | # authors: Keith Lohse, PhD, PStat; Mike Strube, PhD; Allan Kozlowksi, PhD, PT 3 | # date: "2022-07-26" 4 | 5 | library(lme4); library(lmerTest); library(ez); library(tidyverse) 6 | 7 | 8 | # 1.0. Variation in Multiple Nested Factors ---- 9 | DAT1 <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/random_effects_paper/data_longitudinal.csv", 10 | stringsAsFactors = TRUE, na.strings=c("NA","NaN"," ","")) 11 | # Use the head() function to check the structure of the data file. 12 | head(DAT1) 13 | 14 | DAT1$year.0 <- (DAT1$time -1)/12 15 | 16 | ggplot(DAT1, aes(x = year.0, y = rasch_FIM)) + 17 | geom_line(aes(group=subID, col=site)) + 18 | geom_point(aes(fill=site), shape=21, size=1.5) + 19 | facet_wrap(~AIS_grade) + 20 | scale_fill_grey()+ 21 | scale_color_grey()+ 22 | labs(col="Site", fill="Site")+ 23 | scale_x_continuous(name = "Time from Admission (Years)", breaks=c(0,0.5,1,1.5), limits=c(0,1.6)) + 24 | scale_y_continuous(name = "Independence (0-100)",limits=c(0,100)) + 25 | theme_bw() + theme(axis.text.x=element_text(size=10, colour="black"), 26 | axis.text.y=element_text(size=10, colour="black"), 27 | axis.title=element_text(size=12,face="bold")) + 28 | theme(strip.text.x = element_text(size = 12))+ theme(legend.position="bottom") 29 | 30 | 31 | 32 | raneff_quad_site<-lmer(rasch_FIM~ 33 | # Fixed-effects 34 | 1+year.0*AIS_grade +I(year.0^2)*AIS_grade + 35 | # Random-effects 36 | (1+year.0|subID)+(1|site), data=DAT1, REML=FALSE) 37 | summary(raneff_quad_site) 38 | anova(raneff_quad_site) 39 | 40 | 41 | raneff_quad_site_fixed<-lmer(rasch_FIM~ 42 | # Fixed-effects 43 | 1+year.0*AIS_grade +I(year.0^2)*AIS_grade + site+ 44 | # Random-effects 45 | (1+year.0|subID), data=DAT1, REML=FALSE) 46 | summary(raneff_quad_site_fixed) 47 | anova(raneff_quad_site_fixed) 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | # 2.0. Variation in Multiple Crossed Factors ---- 58 | DAT2 <- read.csv("https://raw.githubusercontent.com/keithlohse/mixed_effects_models/master/random_effects_paper/rt_dummy_data.csv", 59 | stringsAsFactors = TRUE, na.strings=c("NA","NaN"," ","")) 60 | 61 | head(DAT2) 62 | DAT2$PID <-factor(DAT2$PID) 63 | 64 | xtabs(is.na(RT)==FALSE~stim, data=DAT2) 65 | xtabs(is.na(RT)==FALSE~PID, data=DAT2) 66 | 67 | summary(DAT2$stim) 68 | length(unique(DAT2$stim)) 69 | length(unique(DAT2$PID)) 70 | 71 | ggplot(data=DAT2 %>% filter(stim %in% c(unique(DAT2$stim)[1:12]) == TRUE), 72 | aes(x = stim, y = RT)) + 73 | geom_point(aes(col=modality), shape=16, size=1, 74 | position = position_jitterdodge(jitter.width=0.2))+ 75 | geom_boxplot(aes(fill=modality), col="black", alpha=0.2, 76 | outlier.shape = NA) + 77 | scale_x_discrete(name = "Stimulus") + 78 | scale_y_continuous(name = "Response Time") + 79 | scale_fill_grey()+ 80 | scale_color_grey()+ 81 | theme_bw()+ 82 | theme(axis.text.x=element_text(size=12, color="black", angle=90), 83 | axis.text.y=element_text(size=12, color="black", angle=0), 84 | legend.text=element_text(size=12, color="black"), 85 | axis.title=element_text(size=12, face="bold"), 86 | plot.title=element_text(size=12, face="bold", hjust=0.5), 87 | panel.grid.minor = element_blank(), 88 | strip.text = element_text(size=12, face="bold"), 89 | legend.title=element_blank(), 90 | legend.position = "bottom") 91 | 92 | ggplot(data=DAT2 %>% filter(PID %in% c(unique(DAT2$PID)[1:10]) == TRUE), 93 | aes(x = PID, y = RT)) + 94 | geom_point(aes(col=modality), shape=16, size=1, 95 | position = position_jitterdodge(jitter.width=0.2))+ 96 | geom_boxplot(aes(fill=modality), col="black", alpha=0.2, 97 | outlier.shape = NA) + 98 | scale_fill_grey()+ 99 | scale_color_grey()+ 100 | scale_x_discrete(name = "Subject ID") + 101 | scale_y_continuous(name = "Response Time") + 102 | theme_bw()+ 103 | theme(axis.text.x=element_text(size=12, color="black", angle=90), 104 | axis.text.y=element_text(size=12, color="black", angle=0), 105 | legend.text=element_text(size=12, color="black"), 106 | axis.title=element_text(size=12, face="bold"), 107 | plot.title=element_text(size=12, face="bold", hjust=0.5), 108 | panel.grid.minor = element_blank(), 109 | strip.text = element_text(size=12, face="bold"), 110 | legend.title=element_blank(), 111 | legend.position = "bottom") 112 | 113 | 114 | 115 | # Basic Model ---- 116 | head(DAT2) 117 | rand01 <- lmer(log(RT)~ 118 | # Fixed Effects 119 | 1+modality+ 120 | # Random Effects 121 | (1|PID)+(1|stim), 122 | data=DAT2, REML=TRUE) 123 | anova(rand01) 124 | summary(rand01) 125 | 126 | 127 | fixef(rand01) 128 | ranef(rand01) 129 | resid(rand01) 130 | var(resid(rand01)) 131 | qqnorm(y=rstudent(rand01)) 132 | abline(0,1) 133 | 134 | getME(rand01, "mmList") 135 | getME(rand01, "b") 136 | getME(rand01, "Ztlist") 137 | vcov.merMod(rand01) 138 | 139 | 140 | # Random Slopes Model ---- 141 | head(DAT2) 142 | rand_slopes <- lmer(log(RT)~ 143 | # Fixed Effects 144 | 1+modality+ 145 | # Random Effects 146 | (1+modality|PID)+(1|stim), 147 | data=DAT2, REML=TRUE) 148 | anova(rand_slopes) 149 | summary(rand_slopes) 150 | 151 | 152 | fixef(rand_slopes) 153 | ranef(rand_slopes) 154 | resid(rand_slopes) 155 | var(resid(rand_slopes)) 156 | qqnorm(y=rstudent(rand_slopes)) 157 | abline(0,1) 158 | 159 | getME(rand_slopes, "mmList") 160 | getME(rand_slopes, "b") 161 | getME(rand_slopes, "Ztlist") 162 | vcov.merMod(rand_slopes) 163 | 164 | 165 | 166 | # Aggregated Model ---- 167 | head(DAT2) 168 | DAT3 <- DAT2 %>% group_by(PID, modality) %>% 169 | summarize(RT = mean(RT)) 170 | 171 | agg_mod <- lmer(log(RT)~ 172 | # Fixed Effects 173 | 1+modality+ 174 | # Random Effects 175 | (1|PID), 176 | data=DAT3, REML=TRUE) 177 | anova(agg_mod) 178 | summary(agg_mod) 179 | --------------------------------------------------------------------------------