The R Project SVN R

Rev

Rev 61168 | Rev 69579 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61168 Rev 62223
Line 1... Line 1...
1
% File src/library/splines/man/bs.Rd
1
% File src/library/splines/man/bs.Rd
2
% Part of the R package, http://www.R-project.org
2
% Part of the R package, http://www.R-project.org
3
% Copyright 1995-2012 R Core Team
3
% Copyright 1995-2013 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{bs}
6
\name{bs}
7
\alias{bs}
7
\alias{bs}
8
\title{B-Spline Basis for Polynomial Splines}
8
\title{B-Spline Basis for Polynomial Splines}
Line 32... Line 32...
32
  \item{Boundary.knots}{boundary points at which to anchor the B-spline
32
  \item{Boundary.knots}{boundary points at which to anchor the B-spline
33
    basis (default the range of the data). If both \code{knots} and
33
    basis (default the range of the data). If both \code{knots} and
34
    \code{Boundary.knots} are supplied, the basis parameters do not
34
    \code{Boundary.knots} are supplied, the basis parameters do not
35
    depend on \code{x}. Data can extend beyond \code{Boundary.knots}.}
35
    depend on \code{x}. Data can extend beyond \code{Boundary.knots}.}
36
}
36
}
-
 
37
\details{
-
 
38
  \code{bs} is based on the function \code{\link{spline.des}}.
-
 
39
  It generates a basis matrix for
-
 
40
  representing the family of piecewise polynomials with the specified
-
 
41
  interior knots and degree, evaluated at the values of \code{x}.  A
-
 
42
  primary use is in modeling formulas to directly specify a piecewise
-
 
43
  polynomial term in a model.
-
 
44
}
37
\value{
45
\value{
38
  A matrix of dimension \code{c(length(x), df)}, where either \code{df}
46
  A matrix of dimension \code{c(length(x), df)}, where either \code{df}
39
  was supplied or if \code{knots} were supplied, \code{df =
47
  was supplied or if \code{knots} were supplied, \code{df =
40
  length(knots) + degree} plus one if there is an intercept.  Attributes
48
  length(knots) + degree} plus one if there is an intercept.  Attributes
41
  are returned that correspond to the arguments to \code{bs}, and
49
  are returned that correspond to the arguments to \code{bs}, and
42
  explicitly give the \code{knots}, \code{Boundary.knots} etc for use by
50
  explicitly give the \code{knots}, \code{Boundary.knots} etc for use by
43
  \code{predict.bs()}.
51
  \code{predict.bs()}.
44
 
-
 
45
  \code{bs()} is based on the function \code{\link{spline.des}()}.
-
 
46
  It generates a basis matrix for
-
 
47
  representing the family of piecewise polynomials with the specified
-
 
48
  interior knots and degree, evaluated at the values of \code{x}.  A
-
 
49
  primary use is in modeling formulas to directly specify a piecewise
-
 
50
  polynomial term in a model.
-
 
51
}
52
}
52
\seealso{
53
\seealso{
53
  \code{\link{ns}}, \code{\link{poly}}, \code{\link{smooth.spline}},
54
  \code{\link{ns}}, \code{\link{poly}}, \code{\link{smooth.spline}},
54
  \code{\link{predict.bs}}, \code{\link{SafePrediction}}
55
  \code{\link{predict.bs}}, \code{\link{SafePrediction}}
55
}
56
}