title: Yield Curve package R
body: <p>I want to interpolate a yield curve using Nelson-Siegel model. I'm new to R language but decided to use the "Yield Curve" package (available here <a href="http://cran.r-project.org/web/packages/YieldCurve/index.html" rel="nofollow">http://cran.r-project.org/web/packages/YieldCurve/index.html</a> and documentation's link: <a href="http://cran.r-project.org/web/packages/YieldCurve/YieldCurve.pdf" rel="nofollow">http://cran.r-project.org/web/packages/YieldCurve/YieldCurve.pdf</a>) There are 2 problems I faced: </p>
  
  <p>1) I don't understand why the first 2 parameters of NSrates in the 6th and 7th line of the following code(p.6 in documentation) took that format: </p>
  
  <pre><code>data(FedYieldCurve)
  tau &lt;- c(3, 6, 12, 60, 84, 120)
  mediumTerm &lt;- c(12,60,84)
  NSParameters &lt;- Nelson.Siegel(rate=FedYieldCurve[1:10,],
                                maturity=tau, MidTau=mediumTerm )
  y &lt;- NSrates(NSParameters[5,1:3],
               NSParameters$lambda[5],tau)
  plot(tau,FedYieldCurve[5,],main="Fitting Nelson-Siegel yield curve", type="o")
  lines(tau,y, col=2)
  legend("topleft",legend=c("observed yield curve","fitted yield curve"),
  col=c(1,2),lty=1)
  grid()
  </code></pre>
  
  <p>2) how to extract a certain yield from the curve? For example, If I have a maturity of 12 months, what is its related yield?.</p>
  
  <p>Thank you a lot for taking time to answer my questions.</p>