Closed hagenaue closed 4 years ago
I'll get to work on this.
I was having more R issues, so it took me a while to get going, but I now have this issue almost complete. I tested it for TimeCaged and DefeatScore, and everything appears to be working, so the only thing I still need to do is adjust my code to account for the null values in several of the other time series variables.
I fixed the errors with NA values, and everything appears to be working fine. I just pushed my changes to the main branch.
I just created "8_Stats_TimeSeriesData.R." It includes example code for running a multilevel regression model examining the effects of line & treatment on one of the social defeat time series variables (Defeat Score). In a manner similar to "6_TreatmentEffects_StatsOutput.R" we should change this code so that it: 1) Outputs the results of the statistical analyses to a .txt file instead of the console. 2) Is generalized so that it can analyze time series variables other than just Defeat Score. 3) Loops over all of the time series variables in the data frame DefeatDays_LongVersion_OnlyDefeated to perform these analyses.