On May 4, 2011, at 8:34 AM, Joshua Wiley wrote:
Hi Ondrej,
What documentation have you looked at? Does this help at all?
require(splines)
?ns
## one example
summary(lm(y ~ ns(x, df = 3),
data = data.frame(y = runif(100), x = rbinom(100, 9, .25)^2)))
## built in examples
example(ns)
Also,
Hi Ondrej,
What documentation have you looked at? Does this help at all?
require(splines)
?ns
## one example
summary(lm(y ~ ns(x, df = 3),
data = data.frame(y = runif(100), x = rbinom(100, 9, .25)^2)))
## built in examples
example(ns)
Also, I am very fond of the book, Modern Applied Statisti
Dear R-helpers,
I need to fit natural cubic spline with specified number of knots. I
expected 'splines' package will be helpful, but I am confused by its
help. Is more detailed documentation available for it or could you
recommend another R function?
Best regards
Ondrej Mikula
Hello,
I am using R and the smooth.Pspline function in the pspline package to
smooth some data by using natural cubic splines. After fitting a
sufficiently smooth spline using the following call:
(ps=smooth.Pspline(x,y,norder=2,spar=0.8,method=1)
[the values of x are age in years from 1 to 100]
4 matches
Mail list logo