{"id":39100757,"url":"https://github.com/douwehorsthuis/mixed-effect-models","last_synced_at":"2026-01-17T19:06:06.165Z","repository":{"id":36991237,"uuid":"388908691","full_name":"DouweHorsthuis/Mixed-effect-models","owner":"DouweHorsthuis","description":"Mixed effects models for R","archived":false,"fork":false,"pushed_at":"2022-08-26T14:20:14.000Z","size":2590,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-05T00:45:13.362Z","etag":null,"topics":["eeg-statistics","mixed-effects-models","r","single-trial-analysis","statistics"],"latest_commit_sha":null,"homepage":"","language":"RMarkdown","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DouweHorsthuis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-23T19:40:07.000Z","updated_at":"2024-12-29T13:49:14.000Z","dependencies_parsed_at":"2023-01-17T00:45:43.359Z","dependency_job_id":null,"html_url":"https://github.com/DouweHorsthuis/Mixed-effect-models","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/DouweHorsthuis/Mixed-effect-models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DouweHorsthuis%2FMixed-effect-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DouweHorsthuis%2FMixed-effect-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DouweHorsthuis%2FMixed-effect-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DouweHorsthuis%2FMixed-effect-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DouweHorsthuis","download_url":"https://codeload.github.com/DouweHorsthuis/Mixed-effect-models/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DouweHorsthuis%2FMixed-effect-models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28516540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:55:29.170Z","status":"ssl_error","status_checked_at":"2026-01-17T18:55:03.375Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eeg-statistics","mixed-effects-models","r","single-trial-analysis","statistics"],"created_at":"2026-01-17T19:06:05.577Z","updated_at":"2026-01-17T19:06:06.149Z","avatar_url":"https://github.com/DouweHorsthuis.png","language":"RMarkdown","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mixed Models\n\nDouwe John Horsthuis 2022-06-26\n\n![](image/logo.jpeg)\n\n# Mixed Models in R\n\n*As coded and explained and created by [Ana Francisco](https://www.cognitiveneurolab.com/dr-ana-a-francisco) and written down and edited by [Douwe Horsthuis](https://github.com/DouweHorsthuis)*\n\nWhat will you find in this repo:\n\n-   [How to use this R code to create your own mixed models](#how-to-use-this-r-code-to-create-your-own-mixed-models)\n\n    1.  [R libraries](#loading-r-libraries)\n\n    2.  [What do you need to define](#what-do-you-need-to-define)\n\n    3.  [Loading and cleaning the data](#loading-and-cleaning-the-data)\n\n    4.  [Plotting data](#plotting-data)\n\n    5.  [Creating subsets for the model](#creating-subsets-for-the-model)\n\n    6.  [Mixed model](mixed-model)\n\n## How to use this R code to create your own mixed models\n\n## The actual code explained\n\nHere we are using a adaptable version of the code that you need adapt to use for your own project.\n\n### Loading R libraries {#loading-r-libraries}\n\nFor R code to work, you need to re-load libraries every time you open an R project. If it's the first time you load them, you'll need to install them. You can do this by running the line `install.package(\"thenameofthelibrary\")`.\n\nTo use the following script, you'll need at least these libraries to do the basics, we are also cleaning the environment (in case you want to re-run it from the start) and preventing R from using scientific notations.\n\n``` r\nlibrary(lme4)#library for mixed models \nlibrary(lmerTest)#library for P values\nlibrary(ggplot2)#library for plotting\nlibrary(doBy)#for summaries\nlibrary(dplyr)#for many basics \nrm(list=ls())#cleans environment\noptions(scipen=999)#no scientific notations\n```\n\n### What do you need to define {#what-do-you-need-to-define}\n\nWe need to load data from a .csv file, or a .text file. We haven't tested, but `library(R.matlab)` and `readMat(\"filename\")` to do the same with a MATLAB file. This file should have a couple of things:\n\n1.  Dependent variable; such as amplitude from trial by trial data from individual subjects\n\n    -   This should be a single value per trial\n\n    -   The more factors you want to include in your model, the more trials you need per participant. If you have too few the model won't complete.\n\n2.  Fixed factor; such as\n\n    -   group, this is different between some people but not all\n\n    -   conditions\n\n3.  Random factor; such as\n\n    -   ID or something that identifies the individual who's data is used, since we know that the data of each individual is always going to be different from the next.\n\n    -   Trial number\n\n## Loading and cleaning the data {#loading-and-cleaning-the-data}\n\n``` r\n#fill out these 3 variables that will be different depending on your data\nload_path=\"C:/Users/douwe/OneDrive/Documents/Github/Mixed-effect-models/data/\"\ndata_name=\"p2.txt\"\namount_trial= 200 #how many trials do you want to use\n\ndataset_full=read.table(paste(load_path,data_name,sep=\"\"), header=TRUE)#imports data, header=TRUE so we keep names of columns\n```\n\n``` r\n#re-defines column names\ncolnames(dataset_full)=c(\"subjects\",\"group\", \"group2\",\"condition\", \"trial\",\"o1\",\"oz\",\"o2\",\"avg\")  #give the correct name to each of your columns\n\n#creates factors\ndataset_full$subjects=as.factor(dataset_full$subjects)\ndataset_full$trial=as.factor(dataset_full$trial)\n\ndataset_full$group2 \u003c- factor (dataset_full$group2, levels = c(1:5), labels = c(\"CT 22q\", \"22q-\", \"22q+\", \"CT SZ\", \"SZ\"))\ndataset_full$condition \u003c- factor (dataset_full$condition, levels = c(1:5), labels = c(\"145\", \"245\", \"495\", \"995\", \"2495\"))\n\n#checks\n#checks\nlength(unique(dataset_full$subjects))\n```\n\n    ## [1] 127\n\n``` r\nsort(unique(dataset_full$group2))\n```\n\n    ## [1] CT 22q 22q-   22q+   CT SZ  SZ    \n    ## Levels: CT 22q 22q- 22q+ CT SZ SZ\n\n``` r\nsort(unique(dataset_full$condition))\n```\n\n    ## [1] 145  245  495  995  2495\n    ## Levels: 145 245 495 995 2495\n\n``` r\nstr(dataset_full)\n```\n\n    ## 'data.frame':    119693 obs. of  9 variables:\n    ##  $ subjects : Factor w/ 127 levels \"1\",\"2\",\"3\",\"4\",..: 1 1 1 1 1 1 1 1 1 1 ...\n    ##  $ group    : int  1 1 1 1 1 1 1 1 1 1 ...\n    ##  $ group2   : Factor w/ 5 levels \"CT 22q\",\"22q-\",..: 1 1 1 1 1 1 1 1 1 1 ...\n    ##  $ condition: Factor w/ 5 levels \"145\",\"245\",\"495\",..: 1 1 1 1 1 1 1 1 1 1 ...\n    ##  $ trial    : Factor w/ 296 levels \"1\",\"2\",\"3\",\"4\",..: 1 2 3 4 5 6 7 8 9 10 ...\n    ##  $ o1       : num  15.5 -13.9 14.1 22.2 26.6 ...\n    ##  $ oz       : num  17.1 -21 18.3 17.7 30.6 ...\n    ##  $ o2       : num  13.34 -20.3 7.93 1.41 23.27 ...\n    ##  $ avg      : num  15.3 -18.4 13.5 13.8 26.8 ...\n\n``` r\n# getting rid of data that is not needed for example\ndataset\u003c- subset(dataset_full, select = -c(group, o1, oz, o2))\ndataset\u003c- subset(dataset, group2 != \"CT 22q\" \u0026  group2 != \"22q-\" \u0026  group2 != \"22q+\" )\n\n#creates summary-mean and standard deviation\nsummaryBy(avg ~ subj, data=dataset, FUN=c(length,mean,sd))\n```\n\n    ##   avg.length avg.mean   avg.sd\n    ## 1      53137  2.34156 6.985797\n\n``` r\n#randomly selects x amount trials per subject \nreduceddataset \u003c- dataset %\u003e% group_by(subjects) %\u003e% sample_n(size = amount_trial)\n```\n\n## Plotting data {#plotting-data}\n\nHere we are using ggplot to plot the data. This is an example dataset. This is Go-No-Go data from the IAPS paradigm, where we compare controls and people with schizophrenia. We have different conditions (isi between stimulation).\n\n``` r\nvgp2Plot \u003c- ggplot(reduceddataset, aes(x = group2, y = avg, color=group2)) \nvgp2Plot \u003c- vgp2Plot + theme(legend.key.size = unit(1, \"cm\"))\nvgp2Plot \u003c- vgp2Plot + theme(legend.key.size = unit(1, \"cm\"))\nvgp2Plot \u003c- vgp2Plot + geom_violin() #position = position_nudge(x = .2, y = 0), adjust=1, lwd=1.2, lty=3\nvgp2Plot \u003c- vgp2Plot + geom_boxplot(width=0.1, alpha=1, outlier.shape = NA, lwd=1, position=position_dodge(0.5))\nvgp2Plot \u003c- vgp2Plot + geom_jitter(width=0.15, alpha = 0.01)\nvgp2Plot \u003c- vgp2Plot + scale_color_manual(values=c(\"snow4\", \"aquamarine3\", \"pink\", \"orange\", \"purple\"))  \nvgp2Plot \u003c- vgp2Plot + labs(y = expression(paste(\"amplitude (\",mu,\"V)\")), x=\"groups\")\nvgp2Plot \u003c- vgp2Plot + theme_minimal()\nvgp2Plot \u003c- vgp2Plot + theme(axis.line = element_line(colour = \"grey\"),\n                             panel.grid.major = element_blank(),\n                             panel.grid.minor = element_blank(),\n                             panel.border = element_blank(),\n                             panel.background = element_blank())\nvgp2Plot \u003c- vgp2Plot + theme(legend.position = \"none\")\nvgp2Plot \u003c- vgp2Plot + theme(text = element_text(family=\"sans\", size=20))\nvgp2Plot \u003c- vgp2Plot + scale_y_continuous(limits = c(-30,30))\nvgp2Plot\n```\n\n![](Mixed-effect-models-explained_files/figure-gfm/unnamed-chunk-1-1.png)\u003c!-- --\u003e\n\n## Creating subsets for the model {#creating-subsets-for-the-model}\n\nA mixed effects model should be ran on factors we want to compare with each other, in this case the amplitude for the p2 between the 4 groups. In the case of this example, the 22q group is age matched to their controls, and the sz group has their own. Due to the age difference we should not compare between these groups. So we also need to create subgroups. We also want to be able to look only at a specific condition, so we also separate per conditions\n\n``` r\nvg145_sz \u003c- subset(reduceddataset, condition==\"145\")\nvg245_sz \u003c- subset(reduceddataset, condition==\"245\")\nvg495_sz \u003c- subset(reduceddataset, condition==\"495\")\nvg995_sz \u003c- subset(reduceddataset, condition==\"995\")\nvg2495_sz \u003c- subset(reduceddataset, condition==\"2495\")\n```\n\n## Mixed model\n\nIn this example, the depended variable is amplitude, group is a fixed factor, subjects and trial are random factors. We run 6 models, the first 5 look at amplitude by group, the last one also looks at group and condition, because of the \\* between group and condition, it will also look for interactions between the two.\n\n``` r\nmodel1.01 = lmer(avg~group2+(1|subjects)+(1|trial), data = vg145_sz, REML=FALSE)\nsummary(model1.01)\n```\n\n    ## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's\n    ##   method [lmerModLmerTest]\n    ## Formula: avg ~ group2 + (1 | subjects) + (1 | trial)\n    ##    Data: vg145_sz\n    ## \n    ##      AIC      BIC   logLik deviance df.resid \n    ##  14493.0  14521.6  -7241.5  14483.0     2246 \n    ## \n    ## Scaled residuals: \n    ##     Min      1Q  Median      3Q     Max \n    ## -4.7915 -0.5872 -0.0230  0.5469  4.6608 \n    ## \n    ## Random effects:\n    ##  Groups   Name        Variance Std.Dev.\n    ##  trial    (Intercept)  0.000   0.000   \n    ##  subjects (Intercept)  7.736   2.781   \n    ##  Residual             34.453   5.870   \n    ## Number of obs: 2251, groups:  trial, 219; subjects, 55\n    ## \n    ## Fixed effects:\n    ##             Estimate Std. Error      df t value Pr(\u003e|t|)    \n    ## (Intercept)   2.0325     0.5182 54.6804   3.922 0.000247 ***\n    ## group2SZ     -1.7273     0.8011 54.6057  -2.156 0.035494 *  \n    ## ---\n    ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n    ## \n    ## Correlation of Fixed Effects:\n    ##          (Intr)\n    ## group2SZ -0.647\n    ## optimizer (nloptwrap) convergence code: 0 (OK)\n    ## boundary (singular) fit: see help('isSingular')\n\nWe see that the difference **is not significant** for this condition between the groups, we also see that the random effects are not significant\n\n``` r\nmodel1.02 = lmer(avg~group2+(1|subjects)+(1|trial), data = vg245_sz, REML=FALSE)\nsummary(model1.02)\n```\n\n    ## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's\n    ##   method [lmerModLmerTest]\n    ## Formula: avg ~ group2 + (1 | subjects) + (1 | trial)\n    ##    Data: vg245_sz\n    ## \n    ##      AIC      BIC   logLik deviance df.resid \n    ##  14434.0  14462.5  -7212.0  14424.0     2192 \n    ## \n    ## Scaled residuals: \n    ##     Min      1Q  Median      3Q     Max \n    ## -4.5486 -0.5531 -0.0115  0.5251  5.8451 \n    ## \n    ## Random effects:\n    ##  Groups   Name        Variance Std.Dev.\n    ##  trial    (Intercept)  0.000   0.000   \n    ##  subjects (Intercept)  7.607   2.758   \n    ##  Residual             39.387   6.276   \n    ## Number of obs: 2197, groups:  trial, 217; subjects, 55\n    ## \n    ## Fixed effects:\n    ##             Estimate Std. Error      df t value      Pr(\u003e|t|)    \n    ## (Intercept)   3.6047     0.5189 54.7077   6.946 0.00000000474 ***\n    ## group2SZ     -1.4606     0.8020 54.5721  -1.821        0.0741 .  \n    ## ---\n    ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n    ## \n    ## Correlation of Fixed Effects:\n    ##          (Intr)\n    ## group2SZ -0.647\n    ## optimizer (nloptwrap) convergence code: 0 (OK)\n    ## boundary (singular) fit: see help('isSingular')\n\nWe see that the difference **is significant** for this condition between the groups, we also see that the random effects are not significant\n\n``` r\nmodel1.03 = lmer(avg~group2+(1|subjects)+(1|trial), data = vg495_sz, REML=FALSE)\nsummary(model1.03)\n```\n\n    ## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's\n    ##   method [lmerModLmerTest]\n    ## Formula: avg ~ group2 + (1 | subjects) + (1 | trial)\n    ##    Data: vg495_sz\n    ## \n    ##      AIC      BIC   logLik deviance df.resid \n    ##  14637.8  14666.3  -7313.9  14627.8     2209 \n    ## \n    ## Scaled residuals: \n    ##     Min      1Q  Median      3Q     Max \n    ## -4.6084 -0.5296 -0.0218  0.5354  5.0000 \n    ## \n    ## Random effects:\n    ##  Groups   Name        Variance Std.Dev.\n    ##  trial    (Intercept)  0.1052  0.3244  \n    ##  subjects (Intercept)  6.0325  2.4561  \n    ##  Residual             41.2136  6.4198  \n    ## Number of obs: 2214, groups:  trial, 211; subjects, 55\n    ## \n    ## Fixed effects:\n    ##             Estimate Std. Error      df t value      Pr(\u003e|t|)    \n    ## (Intercept)   3.7655     0.4713 55.0745   7.989 0.00000000009 ***\n    ## group2SZ     -1.7218     0.7264 54.5621  -2.370        0.0213 *  \n    ## ---\n    ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n    ## \n    ## Correlation of Fixed Effects:\n    ##          (Intr)\n    ## group2SZ -0.647\n\nWe see that the difference **is significant** for this condition between the groups, we also see that the random effects are not significant\n\n``` r\nmodel1.04 = lmer(avg~group2+(1|subjects)+(1|trial), data = vg995_sz, REML=FALSE)\nsummary(model1.04)\n```\n\n    ## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's\n    ##   method [lmerModLmerTest]\n    ## Formula: avg ~ group2 + (1 | subjects) + (1 | trial)\n    ##    Data: vg995_sz\n    ## \n    ##      AIC      BIC   logLik deviance df.resid \n    ##  13814.0  13842.2  -6902.0  13804.0     2076 \n    ## \n    ## Scaled residuals: \n    ##     Min      1Q  Median      3Q     Max \n    ## -4.9336 -0.5639  0.0109  0.5603  5.5690 \n    ## \n    ## Random effects:\n    ##  Groups   Name        Variance Std.Dev.\n    ##  trial    (Intercept)  0.000   0.000   \n    ##  subjects (Intercept)  7.584   2.754   \n    ##  Residual             42.153   6.493   \n    ## Number of obs: 2081, groups:  trial, 198; subjects, 55\n    ## \n    ## Fixed effects:\n    ##             Estimate Std. Error      df t value      Pr(\u003e|t|)    \n    ## (Intercept)   3.7635     0.5208 54.7431   7.226 0.00000000165 ***\n    ## group2SZ     -2.1688     0.8075 55.2996  -2.686       0.00953 ** \n    ## ---\n    ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n    ## \n    ## Correlation of Fixed Effects:\n    ##          (Intr)\n    ## group2SZ -0.645\n    ## optimizer (nloptwrap) convergence code: 0 (OK)\n    ## boundary (singular) fit: see help('isSingular')\n\nWe see that the difference **is significant** for this condition between the groups, we also see that the random effects are not significant\n\n``` r\nmodel1.05 = lmer(avg~group2+(1|subjects)+(1|trial), data = vg2495_sz, REML=FALSE)\nsummary(model1.05)\n```\n\n    ## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's\n    ##   method [lmerModLmerTest]\n    ## Formula: avg ~ group2 + (1 | subjects) + (1 | trial)\n    ##    Data: vg2495_sz\n    ## \n    ##      AIC      BIC   logLik deviance df.resid \n    ##  15093.8  15122.4  -7541.9  15083.8     2252 \n    ## \n    ## Scaled residuals: \n    ##     Min      1Q  Median      3Q     Max \n    ## -5.6522 -0.5881 -0.0256  0.5429  4.8995 \n    ## \n    ## Random effects:\n    ##  Groups   Name        Variance Std.Dev.\n    ##  trial    (Intercept)  0.02279 0.151   \n    ##  subjects (Intercept)  6.39371 2.529   \n    ##  Residual             44.60604 6.679   \n    ## Number of obs: 2257, groups:  trial, 222; subjects, 55\n    ## \n    ## Fixed effects:\n    ##             Estimate Std. Error      df t value Pr(\u003e|t|)    \n    ## (Intercept)   1.9950     0.4842 55.6256   4.121 0.000127 ***\n    ## group2SZ     -1.5221     0.7485 55.7109  -2.034 0.046768 *  \n    ## ---\n    ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n    ## \n    ## Correlation of Fixed Effects:\n    ##          (Intr)\n    ## group2SZ -0.647\n\nWe see that the difference **is significant** for this condition between the groups, we also see that the random effects are not significant\n\n``` r\nmodel1.06 = lmer(avg~group2*condition+(1|subjects)+(1|trial), data = reduceddataset, REML=FALSE)\nsummary(model1.06)\n```\n\n    ## Linear mixed model fit by maximum likelihood . t-tests use Satterthwaite's\n    ##   method [lmerModLmerTest]\n    ## Formula: avg ~ group2 * condition + (1 | subjects) + (1 | trial)\n    ##    Data: reduceddataset\n    ## \n    ##      AIC      BIC   logLik deviance df.resid \n    ##  72355.2  72450.2 -36164.6  72329.2    10987 \n    ## \n    ## Scaled residuals: \n    ##     Min      1Q  Median      3Q     Max \n    ## -5.9049 -0.5623 -0.0063  0.5581  6.0532 \n    ## \n    ## Random effects:\n    ##  Groups   Name        Variance Std.Dev.\n    ##  trial    (Intercept)  0.1582  0.3978  \n    ##  subjects (Intercept)  6.0902  2.4678  \n    ##  Residual             41.1384  6.4139  \n    ## Number of obs: 11000, groups:  trial, 255; subjects, 55\n    ## \n    ## Fixed effects:\n    ##                           Estimate  Std. Error          df t value\n    ## (Intercept)                2.03187     0.47208    70.53284   4.304\n    ## group2SZ                  -1.70838     0.72839    69.91731  -2.345\n    ## condition245               1.58358     0.25380 10921.28847   6.239\n    ## condition495               1.75528     0.25407 10926.11569   6.909\n    ## condition995               1.72269     0.25480 10919.97383   6.761\n    ## condition2495             -0.03276     0.25142 10921.49449  -0.130\n    ## group2SZ:condition245      0.17997     0.39098 10935.13710   0.460\n    ## group2SZ:condition495     -0.05525     0.38963 10932.33222  -0.142\n    ## group2SZ:condition995     -0.50184     0.39755 10917.69930  -1.262\n    ## group2SZ:condition2495     0.16937     0.38867 10940.86641   0.436\n    ##                                Pr(\u003e|t|)    \n    ## (Intercept)            0.00005307318583 ***\n    ## group2SZ                         0.0218 *  \n    ## condition245           0.00000000045559 ***\n    ## condition495           0.00000000000516 ***\n    ## condition995           0.00000000001440 ***\n    ## condition2495                    0.8963    \n    ## group2SZ:condition245            0.6453    \n    ## group2SZ:condition495            0.8872    \n    ## group2SZ:condition995            0.2069    \n    ## group2SZ:condition2495           0.6630    \n    ## ---\n    ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1\n    ## \n    ## Correlation of Fixed Effects:\n    ##             (Intr) grp2SZ cnd245 cnd495 cnd995 cn2495 g2SZ:245 g2SZ:4 g2SZ:9\n    ## group2SZ    -0.646                                                          \n    ## conditin245 -0.265  0.172                                                   \n    ## conditin495 -0.265  0.172  0.493                                            \n    ## conditin995 -0.264  0.171  0.491  0.490                                     \n    ## conditn2495 -0.268  0.173  0.498  0.497  0.495                              \n    ## grp2SZ:c245  0.172 -0.265 -0.649 -0.320 -0.319 -0.324                       \n    ## grp2SZ:c495  0.173 -0.266 -0.321 -0.652 -0.320 -0.324  0.496                \n    ## grp2SZ:c995  0.169 -0.261 -0.315 -0.314 -0.641 -0.317  0.485    0.487       \n    ## grp2SZ:2495  0.173 -0.267 -0.322 -0.322 -0.320 -0.647  0.497    0.499  0.488\n\nWe see several things here\n\n1.  Overall group is not significant\n\n2.  condition 245 495 995 and 2495 are significant compared to condition\n\n    1.  \n\n3.  The interactions:\n\n    1.  sz\u0026condition 245 with controls \u0026 145 is not significant\n\n    2.  sz\u0026condition 495 with controls \u0026 145 is not significant\n\n    3.  sz\u0026condition 995 with controls \u0026 145 is significant\n\n    4.  sz\u0026condition 2495 with controls \u0026 145 is significant\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouwehorsthuis%2Fmixed-effect-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouwehorsthuis%2Fmixed-effect-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouwehorsthuis%2Fmixed-effect-models/lists"}