title: Simulating random effects / mixed models in SAS
body: <p>I'm trying to create a simulation of drug concentration based on the dose of a drug given. I have some preliminary data and I used a random effects model to analyze the relationship between log(dose), predicting log(drug concentration), modelling subject as a random effect. </p>
  
  <p>The results of that analysis are below. I want to take these results and simulate similar data in SAS, so I can look at the effect of changing doses on the resulting concentration of drug in the body. I know that when I simulate the data, I need to ensure the random slope is correlated with the random intercept, but I'm unsure exactly how to do that.  Any example code would be appreciated.</p>
  
  <p>Random effects:</p>
  
  <pre><code>Formula: ~LDOS | RANDID
  Structure: General positive-definite, Log-Cholesky parametrization
  StdDev Corr
  (Intercept) 0.15915378 (Intr)
  LDOS 0.01783609 0.735
  Residual 0.05790635
  </code></pre>
  
  <p>Fixed effects: </p>
  
  <pre><code>LCMX ~ LDOS
  Value Std.Error DF t-value p-value
  (Intercept) 3.340712 0.04319325 16 77.34339 0
  LDOS 1.000386 0.01034409 11 96.71090 0
  </code></pre>
  
  <p>Correlation:</p>
  
  <pre><code>(Intr)
  LDOS -0.047
  </code></pre>