title: Convert glmer output (logit regression) to probabilities
body: <p>I have data such as this. I am running glm on all the Q variables.</p>
  <pre><code>dat &lt;- read_table2(&quot;condition   school  Q5_3    Q6  Q7_1    Q7_2    Q7_3    Q7_4    Q13_1   Q13_2   Q13_3
  0   A   1   1   1   1   1   1   0   1   1
  1   B   1   0   0   NA  NA  NA  NA  1   1
  1   C   1   0   1   1   1   1   0   1   1
  1   A   0   0   0   NA  NA  NA  NA  1   1
  1   B   1   0   0   NA  NA  NA  NA  1   1
  0   C   1   1   1   1   1   0   0   0   0
  0   A   0   0   0   NA  NA  NA  NA  NA  NA
  0   B   1   1   1   1   1   1   1   1   1
  0   C   1   1   0   NA  NA  NA  NA  1   0
  0   A   1   0   0   NA  NA  NA  NA  1   0
  0   B   1   0   1   1   0   1   1   NA  NA
  0   C   1   0   1   1   1   1   1   1   0
  1   A   1   1   1   1   0   1   0   1   1
  1   B   0   0   0   NA  NA  NA  NA  1   1
  0   C   1   0   0   NA  NA  NA  NA  NA  NA
  &quot;)
  </code></pre>
  <p>This is the loop that I am using to pull out the coefficients that I want.</p>
  <pre><code># We only need the condition and school
  # Apply
  models &lt;- function(x)
  {
    model1 &lt;- glmer(x~ (1|school) + condition ,data=dat , family = binomial, na.action = na.exclude)
    return(model1)
  }
  
  
  y &lt;- apply(dat[,-c(1,2)],2,models)
  #Extract results
  extract &lt;- function(x)
  {
    z &lt;- as.data.frame(summary(x)$coefficient)
    z$id &lt;- rownames(z)
    z &lt;- z[,c(dim(z)[2],1:(dim(z)[2]-1))]
    rownames(z)&lt;-NULL
    return(z)
  }
  #Extract summary with function
  DF &lt;- as.data.frame(do.call(rbind,lapply(y,extract)))
  #Format variables
  DF$var &lt;- gsub(&quot;\\..*&quot;,&quot;&quot;,rownames(DF))
  #Arrange columns
  DF_glm &lt;- DF[,c(dim(DF)[2],1:(dim(DF)[2]-1))]
  rownames(DF)&lt;-NULL
  </code></pre>
  <p>This loops works fine, but I need to convert the output (coefficients) from log odds to probabilities. Any suggestions on how to do this?</p>