hagenaue / bHRbLR_Enrichment_Stress_BehaviorAndHormoneData

Code used for the analysis of behavioral and hormonal data within the publication "Adolescent environmental enrichment induces social resilience and alters neural gene expression in a selectively bred rodent model with anxious phenotype" by O'Connor, Hagenauer, et al.
1 stars 0 forks source link

Looping the Time Series Stats Code over all variables #7

Closed hagenaue closed 4 years ago

hagenaue commented 4 years ago

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.

liamctf commented 4 years ago

I'll get to work on this.

liamctf commented 4 years ago

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.

liamctf commented 4 years ago

I fixed the errors with NA values, and everything appears to be working fine. I just pushed my changes to the main branch.