title: LMS (Lambda-Mu-Sigma) method in R
body: <p>I want to create percentile curves for my data using LMS (Lambda-Mu-Sigma) method. I have following example data. How can 10th, 50th and 90th percentile curves of yvar (on y-axis) vs age (on x-axis) be drawn using LMS?</p>
  
  <pre><code>age = sample(5:75, 500, replace=T) 
  yvar = rnorm(500, age, 20)
  mydata = data.frame(age, yvar)
  head(mydata)
    age     yvar
  1  61 87.16011
  2  58 49.73289
  3  65 15.60212
  4  71 83.32699
  5  33 40.89592
  6  18 25.04376
  
  plot(age, yvar)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/U5leC.png" alt="enter image description here"></p>
  
  <p>I came across VGAM package <a href="http://www.inside-r.org/packages/cran/VGAM/docs/lms.bcn" rel="nofollow noreferrer">http://www.inside-r.org/packages/cran/VGAM/docs/lms.bcn</a> . Is that the best method to do it? I could not really understand its example code to create simple percentile curve from above data. Thanks for your help.</p>