title: How to make a Mixed Linear Model with two fixed effects and one random effect in pandas?
body: <p>New to coding so I'm not sure how to even go about doing this. <br>
  I have a df that looks something like this: <br></p>
  
  <pre><code>        ID        A          B
  0       1         20         4.0
  1       1         24         5.0
  2       2         24         0.0
  3       2         9          2.0
  4       3         24         1.0
  5       3         24         0.0
  </code></pre>
  
  <p>I want to make a Mixed Linear model that allows me to correlate A and B to show variability within ID. A and B are my fixed effects while ID is my random effect. I want it to be so that A is dependent on B.<br>
  I have attempted to use this code in order to complete this: <br/></p>
  
  <pre><code>import statsmodels.api as sm
  model = sm.MixedLM.from_formula("B~ A", df1, groups=df1["ID"])
  result = model.fit()
  print(result.summary())
  </code></pre>
  
  <p>However I keep getting the invalid syntax error. <br/>
  I was also wondering how I could plot this on a scatter plot, because I would like to find correlation between A and B based on the slope of each line for each ID. </p>